Blog
Community
Development
Documentation
CNDP
22.08.0
cne_tcp.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) 2019-2022 Intel Corporation.
5
* All rights reserved.
6
*/
7
8
#ifndef _CNE_TCP_H_
9
#define _CNE_TCP_H_
10
17
#include <stdint.h>
18
19
#include <
cne_byteorder.h
>
20
21
#ifdef __cplusplus
22
extern
"C"
{
23
#endif
24
28
struct
cne_tcp_hdr
{
29
cne_be16_t
src_port
;
30
cne_be16_t
dst_port
;
31
cne_be32_t
sent_seq
;
32
cne_be32_t
recv_ack
;
33
uint8_t
data_off
;
34
uint8_t
tcp_flags
;
35
cne_be16_t
rx_win
;
36
cne_be16_t
cksum
;
37
cne_be16_t
tcp_urp
;
38
} __attribute__((__packed__));
39
43
#define TCP_CWR_FLAG 0x80
44
#define TCP_ECE_FLAG 0x40
45
#define TCP_URG_FLAG 0x20
46
#define TCP_ACK_FLAG 0x10
47
#define TCP_PSH_FLAG 0x08
48
#define TCP_RST_FLAG 0x04
49
#define TCP_SYN_FLAG 0x02
50
#define TCP_FIN_FLAG 0x01
52
#ifdef __cplusplus
53
}
54
#endif
55
56
#endif
/* CNE_TCP_H_ */
cne_byteorder.h
cne_be16_t
uint16_t cne_be16_t
Definition:
cne_byteorder.h:23
cne_be32_t
uint32_t cne_be32_t
Definition:
cne_byteorder.h:24
cne_tcp_hdr
Definition:
cne_tcp.h:28
cne_tcp_hdr::sent_seq
cne_be32_t sent_seq
Definition:
cne_tcp.h:31
cne_tcp_hdr::cksum
cne_be16_t cksum
Definition:
cne_tcp.h:36
cne_tcp_hdr::rx_win
cne_be16_t rx_win
Definition:
cne_tcp.h:35
cne_tcp_hdr::dst_port
cne_be16_t dst_port
Definition:
cne_tcp.h:30
cne_tcp_hdr::recv_ack
cne_be32_t recv_ack
Definition:
cne_tcp.h:32
cne_tcp_hdr::tcp_flags
uint8_t tcp_flags
Definition:
cne_tcp.h:34
cne_tcp_hdr::data_off
uint8_t data_off
Definition:
cne_tcp.h:33
cne_tcp_hdr::src_port
cne_be16_t src_port
Definition:
cne_tcp.h:29
cne_tcp_hdr::tcp_urp
cne_be16_t tcp_urp
Definition:
cne_tcp.h:37
lib
include
net
cne_tcp.h
Generated by
1.9.1