Lines Matching +full:header +full:- +full:payload
1 /* main.c - Application main entry point */
7 * SPDX-License-Identifier: Apache-2.0
34 /* IPv4 Header */
38 /* ICMP Header (Echo Request) */
41 /* Payload */
51 /* IPv4 Header */
55 /* ICMP Header (Echo Reply)*/
60 /* IPv4 Header */
64 /* IPv4 Header Options (Timestamp) */
70 /* ICMP Header (Echo Request) */
74 /* Payload */
83 /* IPv4 Header */
88 /* IPv4 Header Options (Wrong length) */
91 /* ICMP Header (Echo Request) */
93 /* Payload */
131 return -ENOMSG; in handle_reply_msg()
144 struct net_icmpv4_context *net_icmpv4_context = dev->data; in net_icmpv4_dev_init()
153 struct net_icmpv4_context *context = dev->data; in net_icmpv4_get_mac()
155 if (context->mac_addr[2] == 0x00) { in net_icmpv4_get_mac()
156 /* 00-00-5E-00-53-xx Documentation RFC 7042 */ in net_icmpv4_get_mac()
157 context->mac_addr[0] = 0x00; in net_icmpv4_get_mac()
158 context->mac_addr[1] = 0x00; in net_icmpv4_get_mac()
159 context->mac_addr[2] = 0x5E; in net_icmpv4_get_mac()
160 context->mac_addr[3] = 0x00; in net_icmpv4_get_mac()
161 context->mac_addr[4] = 0x53; in net_icmpv4_get_mac()
162 context->mac_addr[5] = 0x01; in net_icmpv4_get_mac()
165 return context->mac_addr; in net_icmpv4_get_mac()
200 /* Calculate payload length */ in verify_echo_reply()
201 payload_len = sizeof(icmpv4_echo_req) - in verify_echo_reply()
202 NET_IPV4H_LEN - NET_ICMPH_LEN; in verify_echo_reply()
204 zassert_true(false, "echo_reply invalid payload len"); in verify_echo_reply()
209 zassert_true(false, "echo_reply read payload failed"); in verify_echo_reply()
212 /* Compare the payload */ in verify_echo_reply()
215 zassert_true(false, "echo_reply invalid payload"); in verify_echo_reply()
244 opts_len = vhl - sizeof(struct net_ipv4_hdr); in verify_echo_reply_with_opts()
249 ret = net_pkt_skip(pkt, NET_IPV4H_LEN - 1U + opts_len); in verify_echo_reply_with_opts()
264 /* Calculate payload length */ in verify_echo_reply_with_opts()
265 payload_len = sizeof(icmpv4_echo_req_opt) - in verify_echo_reply_with_opts()
266 NET_IPV4H_LEN - NET_ICMPH_LEN - opts_len; in verify_echo_reply_with_opts()
268 zassert_true(false, "echo_reply_opts invalid payload len"); in verify_echo_reply_with_opts()
273 zassert_true(false, "echo_reply_opts read payload failed"); in verify_echo_reply_with_opts()
276 /* Compare the payload */ in verify_echo_reply_with_opts()
280 zassert_true(false, "echo_reply_opts invalid payload"); in verify_echo_reply_with_opts()
299 return -EINVAL; in tester_send()