Lines Matching refs:unicast
1372 ARRAY_FOR_EACH(ipv6->unicast, i) { in net_if_start_dad()
1373 if (!ipv6->unicast[i].is_used || in net_if_start_dad()
1374 ipv6->unicast[i].address.family != AF_INET6 || in net_if_start_dad()
1375 &ipv6->unicast[i] == ifaddr || in net_if_start_dad()
1377 &ipv6->unicast[i].address.in6_addr)) { in net_if_start_dad()
1381 net_if_ipv6_start_dad(iface, &ipv6->unicast[i]); in net_if_start_dad()
1628 ARRAY_FOR_EACH(ipv6->unicast, i) { in rejoin_ipv6_mcast_groups()
1629 if (!ipv6->unicast[i].is_used) { in rejoin_ipv6_mcast_groups()
1633 join_mcast_nodes(iface, &ipv6->unicast[i].address.in6_addr); in rejoin_ipv6_mcast_groups()
1701 ARRAY_FOR_EACH(iface->config.ip.ipv6->unicast, i) { in address_expired()
1702 if (&iface->config.ip.ipv6->unicast[i] == ifaddr) { in address_expired()
1704 &iface->config.ip.ipv6->unicast[i].address.in6_addr); in address_expired()
1797 ARRAY_FOR_EACH(ipv6->unicast, i) { in net_if_ipv6_addr_lookup()
1798 if (!ipv6->unicast[i].is_used || in net_if_ipv6_addr_lookup()
1799 ipv6->unicast[i].address.family != AF_INET6) { in net_if_ipv6_addr_lookup()
1805 ipv6->unicast[i].address.in6_addr.s6_addr, in net_if_ipv6_addr_lookup()
1812 ifaddr = &ipv6->unicast[i]; in net_if_ipv6_addr_lookup()
1838 ARRAY_FOR_EACH(ipv6->unicast, i) { in net_if_ipv6_addr_lookup_by_iface()
1839 if (!ipv6->unicast[i].is_used || in net_if_ipv6_addr_lookup_by_iface()
1840 ipv6->unicast[i].address.family != AF_INET6) { in net_if_ipv6_addr_lookup_by_iface()
1846 ipv6->unicast[i].address.in6_addr.s6_addr, in net_if_ipv6_addr_lookup_by_iface()
1848 ifaddr = &ipv6->unicast[i]; in net_if_ipv6_addr_lookup_by_iface()
1906 ARRAY_FOR_EACH(ipv6->unicast, i) { in ipv6_addr_find()
1907 if (!ipv6->unicast[i].is_used) { in ipv6_addr_find()
1912 addr, &ipv6->unicast[i].address.in6_addr)) { in ipv6_addr_find()
1914 return &ipv6->unicast[i]; in ipv6_addr_find()
1968 ARRAY_FOR_EACH(ipv6->unicast, i) { in net_if_ipv6_addr_add()
1969 if (ipv6->unicast[i].is_used) { in net_if_ipv6_addr_add()
1973 net_if_addr_init(&ipv6->unicast[i], addr, addr_type, in net_if_ipv6_addr_add()
1995 &ipv6->unicast[i].address.in6_addr); in net_if_ipv6_addr_add()
1997 net_if_ipv6_start_dad(iface, &ipv6->unicast[i]); in net_if_ipv6_addr_add()
2002 ipv6->unicast[i].addr_state = NET_ADDR_PREFERRED; in net_if_ipv6_addr_add()
2007 &ipv6->unicast[i].address.in6_addr, in net_if_ipv6_addr_add()
2010 ifaddr = &ipv6->unicast[i]; in net_if_ipv6_addr_add()
2145 ARRAY_FOR_EACH(ipv6->unicast, i) { in net_if_ipv6_addr_foreach()
2146 struct net_if_addr *if_addr = &ipv6->unicast[i]; in net_if_ipv6_addr_foreach()
2364 ARRAY_FOR_EACH(ipv6->unicast, i) { in net_if_ipv6_get_ll()
2365 if (!ipv6->unicast[i].is_used || in net_if_ipv6_get_ll()
2367 ipv6->unicast[i].addr_state != addr_state) || in net_if_ipv6_get_ll()
2368 ipv6->unicast[i].address.family != AF_INET6) { in net_if_ipv6_get_ll()
2372 if (net_ipv6_is_ll_addr(&ipv6->unicast[i].address.in6_addr)) { in net_if_ipv6_get_ll()
2373 addr = &ipv6->unicast[i].address.in6_addr; in net_if_ipv6_get_ll()
2418 ARRAY_FOR_EACH(ipv6->unicast, i) { in check_global_addr()
2419 if (!ipv6->unicast[i].is_used || in check_global_addr()
2420 (ipv6->unicast[i].addr_state != state) || in check_global_addr()
2421 ipv6->unicast[i].address.family != AF_INET6) { in check_global_addr()
2425 if (!net_ipv6_is_ll_addr(&ipv6->unicast[i].address.in6_addr)) { in check_global_addr()
2426 return &ipv6->unicast[i].address.in6_addr; in check_global_addr()
2468 ARRAY_FOR_EACH(ipv6->unicast, i) { in remove_prefix_addresses()
2469 if (!ipv6->unicast[i].is_used || in remove_prefix_addresses()
2470 ipv6->unicast[i].address.family != AF_INET6 || in remove_prefix_addresses()
2471 ipv6->unicast[i].addr_type != NET_ADDR_AUTOCONF) { in remove_prefix_addresses()
2477 ipv6->unicast[i].address.in6_addr.s6_addr, in remove_prefix_addresses()
2480 &ipv6->unicast[i].address.in6_addr); in remove_prefix_addresses()
3070 ARRAY_FOR_EACH(ipv6->unicast, i) { in net_if_ipv6_get_best_match()
3071 if (!is_proper_ipv6_address(&ipv6->unicast[i])) { in net_if_ipv6_get_best_match()
3075 len = get_diff_ipv6(dst, &ipv6->unicast[i].address.in6_addr); in net_if_ipv6_get_best_match()
3084 if (ipv6->unicast[i].is_mesh_local && len < 64 && in net_if_ipv6_get_best_match()
3090 ipv6->unicast[i].is_temporary, in net_if_ipv6_get_best_match()
3093 temp_addr = &ipv6->unicast[i].address.in6_addr; in net_if_ipv6_get_best_match()
3097 src = &ipv6->unicast[i].address.in6_addr; in net_if_ipv6_get_best_match()
3101 if (!ipv6->unicast[i].is_temporary) { in net_if_ipv6_get_best_match()
3102 public_addr = &ipv6->unicast[i]; in net_if_ipv6_get_best_match()
3107 src = &ipv6->unicast[i].address.in6_addr; in net_if_ipv6_get_best_match()
3293 ARRAY_FOR_EACH(ipv6->unicast, i) { in iface_ipv6_stop()
3294 if (ipv6->unicast[i].is_used && in iface_ipv6_stop()
3295 ipv6->unicast[i].address.family == AF_INET6 && in iface_ipv6_stop()
3296 ipv6->unicast[i].addr_type == NET_ADDR_AUTOCONF) { in iface_ipv6_stop()
3298 &ipv6->unicast[i].address.in6_addr); in iface_ipv6_stop()
3467 ARRAY_FOR_EACH(ipv4->unicast, i) { in net_if_ipv4_addr_mask_cmp()
3468 if (!ipv4->unicast[i].ipv4.is_used || in net_if_ipv4_addr_mask_cmp()
3469 ipv4->unicast[i].ipv4.address.family != AF_INET) { in net_if_ipv4_addr_mask_cmp()
3474 ipv4->unicast[i].netmask.s_addr; in net_if_ipv4_addr_mask_cmp()
3476 if ((ipv4->unicast[i].ipv4.address.in_addr.s_addr & in net_if_ipv4_addr_mask_cmp()
3477 ipv4->unicast[i].netmask.s_addr) == subnet) { in net_if_ipv4_addr_mask_cmp()
3504 ARRAY_FOR_EACH(ipv4->unicast, i) { in ipv4_is_broadcast_address()
3505 if (!ipv4->unicast[i].ipv4.is_used || in ipv4_is_broadcast_address()
3506 ipv4->unicast[i].ipv4.address.family != AF_INET) { in ipv4_is_broadcast_address()
3510 bcast.s_addr = ipv4->unicast[i].ipv4.address.in_addr.s_addr | in ipv4_is_broadcast_address()
3511 ~ipv4->unicast[i].netmask.s_addr; in ipv4_is_broadcast_address()
3593 ARRAY_FOR_EACH(ipv4->unicast, i) { in net_if_ipv4_get_best_match()
3596 if (!is_proper_ipv4_address(&ipv4->unicast[i].ipv4)) { in net_if_ipv4_get_best_match()
3600 if (net_ipv4_is_ll_addr(&ipv4->unicast[i].ipv4.address.in_addr) != ll) { in net_if_ipv4_get_best_match()
3604 subnet.s_addr = ipv4->unicast[i].ipv4.address.in_addr.s_addr & in net_if_ipv4_get_best_match()
3605 ipv4->unicast[i].netmask.s_addr; in net_if_ipv4_get_best_match()
3609 src = &ipv4->unicast[i].ipv4.address.in_addr; in net_if_ipv4_get_best_match()
3636 ARRAY_FOR_EACH(ipv4->unicast, i) { in if_ipv4_get_addr()
3637 if (!ipv4->unicast[i].ipv4.is_used || in if_ipv4_get_addr()
3639 ipv4->unicast[i].ipv4.addr_state != addr_state) || in if_ipv4_get_addr()
3640 ipv4->unicast[i].ipv4.address.family != AF_INET) { in if_ipv4_get_addr()
3644 if (net_ipv4_is_ll_addr(&ipv4->unicast[i].ipv4.address.in_addr)) { in if_ipv4_get_addr()
3654 addr = &ipv4->unicast[i].ipv4.address.in_addr; in if_ipv4_get_addr()
3770 ARRAY_FOR_EACH(ipv4->unicast, i) { in net_if_ipv4_addr_get_first_by_index()
3771 if (!ipv4->unicast[i].ipv4.is_used || in net_if_ipv4_addr_get_first_by_index()
3772 ipv4->unicast[i].ipv4.address.family != AF_INET) { in net_if_ipv4_addr_get_first_by_index()
3776 ifaddr = &ipv4->unicast[i].ipv4; in net_if_ipv4_addr_get_first_by_index()
3802 ARRAY_FOR_EACH(ipv4->unicast, i) { in net_if_ipv4_addr_lookup()
3803 if (!ipv4->unicast[i].ipv4.is_used || in net_if_ipv4_addr_lookup()
3804 ipv4->unicast[i].ipv4.address.family != AF_INET) { in net_if_ipv4_addr_lookup()
3809 ipv4->unicast[i].ipv4.address.in_addr.s_addr) { in net_if_ipv4_addr_lookup()
3815 ifaddr = &ipv4->unicast[i].ipv4; in net_if_ipv4_addr_lookup()
3872 ARRAY_FOR_EACH(ipv4->unicast, i) { in net_if_ipv4_get_netmask_by_addr()
3873 if (!ipv4->unicast[i].ipv4.is_used || in net_if_ipv4_get_netmask_by_addr()
3874 ipv4->unicast[i].ipv4.address.family != AF_INET) { in net_if_ipv4_get_netmask_by_addr()
3879 ipv4->unicast[i].netmask.s_addr; in net_if_ipv4_get_netmask_by_addr()
3881 if ((ipv4->unicast[i].ipv4.address.in_addr.s_addr & in net_if_ipv4_get_netmask_by_addr()
3882 ipv4->unicast[i].netmask.s_addr) == subnet) { in net_if_ipv4_get_netmask_by_addr()
3883 netmask = ipv4->unicast[i].netmask; in net_if_ipv4_get_netmask_by_addr()
3913 ARRAY_FOR_EACH(ipv4->unicast, i) { in net_if_ipv4_set_netmask_by_addr()
3914 if (!ipv4->unicast[i].ipv4.is_used || in net_if_ipv4_set_netmask_by_addr()
3915 ipv4->unicast[i].ipv4.address.family != AF_INET) { in net_if_ipv4_set_netmask_by_addr()
3920 ipv4->unicast[i].netmask.s_addr; in net_if_ipv4_set_netmask_by_addr()
3922 if ((ipv4->unicast[i].ipv4.address.in_addr.s_addr & in net_if_ipv4_set_netmask_by_addr()
3923 ipv4->unicast[i].netmask.s_addr) == subnet) { in net_if_ipv4_set_netmask_by_addr()
3924 ipv4->unicast[i].netmask = *netmask; in net_if_ipv4_set_netmask_by_addr()
3957 ARRAY_FOR_EACH(ipv4->unicast, i) { in net_if_ipv4_get_netmask()
3958 if (!ipv4->unicast[i].ipv4.is_used || in net_if_ipv4_get_netmask()
3959 ipv4->unicast[i].ipv4.address.family != AF_INET) { in net_if_ipv4_get_netmask()
3963 netmask = iface->config.ip.ipv4->unicast[i].netmask; in net_if_ipv4_get_netmask()
3994 ARRAY_FOR_EACH(ipv4->unicast, i) { in net_if_ipv4_set_netmask_deprecated()
3995 if (!ipv4->unicast[i].ipv4.is_used || in net_if_ipv4_set_netmask_deprecated()
3996 ipv4->unicast[i].ipv4.address.family != AF_INET) { in net_if_ipv4_set_netmask_deprecated()
4000 net_ipaddr_copy(&ipv4->unicast[i].netmask, netmask); in net_if_ipv4_set_netmask_deprecated()
4168 ARRAY_FOR_EACH(ipv4->unicast, i) { in ipv4_addr_find()
4169 if (!ipv4->unicast[i].ipv4.is_used) { in ipv4_addr_find()
4174 &ipv4->unicast[i].ipv4.address.in_addr)) { in ipv4_addr_find()
4175 return &ipv4->unicast[i].ipv4; in ipv4_addr_find()
4269 ARRAY_FOR_EACH(ipv4->unicast, i) { in net_if_start_acd()
4270 if (!ipv4->unicast[i].ipv4.is_used || in net_if_start_acd()
4271 ipv4->unicast[i].ipv4.address.family != AF_INET || in net_if_start_acd()
4273 &ipv4->unicast[i].ipv4.address.in_addr)) { in net_if_start_acd()
4277 net_if_ipv4_start_acd(iface, &ipv4->unicast[i].ipv4); in net_if_start_acd()
4317 ARRAY_FOR_EACH(ipv4->unicast, i) { in net_if_ipv4_addr_add()
4318 cur = &ipv4->unicast[i]; in net_if_ipv4_addr_add()
4327 if (!ipv4->unicast[i].ipv4.is_used) { in net_if_ipv4_addr_add()
4506 ARRAY_FOR_EACH(ipv4->unicast, i) { in net_if_ipv4_addr_foreach()
4507 struct net_if_addr *if_addr = &ipv4->unicast[i].ipv4; in net_if_ipv4_addr_foreach()
5001 ARRAY_FOR_EACH(ipv6->unicast, i) { in get_ifaddr()
5004 if (!ipv6->unicast[i].is_used) { in get_ifaddr()
5012 &ipv6->unicast[i].address.in6_addr, in get_ifaddr()
5019 if (!net_ipv6_addr_cmp(&ipv6->unicast[i].address.in6_addr, addr)) { in get_ifaddr()
5027 ifaddr = &ipv6->unicast[found]; in get_ifaddr()
5045 ARRAY_FOR_EACH(ipv4->unicast, i) { in get_ifaddr()
5046 if (!ipv4->unicast[i].ipv4.is_used) { in get_ifaddr()
5050 if (!net_ipv4_addr_cmp(&ipv4->unicast[i].ipv4.address.in_addr, in get_ifaddr()
5055 ifaddr = &ipv4->unicast[i].ipv4; in get_ifaddr()