/** @file
Tcp option's routine header file.
Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>
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
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _TCP4_OPTION_H_
#define _TCP4_OPTION_H_
///
/// The structure to store the parse option value.
/// ParseOption only parse the options, don't process them.
///
typedef struct _TCP_OPTION {
} TCP_OPTION;
//
// supported TCP option type and their length
//
//
// recommend format of timestamp window scale
// option for fast process.
//
(TCP_OPTION_NOP << 16) | \
(TCP_OPTION_TS << 8) | \
(TCP_OPTION_WS << 16) | \
(TCP_OPTION_WS_LEN << 8))
//
// Other misc definations
//
/**
Compute the window scale value according to the given buffer size.
@param Tcb Pointer to the TCP_CB of this TCP instance.
@return The scale value.
**/
);
/**
Build the TCP option in three-way handshake.
@param Tcb Pointer to the TCP_CB of this TCP instance.
@param Nbuf Pointer to the buffer to store the options.
@return The total length of the TCP option field.
**/
);
/**
Build the TCP option in synchronized states.
@param Tcb Pointer to the TCP_CB of this TCP instance.
@param Nbuf Pointer to the buffer to store the options.
@return The total length of the TCP option field.
**/
);
/**
Parse the supported options.
@param Tcp Pointer to the TCP_CB of this TCP instance.
@param Option Pointer to the TCP_OPTION used to store the successfully pasrsed
options.
@retval 0 The options are successfully pasrsed.
@retval -1 Ilegal option was found.
**/
);
/**
Check the segment against PAWS.
@param Tcb Pointer to the TCP_CB of this TCP instance.
@param TSVal The timestamp value.
@retval 1 The segment passed the PAWS check.
@retval 0 The segment failed to pass the PAWS check.
**/
);
#endif