Lines Matching refs:rtmsg
673 route_msg rtmsg; in IPv4RouteApply() local
695 memset(&rtmsg, 0, sizeof(rtmsg)); in IPv4RouteApply()
696 rtmsg.hdr.rtm_type = cmd; in IPv4RouteApply()
697 rtmsg.hdr.rtm_version = RTM_VERSION; in IPv4RouteApply()
698 rtmsg.hdr.rtm_seq = rtm_seq++; in IPv4RouteApply()
699 rtmsg.hdr.rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_IFP; in IPv4RouteApply()
701 rtmsg.hdr.rtm_addrs |= RTA_IFA; in IPv4RouteApply()
703 rtmsg.hdr.rtm_flags = RTF_UP | RTF_STATIC; in IPv4RouteApply()
705 rtmsg.hdr.rtm_flags |= RTF_HOST; in IPv4RouteApply()
707 rtmsg.hdr.rtm_addrs |= RTA_NETMASK; in IPv4RouteApply()
709 rtmsg.hdr.rtm_flags |= RTF_CLONING; in IPv4RouteApply()
713 rtmsg.hdr.rtm_flags |= RTF_GATEWAY; in IPv4RouteApply()
716 rtmsg.hdr.rtm_index = route->ifindex; in IPv4RouteApply()
717 rtmsg.hdr.rtm_flags |= RTF_IFSCOPE; in IPv4RouteApply()
720 rtaddr.ptr = rtmsg.addrs; in IPv4RouteApply()
729 if ((rtmsg.hdr.rtm_flags & RTF_GATEWAY) != 0) { in IPv4RouteApply()
744 if ((rtmsg.hdr.rtm_addrs & RTA_NETMASK) != 0) { in IPv4RouteApply()
752 if ((rtmsg.hdr.rtm_addrs & RTA_IFP) != 0) { in IPv4RouteApply()
759 if ((rtmsg.hdr.rtm_addrs & RTA_IFA) != 0) { in IPv4RouteApply()
767 len = (sizeof(rtmsg.hdr) in IPv4RouteApply()
768 + (unsigned long)(rtaddr.ptr - (char *)rtmsg.addrs)); in IPv4RouteApply()
769 rtmsg.hdr.rtm_msglen = (u_short)len; in IPv4RouteApply()
770 if (write(s, &rtmsg, len) == -1) { in IPv4RouteApply()