Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_subr.c
Show All 33 Lines | |||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include "opt_inet.h" | #include "opt_inet.h" | ||||
#include "opt_inet6.h" | #include "opt_inet6.h" | ||||
#include "opt_ipsec.h" | #include "opt_ipsec.h" | ||||
#include "opt_kern_tls.h" | #include "opt_kern_tls.h" | ||||
#include "opt_tcpdebug.h" | #include "opt_tcpdebug.h" | ||||
#include "opt_accecn.h" | |||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/arb.h> | #include <sys/arb.h> | ||||
#include <sys/callout.h> | #include <sys/callout.h> | ||||
#include <sys/eventhandler.h> | #include <sys/eventhandler.h> | ||||
#ifdef TCP_HHOOK | #ifdef TCP_HHOOK | ||||
#include <sys/hhook.h> | #include <sys/hhook.h> | ||||
▲ Show 20 Lines • Show All 2,255 Lines • ▼ Show 20 Lines | #ifdef TCPPCAP | ||||
*/ | */ | ||||
tcp_pcap_tcpcb_init(tp); | tcp_pcap_tcpcb_init(tp); | ||||
#endif | #endif | ||||
#ifdef TCP_BLACKBOX | #ifdef TCP_BLACKBOX | ||||
/* Initialize the per-TCPCB log data. */ | /* Initialize the per-TCPCB log data. */ | ||||
tcp_log_tcpcbinit(tp); | tcp_log_tcpcbinit(tp); | ||||
#endif | #endif | ||||
tp->t_pacing_rate = -1; | tp->t_pacing_rate = -1; | ||||
if (V_tcp_do_lrd) | |||||
tp->t_flags |= TF_LRD; | |||||
#ifdef TCP_ACCECNOPT | |||||
tp->t_re0b = 1; | |||||
tp->t_re1b = 1; | |||||
tp->t_rceb = 0; | |||||
#endif | |||||
if (tp->t_fb->tfb_tcp_fb_init) { | if (tp->t_fb->tfb_tcp_fb_init) { | ||||
if ((*tp->t_fb->tfb_tcp_fb_init)(tp)) { | if ((*tp->t_fb->tfb_tcp_fb_init)(tp)) { | ||||
refcount_release(&tp->t_fb->tfb_refcnt); | refcount_release(&tp->t_fb->tfb_refcnt); | ||||
in_pcbrele_wlocked(inp); | in_pcbrele_wlocked(inp); | ||||
uma_zfree(V_tcpcb_zone, tm); | uma_zfree(V_tcpcb_zone, tm); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
} | } | ||||
#ifdef STATS | #ifdef STATS | ||||
if (V_tcp_perconn_stats_enable == 1) | if (V_tcp_perconn_stats_enable == 1) | ||||
tp->t_stats = stats_blob_alloc(V_tcp_perconn_stats_dflt_tpl, 0); | tp->t_stats = stats_blob_alloc(V_tcp_perconn_stats_dflt_tpl, 0); | ||||
#endif | #endif | ||||
if (V_tcp_do_lrd) | |||||
tp->t_flags |= TF_LRD; | |||||
return (tp); /* XXX */ | return (tp); /* XXX */ | ||||
} | } | ||||
/* | /* | ||||
* Drop a TCP connection, reporting | * Drop a TCP connection, reporting | ||||
* the specified error. If connection is synchronized, | * the specified error. If connection is synchronized, | ||||
* then send a RST to peer. | * then send a RST to peer. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 1,815 Lines • Show Last 20 Lines |