lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] multiple ports/interfaces


From: address@hidden
Subject: Re: [lwip-users] multiple ports/interfaces
Date: Sun, 7 Oct 2018 19:39:05 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 07.10.2018 17:42, Ranran wrote:
On Sun, Oct 7, 2018 at 11:52 AM goldsimon <address@hidden> wrote:


Ranran wrote:
On Thu, Oct 4, 2018 at 9:28 PM address@hidden <address@hidden>
wrote:
On 04.10.2018 17:14, Ranran wrote:
Does lwip support using multiple ports (physical interface) ?
Yes. Do you want a single IP address or each netif with its own IP?
For a single IP address, you need something like a switch (see
bridgeif.c for a start).

I need to have each netif with its own IP.
That's no problem. You only might get routing problems when the two netifs are 
in the same subnet.

Is there any example showing how we should configure more than one
port?
That depends on the above question.

Is there a simple example for multiple netif each with itw own IP ?
No. Just call netif_add etc. for each netif.

I understand.
Should I than do bind to a specific ip address (according to netif),
in order to bind the socket to the netif  interface?

Either that or bind to device (setsockopt(SO_BINDTODEVICE) or *_bind_netif(), depending on which API you use).

Simon



reply via email to

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