Changeset View
Changeset View
Standalone View
Standalone View
netinet/tcp_subr.c
Context not available. | |||||
0 | 0 | ||||
}; | }; | ||||
int t_functions_inited = 0; | |||||
struct tcp_funchead t_functions; | struct tcp_funchead t_functions; | ||||
static struct tcp_function_block *tcp_func_set_ptr = &tcp_def_funcblk; | static struct tcp_function_block *tcp_func_set_ptr = &tcp_def_funcblk; | ||||
static void | |||||
init_tcp_functions() | |||||
{ | |||||
if (t_functions_inited == 0) { | |||||
TAILQ_INIT(&t_functions); | |||||
rw_init_flags(&tcp_function_lock, "tcp_func_lock" , 0); | |||||
t_functions_inited = 1; | |||||
} | |||||
} | |||||
static struct tcp_function_block * | static struct tcp_function_block * | ||||
find_tcp_functions_locked(struct tcp_function_set *fs) | find_tcp_functions_locked(struct tcp_function_set *fs) | ||||
{ | { | ||||
Context not available. | |||||
struct tcp_function *n; | struct tcp_function *n; | ||||
struct tcp_function_set fs; | struct tcp_function_set fs; | ||||
if (t_functions_inited == 0) { | |||||
init_tcp_functions(); | |||||
} | |||||
if ((blk->tfb_tcp_output == NULL) || | if ((blk->tfb_tcp_output == NULL) || | ||||
(blk->tfb_tcp_do_segment == NULL) || | (blk->tfb_tcp_do_segment == NULL) || | ||||
(blk->tfb_tcp_ctloutput == NULL) || | (blk->tfb_tcp_ctloutput == NULL) || | ||||
Context not available. | |||||
tcp_finwait2_timeout = TCPTV_FINWAIT2_TIMEOUT; | tcp_finwait2_timeout = TCPTV_FINWAIT2_TIMEOUT; | ||||
tcp_tcbhashsize = hashsize; | tcp_tcbhashsize = hashsize; | ||||
/* Setup the tcp function block list */ | /* Setup the tcp function block list */ | ||||
TAILQ_INIT(&t_functions); | init_tcp_functions(); | ||||
rw_init_flags(&tcp_function_lock, "tcp_func_lock" , 0); | |||||
register_tcp_functions(&tcp_def_funcblk, M_WAITOK); | register_tcp_functions(&tcp_def_funcblk, M_WAITOK); | ||||
if (tcp_soreceive_stream) { | if (tcp_soreceive_stream) { | ||||
Context not available. |