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

Function rt_missmsg_fib

freebsd/net/rtsock.c:1771–1797  ·  view source on GitHub ↗

* This routine is called to generate a message from the routing * socket indicating that a redirect has occurred, a routing lookup * has failed, or that a protocol has detected timeouts to a particular * destination. */

Source from the content-addressed store, hash-verified

1769 * destination.
1770 */
1771void
1772rt_missmsg_fib(int type, struct rt_addrinfo *rtinfo, int flags, int error,
1773 int fibnum)
1774{
1775 struct rt_msghdr *rtm;
1776 struct mbuf *m;
1777 struct sockaddr *sa = rtinfo->rti_info[RTAX_DST];
1778
1779 if (V_route_cb.any_count == 0)
1780 return;
1781 m = rtsock_msg_mbuf(type, rtinfo);
1782 if (m == NULL)
1783 return;
1784
1785 if (fibnum != RT_ALL_FIBS) {
1786 KASSERT(fibnum >= 0 && fibnum < rt_numfibs, ("%s: fibnum out "
1787 "of range 0 <= %d < %d", __func__, fibnum, rt_numfibs));
1788 M_SETFIB(m, fibnum);
1789 m->m_flags |= RTS_FILTER_FIB;
1790 }
1791
1792 rtm = mtod(m, struct rt_msghdr *);
1793 rtm->rtm_flags = RTF_DONE | flags;
1794 rtm->rtm_errno = error;
1795 rtm->rtm_addrs = rtinfo->rti_addrs;
1796 rt_dispatch(m, sa ? sa->sa_family : AF_UNSPEC);
1797}
1798
1799void
1800rt_missmsg(int type, struct rt_addrinfo *rtinfo, int flags, int error)

Callers 3

nd6_lle_eventFunction · 0.85
rib_add_redirectFunction · 0.85
rt_missmsgFunction · 0.85

Calls 2

rtsock_msg_mbufFunction · 0.85
rt_dispatchFunction · 0.85

Tested by

no test coverage detected