[Top][All Lists]

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

Re: [lwip-users] Handling link-up/down, netif-up/down events in LwIP

From: Kieran Mansley
Subject: Re: [lwip-users] Handling link-up/down, netif-up/down events in LwIP
Date: Sat, 7 Jul 2012 11:56:45 +0100

Just answering two of these questions as I'd need to think in more detail about 
the others.

On 6 Jul 2012, at 11:25, Krzysztof Wesołowski wrote:

> 4. How listening and/or active connections made with netconn API would react 
> to such event?

They probably wouldn't.  TCP is designed to cope with links coming and going, 
and will just retransmit if any packets are lost while the link is down for 
example.  Connections should survive link being removed and restored.  

> 5. If i write own, simple etharp_output function to check link state before 
> sending, which return code should be used if netif_link_is_down? Does this 
> error will be simply forwarded to caller? should i 

I would experiment on Linux or similar to see what happens there, but my guess 
is that setting the interface down (not quite the same as the link state being 
down) will result in the route being invalid and you'll get an error such as 
"host unreachable" or "no route to host".


reply via email to

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