Lines Matching refs:sctp_ill

112 	sctp_ill_t	*sctp_ill;  in sctp_ipif_inactive()  local
124 sctp_ill = sctp_ipif->sctp_ipif_ill; in sctp_ipif_inactive()
125 ASSERT(sctp_ill != NULL); in sctp_ipif_inactive()
126 ill_index = SCTP_ILL_HASH_FN(sctp_ill->sctp_ill_index); in sctp_ipif_inactive()
140 (void) atomic_add_32_nv(&sctp_ill->sctp_ill_ipifcnt, -1); in sctp_ipif_inactive()
143 if (sctp_ill->sctp_ill_ipifcnt == 0 && in sctp_ipif_inactive()
144 sctp_ill->sctp_ill_state == SCTP_ILLS_CONDEMNED) { in sctp_ipif_inactive()
146 sctp_ill_list, (void *)sctp_ill); in sctp_ipif_inactive()
149 kmem_free(sctp_ill->sctp_ill_name, in sctp_ipif_inactive()
150 sctp_ill->sctp_ill_name_length); in sctp_ipif_inactive()
151 kmem_free(sctp_ill, sizeof (sctp_ill_t)); in sctp_ipif_inactive()
699 sctp_ill_t *sctp_ill = NULL; in sctp_update_ill() local
707 sctp_ill = list_head(&sctps->sctps_g_ills[index].sctp_ill_list); in sctp_update_ill()
709 if ((sctp_ill->sctp_ill_index == SCTP_ILL_TO_PHYINDEX(ill)) && in sctp_update_ill()
710 (sctp_ill->sctp_ill_isv6 == ill->ill_isv6)) { in sctp_update_ill()
713 sctp_ill = list_next(&sctps->sctps_g_ills[index].sctp_ill_list, in sctp_update_ill()
714 sctp_ill); in sctp_update_ill()
719 if (sctp_ill != NULL) { in sctp_update_ill()
721 if (sctp_ill->sctp_ill_state == SCTP_ILLS_CONDEMNED) in sctp_update_ill()
722 sctp_ill->sctp_ill_state = 0; in sctp_update_ill()
726 sctp_ill = kmem_zalloc(sizeof (sctp_ill_t), KM_NOSLEEP); in sctp_update_ill()
728 if (sctp_ill == NULL) { in sctp_update_ill()
734 sctp_ill->sctp_ill_name = kmem_zalloc(ill->ill_name_length, in sctp_update_ill()
736 if (sctp_ill->sctp_ill_name == NULL) { in sctp_update_ill()
739 kmem_free(sctp_ill, sizeof (sctp_ill_t)); in sctp_update_ill()
743 bcopy(ill->ill_name, sctp_ill->sctp_ill_name, in sctp_update_ill()
745 sctp_ill->sctp_ill_name_length = ill->ill_name_length; in sctp_update_ill()
746 sctp_ill->sctp_ill_index = SCTP_ILL_TO_PHYINDEX(ill); in sctp_update_ill()
747 sctp_ill->sctp_ill_flags = ill->ill_phyint->phyint_flags; in sctp_update_ill()
748 sctp_ill->sctp_ill_netstack = ns; /* No netstack_hold */ in sctp_update_ill()
749 sctp_ill->sctp_ill_isv6 = ill->ill_isv6; in sctp_update_ill()
751 (void *)sctp_ill); in sctp_update_ill()
759 if (sctp_ill == NULL) { in sctp_update_ill()
763 if (sctp_ill->sctp_ill_ipifcnt == 0) { in sctp_update_ill()
765 (void *)sctp_ill); in sctp_update_ill()
768 kmem_free(sctp_ill->sctp_ill_name, in sctp_update_ill()
770 kmem_free(sctp_ill, sizeof (sctp_ill_t)); in sctp_update_ill()
772 sctp_ill->sctp_ill_state = SCTP_ILLS_CONDEMNED; in sctp_update_ill()
787 sctp_ill_t *sctp_ill = NULL; in sctp_ill_reindex() local
799 sctp_ill = list_head(&sctps->sctps_g_ills[indx].sctp_ill_list); in sctp_ill_reindex()
800 while (sctp_ill != NULL) { in sctp_ill_reindex()
802 sctp_ill); in sctp_ill_reindex()
803 if (sctp_ill->sctp_ill_index == orig_ill_index) { in sctp_ill_reindex()
804 sctp_ill->sctp_ill_index = SCTP_ILL_TO_PHYINDEX(ill); in sctp_ill_reindex()
812 (void *)sctp_ill); in sctp_ill_reindex()
816 (void *)sctp_ill); in sctp_ill_reindex()
824 sctp_ill = nxt_sill; in sctp_ill_reindex()
1009 sctp_ill_t *sctp_ill; in sctp_update_ipif_addr() local
1035 sctp_ill = list_head(&sctps->sctps_g_ills[ill_index].sctp_ill_list); in sctp_update_ipif_addr()
1037 if (sctp_ill->sctp_ill_index == SCTP_ILL_TO_PHYINDEX(ill) && in sctp_update_ipif_addr()
1038 sctp_ill->sctp_ill_isv6 == ill->ill_isv6) { in sctp_update_ipif_addr()
1041 sctp_ill = list_next( in sctp_update_ipif_addr()
1042 &sctps->sctps_g_ills[ill_index].sctp_ill_list, sctp_ill); in sctp_update_ipif_addr()
1045 if (sctp_ill == NULL) { in sctp_update_ipif_addr()
1117 sctp_ipif->sctp_ipif_ill = sctp_ill; in sctp_update_ipif_addr()
1133 atomic_add_32(&sctp_ill->sctp_ill_ipifcnt, 1); in sctp_update_ipif_addr()
1146 sctp_ill_t *sctp_ill; in sctp_update_ipif() local
1159 sctp_ill = list_head(&sctps->sctps_g_ills[ill_index].sctp_ill_list); in sctp_update_ipif()
1161 if (sctp_ill->sctp_ill_index == SCTP_ILL_TO_PHYINDEX(ill) && in sctp_update_ipif()
1162 sctp_ill->sctp_ill_isv6 == ill->ill_isv6) { in sctp_update_ipif()
1165 sctp_ill = list_next( in sctp_update_ipif()
1166 &sctps->sctps_g_ills[ill_index].sctp_ill_list, sctp_ill); in sctp_update_ipif()
1168 if (sctp_ill == NULL) { in sctp_update_ipif()
1193 ASSERT(sctp_ill == sctp_ipif->sctp_ipif_ill); in sctp_update_ipif()
1213 (void) atomic_add_32_nv(&sctp_ill->sctp_ill_ipifcnt, -1); in sctp_update_ipif()
1216 if (sctp_ill->sctp_ill_ipifcnt == 0 && in sctp_update_ipif()
1217 sctp_ill->sctp_ill_state == SCTP_ILLS_CONDEMNED) { in sctp_update_ipif()
1218 list_remove(ill_list, (void *)sctp_ill); in sctp_update_ipif()
1221 kmem_free(sctp_ill->sctp_ill_name, in sctp_update_ipif()
1222 sctp_ill->sctp_ill_name_length); in sctp_update_ipif()
1223 kmem_free(sctp_ill, sizeof (sctp_ill_t)); in sctp_update_ipif()
1991 sctp_ill_t *sctp_ill; in sctp_free_ills() local
1997 sctp_ill = list_tail(&sctps->sctps_g_ills[i].sctp_ill_list); in sctp_free_ills()
1999 ASSERT(sctp_ill->sctp_ill_ipifcnt == 0); in sctp_free_ills()
2001 sctp_ill); in sctp_free_ills()
2003 kmem_free(sctp_ill->sctp_ill_name, in sctp_free_ills()
2004 sctp_ill->sctp_ill_name_length); in sctp_free_ills()
2005 kmem_free(sctp_ill, sizeof (sctp_ill_t)); in sctp_free_ills()
2006 sctp_ill = in sctp_free_ills()
2020 sctp_ill_t *sctp_ill; in sctp_free_ipifs() local
2028 sctp_ill = sctp_ipif->sctp_ipif_ill; in sctp_free_ipifs()
2033 (void) atomic_add_32_nv(&sctp_ill->sctp_ill_ipifcnt, in sctp_free_ipifs()