Lines Matching refs:sctps

61     void *), void *arg, boolean_t cansleep, sctp_stack_t *sctps);
64 sctp_hash_init(sctp_stack_t *sctps) in sctp_hash_init() argument
69 sctps->sctps_conn_hash_size = sctp_conn_hash_size; in sctp_hash_init()
71 if (!ISP2(sctps->sctps_conn_hash_size)) { in sctp_hash_init()
74 if (sctps->sctps_conn_hash_size < (1 << i)) in sctp_hash_init()
77 sctps->sctps_conn_hash_size = 1 << i; in sctp_hash_init()
79 if (sctps->sctps_conn_hash_size < SCTP_CONN_HASH_SIZE) { in sctp_hash_init()
80 sctps->sctps_conn_hash_size = SCTP_CONN_HASH_SIZE; in sctp_hash_init()
82 sctps->sctps_conn_hash_size); in sctp_hash_init()
84 sctps->sctps_conn_fanout = in sctp_hash_init()
85 (sctp_tf_t *)kmem_zalloc(sctps->sctps_conn_hash_size * in sctp_hash_init()
87 for (i = 0; i < sctps->sctps_conn_hash_size; i++) { in sctp_hash_init()
88 mutex_init(&sctps->sctps_conn_fanout[i].tf_lock, NULL, in sctp_hash_init()
91 sctps->sctps_listen_fanout = kmem_zalloc(SCTP_LISTEN_FANOUT_SIZE * in sctp_hash_init()
94 mutex_init(&sctps->sctps_listen_fanout[i].tf_lock, NULL, in sctp_hash_init()
97 sctps->sctps_bind_fanout = kmem_zalloc(SCTP_BIND_FANOUT_SIZE * in sctp_hash_init()
100 mutex_init(&sctps->sctps_bind_fanout[i].tf_lock, NULL, in sctp_hash_init()
106 sctp_hash_destroy(sctp_stack_t *sctps) in sctp_hash_destroy() argument
110 for (i = 0; i < sctps->sctps_conn_hash_size; i++) { in sctp_hash_destroy()
111 mutex_destroy(&sctps->sctps_conn_fanout[i].tf_lock); in sctp_hash_destroy()
113 kmem_free(sctps->sctps_conn_fanout, sctps->sctps_conn_hash_size * in sctp_hash_destroy()
115 sctps->sctps_conn_fanout = NULL; in sctp_hash_destroy()
118 mutex_destroy(&sctps->sctps_listen_fanout[i].tf_lock); in sctp_hash_destroy()
120 kmem_free(sctps->sctps_listen_fanout, SCTP_LISTEN_FANOUT_SIZE * in sctp_hash_destroy()
122 sctps->sctps_listen_fanout = NULL; in sctp_hash_destroy()
125 mutex_destroy(&sctps->sctps_bind_fanout[i].tf_lock); in sctp_hash_destroy()
127 kmem_free(sctps->sctps_bind_fanout, SCTP_BIND_FANOUT_SIZE * in sctp_hash_destroy()
129 sctps->sctps_bind_fanout = NULL; in sctp_hash_destroy()
159 void *arg, boolean_t cansleep, sctp_stack_t *sctps) in cl_sctp_walk_list_stack() argument
168 mutex_enter(&sctps->sctps_g_lock); in cl_sctp_walk_list_stack()
169 sctp = list_head(&sctps->sctps_g_list); in cl_sctp_walk_list_stack()
177 sctp = list_next(&sctps->sctps_g_list, sctp); in cl_sctp_walk_list_stack()
182 mutex_exit(&sctps->sctps_g_lock); in cl_sctp_walk_list_stack()
225 mutex_enter(&sctps->sctps_g_lock); in cl_sctp_walk_list_stack()
226 sctp = list_next(&sctps->sctps_g_list, sctp); in cl_sctp_walk_list_stack()
228 mutex_exit(&sctps->sctps_g_lock); in cl_sctp_walk_list_stack()
236 uint32_t ports, zoneid_t zoneid, iaflags_t iraflags, sctp_stack_t *sctps) in sctp_conn_match() argument
244 tf = &(sctps->sctps_conn_fanout[SCTP_CONN_HASH(sctps, ports)]); in sctp_conn_match()
284 iaflags_t iraflags, sctp_stack_t *sctps) in listen_match() argument
293 tf = &(sctps->sctps_listen_fanout[SCTP_LISTEN_HASH(ntohs(lport))]); in listen_match()
323 zoneid_t zoneid, iaflags_t iraflags, sctp_stack_t *sctps) in sctp_find_conn() argument
327 sctp = sctp_conn_match(&src, 1, dst, ports, zoneid, iraflags, sctps); in sctp_find_conn()
330 sctp = listen_match(dst, ports, zoneid, iraflags, sctps); in sctp_find_conn()
351 in6_addr_t *dstp, uint32_t ports, zoneid_t zoneid, sctp_stack_t *sctps, in sctp_lookup_by_faddrs() argument
370 sctps)) != NULL) { in sctp_lookup_by_faddrs()
464 zoneid, iraflags, sctps); in sctp_lookup_by_faddrs()
486 ip_recv_attr_t *ira, mblk_t *mp, sctp_stack_t *sctps, sctp_hdr_t *sctph) in sctp_fanout() argument
493 sctps, iraflags); in sctp_fanout()
496 sctp = listen_match(dst, ports, zoneid, iraflags, sctps); in sctp_fanout()
542 sctp_stack_t *sctps = ns->netstack_sctp; in ip_fanout_sctp() local
567 connp = sctp_fanout(src, dst, ports, ira, mp, sctps, NULL); in ip_fanout_sctp()