lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] PPP driver from lwIP


From: Simon Goldschmidt
Subject: Re: [lwip-users] PPP driver from lwIP
Date: Fri, 06 May 2011 09:14:12 +0200

narke <address@hidden> wrote:
> After I check the sio.h and the lwIP's code, now, I think I begin to
> understand that why the old device of our company was not using the
> PPP implementation from lwIP.    PPP is using block sio interface,
> right?  I've mentioned that our device does not come with an OS, so
> there is not way to implement a block style sio service, such as
> sio_read().
> 
> Am I understanding right?

If you look at the current sources (or 1.4.0RC2), not 1.3.2, you'll notice that 
sio_read is only used from pppInputThread(), which is of course only used with 
NO_SYS==0.

With NO_SYS==1, your driver should call pppos_input() from the main loop when 
characters are received.

You're right however for 1.3.2 or before: there was no way to use lwIP ppp with 
NO_SYS==1, since back then (and before), ppp relied on threading to be 
available, which I fixed about a year ago (I think).

As to the code quality: lwIP's PPP is based on the samba pppd (latest v2.3.x, I 
think, with some bugfixes backported from v2.4.x), so the code should be quite 
good. The files ppp.h/ppp.c however, contain lwIP adaption code (resembles the 
architecture-dependent code in original pppd). Also, ppp_oe.c was ported from 
NetBSD.

Simon
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de



reply via email to

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