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

Function ifa_preferred

freebsd/net/if.c:2150–2156  ·  view source on GitHub ↗

* See whether new ifa is better than current one: * 1) A non-virtual one is preferred over virtual. * 2) A virtual in master state preferred over any other state. * * Used in several address selecting functions. */

Source from the content-addressed store, hash-verified

2148 * Used in several address selecting functions.
2149 */
2150int
2151ifa_preferred(struct ifaddr *cur, struct ifaddr *next)
2152{
2153
2154 return (cur->ifa_carp && (!next->ifa_carp ||
2155 ((*carp_master_p)(next) && !(*carp_master_p)(cur))));
2156}
2157
2158struct sockaddr_dl *
2159link_alloc_sdl(size_t size, int flags)

Callers 3

carp_best_ifaFunction · 0.85
in6_selectsrcFunction · 0.85
ifa_ifwithnetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected