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

Function sctp_hc_get_mtu

freebsd/netinet/sctputil.c:7574–7597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7572}
7573
7574uint32_t
7575sctp_hc_get_mtu(union sctp_sockstore *addr, uint16_t fibnum)
7576{
7577 struct in_conninfo inc;
7578
7579 memset(&inc, 0, sizeof(struct in_conninfo));
7580 inc.inc_fibnum = fibnum;
7581 switch (addr->sa.sa_family) {
7582#ifdef INET
7583 case AF_INET:
7584 inc.inc_faddr = addr->sin.sin_addr;
7585 break;
7586#endif
7587#ifdef INET6
7588 case AF_INET6:
7589 inc.inc_flags |= INC_ISIPV6;
7590 inc.inc6_faddr = addr->sin6.sin6_addr;
7591 break;
7592#endif
7593 default:
7594 return (0);
7595 }
7596 return ((uint32_t)tcp_hc_getmtu(&inc));
7597}
7598
7599void
7600sctp_set_state(struct sctp_tcb *stcb, int new_state)

Callers 1

sctp_add_remote_addrFunction · 0.85

Calls 2

memsetFunction · 0.85
tcp_hc_getmtuFunction · 0.85

Tested by

no test coverage detected