[Top][All Lists]

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

Re: [lwip-devel] lwIP + SLIP/PPP single threaded

From: Erik Ekman
Subject: Re: [lwip-devel] lwIP + SLIP/PPP single threaded
Date: Tue, 9 Dec 2008 10:23:13 +0100

On Tue, Dec 9, 2008 at 8:13 AM, Simon Goldschmidt <address@hidden> wrote:
>> I have not yet made a "nice" version of it with NO_SYS defines and so
>> on, but if someone is interested can I explain the design further and
>> maybe create a proper patch.
> I think that would be great! The current PPP implementation does not seem of 
> too much use since it is limited to multithreading and noone seems to know in 
> detail how to use it... ?
> Simon

My os has functionality for getting timer events on specific
intervals, so I took all the code for sys_timeout()/sys_untimeout()
and implemented os timers as a lower level. This means I did not have
to change a lot of code to get it to compile at all. I also added
sys_jiffies() which returns a raw value from the low level timer.

My pppOpen only does the init, and is called when GPRS is up. The GPRS
then reads bytes from the serial port and when it looks like a PPP
frame it is sent to pppFrameRead() which allocates a pbuf to it and
runs pppInProc() then frees the pbuf. This emulated what was done in
the ppp main thread.

On the output path I have changed nPut() to call the serial driver directly.

When GPRS loses the channel it calls pppSigHup(), which calls the
linkStatusCB. The pppClose() does the same thing. The link status ends
up the GPRS handling code which closes the GPRS session when an error
status is received.


reply via email to

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