Home
last modified time | relevance | path

Searched refs:lladdr (Results 1 – 25 of 27) sorted by relevance

12

/Zephyr-latest/tests/net/neighbor/src/
Dmain.c74 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/
Dnbr.c86 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 …]
Dnbr.h31 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);
Dipv6_nbr.c478 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 …]
Dipv6.c955 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()
Droute.c1034 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()
Dipv6.h338 const struct net_linkaddr *lladdr,
344 const struct net_linkaddr *lladdr, in net_ipv6_nbr_add() argument
Dnet_pkt.c2027 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/
Dvirtual.c259 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/
Dbridge.c269 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()
Dethernet.c242 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/
Dnet_ip.h1484 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 …]
Dvirtual.h163 struct net_linkaddr_storage lladdr; member
/Zephyr-latest/subsys/net/lib/shell/
Droute.c35 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/
Dmain.c403 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/
Dsockets_packet.c149 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/
Dmain.c507 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/
Dmain.c453 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/
Dmain.c186 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/
Dmain.c349 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/
Dmain.c187 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/
Dmain.c374 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/
Dmain.c1343 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/
Ddhcpv6.c2110 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/
Dmain.c1601 struct net_linkaddr *lladdr) in add_nbr() argument
1605 nbr = net_ipv6_nbr_add(iface, addr, lladdr, false, in add_nbr()

12