]> git.proxmox.com Git - mirror_edk2.git/blame - NetworkPkg/HttpBootDxe/HttpBootDxe.h
MedmodulePkg: Refine codes related to Dhcpv4 and Dhcpv6 configuration.
[mirror_edk2.git] / NetworkPkg / HttpBootDxe / HttpBootDxe.h
CommitLineData
d933e70a
JW
1/** @file\r
2 UEFI HTTP boot driver's private data structure and interfaces declaration.\r
3\r
fa848a40 4Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
90f658c4 5(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
d933e70a
JW
6This program and the accompanying materials are licensed and made available under \r
7the terms and conditions of the BSD License that accompanies this distribution. \r
8The full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php. \r
10 \r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
13\r
14**/\r
15\r
16#ifndef __EFI_HTTP_BOOT_DXE_H__\r
17#define __EFI_HTTP_BOOT_DXE_H__\r
18\r
19#include <Uefi.h>\r
20\r
90f658c4
SEHM
21#include <IndustryStandard/Http11.h>\r
22\r
d933e70a
JW
23//\r
24// Libraries\r
25//\r
26#include <Library/UefiBootServicesTableLib.h>\r
fa848a40
FS
27#include <Library/UefiHiiServicesLib.h>\r
28#include <Library/UefiRuntimeServicesTableLib.h>\r
d933e70a
JW
29#include <Library/MemoryAllocationLib.h>\r
30#include <Library/BaseLib.h>\r
31#include <Library/UefiLib.h>\r
32#include <Library/DevicePathLib.h>\r
33#include <Library/DebugLib.h>\r
34#include <Library/NetLib.h>\r
35#include <Library/HttpLib.h>\r
fa848a40
FS
36#include <Library/HiiLib.h>\r
37#include <Library/PrintLib.h>\r
d933e70a
JW
38\r
39//\r
40// UEFI Driver Model Protocols\r
41//\r
42#include <Protocol/DriverBinding.h>\r
43#include <Protocol/ComponentName2.h>\r
44#include <Protocol/ComponentName.h>\r
45\r
46//\r
47// Consumed Protocols\r
48//\r
fa848a40
FS
49#include <Protocol/ServiceBinding.h>\r
50#include <Protocol/HiiConfigAccess.h>\r
d933e70a
JW
51#include <Protocol/NetworkInterfaceIdentifier.h>\r
52#include <Protocol/Dhcp4.h>\r
b659408b
ZL
53#include <Protocol/Dhcp6.h>\r
54#include <Protocol/Dns6.h>\r
d933e70a
JW
55#include <Protocol/Http.h>\r
56#include <Protocol/Ip4Config2.h>\r
b659408b 57#include <Protocol/Ip6Config.h>\r
587d204c 58#include <Protocol/RamDisk.h>\r
d933e70a
JW
59//\r
60// Produced Protocols\r
61//\r
62#include <Protocol/LoadFile.h>\r
63\r
fa848a40
FS
64//\r
65// Consumed Guids\r
66//\r
67#include <Guid/HttpBootConfigHii.h>\r
68\r
d933e70a
JW
69//\r
70// Driver Version\r
71//\r
72#define HTTP_BOOT_DXE_VERSION 0xa\r
73\r
587d204c
FS
74//\r
75// Provisional Standard Media Types defined in \r
76// http://www.iana.org/assignments/provisional-standard-media-types/provisional-standard-media-types.xhtml\r
77//\r
78#define HTTP_CONTENT_TYPE_APP_EFI "application/efi"\r
79\r
d933e70a
JW
80//\r
81// Protocol instances\r
82//\r
83extern EFI_DRIVER_BINDING_PROTOCOL gHttpBootDxeDriverBinding;\r
84extern EFI_COMPONENT_NAME2_PROTOCOL gHttpBootDxeComponentName2;\r
85extern EFI_COMPONENT_NAME_PROTOCOL gHttpBootDxeComponentName;\r
86\r
87//\r
88// Private data structure\r
89//\r
90typedef struct _HTTP_BOOT_PRIVATE_DATA HTTP_BOOT_PRIVATE_DATA;\r
b659408b 91typedef struct _HTTP_BOOT_VIRTUAL_NIC HTTP_BOOT_VIRTUAL_NIC;\r
d933e70a 92\r
587d204c
FS
93typedef enum {\r
94 ImageTypeEfi,\r
95 ImageTypeVirtualCd,\r
96 ImageTypeVirtualDisk,\r
97 ImageTypeMax\r
98} HTTP_BOOT_IMAGE_TYPE;\r
99\r
d933e70a
JW
100//\r
101// Include files with internal function prototypes\r
102//\r
103#include "HttpBootComponentName.h"\r
104#include "HttpBootDhcp4.h"\r
b659408b 105#include "HttpBootDhcp6.h"\r
d933e70a
JW
106#include "HttpBootImpl.h"\r
107#include "HttpBootSupport.h"\r
108#include "HttpBootClient.h"\r
fa848a40 109#include "HttpBootConfig.h"\r
d933e70a
JW
110\r
111typedef union {\r
112 HTTP_BOOT_DHCP4_PACKET_CACHE Dhcp4;\r
b659408b 113 HTTP_BOOT_DHCP6_PACKET_CACHE Dhcp6;\r
d933e70a
JW
114} HTTP_BOOT_DHCP_PACKET_CACHE;\r
115\r
b659408b
ZL
116struct _HTTP_BOOT_VIRTUAL_NIC {\r
117 UINT32 Signature;\r
118 EFI_HANDLE Controller;\r
75372581 119 EFI_HANDLE ImageHandle;\r
b659408b
ZL
120 EFI_LOAD_FILE_PROTOCOL LoadFile;\r
121 EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
122 HTTP_BOOT_PRIVATE_DATA *Private;\r
123};\r
124\r
fa848a40
FS
125#define HTTP_BOOT_PRIVATE_DATA_FROM_CALLBACK_INFO(Callback) \\r
126 CR ( \\r
127 Callback, \\r
128 HTTP_BOOT_PRIVATE_DATA, \\r
129 CallbackInfo, \\r
130 HTTP_BOOT_PRIVATE_DATA_SIGNATURE \\r
131 )\r
132\r
d933e70a
JW
133struct _HTTP_BOOT_PRIVATE_DATA {\r
134 UINT32 Signature;\r
135 EFI_HANDLE Controller;\r
d933e70a 136\r
b659408b
ZL
137 HTTP_BOOT_VIRTUAL_NIC *Ip4Nic;\r
138 HTTP_BOOT_VIRTUAL_NIC *Ip6Nic;\r
139\r
d933e70a
JW
140 //\r
141 // Cousumed children\r
142 //\r
b659408b 143 EFI_HANDLE Ip6Child;\r
d933e70a 144 EFI_HANDLE Dhcp4Child;\r
b659408b 145 EFI_HANDLE Dhcp6Child;\r
d933e70a
JW
146 HTTP_IO HttpIo;\r
147 BOOLEAN HttpCreated;\r
148\r
149 //\r
150 // Consumed protocol\r
151 //\r
152 EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL *Nii;\r
b659408b 153 EFI_IP6_PROTOCOL *Ip6;\r
d933e70a 154 EFI_IP4_CONFIG2_PROTOCOL *Ip4Config2;\r
b659408b 155 EFI_IP6_CONFIG_PROTOCOL *Ip6Config;\r
d933e70a 156 EFI_DHCP4_PROTOCOL *Dhcp4;\r
b659408b 157 EFI_DHCP6_PROTOCOL *Dhcp6;\r
d933e70a
JW
158 EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;\r
159\r
d933e70a
JW
160 \r
161 //\r
162 // Produced protocol\r
163 //\r
164 EFI_LOAD_FILE_PROTOCOL LoadFile;\r
165 EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
166 UINT32 Id;\r
167\r
fa848a40
FS
168 //\r
169 // HII callback info block\r
170 //\r
171 HTTP_BOOT_FORM_CALLBACK_INFO CallbackInfo;\r
172\r
d933e70a
JW
173 //\r
174 // Mode data\r
175 //\r
176 BOOLEAN UsingIpv6;\r
177 BOOLEAN Started;\r
178 EFI_IP_ADDRESS StationIp;\r
179 EFI_IP_ADDRESS SubnetMask;\r
180 EFI_IP_ADDRESS GatewayIp;\r
b659408b 181 EFI_IP_ADDRESS ServerIp;\r
d933e70a 182 UINT16 Port;\r
587d204c
FS
183\r
184 //\r
185 // The URI string attempt to download through HTTP, may point to\r
186 // the memory in cached DHCP offer, or to the memory in FilePathUri.\r
187 //\r
d933e70a
JW
188 CHAR8 *BootFileUri;\r
189 VOID *BootFileUriParser;\r
190 UINTN BootFileSize;\r
b659408b 191 BOOLEAN NoGateway;\r
44a7d08b 192 HTTP_BOOT_IMAGE_TYPE ImageType;\r
d933e70a 193\r
fa848a40
FS
194 //\r
195 // URI string extracted from the input FilePath parameter.\r
196 //\r
197 CHAR8 *FilePathUri;\r
198 VOID *FilePathUriParser;\r
199\r
d933e70a
JW
200 //\r
201 // Cached HTTP data\r
202 //\r
203 LIST_ENTRY CacheList;\r
204\r
205 //\r
206 // Cached DHCP offer\r
207 //\r
208 // OfferIndex records the index of DhcpOffer[] buffer, and OfferCount records the num of each type of offer.\r
209 //\r
210 // It supposed that\r
211 //\r
212 // OfferNum: 8\r
213 // OfferBuffer: [ProxyNameUri, DhcpNameUri, DhcpIpUri, ProxyNameUri, ProxyIpUri, DhcpOnly, DhcpIpUri, DhcpNameUriDns]\r
214 // (OfferBuffer is 0-based.)\r
215 //\r
216 // And assume that (DhcpIpUri is the first priority actually.)\r
217 //\r
218 // SelectIndex: 5\r
219 // SelectProxyType: HttpOfferTypeProxyIpUri\r
220 // (SelectIndex is 1-based, and 0 means no one is selected.)\r
221 //\r
222 // So it should be\r
223 //\r
224 // DhcpIpUri DhcpNameUriDns DhcpDns DhcpOnly ProxyNameUri ProxyIpUri DhcpNameUri\r
225 // OfferCount: [ 2, 1, 0, 1, 2, 1, 1]\r
226 //\r
227 // OfferIndex: {[ 2, 7, 0, 5, 0, *4, 1]\r
228 // [ 6, 0, 0, 0, 3, 0, 0]\r
229 // [ 0, 0, 0, 0, 0, 0, 0]\r
230 // ... ]}\r
231 // (OfferIndex is 0-based.)\r
232 //\r
233 //\r
234 UINT32 SelectIndex;\r
235 UINT32 SelectProxyType;\r
236 HTTP_BOOT_DHCP_PACKET_CACHE OfferBuffer[HTTP_BOOT_OFFER_MAX_NUM];\r
237 UINT32 OfferNum;\r
238 UINT32 OfferCount[HttpOfferTypeMax];\r
239 UINT32 OfferIndex[HttpOfferTypeMax][HTTP_BOOT_OFFER_MAX_NUM];\r
240};\r
241\r
242#define HTTP_BOOT_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('H', 'B', 'P', 'D')\r
b659408b 243#define HTTP_BOOT_VIRTUAL_NIC_SIGNATURE SIGNATURE_32 ('H', 'B', 'V', 'N')\r
d933e70a
JW
244#define HTTP_BOOT_PRIVATE_DATA_FROM_LOADFILE(a) CR (a, HTTP_BOOT_PRIVATE_DATA, LoadFile, HTTP_BOOT_PRIVATE_DATA_SIGNATURE)\r
245#define HTTP_BOOT_PRIVATE_DATA_FROM_ID(a) CR (a, HTTP_BOOT_PRIVATE_DATA, Id, HTTP_BOOT_PRIVATE_DATA_SIGNATURE)\r
b659408b 246#define HTTP_BOOT_VIRTUAL_NIC_FROM_LOADFILE(a) CR (a, HTTP_BOOT_VIRTUAL_NIC, LoadFile, HTTP_BOOT_VIRTUAL_NIC_SIGNATURE)\r
d933e70a
JW
247extern EFI_LOAD_FILE_PROTOCOL gHttpBootDxeLoadFile;\r
248\r
249/**\r
250 Tests to see if this driver supports a given controller. If a child device is provided, \r
251 it further tests to see if this driver supports creating a handle for the specified child device.\r
252\r
253 This function checks to see if the driver specified by This supports the device specified by \r
254 ControllerHandle. Drivers will typically use the device path attached to \r
255 ControllerHandle and/or the services from the bus I/O abstraction attached to \r
256 ControllerHandle to determine if the driver supports ControllerHandle. This function \r
257 may be called many times during platform initialization. In order to reduce boot times, the tests \r
258 performed by this function must be very small, and take as little time as possible to execute. This \r
259 function must not change the state of any hardware devices, and this function must be aware that the \r
260 device specified by ControllerHandle may already be managed by the same driver or a \r
261 different driver. This function must match its calls to AllocatePages() with FreePages(), \r
262 AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol(). \r
263 Because ControllerHandle may have been previously started by the same driver, if a protocol is \r
264 already in the opened state, then it must not be closed with CloseProtocol(). This is required \r
265 to guarantee the state of ControllerHandle is not modified by this function.\r
266\r
267 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
268 @param[in] ControllerHandle The handle of the controller to test. This handle \r
269 must support a protocol interface that supplies \r
270 an I/O abstraction to the driver.\r
271 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This \r
272 parameter is ignored by device drivers, and is optional for bus \r
273 drivers. For bus drivers, if this parameter is not NULL, then \r
274 the bus driver must determine if the bus controller specified \r
275 by ControllerHandle and the child controller specified \r
276 by RemainingDevicePath are both supported by this \r
277 bus driver.\r
278\r
279 @retval EFI_SUCCESS The device specified by ControllerHandle and\r
280 RemainingDevicePath is supported by the driver specified by This.\r
281 @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and\r
282 RemainingDevicePath is already being managed by the driver\r
283 specified by This.\r
284 @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and\r
285 RemainingDevicePath is already being managed by a different\r
286 driver or an application that requires exclusive access.\r
287 Currently not implemented.\r
288 @retval EFI_UNSUPPORTED The device specified by ControllerHandle and\r
289 RemainingDevicePath is not supported by the driver specified by This.\r
290**/\r
291EFI_STATUS\r
292EFIAPI\r
293HttpBootIp4DxeDriverBindingSupported (\r
294 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
295 IN EFI_HANDLE ControllerHandle,\r
296 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
297 );\r
298\r
299/**\r
300 Starts a device controller or a bus controller.\r
301\r
302 The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
303 As a result, much of the error checking on the parameters to Start() has been moved into this \r
304 common boot service. It is legal to call Start() from other locations, \r
305 but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
306 1. ControllerHandle must be a valid EFI_HANDLE.\r
307 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
308 EFI_DEVICE_PATH_PROTOCOL.\r
309 3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
310 have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. \r
311\r
312 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
313 @param[in] ControllerHandle The handle of the controller to start. This handle \r
314 must support a protocol interface that supplies \r
315 an I/O abstraction to the driver.\r
316 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This \r
317 parameter is ignored by device drivers, and is optional for bus \r
318 drivers. For a bus driver, if this parameter is NULL, then handles \r
319 for all the children of Controller are created by this driver. \r
320 If this parameter is not NULL and the first Device Path Node is \r
321 not the End of Device Path Node, then only the handle for the \r
322 child device specified by the first Device Path Node of \r
323 RemainingDevicePath is created by this driver.\r
324 If the first Device Path Node of RemainingDevicePath is \r
325 the End of Device Path Node, no child handle is created by this\r
326 driver.\r
327\r
328 @retval EFI_SUCCESS The device was started.\r
329 @retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.\r
330 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
331 @retval Others The driver failded to start the device.\r
332\r
333**/\r
334EFI_STATUS\r
335EFIAPI\r
336HttpBootIp4DxeDriverBindingStart (\r
337 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
338 IN EFI_HANDLE ControllerHandle,\r
339 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
340 );\r
341\r
342/**\r
343 Stops a device controller or a bus controller.\r
344 \r
345 The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r
346 As a result, much of the error checking on the parameters to Stop() has been moved \r
347 into this common boot service. It is legal to call Stop() from other locations, \r
348 but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
349 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
350 same driver's Start() function.\r
351 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid\r
352 EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
353 Start() function, and the Start() function must have called OpenProtocol() on\r
354 ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
355 \r
356 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
357 @param[in] ControllerHandle A handle to the device being stopped. The handle must \r
358 support a bus specific I/O protocol for the driver \r
359 to use to stop the device.\r
360 @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.\r
361 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL \r
362 if NumberOfChildren is 0.\r
363\r
364 @retval EFI_SUCCESS The device was stopped.\r
365 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.\r
366\r
367**/\r
368EFI_STATUS\r
369EFIAPI\r
370HttpBootIp4DxeDriverBindingStop (\r
371 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
372 IN EFI_HANDLE ControllerHandle,\r
373 IN UINTN NumberOfChildren,\r
374 IN EFI_HANDLE *ChildHandleBuffer OPTIONAL\r
375 );\r
376\r
b659408b
ZL
377/**\r
378 Tests to see if this driver supports a given controller. If a child device is provided, \r
379 it further tests to see if this driver supports creating a handle for the specified child device.\r
380\r
381 This function checks to see if the driver specified by This supports the device specified by \r
382 ControllerHandle. Drivers will typically use the device path attached to \r
383 ControllerHandle and/or the services from the bus I/O abstraction attached to \r
384 ControllerHandle to determine if the driver supports ControllerHandle. This function \r
385 may be called many times during platform initialization. In order to reduce boot times, the tests \r
386 performed by this function must be very small, and take as little time as possible to execute. This \r
387 function must not change the state of any hardware devices, and this function must be aware that the \r
388 device specified by ControllerHandle may already be managed by the same driver or a \r
389 different driver. This function must match its calls to AllocatePages() with FreePages(), \r
390 AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol(). \r
391 Because ControllerHandle may have been previously started by the same driver, if a protocol is \r
392 already in the opened state, then it must not be closed with CloseProtocol(). This is required \r
393 to guarantee the state of ControllerHandle is not modified by this function.\r
394\r
395 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
396 @param[in] ControllerHandle The handle of the controller to test. This handle \r
397 must support a protocol interface that supplies \r
398 an I/O abstraction to the driver.\r
399 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This \r
400 parameter is ignored by device drivers, and is optional for bus \r
401 drivers. For bus drivers, if this parameter is not NULL, then \r
402 the bus driver must determine if the bus controller specified \r
403 by ControllerHandle and the child controller specified \r
404 by RemainingDevicePath are both supported by this \r
405 bus driver.\r
406\r
407 @retval EFI_SUCCESS The device specified by ControllerHandle and\r
408 RemainingDevicePath is supported by the driver specified by This.\r
409 @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and\r
410 RemainingDevicePath is already being managed by the driver\r
411 specified by This.\r
412 @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and\r
413 RemainingDevicePath is already being managed by a different\r
414 driver or an application that requires exclusive access.\r
415 Currently not implemented.\r
416 @retval EFI_UNSUPPORTED The device specified by ControllerHandle and\r
417 RemainingDevicePath is not supported by the driver specified by This.\r
418**/\r
419EFI_STATUS\r
420EFIAPI\r
421HttpBootIp6DxeDriverBindingSupported (\r
422 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
423 IN EFI_HANDLE ControllerHandle,\r
424 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
425 );\r
426\r
427/**\r
428 Starts a device controller or a bus controller.\r
429\r
430 The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
431 As a result, much of the error checking on the parameters to Start() has been moved into this \r
432 common boot service. It is legal to call Start() from other locations, \r
433 but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
434 1. ControllerHandle must be a valid EFI_HANDLE.\r
435 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
436 EFI_DEVICE_PATH_PROTOCOL.\r
437 3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
438 have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. \r
439\r
440 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
441 @param[in] ControllerHandle The handle of the controller to start. This handle \r
442 must support a protocol interface that supplies \r
443 an I/O abstraction to the driver.\r
444 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This \r
445 parameter is ignored by device drivers, and is optional for bus \r
446 drivers. For a bus driver, if this parameter is NULL, then handles \r
447 for all the children of Controller are created by this driver. \r
448 If this parameter is not NULL and the first Device Path Node is \r
449 not the End of Device Path Node, then only the handle for the \r
450 child device specified by the first Device Path Node of \r
451 RemainingDevicePath is created by this driver.\r
452 If the first Device Path Node of RemainingDevicePath is \r
453 the End of Device Path Node, no child handle is created by this\r
454 driver.\r
455\r
456 @retval EFI_SUCCESS The device was started.\r
457 @retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.\r
458 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
459 @retval Others The driver failded to start the device.\r
460\r
461**/\r
462EFI_STATUS\r
463EFIAPI\r
464HttpBootIp6DxeDriverBindingStart (\r
465 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
466 IN EFI_HANDLE ControllerHandle,\r
467 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
468 );\r
469\r
470/**\r
471 Stops a device controller or a bus controller.\r
472 \r
473 The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r
474 As a result, much of the error checking on the parameters to Stop() has been moved \r
475 into this common boot service. It is legal to call Stop() from other locations, \r
476 but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
477 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
478 same driver's Start() function.\r
479 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid\r
480 EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
481 Start() function, and the Start() function must have called OpenProtocol() on\r
482 ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
483 \r
484 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
485 @param[in] ControllerHandle A handle to the device being stopped. The handle must \r
486 support a bus specific I/O protocol for the driver \r
487 to use to stop the device.\r
488 @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.\r
489 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL \r
490 if NumberOfChildren is 0.\r
491\r
492 @retval EFI_SUCCESS The device was stopped.\r
493 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.\r
494\r
495**/\r
496EFI_STATUS\r
497EFIAPI\r
498HttpBootIp6DxeDriverBindingStop (\r
499 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
500 IN EFI_HANDLE ControllerHandle,\r
501 IN UINTN NumberOfChildren,\r
502 IN EFI_HANDLE *ChildHandleBuffer OPTIONAL\r
503 );\r
d933e70a 504#endif\r