because we cannot rely on the node to have any assigned interface
when the nsc stack is initialised, we need to delay creating the nsc
interface. Up until now this was done by initialising the interface
when the first socket is opened, which resulted in a segfault or
an assertion failure when a packet arrived but no socket was ever created...
this removes usage of struct iphdr and inet_ntoa.
Replaced by uint32_t[] (we only need to fetch source/destination
ip addresses) and Ipv4Header::Print(), respectively.
netinet/in.h and arpa/inet.h are retained for the time being
due to ntohs/ntohl.
the receive method hands packets to the nsc core via
nsc's if_receive_packet() method.
NSC (rightfully) assumes that if it gets a packet, there must
be a network interface. However, at this time the interface
initialization in ns-3-nsc is done when the first socket is created.
The result is a segmentation fault inside nsc when ns-3 receives
a packet on an nsc-enabled node before a socked has been created
on that node.
For the time being, use NS_ASSERT to make sure the nsc interface exits.
This also gets rid of the NS_LOG use inside the Softinterrupt timer
method and replaces
NS_LOG_FUNCTION_NOARGS with NS_LOG_FUNCTION (this), as suggested by
Mathieu Lacage.
changeset 3628:a9c05c7e54f2 ('Move all NSC related build code into
src/internet-stack') erronoulsy moved the sym link creation outside
of the loop.
closes bug #328.
changeset 3635:cddd59578812 ('compile nsc code unconditionally')
added the nsc header files to ns-3 and fixed up the include paths,
so we no longer need to create a builddir/nsc symlink to find them.
gtk config store pulled in libdl.so for us, so things fail
to link of the config store isn't enabled. This makes nsc
pull in libdl itself when its enabled.