45 #include "netif/ppp/ppp_opts.h" 76 const struct fsm_callbacks *callbacks;
77 const char *term_reason;
94 typedef struct fsm_callbacks {
100 (fsm *, u_char *,
int *);
102 (fsm *, u_char *, int);
104 (fsm *, u_char *, int, int);
106 (fsm *, u_char *, int);
108 (fsm *, u_char *,
int *, int);
122 (fsm *, int, int, u_char *, int);
123 const char *proto_name;
130 #define PPP_FSM_INITIAL 0 131 #define PPP_FSM_STARTING 1 132 #define PPP_FSM_CLOSED 2 133 #define PPP_FSM_STOPPED 3 134 #define PPP_FSM_CLOSING 4 135 #define PPP_FSM_STOPPING 5 136 #define PPP_FSM_REQSENT 6 137 #define PPP_FSM_ACKRCVD 7 138 #define PPP_FSM_ACKSENT 8 139 #define PPP_FSM_OPENED 9 145 #define OPT_PASSIVE 1 146 #define OPT_RESTART 2 155 #define DEFMAXTERMREQS 2 156 #define DEFMAXCONFREQS 10 157 #define DEFMAXNAKLOOPS 5 164 void fsm_init(fsm *f);
165 void fsm_lowerup(fsm *f);
166 void fsm_lowerdown(fsm *f);
167 void fsm_open(fsm *f);
168 void fsm_close(fsm *f,
const char *reason);
169 void fsm_input(fsm *f, u_char *inpacket,
int l);
170 void fsm_protreject(fsm *f);
171 void fsm_sdata(fsm *f, u_char code, u_char
id,
const u_char *data,
int datalen);