PPP, moved DEFLOOPBACKFAIL from ppp/lcp.h to lwip/opt.h

This commit is contained in:
Sylvain Rochet 2012-12-09 19:28:53 +01:00
parent c68e1ceb64
commit 63459f65fb
3 changed files with 9 additions and 1 deletions

View File

@ -1900,6 +1900,12 @@
#define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */
#endif
/* Default number of times we receive our magic number from the peer
before deciding the link is looped-back. */
#ifndef LCP_DEFLOOPBACKFAIL
#define LCP_DEFLOOPBACKFAIL 10
#endif
/* Interval in seconds between keepalive echo requests, 0 to disable. */
#ifndef LCP_ECHOINTERVAL
#define LCP_ECHOINTERVAL 0

View File

@ -166,9 +166,11 @@ void lcp_sprotrej(ppp_pcb *pcb, u_char *p, int len); /* send protocol reject
extern const struct protent lcp_protent;
#if 0 /* moved to opt.h */
/* Default number of times we receive our magic number from the peer
before deciding the link is looped-back. */
#define DEFLOOPBACKFAIL 10
#endif /* moved to opt.h */
#endif /* LCP_H */
#endif /* PPP_SUPPORT */

View File

@ -261,7 +261,7 @@ ppp_pcb *ppp_new(void) {
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_loopbackfail = LCP_DEFLOOPBACKFAIL;
pcb->settings.lcp_echo_interval = LCP_ECHOINTERVAL;
pcb->settings.lcp_echo_fails = LCP_MAXECHOFAILS;