lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] how lwip know internet cable is unplug


From: Simon Goldschmidt
Subject: Re: [lwip-users] how lwip know internet cable is unplug
Date: Fri, 02 Sep 2011 15:29:29 +0200

address@hidden wrote:
> So protection around my calls it is, but I don't quite see how RX and TX 
> can be handled in the same thread since the TX-function is registered with
> lwip in the netif-structure and RX isn't. 

By using tcpip_input() as the input function. This passes received packets into 
the tcpip_thread before actually feeding them into the stack.

> OK I see now that there is an input-pointer in the netif-structure as well
> but it's not referenced in the driver-template (ethernetif.c) so I 
> invented something on my own...I'll have to dig through the examples one 
> more time and look how they have done it...

It *is*: it's not set there but it is used. The code that sets it is in netif.c 
(the function being set as netif->input has to be passed to netif_add()).

Simon
-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!               
Jetzt informieren: http://www.gmx.net/de/go/freephone



reply via email to

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