mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-20 01:20:59 +00:00
PPP, using timeouts values defined in opt.h instead of values defined in PPP headers or statically assigned values
This commit is contained in:
parent
07e72d2ac8
commit
c68e1ceb64
@ -152,10 +152,12 @@ typedef struct fsm_callbacks {
|
||||
/*
|
||||
* Timeouts.
|
||||
*/
|
||||
#if 0 /* moved to opt.h */
|
||||
#define DEFTIMEOUT 3 /* Timeout time in seconds */
|
||||
#define DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */
|
||||
#define DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */
|
||||
#define DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */
|
||||
#endif /* moved to opt.h */
|
||||
|
||||
|
||||
/*
|
||||
|
@ -90,8 +90,8 @@
|
||||
*/
|
||||
#if 0 /* moved to opt.h */
|
||||
#define UPAP_DEFTIMEOUT 3 /* Timeout (seconds) for retransmitting req */
|
||||
#endif /* moved to opt.h */
|
||||
#define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */
|
||||
#endif /* moved to opt.h */
|
||||
|
||||
/*
|
||||
* Each interface is described by upap structure.
|
||||
|
@ -79,10 +79,10 @@ void fsm_init(fsm *f) {
|
||||
f->state = PPP_FSM_INITIAL;
|
||||
f->flags = 0;
|
||||
f->id = 0; /* XXX Start with random id? */
|
||||
f->timeouttime = DEFTIMEOUT;
|
||||
f->maxconfreqtransmits = DEFMAXCONFREQS;
|
||||
f->maxtermtransmits = DEFMAXTERMREQS;
|
||||
f->maxnakloops = DEFMAXNAKLOOPS;
|
||||
f->timeouttime = FSM_DEFTIMEOUT;
|
||||
f->maxconfreqtransmits = FSM_DEFMAXCONFREQS;
|
||||
f->maxtermtransmits = FSM_DEFMAXTERMREQS;
|
||||
f->maxnakloops = FSM_DEFMAXNAKLOOPS;
|
||||
f->term_reason_len = 0;
|
||||
}
|
||||
|
||||
|
@ -258,8 +258,8 @@ ppp_pcb *ppp_new(void) {
|
||||
/* default configuration */
|
||||
pcb->settings.usepeerdns = 1;
|
||||
#if CHAP_SUPPORT
|
||||
pcb->settings.chap_timeout_time = 3;
|
||||
pcb->settings.chap_max_transmits = 10;
|
||||
pcb->settings.chap_timeout_time = CHAP_DEFTIMEOUT;
|
||||
pcb->settings.chap_max_transmits = CHAP_DEFTRANSMITS;
|
||||
#endif /* CHAP_SUPPPORT */
|
||||
pcb->settings.lcp_loopbackfail = DEFLOOPBACKFAIL;
|
||||
pcb->settings.lcp_echo_interval = LCP_ECHOINTERVAL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user