net: update licence for network headers
[dpdk.git] / lib / librte_net / rte_icmp.h
1 /*
2  * SPDX-License-Identifier: BSD-3-Clause
3  *
4  * Copyright(c) 1982, 1986, 1990, 1993
5  *      The Regents of the University of California.
6  * Copyright(c) 2013 6WIND S.A.
7  * All rights reserved.
8  */
9
10 #ifndef _RTE_ICMP_H_
11 #define _RTE_ICMP_H_
12
13 /**
14  * @file
15  *
16  * ICMP-related defines
17  */
18
19 #include <stdint.h>
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 /**
26  * ICMP Header
27  */
28 struct icmp_hdr {
29         uint8_t  icmp_type;   /* ICMP packet type. */
30         uint8_t  icmp_code;   /* ICMP packet code. */
31         uint16_t icmp_cksum;  /* ICMP packet checksum. */
32         uint16_t icmp_ident;  /* ICMP packet identifier. */
33         uint16_t icmp_seq_nb; /* ICMP packet sequence number. */
34 } __attribute__((__packed__));
35
36 /* ICMP packet types */
37 #define IP_ICMP_ECHO_REPLY   0
38 #define IP_ICMP_ECHO_REQUEST 8
39
40 #ifdef __cplusplus
41 }
42 #endif
43
44 #endif /* RTE_ICMP_H_ */