Functions | |
UINT16 | TcpGetUint16 (IN UINT8 *Buf) |
UINT32 | TcpGetUint32 (IN UINT8 *Buf) |
VOID | TcpPutUint32 (OUT UINT8 *Buf, IN UINT32 Data) |
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) |
UINT32 | TcpPawsOK (IN TCP_CB *Tcb, IN UINT32 TSVal) |
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
UINT16 TcpBuildOption | ( | IN TCP_CB * | Tcb, | |
IN NET_BUF * | Nbuf | |||
) |
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. |
References mTcpTick, TCP_CTRL_SND_TS, TCP_FLG_ON, TCP_FLG_RST, TCP_OPTION_TS_ALIGNED_LEN, TCP_OPTION_TS_FAST, TcpPutUint32(), and TCPSEG_NETBUF.
Referenced by TcpTransmitSegment().
UINT8 TcpComputeScale | ( | IN TCP_CB * | Tcb | ) |
Compute the window scale value according to the given buffer size.
[in] | Tcb | Pointer to the TCP_CB of this TCP instance. |
References GET_RCV_BUFFSIZE, TCP_OPTION_MAX_WIN, and TCP_OPTION_MAX_WS.
Referenced by TcpInitTcbPeer(), and TcpSynBuildOption().
UINT16 TcpGetUint16 | ( | IN UINT8 * | Buf | ) |
Get a UINT16 value from buffer.
[in] | Buf | Pointer to input buffer. |
Referenced by TcpParseOption().
UINT32 TcpGetUint32 | ( | IN UINT8 * | Buf | ) |
Get a UINT32 value from buffer.
[in] | Buf | Pointer to input buffer. |
Referenced by TcpParseOption().
INTN TcpParseOption | ( | IN TCP_HEAD * | Tcp, | |
IN OUT TCP_OPTION * | Option | |||
) |
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 | Ilegal option was found. |
References TCP_OPTION_EOP, TCP_OPTION_MSS, TCP_OPTION_MSS_LEN, TCP_OPTION_NOP, TCP_OPTION_RCVD_MSS, TCP_OPTION_RCVD_TS, TCP_OPTION_RCVD_WS, TCP_OPTION_TS, TCP_OPTION_TS_ALIGNED_LEN, TCP_OPTION_TS_FAST, TCP_OPTION_TS_LEN, TCP_OPTION_WS, TCP_OPTION_WS_LEN, TCP_SET_FLG, TcpGetUint16(), and TcpGetUint32().
Referenced by TcpInput().
UINT32 TcpPawsOK | ( | IN TCP_CB * | Tcb, | |
IN UINT32 | TSVal | |||
) |
Check the segment against PAWS.
[in] | Tcb | Pointer to the TCP_CB of this TCP instance. |
[in] | TSVal | The timestamp value. |
1 | The segment passed the PAWS check. | |
0 | The segment failed to pass the PAWS check. |
References mTcpTick, TCP_PAWS_24DAY, and TCP_TIME_LT.
VOID TcpPutUint32 | ( | OUT UINT8 * | Buf, | |
IN UINT32 | Data | |||
) |
Put a UINT32 value in buffer.
[out] | Buf | Pointer to the buffer. |
[in] | Data | The UINT32 Date to put in the buffer. |
Referenced by TcpBuildOption(), and TcpSynBuildOption().
UINT16 TcpSynBuildOption | ( | IN TCP_CB * | Tcb, | |
IN NET_BUF * | Nbuf | |||
) |
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. |
References mTcpTick, TCP_CTRL_NO_TS, TCP_CTRL_NO_WS, TCP_CTRL_RCVD_TS, TCP_CTRL_RCVD_WS, TCP_FLG_ACK, TCP_FLG_ON, TCP_OPTION_MSS_FAST, TCP_OPTION_MSS_LEN, TCP_OPTION_TS_ALIGNED_LEN, TCP_OPTION_TS_FAST, TCP_OPTION_WS_ALIGNED_LEN, TCP_OPTION_WS_FAST, TcpComputeScale(), TcpPutUint32(), and TCPSEG_NETBUF.
Referenced by TcpTransmitSegment().