diff options
author | brian <brian@FreeBSD.org> | 1997-10-29 01:19:51 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-10-29 01:19:51 +0000 |
commit | 941e2045a2c71da41fadec9bfed70cb37decf91d (patch) | |
tree | 4c2bd79bb14d877ea218862c9460f1013baccc74 /usr.sbin/ppp/lcp.c | |
parent | addd7d2b5d469a8b3c11cfc9d397c0faad4ade9a (diff) | |
download | FreeBSD-src-941e2045a2c71da41fadec9bfed70cb37decf91d.zip FreeBSD-src-941e2045a2c71da41fadec9bfed70cb37decf91d.tar.gz |
o Bump version to 1.3 to reflect major changes
o Report modem connect time properly
o Report bytes in/out over physical media
o Fix phases (TERMINATE is *higher than* DEAD)
o Do a LayerFinish from LcpDown
o Bring down IPCP & CCP when we enter PHASE_TERMINATE
o Give a new prompt when we go to PHASE_DEAD
o Stop the modem timer properly when idle
o Treat sig 15 like an exiting carrier loss
o Log (DEBUG) offline & online transitions
Diffstat (limited to 'usr.sbin/ppp/lcp.c')
-rw-r--r-- | usr.sbin/ppp/lcp.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/usr.sbin/ppp/lcp.c b/usr.sbin/ppp/lcp.c index 0d1e6a3..38e96e4 100644 --- a/usr.sbin/ppp/lcp.c +++ b/usr.sbin/ppp/lcp.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: lcp.c,v 1.40 1997/10/26 01:02:57 brian Exp $ + * $Id: lcp.c,v 1.41 1997/10/26 12:42:11 brian Exp $ * * TODO: * o Validate magic number received from peer. @@ -311,12 +311,10 @@ static void LcpLayerFinish(struct fsm * fp) { LogPrintf(LogLCP, "LcpLayerFinish\n"); - OsCloseLink(1); - NewPhase(PHASE_DEAD); + HangupModem(0); StopAllTimers(); - (void) OsInterfaceDown(0); /* We're down at last. Lets tell background and direct mode to get out */ - NewPhase(PHASE_TERMINATE); + NewPhase(PHASE_DEAD); LcpInit(); IpcpInit(); CcpInit(); @@ -363,13 +361,9 @@ void LcpDown() { /* Sudden death */ LcpFailedMagic = 0; - NewPhase(PHASE_DEAD); - StopAllTimers(); FsmDown(&LcpFsm); - /* - * We now wait for the FsmDown() to result in a LcpLayerDown() (if we're - * open). - */ + /* FsmDown() results in a LcpLayerDown() if we're currently open. */ + LcpLayerFinish(&LcpFsm); } void @@ -383,6 +377,8 @@ LcpOpen(int mode) void LcpClose() { + NewPhase(PHASE_TERMINATE); + OsInterfaceDown(0); FsmClose(&LcpFsm); LcpFailedMagic = 0; } |