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