123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- #define RCSID "$Id: ecp.c,v 1.4 2004/11/04 10:02:26 paulus Exp $"
- static const char rcsid[] = RCSID;
- #include <string.h>
- #include "pppd.h"
- #include "fsm.h"
- #include "ecp.h"
- static option_t ecp_option_list[] = {
- { "noecp", o_bool, &ecp_protent.enabled_flag,
- "Disable ECP negotiation" },
- { "-ecp", o_bool, &ecp_protent.enabled_flag,
- "Disable ECP negotiation", OPT_ALIAS },
- { NULL }
- };
- static void ecp_init __P((int unit));
- static int ecp_printpkt __P((u_char *pkt, int len,
- void (*printer) __P((void *, char *, ...)),
- void *arg));
- struct protent ecp_protent = {
- PPP_ECP,
- ecp_init,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- ecp_printpkt,
- NULL,
- 0,
- "ECP",
- "Encrypted",
- ecp_option_list,
- NULL,
- NULL,
- NULL
- };
- fsm ecp_fsm[NUM_PPP];
- ecp_options ecp_wantoptions[NUM_PPP];
- ecp_options ecp_gotoptions[NUM_PPP];
- ecp_options ecp_allowoptions[NUM_PPP];
- ecp_options ecp_hisoptions[NUM_PPP];
- static fsm_callbacks ecp_callbacks = {
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- "ECP"
- };
- static void
- ecp_init(unit)
- int unit;
- {
- fsm *f = &ecp_fsm[unit];
- f->unit = unit;
- f->protocol = PPP_ECP;
- f->callbacks = &ecp_callbacks;
- fsm_init(f);
- memset(&ecp_wantoptions[unit], 0, sizeof(ecp_options));
- memset(&ecp_gotoptions[unit], 0, sizeof(ecp_options));
- memset(&ecp_allowoptions[unit], 0, sizeof(ecp_options));
- memset(&ecp_hisoptions[unit], 0, sizeof(ecp_options));
- }
- static int
- ecp_printpkt(p, plen, printer, arg)
- u_char *p;
- int plen;
- void (*printer) __P((void *, char *, ...));
- void *arg;
- {
- return 0;
- }
|