Lines Matching refs:rtm
64 struct rt_msghdr rtm; member
114 struct rt_msghdr *rtm; in routing_events_v4() local
124 rtm = &buffer.r.rtm; in routing_events_v4()
135 if (rtm->rtm_msglen < n) { in routing_events_v4()
138 "of length %d", rtm->rtm_msglen); in routing_events_v4()
142 if (rtm->rtm_version != RTM_VERSION) { in routing_events_v4()
144 "version %d type %d", rtm->rtm_version, in routing_events_v4()
145 rtm->rtm_type); in routing_events_v4()
149 if (rtm->rtm_msglen != n) { in routing_events_v4()
151 "read of %d on socket %d", rtm->rtm_msglen, in routing_events_v4()
155 switch (rtm->rtm_type) { in routing_events_v4()
161 ifa = (void *)rtm; in routing_events_v4()
165 "index %d flags %x", rtmtype_str(rtm->rtm_type), in routing_events_v4()
199 if (ifa->ifam_type != rtm->rtm_type) { in routing_events_v4()
211 (rtm->rtm_type == RTM_NEWADDR || in routing_events_v4()
212 rtm->rtm_type == RTM_CHGADDR ? B_TRUE : B_FALSE), in routing_events_v4()
229 struct rt_msghdr *rtm; in routing_events_v6() local
240 rtm = &buffer.r.rtm; in routing_events_v6()
251 if (rtm->rtm_msglen < n) { in routing_events_v6()
254 "of length %d", rtm->rtm_msglen); in routing_events_v6()
258 if (rtm->rtm_version != RTM_VERSION) { in routing_events_v6()
260 "version %d type %d", rtm->rtm_version, in routing_events_v6()
261 rtm->rtm_type); in routing_events_v6()
265 if (rtm->rtm_msglen != n) { in routing_events_v6()
267 "read of %d on socket %d", rtm->rtm_msglen, in routing_events_v6()
271 switch (rtm->rtm_type) { in routing_events_v6()
277 ifa = (void *)rtm; in routing_events_v6()
281 "index %d flags %x", rtmtype_str(rtm->rtm_type), in routing_events_v6()
323 if (ifa->ifam_type != rtm->rtm_type) { in routing_events_v6()
335 (rtm->rtm_type == RTM_NEWADDR || in routing_events_v6()
336 rtm->rtm_type == RTM_CHGADDR ? B_TRUE : B_FALSE), in routing_events_v6()
387 struct rt_msghdr *rtm = (struct rt_msghdr *)rtbuf; in nwamd_add_route() local
406 (void) bzero(rtm, RTMBUFSZ); in nwamd_add_route()
407 rtm->rtm_pid = getpid(); in nwamd_add_route()
408 rtm->rtm_type = RTM_ADD; in nwamd_add_route()
409 rtm->rtm_flags = RTF_UP | RTF_STATIC | RTF_GATEWAY; in nwamd_add_route()
410 rtm->rtm_version = RTM_VERSION; in nwamd_add_route()
411 rtm->rtm_seq = ++seq; in nwamd_add_route()
412 rtm->rtm_msglen = sizeof (rtbuf); in nwamd_add_route()
413 setaddr(RTA_DST, &rtm->rtm_addrs, &addrs, dest); in nwamd_add_route()
414 setaddr(RTA_GATEWAY, &rtm->rtm_addrs, &addrs, gateway); in nwamd_add_route()
415 setaddr(RTA_NETMASK, &rtm->rtm_addrs, &addrs, mask); in nwamd_add_route()
416 setaddr(RTA_IFP, &rtm->rtm_addrs, &addrs, (struct sockaddr *)&sdl); in nwamd_add_route()
419 rtbuf, rtm->rtm_msglen)) < 0) { in nwamd_add_route()
422 } else if (rlen < rtm->rtm_msglen) { in nwamd_add_route()
425 rlen, rtm->rtm_msglen); in nwamd_add_route()