ReactOS 0.4.15-dev-5666-gc548b97
tcpdef.h File Reference
#include "linux.h"
Include dependency graph for tcpdef.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tcphdr
 
union  tcp_word_hdr
 
struct  tcp_info
 

Macros

#define TCP_STATE_MASK   0xF
 
#define TCP_ACTION_FIN   (1 << 7)
 
#define tcp_flag_word(tp)   ( ((union tcp_word_hdr *)(tp))->words [3])
 
#define TCP_NODELAY   1 /* Turn off Nagle's algorithm. */
 
#define TCP_MAXSEG   2 /* Limit MSS */
 
#define TCP_CORK   3 /* Never send partially complete segments */
 
#define TCP_KEEPIDLE   4 /* Start keepalives after this period */
 
#define TCP_KEEPINTVL   5 /* Interval between keepalives */
 
#define TCP_KEEPCNT   6 /* Number of keepalives before death */
 
#define TCP_SYNCNT   7 /* Number of SYN retransmits */
 
#define TCP_LINGER2   8 /* Life time of orphaned FIN-WAIT-2 state */
 
#define TCP_DEFER_ACCEPT   9 /* Wake up listener only when data arrive */
 
#define TCP_WINDOW_CLAMP   10 /* Bound advertised window */
 
#define TCP_INFO   11 /* Information about this connection. */
 
#define TCP_QUICKACK   12 /* Block/reenable quick acks */
 
#define TCPI_OPT_TIMESTAMPS   1
 
#define TCPI_OPT_SACK   2
 
#define TCPI_OPT_WSCALE   4
 
#define TCPI_OPT_ECN   8
 
#define TCPF_CA_Open   (1<<TCP_CA_Open)
 
#define TCPF_CA_Disorder   (1<<TCP_CA_Disorder)
 
#define TCPF_CA_CWR   (1<<TCP_CA_CWR)
 
#define TCPF_CA_Recovery   (1<<TCP_CA_Recovery)
 
#define TCPF_CA_Loss   (1<<TCP_CA_Loss)
 

Enumerations

enum  {
  TCP_ESTABLISHED = 1 , TCP_SYN_SENT , TCP_SYN_RECV , TCP_FIN_WAIT1 ,
  TCP_FIN_WAIT2 , TCP_TIME_WAIT , TCP_CLOSE , TCP_CLOSE_WAIT ,
  TCP_LAST_ACK , TCP_LISTEN , TCP_CLOSING , TCP_MAX_STATES
}
 
enum  {
  TCPF_ESTABLISHED = (1 << 1) , TCPF_SYN_SENT = (1 << 2) , TCPF_SYN_RECV = (1 << 3) , TCPF_FIN_WAIT1 = (1 << 4) ,
  TCPF_FIN_WAIT2 = (1 << 5) , TCPF_TIME_WAIT = (1 << 6) , TCPF_CLOSE = (1 << 7) , TCPF_CLOSE_WAIT = (1 << 8) ,
  TCPF_LAST_ACK = (1 << 9) , TCPF_LISTEN = (1 << 10) , TCPF_CLOSING = (1 << 11)
}
 
enum  {
  TCP_FLAG_CWR = 0x00800000 , TCP_FLAG_ECE = 0x00400000 , TCP_FLAG_URG = 0x00200000 , TCP_FLAG_ACK = 0x00100000 ,
  TCP_FLAG_PSH = 0x00080000 , TCP_FLAG_RST = 0x00040000 , TCP_FLAG_SYN = 0x00020000 , TCP_FLAG_FIN = 0x00010000 ,
  TCP_RESERVED_BITS = 0x0F000000 , TCP_DATA_OFFSET = 0xF0000000
}
 
enum  tcp_ca_state {
  TCP_CA_Open = 0 , TCP_CA_Disorder = 1 , TCP_CA_CWR = 2 , TCP_CA_Recovery = 3 ,
  TCP_CA_Loss
}
 

Macro Definition Documentation

◆ TCP_ACTION_FIN

#define TCP_ACTION_FIN   (1 << 7)

Definition at line 75 of file tcpdef.h.

◆ TCP_CORK

#define TCP_CORK   3 /* Never send partially complete segments */

Definition at line 119 of file tcpdef.h.

◆ TCP_DEFER_ACCEPT

#define TCP_DEFER_ACCEPT   9 /* Wake up listener only when data arrive */

Definition at line 125 of file tcpdef.h.

◆ tcp_flag_word

#define tcp_flag_word (   tp)    ( ((union tcp_word_hdr *)(tp))->words [3])

Definition at line 101 of file tcpdef.h.

◆ TCP_INFO

#define TCP_INFO   11 /* Information about this connection. */

Definition at line 127 of file tcpdef.h.

◆ TCP_KEEPCNT

#define TCP_KEEPCNT   6 /* Number of keepalives before death */

Definition at line 122 of file tcpdef.h.

◆ TCP_KEEPIDLE

#define TCP_KEEPIDLE   4 /* Start keepalives after this period */

Definition at line 120 of file tcpdef.h.

◆ TCP_KEEPINTVL

#define TCP_KEEPINTVL   5 /* Interval between keepalives */

Definition at line 121 of file tcpdef.h.

◆ TCP_LINGER2

#define TCP_LINGER2   8 /* Life time of orphaned FIN-WAIT-2 state */

Definition at line 124 of file tcpdef.h.

◆ TCP_MAXSEG

#define TCP_MAXSEG   2 /* Limit MSS */

Definition at line 118 of file tcpdef.h.

◆ TCP_NODELAY

#define TCP_NODELAY   1 /* Turn off Nagle's algorithm. */

Definition at line 117 of file tcpdef.h.

◆ TCP_QUICKACK

#define TCP_QUICKACK   12 /* Block/reenable quick acks */

Definition at line 128 of file tcpdef.h.

◆ TCP_STATE_MASK

#define TCP_STATE_MASK   0xF

Definition at line 74 of file tcpdef.h.

◆ TCP_SYNCNT

#define TCP_SYNCNT   7 /* Number of SYN retransmits */

Definition at line 123 of file tcpdef.h.

◆ TCP_WINDOW_CLAMP

#define TCP_WINDOW_CLAMP   10 /* Bound advertised window */

Definition at line 126 of file tcpdef.h.

◆ TCPF_CA_CWR

#define TCPF_CA_CWR   (1<<TCP_CA_CWR)

Definition at line 142 of file tcpdef.h.

◆ TCPF_CA_Disorder

#define TCPF_CA_Disorder   (1<<TCP_CA_Disorder)

Definition at line 140 of file tcpdef.h.

◆ TCPF_CA_Loss

#define TCPF_CA_Loss   (1<<TCP_CA_Loss)

◆ TCPF_CA_Open

#define TCPF_CA_Open   (1<<TCP_CA_Open)

Definition at line 138 of file tcpdef.h.

◆ TCPF_CA_Recovery

#define TCPF_CA_Recovery   (1<<TCP_CA_Recovery)

Definition at line 144 of file tcpdef.h.

◆ TCPI_OPT_ECN

#define TCPI_OPT_ECN   8

Definition at line 133 of file tcpdef.h.

◆ TCPI_OPT_SACK

#define TCPI_OPT_SACK   2

Definition at line 131 of file tcpdef.h.

◆ TCPI_OPT_TIMESTAMPS

#define TCPI_OPT_TIMESTAMPS   1

Definition at line 130 of file tcpdef.h.

◆ TCPI_OPT_WSCALE

#define TCPI_OPT_WSCALE   4

Definition at line 132 of file tcpdef.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
TCPF_ESTABLISHED 
TCPF_SYN_SENT 
TCPF_SYN_RECV 
TCPF_FIN_WAIT1 
TCPF_FIN_WAIT2 
TCPF_TIME_WAIT 
TCPF_CLOSE 
TCPF_CLOSE_WAIT 
TCPF_LAST_ACK 
TCPF_LISTEN 
TCPF_CLOSING 

Definition at line 77 of file tcpdef.h.

77 {
78 TCPF_ESTABLISHED = (1 << 1),
79 TCPF_SYN_SENT = (1 << 2),
80 TCPF_SYN_RECV = (1 << 3),
81 TCPF_FIN_WAIT1 = (1 << 4),
82 TCPF_FIN_WAIT2 = (1 << 5),
83 TCPF_TIME_WAIT = (1 << 6),
84 TCPF_CLOSE = (1 << 7),
85 TCPF_CLOSE_WAIT = (1 << 8),
86 TCPF_LAST_ACK = (1 << 9),
87 TCPF_LISTEN = (1 << 10),
88 TCPF_CLOSING = (1 << 11)
89};
@ TCPF_CLOSING
Definition: tcpdef.h:88
@ TCPF_FIN_WAIT2
Definition: tcpdef.h:82
@ TCPF_LAST_ACK
Definition: tcpdef.h:86
@ TCPF_ESTABLISHED
Definition: tcpdef.h:78
@ TCPF_SYN_RECV
Definition: tcpdef.h:80
@ TCPF_SYN_SENT
Definition: tcpdef.h:79
@ TCPF_CLOSE
Definition: tcpdef.h:84
@ TCPF_LISTEN
Definition: tcpdef.h:87
@ TCPF_TIME_WAIT
Definition: tcpdef.h:83
@ TCPF_FIN_WAIT1
Definition: tcpdef.h:81
@ TCPF_CLOSE_WAIT
Definition: tcpdef.h:85

◆ anonymous enum

anonymous enum
Enumerator
TCP_FLAG_CWR 
TCP_FLAG_ECE 
TCP_FLAG_URG 
TCP_FLAG_ACK 
TCP_FLAG_PSH 
TCP_FLAG_RST 
TCP_FLAG_SYN 
TCP_FLAG_FIN 
TCP_RESERVED_BITS 
TCP_DATA_OFFSET 

Definition at line 103 of file tcpdef.h.

103 {
104 TCP_FLAG_CWR = 0x00800000, // __constant_htonl(0x00800000),
105 TCP_FLAG_ECE = 0x00400000, //__constant_htonl(0x00400000),
106 TCP_FLAG_URG = 0x00200000, //__constant_htonl(0x00200000),
107 TCP_FLAG_ACK = 0x00100000, //__constant_htonl(0x00100000),
108 TCP_FLAG_PSH = 0x00080000, //__constant_htonl(0x00080000),
109 TCP_FLAG_RST = 0x00040000, //__constant_htonl(0x00040000),
110 TCP_FLAG_SYN = 0x00020000, //__constant_htonl(0x00020000),
111 TCP_FLAG_FIN = 0x00010000, //__constant_htonl(0x00010000),
112 TCP_RESERVED_BITS = 0x0F000000, //__constant_htonl(0x0F000000),
113 TCP_DATA_OFFSET = 0xF0000000, //__constant_htonl(0xF0000000)
114};
@ TCP_FLAG_RST
Definition: tcpdef.h:109
@ TCP_DATA_OFFSET
Definition: tcpdef.h:113
@ TCP_FLAG_FIN
Definition: tcpdef.h:111
@ TCP_FLAG_PSH
Definition: tcpdef.h:108
@ TCP_FLAG_CWR
Definition: tcpdef.h:104
@ TCP_FLAG_ACK
Definition: tcpdef.h:107
@ TCP_RESERVED_BITS
Definition: tcpdef.h:112
@ TCP_FLAG_ECE
Definition: tcpdef.h:105
@ TCP_FLAG_URG
Definition: tcpdef.h:106
@ TCP_FLAG_SYN
Definition: tcpdef.h:110

◆ anonymous enum

anonymous enum
Enumerator
TCP_ESTABLISHED 
TCP_SYN_SENT 
TCP_SYN_RECV 
TCP_FIN_WAIT1 
TCP_FIN_WAIT2 
TCP_TIME_WAIT 
TCP_CLOSE 
TCP_CLOSE_WAIT 
TCP_LAST_ACK 
TCP_LISTEN 
TCP_CLOSING 
TCP_MAX_STATES 

Definition at line 58 of file tcpdef.h.

58 {
69 TCP_CLOSING, /* now a valid state */
70
71 TCP_MAX_STATES /* Leave at the end! */
72};
@ TCP_ESTABLISHED
Definition: tcpdef.h:59
@ TCP_LISTEN
Definition: tcpdef.h:68
@ TCP_SYN_RECV
Definition: tcpdef.h:61
@ TCP_LAST_ACK
Definition: tcpdef.h:67
@ TCP_CLOSE
Definition: tcpdef.h:65
@ TCP_CLOSE_WAIT
Definition: tcpdef.h:66
@ TCP_CLOSING
Definition: tcpdef.h:69
@ TCP_FIN_WAIT2
Definition: tcpdef.h:63
@ TCP_TIME_WAIT
Definition: tcpdef.h:64
@ TCP_SYN_SENT
Definition: tcpdef.h:60
@ TCP_MAX_STATES
Definition: tcpdef.h:71
@ TCP_FIN_WAIT1
Definition: tcpdef.h:62

◆ tcp_ca_state

Enumerator
TCP_CA_Open 
TCP_CA_Disorder 
TCP_CA_CWR 
TCP_CA_Recovery 
TCP_CA_Loss 

Definition at line 135 of file tcpdef.h.

136{
137 TCP_CA_Open = 0,
138#define TCPF_CA_Open (1<<TCP_CA_Open)
139 TCP_CA_Disorder = 1,
140#define TCPF_CA_Disorder (1<<TCP_CA_Disorder)
141 TCP_CA_CWR = 2,
142#define TCPF_CA_CWR (1<<TCP_CA_CWR)
143 TCP_CA_Recovery = 3,
144#define TCPF_CA_Recovery (1<<TCP_CA_Recovery)
145 TCP_CA_Loss = 4
146#define TCPF_CA_Loss (1<<TCP_CA_Loss)
147};
@ TCP_CA_Open
Definition: tcpdef.h:137
@ TCP_CA_Loss
Definition: tcpdef.h:145
@ TCP_CA_CWR
Definition: tcpdef.h:141
@ TCP_CA_Disorder
Definition: tcpdef.h:139
@ TCP_CA_Recovery
Definition: tcpdef.h:143