void in6_pcbinit(struct inpcbtable *table, int bindhashsize, int connecthashsize) { in_pcbinit(table, bindhashsize, connecthashsize); table->inpt_lastport = (u_int16_t)ip6_anonportmax; }
void in6_pcbinit(struct inpcbtable *table, int bindhashsize, int connecthashsize) { static ONCE_DECL(control); in_pcbinit(table, bindhashsize, connecthashsize); table->inpt_lastport = (u_int16_t)ip6_anonportmax; RUN_ONCE(&control, in6pcb_poolinit); }
/* * NAME: tp_init() * * CALLED FROM: * autoconf through the protosw structure * * FUNCTION: * initialize tp machine * * RETURNS: Nada * * SIDE EFFECTS: * * NOTES: */ void tp_init() { static int init_done = 0; if (init_done++) return; /* FOR INET */ in_pcbinit(&tp_inpcb, 1); /* FOR ISO */ tp_isopcb.isop_next = tp_isopcb.isop_prev = &tp_isopcb; tp_start_win = 2; tp_timerinit(); bzero((caddr_t) & tp_stat, sizeof(struct tp_stat)); }
/* * NAME: tp_init() * * CALLED FROM: * autoconf through the protosw structure * * FUNCTION: * initialize tp machine * * RETURNS: Nada * * SIDE EFFECTS: * * NOTES: */ void tp_init(void) { static int init_done = 0; if (init_done++) return; #ifdef INET /* FOR INET */ in_pcbinit(&tp_inpcb, 1, 1); #endif #ifdef ISO /* FOR ISO */ tp_isopcb.isop_next = tp_isopcb.isop_prev = &tp_isopcb; #endif tp_start_win = 2; tp_timerinit(); bzero((void *) & tp_stat, sizeof(struct tp_stat)); }
/* * Tcp initialization */ void tcp_init() { tcp_iss = 1; /* wrong */ pool_init(&tcpcb_pool, sizeof(struct tcpcb), 0, 0, 0, "tcpcbpl", NULL); pool_init(&tcpqe_pool, sizeof(struct tcpqent), 0, 0, 0, "tcpqepl", NULL); pool_sethardlimit(&tcpqe_pool, tcp_reass_limit, NULL, 0); #ifdef TCP_SACK pool_init(&sackhl_pool, sizeof(struct sackhole), 0, 0, 0, "sackhlpl", NULL); pool_sethardlimit(&sackhl_pool, tcp_sackhole_limit, NULL, 0); #endif /* TCP_SACK */ in_pcbinit(&tcbtable, tcbhashsize); #ifdef INET6 /* * Since sizeof(struct ip6_hdr) > sizeof(struct ip), we * do max length checks/computations only on the former. */ if (max_protohdr < (sizeof(struct ip6_hdr) + sizeof(struct tcphdr))) max_protohdr = (sizeof(struct ip6_hdr) + sizeof(struct tcphdr)); if ((max_linkhdr + sizeof(struct ip6_hdr) + sizeof(struct tcphdr)) > MHLEN) panic("tcp_init"); icmp6_mtudisc_callback_register(tcp6_mtudisc_callback); #endif /* INET6 */ /* Initialize the compressed state engine. */ syn_cache_init(); /* Initialize timer state. */ tcp_timer_init(); }
void udp_init() { in_pcbinit(&udbtable, udbhashsize); }
/* * Initialize raw connection block q. */ void rip_init() { in_pcbinit(&rawcbtable, 1); }
void udp_init() { in_pcbinit(&udbtable, UDB_INITIAL_HASH_SIZE); }
/* * Initialize raw connection block queue. */ void rip6_init() { in_pcbinit(&rawin6pcbtable, 1); }