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