net: add compat headers without rte prefix
[dpdk.git] / lib / librte_net / rte_tcp.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_TCP_H_
9 #define _RTE_TCP_H_
10
11 /**
12  * @file
13  *
14  * TCP-related defines
15  */
16
17 #include <stdint.h>
18
19 #ifndef RTE_NET_NO_COMPAT
20 #include <rte_tcp_compat.h>
21 #endif
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 /**
28  * TCP Header
29  */
30 struct rte_tcp_hdr {
31         uint16_t src_port;  /**< TCP source port. */
32         uint16_t dst_port;  /**< TCP destination port. */
33         uint32_t sent_seq;  /**< TX data sequence number. */
34         uint32_t recv_ack;  /**< RX data acknowledgement sequence number. */
35         uint8_t  data_off;  /**< Data offset. */
36         uint8_t  tcp_flags; /**< TCP flags */
37         uint16_t rx_win;    /**< RX flow control window. */
38         uint16_t cksum;     /**< TCP checksum. */
39         uint16_t tcp_urp;   /**< TCP urgent pointer, if any. */
40 } __attribute__((__packed__));
41
42 #ifdef __cplusplus
43 }
44 #endif
45
46 #endif /* RTE_TCP_H_ */