Dhcp6Driver.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. /** @file
  2. Driver Binding functions and Service Binding functions
  3. declaration for Dhcp6 Driver.
  4. Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
  5. SPDX-License-Identifier: BSD-2-Clause-Patent
  6. **/
  7. #ifndef __EFI_DHCP6_DRIVER_H__
  8. #define __EFI_DHCP6_DRIVER_H__
  9. #include <Protocol/ServiceBinding.h>
  10. extern EFI_COMPONENT_NAME_PROTOCOL gDhcp6ComponentName;
  11. extern EFI_COMPONENT_NAME2_PROTOCOL gDhcp6ComponentName2;
  12. extern EFI_UNICODE_STRING_TABLE *gDhcp6ControllerNameTable;
  13. /**
  14. Test to see if this driver supports ControllerHandle. This service
  15. is called by the EFI boot service ConnectController(). In
  16. order to make drivers as small as possible, there are a few calling
  17. restrictions for this service. ConnectController() must
  18. follow these calling restrictions. If any other agent wishes to call
  19. Supported(), it must also follow these calling restrictions.
  20. @param[in] This Protocol instance pointer.
  21. @param[in] ControllerHandle Handle of device to test.
  22. @param[in] RemainingDevicePath Optional parameter use to pick a specific child
  23. device to start.
  24. @retval EFI_SUCCESS This driver supports this device.
  25. @retval EFI_ALREADY_STARTED This driver is already running on this device.
  26. @retval other This driver does not support this device.
  27. **/
  28. EFI_STATUS
  29. EFIAPI
  30. Dhcp6DriverBindingSupported (
  31. IN EFI_DRIVER_BINDING_PROTOCOL *This,
  32. IN EFI_HANDLE ControllerHandle,
  33. IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
  34. );
  35. /**
  36. Start this driver on ControllerHandle. This service is called by the
  37. EFI boot service ConnectController(). In order to make
  38. drivers as small as possible, there are a few calling restrictions for
  39. this service. ConnectController() must follow these
  40. calling restrictions. If any other agent wishes to call Start(), it
  41. must also follow these calling restrictions.
  42. @param[in] This Protocol instance pointer.
  43. @param[in] ControllerHandle Handle of device to bind driver to.
  44. @param[in] RemainingDevicePath Optional parameter use to pick a specific child
  45. device to start.
  46. @retval EFI_SUCCESS This driver is added to ControllerHandle.
  47. @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle.
  48. @retval other This driver does not support this device.
  49. **/
  50. EFI_STATUS
  51. EFIAPI
  52. Dhcp6DriverBindingStart (
  53. IN EFI_DRIVER_BINDING_PROTOCOL *This,
  54. IN EFI_HANDLE ControllerHandle,
  55. IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
  56. );
  57. /**
  58. Stop this driver on ControllerHandle. This service is called by the
  59. EFI boot service DisconnectController(). In order to
  60. make drivers as small as possible, there are a few calling
  61. restrictions for this service. DisconnectController()
  62. must follow these calling restrictions. If any other agent wishes
  63. to call Stop() it must also follow these calling restrictions.
  64. @param[in] This Protocol instance pointer.
  65. @param[in] ControllerHandle Handle of device to stop driver on.
  66. @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If the number of
  67. children is zero, stop the entire bus driver.
  68. @param[in] ChildHandleBuffer List of Child Handles to Stop.
  69. @retval EFI_SUCCESS This driver is removed ControllerHandle.
  70. @retval other This driver was not removed from this device.
  71. **/
  72. EFI_STATUS
  73. EFIAPI
  74. Dhcp6DriverBindingStop (
  75. IN EFI_DRIVER_BINDING_PROTOCOL *This,
  76. IN EFI_HANDLE ControllerHandle,
  77. IN UINTN NumberOfChildren,
  78. IN EFI_HANDLE *ChildHandleBuffer OPTIONAL
  79. );
  80. /**
  81. Creates a child handle and installs a protocol.
  82. The CreateChild() function installs a protocol on ChildHandle.
  83. If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
  84. If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
  85. @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
  86. @param ChildHandle Pointer to the handle of the child to create. If it is NULL,
  87. then a new handle is created. If it is a pointer to an existing UEFI handle,
  88. then the protocol is added to the existing UEFI handle.
  89. @retval EFI_SUCCES The protocol was added to ChildHandle.
  90. @retval EFI_INVALID_PARAMETER ChildHandle is NULL.
  91. @retval EFI_OUT_OF_RESOURCES There are not enough resources available to create
  92. the child.
  93. @retval other The child handle was not created.
  94. **/
  95. EFI_STATUS
  96. EFIAPI
  97. Dhcp6ServiceBindingCreateChild (
  98. IN EFI_SERVICE_BINDING_PROTOCOL *This,
  99. IN OUT EFI_HANDLE *ChildHandle
  100. );
  101. /**
  102. Destroys a child handle with a protocol installed on it.
  103. The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
  104. that was installed by CreateChild() from ChildHandle. If the removed protocol is the
  105. last protocol on ChildHandle, then ChildHandle is destroyed.
  106. @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
  107. @param ChildHandle Handle of the child to destroy.
  108. @retval EFI_SUCCES The protocol was removed from ChildHandle.
  109. @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
  110. @retval EFI_INVALID_PARAMETER Child handle is NULL.
  111. @retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle
  112. because its services are being used.
  113. @retval other The child handle was not destroyed
  114. **/
  115. EFI_STATUS
  116. EFIAPI
  117. Dhcp6ServiceBindingDestroyChild (
  118. IN EFI_SERVICE_BINDING_PROTOCOL *This,
  119. IN EFI_HANDLE ChildHandle
  120. );
  121. #endif