27 CopyMem (&Value, Buf,
sizeof (UINT16));
46 CopyMem (&Value, Buf,
sizeof (UINT32));
64 CopyMem (Buf, &Data,
sizeof (UINT32));
83 ASSERT ((Tcb !=
NULL) && (Tcb->Sk !=
NULL));
113 ASSERT ((Tcb !=
NULL) && (Nbuf !=
NULL) && (Nbuf->Tcp ==
NULL));
123 (!TCP_FLG_ON (TCPSEG_NETBUF (Nbuf)->Flag, TCP_FLG_ACK) ||
133 ASSERT (Data !=
NULL);
147 (!TCP_FLG_ON (TCPSEG_NETBUF (Nbuf)->Flag, TCP_FLG_ACK) ||
157 ASSERT (Data !=
NULL);
167 ASSERT (Data !=
NULL);
193 ASSERT ((Tcb !=
NULL) && (Nbuf !=
NULL) && (Nbuf->Tcp ==
NULL));
200 !TCP_FLG_ON (TCPSEG_NETBUF (Nbuf)->Flag, TCP_FLG_RST)
209 ASSERT (Data !=
NULL);
243 ASSERT ((Tcp !=
NULL) && (Option !=
NULL));
247 TotalLen = (UINT8)((Tcp->HeadLen << 2) -
sizeof (
TCP_HEAD));
252 Head = (UINT8 *)(Tcp + 1);
260 Option->Flag = TCP_OPTION_RCVD_TS;
270 while (Cur < TotalLen) {
282 TCP_SET_FLG (Option->Flag, TCP_OPTION_RCVD_MSS);
294 Option->WndScale = (UINT8)
MIN (14, Head[Cur + 2]);
295 TCP_SET_FLG (Option->Flag, TCP_OPTION_RCVD_WS);
309 TCP_SET_FLG (Option->Flag, TCP_OPTION_RCVD_TS);
325 if (((TotalLen - Cur) < Len) || (Len < 2)) {
329 Cur = (UINT8)(Cur + Len);
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
UINT8 *EFIAPI NetbufAllocSpace(IN OUT NET_BUF *Nbuf, IN UINT32 Len, IN BOOLEAN FromHead)
#define GET_RCV_BUFFSIZE(Sock)
UINT16 TcpBuildOption(IN TCP_CB *Tcb, IN NET_BUF *Nbuf)
UINT16 TcpSynBuildOption(IN TCP_CB *Tcb, IN NET_BUF *Nbuf)
VOID TcpPutUint32(OUT UINT8 *Buf, IN UINT32 Data)
UINT32 TcpGetUint32(IN UINT8 *Buf)
UINT16 TcpGetUint16(IN UINT8 *Buf)
INTN TcpParseOption(IN TCP_HEAD *Tcp, IN OUT TCP_OPTION *Option)
UINT8 TcpComputeScale(IN TCP_CB *Tcb)
#define TCP_OPTION_TS_LEN
Length of timestamp option.
#define TCP_OPTION_TS
Timestamp.
#define TCP_OPTION_MAX_WS
Maximum window scale value.
#define TCP_OPTION_NOP
No-Option.
#define TCP_OPTION_MAX_WIN
Max window size in TCP header.
#define TCP_OPTION_WS_ALIGNED_LEN
Length of window scale option, aligned.
#define TCP_OPTION_MSS_LEN
Length of MSS option.
#define TCP_OPTION_TS_ALIGNED_LEN
Length of timestamp option, aligned.
#define TCP_OPTION_EOP
End Of oPtion.
#define TCP_OPTION_WS_LEN
Length of window scale option.
#define TCP_OPTION_WS
Window scale.
#define TCP_OPTION_MSS
Maximum Segment Size.
#define TCP_CTRL_RCVD_WS
Received a wnd scale option in syn.
#define TCP_CTRL_SND_TS
Send Timestamp option to remote.
#define TCP_CTRL_RCVD_TS
Received a Timestamp option in syn.
#define TCP_CTRL_NO_WS
Disable window scale option.
#define TCP_CTRL_NO_TS
Disable Timestamp option.