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

Function sctp_is_addr_restricted

freebsd/netinet/sctp_output.c:2406–2427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2404}
2405
2406int
2407sctp_is_addr_restricted(struct sctp_tcb *stcb, struct sctp_ifa *ifa)
2408{
2409 struct sctp_laddr *laddr;
2410
2411 if (stcb == NULL) {
2412 /* There are no restrictions, no TCB :-) */
2413 return (0);
2414 }
2415 LIST_FOREACH(laddr, &stcb->asoc.sctp_restricted_addrs, sctp_nxt_addr) {
2416 if (laddr->ifa == NULL) {
2417 SCTPDBG(SCTP_DEBUG_OUTPUT1, "%s: NULL ifa\n",
2418 __func__);
2419 continue;
2420 }
2421 if (laddr->ifa == ifa) {
2422 /* Yes it is on the list */
2423 return (1);
2424 }
2425 }
2426 return (0);
2427}
2428
2429int
2430sctp_is_addr_in_ep(struct sctp_inpcb *inp, struct sctp_ifa *ifa)

Calls

no outgoing calls

Tested by

no test coverage detected