]> git.proxmox.com Git - mirror_edk2.git/blame - NetworkPkg/DnsDxe/DnsDriver.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / NetworkPkg / DnsDxe / DnsDriver.h
CommitLineData
99c048ef 1/** @file\r
2The header files of the driver binding and service binding protocol for DnsDxe driver.\r
3\r
f75a7f56 4Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
ecf98fbc 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
99c048ef 6\r
7**/\r
8\r
9#ifndef _DNS_DRIVER_H_\r
10#define _DNS_DRIVER_H_\r
11\r
12#include <Protocol/DriverBinding.h>\r
13#include <Protocol/ServiceBinding.h>\r
14\r
15///\r
16/// Dns service block\r
17///\r
d1050b9d 18typedef struct _DNS_DRIVER_DATA DNS_DRIVER_DATA;\r
99c048ef 19\r
20///\r
21/// Dns service block\r
22///\r
d1050b9d 23typedef struct _DNS_SERVICE DNS_SERVICE;\r
99c048ef 24\r
25///\r
26/// Dns instance block\r
27///\r
28typedef struct _DNS_INSTANCE DNS_INSTANCE;\r
29\r
d1050b9d 30#define DNS_SERVICE_SIGNATURE SIGNATURE_32 ('D', 'N', 'S', 'S')\r
99c048ef 31\r
d1050b9d 32#define DNS_INSTANCE_SIGNATURE SIGNATURE_32 ('D', 'N', 'S', 'I')\r
99c048ef 33\r
34struct _DNS_DRIVER_DATA {\r
d1050b9d 35 EFI_EVENT Timer; /// Ticking timer for DNS cache update.\r
f75a7f56 36\r
d1050b9d
MK
37 LIST_ENTRY Dns4CacheList;\r
38 LIST_ENTRY Dns4ServerList;\r
99c048ef 39\r
d1050b9d
MK
40 LIST_ENTRY Dns6CacheList;\r
41 LIST_ENTRY Dns6ServerList;\r
99c048ef 42};\r
43\r
44struct _DNS_SERVICE {\r
d1050b9d
MK
45 UINT32 Signature;\r
46 EFI_SERVICE_BINDING_PROTOCOL ServiceBinding;\r
99c048ef 47\r
d1050b9d
MK
48 UINT16 Dns4ChildrenNum;\r
49 LIST_ENTRY Dns4ChildrenList;\r
99c048ef 50\r
d1050b9d
MK
51 UINT16 Dns6ChildrenNum;\r
52 LIST_ENTRY Dns6ChildrenList;\r
99c048ef 53\r
d1050b9d
MK
54 EFI_HANDLE ControllerHandle;\r
55 EFI_HANDLE ImageHandle;\r
f75a7f56 56\r
d1050b9d 57 EFI_EVENT TimerToGetMap;\r
99c048ef 58\r
d1050b9d 59 EFI_EVENT Timer; /// Ticking timer for packet retransmission.\r
99c048ef 60\r
d1050b9d
MK
61 UINT8 IpVersion;\r
62 UDP_IO *ConnectUdp;\r
99c048ef 63};\r
64\r
65struct _DNS_INSTANCE {\r
d1050b9d
MK
66 UINT32 Signature;\r
67 LIST_ENTRY Link;\r
f75a7f56 68\r
d1050b9d
MK
69 EFI_DNS4_PROTOCOL Dns4;\r
70 EFI_DNS6_PROTOCOL Dns6;\r
f75a7f56 71\r
d1050b9d
MK
72 INTN State;\r
73 BOOLEAN InDestroy;\r
99c048ef 74\r
d1050b9d
MK
75 DNS_SERVICE *Service;\r
76 EFI_HANDLE ChildHandle;\r
99c048ef 77\r
d1050b9d
MK
78 EFI_DNS4_CONFIG_DATA Dns4CfgData;\r
79 EFI_DNS6_CONFIG_DATA Dns6CfgData;\r
99c048ef 80\r
d1050b9d 81 EFI_IP_ADDRESS SessionDnsServer;\r
99c048ef 82\r
d1050b9d
MK
83 NET_MAP Dns4TxTokens;\r
84 NET_MAP Dns6TxTokens;\r
99c048ef 85\r
d1050b9d 86 UDP_IO *UdpIo;\r
99c048ef 87};\r
88\r
89typedef struct {\r
d1050b9d
MK
90 EFI_SERVICE_BINDING_PROTOCOL *ServiceBinding;\r
91 UINTN NumberOfChildren;\r
92 EFI_HANDLE *ChildHandleBuffer;\r
99c048ef 93} DNS_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT;\r
94\r
d1050b9d 95extern DNS_DRIVER_DATA *mDriverData;\r
99c048ef 96\r
97#define DNS_SERVICE_FROM_THIS(a) \\r
98 CR (a, DNS_SERVICE, ServiceBinding, DNS_SERVICE_SIGNATURE)\r
99\r
100#define DNS_INSTANCE_FROM_THIS_PROTOCOL4(a) \\r
101 CR (a, DNS_INSTANCE, Dns4, DNS_INSTANCE_SIGNATURE)\r
102\r
103#define DNS_INSTANCE_FROM_THIS_PROTOCOL6(a) \\r
104 CR (a, DNS_INSTANCE, Dns6, DNS_INSTANCE_SIGNATURE)\r
105\r
99c048ef 106/**\r
107 Destroy the DNS instance and recycle the resources.\r
108\r
109 @param[in] Instance The pointer to the DNS instance.\r
110\r
111**/\r
112VOID\r
113DnsDestroyInstance (\r
d1050b9d 114 IN DNS_INSTANCE *Instance\r
99c048ef 115 );\r
116\r
117/**\r
118 Create the DNS instance and initialize it.\r
119\r
120 @param[in] Service The pointer to the DNS service.\r
121 @param[out] Instance The pointer to the DNS instance.\r
122\r
123 @retval EFI_OUT_OF_RESOURCES Failed to allocate resources.\r
124 @retval EFI_SUCCESS The DNS instance is created.\r
125\r
126**/\r
127EFI_STATUS\r
128DnsCreateInstance (\r
d1050b9d
MK
129 IN DNS_SERVICE *Service,\r
130 OUT DNS_INSTANCE **Instance\r
99c048ef 131 );\r
132\r
133/**\r
134 Callback function which provided by user to remove one node in NetDestroyLinkList process.\r
f75a7f56 135\r
99c048ef 136 @param[in] Entry The entry to be removed.\r
137 @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.\r
138\r
139 @retval EFI_SUCCESS The entry has been removed successfully.\r
140 @retval Others Fail to remove the entry.\r
141\r
142**/\r
143EFI_STATUS\r
144EFIAPI\r
145DnsDestroyChildEntryInHandleBuffer (\r
d1050b9d
MK
146 IN LIST_ENTRY *Entry,\r
147 IN VOID *Context\r
99c048ef 148 );\r
149\r
150/**\r
151 Config a NULL UDP that is used to keep the connection between UDP and DNS.\r
152\r
153 Just leave the Udp child unconfigured. When UDP is unloaded,\r
154 DNS will be informed with DriverBinding Stop.\r
155\r
156 @param UdpIo The UDP_IO to configure\r
157 @param Context The opaque parameter to the callback\r
158\r
159 @retval EFI_SUCCESS It always return EFI_SUCCESS directly.\r
160\r
161**/\r
162EFI_STATUS\r
163EFIAPI\r
164DnsConfigNullUdp (\r
d1050b9d
MK
165 IN UDP_IO *UdpIo,\r
166 IN VOID *Context\r
99c048ef 167 );\r
168\r
169/**\r
170 Release all the resource used the DNS service binding instance.\r
171\r
172 @param DnsSb The Dns service binding instance.\r
173\r
174**/\r
175VOID\r
176DnsDestroyService (\r
d1050b9d 177 IN DNS_SERVICE *DnsSb\r
99c048ef 178 );\r
179\r
180/**\r
181 Create then initialize a Dns service binding instance.\r
182\r
183 @param Controller The controller to install the DNS service\r
184 binding on\r
185 @param Image The driver binding image of the DNS driver\r
186 @param IpVersion IpVersion for this service\r
187 @param Service The variable to receive the created service\r
188 binding instance.\r
189\r
190 @retval EFI_OUT_OF_RESOURCES Failed to allocate resource to create the instance.\r
191 @retval EFI_DEVICE_ERROR Failed to create a NULL UDP port to keep\r
192 connection with UDP.\r
193 @retval EFI_SUCCESS The service instance is created for the\r
194 controller.\r
195\r
196**/\r
197EFI_STATUS\r
198DnsCreateService (\r
d1050b9d
MK
199 IN EFI_HANDLE Controller,\r
200 IN EFI_HANDLE Image,\r
201 IN UINT8 IpVersion,\r
202 OUT DNS_SERVICE **Service\r
99c048ef 203 );\r
204\r
205/**\r
206 Unloads an image.\r
207\r
208 @param ImageHandle Handle that identifies the image to be unloaded.\r
209\r
210 @retval EFI_SUCCESS The image has been unloaded.\r
211 @retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.\r
212\r
213**/\r
f75a7f56 214EFI_STATUS\r
99c048ef 215EFIAPI\r
216DnsUnload (\r
217 IN EFI_HANDLE ImageHandle\r
218 );\r
219\r
220/**\r
221 This is the declaration of an EFI image entry point. This entry point is\r
222 the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including\r
223 both device drivers and bus drivers.\r
224\r
225 @param ImageHandle The firmware allocated handle for the UEFI image.\r
226 @param SystemTable A pointer to the EFI System Table.\r
227\r
228 @retval EFI_SUCCESS The operation completed successfully.\r
229 @retval Others An unexpected error occurred.\r
230**/\r
231EFI_STATUS\r
232EFIAPI\r
233DnsDriverEntryPoint (\r
234 IN EFI_HANDLE ImageHandle,\r
235 IN EFI_SYSTEM_TABLE *SystemTable\r
236 );\r
237\r
238/**\r
f75a7f56 239 Tests to see if this driver supports a given controller. If a child device is provided,\r
99c048ef 240 it further tests to see if this driver supports creating a handle for the specified child device.\r
241\r
f75a7f56
LG
242 This function checks to see if the driver specified by This supports the device specified by\r
243 ControllerHandle. Drivers will typically use the device path attached to\r
244 ControllerHandle and/or the services from the bus I/O abstraction attached to\r
245 ControllerHandle to determine if the driver supports ControllerHandle. This function\r
246 may be called many times during platform initialization. In order to reduce boot times, the tests\r
247 performed by this function must be very small, and take as little time as possible to execute. This\r
248 function must not change the state of any hardware devices, and this function must be aware that the\r
249 device specified by ControllerHandle may already be managed by the same driver or a\r
250 different driver. This function must match its calls to AllocatePages() with FreePages(),\r
251 AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().\r
252 Because ControllerHandle may have been previously started by the same driver, if a protocol is\r
253 already in the opened state, then it must not be closed with CloseProtocol(). This is required\r
99c048ef 254 to guarantee the state of ControllerHandle is not modified by this function.\r
255\r
256 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
f75a7f56
LG
257 @param[in] ControllerHandle The handle of the controller to test. This handle\r
258 must support a protocol interface that supplies\r
99c048ef 259 an I/O abstraction to the driver.\r
f75a7f56
LG
260 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This\r
261 parameter is ignored by device drivers, and is optional for bus\r
262 drivers. For bus drivers, if this parameter is not NULL, then\r
263 the bus driver must determine if the bus controller specified\r
264 by ControllerHandle and the child controller specified\r
265 by RemainingDevicePath are both supported by this\r
99c048ef 266 bus driver.\r
267\r
268 @retval EFI_SUCCESS The device specified by ControllerHandle and\r
269 RemainingDevicePath is supported by the driver specified by This.\r
270 @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and\r
271 RemainingDevicePath is already being managed by the driver\r
272 specified by This.\r
273 @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and\r
274 RemainingDevicePath is already being managed by a different\r
275 driver or an application that requires exclusive access.\r
276 Currently not implemented.\r
277 @retval EFI_UNSUPPORTED The device specified by ControllerHandle and\r
278 RemainingDevicePath is not supported by the driver specified by This.\r
279**/\r
280EFI_STATUS\r
281EFIAPI\r
282Dns4DriverBindingSupported (\r
283 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
284 IN EFI_HANDLE ControllerHandle,\r
285 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
286 );\r
287\r
288/**\r
289 Starts a device controller or a bus controller.\r
290\r
291 The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
f75a7f56
LG
292 As a result, much of the error checking on the parameters to Start() has been moved into this\r
293 common boot service. It is legal to call Start() from other locations,\r
99c048ef 294 but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
295 1. ControllerHandle must be a valid EFI_HANDLE.\r
296 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
297 EFI_DEVICE_PATH_PROTOCOL.\r
298 3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
f75a7f56 299 have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r
99c048ef 300\r
301 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
f75a7f56
LG
302 @param[in] ControllerHandle The handle of the controller to start. This handle\r
303 must support a protocol interface that supplies\r
99c048ef 304 an I/O abstraction to the driver.\r
f75a7f56
LG
305 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This\r
306 parameter is ignored by device drivers, and is optional for bus\r
307 drivers. For a bus driver, if this parameter is NULL, then handles\r
308 for all the children of Controller are created by this driver.\r
309 If this parameter is not NULL and the first Device Path Node is\r
310 not the End of Device Path Node, then only the handle for the\r
311 child device specified by the first Device Path Node of\r
99c048ef 312 RemainingDevicePath is created by this driver.\r
f75a7f56 313 If the first Device Path Node of RemainingDevicePath is\r
99c048ef 314 the End of Device Path Node, no child handle is created by this\r
315 driver.\r
316\r
317 @retval EFI_SUCCESS The device was started.\r
318 @retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.\r
319 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
81a46615 320 @retval Others The driver failed to start the device.\r
99c048ef 321\r
322**/\r
323EFI_STATUS\r
324EFIAPI\r
325Dns4DriverBindingStart (\r
326 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
327 IN EFI_HANDLE ControllerHandle,\r
328 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
329 );\r
330\r
331/**\r
332 Stops a device controller or a bus controller.\r
f75a7f56
LG
333\r
334 The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r
335 As a result, much of the error checking on the parameters to Stop() has been moved\r
336 into this common boot service. It is legal to call Stop() from other locations,\r
99c048ef 337 but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
338 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
339 same driver's Start() function.\r
340 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid\r
341 EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
342 Start() function, and the Start() function must have called OpenProtocol() on\r
343 ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
f75a7f56 344\r
99c048ef 345 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
f75a7f56
LG
346 @param[in] ControllerHandle A handle to the device being stopped. The handle must\r
347 support a bus specific I/O protocol for the driver\r
99c048ef 348 to use to stop the device.\r
349 @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.\r
f75a7f56 350 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL\r
99c048ef 351 if NumberOfChildren is 0.\r
352\r
353 @retval EFI_SUCCESS The device was stopped.\r
354 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.\r
355\r
356**/\r
357EFI_STATUS\r
358EFIAPI\r
359Dns4DriverBindingStop (\r
360 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
361 IN EFI_HANDLE ControllerHandle,\r
362 IN UINTN NumberOfChildren,\r
363 IN EFI_HANDLE *ChildHandleBuffer OPTIONAL\r
364 );\r
365\r
366/**\r
f75a7f56 367 Tests to see if this driver supports a given controller. If a child device is provided,\r
99c048ef 368 it further tests to see if this driver supports creating a handle for the specified child device.\r
369\r
f75a7f56
LG
370 This function checks to see if the driver specified by This supports the device specified by\r
371 ControllerHandle. Drivers will typically use the device path attached to\r
372 ControllerHandle and/or the services from the bus I/O abstraction attached to\r
373 ControllerHandle to determine if the driver supports ControllerHandle. This function\r
374 may be called many times during platform initialization. In order to reduce boot times, the tests\r
375 performed by this function must be very small, and take as little time as possible to execute. This\r
376 function must not change the state of any hardware devices, and this function must be aware that the\r
377 device specified by ControllerHandle may already be managed by the same driver or a\r
378 different driver. This function must match its calls to AllocatePages() with FreePages(),\r
379 AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().\r
380 Because ControllerHandle may have been previously started by the same driver, if a protocol is\r
381 already in the opened state, then it must not be closed with CloseProtocol(). This is required\r
99c048ef 382 to guarantee the state of ControllerHandle is not modified by this function.\r
383\r
384 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
f75a7f56
LG
385 @param[in] ControllerHandle The handle of the controller to test. This handle\r
386 must support a protocol interface that supplies\r
99c048ef 387 an I/O abstraction to the driver.\r
f75a7f56
LG
388 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This\r
389 parameter is ignored by device drivers, and is optional for bus\r
390 drivers. For bus drivers, if this parameter is not NULL, then\r
391 the bus driver must determine if the bus controller specified\r
392 by ControllerHandle and the child controller specified\r
393 by RemainingDevicePath are both supported by this\r
99c048ef 394 bus driver.\r
395\r
396 @retval EFI_SUCCESS The device specified by ControllerHandle and\r
397 RemainingDevicePath is supported by the driver specified by This.\r
398 @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and\r
399 RemainingDevicePath is already being managed by the driver\r
400 specified by This.\r
401 @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and\r
402 RemainingDevicePath is already being managed by a different\r
403 driver or an application that requires exclusive access.\r
404 Currently not implemented.\r
405 @retval EFI_UNSUPPORTED The device specified by ControllerHandle and\r
406 RemainingDevicePath is not supported by the driver specified by This.\r
407**/\r
408EFI_STATUS\r
409EFIAPI\r
410Dns6DriverBindingSupported (\r
411 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
412 IN EFI_HANDLE ControllerHandle,\r
413 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
414 );\r
415\r
416/**\r
417 Starts a device controller or a bus controller.\r
418\r
419 The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
f75a7f56
LG
420 As a result, much of the error checking on the parameters to Start() has been moved into this\r
421 common boot service. It is legal to call Start() from other locations,\r
99c048ef 422 but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
423 1. ControllerHandle must be a valid EFI_HANDLE.\r
424 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
425 EFI_DEVICE_PATH_PROTOCOL.\r
426 3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
f75a7f56 427 have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r
99c048ef 428\r
429 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
f75a7f56
LG
430 @param[in] ControllerHandle The handle of the controller to start. This handle\r
431 must support a protocol interface that supplies\r
99c048ef 432 an I/O abstraction to the driver.\r
f75a7f56
LG
433 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This\r
434 parameter is ignored by device drivers, and is optional for bus\r
435 drivers. For a bus driver, if this parameter is NULL, then handles\r
436 for all the children of Controller are created by this driver.\r
437 If this parameter is not NULL and the first Device Path Node is\r
438 not the End of Device Path Node, then only the handle for the\r
439 child device specified by the first Device Path Node of\r
99c048ef 440 RemainingDevicePath is created by this driver.\r
f75a7f56 441 If the first Device Path Node of RemainingDevicePath is\r
99c048ef 442 the End of Device Path Node, no child handle is created by this\r
443 driver.\r
444\r
445 @retval EFI_SUCCESS The device was started.\r
446 @retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.\r
447 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
81a46615 448 @retval Others The driver failed to start the device.\r
99c048ef 449\r
450**/\r
451EFI_STATUS\r
452EFIAPI\r
453Dns6DriverBindingStart (\r
454 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
455 IN EFI_HANDLE ControllerHandle,\r
456 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
457 );\r
458\r
459/**\r
460 Stops a device controller or a bus controller.\r
f75a7f56
LG
461\r
462 The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r
463 As a result, much of the error checking on the parameters to Stop() has been moved\r
464 into this common boot service. It is legal to call Stop() from other locations,\r
99c048ef 465 but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
466 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
467 same driver's Start() function.\r
468 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid\r
469 EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
470 Start() function, and the Start() function must have called OpenProtocol() on\r
471 ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
f75a7f56 472\r
99c048ef 473 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
f75a7f56
LG
474 @param[in] ControllerHandle A handle to the device being stopped. The handle must\r
475 support a bus specific I/O protocol for the driver\r
99c048ef 476 to use to stop the device.\r
477 @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.\r
f75a7f56 478 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL\r
99c048ef 479 if NumberOfChildren is 0.\r
480\r
481 @retval EFI_SUCCESS The device was stopped.\r
482 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.\r
483\r
484**/\r
485EFI_STATUS\r
486EFIAPI\r
487Dns6DriverBindingStop (\r
488 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
489 IN EFI_HANDLE ControllerHandle,\r
490 IN UINTN NumberOfChildren,\r
491 IN EFI_HANDLE *ChildHandleBuffer OPTIONAL\r
492 );\r
493\r
494/**\r
495 Creates a child handle and installs a protocol.\r
f75a7f56
LG
496\r
497 The CreateChild() function installs a protocol on ChildHandle.\r
498 If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.\r
99c048ef 499 If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.\r
500\r
501 @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
502 @param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL,\r
f75a7f56 503 then a new handle is created. If it is a pointer to an existing UEFI handle,\r
99c048ef 504 then the protocol is added to the existing UEFI handle.\r
505\r
81a46615 506 @retval EFI_SUCCESS The protocol was added to ChildHandle.\r
99c048ef 507 @retval EFI_INVALID_PARAMETER ChildHandle is NULL.\r
c2adf51f 508 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to create\r
99c048ef 509 the child\r
510 @retval other The child handle was not created\r
511\r
512**/\r
513EFI_STATUS\r
514EFIAPI\r
515Dns4ServiceBindingCreateChild (\r
516 IN EFI_SERVICE_BINDING_PROTOCOL *This,\r
517 IN EFI_HANDLE *ChildHandle\r
518 );\r
519\r
520/**\r
521 Destroys a child handle with a protocol installed on it.\r
f75a7f56
LG
522\r
523 The DestroyChild() function does the opposite of CreateChild(). It removes a protocol\r
524 that was installed by CreateChild() from ChildHandle. If the removed protocol is the\r
99c048ef 525 last protocol on ChildHandle, then ChildHandle is destroyed.\r
526\r
527 @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
528 @param[in] ChildHandle Handle of the child to destroy\r
529\r
81a46615 530 @retval EFI_SUCCESS The protocol was removed from ChildHandle.\r
99c048ef 531 @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.\r
532 @retval EFI_INVALID_PARAMETER Child handle is NULL.\r
533 @retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle\r
534 because its services are being used.\r
535 @retval other The child handle was not destroyed\r
536\r
537**/\r
538EFI_STATUS\r
539EFIAPI\r
540Dns4ServiceBindingDestroyChild (\r
541 IN EFI_SERVICE_BINDING_PROTOCOL *This,\r
542 IN EFI_HANDLE ChildHandle\r
543 );\r
544\r
545/**\r
546 Creates a child handle and installs a protocol.\r
f75a7f56
LG
547\r
548 The CreateChild() function installs a protocol on ChildHandle.\r
549 If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.\r
99c048ef 550 If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.\r
551\r
552 @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
553 @param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL,\r
f75a7f56 554 then a new handle is created. If it is a pointer to an existing UEFI handle,\r
99c048ef 555 then the protocol is added to the existing UEFI handle.\r
556\r
81a46615 557 @retval EFI_SUCCESS The protocol was added to ChildHandle.\r
99c048ef 558 @retval EFI_INVALID_PARAMETER ChildHandle is NULL.\r
c2adf51f 559 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to create\r
99c048ef 560 the child\r
561 @retval other The child handle was not created\r
562\r
563**/\r
564EFI_STATUS\r
565EFIAPI\r
566Dns6ServiceBindingCreateChild (\r
567 IN EFI_SERVICE_BINDING_PROTOCOL *This,\r
568 IN EFI_HANDLE *ChildHandle\r
569 );\r
570\r
571/**\r
572 Destroys a child handle with a protocol installed on it.\r
f75a7f56
LG
573\r
574 The DestroyChild() function does the opposite of CreateChild(). It removes a protocol\r
575 that was installed by CreateChild() from ChildHandle. If the removed protocol is the\r
99c048ef 576 last protocol on ChildHandle, then ChildHandle is destroyed.\r
577\r
578 @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
579 @param[in] ChildHandle Handle of the child to destroy\r
580\r
81a46615 581 @retval EFI_SUCCESS The protocol was removed from ChildHandle.\r
99c048ef 582 @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.\r
583 @retval EFI_INVALID_PARAMETER Child handle is NULL.\r
584 @retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle\r
585 because its services are being used.\r
586 @retval other The child handle was not destroyed\r
587\r
588**/\r
589EFI_STATUS\r
590EFIAPI\r
591Dns6ServiceBindingDestroyChild (\r
592 IN EFI_SERVICE_BINDING_PROTOCOL *This,\r
593 IN EFI_HANDLE ChildHandle\r
594 );\r
595\r
99c048ef 596#endif\r