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

Function sctp_find_ifn

freebsd/netinet/sctp_pcb.c:192–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192struct sctp_ifn *
193sctp_find_ifn(void *ifn, uint32_t ifn_index)
194{
195 struct sctp_ifn *sctp_ifnp;
196 struct sctp_ifnlist *hash_ifn_head;
197
198 /*
199 * We assume the lock is held for the addresses if that's wrong
200 * problems could occur :-)
201 */
202 SCTP_IPI_ADDR_LOCK_ASSERT();
203 hash_ifn_head = &SCTP_BASE_INFO(vrf_ifn_hash)[(ifn_index & SCTP_BASE_INFO(vrf_ifn_hashmark))];
204 LIST_FOREACH(sctp_ifnp, hash_ifn_head, next_bucket) {
205 if (sctp_ifnp->ifn_index == ifn_index) {
206 return (sctp_ifnp);
207 }
208 if (sctp_ifnp->ifn_p && ifn && (sctp_ifnp->ifn_p == ifn)) {
209 return (sctp_ifnp);
210 }
211 }
212 return (NULL);
213}
214
215struct sctp_vrf *
216sctp_find_vrf(uint32_t vrf_id)

Callers 6

sctp_choose_boundallFunction · 0.85
sctp_update_ifn_mtuFunction · 0.85
sctp_delete_ifnFunction · 0.85
sctp_add_addr_to_vrfFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected