Searched refs:arp_hdr (Results 1 – 3 of 3) sorted by relevance
/Zephyr-Core-3.7.0/tests/net/arp/src/ |
D | main.c | 99 struct net_arp_hdr *arp_hdr = in tester_send() local 102 if (ntohs(arp_hdr->opcode) == NET_ARP_REPLY) { in tester_send() 127 } else if (ntohs(arp_hdr->opcode) == NET_ARP_REQUEST) { in tester_send() 334 struct net_arp_hdr *arp_hdr; in ZTEST() local 402 arp_hdr = NET_ARP_HDR(pkt2); in ZTEST() 404 if (arp_hdr->hwtype != htons(NET_ARP_HTYPE_ETH)) { in ZTEST() 406 arp_hdr->hwtype, htons(NET_ARP_HTYPE_ETH)); in ZTEST() 410 if (arp_hdr->protocol != htons(NET_ETH_PTYPE_IP)) { in ZTEST() 412 arp_hdr->protocol, htons(NET_ETH_PTYPE_IP)); in ZTEST() 416 if (arp_hdr->hwlen != sizeof(struct net_eth_addr)) { in ZTEST() [all …]
|
/Zephyr-Core-3.7.0/subsys/net/l2/ethernet/ |
D | arp.c | 754 static bool arp_hdr_check(struct net_arp_hdr *arp_hdr) in arp_hdr_check() argument 756 if (ntohs(arp_hdr->hwtype) != NET_ARP_HTYPE_ETH || in arp_hdr_check() 757 ntohs(arp_hdr->protocol) != NET_ETH_PTYPE_IP || in arp_hdr_check() 758 arp_hdr->hwlen != sizeof(struct net_eth_addr) || in arp_hdr_check() 759 arp_hdr->protolen != NET_ARP_IPV4_PTYPE_SIZE || in arp_hdr_check() 760 net_ipv4_is_addr_loopback((struct in_addr *)arp_hdr->src_ipaddr)) { in arp_hdr_check() 772 struct net_arp_hdr *arp_hdr; in net_arp_input() local 784 arp_hdr = NET_ARP_HDR(pkt); in net_arp_input() 785 if (!arp_hdr_check(arp_hdr)) { in net_arp_input() 789 switch (ntohs(arp_hdr->opcode)) { in net_arp_input() [all …]
|
/Zephyr-Core-3.7.0/subsys/net/ip/ |
D | ipv4_acd.c | 261 struct net_arp_hdr *arp_hdr; in net_ipv4_acd_input() local 270 arp_hdr = NET_ARP_HDR(pkt); in net_ipv4_acd_input() 295 if (net_ipv4_addr_cmp_raw(arp_hdr->src_ipaddr, in net_ipv4_acd_input() 297 (net_ipv4_addr_cmp_raw(arp_hdr->dst_ipaddr, in net_ipv4_acd_input() 299 memcmp(&arp_hdr->src_hwaddr, ll_addr->addr, ll_addr->len) != 0)) { in net_ipv4_acd_input() 301 net_sprint_ll_addr((uint8_t *)&arp_hdr->src_hwaddr, in net_ipv4_acd_input() 302 arp_hdr->hwlen), in net_ipv4_acd_input() 333 if (net_ipv4_addr_cmp_raw(arp_hdr->src_ipaddr, in net_ipv4_acd_input() 335 memcmp(&arp_hdr->src_hwaddr, ll_addr->addr, ll_addr->len) != 0) { in net_ipv4_acd_input() 337 net_sprint_ll_addr((uint8_t *)&arp_hdr->src_hwaddr, in net_ipv4_acd_input() [all …]
|