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

Function in6ifa_ifwithaddr

freebsd/netinet6/in6.c:1559–1577  ·  view source on GitHub ↗

* find the interface address corresponding to a given IPv6 address. * ifaddr is returned referenced. */

Source from the content-addressed store, hash-verified

1557 * ifaddr is returned referenced.
1558 */
1559struct in6_ifaddr *
1560in6ifa_ifwithaddr(const struct in6_addr *addr, uint32_t zoneid)
1561{
1562 struct rm_priotracker in6_ifa_tracker;
1563 struct in6_ifaddr *ia;
1564
1565 IN6_IFADDR_RLOCK(&in6_ifa_tracker);
1566 CK_LIST_FOREACH(ia, IN6ADDR_HASH(addr), ia6_hash) {
1567 if (IN6_ARE_ADDR_EQUAL(IA6_IN6(ia), addr)) {
1568 if (zoneid != 0 &&
1569 zoneid != ia->ia_addr.sin6_scope_id)
1570 continue;
1571 ifa_ref(&ia->ia_ifa);
1572 break;
1573 }
1574 }
1575 IN6_IFADDR_RUNLOCK(&in6_ifa_tracker);
1576 return (ia);
1577}
1578
1579/*
1580 * find the internet address corresponding to a given interface and address.

Callers 8

tcp6_inputFunction · 0.85
tcp_inputFunction · 0.85
frag6_inputFunction · 0.85
ip6_inputFunction · 0.85
in6_selectsrcFunction · 0.85
ni6_inputFunction · 0.85
icmp6_reflectFunction · 0.85
in6_ifattachFunction · 0.85

Calls 1

ifa_refFunction · 0.85

Tested by

no test coverage detected