lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] LCP Termination Request missing


From: Ghislain Mary
Subject: Re: [lwip-users] LCP Termination Request missing
Date: Wed, 09 Nov 2005 15:57:24 +0100
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

Thanks for these explanations. Maybe that will help be to solve the problem I encounter.

Ghislain


David Empson wrote:
David Haas <address@hidden> wrote:

LCP is a layer on PPP.

I don't know that code. Who is the expert on PPP? How do you tell the
link to go up and down?


I'm no expert either, but I read the RFC a while ago and have a general
understanding of it, at least up to the LCP layer.

Assuming a simple PPP implementation (IP only), terminating a connection may
require an exchange of IPCP packets (Internet Protocol Control Protocol) to
negotiate termination of the IP connection. This should be followed by an
LCP "terminate-request". The other side is supposed to respond with LCP
"terminate-ack", and then both sides can drop the connection. The
terminate-request should be retried if no terminate-ack is received.

This should all be done in lwIP's PPP driver, which is below the IP layer.

From a quick glance at the code in src/netif/ppp, particularly fsm.c, lcp.c
and ppp.c, it looks like the code is trying to send a TERMREQ (with retries)
and expects to get a TERMACK response. lcp_close() calls fsm_close(), which
sets the state to CLOSING and sends the first TERMREQ.

According to Ghislain Mary's earlier message, it seemed that the TERMREQ
wasn't being sent even if lcp_close() was called directly by application
code.

This suggests a possible problem relating to delays waiting for the LCP
state to reach CLOSED. Perhaps the physical disconnect is happening
prematurely.

Looking at pppClose(), it triggers the LCP shutdown via a kill_link flag,
then waits for LCP to reach PHASE_DEAD before returning, but only if there
is no link status callback function. If that function has been provided,
pppClose() will return immediately, and the LCP close won't have finished
yet. There may be a separate mechanism to poll the state until LCP is DEAD,
but I haven't looked for it.

I'm not familiar enough with how lwIP's ppp interfaces to the serial driver
(which must be application specific) but I expect details like physically
hanging up the modem connection (dropping DTR or sending an ATH command) are
the responsibility of the serial/modem driver.


Kieran Mansley wrote:


On Tue, 2005-11-08 at 09:07 +0100, Ghislain Mary wrote:


Nobody's having an idea of how to tell lwIP to send an LCP Termination
Request?

I don't know what LCP is, but lwIP shouldn't have to do anything unusual
to transmit particular parts of a higher layer protocol - it's all just
a stream of bits as far as lwIP is concerned.

Kieran




_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users





reply via email to

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