net: add compat headers without rte prefix
[dpdk.git] / lib / librte_net / rte_icmp.h
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
11 /**
12  * @file
13  *
14  * ICMP-related defines
15  */
16
17 #include <stdint.h>
18
19 #ifndef RTE_NET_NO_COMPAT
20 #include <rte_icmp_compat.h>
21 #endif
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 /**
28  * ICMP Header
29  */
30 struct rte_icmp_hdr {
31         uint8_t  icmp_type;   /* ICMP packet type. */
32         uint8_t  icmp_code;   /* ICMP packet code. */
33         uint16_t icmp_cksum;  /* ICMP packet checksum. */
34         uint16_t icmp_ident;  /* ICMP packet identifier. */
35         uint16_t icmp_seq_nb; /* ICMP packet sequence number. */
36 } __attribute__((__packed__));
37
38 /* ICMP packet types */
39 #define RTE_IP_ICMP_ECHO_REPLY   0
40 #define RTE_IP_ICMP_ECHO_REQUEST 8
41
42 #ifdef __cplusplus
43 }
44 #endif
45
46 #endif /* RTE_ICMP_H_ */