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