[Ns-developers] VirtualNetDevice (TUN/TAP)
Gustavo Carneiro
gjcarneiro at gmail.com
Sun May 18 07:19:20 PDT 2008
On 16/05/2008, Tom Henderson <tomh at tomh.org> wrote:
>
> Mathieu Lacage wrote:
>
>> On Thu, 2008-05-15 at 18:08 +0100, Gustavo Carneiro wrote:
>>
>>> Hello,
>>>
>>> I have made a VirtualNetDevice class in NS-3. Coupled with packet
>>> sockets,
>>> it can be used for tunneling. It is similar to Universal TUN/TAP devices
>>> [1]. Actually it can be seen as functionally equivalent to both "tun"
>>> and
>>> "tap" interfaces, since in NS-3 NetDevices receive the IP packet and L2
>>> destination address separately but in the same method call.
>>>
>>> If there is interest in this, I can port it to ns-3-dev (using ns-3.0.11
>>> now) and submit for inclusion. If there is no interest, well, nevermind
>>> then :-)
>>>
>>
>> I think that it is in everyone's best interest to merge all the code we
>> can provided it does not impact the core or existing code (which is
>> likely to be the case for a new NetDevice subclass). If you can post it
>> here for a first review before porting it to ns-3-dev, I could try to
>> review it next week.
>>
>
> Yes, please post it, I think it will be useful.
http://code.nsnam.org/gjc/ns-3-virtual-netdevice/
It is very simple. It is based on ns-3.0.11. Incidentally it won't work on
ns-3.0.11 due to missing bug fixes only present on ns-3-dev.
I am willing to port to ns-3-dev and add an example, if there is interest in
inclusion in ns-3 (but I have more urgent things to do otherwise).
--
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