X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fccp.c;h=90f83fad1429e4d453307223e49db1bdfa825d51;hp=bade39a8403c026d60d4a6fa7cf31ae728dfdb82;hb=035aefdd1f25f6bdeb73b42a11fd8da76118a405;hpb=a78ea8bb0a9255c933ac9d702ded881d4195ceab diff --git a/pppd/ccp.c b/pppd/ccp.c index bade39a..90f83fa 100644 --- a/pppd/ccp.c +++ b/pppd/ccp.c @@ -26,37 +26,36 @@ */ #ifndef lint -static char rcsid[] = "$Id: ccp.c,v 1.4 1994/09/16 02:14:31 paulus Exp $"; +static char rcsid[] = "$Id: ccp.c,v 1.6 1994/10/24 04:31:11 paulus Exp $"; #endif #include #include #include "pppd.h" -#include "ppp.h" #include "fsm.h" #include "ccp.h" -fsm ccp_fsm[NPPP]; -ccp_options ccp_wantoptions[NPPP]; /* what to request the peer to use */ -ccp_options ccp_gotoptions[NPPP]; /* what the peer agreed to do */ -ccp_options ccp_allowoptions[NPPP]; /* what we'll agree to do */ -ccp_options ccp_hisoptions[NPPP]; /* what we agreed to do */ +fsm ccp_fsm[NUM_PPP]; +ccp_options ccp_wantoptions[NUM_PPP]; /* what to request the peer to use */ +ccp_options ccp_gotoptions[NUM_PPP]; /* what the peer agreed to do */ +ccp_options ccp_allowoptions[NUM_PPP]; /* what we'll agree to do */ +ccp_options ccp_hisoptions[NUM_PPP]; /* what we agreed to do */ /* * Callbacks for fsm code. */ -static void ccp_resetci __ARGS((fsm *)); -static int ccp_cilen __ARGS((fsm *)); -static void ccp_addci __ARGS((fsm *, u_char *, int *)); -static int ccp_ackci __ARGS((fsm *, u_char *, int)); -static int ccp_nakci __ARGS((fsm *, u_char *, int)); -static int ccp_rejci __ARGS((fsm *, u_char *, int)); -static int ccp_reqci __ARGS((fsm *, u_char *, int *, int)); -static void ccp_up __ARGS((fsm *)); -static void ccp_down __ARGS((fsm *)); -static int ccp_extcode __ARGS((fsm *, int, int, u_char *, int)); -static void ccp_rack_timeout __ARGS(()); +static void ccp_resetci __P((fsm *)); +static int ccp_cilen __P((fsm *)); +static void ccp_addci __P((fsm *, u_char *, int *)); +static int ccp_ackci __P((fsm *, u_char *, int)); +static int ccp_nakci __P((fsm *, u_char *, int)); +static int ccp_rejci __P((fsm *, u_char *, int)); +static int ccp_reqci __P((fsm *, u_char *, int *, int)); +static void ccp_up __P((fsm *)); +static void ccp_down __P((fsm *)); +static int ccp_extcode __P((fsm *, int, int, u_char *, int)); +static void ccp_rack_timeout __P(()); static fsm_callbacks ccp_callbacks = { ccp_resetci, @@ -103,7 +102,7 @@ static fsm_callbacks ccp_callbacks = { /* * Local state (mainly for handling reset-reqs and reset-acks */ -static int ccp_localstate[NPPP]; +static int ccp_localstate[NUM_PPP]; #define RACK_PENDING 1 /* waiting for reset-ack */ #define RREQ_REPEAT 2 /* send another reset-req if no reset-ack */ @@ -119,7 +118,7 @@ ccp_init(unit) fsm *f = &ccp_fsm[unit]; f->unit = unit; - f->protocol = CCP; + f->protocol = PPP_CCP; f->callbacks = &ccp_callbacks; fsm_init(f); @@ -531,7 +530,7 @@ int ccp_printpkt(p, plen, printer, arg) u_char *p; int plen; - void (*printer) __ARGS((void *, char *, ...)); + void (*printer) __P((void *, char *, ...)); void *arg; { u_char *p0, *optend;