[Ns-developers] [quagga-porting]

Mathieu Lacage mathieu.lacage at sophia.inria.fr
Mon Jun 30 16:07:28 PDT 2008


hi liu,

I have reviewed your latest code. A couple of comments:

1) For msghdr/iovec support, it would nicer to just avoid dealing with
these data types internally. i.e., rather than implement
ProcessManager::SendTo by calling in ProcessManager::SendMsg, do it the
other way around: make SendMsg read the input simu_msghdr and invoke
SendTo, once for each item in the iovec list and ignore ancillary data
(msg_controllen and msg_control)

2) In ProcessManager::RecvFrom, I see that you ignore the from argument.
Can you add a XXX in the code to mark this ? Same in
ProcessManager::RecvMsg

3) In ProcessManager::OpenSocket, you have added ns3::TcpSocketFactory
support: did you test it ? 

4)
+  else if (domain == SIMU_PF_NETLINK)
+    {
+      NS_ASSERT(type == SIMU_SOCK_DGRAM || type == SIMU_SOCK_RAW);

the NS_ASSERT should be probably rewritten to return a real error such
as EPROTONOSUPPORT

5) A lot of the content of simu-netlink.h and simu-rtnetlink.h seems to
be copy/pasted from netlink.h. If so, can you attach a copyright
statement referencing the original authors and a license blurb ?

6) src/node/netlink-socket-test.cc: should use NS_TEST_ASSERT rather
than NS_ASSERT.

regards,
Mathieu



More information about the Ns-developers mailing list