Lines Matching +full:use +full:- +full:rtm

3 /*-
4 * SPDX-License-Identifier: BSD-3-Clause
9 * Redistribution and use in source and binary forms, with or without
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
87 return (-1); in rtsock_open()
98 struct rt_msghdr *rtm; in rtsock_input() local
103 offsetof(struct rt_msghdr, rtm_msglen) + sizeof(rtm->rtm_msglen); in rtsock_input()
109 rtm = (struct rt_msghdr *)(void *)next; in rtsock_input()
110 if (lim - next < lenlim) in rtsock_input()
112 len = rtm->rtm_msglen; in rtsock_input()
118 "rtmsg type %d, len=%lu", rtm->rtm_type, in rtsock_input()
123 if (rtm->rtm_type != rtsock_dispatch[idx].type) in rtsock_input()
125 if (rtm->rtm_msglen < rtsock_dispatch[idx].minlen) { in rtsock_input()
127 "rtmsg type %d too short!", rtm->rtm_type); in rtsock_input()
131 ret = (*rtsock_dispatch[idx].func)(s, rtm, lim); in rtsock_input()
140 rtsock_input_ifannounce(int s __unused, struct rt_msghdr *rtm, char *lim) in rtsock_input_ifannounce() argument
145 ifan = (struct if_announcemsghdr *)rtm; in rtsock_input_ifannounce()
147 return (-1); in rtsock_input_ifannounce()
149 switch (ifan->ifan_what) { in rtsock_input_ifannounce()
154 * we may be able to do a name-based interface match, in rtsock_input_ifannounce()
158 "interface %s inserted", ifan->ifan_name); in rtsock_input_ifannounce()
162 "interface %s removed", ifan->ifan_name); in rtsock_input_ifannounce()
163 ifi = find_ifinfo(ifan->ifan_index); in rtsock_input_ifannounce()
168 ifan->ifan_name); in rtsock_input_ifannounce()
170 ifi->state = IFS_DOWN; in rtsock_input_ifannounce()