EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index
Data Structures | Defines | Typedefs | Functions

MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.h File Reference

Go to the source code of this file.

Data Structures

struct  _TCP_OPTION

Defines

#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
 Maxium 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)
UINT32 TcpPawsOK (IN TCP_CB *Tcb, IN UINT32 TSVal)

Detailed Description

Tcp option's routine header file.

Copyright (c) 2005 - 2009, 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.

Definition in file Tcp4Option.h.


Define Documentation

#define TCP_OPTION_EOP   0

End Of oPtion.

Definition at line 33 of file Tcp4Option.h.

#define TCP_OPTION_MAX_WIN   0xffff

Max window size in TCP header.

Definition at line 66 of file Tcp4Option.h.

#define TCP_OPTION_MAX_WS   14

Maxium window scale value.

Definition at line 65 of file Tcp4Option.h.

#define TCP_OPTION_MSS   2

Maximum Segment Size.

Definition at line 35 of file Tcp4Option.h.

#define TCP_OPTION_MSS_FAST   ((TCP_OPTION_MSS << 24) | (TCP_OPTION_MSS_LEN << 16))

Definition at line 57 of file Tcp4Option.h.

#define TCP_OPTION_MSS_LEN   4

Length of MSS option.

Definition at line 38 of file Tcp4Option.h.

#define TCP_OPTION_NOP   1

No-Option.

Definition at line 34 of file Tcp4Option.h.

#define TCP_OPTION_RCVD_MSS   0x01

Definition at line 62 of file Tcp4Option.h.

#define TCP_OPTION_RCVD_TS   0x04

Definition at line 64 of file Tcp4Option.h.

#define TCP_OPTION_RCVD_WS   0x02

Definition at line 63 of file Tcp4Option.h.

#define TCP_OPTION_TS   8

Timestamp.

Definition at line 37 of file Tcp4Option.h.

#define TCP_OPTION_TS_ALIGNED_LEN   12

Length of timestamp option, aligned.

Definition at line 42 of file Tcp4Option.h.

#define TCP_OPTION_TS_FAST
Value:
((TCP_OPTION_NOP << 24) | \
                            (TCP_OPTION_NOP << 16) | \
                            (TCP_OPTION_TS << 8)   | \
                            (TCP_OPTION_TS_LEN))

Definition at line 48 of file Tcp4Option.h.

#define TCP_OPTION_TS_LEN   10

Length of timestamp option.

Definition at line 40 of file Tcp4Option.h.

#define TCP_OPTION_WS   3

Window scale.

Definition at line 36 of file Tcp4Option.h.

#define TCP_OPTION_WS_ALIGNED_LEN   4

Length of window scale option, aligned.

Definition at line 41 of file Tcp4Option.h.

#define TCP_OPTION_WS_FAST
Value:
((TCP_OPTION_NOP << 24) | \
                              (TCP_OPTION_WS << 16)  | \
                              (TCP_OPTION_WS_LEN << 8))

Definition at line 53 of file Tcp4Option.h.

#define TCP_OPTION_WS_LEN   3

Length of window scale option.

Definition at line 39 of file Tcp4Option.h.


Typedef Documentation

typedef struct _TCP_OPTION TCP_OPTION

The structure to store the parse option value. ParseOption only parse the options, don't process them.


Function Documentation

UINT16 TcpBuildOption ( IN TCP_CB Tcb,
IN NET_BUF Nbuf 
)

Build the TCP option in synchronized states.

Parameters:
TcbPointer to the TCP_CB of this TCP instance.
NbufPointer to the buffer to store the options.
Returns:
The total length of the TCP option field.

Build the TCP option in synchronized states.

Parameters:
[in]TcbPointer to the TCP_CB of this TCP instance.
[in]NbufPointer to the buffer to store the options.
Returns:
The total length of the TCP option field.

Definition at line 191 of file Tcp4Option.c.

UINT8 TcpComputeScale ( IN TCP_CB Tcb)

Compute the window scale value according to the given buffer size.

Parameters:
TcbPointer to the TCP_CB of this TCP instance.
Returns:
The scale value.

Compute the window scale value according to the given buffer size.

Parameters:
[in]TcbPointer to the TCP_CB of this TCP instance.
Returns:
The scale value.

Definition at line 80 of file Tcp4Option.c.

INTN TcpParseOption ( IN TCP_HEAD Tcp,
IN OUT TCP_OPTION Option 
)

Parse the supported options.

Parameters:
TcpPointer to the TCP_CB of this TCP instance.
OptionPointer to the TCP_OPTION used to store the successfully pasrsed options.
Return values:
0The options are successfully pasrsed.
-1Ilegal option was found.

Parse the supported options.

Parameters:
[in]TcpPointer to the TCP_CB of this TCP instance.
[in,out]OptionPointer to the TCP_OPTION used to store the successfully pasrsed options.
Return values:
0The options are successfully pasrsed.
-1Ilegal option was found.

Definition at line 238 of file Tcp4Option.c.

UINT32 TcpPawsOK ( IN TCP_CB Tcb,
IN UINT32  TSVal 
)

Check the segment against PAWS.

Parameters:
TcbPointer to the TCP_CB of this TCP instance.
TSValThe timestamp value.
Return values:
1The segment passed the PAWS check.
0The segment failed to pass the PAWS check.

Check the segment against PAWS.

Parameters:
[in]TcbPointer to the TCP_CB of this TCP instance.
[in]TSValThe timestamp value.
Return values:
1The segment passed the PAWS check.
0The segment failed to pass the PAWS check.

Definition at line 364 of file Tcp4Option.c.

UINT16 TcpSynBuildOption ( IN TCP_CB Tcb,
IN NET_BUF Nbuf 
)

Build the TCP option in three-way handshake.

Parameters:
TcbPointer to the TCP_CB of this TCP instance.
NbufPointer to the buffer to store the options.
Returns:
The total length of the TCP option field.

Build the TCP option in three-way handshake.

Parameters:
[in]TcbPointer to the TCP_CB of this TCP instance.
[in]NbufPointer to the buffer to store the options.
Returns:
The total length of the TCP option field.

Definition at line 112 of file Tcp4Option.c.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines