Lines Matching refs:hindex
113 uint_t hindex; in sctp_ipif_inactive() local
121 hindex = SCTP_IPIF_ADDR_HASH(sctp_ipif->sctp_ipif_saddr, in sctp_ipif_inactive()
133 list_remove(&sctps->sctps_g_ipifs[hindex].sctp_ipif_list, in sctp_ipif_inactive()
135 sctps->sctps_g_ipifs[hindex].ipif_count--; in sctp_ipif_inactive()
180 int hindex; in sctp_lookup_ipif_addr() local
182 hindex = SCTP_IPIF_ADDR_HASH(*addr, !IN6_IS_ADDR_V4MAPPED(addr)); in sctp_lookup_ipif_addr()
185 if (sctps->sctps_g_ipifs[hindex].ipif_count == 0) { in sctp_lookup_ipif_addr()
189 sctp_ipif = list_head(&sctps->sctps_g_ipifs[hindex].sctp_ipif_list); in sctp_lookup_ipif_addr()
190 for (j = 0; j < sctps->sctps_g_ipifs[hindex].ipif_count; j++) { in sctp_lookup_ipif_addr()
214 &sctps->sctps_g_ipifs[hindex].sctp_ipif_list, sctp_ipif); in sctp_lookup_ipif_addr()
460 int hindex; in sctp_ipif_hash_insert() local
462 hindex = SCTP_IPIF_ADDR_HASH(ipif->sctp_ipif_saddr, in sctp_ipif_hash_insert()
464 rw_enter(&sctp->sctp_saddrs[hindex].ipif_hash_lock, RW_WRITER); in sctp_ipif_hash_insert()
465 ipif_obj = list_head(&sctp->sctp_saddrs[hindex].sctp_ipif_list); in sctp_ipif_hash_insert()
466 for (cnt = 0; cnt < sctp->sctp_saddrs[hindex].ipif_count; cnt++) { in sctp_ipif_hash_insert()
478 &sctp->sctp_saddrs[hindex].ipif_hash_lock); in sctp_ipif_hash_insert()
483 &sctp->sctp_saddrs[hindex].ipif_hash_lock); in sctp_ipif_hash_insert()
487 ipif_obj = list_next(&sctp->sctp_saddrs[hindex].sctp_ipif_list, in sctp_ipif_hash_insert()
492 rw_exit(&sctp->sctp_saddrs[hindex].ipif_hash_lock); in sctp_ipif_hash_insert()
498 list_insert_tail(&sctp->sctp_saddrs[hindex].sctp_ipif_list, ipif_obj); in sctp_ipif_hash_insert()
499 sctp->sctp_saddrs[hindex].ipif_count++; in sctp_ipif_hash_insert()
501 rw_exit(&sctp->sctp_saddrs[hindex].ipif_hash_lock); in sctp_ipif_hash_insert()
528 int hindex; in sctp_ipif_hash_remove() local
530 hindex = SCTP_IPIF_ADDR_HASH(ipif->sctp_ipif_saddr, in sctp_ipif_hash_remove()
533 rw_enter(&sctp->sctp_saddrs[hindex].ipif_hash_lock, RW_WRITER); in sctp_ipif_hash_remove()
534 ipif_obj = list_head(&sctp->sctp_saddrs[hindex].sctp_ipif_list); in sctp_ipif_hash_remove()
535 for (cnt = 0; cnt < sctp->sctp_saddrs[hindex].ipif_count; cnt++) { in sctp_ipif_hash_remove()
538 list_remove(&sctp->sctp_saddrs[hindex].sctp_ipif_list, in sctp_ipif_hash_remove()
540 sctp->sctp_saddrs[hindex].ipif_count--; in sctp_ipif_hash_remove()
547 ipif_obj = list_next(&sctp->sctp_saddrs[hindex].sctp_ipif_list, in sctp_ipif_hash_remove()
551 rw_exit(&sctp->sctp_saddrs[hindex].ipif_hash_lock); in sctp_ipif_hash_remove()
836 uint_t hindex; in sctp_move_ipif() local
844 hindex = SCTP_ILL_HASH_FN(SCTP_ILL_TO_PHYINDEX(f_ill)); in sctp_move_ipif()
845 fsctp_ill = list_head(&sctps->sctps_g_ills[hindex].sctp_ill_list); in sctp_move_ipif()
846 for (i = 0; i < sctps->sctps_g_ills[hindex].ill_count; i++) { in sctp_move_ipif()
852 &sctps->sctps_g_ills[hindex].sctp_ill_list, fsctp_ill); in sctp_move_ipif()
855 hindex = SCTP_ILL_HASH_FN(SCTP_ILL_TO_PHYINDEX(t_ill)); in sctp_move_ipif()
856 tsctp_ill = list_head(&sctps->sctps_g_ills[hindex].sctp_ill_list); in sctp_move_ipif()
857 for (i = 0; i < sctps->sctps_g_ills[hindex].ill_count; i++) { in sctp_move_ipif()
863 &sctps->sctps_g_ills[hindex].sctp_ill_list, tsctp_ill); in sctp_move_ipif()
866 hindex = SCTP_IPIF_ADDR_HASH(ipif->ipif_v6lcl_addr, in sctp_move_ipif()
868 sctp_ipif = list_head(&sctps->sctps_g_ipifs[hindex].sctp_ipif_list); in sctp_move_ipif()
869 for (i = 0; i < sctps->sctps_g_ipifs[hindex].ipif_count; i++) { in sctp_move_ipif()
873 &sctps->sctps_g_ipifs[hindex].sctp_ipif_list, sctp_ipif); in sctp_move_ipif()
960 sctp_chk_and_updt_saddr(int hindex, sctp_ipif_t *ipif, sctp_stack_t *sctps) in sctp_chk_and_updt_saddr() argument
965 ASSERT(sctps->sctps_g_ipifs[hindex].ipif_count > 0); in sctp_chk_and_updt_saddr()
968 sipif = list_head(&sctps->sctps_g_ipifs[hindex].sctp_ipif_list); in sctp_chk_and_updt_saddr()
969 for (cnt = 0; cnt < sctps->sctps_g_ipifs[hindex].ipif_count; cnt++) { in sctp_chk_and_updt_saddr()
986 sctp_update_saddrs(sipif, ipif, hindex, sctps); in sctp_chk_and_updt_saddr()
989 sipif = list_next(&sctps->sctps_g_ipifs[hindex].sctp_ipif_list, in sctp_chk_and_updt_saddr()
1014 int hindex; in sctp_update_ipif_addr() local
1020 hindex = SCTP_IPIF_ADDR_HASH(ipif->ipif_v6lcl_addr, ill->ill_isv6); in sctp_update_ipif_addr()
1070 sctp_chk_and_updt_saddr(hindex, osctp_ipif, in sctp_update_ipif_addr()
1129 list_insert_head(&sctps->sctps_g_ipifs[hindex].sctp_ipif_list, in sctp_update_ipif_addr()
1131 sctps->sctps_g_ipifs[hindex].ipif_count++; in sctp_update_ipif_addr()
1134 sctp_chk_and_updt_saddr(hindex, sctp_ipif, sctps); in sctp_update_ipif_addr()
1148 uint_t hindex; in sctp_update_ipif() local
1173 hindex = SCTP_IPIF_ADDR_HASH(ipif->ipif_v6lcl_addr, in sctp_update_ipif()
1175 sctp_ipif = list_head(&sctps->sctps_g_ipifs[hindex].sctp_ipif_list); in sctp_update_ipif()
1176 for (i = 0; i < sctps->sctps_g_ipifs[hindex].ipif_count; i++) { in sctp_update_ipif()
1183 &sctps->sctps_g_ipifs[hindex].sctp_ipif_list, in sctp_update_ipif()
1200 ipif_list = &sctps->sctps_g_ipifs[hindex].sctp_ipif_list; in sctp_update_ipif()
1208 sctps->sctps_g_ipifs[hindex].ipif_count--; in sctp_update_ipif()
1235 sctp_chk_and_updt_saddr(hindex, sctp_ipif, in sctp_update_ipif()
1355 int hindex; in sctp_saddr_lookup() local
1358 hindex = SCTP_IPIF_ADDR_HASH(*addr, !IN6_IS_ADDR_V4MAPPED(addr)); in sctp_saddr_lookup()
1359 rw_enter(&sctp->sctp_saddrs[hindex].ipif_hash_lock, RW_READER); in sctp_saddr_lookup()
1360 if (sctp->sctp_saddrs[hindex].ipif_count == 0) { in sctp_saddr_lookup()
1361 rw_exit(&sctp->sctp_saddrs[hindex].ipif_hash_lock); in sctp_saddr_lookup()
1365 ipif_obj = list_head(&sctp->sctp_saddrs[hindex].sctp_ipif_list); in sctp_saddr_lookup()
1366 for (cnt = 0; cnt < sctp->sctp_saddrs[hindex].ipif_count; cnt++) { in sctp_saddr_lookup()
1375 rw_exit(&sctp->sctp_saddrs[hindex].ipif_hash_lock); in sctp_saddr_lookup()
1378 ipif_obj = list_next(&sctp->sctp_saddrs[hindex].sctp_ipif_list, in sctp_saddr_lookup()
1381 rw_exit(&sctp->sctp_saddrs[hindex].ipif_hash_lock); in sctp_saddr_lookup()