Lines Matching refs:routers

60 static struct net_if_router routers[CONFIG_NET_MAX_ROUTERS];  variable
720 if (!routers[i].is_used || in iface_router_lookup()
721 routers[i].address.family != family || in iface_router_lookup()
722 routers[i].iface != iface) { in iface_router_lookup()
727 net_ipv6_addr_cmp(net_if_router_ipv6(&routers[i]), in iface_router_lookup()
730 net_ipv4_addr_cmp(net_if_router_ipv4(&routers[i]), in iface_router_lookup()
732 router = &routers[i]; in iface_router_lookup()
852 if (routers[i].is_used) { in iface_router_add()
856 routers[i].is_used = true; in iface_router_add()
857 routers[i].iface = iface; in iface_router_add()
858 routers[i].address.family = family; in iface_router_add()
861 routers[i].is_default = true; in iface_router_add()
862 routers[i].is_infinite = false; in iface_router_add()
863 routers[i].lifetime = lifetime; in iface_router_add()
864 routers[i].life_start = k_uptime_get_32(); in iface_router_add()
867 &routers[i].node); in iface_router_add()
869 iface_router_update_timer(routers[i].life_start); in iface_router_add()
871 routers[i].is_default = false; in iface_router_add()
872 routers[i].is_infinite = true; in iface_router_add()
873 routers[i].lifetime = 0; in iface_router_add()
877 memcpy(net_if_router_ipv6(&routers[i]), addr, in iface_router_add()
881 &routers[i].address.in6_addr, in iface_router_add()
887 lifetime, routers[i].is_default); in iface_router_add()
889 memcpy(net_if_router_ipv4(&routers[i]), addr, in iface_router_add()
891 routers[i].is_default = is_default; in iface_router_add()
895 &routers[i].address.in_addr, in iface_router_add()
904 router = &routers[i]; in iface_router_add()
963 if (!routers[i].is_used || in iface_router_find_default()
964 !routers[i].is_default || in iface_router_find_default()
965 routers[i].address.family != family) { in iface_router_find_default()
969 if (iface && iface != routers[i].iface) { in iface_router_find_default()
973 router = &routers[i]; in iface_router_find_default()