Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_timewait.c
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | |||||
#include <netinet6/scope6_var.h> | #include <netinet6/scope6_var.h> | ||||
#include <netinet6/nd6.h> | #include <netinet6/nd6.h> | ||||
#endif | #endif | ||||
#include <netinet/tcp.h> | #include <netinet/tcp.h> | ||||
#include <netinet/tcp_fsm.h> | #include <netinet/tcp_fsm.h> | ||||
#include <netinet/tcp_seq.h> | #include <netinet/tcp_seq.h> | ||||
#include <netinet/tcp_timer.h> | #include <netinet/tcp_timer.h> | ||||
#include <netinet/tcp_var.h> | #include <netinet/tcp_var.h> | ||||
#include <netinet/tcp_hpts.h> | |||||
#ifdef INET6 | #ifdef INET6 | ||||
#include <netinet6/tcp6_var.h> | #include <netinet6/tcp6_var.h> | ||||
#endif | #endif | ||||
#include <netinet/tcpip.h> | #include <netinet/tcpip.h> | ||||
#ifdef TCPDEBUG | #ifdef TCPDEBUG | ||||
#include <netinet/tcp_debug.h> | #include <netinet/tcp_debug.h> | ||||
#endif | #endif | ||||
#ifdef INET6 | #ifdef INET6 | ||||
▲ Show 20 Lines • Show All 244 Lines • ▼ Show 20 Lines | */ | ||||
/* | /* | ||||
* First, discard tcpcb state, which includes stopping its timers and | * First, discard tcpcb state, which includes stopping its timers and | ||||
* freeing it. tcp_discardcb() used to also release the inpcb, but | * freeing it. tcp_discardcb() used to also release the inpcb, but | ||||
* that work is now done in the caller. | * that work is now done in the caller. | ||||
* | * | ||||
* Note: soisdisconnected() call used to be made in tcp_discardcb(), | * Note: soisdisconnected() call used to be made in tcp_discardcb(), | ||||
* and might not be needed here any longer. | * and might not be needed here any longer. | ||||
*/ | */ | ||||
#ifdef TCPHPTS | |||||
tcp_hpts_remove(inp, HPTS_REMOVE_ALL); | |||||
#endif | |||||
tcp_discardcb(tp); | tcp_discardcb(tp); | ||||
soisdisconnected(so); | soisdisconnected(so); | ||||
tw->tw_so_options = so->so_options; | tw->tw_so_options = so->so_options; | ||||
inp->inp_flags |= INP_TIMEWAIT; | inp->inp_flags |= INP_TIMEWAIT; | ||||
if (acknow) | if (acknow) | ||||
tcp_twrespond(tw, TH_ACK); | tcp_twrespond(tw, TH_ACK); | ||||
if (local) | if (local) | ||||
in_pcbdrop(inp); | in_pcbdrop(inp); | ||||
▲ Show 20 Lines • Show All 489 Lines • Show Last 20 Lines |