Replace PBUF_LINK_HLEN before PBUF_POOL_BUFSIZE, restore PPP options changed by Marc Boucher but lost with last Jared changes...

This commit is contained in:
fbernon 2007-08-20 17:05:01 +00:00
parent baca292f47
commit 3259e2eac9

View File

@ -1,3 +1,9 @@
/**
* @file
*
* lwIP Options Configuration
*/
/* /*
* Copyright (c) 2001-2004 Swedish Institute of Computer Science. * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
* All rights reserved. * All rights reserved.
@ -40,7 +46,7 @@
#include "lwip/debug.h" #include "lwip/debug.h"
/* /*
----------------------------------------------- -----------------------------------------------
---------- Platform specific locking ---------- ---------- Platform specific locking ----------
----------------------------------------------- -----------------------------------------------
*/ */
@ -79,7 +85,7 @@
#endif #endif
/* /*
------------------------------------ ------------------------------------
---------- Memory options ---------- ---------- Memory options ----------
------------------------------------ ------------------------------------
*/ */
@ -151,7 +157,7 @@
/* /*
------------------------------------------------ ------------------------------------------------
---------- Internal Memory Pool Sizes ---------- ---------- Internal Memory Pool Sizes ----------
------------------------------------------------ ------------------------------------------------
*/ */
@ -265,7 +271,7 @@
#endif #endif
/* /*
--------------------------------- ---------------------------------
---------- ARP options ---------- ---------- ARP options ----------
--------------------------------- ---------------------------------
*/ */
@ -339,7 +345,7 @@
#endif #endif
/* /*
-------------------------------- --------------------------------
---------- IP options ---------- ---------- IP options ----------
-------------------------------- --------------------------------
*/ */
@ -418,7 +424,7 @@
#endif #endif
/* /*
---------------------------------- ----------------------------------
---------- ICMP options ---------- ---------- ICMP options ----------
---------------------------------- ----------------------------------
*/ */
@ -430,7 +436,7 @@
#endif #endif
/* /*
--------------------------------- ---------------------------------
---------- RAW options ---------- ---------- RAW options ----------
--------------------------------- ---------------------------------
*/ */
@ -449,7 +455,7 @@
#endif #endif
/* /*
---------------------------------- ----------------------------------
---------- DHCP options ---------- ---------- DHCP options ----------
---------------------------------- ----------------------------------
*/ */
@ -468,7 +474,7 @@
#endif #endif
/* /*
------------------------------------ ------------------------------------
---------- AUTOIP options ---------- ---------- AUTOIP options ----------
------------------------------------ ------------------------------------
*/ */
@ -488,7 +494,7 @@
#endif #endif
/* /*
---------------------------------- ----------------------------------
---------- SNMP options ---------- ---------- SNMP options ----------
---------------------------------- ----------------------------------
*/ */
@ -524,7 +530,7 @@
#endif #endif
/* /*
---------------------------------- ----------------------------------
---------- IGMP options ---------- ---------- IGMP options ----------
---------------------------------- ----------------------------------
*/ */
@ -536,7 +542,7 @@
#endif #endif
/* /*
--------------------------------- ---------------------------------
---------- UDP options ---------- ---------- UDP options ----------
--------------------------------- ---------------------------------
*/ */
@ -562,7 +568,7 @@
#endif #endif
/* /*
--------------------------------- ---------------------------------
---------- TCP options ---------- ---------- TCP options ----------
--------------------------------- ---------------------------------
*/ */
@ -657,20 +663,10 @@
#endif #endif
/* /*
---------------------------------- ----------------------------------
---------- Pbuf options ---------- ---------- Pbuf options ----------
---------------------------------- ----------------------------------
*/ */
/**
* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is
* designed to accomodate single full size TCP frame in one pbuf, including
* TCP_MSS, IP header, and link header.
*
*/
#ifndef PBUF_POOL_BUFSIZE
#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)
#endif
/** /**
* PBUF_LINK_HLEN: the number of bytes that should be allocated for a * PBUF_LINK_HLEN: the number of bytes that should be allocated for a
* link level header. The default is 14, the standard value for * link level header. The default is 14, the standard value for
@ -680,8 +676,18 @@
#define PBUF_LINK_HLEN 14 #define PBUF_LINK_HLEN 14
#endif #endif
/**
* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is
* designed to accomodate single full size TCP frame in one pbuf, including
* TCP_MSS, IP header, and link header.
*
*/
#ifndef PBUF_POOL_BUFSIZE
#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)
#endif
/* /*
------------------------------------------------ ------------------------------------------------
---------- Network Interfaces options ---------- ---------- Network Interfaces options ----------
------------------------------------------------ ------------------------------------------------
*/ */
@ -728,7 +734,7 @@
#endif #endif
/* /*
------------------------------------ ------------------------------------
---------- LOOPIF options ---------- ---------- LOOPIF options ----------
------------------------------------ ------------------------------------
*/ */
@ -756,7 +762,7 @@
#endif #endif
/* /*
------------------------------------ ------------------------------------
---------- Thread options ---------- ---------- Thread options ----------
------------------------------------ ------------------------------------
*/ */
@ -797,7 +803,7 @@
#endif #endif
/* /*
---------------------------------------------- ----------------------------------------------
---------- Sequential layer options ---------- ---------- Sequential layer options ----------
---------------------------------------------- ----------------------------------------------
*/ */
@ -810,7 +816,7 @@
#endif #endif
/* /*
------------------------------------ ------------------------------------
---------- Socket options ---------- ---------- Socket options ----------
------------------------------------ ------------------------------------
*/ */
@ -861,7 +867,7 @@
#endif #endif
/* /*
---------------------------------------- ----------------------------------------
---------- Statistics options ---------- ---------- Statistics options ----------
---------------------------------------- ----------------------------------------
*/ */
@ -971,7 +977,7 @@
#endif /* LWIP_STATS */ #endif /* LWIP_STATS */
/* /*
--------------------------------- ---------------------------------
---------- PPP options ---------- ---------- PPP options ----------
--------------------------------- ---------------------------------
*/ */
@ -982,12 +988,28 @@
#define PPP_SUPPORT 0 #define PPP_SUPPORT 0
#endif #endif
#if PPP_SUPPORT /**
* PPPOE_SUPPORT==1: Enable PPP Over Ethernet
*/
#ifndef PPPOE_SUPPORT
#define PPPOE_SUPPORT 0
#endif
/**
* PPPOS_SUPPORT==1: Enable PPP Over Serial
*/
#ifndef PPPOS_SUPPORT
#define PPPOS_SUPPORT PPP_SUPPORT
#endif
#if PPP_SUPPORT
/** /**
* NUM_PPP: Max PPP sessions. * NUM_PPP: Max PPP sessions.
*/ */
#ifndef NUM_PPP
#define NUM_PPP 1 #define NUM_PPP 1
#endif
/** /**
* PAP_SUPPORT==1: Support PAP. * PAP_SUPPORT==1: Support PAP.
@ -1006,17 +1028,23 @@
/** /**
* MSCHAP_SUPPORT==1: Support MSCHAP. CURRENTLY NOT SUPPORTED! DO NOT SET! * MSCHAP_SUPPORT==1: Support MSCHAP. CURRENTLY NOT SUPPORTED! DO NOT SET!
*/ */
#ifndef MSCHAP_SUPPORT
#define MSCHAP_SUPPORT 0 #define MSCHAP_SUPPORT 0
#endif
/** /**
* CBCP_SUPPORT==1: Support CBCP. CURRENTLY NOT SUPPORTED! DO NOT SET! * CBCP_SUPPORT==1: Support CBCP. CURRENTLY NOT SUPPORTED! DO NOT SET!
*/ */
#ifndef CBCP_SUPPORT
#define CBCP_SUPPORT 0 #define CBCP_SUPPORT 0
#endif
/** /**
* CCP_SUPPORT==1: Support CCP. CURRENTLY NOT SUPPORTED! DO NOT SET! * CCP_SUPPORT==1: Support CCP. CURRENTLY NOT SUPPORTED! DO NOT SET!
*/ */
#ifndef CCP_SUPPORT
#define CCP_SUPPORT 0 #define CCP_SUPPORT 0
#endif
/** /**
* VJ_SUPPORT==1: Support VJ header compression. * VJ_SUPPORT==1: Support VJ header compression.
@ -1033,19 +1061,39 @@
#endif #endif
/* /*
* Timeouts. * Timeouts
*/ */
#ifndef FSM_DEFTIMEOUT
#define FSM_DEFTIMEOUT 6 /* Timeout time in seconds */ #define FSM_DEFTIMEOUT 6 /* Timeout time in seconds */
#endif
#ifndef FSM_DEFMAXTERMREQS
#define FSM_DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */ #define FSM_DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */
#endif
#ifndef FSM_DEFMAXCONFREQS
#define FSM_DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */ #define FSM_DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */
#endif
#ifndef FSM_DEFMAXNAKLOOPS
#define FSM_DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */ #define FSM_DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */
#endif
#ifndef UPAP_DEFTIMEOUT
#define UPAP_DEFTIMEOUT 6 /* Timeout (seconds) for retransmitting req */ #define UPAP_DEFTIMEOUT 6 /* Timeout (seconds) for retransmitting req */
#endif
#ifndef UPAP_DEFREQTIME
#define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */ #define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */
#endif
#ifndef CHAP_DEFTIMEOUT
#define CHAP_DEFTIMEOUT 6 /* Timeout time in seconds */ #define CHAP_DEFTIMEOUT 6 /* Timeout time in seconds */
#define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */ #endif
#ifndef CHAP_DEFTRANSMITS
#define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */
#endif
/* Interval in seconds between keepalive echo requests, 0 to disable. */ /* Interval in seconds between keepalive echo requests, 0 to disable. */
#ifndef LCP_ECHOINTERVAL #ifndef LCP_ECHOINTERVAL
@ -1053,10 +1101,14 @@
#endif #endif
/* Number of unanswered echo requests before failure. */ /* Number of unanswered echo requests before failure. */
#ifndef LCP_MAXECHOFAILS
#define LCP_MAXECHOFAILS 3 #define LCP_MAXECHOFAILS 3
#endif
/* Max Xmit idle time (in jiffies) before resend flag char. */ /* Max Xmit idle time (in jiffies) before resend flag char. */
#ifndef PPP_MAXIDLEFLAG
#define PPP_MAXIDLEFLAG 100 #define PPP_MAXIDLEFLAG 100
#endif
/* /*
* Packet sizes * Packet sizes
@ -1086,7 +1138,7 @@
#endif /* PPP_SUPPORT */ #endif /* PPP_SUPPORT */
/* /*
-------------------------------------- --------------------------------------
---------- Checksum options ---------- ---------- Checksum options ----------
-------------------------------------- --------------------------------------
*/ */
@ -1133,7 +1185,7 @@
#endif #endif
/* /*
--------------------------------------- ---------------------------------------
---------- Debugging options ---------- ---------- Debugging options ----------
--------------------------------------- ---------------------------------------
*/ */