Lines Matching refs:ipv4_hdr
74 struct net_ipv4_hdr *ipv4_hdr) in send_icmp_echo_reply() argument
84 zassert_ok(net_ipv4_create(reply, (struct in_addr *)ipv4_hdr->dst, in send_icmp_echo_reply()
85 (struct in_addr *)ipv4_hdr->src), in send_icmp_echo_reply()
102 struct net_ipv4_hdr *ipv4_hdr; in server_send() local
104 ipv4_hdr = (struct net_ipv4_hdr *)net_pkt_get_data(pkt, &ipv4_access); in server_send()
105 zassert_not_null(ipv4_hdr, "Failed to access IPv4 header."); in server_send()
107 if (ipv4_hdr->proto == IPPROTO_ICMP) { in server_send()
110 memcpy(&test_ctx.declined_ip, ipv4_hdr->dst, in server_send()
112 send_icmp_echo_reply(pkt, ipv4_hdr); in server_send()
492 struct net_ipv4_hdr *ipv4_hdr; in verify_offer() local
497 ipv4_hdr = (struct net_ipv4_hdr *)net_pkt_get_data(pkt, &ipv4_access); in verify_offer()
498 zassert_not_null(ipv4_hdr, "Failed to access IPv4 header."); in verify_offer()
510 zassert_mem_equal(ipv4_hdr->src, server_addr.s4_addr, in verify_offer()
513 zassert_mem_equal(ipv4_hdr->dst, net_ipv4_broadcast_address(), in verify_offer()
517 zassert_mem_equal(ipv4_hdr->dst, msg->yiaddr, in verify_offer()
521 zassert_equal(ipv4_hdr->proto, IPPROTO_UDP, "Wrong protocol"); in verify_offer()
666 struct net_ipv4_hdr *ipv4_hdr; in verify_ack() local
671 ipv4_hdr = (struct net_ipv4_hdr *)net_pkt_get_data(pkt, &ipv4_access); in verify_ack()
672 zassert_not_null(ipv4_hdr, "Failed to access IPv4 header."); in verify_ack()
684 zassert_mem_equal(ipv4_hdr->src, server_addr.s4_addr, in verify_ack()
687 zassert_mem_equal(ipv4_hdr->dst, msg->ciaddr, sizeof(struct in_addr), in verify_ack()
690 zassert_mem_equal(ipv4_hdr->dst, msg->yiaddr, sizeof(struct in_addr), in verify_ack()
694 zassert_equal(ipv4_hdr->proto, IPPROTO_UDP, "Wrong protocol"); in verify_ack()