]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.h
synced function header
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4Driver.h
1 /** @file
2
3 Copyright (c) 2005 - 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12
13 Module Name:
14
15 Ip4Driver.h
16
17 Abstract:
18
19
20 **/
21
22 #ifndef __EFI_IP4_DRIVER_H__
23 #define __EFI_IP4_DRIVER_H__
24
25 #include <Protocol/ServiceBinding.h>
26
27 extern EFI_DRIVER_BINDING_PROTOCOL gIp4DriverBinding;
28 extern EFI_COMPONENT_NAME_PROTOCOL gIp4ComponentName;
29 extern EFI_COMPONENT_NAME2_PROTOCOL gIp4ComponentName2;
30
31 //
32 // Function prototype for the driver's entry point
33 //
34 /**
35 This is the declaration of an EFI image entry point. This entry point is
36 the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including
37 both device drivers and bus drivers.
38
39 The entry point for IP4 driver which install the driver
40 binding and component name protocol on its image.
41
42 @param ImageHandle The firmware allocated handle for the UEFI image.
43 @param SystemTable A pointer to the EFI System Table.
44
45 @retval EFI_SUCCESS The operation completed successfully.
46 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
47
48 **/
49 EFI_STATUS
50 EFIAPI
51 Ip4DriverEntryPoint (
52 IN EFI_HANDLE ImageHandle,
53 IN EFI_SYSTEM_TABLE *SystemTable
54 );
55
56 //
57 // Function prototypes for the Drivr Binding Protocol
58 //
59 /**
60 Test to see if this driver supports ControllerHandle. This service
61 is called by the EFI boot service ConnectController(). In
62 order to make drivers as small as possible, there are a few calling
63 restrictions for this service. ConnectController() must
64 follow these calling restrictions. If any other agent wishes to call
65 Supported() it must also follow these calling restrictions.
66
67 @param This Protocol instance pointer.
68 @param ControllerHandle Handle of device to test
69 @param RemainingDevicePath Optional parameter use to pick a specific child
70 device to start.
71
72 @retval EFI_SUCCESS This driver supports this device
73 @retval EFI_ALREADY_STARTED This driver is already running on this device
74 @retval other This driver does not support this device
75
76 **/
77 EFI_STATUS
78 EFIAPI
79 Ip4DriverBindingSupported (
80 IN EFI_DRIVER_BINDING_PROTOCOL * This,
81 IN EFI_HANDLE ControllerHandle,
82 IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL
83 );
84
85 /**
86 Start this driver on ControllerHandle. This service is called by the
87 EFI boot service ConnectController(). In order to make
88 drivers as small as possible, there are a few calling restrictions for
89 this service. ConnectController() must follow these
90 calling restrictions. If any other agent wishes to call Start() it
91 must also follow these calling restrictions.
92
93 @param This Protocol instance pointer.
94 @param ControllerHandle Handle of device to bind driver to
95 @param RemainingDevicePath Optional parameter use to pick a specific child
96 device to start.
97
98 @retval EFI_SUCCESS This driver is added to ControllerHandle
99 @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle
100 @retval other This driver does not support this device
101
102 **/
103 EFI_STATUS
104 EFIAPI
105 Ip4DriverBindingStart (
106 IN EFI_DRIVER_BINDING_PROTOCOL * This,
107 IN EFI_HANDLE ControllerHandle,
108 IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL
109 );
110
111 /**
112 Stop this driver on ControllerHandle. This service is called by the
113 EFI boot service DisconnectController(). In order to
114 make drivers as small as possible, there are a few calling
115 restrictions for this service. DisconnectController()
116 must follow these calling restrictions. If any other agent wishes
117 to call Stop() it must also follow these calling restrictions.
118
119 @param This Protocol instance pointer.
120 @param ControllerHandle Handle of device to stop driver on
121 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
122 children is zero stop the entire bus driver.
123 @param ChildHandleBuffer List of Child Handles to Stop.
124
125 @retval EFI_SUCCESS This driver is removed ControllerHandle
126 @retval other This driver was not removed from this device
127
128 **/
129 EFI_STATUS
130 EFIAPI
131 Ip4DriverBindingStop (
132 IN EFI_DRIVER_BINDING_PROTOCOL *This,
133 IN EFI_HANDLE ControllerHandle,
134 IN UINTN NumberOfChildren,
135 IN EFI_HANDLE *ChildHandleBuffer
136 );
137
138 //
139 // Function ptototypes for the ServiceBinding Prococol
140 //
141 /**
142 Creates a child handle with a set of I/O services.
143
144 @param This Protocol instance pointer.
145 @param ChildHandle Pointer to the handle of the child to create. If it is NULL,
146 then a new handle is created. If it is not NULL, then the
147 I/O services are added to the existing child handle.
148
149 @retval EFI_SUCCES The child handle was created with the I/O services
150 @retval EFI_INVALID_PARAMETER ChildHandle is NULL.
151 @retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create
152 the child
153 @retval other The child handle was not created
154
155 **/
156 EFI_STATUS
157 EFIAPI
158 Ip4ServiceBindingCreateChild (
159 IN EFI_SERVICE_BINDING_PROTOCOL *This,
160 IN OUT EFI_HANDLE *ChildHandle
161 );
162
163 /**
164 Destroys a child handle with a set of I/O services.
165
166 @param This Protocol instance pointer.
167 @param ChildHandle Handle of the child to destroy
168
169 @retval EFI_SUCCES The I/O services were removed from the child handle
170 @retval EFI_UNSUPPORTED The child handle does not support the I/O services
171 that are being removed.
172 @retval EFI_INVALID_PARAMETER Child handle is not a valid EFI Handle.
173 @retval EFI_ACCESS_DENIED The child handle could not be destroyed because its
174 I/O services are being used.
175 @retval other The child handle was not destroyed
176
177 **/
178 EFI_STATUS
179 EFIAPI
180 Ip4ServiceBindingDestroyChild (
181 IN EFI_SERVICE_BINDING_PROTOCOL *This,
182 IN EFI_HANDLE ChildHandle
183 );
184 #endif