mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
PPP, opt.h: fixed coding style
This commit is contained in:
parent
fa44cef27b
commit
967a8d0678
@ -1911,6 +1911,7 @@
|
||||
---------- PPP options ----------
|
||||
---------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* PPP_SUPPORT==1: Enable PPP.
|
||||
*/
|
||||
@ -2042,8 +2043,9 @@
|
||||
#define MSCHAP_SUPPORT 0
|
||||
#endif
|
||||
#if MSCHAP_SUPPORT
|
||||
/* MSCHAP requires CHAP support */
|
||||
#undef CHAP_SUPPORT
|
||||
#define CHAP_SUPPORT 1 /* MSCHAP requires CHAP support */
|
||||
#define CHAP_SUPPORT 1
|
||||
#endif /* MSCHAP_SUPPORT */
|
||||
|
||||
/**
|
||||
@ -2067,12 +2069,15 @@
|
||||
#define MPPE_SUPPORT 0
|
||||
#endif
|
||||
#if MPPE_SUPPORT
|
||||
/* MPPE requires CCP support */
|
||||
#undef CCP_SUPPORT
|
||||
#define CCP_SUPPORT 1 /* MPPE requires CCP support */
|
||||
#define CCP_SUPPORT 1
|
||||
/* MPPE requires MSCHAP support */
|
||||
#undef MSCHAP_SUPPORT
|
||||
#define MSCHAP_SUPPORT 1 /* MPPE requires MSCHAP support */
|
||||
#define MSCHAP_SUPPORT 1
|
||||
/* MSCHAP requires CHAP support */
|
||||
#undef CHAP_SUPPORT
|
||||
#define CHAP_SUPPORT 1 /* MSCHAP requires CHAP support */
|
||||
#define CHAP_SUPPORT 1
|
||||
#endif /* MPPE_SUPPORT */
|
||||
|
||||
/**
|
||||
@ -2111,9 +2116,13 @@
|
||||
#ifndef PPP_SERVER
|
||||
#define PPP_SERVER 0
|
||||
#endif
|
||||
|
||||
#if PPP_SERVER
|
||||
/*
|
||||
* PPP_OUR_NAME: Our name for authentication purposes
|
||||
*/
|
||||
#ifndef PPP_OUR_NAME
|
||||
#define PPP_OUR_NAME "lwIP" /* Our name for authentication purposes */
|
||||
#define PPP_OUR_NAME "lwIP"
|
||||
#endif
|
||||
#endif /* PPP_SERVER */
|
||||
|
||||
@ -2123,20 +2132,23 @@
|
||||
#ifndef VJ_SUPPORT
|
||||
#define VJ_SUPPORT 1
|
||||
#endif
|
||||
/* VJ compression is only supported for IPv4 over PPPoS. */
|
||||
#if !PPPOS_SUPPORT || !PPP_IPV4_SUPPORT
|
||||
#undef VJ_SUPPORT
|
||||
#define VJ_SUPPORT 0 /* VJ compression is only supported for IPv4 over PPPoS. */
|
||||
#define VJ_SUPPORT 0
|
||||
#endif /* !PPPOS_SUPPORT */
|
||||
|
||||
/**
|
||||
* PPP_MD5_RANDM==1: Use MD5 for better randomness. Automatically enabled if CHAP or L2TP AUTH support is enabled.
|
||||
* PPP_MD5_RANDM==1: Use MD5 for better randomness.
|
||||
* Automatically enabled if CHAP or L2TP AUTH support is enabled.
|
||||
*/
|
||||
#ifndef PPP_MD5_RANDM
|
||||
#define PPP_MD5_RANDM 0
|
||||
#define PPP_MD5_RANDM 0
|
||||
#endif
|
||||
#if CHAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT
|
||||
/* MD5 Random is required for CHAP and L2TP AUTH */
|
||||
#undef PPP_MD5_RANDM
|
||||
#define PPP_MD5_RANDM 1 /* MD5 Random is required for CHAP and L2TP AUTH */
|
||||
#define PPP_MD5_RANDM 1
|
||||
#endif /* CHAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT */
|
||||
|
||||
/**
|
||||
@ -2170,154 +2182,223 @@
|
||||
* using our cleaned PolarSSL library.
|
||||
*/
|
||||
|
||||
/* CHAP, EAP, L2TP AUTH and MD5 Random require MD5 support */
|
||||
#if CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM
|
||||
#ifndef LWIP_INCLUDED_POLARSSL_MD5
|
||||
#define LWIP_INCLUDED_POLARSSL_MD5 1 /* CHAP, EAP, L2TP AUTH and MD5 Random require MD5 support */
|
||||
#define LWIP_INCLUDED_POLARSSL_MD5 1
|
||||
#endif /* LWIP_INCLUDED_POLARSSL_MD5 */
|
||||
#endif /* CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM */
|
||||
|
||||
#if MSCHAP_SUPPORT
|
||||
/* MSCHAP require MD4 support */
|
||||
#ifndef LWIP_INCLUDED_POLARSSL_MD4
|
||||
#define LWIP_INCLUDED_POLARSSL_MD4 1 /* MSCHAP require MD4 support */
|
||||
#define LWIP_INCLUDED_POLARSSL_MD4 1
|
||||
#endif /* LWIP_INCLUDED_POLARSSL_MD4 */
|
||||
/* MSCHAP require SHA1 support */
|
||||
#ifndef LWIP_INCLUDED_POLARSSL_SHA1
|
||||
#define LWIP_INCLUDED_POLARSSL_SHA1 1 /* MSCHAP require SHA1 support */
|
||||
#define LWIP_INCLUDED_POLARSSL_SHA1 1
|
||||
#endif /* LWIP_INCLUDED_POLARSSL_SHA1 */
|
||||
/* MSCHAP require DES support */
|
||||
#ifndef LWIP_INCLUDED_POLARSSL_DES
|
||||
#define LWIP_INCLUDED_POLARSSL_DES 1 /* MSCHAP require DES support */
|
||||
#define LWIP_INCLUDED_POLARSSL_DES 1
|
||||
#endif /* LWIP_INCLUDED_POLARSSL_DES */
|
||||
/* MS-CHAP support is required for MPPE */
|
||||
#if MPPE_SUPPORT
|
||||
/* MPPE require ARC4 support */
|
||||
#ifndef LWIP_INCLUDED_POLARSSL_ARC4
|
||||
#define LWIP_INCLUDED_POLARSSL_ARC4 1 /* MPPE require ARC4 support */
|
||||
#define LWIP_INCLUDED_POLARSSL_ARC4 1
|
||||
#endif /* LWIP_INCLUDED_POLARSSL_ARC4*/
|
||||
#endif /* MPPE_SUPPORT */
|
||||
#endif /* MSCHAP_SUPPORT */
|
||||
|
||||
/* Default value if unset */
|
||||
#ifndef LWIP_INCLUDED_POLARSSL_MD4
|
||||
#define LWIP_INCLUDED_POLARSSL_MD4 0
|
||||
#define LWIP_INCLUDED_POLARSSL_MD4 0
|
||||
#endif /* LWIP_INCLUDED_POLARSSL_MD4 */
|
||||
#ifndef LWIP_INCLUDED_POLARSSL_MD5
|
||||
#define LWIP_INCLUDED_POLARSSL_MD5 0
|
||||
#define LWIP_INCLUDED_POLARSSL_MD5 0
|
||||
#endif /* LWIP_INCLUDED_POLARSSL_MD5 */
|
||||
#ifndef LWIP_INCLUDED_POLARSSL_SHA1
|
||||
#define LWIP_INCLUDED_POLARSSL_SHA1 0
|
||||
#define LWIP_INCLUDED_POLARSSL_SHA1 0
|
||||
#endif /* LWIP_INCLUDED_POLARSSL_SHA1 */
|
||||
#ifndef LWIP_INCLUDED_POLARSSL_DES
|
||||
#define LWIP_INCLUDED_POLARSSL_DES 0
|
||||
#define LWIP_INCLUDED_POLARSSL_DES 0
|
||||
#endif /* LWIP_INCLUDED_POLARSSL_DES */
|
||||
#ifndef LWIP_INCLUDED_POLARSSL_ARC4
|
||||
#define LWIP_INCLUDED_POLARSSL_ARC4 0
|
||||
#define LWIP_INCLUDED_POLARSSL_ARC4 0
|
||||
#endif /* LWIP_INCLUDED_POLARSSL_ARC4 */
|
||||
|
||||
/*
|
||||
* Timeouts
|
||||
* PPP Timeouts
|
||||
*/
|
||||
|
||||
/**
|
||||
* FSM_DEFTIMEOUT: Timeout time in seconds
|
||||
*/
|
||||
#ifndef FSM_DEFTIMEOUT
|
||||
#define FSM_DEFTIMEOUT 6 /* Timeout time in seconds */
|
||||
#define FSM_DEFTIMEOUT 6
|
||||
#endif
|
||||
|
||||
/**
|
||||
* FSM_DEFMAXTERMREQS: Maximum Terminate-Request transmissions
|
||||
*/
|
||||
#ifndef FSM_DEFMAXTERMREQS
|
||||
#define FSM_DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */
|
||||
#define FSM_DEFMAXTERMREQS 2
|
||||
#endif
|
||||
|
||||
/**
|
||||
* FSM_DEFMAXCONFREQS: Maximum Configure-Request transmissions
|
||||
*/
|
||||
#ifndef FSM_DEFMAXCONFREQS
|
||||
#define FSM_DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */
|
||||
#define FSM_DEFMAXCONFREQS 10
|
||||
#endif
|
||||
|
||||
/**
|
||||
* FSM_DEFMAXNAKLOOPS: Maximum number of nak loops
|
||||
*/
|
||||
#ifndef FSM_DEFMAXNAKLOOPS
|
||||
#define FSM_DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */
|
||||
#define FSM_DEFMAXNAKLOOPS 5
|
||||
#endif
|
||||
|
||||
/**
|
||||
* UPAP_DEFTIMEOUT: Timeout (seconds) for retransmitting req
|
||||
*/
|
||||
#ifndef UPAP_DEFTIMEOUT
|
||||
#define UPAP_DEFTIMEOUT 6 /* Timeout (seconds) for retransmitting req */
|
||||
#define UPAP_DEFTIMEOUT 6
|
||||
#endif
|
||||
|
||||
/**
|
||||
* UPAP_DEFTRANSMITS: Maximum number of auth-reqs to send
|
||||
*/
|
||||
#ifndef UPAP_DEFTRANSMITS
|
||||
#define UPAP_DEFTRANSMITS 10 /* Maximum number of auth-reqs to send */
|
||||
#define UPAP_DEFTRANSMITS 10
|
||||
#endif
|
||||
|
||||
#if PPP_SERVER
|
||||
/**
|
||||
* UPAP_DEFREQTIME: Time to wait for auth-req from peer
|
||||
*/
|
||||
#ifndef UPAP_DEFREQTIME
|
||||
#define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */
|
||||
#define UPAP_DEFREQTIME 30
|
||||
#endif
|
||||
#endif /* PPP_SERVER */
|
||||
|
||||
/**
|
||||
* CHAP_DEFTIMEOUT: Timeout (seconds) for retransmitting req
|
||||
*/
|
||||
#ifndef CHAP_DEFTIMEOUT
|
||||
#define CHAP_DEFTIMEOUT 6 /* Timeout (seconds) for retransmitting req */
|
||||
#define CHAP_DEFTIMEOUT 6
|
||||
#endif
|
||||
|
||||
/**
|
||||
* CHAP_DEFTRANSMITS: max # times to send challenge
|
||||
*/
|
||||
#ifndef CHAP_DEFTRANSMITS
|
||||
#define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */
|
||||
#define CHAP_DEFTRANSMITS 10
|
||||
#endif
|
||||
|
||||
#if PPP_SERVER
|
||||
/**
|
||||
* CHAP_DEFRECHALLENGETIME: If this option is > 0, rechallenge the peer every n seconds
|
||||
*/
|
||||
#ifndef CHAP_DEFRECHALLENGETIME
|
||||
#define CHAP_DEFRECHALLENGETIME 0 /* If this option is > 0, rechallenge the peer every n seconds */
|
||||
#define CHAP_DEFRECHALLENGETIME 0
|
||||
#endif
|
||||
#endif /* PPP_SERVER */
|
||||
|
||||
/**
|
||||
* EAP_DEFREQTIME: Time to wait for peer request
|
||||
*/
|
||||
#ifndef EAP_DEFREQTIME
|
||||
#define EAP_DEFREQTIME 6 /* Time to wait for peer request */
|
||||
#define EAP_DEFREQTIME 6
|
||||
#endif
|
||||
|
||||
/**
|
||||
* EAP_DEFALLOWREQ: max # times to accept requests
|
||||
*/
|
||||
#ifndef EAP_DEFALLOWREQ
|
||||
#define EAP_DEFALLOWREQ 10 /* max # times to accept requests */
|
||||
#define EAP_DEFALLOWREQ 10
|
||||
#endif
|
||||
|
||||
#if PPP_SERVER
|
||||
/**
|
||||
* EAP_DEFTIMEOUT: Timeout (seconds) for rexmit
|
||||
*/
|
||||
#ifndef EAP_DEFTIMEOUT
|
||||
#define EAP_DEFTIMEOUT 6 /* Timeout (seconds) for rexmit */
|
||||
#define EAP_DEFTIMEOUT 6
|
||||
#endif
|
||||
|
||||
/**
|
||||
* EAP_DEFTRANSMITS: max # times to transmit
|
||||
*/
|
||||
#ifndef EAP_DEFTRANSMITS
|
||||
#define EAP_DEFTRANSMITS 10 /* max # times to transmit */
|
||||
#define EAP_DEFTRANSMITS 10
|
||||
#endif
|
||||
#endif /* PPP_SERVER */
|
||||
|
||||
/* Default number of times we receive our magic number from the peer
|
||||
before deciding the link is looped-back. */
|
||||
/**
|
||||
* LCP_DEFLOOPBACKFAIL: 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. */
|
||||
/**
|
||||
* LCP_ECHOINTERVAL: Interval in seconds between keepalive echo requests, 0 to disable.
|
||||
*/
|
||||
#ifndef LCP_ECHOINTERVAL
|
||||
#define LCP_ECHOINTERVAL 0
|
||||
#endif
|
||||
|
||||
/* Number of unanswered echo requests before failure. */
|
||||
/**
|
||||
* LCP_MAXECHOFAILS: Number of unanswered echo requests before failure.
|
||||
*/
|
||||
#ifndef LCP_MAXECHOFAILS
|
||||
#define LCP_MAXECHOFAILS 3
|
||||
#endif
|
||||
|
||||
/* Max Xmit idle time (in jiffies) before resend flag char. */
|
||||
/**
|
||||
* PPP_MAXIDLEFLAG: Max Xmit idle time (in jiffies) before resend flag char.
|
||||
*/
|
||||
#ifndef PPP_MAXIDLEFLAG
|
||||
#define PPP_MAXIDLEFLAG 100
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Packet sizes
|
||||
/**
|
||||
* PPP Packet sizes
|
||||
*/
|
||||
|
||||
/**
|
||||
* PPP_MRU: Default MRU
|
||||
*/
|
||||
#ifndef PPP_MRU
|
||||
#define PPP_MRU 1500 /* Default MRU */
|
||||
#endif
|
||||
|
||||
#ifndef PPP_DEFMRU
|
||||
#define PPP_DEFMRU 1500 /* Default MRU to try */
|
||||
#endif
|
||||
|
||||
#ifndef PPP_MAXMRU
|
||||
#define PPP_MAXMRU 1500 /* Normally limit MRU to this (pppd default = 16384) */
|
||||
#endif
|
||||
|
||||
#ifndef PPP_MINMRU
|
||||
#define PPP_MINMRU 128 /* No MRUs below this */
|
||||
#define PPP_MRU 1500
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Default MTU and MRU for L2TP
|
||||
* PPP_DEFMRU: Default MRU to try
|
||||
*/
|
||||
#ifndef PPP_DEFMRU
|
||||
#define PPP_DEFMRU 1500
|
||||
#endif
|
||||
|
||||
/**
|
||||
* PPP_MAXMRU: Normally limit MRU to this (pppd default = 16384)
|
||||
*/
|
||||
#ifndef PPP_MAXMRU
|
||||
#define PPP_MAXMRU 1500
|
||||
#endif
|
||||
|
||||
/**
|
||||
* PPP_MINMRU: No MRUs below this
|
||||
*/
|
||||
#ifndef PPP_MINMRU
|
||||
#define PPP_MINMRU 128
|
||||
#endif
|
||||
|
||||
/**
|
||||
* PPPOL2TP_DEFMRU: Default MTU and MRU for L2TP
|
||||
* Default = 1500 - PPPoE(6) - PPP Protocol(2) - IPv4 header(20) - UDP Header(8)
|
||||
* - L2TP Header(6) - HDLC Header(2) - PPP Protocol(2) - MPPE Header(2) - PPP Protocol(2)
|
||||
*/
|
||||
@ -2327,12 +2408,18 @@
|
||||
#endif
|
||||
#endif /* PPPOL2TP_SUPPORT */
|
||||
|
||||
/**
|
||||
* MAXNAMELEN: max length of hostname or name for auth
|
||||
*/
|
||||
#ifndef MAXNAMELEN
|
||||
#define MAXNAMELEN 256 /* max length of hostname or name for auth */
|
||||
#define MAXNAMELEN 256
|
||||
#endif
|
||||
|
||||
/**
|
||||
* MAXSECRETLEN: max length of password or secret
|
||||
*/
|
||||
#ifndef MAXSECRETLEN
|
||||
#define MAXSECRETLEN 256 /* max length of password or secret */
|
||||
#define MAXSECRETLEN 256
|
||||
#endif
|
||||
|
||||
#endif /* PPP_SUPPORT */
|
||||
|
Loading…
Reference in New Issue
Block a user