+++ /dev/null
-/** @file\r
- Implement the constructor and destructor for the EFI socket library\r
-\r
- Copyright (c) 2011, Intel Corporation. All rights reserved.\r
- SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-#include "Socket.h"\r
-\r
-\r
-/**\r
- EFI Socket Library Constructor\r
-\r
- This routine supports an implementation dependent constructor\r
- depending upon whether the library is linked to a socket\r
- application or the SocketDxe driver. The following modules\r
- declare the redirection for the constructor in ::mpfnEslConstructor:\r
- <ul>\r
- <li>StdLib/EfiSocketLib/UseSocketLib.c - Application links against EfiSocketLib</li>\r
- <li>StdLib/SocketDxe/EntryUnload.c - SocketDxe links against EfiSocketLib</li>\r
- </ul>\r
-\r
- The EfiSocketLib.inf file lists ::EslConstructor as the CONSTRUCTOR\r
- in the [Defines] section. As a result, this routine is called by\r
- the ProcessLibraryConstructorList routine of the AutoGen.c module\r
- in the Build directory associated with the socket application or\r
- the SocketDxe driver.\r
-\r
- @retval EFI_SUCCESS The socket layer 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
- This routine supports an implementation dependent destructor\r
- depending upon whether the library is linked to a socket\r
- application or the SocketDxe driver. The following modules\r
- declare the redirection for the destructor in ::mpfnEslDestructor:\r
- <ul>\r
- <li>StdLib/EfiSocketLib/UseSocketLib.c - Application links against EfiSocketLib</li>\r
- <li>StdLib/SocketDxe/EntryUnload.c - SocketDxe links against EfiSocketLib</li>\r
- </ul>\r
-\r
- The EfiSocketLib.inf file lists ::EslDestructor as the DESTRUCTOR\r
- in the [Defines] section. As a result, this routine is called by\r
- the ProcessLibraryDestructorList routine of the AutoGen.c module\r
- in the Build directory associated with the socket application or\r
- the SocketDxe driver.\r
-\r
- @retval EFI_SUCCESS The socket layer 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