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

Function if_unroute

freebsd/net/if.c:2194–2211  ·  view source on GitHub ↗

* Mark an interface down and notify protocols of * the transition. */

Source from the content-addressed store, hash-verified

2192 * the transition.
2193 */
2194static void
2195if_unroute(struct ifnet *ifp, int flag, int fam)
2196{
2197 struct ifaddr *ifa;
2198
2199 KASSERT(flag == IFF_UP, ("if_unroute: flag != IFF_UP"));
2200
2201 ifp->if_flags &= ~flag;
2202 getmicrotime(&ifp->if_lastchange);
2203 CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link)
2204 if (fam == PF_UNSPEC || (fam == ifa->ifa_addr->sa_family))
2205 pfctlinput(PRC_IFDOWN, ifa->ifa_addr);
2206 ifp->if_qflush(ifp);
2207
2208 if (ifp->if_carp)
2209 (*carp_linkstate_p)(ifp);
2210 rt_ifmsg(ifp);
2211}
2212
2213/*
2214 * Mark an interface up and notify protocols of

Callers 1

if_downFunction · 0.85

Calls 3

getmicrotimeFunction · 0.85
pfctlinputFunction · 0.85
rt_ifmsgFunction · 0.85

Tested by

no test coverage detected