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