TianoCore EDK2 master
|
Go to the source code of this file.
Data Structures | |
struct | _TCP_SEG |
struct | _TCP_PEER |
struct | _TCP_CONTROL_BLOCK |
Macros | |
#define | TCP_CLOSED 0 |
#define | TCP_LISTEN 1 |
#define | TCP_SYN_SENT 2 |
#define | TCP_SYN_RCVD 3 |
#define | TCP_ESTABLISHED 4 |
#define | TCP_FIN_WAIT_1 5 |
#define | TCP_FIN_WAIT_2 6 |
#define | TCP_CLOSING 7 |
#define | TCP_TIME_WAIT 8 |
#define | TCP_CLOSE_WAIT 9 |
#define | TCP_LAST_ACK 10 |
#define | TCP_FLG_FIN 0x01 |
#define | TCP_FLG_SYN 0x02 |
#define | TCP_FLG_RST 0x04 |
#define | TCP_FLG_PSH 0x08 |
#define | TCP_FLG_ACK 0x10 |
#define | TCP_FLG_URG 0x20 |
#define | TCP_FLG_FLAG 0x3F |
#define | TCP_CONNECT_REFUSED (-1) |
TCP error status. | |
#define | TCP_CONNECT_RESET (-2) |
TCP error status. | |
#define | TCP_CONNECT_CLOSED (-3) |
TCP error status. | |
#define | TCP_CONGEST_RECOVER 1 |
During the NewReno fast recovery. | |
#define | TCP_CONGEST_LOSS 2 |
Retxmit because of retxmit time out. | |
#define | TCP_CONGEST_OPEN 3 |
TCP is opening its congestion window. | |
#define | TCP_CTRL_NO_NAGLE 0x0001 |
Disable Nagle algorithm. | |
#define | TCP_CTRL_NO_KEEPALIVE 0x0002 |
Disable keepalive timer. | |
#define | TCP_CTRL_NO_WS 0x0004 |
Disable window scale option. | |
#define | TCP_CTRL_RCVD_WS 0x0008 |
Received a wnd scale option in syn. | |
#define | TCP_CTRL_NO_TS 0x0010 |
Disable Timestamp option. | |
#define | TCP_CTRL_RCVD_TS 0x0020 |
Received a Timestamp option in syn. | |
#define | TCP_CTRL_SND_TS 0x0040 |
Send Timestamp option to remote. | |
#define | TCP_CTRL_SND_URG 0x0080 |
In urgent send mode. | |
#define | TCP_CTRL_RCVD_URG 0x0100 |
In urgent receive mode. | |
#define | TCP_CTRL_SND_PSH 0x0200 |
In PUSH send mode. | |
#define | TCP_CTRL_FIN_SENT 0x0400 |
FIN is sent. | |
#define | TCP_CTRL_FIN_ACKED 0x0800 |
FIN is ACKed. | |
#define | TCP_CTRL_TIMER_ON 0x1000 |
At least one of the timer is on. | |
#define | TCP_CTRL_RTT_ON 0x2000 |
The RTT measurement is on. | |
#define | TCP_CTRL_ACK_NOW 0x4000 |
Send the ACK now, don't delay. | |
#define | TCP_TIMER_CONNECT 0 |
Connection establishment timer. | |
#define | TCP_TIMER_REXMIT 1 |
Retransmit timer. | |
#define | TCP_TIMER_PROBE 2 |
Window probe timer. | |
#define | TCP_TIMER_KEEPALIVE 3 |
Keepalive timer. | |
#define | TCP_TIMER_FINWAIT2 4 |
FIN_WAIT_2 timer. | |
#define | TCP_TIMER_2MSL 5 |
TIME_WAIT timer. | |
#define | TCP_TIMER_NUMBER 6 |
The total number of the TCP timer. | |
#define | TCP_TICK 200 |
Every TCP tick is 200ms. | |
#define | TCP_TICK_HZ 5 |
The frequence of TCP tick. | |
#define | TCP_RTT_SHIFT 3 |
SRTT & RTTVAR scaled by 8. | |
#define | TCP_RTO_MIN TCP_TICK_HZ |
The minimum value of RTO. | |
#define | TCP_RTO_MAX (TCP_TICK_HZ * 60) |
The maximum value of RTO. | |
#define | TCP_FOLD_RTT 4 |
Timeout threshold to fold RTT. | |
#define | TCP_MAX_LOSS 12 |
Default max times to retxmit. | |
#define | TCP_KEEPALIVE_IDLE_MIN (TCP_TICK_HZ * 60 * 60 * 2) |
First keepalive. | |
#define | TCP_KEEPALIVE_PERIOD (TCP_TICK_HZ * 60) |
#define | TCP_MAX_KEEPALIVE 8 |
#define | TCP_FIN_WAIT2_TIME (2 * TCP_TICK_HZ) |
#define | TCP_TIME_WAIT_TIME (2 * TCP_TICK_HZ) |
#define | TCP_PAWS_24DAY (24 * 24 * 60 * 60 * TCP_TICK_HZ) |
#define | TCP_CONNECT_TIME (75 * TCP_TICK_HZ) |
#define | TCP_MAX_HEAD 192 |
#define | TCP_RCV_BUF_SIZE (2 * 1024 * 1024) |
#define | TCP_RCV_BUF_SIZE_MIN (8 * 1024) |
#define | TCP_SND_BUF_SIZE (2 * 1024 * 1024) |
#define | TCP_SND_BUF_SIZE_MIN (8 * 1024) |
#define | TCP_BACKLOG 10 |
#define | TCP_BACKLOG_MIN 5 |
#define | TCP_MAX_LOSS_MIN 6 |
#define | TCP_CONNECT_TIME_MIN (60 * TCP_TICK_HZ) |
#define | TCP_MAX_KEEPALIVE_MIN 4 |
#define | TCP_KEEPALIVE_IDLE_MAX (TCP_TICK_HZ * 60 * 60 * 4) |
#define | TCP_KEEPALIVE_PERIOD_MIN (TCP_TICK_HZ * 30) |
#define | TCP_FIN_WAIT2_TIME_MAX (4 * TCP_TICK_HZ) |
#define | TCP_TIME_WAIT_TIME_MAX (60 * TCP_TICK_HZ) |
#define | TCP_CONNECTED(state) ((state) > TCP_SYN_RCVD) |
#define | TCP_FIN_RCVD(State) |
#define | TCP_LOCAL_CLOSED(State) |
#define | TCPSEG_NETBUF(NBuf) ((TCP_SEG *) ((NBuf)->ProtoData)) |
#define | TCP_SEQ_LT(SeqA, SeqB) ((INT32) ((SeqA) - (SeqB)) < 0) |
#define | TCP_SEQ_LEQ(SeqA, SeqB) ((INT32) ((SeqA) - (SeqB)) <= 0) |
#define | TCP_SEQ_GT(SeqA, SeqB) ((INT32) ((SeqB) - (SeqA)) < 0) |
#define | TCP_SEQ_GEQ(SeqA, SeqB) ((INT32) ((SeqB) - (SeqA)) <= 0) |
#define | TCP_SEQ_BETWEEN(b, m, e) ((e) - (b) >= (m) - (b)) |
#define | TCP_SUB_SEQ(Seq1, Seq2) ((UINT32) ((Seq1) - (Seq2))) |
#define | TCP_FLG_ON(Value, Flag) ((BOOLEAN) (((Value) & (Flag)) != 0)) |
#define | TCP_SET_FLG(Value, Flag) ((Value) |= (Flag)) |
#define | TCP_CLEAR_FLG(Value, Flag) ((Value) &= ~(Flag)) |
#define | TCP_PEER_EQUAL(Pa, Pb, Ver) (((Pa)->Port == (Pb)->Port) && TcpIsIpEqual(&((Pa)->Ip), &((Pb)->Ip), Ver)) |
#define | TCP_PEER_MATCH(Pa, Pb, Ver) |
#define | TCP_TIMER_ON(Flag, Timer) ((Flag) & (1 << (Timer))) |
#define | TCP_SET_TIMER(Flag, Timer) ((Flag) = (UINT16) ((Flag) | (1 << (Timer)))) |
#define | TCP_CLEAR_TIMER(Flag, Timer) ((Flag) = (UINT16) ((Flag) & (~(1 << (Timer))))) |
#define | TCP_TIME_LT(Ta, Tb) ((INT32) ((Ta) - (Tb)) < 0) |
#define | TCP_TIME_LEQ(Ta, Tb) ((INT32) ((Ta) - (Tb)) <= 0) |
#define | TCP_SUB_TIME(Ta, Tb) ((UINT32) ((Ta) - (Tb))) |
#define | TCP_MAX_WIN 0xFFFFU |
Typedefs | |
typedef struct _TCP_SEG | TCP_SEG |
typedef struct _TCP_PEER | TCP_PEER |
typedef struct _TCP_CONTROL_BLOCK | TCP_CB |
TCP protocol header file.
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file TcpProto.h.
#define TCP_BACKLOG 10 |
Definition at line 116 of file TcpProto.h.
#define TCP_BACKLOG_MIN 5 |
Definition at line 117 of file TcpProto.h.
#define TCP_CLEAR_FLG | ( | Value, | |
Flag | |||
) | ((Value) &= ~(Flag)) |
Definition at line 179 of file TcpProto.h.
#define TCP_CLEAR_TIMER | ( | Flag, | |
Timer | |||
) | ((Flag) = (UINT16) ((Flag) & (~(1 << (Timer))))) |
Definition at line 199 of file TcpProto.h.
#define TCP_CLOSE_WAIT 9 |
Definition at line 26 of file TcpProto.h.
#define TCP_CLOSED 0 |
Tcp states don't change their order. It is used as an index to mTcpOutFlag and other macros.
Definition at line 17 of file TcpProto.h.
#define TCP_CLOSING 7 |
Definition at line 24 of file TcpProto.h.
#define TCP_CONGEST_LOSS 2 |
Retxmit because of retxmit time out.
Definition at line 52 of file TcpProto.h.
#define TCP_CONGEST_OPEN 3 |
TCP is opening its congestion window.
Definition at line 53 of file TcpProto.h.
#define TCP_CONGEST_RECOVER 1 |
During the NewReno fast recovery.
Definition at line 51 of file TcpProto.h.
#define TCP_CONNECT_CLOSED (-3) |
TCP error status.
Definition at line 46 of file TcpProto.h.
#define TCP_CONNECT_REFUSED (-1) |
TCP error status.
Definition at line 44 of file TcpProto.h.
#define TCP_CONNECT_RESET (-2) |
TCP error status.
Definition at line 45 of file TcpProto.h.
#define TCP_CONNECT_TIME (75 * TCP_TICK_HZ) |
Definition at line 101 of file TcpProto.h.
#define TCP_CONNECT_TIME_MIN (60 * TCP_TICK_HZ) |
Definition at line 119 of file TcpProto.h.
#define TCP_CONNECTED | ( | state | ) | ((state) > TCP_SYN_RCVD) |
TCP_CONNECTED: both ends have synchronized their ISN.
Definition at line 129 of file TcpProto.h.
#define TCP_CTRL_ACK_NOW 0x4000 |
Send the ACK now, don't delay.
Definition at line 72 of file TcpProto.h.
#define TCP_CTRL_FIN_ACKED 0x0800 |
FIN is ACKed.
Definition at line 69 of file TcpProto.h.
#define TCP_CTRL_FIN_SENT 0x0400 |
FIN is sent.
Definition at line 68 of file TcpProto.h.
#define TCP_CTRL_NO_KEEPALIVE 0x0002 |
Disable keepalive timer.
Definition at line 59 of file TcpProto.h.
#define TCP_CTRL_NO_NAGLE 0x0001 |
Disable Nagle algorithm.
Definition at line 58 of file TcpProto.h.
#define TCP_CTRL_NO_TS 0x0010 |
Disable Timestamp option.
Definition at line 62 of file TcpProto.h.
#define TCP_CTRL_NO_WS 0x0004 |
Disable window scale option.
Definition at line 60 of file TcpProto.h.
#define TCP_CTRL_RCVD_TS 0x0020 |
Received a Timestamp option in syn.
Definition at line 63 of file TcpProto.h.
#define TCP_CTRL_RCVD_URG 0x0100 |
In urgent receive mode.
Definition at line 66 of file TcpProto.h.
#define TCP_CTRL_RCVD_WS 0x0008 |
Received a wnd scale option in syn.
Definition at line 61 of file TcpProto.h.
#define TCP_CTRL_RTT_ON 0x2000 |
The RTT measurement is on.
Definition at line 71 of file TcpProto.h.
#define TCP_CTRL_SND_PSH 0x0200 |
In PUSH send mode.
Definition at line 67 of file TcpProto.h.
#define TCP_CTRL_SND_TS 0x0040 |
Send Timestamp option to remote.
Definition at line 64 of file TcpProto.h.
#define TCP_CTRL_SND_URG 0x0080 |
In urgent send mode.
Definition at line 65 of file TcpProto.h.
#define TCP_CTRL_TIMER_ON 0x1000 |
At least one of the timer is on.
Definition at line 70 of file TcpProto.h.
#define TCP_ESTABLISHED 4 |
Definition at line 21 of file TcpProto.h.
#define TCP_FIN_RCVD | ( | State | ) |
Definition at line 131 of file TcpProto.h.
#define TCP_FIN_WAIT2_TIME (2 * TCP_TICK_HZ) |
Definition at line 98 of file TcpProto.h.
#define TCP_FIN_WAIT2_TIME_MAX (4 * TCP_TICK_HZ) |
Definition at line 123 of file TcpProto.h.
#define TCP_FIN_WAIT_1 5 |
Definition at line 22 of file TcpProto.h.
#define TCP_FIN_WAIT_2 6 |
Definition at line 23 of file TcpProto.h.
#define TCP_FLG_ACK 0x10 |
Definition at line 36 of file TcpProto.h.
#define TCP_FLG_FIN 0x01 |
Flags in the TCP header
Definition at line 32 of file TcpProto.h.
#define TCP_FLG_FLAG 0x3F |
Definition at line 42 of file TcpProto.h.
#define TCP_FLG_ON | ( | Value, | |
Flag | |||
) | ((BOOLEAN) (((Value) & (Flag)) != 0)) |
Definition at line 174 of file TcpProto.h.
#define TCP_FLG_PSH 0x08 |
Definition at line 35 of file TcpProto.h.
#define TCP_FLG_RST 0x04 |
Definition at line 34 of file TcpProto.h.
#define TCP_FLG_SYN 0x02 |
Definition at line 33 of file TcpProto.h.
#define TCP_FLG_URG 0x20 |
Definition at line 37 of file TcpProto.h.
#define TCP_FOLD_RTT 4 |
Timeout threshold to fold RTT.
Definition at line 89 of file TcpProto.h.
#define TCP_KEEPALIVE_IDLE_MAX (TCP_TICK_HZ * 60 * 60 * 4) |
Definition at line 121 of file TcpProto.h.
#define TCP_KEEPALIVE_IDLE_MIN (TCP_TICK_HZ * 60 * 60 * 2) |
First keepalive.
Definition at line 95 of file TcpProto.h.
#define TCP_KEEPALIVE_PERIOD (TCP_TICK_HZ * 60) |
Definition at line 96 of file TcpProto.h.
#define TCP_KEEPALIVE_PERIOD_MIN (TCP_TICK_HZ * 30) |
Definition at line 122 of file TcpProto.h.
#define TCP_LAST_ACK 10 |
Definition at line 27 of file TcpProto.h.
#define TCP_LISTEN 1 |
Definition at line 18 of file TcpProto.h.
#define TCP_LOCAL_CLOSED | ( | State | ) |
Definition at line 139 of file TcpProto.h.
#define TCP_MAX_HEAD 192 |
Definition at line 107 of file TcpProto.h.
#define TCP_MAX_KEEPALIVE 8 |
Definition at line 97 of file TcpProto.h.
#define TCP_MAX_KEEPALIVE_MIN 4 |
Definition at line 120 of file TcpProto.h.
#define TCP_MAX_LOSS 12 |
Default max times to retxmit.
Definition at line 94 of file TcpProto.h.
#define TCP_MAX_LOSS_MIN 6 |
Definition at line 118 of file TcpProto.h.
#define TCP_MAX_WIN 0xFFFFU |
Definition at line 205 of file TcpProto.h.
#define TCP_PAWS_24DAY (24 * 24 * 60 * 60 * TCP_TICK_HZ) |
Definition at line 100 of file TcpProto.h.
#define TCP_PEER_EQUAL | ( | Pa, | |
Pb, | |||
Ver | |||
) | (((Pa)->Port == (Pb)->Port) && TcpIsIpEqual(&((Pa)->Ip), &((Pb)->Ip), Ver)) |
Definition at line 184 of file TcpProto.h.
#define TCP_PEER_MATCH | ( | Pa, | |
Pb, | |||
Ver | |||
) |
Definition at line 191 of file TcpProto.h.
#define TCP_RCV_BUF_SIZE (2 * 1024 * 1024) |
Definition at line 112 of file TcpProto.h.
#define TCP_RCV_BUF_SIZE_MIN (8 * 1024) |
Definition at line 113 of file TcpProto.h.
#define TCP_RTO_MAX (TCP_TICK_HZ * 60) |
The maximum value of RTO.
Definition at line 88 of file TcpProto.h.
#define TCP_RTO_MIN TCP_TICK_HZ |
The minimum value of RTO.
Definition at line 87 of file TcpProto.h.
#define TCP_RTT_SHIFT 3 |
SRTT & RTTVAR scaled by 8.
Definition at line 86 of file TcpProto.h.
#define TCP_SEQ_BETWEEN | ( | b, | |
m, | |||
e | |||
) | ((e) - (b) >= (m) - (b)) |
Definition at line 164 of file TcpProto.h.
#define TCP_SEQ_GEQ | ( | SeqA, | |
SeqB | |||
) | ((INT32) ((SeqB) - (SeqA)) <= 0) |
Definition at line 159 of file TcpProto.h.
#define TCP_SEQ_GT | ( | SeqA, | |
SeqB | |||
) | ((INT32) ((SeqB) - (SeqA)) < 0) |
Definition at line 158 of file TcpProto.h.
#define TCP_SEQ_LEQ | ( | SeqA, | |
SeqB | |||
) | ((INT32) ((SeqA) - (SeqB)) <= 0) |
Definition at line 157 of file TcpProto.h.
#define TCP_SEQ_LT | ( | SeqA, | |
SeqB | |||
) | ((INT32) ((SeqA) - (SeqB)) < 0) |
Definition at line 156 of file TcpProto.h.
#define TCP_SET_FLG | ( | Value, | |
Flag | |||
) | ((Value) |= (Flag)) |
Definition at line 178 of file TcpProto.h.
#define TCP_SET_TIMER | ( | Flag, | |
Timer | |||
) | ((Flag) = (UINT16) ((Flag) | (1 << (Timer)))) |
Definition at line 198 of file TcpProto.h.
#define TCP_SND_BUF_SIZE (2 * 1024 * 1024) |
Definition at line 114 of file TcpProto.h.
#define TCP_SND_BUF_SIZE_MIN (8 * 1024) |
Definition at line 115 of file TcpProto.h.
#define TCP_SUB_SEQ | ( | Seq1, | |
Seq2 | |||
) | ((UINT32) ((Seq1) - (Seq2))) |
Definition at line 169 of file TcpProto.h.
#define TCP_SUB_TIME | ( | Ta, | |
Tb | |||
) | ((UINT32) ((Ta) - (Tb))) |
Definition at line 203 of file TcpProto.h.
#define TCP_SYN_RCVD 3 |
Definition at line 20 of file TcpProto.h.
#define TCP_SYN_SENT 2 |
Definition at line 19 of file TcpProto.h.
#define TCP_TICK 200 |
Every TCP tick is 200ms.
Definition at line 84 of file TcpProto.h.
#define TCP_TICK_HZ 5 |
The frequence of TCP tick.
Definition at line 85 of file TcpProto.h.
#define TCP_TIME_LEQ | ( | Ta, | |
Tb | |||
) | ((INT32) ((Ta) - (Tb)) <= 0) |
Definition at line 202 of file TcpProto.h.
#define TCP_TIME_LT | ( | Ta, | |
Tb | |||
) | ((INT32) ((Ta) - (Tb)) < 0) |
Definition at line 201 of file TcpProto.h.
#define TCP_TIME_WAIT 8 |
Definition at line 25 of file TcpProto.h.
#define TCP_TIME_WAIT_TIME (2 * TCP_TICK_HZ) |
Definition at line 99 of file TcpProto.h.
#define TCP_TIME_WAIT_TIME_MAX (60 * TCP_TICK_HZ) |
Definition at line 124 of file TcpProto.h.
#define TCP_TIMER_2MSL 5 |
TIME_WAIT timer.
Definition at line 82 of file TcpProto.h.
#define TCP_TIMER_CONNECT 0 |
Connection establishment timer.
Definition at line 77 of file TcpProto.h.
#define TCP_TIMER_FINWAIT2 4 |
FIN_WAIT_2 timer.
Definition at line 81 of file TcpProto.h.
#define TCP_TIMER_KEEPALIVE 3 |
Keepalive timer.
Definition at line 80 of file TcpProto.h.
#define TCP_TIMER_NUMBER 6 |
The total number of the TCP timer.
Definition at line 83 of file TcpProto.h.
#define TCP_TIMER_ON | ( | Flag, | |
Timer | |||
) | ((Flag) & (1 << (Timer))) |
Definition at line 197 of file TcpProto.h.
#define TCP_TIMER_PROBE 2 |
Window probe timer.
Definition at line 79 of file TcpProto.h.
#define TCP_TIMER_REXMIT 1 |
Retransmit timer.
Definition at line 78 of file TcpProto.h.
#define TCPSEG_NETBUF | ( | NBuf | ) | ((TCP_SEG *) ((NBuf)->ProtoData)) |
Definition at line 151 of file TcpProto.h.
typedef struct _TCP_CONTROL_BLOCK TCP_CB |
Definition at line 227 of file TcpProto.h.