]> git.proxmox.com Git - mirror_edk2.git/blob - StdLib/EfiSocketLib/Init.c
Add Socket Libraries.
[mirror_edk2.git] / StdLib / EfiSocketLib / Init.c
1 /** @file
2 Implement the constructor and destructor for the EFI socket library
3
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.php
9
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.
12
13 **/
14
15 #include <socket.h>
16
17
18 /**
19 EFI Socket Library Constructor
20
21 @retval EFI_SUCCESS The initialization was successful
22
23 **/
24 EFI_STATUS
25 EFIAPI
26 EslConstructor (
27 VOID
28 )
29 {
30 EFI_STATUS Status;
31
32 DBG_ENTER ( );
33
34 //
35 // Assume success
36 //
37 Status = EFI_SUCCESS;
38
39 //
40 // Call the image dependent constructor if available
41 //
42 if ( NULL != mpfnEslConstructor ) {
43 Status = mpfnEslConstructor ( );
44 }
45
46 //
47 // Return the constructor status
48 //
49 DBG_EXIT_STATUS ( Status );
50 return Status;
51 }
52
53
54 /**
55 EFI Socket Library Destructor
56
57 @retval EFI_SUCCESS The shutdown was successful
58
59 **/
60 EFI_STATUS
61 EFIAPI
62 EslDestructor (
63 VOID
64 )
65 {
66 EFI_STATUS Status;
67
68 DBG_ENTER ( );
69
70 //
71 // Assume success
72 //
73 Status = EFI_SUCCESS;
74
75 //
76 // Call the image dependent destructor if available
77 //
78 if ( NULL != mpfnEslDestructor ) {
79 Status = mpfnEslDestructor ( );
80 }
81
82 //
83 // Return the constructor status
84 //
85 DBG_EXIT_STATUS ( Status );
86 return Status;
87 }