Lines Matching refs:rtmsg
587 route_msg rtmsg; in IPv4RouteApply() local
609 memset(&rtmsg, 0, sizeof(rtmsg)); in IPv4RouteApply()
610 rtmsg.hdr.rtm_type = cmd; in IPv4RouteApply()
611 rtmsg.hdr.rtm_version = RTM_VERSION; in IPv4RouteApply()
612 rtmsg.hdr.rtm_seq = rtm_seq++; in IPv4RouteApply()
613 rtmsg.hdr.rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_IFP; in IPv4RouteApply()
615 rtmsg.hdr.rtm_addrs |= RTA_IFA; in IPv4RouteApply()
617 rtmsg.hdr.rtm_flags = RTF_UP | RTF_STATIC; in IPv4RouteApply()
619 rtmsg.hdr.rtm_flags |= RTF_HOST; in IPv4RouteApply()
621 rtmsg.hdr.rtm_addrs |= RTA_NETMASK; in IPv4RouteApply()
623 rtmsg.hdr.rtm_flags |= RTF_CLONING; in IPv4RouteApply()
627 rtmsg.hdr.rtm_flags |= RTF_GATEWAY; in IPv4RouteApply()
630 rtmsg.hdr.rtm_index = route->ifindex; in IPv4RouteApply()
631 rtmsg.hdr.rtm_flags |= RTF_IFSCOPE; in IPv4RouteApply()
634 rtaddr.ptr = rtmsg.addrs; in IPv4RouteApply()
643 if ((rtmsg.hdr.rtm_flags & RTF_GATEWAY) != 0) { in IPv4RouteApply()
658 if ((rtmsg.hdr.rtm_addrs & RTA_NETMASK) != 0) { in IPv4RouteApply()
666 if ((rtmsg.hdr.rtm_addrs & RTA_IFP) != 0) { in IPv4RouteApply()
673 if ((rtmsg.hdr.rtm_addrs & RTA_IFA) != 0) { in IPv4RouteApply()
681 len = (sizeof(rtmsg.hdr) in IPv4RouteApply()
682 + (unsigned long)(rtaddr.ptr - (char *)rtmsg.addrs)); in IPv4RouteApply()
683 rtmsg.hdr.rtm_msglen = (u_short)len; in IPv4RouteApply()
684 if (write(s, &rtmsg, len) == -1) { in IPv4RouteApply()