lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] 2 Interfaces


From: Fabian Cenedese
Subject: Re: [lwip-users] 2 Interfaces
Date: Tue, 05 Mar 2013 09:07:50 +0100

At 11:50 28.02.2013 +0100, you wrote:

>Fabian Cenedese wrote:
>> I have a device with 2 Ethernet interfaces. Can I have two
>> "instances" of lwip to handle those?
>
>Not unless you use a full-blown OS that can give the 2 instances seperated 
>address spaces. In other words, the answer is possibly "no, you can't".
>
>> My problem is that both
>> are equal and should allow the same functionality. E.g. it
>> should be possible to have handlers that listen on the same
>> (UDP) port for each interface. But lwip can obviously only
>> have one handler. Or with sockets, there's no way to specify
>> an interface if I have two sockets listening on the same port
>> and the same IP addresses.
>
>You can't do this on the same IP address. To do this with lwIP, you need to 
>give each netif a dedicated IP address.

Assuming that both interfaces have different IP/MAC and
don't need to handle the same ports, would it then be
possible to handle both devices with the same instance
of lwip? I mean there's netif_add, can't I call this twice
for every interface and set just one as the default? What
conditions need to be fulfilled to make this work?

Thanks

bye  Fabi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]