Lines Matching refs:rtm

85 static int	rts_getaddrs(rt_msghdr_t *rtm, in6_addr_t *dst_addrp,
191 rt_msghdr_t *rtm; in ip_rts_rtmsg() local
231 rtm = (rt_msghdr_t *)mp->b_rptr; in ip_rts_rtmsg()
232 mp->b_wptr = (uchar_t *)&mp->b_rptr[rtm->rtm_msglen]; in ip_rts_rtmsg()
233 rtm->rtm_addrs = rtm_addrs; in ip_rts_rtmsg()
234 rtm->rtm_flags = ire->ire_flags; in ip_rts_rtmsg()
236 rtm->rtm_errno = error; in ip_rts_rtmsg()
238 rtm->rtm_flags |= RTF_DONE; in ip_rts_rtmsg()
278 rt_msghdr_t *rtm = NULL; in ip_rts_request_common() local
337 rtm = (rt_msghdr_t *)mp->b_rptr; in ip_rts_request_common()
338 if ((mp->b_wptr - mp->b_rptr) != rtm->rtm_msglen) { in ip_rts_request_common()
342 if (rtm->rtm_version != RTM_VERSION) { in ip_rts_request_common()
348 if (rtm->rtm_type != RTM_GET && in ip_rts_request_common()
349 rtm->rtm_type != RTM_RESOLVE && in ip_rts_request_common()
356 found_addrs = rts_getaddrs(rtm, &dst_addr_v6, &gw_addr_v6, &net_mask_v6, in ip_rts_request_common()
380 (rtm->rtm_flags & RTF_HOST)) in ip_rts_request_common()
387 (rtm->rtm_flags & RTF_HOST)) in ip_rts_request_common()
395 switch (rtm->rtm_type) { in ip_rts_request_common()
433 switch (rtm->rtm_type) { in ip_rts_request_common()
476 if (rtm->rtm_type == RTM_ADD || rtm->rtm_type == RTM_CHANGE || in ip_rts_request_common()
477 rtm->rtm_type == RTM_GET) { in ip_rts_request_common()
483 switch (rtm->rtm_type) { in ip_rts_request_common()
492 if ((rtm->rtm_flags & (RTF_MULTIRT | RTF_HOST)) == in ip_rts_request_common()
506 if (rtm->rtm_flags & (RTF_MULTIRT | RTF_SETSRC)) { in ip_rts_request_common()
507 if ((rtm->rtm_flags & RTF_GATEWAY) == 0) { in ip_rts_request_common()
541 if (rtm->rtm_flags & RTF_SETSRC) { in ip_rts_request_common()
548 rtm->rtm_flags, ill, &ire, B_FALSE, in ip_rts_request_common()
577 &gw_addr_v6, &src_addr_v6, rtm->rtm_flags, in ip_rts_request_common()
585 if (rtm->rtm_flags & RTF_SETSRC) { in ip_rts_request_common()
590 &gw_addr_v6, NULL, rtm->rtm_flags, in ip_rts_request_common()
599 rts_setmetrics(ire, rtm->rtm_inits, &rtm->rtm_rmx); in ip_rts_request_common()
611 if (rtm->rtm_flags & RTF_SETSRC) { in ip_rts_request_common()
619 found_addrs, rtm->rtm_flags, ill, B_FALSE, in ip_rts_request_common()
624 &gw_addr_v6, found_addrs, rtm->rtm_flags, ill, in ip_rts_request_common()
651 ((rtm->rtm_type == RTM_GET) || in ip_rts_request_common()
652 !(rtm->rtm_flags & RTF_SETSRC))) { in ip_rts_request_common()
657 if (rtm->rtm_type == RTM_GET) { in ip_rts_request_common()
682 if (rtm->rtm_type == RTM_CHANGE) { in ip_rts_request_common()
684 (rtm->rtm_flags & RTF_SETSRC)) { in ip_rts_request_common()
749 switch (rtm->rtm_type) { in ip_rts_request_common()
758 rtm = (rt_msghdr_t *)mp->b_rptr; in ip_rts_request_common()
768 (rtm->rtm_flags & RTF_MULTIRT)) { in ip_rts_request_common()
799 (rtm->rtm_flags & RTF_SETSRC) != 0 && in ip_rts_request_common()
868 (rtm->rtm_flags & RTF_SETSRC) != 0 && in ip_rts_request_common()
946 rts_setmetrics(ire, rtm->rtm_inits, &rtm->rtm_rmx); in ip_rts_request_common()
965 if (rtm != NULL) { in ip_rts_request_common()
968 rtm->rtm_errno = error; in ip_rts_request_common()
972 rtm->rtm_flags |= RTF_DONE; in ip_rts_request_common()
1231 rt_msghdr_t *rtm; in rts_rtmget() local
1246 rtm = (rt_msghdr_t *)mp->b_rptr; in rts_rtmget()
1279 if ((rtm->rtm_addrs & (RTA_IFP | RTA_IFA)) && ill != NULL) { in rts_rtmget()
1365 new_rtm->rtm_index = rtm->rtm_index; in rts_rtmget()
1366 new_rtm->rtm_pid = rtm->rtm_pid; in rts_rtmget()
1367 new_rtm->rtm_seq = rtm->rtm_seq; in rts_rtmget()
1368 new_rtm->rtm_use = rtm->rtm_use; in rts_rtmget()
1609 rts_getaddrs(rt_msghdr_t *rtm, in6_addr_t *dst_addrp, in6_addr_t *gw_addrp, in rts_getaddrs() argument
1638 cp = (caddr_t)&rtm[1]; in rts_getaddrs()
1639 length = rtm->rtm_msglen; in rts_getaddrs()
1640 for (i = 0; (i < RTA_NUMBITS) && ((cp - (caddr_t)rtm) < length); i++) { in rts_getaddrs()
1655 addr_bits = (rtm->rtm_addrs & (1 << i)); in rts_getaddrs()
1711 if (((cp - (caddr_t)rtm) < length) && is_system_labeled()) { in rts_getaddrs()
1712 *error = tsol_rtsa_init(rtm, rtsecattr, cp); in rts_getaddrs()
1728 rt_msghdr_t *rtm; in rts_fill_msg() local
1746 rtm = (rt_msghdr_t *)mp->b_rptr; in rts_fill_msg()
1825 rtm->rtm_msglen = (short)(header_size + data_size); in rts_fill_msg()
1826 rtm->rtm_version = RTM_VERSION; in rts_fill_msg()
1827 rtm->rtm_type = (uchar_t)type; in rts_fill_msg()
1922 rt_msghdr_t *rtm; in ip_rts_change() local
1932 rtm = (rt_msghdr_t *)mp->b_rptr; in ip_rts_change()
1933 rtm->rtm_flags = flags; in ip_rts_change()
1934 rtm->rtm_errno = error; in ip_rts_change()
1935 rtm->rtm_flags |= RTF_DONE; in ip_rts_change()
1936 rtm->rtm_addrs = rtm_addrs; in ip_rts_change()
2014 rt_msghdr_t *rtm; in rts_new_rtsmsg() local
2085 rtm = (rt_msghdr_t *)mp->b_rptr; in rts_new_rtsmsg()
2086 rtm->rtm_index = in rts_new_rtsmsg()
2088 rtm->rtm_flags = ((cmd == RTM_ADD) ? RTF_UP : 0); in rts_new_rtsmsg()
2089 rtm->rtm_errno = error; in rts_new_rtsmsg()
2091 rtm->rtm_flags |= RTF_DONE; in rts_new_rtsmsg()
2092 rtm->rtm_addrs = rtm_addrs; in rts_new_rtsmsg()