Keepalive values can be configured at compile time, but don't change this unless you know what you're doing (default are RFC1122 compliant).

This commit is contained in:
fbernon 2007-03-08 21:02:39 +00:00
parent fdcb87db19
commit 86cecd6700
2 changed files with 19 additions and 10 deletions

View File

@ -23,6 +23,10 @@ HISTORY
++ New features: ++ New features:
2007-03-08 Frédéric Bernon
* tcp.h: Keepalive values can be configured at compile time, but don't change
this unless you know what you're doing (default are RFC1122 compliant).
2007-03-08 Frédéric Bernon 2007-03-08 Frédéric Bernon
* sockets.c, api.h, api_lib.c, tcpip.c, sys.h, sys.c, err.c, opt.h: * sockets.c, api.h, api_lib.c, tcpip.c, sys.h, sys.c, err.c, opt.h:
Implement LWIP_SO_RCVTIMEO configuration option to enable/disable SO_RCVTIMEO Implement LWIP_SO_RCVTIMEO configuration option to enable/disable SO_RCVTIMEO

View File

@ -133,18 +133,15 @@ void tcp_rexmit_rto (struct tcp_pcb *pcb);
#define TCP_HLEN 20 #define TCP_HLEN 20
#ifndef TCP_TMR_INTERVAL #ifndef TCP_TMR_INTERVAL
#define TCP_TMR_INTERVAL 250 /* The TCP timer interval in #define TCP_TMR_INTERVAL 250 /* The TCP timer interval in milliseconds. */
milliseconds. */
#endif /* TCP_TMR_INTERVAL */ #endif /* TCP_TMR_INTERVAL */
#ifndef TCP_FAST_INTERVAL #ifndef TCP_FAST_INTERVAL
#define TCP_FAST_INTERVAL TCP_TMR_INTERVAL /* the fine grained timeout in #define TCP_FAST_INTERVAL TCP_TMR_INTERVAL /* the fine grained timeout in milliseconds */
milliseconds */
#endif /* TCP_FAST_INTERVAL */ #endif /* TCP_FAST_INTERVAL */
#ifndef TCP_SLOW_INTERVAL #ifndef TCP_SLOW_INTERVAL
#define TCP_SLOW_INTERVAL (2*TCP_TMR_INTERVAL) /* the coarse grained timeout in #define TCP_SLOW_INTERVAL (2*TCP_TMR_INTERVAL) /* the coarse grained timeout in milliseconds */
milliseconds */
#endif /* TCP_SLOW_INTERVAL */ #endif /* TCP_SLOW_INTERVAL */
#define TCP_FIN_WAIT_TIMEOUT 20000 /* milliseconds */ #define TCP_FIN_WAIT_TIMEOUT 20000 /* milliseconds */
@ -160,12 +157,20 @@ void tcp_rexmit_rto (struct tcp_pcb *pcb);
#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */ #define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */
#define TCP_KEEPALIVE 0x02 /* send KEEPALIVE probes when idle for pcb->keepalive miliseconds */ #define TCP_KEEPALIVE 0x02 /* send KEEPALIVE probes when idle for pcb->keepalive miliseconds */
/* Keepalive values */ /* Keepalive values, compliant with RFC 1122. Don't change this unless you know what you're doing */
#ifndef TCP_KEEPDEFAULT
#define TCP_KEEPDEFAULT 7200000 /* KEEPALIVE timer in miliseconds */ #define TCP_KEEPDEFAULT 7200000 /* KEEPALIVE timer in miliseconds */
#define TCP_KEEPINTVL 75000 /* Time between KEEPALIVE probes in miliseconds */ #endif
#define TCP_KEEPCNT 9 /* Counter for KEEPALIVE probes */
#define TCP_MAXIDLE TCP_KEEPCNT * TCP_KEEPINTVL /* Maximum KEEPALIVE probe time */
#ifndef TCP_KEEPINTVL
#define TCP_KEEPINTVL 75000 /* Time between KEEPALIVE probes in miliseconds */
#endif
#ifndef TCP_KEEPCNT
#define TCP_KEEPCNT 9 /* Counter for KEEPALIVE probes */
#endif
#define TCP_MAXIDLE TCP_KEEPCNT * TCP_KEEPINTVL /* Maximum KEEPALIVE probe time */
#ifdef PACK_STRUCT_USE_INCLUDES #ifdef PACK_STRUCT_USE_INCLUDES
# include "arch/bpstruct.h" # include "arch/bpstruct.h"