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