Dhcp4Driver.h 5.9 KB

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