From 00f8cf57cd405747048e87d776b2ce7aaaeeee62 Mon Sep 17 00:00:00 2001 From: christiaans Date: Wed, 1 Mar 2006 14:51:58 +0000 Subject: [PATCH] Added IP reassembly timer. --- src/api/tcpip.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/api/tcpip.c b/src/api/tcpip.c index b9e11f8e..ce8a2ca5 100644 --- a/src/api/tcpip.c +++ b/src/api/tcpip.c @@ -38,6 +38,7 @@ #include "lwip/pbuf.h" #include "lwip/ip.h" +#include "lwip/ip_frag.h" #include "lwip/udp.h" #include "lwip/tcp.h" @@ -81,6 +82,16 @@ tcp_timer_needed(void) #endif /* !NO_SYS */ #endif /* LWIP_TCP */ +#if IP_REASSEMBLY +static void +ip_timer(void *data) +{ + LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip: ip_reass_tmr()\n")); + ip_reass_tmr(); + sys_timeout(1000, ip_timer, NULL); +} +#endif + static void tcpip_thread(void *arg) { @@ -94,6 +105,9 @@ tcpip_thread(void *arg) #endif #if LWIP_TCP tcp_init(); +#endif +#if IP_REASSEMBLY + sys_timeout(1000, ip_timer, NULL); #endif if (tcpip_init_done != NULL) { tcpip_init_done(tcpip_init_done_arg);