/Zephyr-latest/tests/net/neighbor/src/ |
D | main.c | 74 struct net_linkaddr lladdr; in ZTEST() local 93 lladdr.len = sizeof(struct net_eth_addr); in ZTEST() 98 lladdr.addr = eth_addr->addr; in ZTEST() 100 ret = net_nbr_link(nbr, iface1, &lladdr); in ZTEST() 104 net_sprint_ll_addr(lladdr.addr, lladdr.len), in ZTEST() 114 lladdr.addr = addrs[0]->addr; in ZTEST() 115 nbr = net_nbr_lookup(&net_test_neighbor.table, iface1, &lladdr); in ZTEST() 121 lladdr.addr = eth_addr->addr; in ZTEST() 123 ret = net_nbr_unlink(nbr, &lladdr); in ZTEST() 125 net_sprint_ll_addr(lladdr.addr, lladdr.len), in ZTEST() [all …]
|
/Zephyr-latest/subsys/net/ip/ |
D | nbr.c | 86 const struct net_linkaddr *lladdr) in net_nbr_link() argument 100 !memcmp(lladdr->addr, in net_nbr_link() 101 net_neighbor_lladdr[i].lladdr.addr, in net_nbr_link() 102 lladdr->len)) { in net_nbr_link() 125 net_linkaddr_set(&net_neighbor_lladdr[avail].lladdr, lladdr->addr, in net_nbr_link() 126 lladdr->len); in net_nbr_link() 127 net_neighbor_lladdr[avail].lladdr.len = lladdr->len; in net_nbr_link() 128 net_neighbor_lladdr[avail].lladdr.type = lladdr->type; in net_nbr_link() 135 int net_nbr_unlink(struct net_nbr *nbr, struct net_linkaddr *lladdr) in net_nbr_unlink() argument 137 ARG_UNUSED(lladdr); in net_nbr_unlink() [all …]
|
D | nbr.h | 31 struct net_linkaddr_storage lladdr; member 154 struct net_linkaddr *lladdr); 164 const struct net_linkaddr *lladdr); 172 int net_nbr_unlink(struct net_nbr *nbr, struct net_linkaddr *lladdr);
|
D | ipv6_nbr.c | 478 struct net_linkaddr lladdr = { in dbg_update_neighbor_lladdr_raw() local 483 dbg_update_neighbor_lladdr(&lladdr, old_lladdr, addr); in dbg_update_neighbor_lladdr_raw() 597 const struct net_linkaddr *lladdr, in net_ipv6_nbr_add() argument 613 lladdr ? net_sprint_ll_addr(lladdr->addr, lladdr->len) : "unknown"); in net_ipv6_nbr_add() 617 if (lladdr && net_nbr_link(nbr, iface, lladdr) == -EALREADY && in net_ipv6_nbr_add() 624 if (memcmp(cached_lladdr->addr, lladdr->addr, lladdr->len)) { in net_ipv6_nbr_add() 625 dbg_update_neighbor_lladdr(lladdr, cached_lladdr, addr); in net_ipv6_nbr_add() 627 net_linkaddr_set(cached_lladdr, lladdr->addr, in net_ipv6_nbr_add() 628 lladdr->len); in net_ipv6_nbr_add() 650 lladdr ? net_sprint_ll_addr(lladdr->addr, lladdr->len) : "[unknown]", in net_ipv6_nbr_add() [all …]
|
D | ipv6.c | 955 struct net_linkaddr *lladdr) in net_ipv6_addr_generate_iid() argument 993 switch (lladdr->len) { in net_ipv6_addr_generate_iid() 998 if (lladdr->type == NET_LINK_IEEE802154) { in net_ipv6_addr_generate_iid() 1003 tmp_addr.s6_addr[14] = lladdr->addr[0]; in net_ipv6_addr_generate_iid() 1004 tmp_addr.s6_addr[15] = lladdr->addr[1]; in net_ipv6_addr_generate_iid() 1012 memcpy(&tmp_addr.s6_addr[8], lladdr->addr, 3); in net_ipv6_addr_generate_iid() 1015 memcpy(&tmp_addr.s6_addr[13], lladdr->addr + 3, 3); in net_ipv6_addr_generate_iid() 1017 if (lladdr->type == NET_LINK_ETHERNET) { in net_ipv6_addr_generate_iid() 1023 memcpy(&tmp_addr.s6_addr[8], lladdr->addr, lladdr->len); in net_ipv6_addr_generate_iid()
|
D | route.c | 1034 struct net_linkaddr_storage *lladdr = NULL; in net_route_packet() local 1050 lladdr = net_nbr_get_lladdr(nbr->idx); in net_route_packet() 1051 if (!lladdr) { in net_route_packet() 1068 if (!memcmp(net_pkt_lladdr_src(pkt)->addr, lladdr->addr, in net_route_packet() 1069 lladdr->len)) { in net_route_packet() 1087 if (lladdr) { in net_route_packet() 1088 net_pkt_lladdr_dst(pkt)->addr = lladdr->addr; in net_route_packet() 1089 net_pkt_lladdr_dst(pkt)->type = lladdr->type; in net_route_packet() 1090 net_pkt_lladdr_dst(pkt)->len = lladdr->len; in net_route_packet()
|
D | ipv6.h | 338 const struct net_linkaddr *lladdr, 344 const struct net_linkaddr *lladdr, in net_ipv6_nbr_add() argument
|
D | net_pkt.c | 2027 struct net_linkaddr *lladdr) argument 2031 if (!lladdr->addr) { 2035 ll_addr_offset = net_pkt_find_offset(pkt, lladdr->addr); 2040 lladdr->addr = net_pkt_cursor_get_pos(clone_pkt);
|
/Zephyr-latest/subsys/net/l2/virtual/ |
D | virtual.c | 259 random_linkaddr(ctx->lladdr.addr, sizeof(ctx->lladdr.addr)); in net_virtual_interface_attach() 261 ctx->lladdr.len = sizeof(ctx->lladdr.addr); in net_virtual_interface_attach() 262 ctx->lladdr.type = NET_LINK_UNKNOWN; in net_virtual_interface_attach() 264 net_if_set_link_addr(virtual_iface, ctx->lladdr.addr, in net_virtual_interface_attach() 265 ctx->lladdr.len, ctx->lladdr.type); in net_virtual_interface_attach()
|
/Zephyr-latest/subsys/net/l2/ethernet/ |
D | bridge.c | 269 random_linkaddr(vctx->lladdr.addr, sizeof(vctx->lladdr.addr)); in bridge_iface_init() 271 vctx->lladdr.len = sizeof(vctx->lladdr.addr); in bridge_iface_init() 272 vctx->lladdr.type = NET_LINK_UNKNOWN; in bridge_iface_init() 274 net_if_set_link_addr(iface, vctx->lladdr.addr, in bridge_iface_init() 275 vctx->lladdr.len, vctx->lladdr.type); in bridge_iface_init()
|
D | ethernet.c | 242 struct net_linkaddr *lladdr; in ethernet_recv() local 353 lladdr = net_pkt_lladdr_src(pkt); in ethernet_recv() 354 lladdr->addr = hdr->src.addr; in ethernet_recv() 355 lladdr->len = sizeof(struct net_eth_addr); in ethernet_recv() 356 lladdr->type = NET_LINK_ETHERNET; in ethernet_recv() 358 lladdr = net_pkt_lladdr_dst(pkt); in ethernet_recv() 359 lladdr->addr = hdr->dst.addr; in ethernet_recv() 360 lladdr->len = sizeof(struct net_eth_addr); in ethernet_recv() 361 lladdr->type = NET_LINK_ETHERNET; in ethernet_recv() 377 if (!net_eth_is_addr_broadcast((struct net_eth_addr *)lladdr->addr) && in ethernet_recv() [all …]
|
/Zephyr-latest/include/zephyr/net/ |
D | net_ip.h | 1484 struct net_linkaddr *lladdr); 1493 struct net_linkaddr *lladdr) in net_ipv6_addr_create_iid() argument 1495 (void)net_ipv6_addr_generate_iid(NULL, NULL, NULL, 0, 0, addr, lladdr); in net_ipv6_addr_create_iid() 1504 const struct net_linkaddr *lladdr) in net_ipv6_addr_based_on_ll() argument 1506 if (!addr || !lladdr) { in net_ipv6_addr_based_on_ll() 1510 switch (lladdr->len) { in net_ipv6_addr_based_on_ll() 1512 if (!memcmp(&addr->s6_addr[14], lladdr->addr, lladdr->len) && in net_ipv6_addr_based_on_ll() 1523 if (lladdr->type == NET_LINK_ETHERNET) { in net_ipv6_addr_based_on_ll() 1524 if (!memcmp(&addr->s6_addr[9], &lladdr->addr[1], 2) && in net_ipv6_addr_based_on_ll() 1525 !memcmp(&addr->s6_addr[13], &lladdr->addr[3], 3) && in net_ipv6_addr_based_on_ll() [all …]
|
D | virtual.h | 163 struct net_linkaddr_storage lladdr; member
|
/Zephyr-latest/subsys/net/lib/shell/ |
D | route.c | 35 struct net_linkaddr_storage *lladdr; in route_cb() local 48 lladdr = net_nbr_get_lladdr(nexthop_route->nbr->idx); in route_cb() 50 PR("addr : %s\t", net_sprint_ll_addr(lladdr->addr, in route_cb() 51 lladdr->len)); in route_cb()
|
/Zephyr-latest/tests/net/tx_timestamp/src/ |
D | main.c | 403 struct net_linkaddr lladdr; in add_neighbor() local 413 lladdr.len = 6U; in add_neighbor() 414 lladdr.addr = llstorage.addr; in add_neighbor() 415 lladdr.type = NET_LINK_ETHERNET; in add_neighbor() 417 nbr = net_ipv6_nbr_add(iface, addr, &lladdr, false, in add_neighbor()
|
/Zephyr-latest/subsys/net/lib/sockets/ |
D | sockets_packet.c | 149 struct net_linkaddr *lladdr) in zpacket_set_eth_pkttype() argument 151 if (lladdr == NULL || lladdr->addr == NULL) { in zpacket_set_eth_pkttype() 155 if (net_eth_is_addr_broadcast((struct net_eth_addr *)lladdr->addr)) { in zpacket_set_eth_pkttype() 158 (struct net_eth_addr *)lladdr->addr)) { in zpacket_set_eth_pkttype() 160 } else if (!net_linkaddr_cmp(net_if_get_link_addr(iface), lladdr)) { in zpacket_set_eth_pkttype()
|
/Zephyr-latest/tests/net/virtual/src/ |
D | main.c | 507 struct net_linkaddr lladdr; in add_neighbor() local 517 lladdr.len = 6U; in add_neighbor() 518 lladdr.addr = llstorage.addr; in add_neighbor() 519 lladdr.type = NET_LINK_ETHERNET; in add_neighbor() 521 nbr = net_ipv6_nbr_add(iface, addr, &lladdr, false, in add_neighbor() 535 struct net_eth_addr lladdr; in add_to_arp() local 537 lladdr.addr[0] = sys_rand8_get(); in add_to_arp() 538 lladdr.addr[1] = 0x08; in add_to_arp() 539 lladdr.addr[2] = 0x09; in add_to_arp() 540 lladdr.addr[3] = 0x10; in add_to_arp() [all …]
|
/Zephyr-latest/tests/net/ipv6/src/ |
D | main.c | 453 struct net_linkaddr lladdr; in add_neighbor() local 462 lladdr.len = 6U; in add_neighbor() 463 lladdr.addr = llstorage.addr; in add_neighbor() 464 lladdr.type = NET_LINK_ETHERNET; in add_neighbor() 466 nbr = net_ipv6_nbr_add(TEST_NET_IF, &peer_addr, &lladdr, in add_neighbor() 475 struct net_linkaddr lladdr; in rm_neighbor() local 484 lladdr.len = 6U; in rm_neighbor() 485 lladdr.addr = llstorage.addr; in rm_neighbor() 486 lladdr.type = NET_LINK_ETHERNET; in rm_neighbor() 500 struct net_linkaddr lladdr; in add_max_neighbors() local [all …]
|
/Zephyr-latest/tests/net/checksum_offload/src/ |
D | main.c | 186 uint8_t lladdr[6]; in test_receiving() local 190 memcpy(lladdr, ((struct net_eth_hdr *)net_pkt_data(pkt))->src.addr, in test_receiving() 191 sizeof(lladdr)); in test_receiving() 194 sizeof(lladdr)); in test_receiving() 196 lladdr, sizeof(lladdr)); in test_receiving() 612 struct net_linkaddr lladdr; in add_neighbor() local 622 lladdr.len = 6U; in add_neighbor() 623 lladdr.addr = llstorage.addr; in add_neighbor() 624 lladdr.type = NET_LINK_ETHERNET; in add_neighbor() 626 nbr = net_ipv6_nbr_add(iface, addr, &lladdr, false, in add_neighbor()
|
/Zephyr-latest/tests/net/traffic_class/src/ |
D | main.c | 349 struct net_linkaddr lladdr; in add_neighbor() local 359 lladdr.len = 6U; in add_neighbor() 360 lladdr.addr = llstorage.addr; in add_neighbor() 361 lladdr.type = NET_LINK_ETHERNET; in add_neighbor() 363 nbr = net_ipv6_nbr_add(iface, addr, &lladdr, false, in add_neighbor()
|
/Zephyr-latest/tests/net/dhcpv6/src/ |
D | main.c | 187 struct in6_addr lladdr; in evt_handler() local 189 net_ipv6_addr_create_iid(&lladdr, net_if_get_link_addr(test_ctx.iface)); in evt_handler() 190 (void)net_if_ipv6_addr_add(test_ctx.iface, &lladdr, NET_ADDR_AUTOCONF, 0); in evt_handler() 196 struct in6_addr lladdr; in dhcpv6_tests_setup() local 200 net_ipv6_addr_create_iid(&lladdr, net_if_get_link_addr(test_ctx.iface)); in dhcpv6_tests_setup() 201 (void)net_if_ipv6_addr_add(test_ctx.iface, &lladdr, NET_ADDR_AUTOCONF, 0); in dhcpv6_tests_setup()
|
/Zephyr-latest/tests/net/socket/offload_dispatcher/src/ |
D | main.c | 374 static uint8_t lladdr[] = { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }; variable 380 net_if_set_link_addr(iface, lladdr, 6, NET_LINK_DUMMY); in dummy_native_iface_init()
|
/Zephyr-latest/tests/net/iface/src/ |
D | main.c | 1343 struct net_linkaddr *lladdr = net_if_get_link_addr(iface); in generate_iid() local 1349 lladdr = net_if_get_link_addr(eth_iface); in generate_iid() 1350 mac = lladdr->addr; in generate_iid()
|
/Zephyr-latest/subsys/net/lib/dhcpv6/ |
D | dhcpv6.c | 2110 struct net_linkaddr *lladdr = net_if_get_link_addr(iface); in dhcpv6_generate_client_duid() local 2119 memcpy(duid_ll->ll_addr, lladdr->addr, lladdr->len); in dhcpv6_generate_client_duid() 2121 clientid->length = DHCPV6_DUID_LL_HEADER_SIZE + lladdr->len; in dhcpv6_generate_client_duid()
|
/Zephyr-latest/tests/net/ipv6_fragment/src/ |
D | main.c | 1601 struct net_linkaddr *lladdr) in add_nbr() argument 1605 nbr = net_ipv6_nbr_add(iface, addr, lladdr, false, in add_nbr()
|