mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-11 10:13:48 +00:00
PPP, CCP, moved CCP global variables to ppp_pcb (ppp.h)
This commit is contained in:
parent
10d09049bb
commit
7174578ac3
@ -48,12 +48,6 @@ typedef struct ccp_options {
|
||||
short method; /* code for chosen compression method */
|
||||
} ccp_options;
|
||||
|
||||
extern fsm ccp_fsm[];
|
||||
extern ccp_options ccp_wantoptions[];
|
||||
extern ccp_options ccp_gotoptions[];
|
||||
extern ccp_options ccp_allowoptions[];
|
||||
extern ccp_options ccp_hisoptions[];
|
||||
|
||||
extern const struct protent ccp_protent;
|
||||
|
||||
#endif /* PPP_SUPPORT && CCP_SUPPORT */
|
||||
|
@ -380,6 +380,16 @@ struct ppp_pcb_s {
|
||||
u8_t lcp_echo_number; /* ID number of next echo frame */
|
||||
u16_t peer_mru; /* currently negotiated peer MRU */
|
||||
|
||||
#if CCP_SUPPORT
|
||||
fsm ccp_fsm; /* CCP fsm structure */
|
||||
ccp_options ccp_wantoptions; /* what to request the peer to use */
|
||||
ccp_options ccp_gotoptions; /* what the peer agreed to do */
|
||||
ccp_options ccp_allowoptions; /* what we'll agree to do */
|
||||
ccp_options ccp_hisoptions; /* what we agreed to do */
|
||||
int ccp_localstate; /* Local state (mainly for handling reset-reqs and reset-acks). */
|
||||
int all_rejected; /* we rejected all peer's options */
|
||||
#endif /* CCP_SUPPORT */
|
||||
|
||||
#if PPP_IPV4_SUPPORT
|
||||
fsm ipcp_fsm; /* IPCP fsm structure */
|
||||
ipcp_options ipcp_wantoptions; /* Options that we want to request */
|
||||
|
@ -211,12 +211,6 @@ const struct protent ccp_protent = {
|
||||
#endif /* DEMAND_SUPPORT */
|
||||
};
|
||||
|
||||
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.
|
||||
*/
|
||||
@ -261,14 +255,11 @@ static const fsm_callbacks ccp_callbacks = {
|
||||
/*
|
||||
* Local state (mainly for handling reset-reqs and reset-acks).
|
||||
*/
|
||||
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 */
|
||||
|
||||
#define RACKTIMEOUT 1 /* second */
|
||||
|
||||
static int all_rejected[NUM_PPP]; /* we rejected all peer's options */
|
||||
|
||||
#if PPP_OPTIONS
|
||||
/*
|
||||
* Option parsing
|
||||
|
Loading…
x
Reference in New Issue
Block a user