MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sctp_asconf_iterator_ep_end

Function sctp_asconf_iterator_ep_end

freebsd/netinet/sctp_asconf.c:2068–2097  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2066}
2067
2068static int
2069sctp_asconf_iterator_ep_end(struct sctp_inpcb *inp, void *ptr, uint32_t val SCTP_UNUSED)
2070{
2071 struct sctp_ifa *ifa;
2072 struct sctp_asconf_iterator *asc;
2073 struct sctp_laddr *laddr, *nladdr, *l;
2074
2075 /* Only for specific case not bound all */
2076 asc = (struct sctp_asconf_iterator *)ptr;
2077 LIST_FOREACH(l, &asc->list_of_work, sctp_nxt_addr) {
2078 ifa = l->ifa;
2079 if (l->action == SCTP_ADD_IP_ADDRESS) {
2080 LIST_FOREACH(laddr, &inp->sctp_addr_list,
2081 sctp_nxt_addr) {
2082 if (laddr->ifa == ifa) {
2083 laddr->action = 0;
2084 break;
2085 }
2086 }
2087 } else if (l->action == SCTP_DEL_IP_ADDRESS) {
2088 LIST_FOREACH_SAFE(laddr, &inp->sctp_addr_list, sctp_nxt_addr, nladdr) {
2089 /* remove only after all guys are done */
2090 if (laddr->ifa == ifa) {
2091 sctp_del_local_addr_ep(inp, ifa);
2092 }
2093 }
2094 }
2095 }
2096 return (0);
2097}
2098
2099void
2100sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, struct sctp_tcb *stcb,

Callers

nothing calls this directly

Calls 1

sctp_del_local_addr_epFunction · 0.85

Tested by

no test coverage detected