[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AW: [lwip-users] LWIP and second IP feasible?
From: |
Tyrel Newton |
Subject: |
Re: AW: [lwip-users] LWIP and second IP feasible? |
Date: |
Mon, 7 Mar 2011 08:20:13 -0800 |
>>
>
> I don't think there's a way to achieve this easily with lwIP at the moment.
> WIth separate interfaces it would work, but with two IP addresses on the same
> interface we'd need to do some work as I think at the moment each netif is
> assumed to have a single address. You might get somewhere by arranging to
> have two netifs on the same physical interface, but I'm not sure how that
> would work with the driver when it receives a packet as both netifs would
> need to be involved.
>
I don't have a need for this myself, but I have written multiple drivers for
lwip, so I'll throw in my 0.02.
AFAIK, this would require a pretty thorough redesign of the netif structure and
associated code since it only contains one set of ip/gateway/netmask addresses.
It would also require modifying the IP routing code that searches for an
outgoing interface.
On the other hand, supporting this on the driver should be much simpler. A
"global" driver that:
- doesn't store its state information in the netif->state field
- provides a locking mechanism (i.e mutex)
should be enough. This would allow you to multiplex two netifs using the same
driver. And it shouldn't matter which netif you pass incoming packets to either.
I'm not sure how this would affect the etharp module and the storage of the
hardware address in the netif structure though, since you would have a
one-to-many mapping . . .
Tyrel
- AW: [lwip-users] LWIP and second IP feasible?, (continued)
- AW: [lwip-users] LWIP and second IP feasible?, Delta Control - Bernd Uttich, 2011/03/05
- Re: AW: [lwip-users] LWIP and second IP feasible?, Kieran Mansley, 2011/03/06
- SV: AW: [lwip-users] LWIP and second IP feasible?, Emil Ljungdahl, 2011/03/07
- RE: AW: [lwip-users] LWIP and second IP feasible?, Hugh Reynolds, 2011/03/07
- Re: AW: [lwip-users] LWIP and second IP feasible?, Simon Goldschmidt, 2011/03/12
- RE: AW: [lwip-users] LWIP and second IP feasible?, Hugh Reynolds, 2011/03/12
- [lwip-users] porting lwip to uC/OSII, LI Zhong, 2011/03/14
- Re: [lwip-users] porting lwip to uC/OSII, Kieran Mansley, 2011/03/14
- [lwip-users] how to use loopif in embedded system, LI Zhong, 2011/03/30
- AW: AW: [lwip-users] LWIP and second IP feasible?, Delta Control - Bernd Uttich, 2011/03/09
- Re: AW: [lwip-users] LWIP and second IP feasible?,
Tyrel Newton <=
- Re: AW: [lwip-users] LWIP and second IP feasible?, Kieran Mansley, 2011/03/12