Lines Matching refs:rt
534 struct rtentry rt; in ifc_act_on_ipv4_route() local
538 memset(&rt, 0, sizeof(rt)); in ifc_act_on_ipv4_route()
540 rt.rt_dst.sa_family = AF_INET; in ifc_act_on_ipv4_route()
541 rt.rt_dev = (void*) ifname; in ifc_act_on_ipv4_route()
544 init_sockaddr_in(&rt.rt_genmask, netmask); in ifc_act_on_ipv4_route()
545 init_sockaddr_in(&rt.rt_dst, dst.s_addr); in ifc_act_on_ipv4_route()
546 rt.rt_flags = RTF_UP; in ifc_act_on_ipv4_route()
549 rt.rt_flags |= RTF_HOST; in ifc_act_on_ipv4_route()
553 rt.rt_flags |= RTF_GATEWAY; in ifc_act_on_ipv4_route()
554 init_sockaddr_in(&rt.rt_gateway, gw.s_addr); in ifc_act_on_ipv4_route()
564 result = ioctl(ifc_ctl_sock, action, &rt); in ifc_act_on_ipv4_route()
671 struct rtentry rt; in ifc_remove_default_route() local
675 memset(&rt, 0, sizeof(rt)); in ifc_remove_default_route()
676 rt.rt_dev = (void *)ifname; in ifc_remove_default_route()
677 rt.rt_flags = RTF_UP|RTF_GATEWAY; in ifc_remove_default_route()
678 init_sockaddr_in(&rt.rt_dst, 0); in ifc_remove_default_route()
679 if ((result = ioctl(ifc_ctl_sock, SIOCDELRT, &rt)) < 0) { in ifc_remove_default_route()