And it Click(!)ed

Another ns-3-click update from my side.

The Ipv4ClickRouting class is almost done. I tried writing some sample to code to get a Click router based node to send a packet, and have another similar node receive it via a CSMA link. And it actually works! w00t! 🙂

Meanwhile, it seems like I’m going to have to deviate from my proposal a bit. The project proposal talked about using Click strictly for layer 3 services only. This meant that we were to stay away from using Click’s MAC layer functionality for the time being. This naturally means that once a Click graph is processed, we’ll need to receive the packet on the ns-3 side as an IP packet, as opposed to an Ethernet encapsulated one. The original plan was to send this IP based packet down to a node’s Ipv4Interface, from which point onwards, we’d be following the normal ns-3 path of a packet. But this has complications of its own, the most important of them being the fact that we can’t perform a RouteOutput() query when using external routers like Click. RouteOutput(), in a normal scenario, returns the route that the packet is to follow, which is a method provided by the Ipv4RoutingProtocol instance of a node. Thus, given an IP packet returned from Click, we have no way of knowing what the ‘next hop’ destination of the packet is, which needs to be known in order to forward a packet. I’m presently proposing to directly send this packet down a node’s NetDevice, thus bypassing even the ArpL3Protocol. The advantage with this scheme is that a user gets to test the _whole_ of his Click graph as it is! The only disadvantage is that we need to extract the required MAC layer details from the packet and strip off the packet’s Ethernet header before forwarding it down the NetDevice, since all the NetDevice subclasses append an ethernet header in their Send() methods. While this is hardly 10 lines of code, purists may argue that a packet going down a stack never needs to have a packet stripped off it. Oh well. I’m presently trying to discuss this on the ns-developers mailing list. Let’s see what everyone else thinks. 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s