*/
#ifndef lint
-static char rcsid[] = "$Id: lcp.c,v 1.28 1996/10/08 04:35:02 paulus Exp $";
+static char rcsid[] = "$Id: lcp.c,v 1.30 1997/04/30 05:52:59 paulus Exp $";
#endif
/*
static void lcp_echo_lowerup __P((int));
static void lcp_echo_lowerdown __P((int));
-static void LcpEchoTimeout __P((caddr_t));
+static void LcpEchoTimeout __P((void *));
static void lcp_received_echo_reply __P((fsm *, int, u_char *, int));
static void LcpSendEchoRequest __P((fsm *));
static void LcpLinkFailure __P((fsm *));
+static void LcpEchoCheck __P((fsm *));
static fsm_callbacks lcp_callbacks = { /* LCP callback routines */
lcp_resetci, /* Reset our Configuration Information */
{
fsm *f = &lcp_fsm[unit];
- phase = PHASE_TERMINATE;
+ if (phase != PHASE_DEAD)
+ phase = PHASE_TERMINATE;
if (f->state == STOPPED && f->flags & (OPT_PASSIVE|OPT_SILENT)) {
/*
* This action is not strictly according to the FSM in RFC1548,
switch (citype) {
case CI_MRU:
- if (go->neg_mru && go->mru != DEFMRU
+ if ((go->neg_mru && go->mru != DEFMRU)
|| no.neg_mru || cilen != CILEN_SHORT)
goto bad;
GETSHORT(cishort, p);
try.mru = cishort;
break;
case CI_ASYNCMAP:
- if (go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF
+ if ((go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF)
|| no.neg_asyncmap || cilen != CILEN_LONG)
goto bad;
break;
u_char *pstart, *optend;
u_short cishort;
u_int32_t cilong;
- int fascii;
if (plen < HEADERLEN)
return 0;
* Start the timer for the next interval.
*/
assert (lcp_echo_timer_running==0);
- TIMEOUT (LcpEchoTimeout, (caddr_t) f, lcp_echo_interval);
+ TIMEOUT (LcpEchoTimeout, f, lcp_echo_interval);
lcp_echo_timer_running = 1;
}
static void
LcpEchoTimeout (arg)
- caddr_t arg;
+ void *arg;
{
if (lcp_echo_timer_running != 0) {
lcp_echo_timer_running = 0;
fsm *f = &lcp_fsm[unit];
if (lcp_echo_timer_running != 0) {
- UNTIMEOUT (LcpEchoTimeout, (caddr_t) f);
+ UNTIMEOUT (LcpEchoTimeout, f);
lcp_echo_timer_running = 0;
}
}