]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.h
1. Add EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() support.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Dhcp4Dxe / Dhcp4Driver.h
CommitLineData
83cbd279 1/** @file\r
3e8c18da 2 Header for the DHCP4 driver.\r
3 \r
216f7970 4Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
e5eed7d3 5This program and the accompanying materials\r
83cbd279 6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
83cbd279 13**/\r
14\r
15#ifndef __EFI_DHCP4_DRIVER_H__\r
16#define __EFI_DHCP4_DRIVER_H__\r
17\r
18extern EFI_COMPONENT_NAME_PROTOCOL gDhcp4ComponentName;\r
19extern EFI_COMPONENT_NAME2_PROTOCOL gDhcp4ComponentName2;\r
216f7970 20extern EFI_UNICODE_STRING_TABLE *gDhcpControllerNameTable;\r
83cbd279 21\r
7bce0c5a 22/**\r
ed729a0c 23 Test to see if this driver supports ControllerHandle. This service\r
24 is called by the EFI boot service ConnectController(). In\r
25 order to make drivers as small as possible, there are a few calling\r
26 restrictions for this service. ConnectController() must\r
27 follow these calling restrictions. If any other agent wishes to call\r
28 Supported() it must also follow these calling restrictions.\r
29\r
3e8c18da 30 @param[in] This Protocol instance pointer.\r
31 @param[in] ControllerHandle Handle of device to test\r
32 @param[in] RemainingDevicePath Optional parameter use to pick a specific child\r
33 device to start.\r
ed729a0c 34\r
35 @retval EFI_SUCCESS This driver supports this device\r
36 @retval EFI_ALREADY_STARTED This driver is already running on this device\r
37 @retval other This driver does not support this device\r
7bce0c5a 38\r
39**/\r
83cbd279 40EFI_STATUS\r
41EFIAPI\r
42Dhcp4DriverBindingSupported (\r
43 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
44 IN EFI_HANDLE ControllerHandle,\r
45 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
46 );\r
47\r
7bce0c5a 48/**\r
ed729a0c 49 Start this driver on ControllerHandle. This service is called by the\r
50 EFI boot service ConnectController(). In order to make\r
51 drivers as small as possible, there are a few calling restrictions for\r
52 this service. ConnectController() must follow these\r
53 calling restrictions. If any other agent wishes to call Start() it\r
54 must also follow these calling restrictions.\r
55\r
3e8c18da 56 @param[in] This Protocol instance pointer.\r
57 @param[in] ControllerHandle Handle of device to bind driver to\r
58 @param[in] RemainingDevicePath Optional parameter use to pick a specific child\r
59 device to start.\r
ed729a0c 60\r
61 @retval EFI_SUCCESS This driver is added to ControllerHandle\r
62 @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle\r
63 @retval other This driver does not support this device\r
7bce0c5a 64\r
65**/\r
83cbd279 66EFI_STATUS\r
67EFIAPI\r
68Dhcp4DriverBindingStart (\r
69 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
70 IN EFI_HANDLE ControllerHandle,\r
71 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
72 );\r
73\r
7bce0c5a 74/**\r
ed729a0c 75 Stop this driver on ControllerHandle. This service is called by the\r
76 EFI boot service DisconnectController(). In order to\r
77 make drivers as small as possible, there are a few calling\r
78 restrictions for this service. DisconnectController()\r
79 must follow these calling restrictions. If any other agent wishes\r
80 to call Stop() it must also follow these calling restrictions.\r
81 \r
3e8c18da 82 @param[in] This Protocol instance pointer.\r
83 @param[in] ControllerHandle Handle of device to stop driver on\r
84 @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
85 children is zero stop the entire bus driver.\r
86 @param[in] ChildHandleBuffer List of Child Handles to Stop.\r
ed729a0c 87\r
88 @retval EFI_SUCCESS This driver is removed ControllerHandle\r
89 @retval other This driver was not removed from this device\r
7bce0c5a 90\r
91**/\r
83cbd279 92EFI_STATUS\r
93EFIAPI\r
94Dhcp4DriverBindingStop (\r
95 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
96 IN EFI_HANDLE ControllerHandle,\r
97 IN UINTN NumberOfChildren,\r
98 IN EFI_HANDLE *ChildHandleBuffer\r
99 );\r
100\r
7bce0c5a 101/**\r
3e8c18da 102 Creates a child handle and installs a protocol.\r
103 \r
104 The CreateChild() function installs a protocol on ChildHandle. \r
105 If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. \r
106 If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.\r
7bce0c5a 107\r
3e8c18da 108 @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
109 @param ChildHandle Pointer to the handle of the child to create. If it is NULL,\r
110 then a new handle is created. If it is a pointer to an existing UEFI handle, \r
111 then the protocol is added to the existing UEFI handle.\r
7bce0c5a 112\r
3e8c18da 113 @retval EFI_SUCCES The protocol was added to ChildHandle.\r
ed729a0c 114 @retval EFI_INVALID_PARAMETER ChildHandle is NULL.\r
115 @retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create\r
116 the child\r
117 @retval other The child handle was not created\r
7bce0c5a 118\r
119**/\r
83cbd279 120EFI_STATUS\r
121EFIAPI\r
122Dhcp4ServiceBindingCreateChild (\r
123 IN EFI_SERVICE_BINDING_PROTOCOL *This,\r
124 IN EFI_HANDLE *ChildHandle\r
125 );\r
126\r
7bce0c5a 127/**\r
3e8c18da 128 Destroys a child handle with a protocol installed on it.\r
129 \r
130 The DestroyChild() function does the opposite of CreateChild(). It removes a protocol \r
131 that was installed by CreateChild() from ChildHandle. If the removed protocol is the \r
132 last protocol on ChildHandle, then ChildHandle is destroyed.\r
7bce0c5a 133\r
3e8c18da 134 @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
ed729a0c 135 @param ChildHandle Handle of the child to destroy\r
136\r
3e8c18da 137 @retval EFI_SUCCES The protocol was removed from ChildHandle.\r
138 @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.\r
284ee2e8 139 @retval EFI_INVALID_PARAMETER Child handle is NULL.\r
3e8c18da 140 @retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle\r
141 because its services are being used.\r
ed729a0c 142 @retval other The child handle was not destroyed\r
7bce0c5a 143\r
144**/\r
83cbd279 145EFI_STATUS\r
146EFIAPI\r
147Dhcp4ServiceBindingDestroyChild (\r
148 IN EFI_SERVICE_BINDING_PROTOCOL *This,\r
149 IN EFI_HANDLE ChildHandle\r
150 );\r
151\r
152#endif\r