]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/TcpDxe/Socket.h
NetworkPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / NetworkPkg / TcpDxe / Socket.h
index a00625244e563c92d31179064f23c0b8befa1797..874708ea575a44009712e5dff5e42e6aa8fe15d6 100644 (file)
@@ -1,15 +1,9 @@
 /** @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
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php.\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -361,7 +355,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 +419,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 +444,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 +471,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 +496,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
@@ -696,7 +690,7 @@ SockCreateChild (
   );\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
@@ -864,6 +858,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 +893,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