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