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

Function nd6_prefix_onlink_rtrequest

freebsd/netinet6/nd6_rtr.c:2059–2077  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2057}
2058
2059static int
2060nd6_prefix_onlink_rtrequest(struct nd_prefix *pr, struct ifaddr *ifa)
2061{
2062 int error;
2063
2064 struct sockaddr_in6 mask6 = {
2065 .sin6_family = AF_INET6,
2066 .sin6_len = sizeof(struct sockaddr_in6),
2067 .sin6_addr = pr->ndpr_mask,
2068 };
2069 struct sockaddr_in6 *pmask6 = (pr->ndpr_plen != 128) ? &mask6 : NULL;
2070
2071 error = nd6_prefix_rtrequest(pr->ndpr_ifp->if_fib, RTM_ADD,
2072 &pr->ndpr_prefix, pmask6, pr->ndpr_ifp, ifa);
2073 if (error == 0)
2074 pr->ndpr_stateflags |= NDPRF_ONLINK;
2075
2076 return (error);
2077}
2078
2079static int
2080nd6_prefix_onlink(struct nd_prefix *pr)

Callers 1

nd6_prefix_onlinkFunction · 0.85

Calls 1

nd6_prefix_rtrequestFunction · 0.85

Tested by

no test coverage detected