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

Function in6_localip

freebsd/netinet6/in6.c:1738–1753  ·  view source on GitHub ↗

* Return 1 if an internet address is for the local host and configured * on one of its interfaces. */

Source from the content-addressed store, hash-verified

1736 * on one of its interfaces.
1737 */
1738int
1739in6_localip(struct in6_addr *in6)
1740{
1741 struct rm_priotracker in6_ifa_tracker;
1742 struct in6_ifaddr *ia;
1743
1744 IN6_IFADDR_RLOCK(&in6_ifa_tracker);
1745 CK_LIST_FOREACH(ia, IN6ADDR_HASH(in6), ia6_hash) {
1746 if (IN6_ARE_ADDR_EQUAL(in6, &ia->ia_addr.sin6_addr)) {
1747 IN6_IFADDR_RUNLOCK(&in6_ifa_tracker);
1748 return (1);
1749 }
1750 }
1751 IN6_IFADDR_RUNLOCK(&in6_ifa_tracker);
1752 return (0);
1753}
1754
1755/*
1756 * Return 1 if an internet address is configured on an interface.

Callers 9

ipfw_localip6Function · 0.85
ipfw_check_packetFunction · 0.85
in6_gif_set_runningFunction · 0.85
ip6_forwardFunction · 0.85
ip6_outputFunction · 0.85
ip6_tryforwardFunction · 0.85
in6_gre_set_runningFunction · 0.85
in6_tmpifaddFunction · 0.85
ipsec_set_runningFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected