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

Function rt_addrmsg

freebsd/net/route.c:693–707  ·  view source on GitHub ↗

* Announce interface address arrival/withdraw * Returns 0 on success. */

Source from the content-addressed store, hash-verified

691 * Returns 0 on success.
692 */
693int
694rt_addrmsg(int cmd, struct ifaddr *ifa, int fibnum)
695{
696
697 KASSERT(cmd == RTM_ADD || cmd == RTM_DELETE,
698 ("unexpected cmd %d", cmd));
699 KASSERT((fibnum >= 0 && fibnum < rt_numfibs),
700 ("%s: fib out of range 0 <=%d<%d", __func__, fibnum, rt_numfibs));
701
702 EVENTHANDLER_DIRECT_INVOKE(rt_addrmsg, ifa, cmd);
703
704 if (V_rt_add_addr_allfibs)
705 fibnum = RT_ALL_FIBS;
706 return (rtsock_addrmsg(cmd, ifa, fibnum));
707}
708
709/*
710 * Announce kernel-originated route addition/removal to rtsock based on @rt data.

Callers 5

in_addprefixFunction · 0.85
in_scrubprefixFunction · 0.85
rip_ctlinputFunction · 0.85
in6_newaddrmsgFunction · 0.85
sppp_set_ip_addrFunction · 0.85

Calls 1

rtsock_addrmsgFunction · 0.85

Tested by

no test coverage detected