]>
Commit | Line | Data |
---|---|---|
99c048ef | 1 | /** @file\r |
2 | The header files of the driver binding and service binding protocol for DnsDxe driver.\r | |
3 | \r | |
4 | Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef _DNS_DRIVER_H_\r | |
16 | #define _DNS_DRIVER_H_\r | |
17 | \r | |
18 | #include <Protocol/DriverBinding.h>\r | |
19 | #include <Protocol/ServiceBinding.h>\r | |
20 | \r | |
21 | ///\r | |
22 | /// Dns service block\r | |
23 | ///\r | |
24 | typedef struct _DNS_DRIVER_DATA DNS_DRIVER_DATA;\r | |
25 | \r | |
26 | ///\r | |
27 | /// Dns service block\r | |
28 | ///\r | |
29 | typedef struct _DNS_SERVICE DNS_SERVICE;\r | |
30 | \r | |
31 | ///\r | |
32 | /// Dns instance block\r | |
33 | ///\r | |
34 | typedef struct _DNS_INSTANCE DNS_INSTANCE;\r | |
35 | \r | |
36 | #define DNS_SERVICE_SIGNATURE SIGNATURE_32 ('D', 'N', 'S', 'S')\r | |
37 | \r | |
38 | #define DNS_INSTANCE_SIGNATURE SIGNATURE_32 ('D', 'N', 'S', 'I') \r | |
39 | \r | |
40 | struct _DNS_DRIVER_DATA {\r | |
41 | EFI_EVENT Timer; /// Ticking timer for DNS cache update.\r | |
42 | \r | |
43 | LIST_ENTRY Dns4CacheList;\r | |
44 | LIST_ENTRY Dns4ServerList;\r | |
45 | \r | |
46 | LIST_ENTRY Dns6CacheList;\r | |
47 | LIST_ENTRY Dns6ServerList;\r | |
48 | };\r | |
49 | \r | |
50 | struct _DNS_SERVICE {\r | |
51 | UINT32 Signature;\r | |
52 | EFI_SERVICE_BINDING_PROTOCOL ServiceBinding;\r | |
53 | \r | |
54 | UINT16 Dns4ChildrenNum;\r | |
55 | LIST_ENTRY Dns4ChildrenList;\r | |
56 | \r | |
57 | UINT16 Dns6ChildrenNum;\r | |
58 | LIST_ENTRY Dns6ChildrenList;\r | |
59 | \r | |
60 | EFI_HANDLE ControllerHandle;\r | |
61 | EFI_HANDLE ImageHandle;\r | |
62 | \r | |
63 | EFI_EVENT TimerToGetMap;\r | |
64 | \r | |
65 | EFI_EVENT Timer; /// Ticking timer for packet retransmission.\r | |
66 | \r | |
67 | UINT8 IpVersion;\r | |
68 | UDP_IO *ConnectUdp;\r | |
69 | };\r | |
70 | \r | |
71 | struct _DNS_INSTANCE {\r | |
72 | UINT32 Signature;\r | |
73 | LIST_ENTRY Link;\r | |
74 | \r | |
75 | EFI_DNS4_PROTOCOL Dns4;\r | |
76 | EFI_DNS6_PROTOCOL Dns6;\r | |
77 | \r | |
78 | INTN State;\r | |
79 | BOOLEAN InDestroy;\r | |
80 | \r | |
81 | DNS_SERVICE *Service;\r | |
82 | EFI_HANDLE ChildHandle;\r | |
83 | \r | |
84 | EFI_DNS4_CONFIG_DATA Dns4CfgData;\r | |
85 | EFI_DNS6_CONFIG_DATA Dns6CfgData;\r | |
86 | \r | |
87 | EFI_IP_ADDRESS SessionDnsServer;\r | |
88 | \r | |
89 | NET_MAP Dns4TxTokens;\r | |
90 | NET_MAP Dns6TxTokens;\r | |
91 | \r | |
92 | UINT32 MaxRetry;\r | |
93 | \r | |
94 | UDP_IO *UdpIo;\r | |
95 | };\r | |
96 | \r | |
97 | typedef struct {\r | |
98 | EFI_SERVICE_BINDING_PROTOCOL *ServiceBinding;\r | |
99 | UINTN NumberOfChildren;\r | |
100 | EFI_HANDLE *ChildHandleBuffer;\r | |
101 | } DNS_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT;\r | |
102 | \r | |
103 | extern DNS_DRIVER_DATA *mDriverData;\r | |
104 | \r | |
105 | #define DNS_SERVICE_FROM_THIS(a) \\r | |
106 | CR (a, DNS_SERVICE, ServiceBinding, DNS_SERVICE_SIGNATURE)\r | |
107 | \r | |
108 | #define DNS_INSTANCE_FROM_THIS_PROTOCOL4(a) \\r | |
109 | CR (a, DNS_INSTANCE, Dns4, DNS_INSTANCE_SIGNATURE)\r | |
110 | \r | |
111 | #define DNS_INSTANCE_FROM_THIS_PROTOCOL6(a) \\r | |
112 | CR (a, DNS_INSTANCE, Dns6, DNS_INSTANCE_SIGNATURE)\r | |
113 | \r | |
114 | \r | |
115 | /**\r | |
116 | Destroy the DNS instance and recycle the resources.\r | |
117 | \r | |
118 | @param[in] Instance The pointer to the DNS instance.\r | |
119 | \r | |
120 | **/\r | |
121 | VOID\r | |
122 | DnsDestroyInstance (\r | |
123 | IN DNS_INSTANCE *Instance\r | |
124 | );\r | |
125 | \r | |
126 | /**\r | |
127 | Create the DNS instance and initialize it.\r | |
128 | \r | |
129 | @param[in] Service The pointer to the DNS service.\r | |
130 | @param[out] Instance The pointer to the DNS instance.\r | |
131 | \r | |
132 | @retval EFI_OUT_OF_RESOURCES Failed to allocate resources.\r | |
133 | @retval EFI_SUCCESS The DNS instance is created.\r | |
134 | \r | |
135 | **/\r | |
136 | EFI_STATUS\r | |
137 | DnsCreateInstance (\r | |
138 | IN DNS_SERVICE *Service,\r | |
139 | OUT DNS_INSTANCE **Instance\r | |
140 | );\r | |
141 | \r | |
142 | /**\r | |
143 | Callback function which provided by user to remove one node in NetDestroyLinkList process.\r | |
144 | \r | |
145 | @param[in] Entry The entry to be removed.\r | |
146 | @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.\r | |
147 | \r | |
148 | @retval EFI_SUCCESS The entry has been removed successfully.\r | |
149 | @retval Others Fail to remove the entry.\r | |
150 | \r | |
151 | **/\r | |
152 | EFI_STATUS\r | |
153 | EFIAPI\r | |
154 | DnsDestroyChildEntryInHandleBuffer (\r | |
155 | IN LIST_ENTRY *Entry,\r | |
156 | IN VOID *Context\r | |
157 | );\r | |
158 | \r | |
159 | /**\r | |
160 | Config a NULL UDP that is used to keep the connection between UDP and DNS.\r | |
161 | \r | |
162 | Just leave the Udp child unconfigured. When UDP is unloaded,\r | |
163 | DNS will be informed with DriverBinding Stop.\r | |
164 | \r | |
165 | @param UdpIo The UDP_IO to configure\r | |
166 | @param Context The opaque parameter to the callback\r | |
167 | \r | |
168 | @retval EFI_SUCCESS It always return EFI_SUCCESS directly.\r | |
169 | \r | |
170 | **/\r | |
171 | EFI_STATUS\r | |
172 | EFIAPI\r | |
173 | DnsConfigNullUdp (\r | |
174 | IN UDP_IO *UdpIo,\r | |
175 | IN VOID *Context\r | |
176 | );\r | |
177 | \r | |
178 | /**\r | |
179 | Release all the resource used the DNS service binding instance.\r | |
180 | \r | |
181 | @param DnsSb The Dns service binding instance.\r | |
182 | \r | |
183 | **/\r | |
184 | VOID\r | |
185 | DnsDestroyService (\r | |
186 | IN DNS_SERVICE *DnsSb\r | |
187 | );\r | |
188 | \r | |
189 | /**\r | |
190 | Create then initialize a Dns service binding instance.\r | |
191 | \r | |
192 | @param Controller The controller to install the DNS service\r | |
193 | binding on\r | |
194 | @param Image The driver binding image of the DNS driver\r | |
195 | @param IpVersion IpVersion for this service\r | |
196 | @param Service The variable to receive the created service\r | |
197 | binding instance.\r | |
198 | \r | |
199 | @retval EFI_OUT_OF_RESOURCES Failed to allocate resource to create the instance.\r | |
200 | @retval EFI_DEVICE_ERROR Failed to create a NULL UDP port to keep\r | |
201 | connection with UDP.\r | |
202 | @retval EFI_SUCCESS The service instance is created for the\r | |
203 | controller.\r | |
204 | \r | |
205 | **/\r | |
206 | EFI_STATUS\r | |
207 | DnsCreateService (\r | |
208 | IN EFI_HANDLE Controller,\r | |
209 | IN EFI_HANDLE Image,\r | |
210 | IN UINT8 IpVersion,\r | |
211 | OUT DNS_SERVICE **Service\r | |
212 | );\r | |
213 | \r | |
214 | /**\r | |
215 | Unloads an image.\r | |
216 | \r | |
217 | @param ImageHandle Handle that identifies the image to be unloaded.\r | |
218 | \r | |
219 | @retval EFI_SUCCESS The image has been unloaded.\r | |
220 | @retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.\r | |
221 | \r | |
222 | **/\r | |
223 | EFI_STATUS \r | |
224 | EFIAPI\r | |
225 | DnsUnload (\r | |
226 | IN EFI_HANDLE ImageHandle\r | |
227 | );\r | |
228 | \r | |
229 | /**\r | |
230 | This is the declaration of an EFI image entry point. This entry point is\r | |
231 | the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including\r | |
232 | both device drivers and bus drivers.\r | |
233 | \r | |
234 | @param ImageHandle The firmware allocated handle for the UEFI image.\r | |
235 | @param SystemTable A pointer to the EFI System Table.\r | |
236 | \r | |
237 | @retval EFI_SUCCESS The operation completed successfully.\r | |
238 | @retval Others An unexpected error occurred.\r | |
239 | **/\r | |
240 | EFI_STATUS\r | |
241 | EFIAPI\r | |
242 | DnsDriverEntryPoint (\r | |
243 | IN EFI_HANDLE ImageHandle,\r | |
244 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
245 | );\r | |
246 | \r | |
247 | /**\r | |
248 | Tests to see if this driver supports a given controller. If a child device is provided, \r | |
249 | it further tests to see if this driver supports creating a handle for the specified child device.\r | |
250 | \r | |
251 | This function checks to see if the driver specified by This supports the device specified by \r | |
252 | ControllerHandle. Drivers will typically use the device path attached to \r | |
253 | ControllerHandle and/or the services from the bus I/O abstraction attached to \r | |
254 | ControllerHandle to determine if the driver supports ControllerHandle. This function \r | |
255 | may be called many times during platform initialization. In order to reduce boot times, the tests \r | |
256 | performed by this function must be very small, and take as little time as possible to execute. This \r | |
257 | function must not change the state of any hardware devices, and this function must be aware that the \r | |
258 | device specified by ControllerHandle may already be managed by the same driver or a \r | |
259 | different driver. This function must match its calls to AllocatePages() with FreePages(), \r | |
260 | AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol(). \r | |
261 | Because ControllerHandle may have been previously started by the same driver, if a protocol is \r | |
262 | already in the opened state, then it must not be closed with CloseProtocol(). This is required \r | |
263 | to guarantee the state of ControllerHandle is not modified by this function.\r | |
264 | \r | |
265 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r | |
266 | @param[in] ControllerHandle The handle of the controller to test. This handle \r | |
267 | must support a protocol interface that supplies \r | |
268 | an I/O abstraction to the driver.\r | |
269 | @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This \r | |
270 | parameter is ignored by device drivers, and is optional for bus \r | |
271 | drivers. For bus drivers, if this parameter is not NULL, then \r | |
272 | the bus driver must determine if the bus controller specified \r | |
273 | by ControllerHandle and the child controller specified \r | |
274 | by RemainingDevicePath are both supported by this \r | |
275 | bus driver.\r | |
276 | \r | |
277 | @retval EFI_SUCCESS The device specified by ControllerHandle and\r | |
278 | RemainingDevicePath is supported by the driver specified by This.\r | |
279 | @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and\r | |
280 | RemainingDevicePath is already being managed by the driver\r | |
281 | specified by This.\r | |
282 | @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and\r | |
283 | RemainingDevicePath is already being managed by a different\r | |
284 | driver or an application that requires exclusive access.\r | |
285 | Currently not implemented.\r | |
286 | @retval EFI_UNSUPPORTED The device specified by ControllerHandle and\r | |
287 | RemainingDevicePath is not supported by the driver specified by This.\r | |
288 | **/\r | |
289 | EFI_STATUS\r | |
290 | EFIAPI\r | |
291 | Dns4DriverBindingSupported (\r | |
292 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
293 | IN EFI_HANDLE ControllerHandle,\r | |
294 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
295 | );\r | |
296 | \r | |
297 | /**\r | |
298 | Starts a device controller or a bus controller.\r | |
299 | \r | |
300 | The Start() function is designed to be invoked from the EFI boot service ConnectController().\r | |
301 | As a result, much of the error checking on the parameters to Start() has been moved into this \r | |
302 | common boot service. It is legal to call Start() from other locations, \r | |
303 | but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r | |
304 | 1. ControllerHandle must be a valid EFI_HANDLE.\r | |
305 | 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r | |
306 | EFI_DEVICE_PATH_PROTOCOL.\r | |
307 | 3. Prior to calling Start(), the Supported() function for the driver specified by This must\r | |
308 | have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. \r | |
309 | \r | |
310 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r | |
311 | @param[in] ControllerHandle The handle of the controller to start. This handle \r | |
312 | must support a protocol interface that supplies \r | |
313 | an I/O abstraction to the driver.\r | |
314 | @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This \r | |
315 | parameter is ignored by device drivers, and is optional for bus \r | |
316 | drivers. For a bus driver, if this parameter is NULL, then handles \r | |
317 | for all the children of Controller are created by this driver. \r | |
318 | If this parameter is not NULL and the first Device Path Node is \r | |
319 | not the End of Device Path Node, then only the handle for the \r | |
320 | child device specified by the first Device Path Node of \r | |
321 | RemainingDevicePath is created by this driver.\r | |
322 | If the first Device Path Node of RemainingDevicePath is \r | |
323 | the End of Device Path Node, no child handle is created by this\r | |
324 | driver.\r | |
325 | \r | |
326 | @retval EFI_SUCCESS The device was started.\r | |
327 | @retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.\r | |
328 | @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r | |
329 | @retval Others The driver failded to start the device.\r | |
330 | \r | |
331 | **/\r | |
332 | EFI_STATUS\r | |
333 | EFIAPI\r | |
334 | Dns4DriverBindingStart (\r | |
335 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
336 | IN EFI_HANDLE ControllerHandle,\r | |
337 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
338 | );\r | |
339 | \r | |
340 | /**\r | |
341 | Stops a device controller or a bus controller.\r | |
342 | \r | |
343 | The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r | |
344 | As a result, much of the error checking on the parameters to Stop() has been moved \r | |
345 | into this common boot service. It is legal to call Stop() from other locations, \r | |
346 | but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r | |
347 | 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r | |
348 | same driver's Start() function.\r | |
349 | 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid\r | |
350 | EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r | |
351 | Start() function, and the Start() function must have called OpenProtocol() on\r | |
352 | ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r | |
353 | \r | |
354 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r | |
355 | @param[in] ControllerHandle A handle to the device being stopped. The handle must \r | |
356 | support a bus specific I/O protocol for the driver \r | |
357 | to use to stop the device.\r | |
358 | @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.\r | |
359 | @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL \r | |
360 | if NumberOfChildren is 0.\r | |
361 | \r | |
362 | @retval EFI_SUCCESS The device was stopped.\r | |
363 | @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.\r | |
364 | \r | |
365 | **/\r | |
366 | EFI_STATUS\r | |
367 | EFIAPI\r | |
368 | Dns4DriverBindingStop (\r | |
369 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
370 | IN EFI_HANDLE ControllerHandle,\r | |
371 | IN UINTN NumberOfChildren,\r | |
372 | IN EFI_HANDLE *ChildHandleBuffer OPTIONAL\r | |
373 | );\r | |
374 | \r | |
375 | /**\r | |
376 | Tests to see if this driver supports a given controller. If a child device is provided, \r | |
377 | it further tests to see if this driver supports creating a handle for the specified child device.\r | |
378 | \r | |
379 | This function checks to see if the driver specified by This supports the device specified by \r | |
380 | ControllerHandle. Drivers will typically use the device path attached to \r | |
381 | ControllerHandle and/or the services from the bus I/O abstraction attached to \r | |
382 | ControllerHandle to determine if the driver supports ControllerHandle. This function \r | |
383 | may be called many times during platform initialization. In order to reduce boot times, the tests \r | |
384 | performed by this function must be very small, and take as little time as possible to execute. This \r | |
385 | function must not change the state of any hardware devices, and this function must be aware that the \r | |
386 | device specified by ControllerHandle may already be managed by the same driver or a \r | |
387 | different driver. This function must match its calls to AllocatePages() with FreePages(), \r | |
388 | AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol(). \r | |
389 | Because ControllerHandle may have been previously started by the same driver, if a protocol is \r | |
390 | already in the opened state, then it must not be closed with CloseProtocol(). This is required \r | |
391 | to guarantee the state of ControllerHandle is not modified by this function.\r | |
392 | \r | |
393 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r | |
394 | @param[in] ControllerHandle The handle of the controller to test. This handle \r | |
395 | must support a protocol interface that supplies \r | |
396 | an I/O abstraction to the driver.\r | |
397 | @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This \r | |
398 | parameter is ignored by device drivers, and is optional for bus \r | |
399 | drivers. For bus drivers, if this parameter is not NULL, then \r | |
400 | the bus driver must determine if the bus controller specified \r | |
401 | by ControllerHandle and the child controller specified \r | |
402 | by RemainingDevicePath are both supported by this \r | |
403 | bus driver.\r | |
404 | \r | |
405 | @retval EFI_SUCCESS The device specified by ControllerHandle and\r | |
406 | RemainingDevicePath is supported by the driver specified by This.\r | |
407 | @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and\r | |
408 | RemainingDevicePath is already being managed by the driver\r | |
409 | specified by This.\r | |
410 | @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and\r | |
411 | RemainingDevicePath is already being managed by a different\r | |
412 | driver or an application that requires exclusive access.\r | |
413 | Currently not implemented.\r | |
414 | @retval EFI_UNSUPPORTED The device specified by ControllerHandle and\r | |
415 | RemainingDevicePath is not supported by the driver specified by This.\r | |
416 | **/\r | |
417 | EFI_STATUS\r | |
418 | EFIAPI\r | |
419 | Dns6DriverBindingSupported (\r | |
420 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
421 | IN EFI_HANDLE ControllerHandle,\r | |
422 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
423 | );\r | |
424 | \r | |
425 | /**\r | |
426 | Starts a device controller or a bus controller.\r | |
427 | \r | |
428 | The Start() function is designed to be invoked from the EFI boot service ConnectController().\r | |
429 | As a result, much of the error checking on the parameters to Start() has been moved into this \r | |
430 | common boot service. It is legal to call Start() from other locations, \r | |
431 | but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r | |
432 | 1. ControllerHandle must be a valid EFI_HANDLE.\r | |
433 | 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r | |
434 | EFI_DEVICE_PATH_PROTOCOL.\r | |
435 | 3. Prior to calling Start(), the Supported() function for the driver specified by This must\r | |
436 | have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. \r | |
437 | \r | |
438 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r | |
439 | @param[in] ControllerHandle The handle of the controller to start. This handle \r | |
440 | must support a protocol interface that supplies \r | |
441 | an I/O abstraction to the driver.\r | |
442 | @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This \r | |
443 | parameter is ignored by device drivers, and is optional for bus \r | |
444 | drivers. For a bus driver, if this parameter is NULL, then handles \r | |
445 | for all the children of Controller are created by this driver. \r | |
446 | If this parameter is not NULL and the first Device Path Node is \r | |
447 | not the End of Device Path Node, then only the handle for the \r | |
448 | child device specified by the first Device Path Node of \r | |
449 | RemainingDevicePath is created by this driver.\r | |
450 | If the first Device Path Node of RemainingDevicePath is \r | |
451 | the End of Device Path Node, no child handle is created by this\r | |
452 | driver.\r | |
453 | \r | |
454 | @retval EFI_SUCCESS The device was started.\r | |
455 | @retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.\r | |
456 | @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r | |
457 | @retval Others The driver failded to start the device.\r | |
458 | \r | |
459 | **/\r | |
460 | EFI_STATUS\r | |
461 | EFIAPI\r | |
462 | Dns6DriverBindingStart (\r | |
463 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
464 | IN EFI_HANDLE ControllerHandle,\r | |
465 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
466 | );\r | |
467 | \r | |
468 | /**\r | |
469 | Stops a device controller or a bus controller.\r | |
470 | \r | |
471 | The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r | |
472 | As a result, much of the error checking on the parameters to Stop() has been moved \r | |
473 | into this common boot service. It is legal to call Stop() from other locations, \r | |
474 | but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r | |
475 | 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r | |
476 | same driver's Start() function.\r | |
477 | 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid\r | |
478 | EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r | |
479 | Start() function, and the Start() function must have called OpenProtocol() on\r | |
480 | ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r | |
481 | \r | |
482 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r | |
483 | @param[in] ControllerHandle A handle to the device being stopped. The handle must \r | |
484 | support a bus specific I/O protocol for the driver \r | |
485 | to use to stop the device.\r | |
486 | @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.\r | |
487 | @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL \r | |
488 | if NumberOfChildren is 0.\r | |
489 | \r | |
490 | @retval EFI_SUCCESS The device was stopped.\r | |
491 | @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.\r | |
492 | \r | |
493 | **/\r | |
494 | EFI_STATUS\r | |
495 | EFIAPI\r | |
496 | Dns6DriverBindingStop (\r | |
497 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
498 | IN EFI_HANDLE ControllerHandle,\r | |
499 | IN UINTN NumberOfChildren,\r | |
500 | IN EFI_HANDLE *ChildHandleBuffer OPTIONAL\r | |
501 | );\r | |
502 | \r | |
503 | /**\r | |
504 | Creates a child handle and installs a protocol.\r | |
505 | \r | |
506 | The CreateChild() function installs a protocol on ChildHandle. \r | |
507 | If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. \r | |
508 | If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.\r | |
509 | \r | |
510 | @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r | |
511 | @param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL,\r | |
512 | then a new handle is created. If it is a pointer to an existing UEFI handle, \r | |
513 | then the protocol is added to the existing UEFI handle.\r | |
514 | \r | |
515 | @retval EFI_SUCCES The protocol was added to ChildHandle.\r | |
516 | @retval EFI_INVALID_PARAMETER ChildHandle is NULL.\r | |
517 | @retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create\r | |
518 | the child\r | |
519 | @retval other The child handle was not created\r | |
520 | \r | |
521 | **/\r | |
522 | EFI_STATUS\r | |
523 | EFIAPI\r | |
524 | Dns4ServiceBindingCreateChild (\r | |
525 | IN EFI_SERVICE_BINDING_PROTOCOL *This,\r | |
526 | IN EFI_HANDLE *ChildHandle\r | |
527 | );\r | |
528 | \r | |
529 | /**\r | |
530 | Destroys a child handle with a protocol installed on it.\r | |
531 | \r | |
532 | The DestroyChild() function does the opposite of CreateChild(). It removes a protocol \r | |
533 | that was installed by CreateChild() from ChildHandle. If the removed protocol is the \r | |
534 | last protocol on ChildHandle, then ChildHandle is destroyed.\r | |
535 | \r | |
536 | @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r | |
537 | @param[in] ChildHandle Handle of the child to destroy\r | |
538 | \r | |
539 | @retval EFI_SUCCES The protocol was removed from ChildHandle.\r | |
540 | @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.\r | |
541 | @retval EFI_INVALID_PARAMETER Child handle is NULL.\r | |
542 | @retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle\r | |
543 | because its services are being used.\r | |
544 | @retval other The child handle was not destroyed\r | |
545 | \r | |
546 | **/\r | |
547 | EFI_STATUS\r | |
548 | EFIAPI\r | |
549 | Dns4ServiceBindingDestroyChild (\r | |
550 | IN EFI_SERVICE_BINDING_PROTOCOL *This,\r | |
551 | IN EFI_HANDLE ChildHandle\r | |
552 | );\r | |
553 | \r | |
554 | /**\r | |
555 | Creates a child handle and installs a protocol.\r | |
556 | \r | |
557 | The CreateChild() function installs a protocol on ChildHandle. \r | |
558 | If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. \r | |
559 | If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.\r | |
560 | \r | |
561 | @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r | |
562 | @param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL,\r | |
563 | then a new handle is created. If it is a pointer to an existing UEFI handle, \r | |
564 | then the protocol is added to the existing UEFI handle.\r | |
565 | \r | |
566 | @retval EFI_SUCCES The protocol was added to ChildHandle.\r | |
567 | @retval EFI_INVALID_PARAMETER ChildHandle is NULL.\r | |
568 | @retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create\r | |
569 | the child\r | |
570 | @retval other The child handle was not created\r | |
571 | \r | |
572 | **/\r | |
573 | EFI_STATUS\r | |
574 | EFIAPI\r | |
575 | Dns6ServiceBindingCreateChild (\r | |
576 | IN EFI_SERVICE_BINDING_PROTOCOL *This,\r | |
577 | IN EFI_HANDLE *ChildHandle\r | |
578 | );\r | |
579 | \r | |
580 | /**\r | |
581 | Destroys a child handle with a protocol installed on it.\r | |
582 | \r | |
583 | The DestroyChild() function does the opposite of CreateChild(). It removes a protocol \r | |
584 | that was installed by CreateChild() from ChildHandle. If the removed protocol is the \r | |
585 | last protocol on ChildHandle, then ChildHandle is destroyed.\r | |
586 | \r | |
587 | @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r | |
588 | @param[in] ChildHandle Handle of the child to destroy\r | |
589 | \r | |
590 | @retval EFI_SUCCES The protocol was removed from ChildHandle.\r | |
591 | @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.\r | |
592 | @retval EFI_INVALID_PARAMETER Child handle is NULL.\r | |
593 | @retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle\r | |
594 | because its services are being used.\r | |
595 | @retval other The child handle was not destroyed\r | |
596 | \r | |
597 | **/\r | |
598 | EFI_STATUS\r | |
599 | EFIAPI\r | |
600 | Dns6ServiceBindingDestroyChild (\r | |
601 | IN EFI_SERVICE_BINDING_PROTOCOL *This,\r | |
602 | IN EFI_HANDLE ChildHandle\r | |
603 | );\r | |
604 | \r | |
605 | \r | |
606 | #endif\r |