[Ns-developers] NS-3 promiscuous mode for NetDevice
Gustavo Carneiro
gjcarneiro at gmail.com
Mon Jun 30 10:16:46 PDT 2008
One thing that I need from NS-3 right now, and is not possible without
patching the core, is to enable promiscuous mode protocol handlers. My
particular use case is rather complicated, but let's suppose a simpler
scenario to illustrate the case. Suppose I want to create a 802.1D Learning
Bridge, for instance for implementing a proper 802.11 Access Point. The
LearningBridge module needs to receive all L2 frames from netdevices, even
the ones with destination address not matching the netdevice it arrived on.
I think it is clear this feature is needed. Now, I would welcome advice
on what is the best way I can implement it[1]. I can see different ways to
accomplish the goal:
1- NetDevices receive a "promiscuous mode", wherein they start receiving
all packets and forward them up. It is then the job of the upper layers to
filter out the ones that it does not want. We could have both
Node::RegisterProtocolHandler (what we have now) and also something like
Node::RegisterPromiscuousProtocolHandler.
2- Add an API like AddPromiscuousReceiveCallback directly in NetDevice.
I think 1 is more close to the Linux kernel and I would favour that
approach. Any others? Any opinion?
Thanks in advance.
[1] As the case of VirtualNetDevice, I'll implement the feature in my local
copy but willing to share it with anyone interested.
--
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
mailing list