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: ake . forslund
Subject: Re: [lwip-users] how lwip know internet cable is unplug
Date: Fri, 2 Sep 2011 15:40:08 +0200

Thanks for the advice,

I seem to have gotten it right when I wrote the code. I use tcpip_input() for handling input, so that part should be safe. I'll go through my calls into lwip and add protection.

Thank you for your help and clarification.

Best regards
/Åke
-----------------------------
Åke Forslund
0433-273296
NIBE AB
Box 14
S-285 21  Markaryd
Tel +46-(0)433-273296



From: "Simon Goldschmidt" <address@hidden>
To: Mailing list for lwIP users <address@hidden>
Date: 2011-09-02 15:29
Subject: Re: [lwip-users] how lwip know internet cable is unplug
Sent by: address@hidden






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

_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users


reply via email to

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