|
EFI_STATUS | TcpInitTcbLocal (IN OUT TCP_CB *Tcb) |
|
VOID | TcpInitTcbPeer (IN OUT TCP_CB *Tcb, IN TCP_SEG *Seg, IN TCP_OPTION *Opt) |
|
BOOLEAN | TcpIsIpEqual (IN EFI_IP_ADDRESS *Ip1, IN EFI_IP_ADDRESS *Ip2, IN UINT8 Version) |
|
BOOLEAN | TcpIsIpZero (IN EFI_IP_ADDRESS *Ip, IN UINT8 Version) |
|
TCP_CB * | TcpLocateListenTcb (IN TCP_PEER *Local, IN TCP_PEER *Remote, IN UINT8 Version) |
|
BOOLEAN | TcpFindTcbByPeer (IN EFI_IP_ADDRESS *Addr, IN TCP_PORTNO Port, IN UINT8 Version) |
|
TCP_CB * | TcpLocateTcb (IN TCP_PORTNO LocalPort, IN EFI_IP_ADDRESS *LocalIp, IN TCP_PORTNO RemotePort, IN EFI_IP_ADDRESS *RemoteIp, IN UINT8 Version, IN BOOLEAN Syn) |
|
INTN | TcpInsertTcb (IN TCP_CB *Tcb) |
|
TCP_CB * | TcpCloneTcb (IN TCP_CB *Tcb) |
|
EFI_STATUS | TcpGetIsn (IN UINT8 *LocalIp, IN UINTN LocalIpSize, IN UINT16 LocalPort, IN UINT8 *RemoteIp, IN UINTN RemoteIpSize, IN UINT16 RemotePort, OUT TCP_SEQNO *Isn) |
|
UINT16 | TcpGetRcvMss (IN SOCKET *Sock) |
|
VOID | TcpSetState (IN TCP_CB *Tcb, IN UINT8 State) |
|
UINT16 | TcpChecksum (IN NET_BUF *Nbuf, IN UINT16 HeadSum) |
|
TCP_SEG * | TcpFormatNetbuf (IN TCP_CB *Tcb, IN OUT NET_BUF *Nbuf) |
|
EFI_STATUS | TcpOnAppConnect (IN OUT TCP_CB *Tcb) |
|
VOID | TcpOnAppClose (IN OUT TCP_CB *Tcb) |
|
INTN | TcpOnAppSend (IN OUT TCP_CB *Tcb) |
|
VOID | TcpOnAppConsume (IN TCP_CB *Tcb) |
|
VOID | TcpOnAppAbort (IN TCP_CB *Tcb) |
|
VOID | TcpResetConnection (IN TCP_CB *Tcb) |
|
EFI_STATUS | TcpInstallDevicePath (IN SOCKET *Sock) |
|
Misc support routines for TCP driver.
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
Copyright (c) Microsoft Corporation SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file TcpMisc.c.
Retrieves the Initial Sequence Number (ISN) for a TCP connection identified by local and remote IP addresses and ports.
This method is based on https://datatracker.ietf.org/doc/html/rfc9293#section-3.4.1 Where the ISN is computed as follows: ISN = TimeStamp + MD5(LocalIP, LocalPort, RemoteIP, RemotePort, Secret)
Otherwise: ISN = M + F(localip, localport, remoteip, remoteport, secretkey)
"Here M is the 4 microsecond timer, and F() is a pseudorandom function (PRF) of the
connection's identifying parameters ("localip, localport, remoteip, remoteport")
and a secret key ("secretkey") (SHLD-1). F() MUST NOT be computable from the
outside (MUST-9), or an attacker could still guess at sequence numbers from the
ISN used for some other connection. The PRF could be implemented as a
cryptographic hash of the concatenation of the TCP connection parameters and some
secret data. For discussion of the selection of a specific hash algorithm and
management of the secret key data."
- Parameters
-
[in] | LocalIp | A pointer to the local IP address of the TCP connection. |
[in] | LocalIpSize | The size, in bytes, of the LocalIp buffer. |
[in] | LocalPort | The local port number of the TCP connection. |
[in] | RemoteIp | A pointer to the remote IP address of the TCP connection. |
[in] | RemoteIpSize | The size, in bytes, of the RemoteIp buffer. |
[in] | RemotePort | The remote port number of the TCP connection. |
[out] | Isn | A pointer to the variable that will receive the Initial Sequence Number (ISN). |
- Return values
-
EFI_SUCCESS | The operation completed successfully, and the ISN was retrieved. |
EFI_INVALID_PARAMETER | One or more of the input parameters are invalid. |
EFI_UNSUPPORTED | The operation is not supported. |
Definition at line 605 of file TcpMisc.c.