]>
git.proxmox.com Git - mirror_edk2.git/blob - StdLib/EfiSocketLib/Init.c
2 Implement the constructor and destructor for the EFI socket library
4 Copyright (c) 2011, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 EFI Socket Library Constructor
21 This routine supports an implementation dependent constructor
22 depending upon whether the library is linked to a socket
23 application or the SocketDxe driver. The following modules
24 declare the redirection for the constructor in ::mpfnEslConstructor:
26 <li>StdLib/EfiSocketLib/UseSocketLib.c - Application links against EfiSocketLib</li>
27 <li>StdLib/SocketDxe/EntryUnload.c - SocketDxe links against EfiSocketLib</li>
30 The EfiSocketLib.inf file lists ::EslConstructor as the CONSTRUCTOR
31 in the [Defines] section. As a result, this routine is called by
32 the ProcessLibraryConstructorList routine of the AutoGen.c module
33 in the Build directory associated with the socket application or
36 @retval EFI_SUCCESS The socket layer initialization was successful
55 // Call the image dependent constructor if available
57 if ( NULL
!= mpfnEslConstructor
) {
58 Status
= mpfnEslConstructor ( );
62 // Return the constructor status
64 DBG_EXIT_STATUS ( Status
);
70 EFI Socket Library Destructor
72 This routine supports an implementation dependent destructor
73 depending upon whether the library is linked to a socket
74 application or the SocketDxe driver. The following modules
75 declare the redirection for the destructor in ::mpfnEslDestructor:
77 <li>StdLib/EfiSocketLib/UseSocketLib.c - Application links against EfiSocketLib</li>
78 <li>StdLib/SocketDxe/EntryUnload.c - SocketDxe links against EfiSocketLib</li>
81 The EfiSocketLib.inf file lists ::EslDestructor as the DESTRUCTOR
82 in the [Defines] section. As a result, this routine is called by
83 the ProcessLibraryDestructorList routine of the AutoGen.c module
84 in the Build directory associated with the socket application or
87 @retval EFI_SUCCESS The socket layer shutdown was successful
103 Status
= EFI_SUCCESS
;
106 // Call the image dependent destructor if available
108 if ( NULL
!= mpfnEslDestructor
) {
109 Status
= mpfnEslDestructor ( );
113 // Return the constructor status
115 DBG_EXIT_STATUS ( Status
);