]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/EfiSocketLib/Init.c
Add Socket Libraries.
[mirror_edk2.git] / StdLib / EfiSocketLib / Init.c
diff --git a/StdLib/EfiSocketLib/Init.c b/StdLib/EfiSocketLib/Init.c
new file mode 100644 (file)
index 0000000..7a1b89d
--- /dev/null
@@ -0,0 +1,87 @@
+/** @file\r
+  Implement the constructor and destructor for the EFI socket library\r
+\r
+  Copyright (c) 2011, Intel Corporation\r
+  All rights reserved. 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
+\r
+**/\r
+\r
+#include <socket.h>\r
+\r
+\r
+/**\r
+  EFI Socket Library Constructor\r
+\r
+  @retval EFI_SUCCESS       The initialization was successful\r
+\r
+ **/\r
+EFI_STATUS\r
+EFIAPI\r
+EslConstructor (\r
+  VOID\r
+  )\r
+{\r
+  EFI_STATUS Status;\r
+\r
+  DBG_ENTER ( );\r
+\r
+  //\r
+  //  Assume success\r
+  //\r
+  Status = EFI_SUCCESS;\r
+\r
+  //\r
+  //  Call the image dependent constructor if available\r
+  //\r
+  if ( NULL != mpfnEslConstructor ) {\r
+    Status = mpfnEslConstructor ( );\r
+  }\r
+\r
+  //\r
+  //  Return the constructor status\r
+  //\r
+  DBG_EXIT_STATUS ( Status );\r
+  return Status;\r
+}\r
+\r
+\r
+/**\r
+  EFI Socket Library Destructor\r
+\r
+  @retval EFI_SUCCESS       The shutdown was successful\r
+\r
+ **/\r
+EFI_STATUS\r
+EFIAPI\r
+EslDestructor (\r
+  VOID\r
+  )\r
+{\r
+  EFI_STATUS Status;\r
+\r
+  DBG_ENTER ( );\r
+\r
+  //\r
+  //  Assume success\r
+  //\r
+  Status = EFI_SUCCESS;\r
+\r
+  //\r
+  //  Call the image dependent destructor if available\r
+  //\r
+  if ( NULL != mpfnEslDestructor ) {\r
+    Status = mpfnEslDestructor ( );\r
+  }\r
+\r
+  //\r
+  //  Return the constructor status\r
+  //\r
+  DBG_EXIT_STATUS ( Status );\r
+  return Status;\r
+}\r