TianoCore EDK2 master
|
Go to the source code of this file.
Data Structures | |
struct | _TCP_OPTION |
Macros | |
#define | TCP_OPTION_EOP 0 |
End Of oPtion. | |
#define | TCP_OPTION_NOP 1 |
No-Option. | |
#define | TCP_OPTION_MSS 2 |
Maximum Segment Size. | |
#define | TCP_OPTION_WS 3 |
Window scale. | |
#define | TCP_OPTION_TS 8 |
Timestamp. | |
#define | TCP_OPTION_MSS_LEN 4 |
Length of MSS option. | |
#define | TCP_OPTION_WS_LEN 3 |
Length of window scale option. | |
#define | TCP_OPTION_TS_LEN 10 |
Length of timestamp option. | |
#define | TCP_OPTION_WS_ALIGNED_LEN 4 |
Length of window scale option, aligned. | |
#define | TCP_OPTION_TS_ALIGNED_LEN 12 |
Length of timestamp option, aligned. | |
#define | TCP_OPTION_TS_FAST |
#define | TCP_OPTION_WS_FAST |
#define | TCP_OPTION_MSS_FAST ((TCP_OPTION_MSS << 24) | (TCP_OPTION_MSS_LEN << 16)) |
#define | TCP_OPTION_RCVD_MSS 0x01 |
#define | TCP_OPTION_RCVD_WS 0x02 |
#define | TCP_OPTION_RCVD_TS 0x04 |
#define | TCP_OPTION_MAX_WS 14 |
Maximum window scale value. | |
#define | TCP_OPTION_MAX_WIN 0xffff |
Max window size in TCP header. | |
Typedefs | |
typedef struct _TCP_OPTION | TCP_OPTION |
Functions | |
UINT8 | TcpComputeScale (IN TCP_CB *Tcb) |
UINT16 | TcpSynBuildOption (IN TCP_CB *Tcb, IN NET_BUF *Nbuf) |
UINT16 | TcpBuildOption (IN TCP_CB *Tcb, IN NET_BUF *Nbuf) |
INTN | TcpParseOption (IN TCP_HEAD *Tcp, IN OUT TCP_OPTION *Option) |
Tcp option's routine header file.
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file TcpOption.h.
#define TCP_OPTION_EOP 0 |
End Of oPtion.
Definition at line 16 of file TcpOption.h.
#define TCP_OPTION_MAX_WIN 0xffff |
Max window size in TCP header.
Definition at line 49 of file TcpOption.h.
#define TCP_OPTION_MAX_WS 14 |
Maximum window scale value.
Definition at line 48 of file TcpOption.h.
#define TCP_OPTION_MSS 2 |
Maximum Segment Size.
Definition at line 18 of file TcpOption.h.
#define TCP_OPTION_MSS_FAST ((TCP_OPTION_MSS << 24) | (TCP_OPTION_MSS_LEN << 16)) |
Definition at line 40 of file TcpOption.h.
#define TCP_OPTION_MSS_LEN 4 |
Length of MSS option.
Definition at line 21 of file TcpOption.h.
#define TCP_OPTION_NOP 1 |
No-Option.
Definition at line 17 of file TcpOption.h.
#define TCP_OPTION_RCVD_MSS 0x01 |
Definition at line 45 of file TcpOption.h.
#define TCP_OPTION_RCVD_TS 0x04 |
Definition at line 47 of file TcpOption.h.
#define TCP_OPTION_RCVD_WS 0x02 |
Definition at line 46 of file TcpOption.h.
#define TCP_OPTION_TS 8 |
Timestamp.
Definition at line 20 of file TcpOption.h.
#define TCP_OPTION_TS_ALIGNED_LEN 12 |
Length of timestamp option, aligned.
Definition at line 25 of file TcpOption.h.
#define TCP_OPTION_TS_FAST |
Definition at line 31 of file TcpOption.h.
#define TCP_OPTION_TS_LEN 10 |
Length of timestamp option.
Definition at line 23 of file TcpOption.h.
#define TCP_OPTION_WS 3 |
Window scale.
Definition at line 19 of file TcpOption.h.
#define TCP_OPTION_WS_ALIGNED_LEN 4 |
Length of window scale option, aligned.
Definition at line 24 of file TcpOption.h.
#define TCP_OPTION_WS_FAST |
Definition at line 36 of file TcpOption.h.
#define TCP_OPTION_WS_LEN 3 |
Length of window scale option.
Definition at line 22 of file TcpOption.h.
typedef struct _TCP_OPTION TCP_OPTION |
The structure to store the parse option value. ParseOption only parses the options, doesn't process them.
Build the TCP option in synchronized states.
[in] | Tcb | Pointer to the TCP_CB of this TCP instance. |
[in] | Nbuf | Pointer to the buffer to store the options. |
Definition at line 185 of file TcpOption.c.
Compute the window scale value according to the given buffer size.
[in] | Tcb | Pointer to the TCP_CB of this TCP instance. |
Definition at line 76 of file TcpOption.c.
Parse the supported options.
[in] | Tcp | Pointer to the TCP_CB of this TCP instance. |
[in,out] | Option | Pointer to the TCP_OPTION used to store the successfully pasrsed options. |
0 | The options successfully pasrsed. |
-1 | Illegal option was found. |
Parse the supported options.
[in] | Tcp | Pointer to the TCP_CB of this TCP instance. |
[in,out] | Option | Pointer to the TCP_OPTION used to store the successfully pasrsed options. |
0 | The options are successfully pasrsed. |
-1 | Illegal option was found. |
Definition at line 232 of file TcpOption.c.
Build the TCP option in three-way handshake.
[in] | Tcb | Pointer to the TCP_CB of this TCP instance. |
[in] | Nbuf | Pointer to the buffer to store the options. |
Definition at line 105 of file TcpOption.c.