📄 tcptrans.h
字号:
/** Copyright (c) 1998-2001 by NETsilicon Inc.** This software is copyrighted by and is the sole property of* NETsilicon. All rights, title, ownership, or other interests* in the software remain the property of NETsilicon. This* software may only be used in accordance with the corresponding* license agreement. Any unauthorized use, duplication, transmission,* distribution, or disclosure of this software is expressly forbidden.** This Copyright notice may not be removed or modified without prior* written consent of NETsilicon.** NETsilicon, reserves the right to modify this software* without notice.** NETsilicon* 411 Waverley Oaks Road USA 781.647.1234* Suite 227 http://www.netsilicon.com* Waltham, MA 02452 AmericaSales@netsilicon.com*************************************************************************** $Name: Fusion 6.52 Fusion 6.51 $* $Date: 2001/12/19 14:44:27 $* $Source: M:/psisrc/stack/incl/rcs/tcptrans.h $* $Revision: 1.1 $*************************************************************************** File Description: TCP (Transmission Control Protocol) for transaction TCP***************************************************************************/#ifndef _TCPTRANS_#define _TCPTRANS_#ifdef TCP_TRANSACTION_TCP/***********************************************************//* data structure for per-foreign-host cache entry */typedef struct _t_tcp_fh_cache_entry_ { int ce_ttl; /* number of seconds before this entry becomes available for use/reuse -- a zero means that it is available for use or reuse */ u32 ce_hostaddr; /* The IP address of this host -- host order */ u32 ce_cc; /* The last connection count received from this host */ u32 ce_ccsent; /* The last connection count we sent to this host */ u32 ce_init_cwnd; /* The initial send window for connections to this host (initialized at 4K, adjusted according to what happens during transactions with this host */#define T_TCP_CWND_DEFAULT 4096 u16 ce_mss; /* The last mss option value we received from this host */ u32 ce_srtt; /* The measured (smoothed) round trip time as of the end of the last connection with this host. Transaction TCP remembers round-trip time measurments across connections with a host */} t_tcp_cache_entry_;#ifndef T_TCP_DEFAULT_CACHE_SIZE_LIMIT#define T_TCP_DEFAULT_CACHE_SIZE_LIMIT 20#endif#ifndef T_TCP_CACHE_ENTRY_LIFETIME#define T_TCP_CACHE_ENTRY_LIFETIME 60#endif#ifndef T_TCP_DEFAULT_SEND_WINDOW#define T_TCP_DEFAULT_SEND_WINDOW 4096#endif#ifndef T_TCP_TWTRUNC_MULTIPLIER#define T_TCP_TWTRUNC_MULTIPLIER 8#endif/* The following macro is used to determine whether the passive side of a transaction TCP connection is presently in the state where the data from an incoming SYN-DATA-(and possibly FIN) segment has been received, the data has been delivered to the application, and we are in the period of delaying our SYN-ACK until either the application does a write or we have a timeout. */#define TRANSACTION_DELAYING_SYNACK(s) \ ( ((s)->sv_t_tcp_flags & SV_TRANSACTION) && \ ((s)->sv_flags & SV_PASSIVE) && \ ((s)->sv_flags & SV_TSYNFLG) ) /***** flags for the sv_t_tcp_flags field of the svp ******/#define SV_TRANSACTION ((u16)0x1) /* This connection uses the transaction TCP (RFC 1644) protocol */#define SV_CC ((u16)0x2) /* Indicates whether or not a CC option should be sent in the SYN on this connection */#define SV_CCNEW ((u16)0x4) /* If a CC is to be sent in the SYN on this connection, indicates whether or not it should be a straight CC or a CC.NEW. */#define SV_CCECHO ((u16)0x8) /* Indicates whether or not a CC.ECHO should be sent on the SYN (actually SYN-ACK) of this connection */#define SV_CCNEW_RECVD ((u16)0x10) /* On incoming initial SYNs, if a CC or CC.NEW option is received, the value of the option is stored in sv_ccrecv (otherwise, sv_ccrecv is zero). This flag remembers whether it was a CC.NEW or a CC */#define SV_LESS_THAN_MSL ((u16)0x20) /* When and if the connection closes or goes into the TIME_WAIT state, this flag is set if the duration of the connection was less than an MSL */#define SV_SUCCESFUL_TAO_TEST ((u16)0x40) /* For a passive connection, a CC was received and succesfully passed the TAO test */#endif /* TCP_TRANSACTION_TCP */#endif /*_TCP_TRANS*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -