\r
\r
/**\r
- Check whether the sequence number of the incoming segment\r
- is acceptable.\r
+ Check whether the sequence number of the incoming segment is acceptable.\r
\r
@param Tcb Pointer to the TCP_CB of this TCP instance.\r
@param Seg Pointer to the incoming segment.\r
\r
- @return 1 if the sequence number is acceptable, otherwise 0.\r
+ @retval 1 The sequence number is acceptable.\r
+ @retval 0 The sequence number is not acceptable.\r
\r
**/\r
INTN\r
@param Tcb Pointer to the TCP_CB of this TCP instance.\r
@param Seg Segment that triggers the fast recovery.\r
\r
- @return None.\r
-\r
**/\r
VOID\r
TcpFastRecover (\r
@param Tcb Pointer to the TCP_CB of this TCP instance.\r
@param Seg Segment that triggers the fast loss recovery.\r
\r
- @return None.\r
-\r
**/\r
VOID\r
TcpFastLossRecover (\r
\r
\r
/**\r
- Compute the RTT as specified in RFC2988\r
+ Compute the RTT as specified in RFC2988.\r
\r
@param Tcb Pointer to the TCP_CB of this TCP instance.\r
@param Measure Currently measured RTT in heart beats.\r
\r
- @return None.\r
-\r
**/\r
VOID\r
TcpComputeRtt (\r
\r
\r
/**\r
- Trim the data, SYN and FIN to fit into the window defined by\r
- Left and Right.\r
+ Trim the data, SYN and FIN to fit into the window defined by Left and Right.\r
\r
@param Nbuf Buffer that contains received TCP segment without IP header.\r
@param Left The sequence number of the window's left edge.\r
@param Right The sequence number of the window's right edge.\r
\r
- @return 0, the data is successfully trimmed.\r
+ @return 0 The data is successfully trimmed.\r
\r
**/\r
INTN\r
}\r
}\r
\r
- ASSERT (TcpVerifySegment (Nbuf));\r
+ ASSERT (TcpVerifySegment (Nbuf) != 0);\r
return 0;\r
}\r
\r
@param Tcb Pointer to the TCP_CB of this TCP instance.\r
@param Nbuf Pointer to the NET_BUF containing the received tcp segment.\r
\r
- @return 0, the data is trimmed.\r
+ @return 0 The data is trimmed.\r
\r
**/\r
INTN\r
TCP_SEG *Seg;\r
UINT32 Urgent;\r
\r
- ASSERT (Tcb && Tcb->Sk);\r
+ ASSERT ((Tcb != NULL) && (Tcb->Sk != NULL));\r
\r
//\r
// make sure there is some data queued,\r
Nbuf = NET_LIST_USER_STRUCT (Entry, NET_BUF, List);\r
Seg = TCPSEG_NETBUF (Nbuf);\r
\r
- ASSERT (TcpVerifySegment (Nbuf));\r
+ ASSERT (TcpVerifySegment (Nbuf) != 0);\r
ASSERT (Nbuf->Tcp == NULL);\r
\r
if (TCP_SEQ_GT (Seg->Seq, Seq)) {\r
@param Tcb Pointer to the TCP_CB of this TCP instance.\r
@param Nbuf Pointer to the buffer containing the data to be queued.\r
\r
- @return None.\r
-\r
**/\r
VOID\r
TcpQueueData (\r
LIST_ENTRY *Cur;\r
NET_BUF *Node;\r
\r
- ASSERT (Tcb && Nbuf && (Nbuf->Tcp == NULL));\r
+ ASSERT ((Tcb != NULL) && (Nbuf != NULL) && (Nbuf->Tcp == NULL));\r
\r
NET_GET_REF (Nbuf);\r
\r
@param Tcb Pointer to the TCP_CB of this TCP instance.\r
@param Ack The acknowledge seuqence number of the received segment.\r
\r
- @return None.\r
-\r
**/\r
VOID\r
TcpAdjustSndQue (\r
// if it comes from a LISTEN TCB.\r
//\r
} else if ((Tcb->State == TCP_ESTABLISHED) ||\r
- (Tcb->State == TCP_FIN_WAIT_1) ||\r
- (Tcb->State == TCP_FIN_WAIT_2) ||\r
- (Tcb->State == TCP_CLOSE_WAIT)\r
- ) {\r
+ (Tcb->State == TCP_FIN_WAIT_1) ||\r
+ (Tcb->State == TCP_FIN_WAIT_2) ||\r
+ (Tcb->State == TCP_CLOSE_WAIT)) {\r
\r
SOCK_ERROR (Tcb->Sk, EFI_CONNECTION_RESET);\r
\r
Tcb->SndUna = Seg->Ack;\r
\r
if (TCP_FLG_ON (Tcb->CtrlFlag, TCP_CTRL_SND_URG) &&\r
- (TCP_SEQ_LT (Tcb->SndUp, Seg->Ack))) {\r
+ TCP_SEQ_LT (Tcb->SndUp, Seg->Ack)) {\r
\r
TCP_CLEAR_FLG (Tcb->CtrlFlag, TCP_CTRL_SND_URG);\r
}\r
TcpSendReset (Tcb, Head, Len, Dst, Src);\r
\r
DROP_CONNECTION:\r
- ASSERT (Tcb && Tcb->Sk);\r
+ ASSERT ((Tcb != NULL) && (Tcb->Sk != NULL));\r
\r
NetbufFree (Nbuf);\r
TcpClose (Tcb);\r
\r
if ((Parent != NULL) && (Tcb != NULL)) {\r
\r
- ASSERT (Tcb->Sk);\r
+ ASSERT (Tcb->Sk != NULL);\r
TcpClose (Tcb);\r
}\r
\r
@param Src Source address of the ICMP error message.\r
@param Dst Destination address of the ICMP error message.\r
\r
- @return None.\r
-\r
**/\r
VOID\r
TcpIcmpInput (\r