* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#ifndef lint
-static char rcsid[] = "$Id: lcp.c,v 1.38 1999/04/16 11:35:43 paulus Exp $";
-#endif
+#define RCSID "$Id: lcp.c,v 1.44 1999/08/13 06:46:14 paulus Exp $";
/*
* TODO:
#include "chap.h"
#include "magic.h"
+static const char rcsid[] = RCSID;
+
/*
* LCP-related command-line options.
*/
{ "-as", o_uint32, &lcp_wantoptions[0].asyncmap,
"Set asyncmap (for received packets)",
OPT_OR, &lcp_wantoptions[0].neg_asyncmap },
- { "nomagicnumber", o_bool, &lcp_wantoptions[0].neg_magicnumber,
+ { "nomagic", o_bool, &lcp_wantoptions[0].neg_magicnumber,
"Disable magic number negotiation (looped-back line detection)",
OPT_A2COPY, &lcp_allowoptions[0].neg_magicnumber },
{ "-mn", o_bool, &lcp_wantoptions[0].neg_magicnumber,
if (++try.numloops >= lcp_loopbackfail) {
notice("Serial line is looped back.");
lcp_close(f->unit, "Loopback detected");
+ status = EXIT_LOOPBACK;
}
} else
try.numloops = 0;
info("No response to %d echo-requests", lcp_echos_pending);
notice("Serial link appears to be disconnected.");
lcp_close(f->unit, "Peer not responding");
+ status = EXIT_PEER_DEAD;
}
}
fsm *f;
{
LcpSendEchoRequest (f);
+ if (f->state != OPENED)
+ return;
/*
* Start the timer for the next interval.