DPDK
23.07.0
lib
net
rte_icmp.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright(c) 1982, 1986, 1990, 1993
3
* The Regents of the University of California.
4
* Copyright(c) 2013 6WIND S.A.
5
* All rights reserved.
6
*/
7
8
#ifndef _RTE_ICMP_H_
9
#define _RTE_ICMP_H_
10
17
#include <stdint.h>
18
19
#include <
rte_byteorder.h
>
20
21
#ifdef __cplusplus
22
extern
"C"
{
23
#endif
24
28
struct
rte_icmp_base_hdr
{
29
uint8_t type;
30
uint8_t code;
31
rte_be16_t
checksum;
32
}
__rte_packed
;
33
37
struct
rte_icmp_echo_hdr
{
38
struct
rte_icmp_base_hdr
base;
39
rte_be16_t
identifier;
40
rte_be16_t
sequence;
41
}
__rte_packed
;
42
48
struct
rte_icmp_hdr
{
49
uint8_t icmp_type;
/* ICMP packet type. */
50
uint8_t icmp_code;
/* ICMP packet code. */
51
rte_be16_t
icmp_cksum;
/* ICMP packet checksum. */
52
rte_be16_t
icmp_ident;
/* ICMP packet identifier. */
53
rte_be16_t
icmp_seq_nb;
/* ICMP packet sequence number. */
54
}
__rte_packed
;
55
56
/* ICMP packet types */
57
#define RTE_IP_ICMP_ECHO_REPLY 0
58
#define RTE_IP_ICMP_ECHO_REQUEST 8
59
#define RTE_ICMP6_ECHO_REQUEST 128
60
#define RTE_ICMP6_ECHO_REPLY 129
61
62
#ifdef __cplusplus
63
}
64
#endif
65
66
#endif
/* RTE_ICMP_H_ */
rte_byteorder.h
rte_icmp_base_hdr
Definition:
rte_icmp.h:28
__rte_packed
#define __rte_packed
Definition:
rte_common.h:83
rte_icmp_echo_hdr
Definition:
rte_icmp.h:37
rte_icmp_hdr
Definition:
rte_icmp.h:48
rte_be16_t
uint16_t rte_be16_t
Definition:
rte_byteorder.h:110
Generated by
1.8.13