60 #include "netif/ppp/ppp_opts.h" 61 #if PPP_SUPPORT && ECP_SUPPORT 65 #include "netif/ppp/ppp_impl.h" 67 #include "netif/ppp/fsm.h" 68 #include "netif/ppp/ecp.h" 71 static option_t ecp_option_list[] = {
72 {
"noecp", o_bool, &ecp_protent.enabled_flag,
73 "Disable ECP negotiation" },
74 {
"-ecp", o_bool, &ecp_protent.enabled_flag,
75 "Disable ECP negotiation", OPT_ALIAS },
84 static void ecp_init (
int unit);
94 static int ecp_printpkt (
const u_char *pkt,
int len,
95 void (*printer) (
void *,
char *, ...),
102 const struct protent ecp_protent = {
131 fsm ecp_fsm[NUM_PPP];
132 ecp_options ecp_wantoptions[NUM_PPP];
133 ecp_options ecp_gotoptions[NUM_PPP];
134 ecp_options ecp_allowoptions[NUM_PPP];
135 ecp_options ecp_hisoptions[NUM_PPP];
137 static const fsm_callbacks ecp_callbacks = {
162 fsm *f = &ecp_fsm[unit];
165 f->protocol = PPP_ECP;
166 f->callbacks = &ecp_callbacks;
170 memset(&ecp_wantoptions[unit], 0,
sizeof(ecp_options));
171 memset(&ecp_gotoptions[unit], 0,
sizeof(ecp_options));
172 memset(&ecp_allowoptions[unit], 0,
sizeof(ecp_options));
173 memset(&ecp_hisoptions[unit], 0,
sizeof(ecp_options));
181 ecp_printpkt(p, plen, printer, arg)
184 void (*printer) (
void *,
char *, ...);