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

Function if_route

freebsd/net/if.c:2217–2235  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2215 * the transition.
2216 */
2217static void
2218if_route(struct ifnet *ifp, int flag, int fam)
2219{
2220 struct ifaddr *ifa;
2221
2222 KASSERT(flag == IFF_UP, ("if_route: flag != IFF_UP"));
2223
2224 ifp->if_flags |= flag;
2225 getmicrotime(&ifp->if_lastchange);
2226 CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link)
2227 if (fam == PF_UNSPEC || (fam == ifa->ifa_addr->sa_family))
2228 pfctlinput(PRC_IFUP, ifa->ifa_addr);
2229 if (ifp->if_carp)
2230 (*carp_linkstate_p)(ifp);
2231 rt_ifmsg(ifp);
2232#ifdef INET6
2233 in6_if_up(ifp);
2234#endif
2235}
2236
2237void (*vlan_link_state_p)(struct ifnet *); /* XXX: private from if_vlan */
2238void (*vlan_trunk_cap_p)(struct ifnet *); /* XXX: private from if_vlan */

Callers 1

if_upFunction · 0.85

Calls 4

getmicrotimeFunction · 0.85
pfctlinputFunction · 0.85
rt_ifmsgFunction · 0.85
in6_if_upFunction · 0.85

Tested by

no test coverage detected