From b4f1deaa465e0587e5cec79cf1bad65a3a215f8c Mon Sep 17 00:00:00 2001 From: christiaans Date: Mon, 27 Nov 2006 14:48:21 +0000 Subject: [PATCH] Accepted patch #5493 IP frag/reass config item tweak. --- CHANGELOG | 7 +++++++ src/core/ipv4/ip_frag.c | 3 +-- src/include/ipv4/lwip/ip_frag.h | 13 ------------- src/include/lwip/opt.h | 15 +++++++++++++++ 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 74090625..04e63e31 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -27,6 +27,13 @@ HISTORY ++ New features: + 2006-10-26 Christiaan Simons (accepted patch by Jonathan Larmour) + * src/core/ipv4/ip_frag.c: rename MAX_MTU to IP_FRAG_MAX_MTU and move define + to include/lwip/opt.h. + * include/ipv4/lwip/ip_frag.h: Remove unused IP_REASS_INTERVAL. + Move IP_REASS_MAXAGE and IP_REASS_BUFSIZE to include/lwip/opt.h. + * include/lwip/opt.h: Add above new options. + 2006-08-18 Christiaan Simons * tcp_{in,out}.c: added SNMP counters. * ipv4/ip.c: added SNMP counters. diff --git a/src/core/ipv4/ip_frag.c b/src/core/ipv4/ip_frag.c index 3a5d0737..d5523557 100644 --- a/src/core/ipv4/ip_frag.c +++ b/src/core/ipv4/ip_frag.c @@ -298,8 +298,7 @@ nullreturn: return NULL; } -#define MAX_MTU 1500 -static u8_t buf[MEM_ALIGN_SIZE(MAX_MTU)]; +static u8_t buf[MEM_ALIGN_SIZE(IP_FRAG_MAX_MTU)]; /** * Fragment an IP datagram if too large for the netif. diff --git a/src/include/ipv4/lwip/ip_frag.h b/src/include/ipv4/lwip/ip_frag.h index 0ba28d7c..a326c1ce 100644 --- a/src/include/ipv4/lwip/ip_frag.h +++ b/src/include/ipv4/lwip/ip_frag.h @@ -39,19 +39,6 @@ #include "lwip/netif.h" #include "lwip/ip_addr.h" -/* IP reassemly timer interval in milliseconds */ -#define IP_REASS_INTERVAL 1000 - -/* IP reassemly default age in seconds */ -#ifndef IP_REASS_MAXAGE -#define IP_REASS_MAXAGE 3 -#endif - -/* IP reassembly buffer size (minus IP header) */ -#ifndef IP_REASS_BUFSIZE -#define IP_REASS_BUFSIZE 5760 -#endif - void ip_frag_init(void); void ip_reass_tmr(void); struct pbuf * ip_reass(struct pbuf *p); diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index ab4e2e51..153708ca 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -216,6 +216,21 @@ a lot of data that needs to be copied, this should be set high. */ #define IP_FRAG 1 #endif +/* IP reassemly default age in seconds */ +#ifndef IP_REASS_MAXAGE +#define IP_REASS_MAXAGE 3 +#endif + +/* IP reassembly buffer size (minus IP header) */ +#ifndef IP_REASS_BUFSIZE +#define IP_REASS_BUFSIZE 5760 +#endif + +/* Assumed max MTU on any interface for IP frag buffer */ +#ifndef IP_FRAG_MAX_MTU +#define IP_FRAG_MAX_MTU 1500 +#endif + /** Global default value for Time To Live used by transport layers. */ #ifndef IP_DEFAULT_TTL #define IP_DEFAULT_TTL 255