lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] PPP stack


From: Thies, Reinhard
Subject: RE: [lwip-users] PPP stack
Date: Wed, 20 Apr 2005 07:13:51 -0500

Hello Tim,

thanks for the help :-))

Regards, Reinhard

> -----Original Message-----
> From: address@hidden 
> [mailto:address@hidden 
> On Behalf Of address@hidden
> Sent: Wednesday, April 20, 2005 11:41 AM
> To: address@hidden
> Subject: Re: [lwip-users] PPP stack
> 
> 
> 
> 
> 
> 
> Hello Reinhard,
> 
> >Is there any documentation or example code avilable, 
> explaining how to 
> >use ppp on the server side ? What is the interface point 
> between my sio 
> >device and the ppp stack ?
> 
> As far as I know, there isn't any documentation about this. 
> You must implement the interface defined in <sio.h> over your 
> particular serial hardware. PPP doesn't perform sio_open(); 
> rather, you must do that in your own code and pass the 
> corresponding handle of type sio_fd_t when you call 
> pppOpen(). This call will launch an input thread which uses 
> sio_read() and sio_read_abort().The abort function is 
> necessary to wake up the input thread from another thread 
> context, notably the calls pppClose() and pppSigHUP(). If you 
> don't have such a need, you might get by without this, 
> although I couldn't say for sure. On the transmit side, all 
> outgoing PPP frames are sent from within the tcpip thread, 
> which will call sio_write().
> 
> Along these lines, I'll take this opportunity to note what I 
> feel is a shortcoming in the current PPP implementation. When 
> the PPP input thread is launched in pppOpen(), the code uses 
> sys_thread_new() to create the thread. Later, when the thread 
> exits, there is no corresponding call to release the 
> resource. In the majority of implementations, this may not be 
> a problem, assuming that sys_thread_new() is nothing more 
> than a passthrough to a corresponding OS function, and later 
> everything gets cleaned up when the thread hits its return point.
> 
> However, if the implementation's sys_thread_new() actually 
> manages preallocated resources (as does mine), this is a 
> problem. So I added the function sys_thread_free() to the 
> system architecture interface, and call it in the PPP input 
> thread just before exiting.
> 
> Regards,
> Tim Butler
> 
> 
> 
> _______________________________________________
> lwip-users mailing list
> address@hidden 
> http://lists.nongnu.org/mailman/list> info/lwip-users
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This e-mail is confidential, may contain proprietary information
of the Cooper Cameron Corporation and its operating Divisions
and may be confidential or privileged.

This e-mail should be read, copied, disseminated and/or used only
by the addressee. If you have received this message in error please
delete it, together with any attachments, from your system.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




reply via email to

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