net: add compat headers without rte prefix
[dpdk.git] / lib / librte_net / rte_udp.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) 2010-2014 Intel Corporation.
5  * All rights reserved.
6  */
7
8 #ifndef _RTE_UDP_H_
9 #define _RTE_UDP_H_
10
11 /**
12  * @file
13  *
14  * UDP-related defines
15  */
16
17 #include <stdint.h>
18
19 #ifndef RTE_NET_NO_COMPAT
20 #include <rte_udp_compat.h>
21 #endif
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 /**
28  * UDP Header
29  */
30 struct rte_udp_hdr {
31         uint16_t src_port;    /**< UDP source port. */
32         uint16_t dst_port;    /**< UDP destination port. */
33         uint16_t dgram_len;   /**< UDP datagram length */
34         uint16_t dgram_cksum; /**< UDP datagram checksum */
35 } __attribute__((__packed__));
36
37 #ifdef __cplusplus
38 }
39 #endif
40
41 #endif /* RTE_UDP_H_ */