Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_subr.c
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
#include <sys/qmath.h> | #include <sys/qmath.h> | ||||
#include <sys/stats.h> | #include <sys/stats.h> | ||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#include <sys/jail.h> | #include <sys/jail.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/refcount.h> | #include <sys/refcount.h> | ||||
#include <sys/mbuf.h> | #include <sys/mbuf.h> | ||||
#ifdef INET6 | |||||
#include <sys/domain.h> | |||||
#endif | |||||
#include <sys/priv.h> | #include <sys/priv.h> | ||||
#include <sys/proc.h> | #include <sys/proc.h> | ||||
#include <sys/sdt.h> | #include <sys/sdt.h> | ||||
#include <sys/socket.h> | #include <sys/socket.h> | ||||
#include <sys/socketvar.h> | #include <sys/socketvar.h> | ||||
#include <sys/protosw.h> | #include <sys/protosw.h> | ||||
#include <sys/random.h> | #include <sys/random.h> | ||||
▲ Show 20 Lines • Show All 1,483 Lines • ▼ Show 20 Lines | if (!powerof2(hashsize)) { | ||||
/* prevent absurdly low value */ | /* prevent absurdly low value */ | ||||
if (hashsize < 16) | if (hashsize < 16) | ||||
hashsize = 16; | hashsize = 16; | ||||
printf("%s: WARNING: TCB hash size not a power of 2, " | printf("%s: WARNING: TCB hash size not a power of 2, " | ||||
"clipped from %d to %d.\n", __func__, oldhashsize, | "clipped from %d to %d.\n", __func__, oldhashsize, | ||||
hashsize); | hashsize); | ||||
} | } | ||||
tcp_tcbhashsize = hashsize; | tcp_tcbhashsize = hashsize; | ||||
#ifdef INET | |||||
IPPROTO_REGISTER(IPPROTO_TCP, tcp_input, tcp_ctlinput); | |||||
#endif | |||||
#ifdef INET6 | |||||
IP6PROTO_REGISTER(IPPROTO_TCP, tcp6_input, tcp6_ctlinput); | |||||
#endif | |||||
} | } | ||||
SYSINIT(tcp_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, tcp_init, NULL); | SYSINIT(tcp_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, tcp_init, NULL); | ||||
#ifdef VIMAGE | #ifdef VIMAGE | ||||
static void | static void | ||||
tcp_destroy(void *unused __unused) | tcp_destroy(void *unused __unused) | ||||
{ | { | ||||
int n; | int n; | ||||
▲ Show 20 Lines • Show All 2,571 Lines • Show Last 20 Lines |