lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] LCP Termination Request steps


From: address@hidden
Subject: Re: [lwip-users] LCP Termination Request steps
Date: Mon, 07 May 2012 22:15:52 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:12.0) Gecko/20120428 Thunderbird/12.0.1

Sylvain Rochet wrote:
In fsm_rtermreq(), if f->state equals LS_OPENED, which is the Connection
terminated by peer condition, we send a Termination Ack, which seems logical.

But, in this case, we call TIMEOUT(fsm_timeout, ...), but we don't send
any request at this time, what are we waiting for exactly ?
This is not really an answer to your post, rather a clarification about our PPP code in general:

I know I have said this before and it sounds like a lame excuse, but the PPP code is not our own code - we just copied it from pppd (http://ppp.samba.org/) and adapted it to lwIP. Unfortunately, not many here know their way around it. One or two years ago, we took the effort to see which version of pppd our code relates to and we're pretty much on 2.3.11 with some bugs from 2.4.x backported (thanks to Ioardan Neshev!).

There are some files that are different, however:
- chpms.c/.h are named chap_ms.c/.h in the original pppd 2.3.11 sources
- pap.c/.h are named upap.c/.h in the original pppd 2.3.11 sources
- randm.c is a random generator not included in the original pppd
- magic.c does not use the C library, but uses randm.c instead
- vj.c/.h is an implementation of the Van Jacobson header compression algorithm adapted to lwIP pbufs, probably copied from one of the vjcompress.c files from pppd. - ppp.c, ppp.h and ppp_impl.h contain the adaption from pppd to lwIP. This is the "OS"-dependent part like there is an implementation for linux, xBSD etc. in the pppd sources.
- ppp_oe.c is Marc Boucher's implementation based on NetBSD's if_pppoe.c

There is of course potential for bugs in it, but when analyzing of reporting bugs, it is strongly encouraged to compare the code in question to pppd 2.3.11 (our basis) and newer versions (perhaps it's already fixed?) and to share this knowledge with us when reporting a bug.

I'm also adding this short text as a 'readme.txt' to the ppp code so it isn't lost :-)

Being like that, aside from bugs that are already fixed in 2.4.x and bugs we made while adapting the sources, most of the bugs will be found in ppp.c (lwIP specific code) and ppp_oe.c (i.e. in its interaction with ppp.c - due to the fact that this is now a mix between BSD PPP code and pppd).

A bug in fsm.c is a thing I really can't comment on: I'm simply not an expert in ppp to help you there, Sorry :-(





reply via email to

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