]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/TcpDxe/SockInterface.c
StandaloneMmPkg: Describe the declaration and definition files.
[mirror_edk2.git] / NetworkPkg / TcpDxe / SockInterface.c
index b4ba40afcef620f9e6889c5866f10b4c9408aae4..0a3c07835af01bc1dcb0ccf216eb71308e02aa0d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Interface function of the Socket.\r
 \r
-  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, 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
@@ -169,18 +169,6 @@ SockDestroyChild (
 \r
   ASSERT (Tcb != NULL);\r
 \r
-  Status            = EfiAcquireLockOrFail (&(Sock->Lock));\r
-  if (EFI_ERROR (Status)) {\r
-\r
-    DEBUG (\r
-      (EFI_D_ERROR,\r
-      "SockDestroyChild: Get the lock to access socket failed with %r\n",\r
-      Status)\r
-      );\r
-\r
-    return EFI_ACCESS_DENIED;\r
-  }\r
-\r
   //\r
   // Close the IP protocol.\r
   //\r
@@ -226,6 +214,19 @@ SockDestroyChild (
         NULL\r
         );\r
 \r
+\r
+  Status            = EfiAcquireLockOrFail (&(Sock->Lock));\r
+  if (EFI_ERROR (Status)) {\r
+\r
+    DEBUG (\r
+      (EFI_D_ERROR,\r
+      "SockDestroyChild: Get the lock to access socket failed with %r\n",\r
+      Status)\r
+      );\r
+\r
+    return EFI_ACCESS_DENIED;\r
+  }\r
+\r
   //\r
   // force protocol layer to detach the PCB\r
   //\r
@@ -984,7 +985,7 @@ EFI_STATUS
 SockCancel (\r
   IN OUT SOCKET  *Sock,\r
   IN     VOID    *Token\r
-  ) \r
+  )\r
 {\r
   EFI_STATUS     Status;\r
 \r
@@ -1007,7 +1008,7 @@ SockCancel (
     Status = EFI_NOT_STARTED;\r
     goto Exit;\r
   }\r
-  \r
+\r
   //\r
   // 1. Check ConnectionToken.\r
   //\r
@@ -1038,7 +1039,7 @@ SockCancel (
   if (Token != NULL && !EFI_ERROR (Status)) {\r
     goto Exit;\r
   }\r
-  \r
+\r
   //\r
   // 4. Check SndTokenList.\r
   //\r
@@ -1051,7 +1052,7 @@ SockCancel (
   // 5. Check ProcessingSndTokenList.\r
   //\r
   Status = SockCancelToken (Token, &Sock->ProcessingSndTokenList);\r
-  \r
+\r
 Exit:\r
   EfiReleaseLock (&(Sock->Lock));\r
   return Status;\r
@@ -1078,52 +1079,6 @@ SockGetMode (
   return Sock->ProtoHandler (Sock, SOCK_MODE, 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 info.\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
-  EFI_STATUS  Status;\r
-\r
-  Status = EfiAcquireLockOrFail (&(Sock->Lock));\r
-\r
-  if (EFI_ERROR (Status)) {\r
-\r
-    DEBUG (\r
-      (EFI_D_ERROR,\r
-      "SockGroup: Get the access for socket failed with %r",\r
-      Status)\r
-      );\r
-\r
-    return EFI_ACCESS_DENIED;\r
-  }\r
-\r
-  if (SOCK_IS_UNCONFIGURED (Sock)) {\r
-    Status = EFI_NOT_STARTED;\r
-    goto Exit;\r
-  }\r
-\r
-  Status = Sock->ProtoHandler (Sock, SOCK_GROUP, GroupInfo);\r
-\r
-Exit:\r
-  EfiReleaseLock (&(Sock->Lock));\r
-  return Status;\r
-}\r
-\r
 /**\r
   Add or remove route information in IP route table associated\r
   with this socket.\r