Lines Matching refs:rt
538 struct rtentry rt; in ifc_act_on_ipv4_route() local
542 memset(&rt, 0, sizeof(rt)); in ifc_act_on_ipv4_route()
544 rt.rt_dst.sa_family = AF_INET; in ifc_act_on_ipv4_route()
545 rt.rt_dev = (void*) ifname; in ifc_act_on_ipv4_route()
548 init_sockaddr_in(&rt.rt_genmask, netmask); in ifc_act_on_ipv4_route()
549 init_sockaddr_in(&rt.rt_dst, dst.s_addr); in ifc_act_on_ipv4_route()
550 rt.rt_flags = RTF_UP; in ifc_act_on_ipv4_route()
553 rt.rt_flags |= RTF_HOST; in ifc_act_on_ipv4_route()
557 rt.rt_flags |= RTF_GATEWAY; in ifc_act_on_ipv4_route()
558 init_sockaddr_in(&rt.rt_gateway, gw.s_addr); in ifc_act_on_ipv4_route()
568 result = ioctl(ifc_ctl_sock, action, &rt); in ifc_act_on_ipv4_route()
675 struct rtentry rt; in ifc_remove_default_route() local
679 memset(&rt, 0, sizeof(rt)); in ifc_remove_default_route()
680 rt.rt_dev = (void *)ifname; in ifc_remove_default_route()
681 rt.rt_flags = RTF_UP|RTF_GATEWAY; in ifc_remove_default_route()
682 init_sockaddr_in(&rt.rt_dst, 0); in ifc_remove_default_route()
683 if ((result = ioctl(ifc_ctl_sock, SIOCDELRT, &rt)) < 0) { in ifc_remove_default_route()