[Ns-developers] comments on proposed loopback changes
Tom Henderson
tomh at tomh.org
Mon Apr 27 23:10:13 PDT 2009
Mathieu Lacage wrote:
> [CCing ns-dev because probably no one is subscribed to ns-reviews yet]
>
> On Sun, 2009-04-26 at 21:54 -0700, Tom Henderson wrote:
>
>> 1) Why is this device created by Ipv4L3Protocol? Shouldn't it just be
>> created as part of the node? What if someone builds an IPv6 only node?
>
> Presumably, there would be an ipv6 loopback device. This is what I was
> expecting at least.
If you look at device lo, you'll see both v4 and v6 addresses on a
single device.
> If you want to, we can probably add it in the Node
> directly but, if we do this, then, the problem will be identifying which
> device is the loopback device from Ipv4L3Protocol. Should we hardcode an
> assumption that device 0 is always the loopback device ?
> Maybe we should
> add a Node::GetLoopbackDevice method which always returns device 0 ?
That would be OK by me, but maybe another alternative is to have it
added by the AddInternetStack() method, since perhaps loopback device is
a TCP/IP-specific concept. And GetLoopbackDevice could be some kind of
internet stack helper that iterates and dynamic casts to find the first
such device.
Tom
More information about the Ns-developers
mailing list