]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/TcpDxe/Socket.h
ArmPkg/DefaultExceptionHandlerLib: drop BASE variant
[mirror_edk2.git] / NetworkPkg / TcpDxe / Socket.h
index 9e2d907150d5eef1158f5bf65df1551d9cbfad10..26c5f4e4269ce03ce944a322548bac7fc43accda 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Common head file for TCP socket.\r
 \r
-  Copyright (c) 2009 - 2012, 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
@@ -361,7 +361,7 @@ typedef enum {
 ///\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
@@ -425,8 +425,8 @@ typedef struct _SOCK_INIT_DATA {
 \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
@@ -450,7 +450,7 @@ typedef struct _SOCK_INIT_DATA {
 } 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
@@ -477,7 +477,7 @@ struct _TCP_SOCKET {
   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
@@ -502,7 +502,7 @@ struct _TCP_SOCKET {
   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
@@ -864,6 +864,24 @@ SockClose (
   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
@@ -881,25 +899,6 @@ SockGetMode (
   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