Lines Matching refs:rtmsg
491 route_msg rtmsg; in IPv4RouteApply() local
513 memset(&rtmsg, 0, sizeof(rtmsg)); in IPv4RouteApply()
514 rtmsg.hdr.rtm_type = cmd; in IPv4RouteApply()
515 rtmsg.hdr.rtm_version = RTM_VERSION; in IPv4RouteApply()
516 rtmsg.hdr.rtm_seq = rtm_seq++; in IPv4RouteApply()
517 rtmsg.hdr.rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_IFP; in IPv4RouteApply()
519 rtmsg.hdr.rtm_addrs |= RTA_IFA; in IPv4RouteApply()
521 rtmsg.hdr.rtm_flags = RTF_UP | RTF_STATIC; in IPv4RouteApply()
523 rtmsg.hdr.rtm_flags |= RTF_HOST; in IPv4RouteApply()
525 rtmsg.hdr.rtm_addrs |= RTA_NETMASK; in IPv4RouteApply()
527 rtmsg.hdr.rtm_flags |= RTF_CLONING; in IPv4RouteApply()
531 rtmsg.hdr.rtm_flags |= RTF_GATEWAY; in IPv4RouteApply()
534 rtmsg.hdr.rtm_index = route->ifindex; in IPv4RouteApply()
535 rtmsg.hdr.rtm_flags |= RTF_IFSCOPE; in IPv4RouteApply()
538 rtaddr.ptr = rtmsg.addrs; in IPv4RouteApply()
547 if ((rtmsg.hdr.rtm_flags & RTF_GATEWAY) != 0) { in IPv4RouteApply()
562 if ((rtmsg.hdr.rtm_addrs & RTA_NETMASK) != 0) { in IPv4RouteApply()
570 if ((rtmsg.hdr.rtm_addrs & RTA_IFP) != 0) { in IPv4RouteApply()
577 if ((rtmsg.hdr.rtm_addrs & RTA_IFA) != 0) { in IPv4RouteApply()
585 len = (sizeof(rtmsg.hdr) in IPv4RouteApply()
586 + (unsigned long)(rtaddr.ptr - (char *)rtmsg.addrs)); in IPv4RouteApply()
587 rtmsg.hdr.rtm_msglen = (u_short)len; in IPv4RouteApply()
588 if (write(s, &rtmsg, len) == -1) { in IPv4RouteApply()