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