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