[Top][All Lists]

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

Re: [lwip-users] Resource starvation

From: Simon Goldschmidt
Subject: Re: [lwip-users] Resource starvation
Date: Sun, 13 Feb 2011 22:28:14 +0100

Yoav Nissim <address@hidden> wrote:

> The code in netif_set_ipaddr() does not handle bound PCBs and time_wait
> PCBs. The listening PCBs in set_ipaddr() simply have their address
> changed, but in our case we need to clean them up.
Oh, right.
> The active PCBs are taken care of by tcp_abort(). This leaves:
> 1. time_wait PCBs which I believe can simply be removed.
> 2. listening PCBs which cannot be processed by tcp_abort() - how do I
> clean them up?
I think they do have an err callback, but I'll have to check the sources...
> 3. bound PCBs - I am not sure if I can call tcp_abort() on these, or
> whether I would manually call TCP_EVENT_ERR(errf, errf_arg, ERR_ABRT),
> and then have them removed. An application may be taken by surprise here...
Calling tcp_abort is correct. In fact, netif_set_ipaddr already does this.

> Not a problem. I just need to be sure I understand - this means that all
> the functions in ppp.h under the "PUBLIC FUNCTIONS" comment [namely
> pppOverSerialOpen, pppClose and pppSigHup] must be called using
> tcpip_callback()?

Again, I have to check that in the sources but I guess the answer is yes, since 
every net if driver in lwIP has to do it that way, and PPP is essentially a 
netif driver to lwIP.


reply via email to

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