[Ns-developers] a few more tap device comments
gjcarneiro at gmail.com
Sat Jun 6 04:58:38 PDT 2009
2009/6/6 Tom Henderson <tomh at tomh.org>
>> Although I suggested the name TapNetDevice, in reviewing this today, I
>> noticed that it is really behaving like a Tun device instead of a Tap device
>> (i.e. it is not adding an Ethernet header).
>> So, would you be amenable to naming it TunNetDevice instead?
>> I also thought that the example was a bit unusual because the TunNetDevice
>> handler is creating a Udp socket to send the datagram out, instead of just a
>> raw socket. What do you think about changing it to a raw socket?
> I had a couple more comments:
> - last release, Craig tried to add a tcpdump-like trace source consistently
> across all net devices, called PromiscSniffer. Any concern with adding it
> here too?
Not at all.
> - I wasn't sure about how users were expected to call Receive() and
> PromiscReceive(). In other NetDevices, there is a single Receive() function
> and it calls both the rxCallback and the promiscRxCallback. Here, those
> methods are separated. Are users supposed to call both of these methods, or
> pick one? Was there a reason you didn't call the promiscRxCallback from
> within Receive()?
No doubt Receive() should also be calling the promiscRxCallback, good catch.
To get completely rid of PromiscReceive, I'm not sure. I guess I am ok with
it, we can always add it later if we need it.
Thanks for the comments.
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert
More information about the Ns-developers