/** @file\r
Common head file for TCP socket.\r
\r
- Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
///\r
typedef struct _SOCK_BUFFER {\r
UINT32 HighWater; ///< The buffersize upper limit of sock_buffer\r
- UINT32 LowWater; ///< The low warter mark of sock_buffer\r
+ UINT32 LowWater; ///< The low water mark of sock_buffer\r
NET_BUF_QUEUE *DataQueue; ///< The queue to buffer data\r
} SOCK_BUFFER;\r
\r
\r
SOCKET *Parent; ///< The parent of this socket\r
UINT32 BackLog; ///< The connection limit for listening socket\r
- UINT32 SndBufferSize; ///< The high warter mark of send buffer\r
- UINT32 RcvBufferSize; ///< The high warter mark of receive buffer\r
+ UINT32 SndBufferSize; ///< The high water mark of send buffer\r
+ UINT32 RcvBufferSize; ///< The high water mark of receive buffer\r
UINT8 IpVersion;\r
VOID *Protocol; ///< The pointer to protocol function template\r
///< wanted to install on socket\r
} SOCK_INIT_DATA;\r
\r
///\r
-/// The union type of TCP and UDP protocol.\r
+/// The union type of TCP4 and TCP6 protocol.\r
///\r
typedef union _NET_PROTOCOL {\r
EFI_TCP4_PROTOCOL Tcp4Protocol; ///< Tcp4 protocol\r
SOCK_BUFFER SndBuffer; ///< Send buffer of application's data\r
SOCK_BUFFER RcvBuffer; ///< Receive buffer of received data\r
EFI_STATUS SockError; ///< The error returned by low layer protocol\r
- BOOLEAN IsDestroyed;\r
+ BOOLEAN InDestroy;\r
\r
//\r
// Fields used to manage the connection request\r
SOCK_PROTO_HANDLER ProtoHandler; ///< The request handler of protocol\r
UINT8 ProtoReserved[PROTO_RESERVED_LEN]; ///< Data fields reserved for protocol\r
UINT8 IpVersion;\r
- NET_PROTOCOL NetProtocol; ///< TCP or UDP protocol socket used\r
+ NET_PROTOCOL NetProtocol; ///< TCP4 or TCP6 protocol socket used\r
//\r
// Callbacks after socket is created and before socket is to be destroyed.\r
//\r
);\r
\r
/**\r
- Destory the socket Sock and its associated protocol control block.\r
+ Destroy the socket Sock and its associated protocol control block.\r
\r
@param[in, out] Sock The socket to be destroyed.\r
\r
IN BOOLEAN OnAbort\r
);\r
\r
+/**\r
+ Abort the socket associated connection, listen, transmission or receive request.\r
+\r
+ @param[in, out] Sock Pointer to the socket to abort.\r
+ @param[in] Token Pointer to a token that has been issued by\r
+ Connect(), Accept(), Transmit() or Receive(). If\r
+ NULL, all pending tokens issued by the four\r
+ functions listed above will be aborted.\r
+\r
+ @retval EFI_UNSUPPORTED The operation is not supported in the current\r
+ implementation.\r
+**/\r
+EFI_STATUS\r
+SockCancel (\r
+ IN OUT SOCKET *Sock,\r
+ IN VOID *Token\r
+ );\r
+\r
/**\r
Get the mode data of the low layer protocol.\r
\r
IN OUT VOID *Mode\r
);\r
\r
-/**\r
- Configure the low level protocol to join a multicast group for\r
- this socket's connection.\r
-\r
- @param[in] Sock Pointer to the socket of the connection to join the\r
- specific multicast group.\r
- @param[in] GroupInfo Pointer to the multicast group information.\r
-\r
- @retval EFI_SUCCESS The configuration completed successfully.\r
- @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket.\r
- @retval EFI_NOT_STARTED The socket is not configured.\r
-\r
-**/\r
-EFI_STATUS\r
-SockGroup (\r
- IN SOCKET *Sock,\r
- IN VOID *GroupInfo\r
- );\r
-\r
/**\r
Add or remove route information in IP route table associated\r
with this socket.\r