/** @file\r
TCP input process routines.\r
\r
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
)\r
{\r
return (TCP_SEQ_LEQ (Tcb->RcvWl2, Seg->End) &&\r
- TCP_SEQ_LEQ (Seg->Seq, Tcb->RcvWl2 + Tcb->RcvWnd));\r
+ TCP_SEQ_LT (Seg->Seq, Tcb->RcvWl2 + Tcb->RcvWnd));\r
}\r
\r
\r
// Process segment in SYN_RCVD or TCP_CONNECTED states\r
//\r
\r
+ //\r
+ // Clear probe timer since the RecvWindow is opened.\r
+ //\r
+ if (Tcb->ProbeTimerOn && (Seg->Wnd != 0)) {\r
+ TcpClearTimer (Tcb, TCP_TIMER_PROBE);\r
+ Tcb->ProbeTimerOn = FALSE;\r
+ }\r
+\r
//\r
// First step: Check whether SEG.SEQ is acceptable\r
//\r
Tcb->Idle = 0;\r
TcpSetKeepaliveTimer (Tcb);\r
\r
- if (TCP_TIMER_ON (Tcb->EnabledTimer, TCP_TIMER_PROBE)) {\r
-\r
- TcpClearTimer (Tcb, TCP_TIMER_PROBE);\r
- }\r
-\r
if (TCP_FLG_ON (Seg->Flag, TCP_FLG_URG) &&\r
!TCP_FIN_RCVD (Tcb->State)) {\r
\r
//\r
// First window size is never scaled\r
//\r
- Tcb->RcvWndScale = 0;\r
+ Tcb->RcvWndScale = 0;\r
+\r
+ Tcb->ProbeTimerOn = FALSE;\r
}\r
\r
\r
/** @file\r
TCP output process routines.\r
\r
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
Tcb)\r
);\r
\r
- TcpSetProbeTimer (Tcb);\r
+ if (!Tcb->ProbeTimerOn) {\r
+ TcpSetProbeTimer (Tcb);\r
+ }\r
}\r
\r
return 0;\r
/** @file\r
Tcp Protocol header file.\r
\r
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
INT32 NextExpire; ///< Count down offset for the nearest timer\r
UINT32 Idle; ///< How long the connection is in idle\r
UINT32 ProbeTime; ///< The time out value for current window prober\r
+ BOOLEAN ProbeTimerOn;///< If TRUE, the probe time is on.\r
\r
//\r
// RFC1323 defined variables, about window scale,\r
/** @file\r
TCP timer related functions.\r
\r
-Copyright (c) 2005 - 2007, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
if ((TcpDataToSend (Tcb, 1) != 0) && (TcpToSendData (Tcb, 1) > 0)) {\r
\r
ASSERT (TCP_TIMER_ON (Tcb->EnabledTimer, TCP_TIMER_REXMIT) != 0);\r
+ Tcb->ProbeTimerOn = FALSE;\r
return ;\r
}\r
\r
IN OUT TCP_CB *Tcb\r
)\r
{\r
- if (!TCP_TIMER_ON (Tcb->EnabledTimer, TCP_TIMER_PROBE)) {\r
- Tcb->ProbeTime = Tcb->Rto;\r
+ if (!Tcb->ProbeTimerOn) {\r
+ Tcb->ProbeTime = Tcb->Rto;\r
+ Tcb->ProbeTimerOn = TRUE;\r
\r
} else {\r
Tcb->ProbeTime <<= 1;\r