]> git.proxmox.com Git - mirror_edk2.git/blob - NetworkPkg/Ip6Dxe/Ip6Driver.h
48ffe7b06b2d51f2aaafcf8a9367fa3cd6510030
[mirror_edk2.git] / NetworkPkg / Ip6Dxe / Ip6Driver.h
1 /** @file
2 The driver binding and service binding protocol for IP6 driver.
3
4 Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
5
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef __EFI_IP6_DRIVER_H__
17 #define __EFI_IP6_DRIVER_H__
18
19 extern EFI_DRIVER_BINDING_PROTOCOL gIp6DriverBinding;
20 extern EFI_COMPONENT_NAME_PROTOCOL gIp6ComponentName;
21 extern EFI_COMPONENT_NAME2_PROTOCOL gIp6ComponentName2;
22
23 /**
24 Clean up an IP6 service binding instance. It releases all
25 the resource allocated by the instance. The instance may be
26 partly initialized, or partly destroyed. If a resource is
27 destroyed, it is marked as that in case the destory failed and
28 being called again later.
29
30 @param[in] IpSb The IP6 service binding instance to clean up.
31
32 @retval EFI_SUCCESS The resource used by the instance are cleaned up.
33 @retval Others Failed to clean up some of the resources.
34
35 **/
36 EFI_STATUS
37 Ip6CleanService (
38 IN IP6_SERVICE *IpSb
39 );
40
41 //
42 // Function prototype for the driver's entry point
43 //
44
45 /**
46 This is the declaration of an EFI image entry point. This entry point is
47 the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including
48 both device drivers and bus drivers.
49
50 The entry point for IP6 driver which installs the driver
51 binding and component name protocol on its image.
52
53 @param[in] ImageHandle The firmware allocated handle for the UEFI image.
54 @param[in] SystemTable A pointer to the EFI System Table.
55
56 @retval EFI_SUCCESS The operation completed successfully.
57 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
58
59 **/
60 EFI_STATUS
61 EFIAPI
62 Ip6DriverEntryPoint (
63 IN EFI_HANDLE ImageHandle,
64 IN EFI_SYSTEM_TABLE *SystemTable
65 );
66
67 //
68 // Function prototypes for the Drivr Binding Protocol
69 //
70
71 /**
72 Test to see if this driver supports ControllerHandle.
73
74 @param[in] This Protocol instance pointer.
75 @param[in] ControllerHandle Handle of device to test.
76 @param[in] RemainingDevicePath Optional parameter use to pick a specific child
77 device to start.
78
79 @retval EFI_SUCCESS This driver supports this device.
80 @retval EFI_ALREADY_STARTED This driver is already running on this device.
81 @retval other This driver does not support this device.
82
83 **/
84 EFI_STATUS
85 EFIAPI
86 Ip6DriverBindingSupported (
87 IN EFI_DRIVER_BINDING_PROTOCOL *This,
88 IN EFI_HANDLE ControllerHandle,
89 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
90 );
91
92 /**
93 Start this driver on ControllerHandle.
94
95 @param[in] This Protocol instance pointer.
96 @param[in] ControllerHandle Handle of device to bind driver to.
97 @param[in] RemainingDevicePath Optional parameter used to pick a specific child
98 device to start.
99
100 @retval EFI_SUCCES This driver is added to ControllerHandle.
101 @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle.
102 @retval other This driver does not support this device.
103
104 **/
105 EFI_STATUS
106 EFIAPI
107 Ip6DriverBindingStart (
108 IN EFI_DRIVER_BINDING_PROTOCOL *This,
109 IN EFI_HANDLE ControllerHandle,
110 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
111 );
112
113 /**
114 Stop this driver on ControllerHandle.
115
116 @param[in] This Protocol instance pointer.
117 @param[in] ControllerHandle Handle of device to stop driver on.
118 @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number
119 of children is zero, stop the entire bus driver.
120 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
121 if NumberOfChildren is 0.
122
123 @retval EFI_SUCCESS The device was stopped.
124 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.
125
126 **/
127 EFI_STATUS
128 EFIAPI
129 Ip6DriverBindingStop (
130 IN EFI_DRIVER_BINDING_PROTOCOL *This,
131 IN EFI_HANDLE ControllerHandle,
132 IN UINTN NumberOfChildren,
133 IN EFI_HANDLE *ChildHandleBuffer OPTIONAL
134 );
135
136 //
137 // Function ptototypes for the ServiceBinding Prococol
138 //
139
140 /**
141 Creates a child handle with a set of I/O services.
142
143 @param[in] This Protocol instance pointer.
144 @param[in] ChildHandle Pointer to the handle of the child to create. If
145 it is NULL, then a new handle is created. If it
146 is not NULL, then the I/O services are added to
147 the existing child handle.
148
149 @retval EFI_SUCCES The child handle was created with the I/O services.
150 @retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create
151 the child.
152 @retval other The child handle was not created.
153
154 **/
155 EFI_STATUS
156 EFIAPI
157 Ip6ServiceBindingCreateChild (
158 IN EFI_SERVICE_BINDING_PROTOCOL *This,
159 IN EFI_HANDLE *ChildHandle
160 );
161
162 /**
163 Destroys a child handle with a set of I/O services.
164
165 @param[in] This Protocol instance pointer.
166 @param[in] ChildHandle Handle of the child to destroy.
167
168 @retval EFI_SUCCES The I/O services were removed from the child
169 handle.
170 @retval EFI_UNSUPPORTED The child handle does not support the I/O services
171 that are being removed.
172 @retval EFI_INVALID_PARAMETER Child handle is NULL.
173 @retval EFI_ACCESS_DENIED The child handle could not be destroyed because
174 its I/O services are being used.
175 @retval other The child handle was not destroyed.
176
177 **/
178 EFI_STATUS
179 EFIAPI
180 Ip6ServiceBindingDestroyChild (
181 IN EFI_SERVICE_BINDING_PROTOCOL *This,
182 IN EFI_HANDLE ChildHandle
183 );
184
185 #endif