]>
Commit | Line | Data |
---|---|---|
83cbd279 | 1 | /** @file\r |
402fa70f | 2 | Header file for IP4Config driver.\r |
83cbd279 | 3 | \r |
5f6aee0f | 4 | Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r |
e5eed7d3 | 5 | This program and the accompanying materials\r |
83cbd279 | 6 | are licensed and made available under the terms and conditions of the BSD License\r |
402fa70f | 7 | which accompanies this distribution. The full text of the license may be found at<BR>\r |
83cbd279 | 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 | |
83cbd279 | 13 | **/\r |
14 | \r | |
402fa70f | 15 | #ifndef _EFI_IP4CONFIG_H_\r |
16 | #define _EFI_IP4CONFIG_H_\r | |
83cbd279 | 17 | \r |
c8d8f1e3 | 18 | #include <Uefi.h>\r |
b2570da8 | 19 | \r |
20 | #include <Protocol/Dhcp4.h>\r | |
24e58768 | 21 | #include <Protocol/Ip4Config.h>\r |
b2570da8 | 22 | #include <Protocol/ManagedNetwork.h>\r |
63886849 | 23 | #include <Protocol/HiiConfigAccess.h>\r |
24 | #include <Protocol/HiiDatabase.h>\r | |
25 | #include <Protocol/HiiConfigRouting.h>\r | |
d80ea739 | 26 | #include <Protocol/ServiceBinding.h>\r |
b2570da8 | 27 | \r |
63886849 | 28 | #include <Guid/MdeModuleHii.h>\r |
74df5026 | 29 | #include <Guid/NicIp4ConfigNvData.h>\r |
63886849 | 30 | \r |
31 | #include <Library/DevicePathLib.h>\r | |
b2570da8 | 32 | #include <Library/DebugLib.h>\r |
33 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
34 | #include <Library/UefiDriverEntryPoint.h>\r | |
35 | #include <Library/UefiBootServicesTableLib.h>\r | |
36 | #include <Library/UefiLib.h>\r | |
37 | #include <Library/NetLib.h>\r | |
38 | #include <Library/BaseMemoryLib.h>\r | |
83cbd279 | 39 | #include <Library/MemoryAllocationLib.h>\r |
63886849 | 40 | #include <Library/HiiLib.h>\r |
41 | #include <Library/PrintLib.h>\r | |
d8d26fb2 | 42 | #include <Library/DpcLib.h>\r |
d80ea739 | 43 | #include <Library/UefiHiiServicesLib.h>\r |
83cbd279 | 44 | \r |
83cbd279 | 45 | \r |
c8d8f1e3 | 46 | //\r |
63886849 | 47 | // Global variables\r |
c8d8f1e3 | 48 | //\r |
f6b7393c | 49 | extern EFI_DRIVER_BINDING_PROTOCOL gIp4ConfigDriverBinding;\r |
50 | extern EFI_COMPONENT_NAME_PROTOCOL gIp4ConfigComponentName;\r | |
51 | extern EFI_COMPONENT_NAME2_PROTOCOL gIp4ConfigComponentName2;\r | |
d80ea739 | 52 | \r |
f6b7393c | 53 | extern EFI_IP4_CONFIG_PROTOCOL mIp4ConfigProtocolTemplate;\r |
c8d8f1e3 | 54 | \r |
55 | #define IP4_PROTO_ICMP 0x01\r | |
56 | #define IP4_CONFIG_INSTANCE_SIGNATURE SIGNATURE_32 ('I', 'P', '4', 'C')\r | |
57 | \r | |
f6b7393c | 58 | #define IP4_CONFIG_STATE_IDLE 0\r |
59 | #define IP4_CONFIG_STATE_STARTED 1\r | |
60 | #define IP4_CONFIG_STATE_CONFIGURED 2\r | |
61 | \r | |
62 | #define DHCP_TAG_PARA_LIST 55\r | |
63 | #define DHCP_TAG_NETMASK 1\r | |
64 | #define DHCP_TAG_ROUTER 3\r | |
65 | \r | |
83cbd279 | 66 | \r |
67 | //\r | |
68 | // Configure the DHCP to request the routers and netmask\r | |
69 | // from server. The DHCP_TAG_NETMASK is included in Head.\r | |
70 | //\r | |
71 | #pragma pack(1)\r | |
72 | typedef struct {\r | |
73 | EFI_DHCP4_PACKET_OPTION Head;\r | |
74 | UINT8 Route;\r | |
75 | } IP4_CONFIG_DHCP4_OPTION;\r | |
76 | #pragma pack()\r | |
77 | \r | |
d80ea739 | 78 | typedef struct _IP4CONFIG_CALLBACK_INFO {\r |
c22b6cdf | 79 | BOOLEAN Configured;\r |
80 | BOOLEAN DhcpEnabled;\r | |
d80ea739 | 81 | EFI_IPv4_ADDRESS LocalIp;\r |
82 | EFI_IPv4_ADDRESS SubnetMask;\r | |
83 | EFI_IPv4_ADDRESS Gateway;\r | |
84 | } IP4_SETTING_INFO;\r | |
63886849 | 85 | \r |
72ed3d75 | 86 | typedef struct _IP4_CONFIG_INSTANCE {\r |
d80ea739 | 87 | UINT32 Signature;\r |
88 | EFI_HANDLE Controller;\r | |
89 | EFI_HANDLE Image;\r | |
90 | EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;\r | |
83cbd279 | 91 | \r |
d80ea739 | 92 | EFI_IP4_CONFIG_PROTOCOL Ip4ConfigProtocol;\r |
63886849 | 93 | \r |
d80ea739 | 94 | EFI_HII_CONFIG_ACCESS_PROTOCOL HiiConfigAccessProtocol;\r |
95 | EFI_HANDLE ChildHandle;\r | |
96 | EFI_DEVICE_PATH_PROTOCOL *HiiVendorDevicePath;\r | |
97 | EFI_HII_HANDLE RegisteredHandle;\r | |
98 | IP4_SETTING_INFO Ip4ConfigCallbackInfo;\r | |
83cbd279 | 99 | \r |
100 | //\r | |
101 | // NicConfig's state, such as IP4_CONFIG_STATE_IDLE\r | |
102 | //\r | |
d80ea739 | 103 | INTN State;\r |
83cbd279 | 104 | \r |
105 | //\r | |
106 | // Mnp child to keep the connection with MNP.\r | |
107 | //\r | |
d80ea739 | 108 | EFI_MANAGED_NETWORK_PROTOCOL *Mnp;\r |
109 | EFI_HANDLE MnpHandle;\r | |
83cbd279 | 110 | \r |
111 | //\r | |
112 | // User's requests data\r | |
113 | //\r | |
d80ea739 | 114 | EFI_EVENT DoneEvent;\r |
115 | EFI_EVENT ReconfigEvent;\r | |
116 | EFI_STATUS Result;\r | |
83cbd279 | 117 | \r |
118 | //\r | |
119 | // Identity of this interface and some configuration info.\r | |
120 | //\r | |
d80ea739 | 121 | NIC_ADDR NicAddr;\r |
74df5026 | 122 | CHAR16 *MacString;\r |
d80ea739 | 123 | NIC_IP4_CONFIG_INFO *NicConfig;\r |
83cbd279 | 124 | \r |
125 | //\r | |
126 | // DHCP handles to access DHCP\r | |
127 | //\r | |
d80ea739 | 128 | EFI_DHCP4_PROTOCOL *Dhcp4;\r |
129 | EFI_HANDLE Dhcp4Handle;\r | |
130 | EFI_EVENT Dhcp4Event;\r | |
9f82599a | 131 | \r |
132 | //\r | |
133 | // A dedicated timer is used to poll underlying media status\r | |
134 | //\r | |
135 | EFI_EVENT Timer;\r | |
136 | \r | |
137 | //\r | |
138 | // Underlying media present status. \r | |
139 | //\r | |
5f6aee0f | 140 | BOOLEAN MediaPresent;\r |
141 | \r | |
142 | //\r | |
143 | // A flag to indicate EfiIp4ConfigStart should not run\r | |
144 | //\r | |
145 | BOOLEAN DoNotStart;\r | |
72ed3d75 | 146 | } IP4_CONFIG_INSTANCE;\r |
83cbd279 | 147 | \r |
148 | #define IP4_CONFIG_INSTANCE_FROM_IP4CONFIG(this) \\r | |
149 | CR (this, IP4_CONFIG_INSTANCE, Ip4ConfigProtocol, IP4_CONFIG_INSTANCE_SIGNATURE)\r | |
150 | \r | |
d80ea739 | 151 | #define IP4_CONFIG_INSTANCE_FROM_CONFIG_ACCESS(this) \\r |
152 | CR (this, IP4_CONFIG_INSTANCE, HiiConfigAccessProtocol, IP4_CONFIG_INSTANCE_SIGNATURE)\r | |
63886849 | 153 | \r |
154 | \r | |
155 | /**\r | |
d80ea739 | 156 | Set the IP configure parameters for this NIC.\r |
63886849 | 157 | \r |
d80ea739 | 158 | If Reconfig is TRUE, the IP driver will be informed to discard current\r |
159 | auto configure parameter and restart the auto configuration process.\r | |
63886849 | 160 | If current there is a pending auto configuration, EFI_ALREADY_STARTED is\r |
161 | returned. You can only change the configure setting when either\r | |
162 | the configure has finished or not started yet. If NicConfig, the\r | |
163 | NIC's configure parameter is removed from the variable.\r | |
164 | \r | |
165 | @param Instance The IP4 CONFIG instance.\r | |
d80ea739 | 166 | @param NicConfig The new NIC IP4 configure parameter.\r |
63886849 | 167 | @param Reconfig Inform the IP4 driver to restart the auto\r |
d80ea739 | 168 | configuration.\r |
169 | \r | |
170 | @retval EFI_SUCCESS The configure parameter for this NIC was\r | |
171 | set successfully.\r | |
63886849 | 172 | @retval EFI_INVALID_PARAMETER This is NULL or the configure parameter is\r |
173 | invalid.\r | |
174 | @retval EFI_ALREADY_STARTED There is a pending auto configuration.\r | |
d80ea739 | 175 | @retval EFI_NOT_FOUND No auto configure parameter is found.\r |
63886849 | 176 | \r |
177 | **/\r | |
178 | EFI_STATUS\r | |
179 | EFIAPI\r | |
180 | EfiNicIp4ConfigSetInfo (\r | |
181 | IN IP4_CONFIG_INSTANCE *Instance,\r | |
182 | IN NIC_IP4_CONFIG_INFO *NicConfig OPTIONAL,\r | |
183 | IN BOOLEAN Reconfig\r | |
184 | );\r | |
185 | \r | |
186 | /**\r | |
74df5026 | 187 | Get the NIC's configure information from the IP4 configure variable.\r |
188 | It will remove the invalid variable.\r | |
63886849 | 189 | \r |
74df5026 | 190 | @param Instance The IP4 CONFIG instance.\r |
63886849 | 191 | \r |
74df5026 | 192 | @return NULL if no configure for the NIC in the variable, or it is invalid.\r |
193 | Otherwise the pointer to the NIC's IP configure parameter will be returned.\r | |
63886849 | 194 | \r |
195 | **/\r | |
74df5026 | 196 | NIC_IP4_CONFIG_INFO *\r |
63886849 | 197 | EfiNicIp4ConfigGetInfo (\r |
74df5026 | 198 | IN IP4_CONFIG_INSTANCE *Instance\r |
63886849 | 199 | );\r |
83cbd279 | 200 | \r |
7bce0c5a | 201 | /**\r |
202 | Release all the DHCP related resources.\r | |
203 | \r | |
204 | @param This The IP4 configure instance\r | |
205 | \r | |
206 | @return None\r | |
207 | \r | |
208 | **/\r | |
83cbd279 | 209 | VOID\r |
210 | Ip4ConfigCleanDhcp4 (\r | |
c8d8f1e3 | 211 | IN IP4_CONFIG_INSTANCE *This\r |
83cbd279 | 212 | );\r |
213 | \r | |
7bce0c5a | 214 | /**\r |
215 | Clean up all the configuration parameters.\r | |
216 | \r | |
217 | @param Instance The IP4 configure instance\r | |
218 | \r | |
219 | @return None\r | |
220 | \r | |
221 | **/\r | |
83cbd279 | 222 | VOID\r |
223 | Ip4ConfigCleanConfig (\r | |
224 | IN IP4_CONFIG_INSTANCE *Instance\r | |
225 | );\r | |
63886849 | 226 | \r |
c8d8f1e3 | 227 | //\r |
228 | // EFI Component Name Functions\r | |
229 | //\r | |
230 | \r | |
231 | /**\r | |
232 | Retrieves a Unicode string that is the user readable name of the driver.\r | |
233 | \r | |
234 | This function retrieves the user readable name of a driver in the form of a\r | |
235 | Unicode string. If the driver specified by This has a user readable name in\r | |
236 | the language specified by Language, then a pointer to the driver name is\r | |
237 | returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r | |
238 | by This does not support the language specified by Language,\r | |
239 | then EFI_UNSUPPORTED is returned.\r | |
240 | \r | |
241 | @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r | |
242 | EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
243 | @param Language[in] A pointer to a Null-terminated ASCII string\r | |
244 | array indicating the language. This is the\r | |
245 | language of the driver name that the caller is\r | |
246 | requesting, and it must match one of the\r | |
247 | languages specified in SupportedLanguages. The\r | |
248 | number of languages supported by a driver is up\r | |
249 | to the driver writer. Language is specified\r | |
63886849 | 250 | in RFC 3066 or ISO 639-2 language code format.\r |
c8d8f1e3 | 251 | @param DriverName[out] A pointer to the Unicode string to return.\r |
252 | This Unicode string is the name of the\r | |
253 | driver specified by This in the language\r | |
254 | specified by Language.\r | |
255 | \r | |
256 | @retval EFI_SUCCESS The Unicode string for the Driver specified by\r | |
257 | This and the language specified by Language was\r | |
258 | returned in DriverName.\r | |
259 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
260 | @retval EFI_INVALID_PARAMETER DriverName is NULL.\r | |
261 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
262 | the language specified by Language.\r | |
263 | \r | |
264 | **/\r | |
265 | EFI_STATUS\r | |
266 | EFIAPI\r | |
267 | Ip4ConfigComponentNameGetDriverName (\r | |
268 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
269 | IN CHAR8 *Language,\r | |
270 | OUT CHAR16 **DriverName\r | |
271 | );\r | |
272 | \r | |
273 | /**\r | |
274 | Retrieves a Unicode string that is the user readable name of the controller\r | |
275 | that is being managed by a driver.\r | |
276 | \r | |
277 | This function retrieves the user readable name of the controller specified by\r | |
278 | ControllerHandle and ChildHandle in the form of a Unicode string. If the\r | |
279 | driver specified by This has a user readable name in the language specified by\r | |
280 | Language, then a pointer to the controller name is returned in ControllerName,\r | |
281 | and EFI_SUCCESS is returned. If the driver specified by This is not currently\r | |
282 | managing the controller specified by ControllerHandle and ChildHandle,\r | |
283 | then EFI_UNSUPPORTED is returned. If the driver specified by This does not\r | |
284 | support the language specified by Language, then EFI_UNSUPPORTED is returned.\r | |
285 | \r | |
286 | @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r | |
287 | EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
288 | @param ControllerHandle[in] The handle of a controller that the driver\r | |
289 | specified by This is managing. This handle\r | |
290 | specifies the controller whose name is to be\r | |
291 | returned.\r | |
292 | @param ChildHandle[in] The handle of the child controller to retrieve\r | |
293 | the name of. This is an optional parameter that\r | |
294 | may be NULL. It will be NULL for device\r | |
295 | drivers. It will also be NULL for a bus drivers\r | |
296 | that wish to retrieve the name of the bus\r | |
297 | controller. It will not be NULL for a bus\r | |
298 | driver that wishes to retrieve the name of a\r | |
299 | child controller.\r | |
300 | @param Language[in] A pointer to a Null-terminated ASCII string\r | |
301 | array indicating the language. This is the\r | |
302 | language of the driver name that the caller is\r | |
303 | requesting, and it must match one of the\r | |
304 | languages specified in SupportedLanguages. The\r | |
305 | number of languages supported by a driver is up\r | |
306 | to the driver writer. Language is specified in\r | |
63886849 | 307 | RFC 3066 or ISO 639-2 language code format.\r |
c8d8f1e3 | 308 | @param ControllerName[out] A pointer to the Unicode string to return.\r |
309 | This Unicode string is the name of the\r | |
310 | controller specified by ControllerHandle and\r | |
311 | ChildHandle in the language specified by\r | |
312 | Language from the point of view of the driver\r | |
313 | specified by This.\r | |
63886849 | 314 | \r |
c8d8f1e3 | 315 | @retval EFI_SUCCESS The Unicode string for the user readable name in\r |
316 | the language specified by Language for the\r | |
317 | driver specified by This was returned in\r | |
318 | DriverName.\r | |
284ee2e8 | 319 | @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r |
c8d8f1e3 | 320 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r |
321 | EFI_HANDLE.\r | |
322 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
323 | @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r | |
324 | @retval EFI_UNSUPPORTED The driver specified by This is not currently\r | |
325 | managing the controller specified by\r | |
326 | ControllerHandle and ChildHandle.\r | |
327 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
328 | the language specified by Language.\r | |
329 | \r | |
330 | **/\r | |
331 | EFI_STATUS\r | |
332 | EFIAPI\r | |
333 | Ip4ConfigComponentNameGetControllerName (\r | |
334 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
335 | IN EFI_HANDLE ControllerHandle,\r | |
336 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
337 | IN CHAR8 *Language,\r | |
338 | OUT CHAR16 **ControllerName\r | |
339 | );\r | |
63886849 | 340 | \r |
c8d8f1e3 | 341 | /**\r |
342 | Test to see if this driver supports ControllerHandle.\r | |
343 | \r | |
344 | @param This Protocol instance pointer.\r | |
345 | @param ControllerHandle Handle of device to test\r | |
346 | @param RemainingDevicePath Optional parameter use to pick a specific child\r | |
347 | device to start.\r | |
348 | \r | |
349 | @retval EFI_SUCCES This driver supports this device\r | |
350 | @retval EFI_ALREADY_STARTED This driver is already running on this device\r | |
351 | @retval other This driver does not support this device\r | |
352 | \r | |
353 | **/\r | |
354 | EFI_STATUS\r | |
355 | EFIAPI\r | |
356 | Ip4ConfigDriverBindingSupported (\r | |
357 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
358 | IN EFI_HANDLE ControllerHandle,\r | |
359 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
360 | );\r | |
63886849 | 361 | \r |
c8d8f1e3 | 362 | /**\r |
363 | Start this driver on ControllerHandle.\r | |
364 | \r | |
365 | @param This Protocol instance pointer.\r | |
366 | @param ControllerHandle Handle of device to bind driver to\r | |
367 | @param RemainingDevicePath Optional parameter use to pick a specific child\r | |
368 | device to start.\r | |
369 | \r | |
370 | @retval EFI_SUCCES This driver is added to ControllerHandle\r | |
371 | @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle\r | |
372 | @retval other This driver does not support this device\r | |
373 | \r | |
374 | **/\r | |
375 | EFI_STATUS\r | |
376 | EFIAPI\r | |
377 | Ip4ConfigDriverBindingStart (\r | |
378 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
379 | IN EFI_HANDLE ControllerHandle,\r | |
380 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
381 | );\r | |
63886849 | 382 | \r |
c8d8f1e3 | 383 | /**\r |
384 | Stop this driver on ControllerHandle.\r | |
385 | \r | |
386 | @param This Protocol instance pointer.\r | |
387 | @param ControllerHandle Handle of device to stop driver on\r | |
388 | @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r | |
389 | children is zero stop the entire bus driver.\r | |
390 | @param ChildHandleBuffer List of Child Handles to Stop.\r | |
391 | \r | |
392 | @retval EFI_SUCCES This driver is removed ControllerHandle\r | |
393 | @retval other This driver was not removed from this device\r | |
394 | \r | |
395 | **/\r | |
396 | EFI_STATUS\r | |
397 | EFIAPI\r | |
398 | Ip4ConfigDriverBindingStop (\r | |
399 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
400 | IN EFI_HANDLE ControllerHandle,\r | |
401 | IN UINTN NumberOfChildren,\r | |
402 | IN EFI_HANDLE *ChildHandleBuffer\r | |
403 | );\r | |
63886849 | 404 | \r |
72ed3d75 | 405 | /**\r |
406 | Starts running the configuration policy for the EFI IPv4 Protocol driver.\r | |
407 | \r | |
408 | The Start() function is called to determine and to begin the platform\r | |
409 | configuration policy by the EFI IPv4 Protocol driver. This determination may\r | |
410 | be as simple as returning EFI_UNSUPPORTED if there is no EFI IPv4 Protocol\r | |
411 | driver configuration policy. It may be as involved as loading some defaults\r | |
412 | from nonvolatile storage, downloading dynamic data from a DHCP server, and\r | |
413 | checking permissions with a site policy server.\r | |
414 | Starting the configuration policy is just the beginning. It may finish almost\r | |
415 | instantly or it may take several minutes before it fails to retrieve configuration\r | |
416 | information from one or more servers. Once the policy is started, drivers\r | |
417 | should use the DoneEvent parameter to determine when the configuration policy\r | |
418 | has completed. EFI_IP4_CONFIG_PROTOCOL.GetData() must then be called to\r | |
419 | determine if the configuration succeeded or failed.\r | |
420 | Until the configuration completes successfully, EFI IPv4 Protocol driver instances\r | |
421 | that are attempting to use default configurations must return EFI_NO_MAPPING.\r | |
422 | Once the configuration is complete, the EFI IPv4 Configuration Protocol driver\r | |
423 | signals DoneEvent. The configuration may need to be updated in the future,\r | |
424 | however; in this case, the EFI IPv4 Configuration Protocol driver must signal\r | |
425 | ReconfigEvent, and all EFI IPv4 Protocol driver instances that are using default\r | |
426 | configurations must return EFI_NO_MAPPING until the configuration policy has\r | |
427 | been rerun.\r | |
428 | \r | |
429 | @param This Pointer to the EFI_IP4_CONFIG_PROTOCOL instance.\r | |
430 | @param DoneEvent Event that will be signaled when the EFI IPv4\r | |
431 | Protocol driver configuration policy completes\r | |
432 | execution. This event must be of type EVT_NOTIFY_SIGNAL.\r | |
433 | @param ReconfigEvent Event that will be signaled when the EFI IPv4\r | |
434 | Protocol driver configuration needs to be updated.\r | |
435 | This event must be of type EVT_NOTIFY_SIGNAL.\r | |
436 | \r | |
437 | @retval EFI_SUCCESS The configuration policy for the EFI IPv4 Protocol\r | |
438 | driver is now running.\r | |
439 | @retval EFI_INVALID_PARAMETER One or more of the following parameters is NULL:\r | |
440 | This\r | |
441 | DoneEvent\r | |
442 | ReconfigEvent\r | |
443 | @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r | |
444 | @retval EFI_ALREADY_STARTED The configuration policy for the EFI IPv4 Protocol\r | |
445 | driver was already started.\r | |
446 | @retval EFI_DEVICE_ERROR An unexpected system error or network error occurred.\r | |
447 | @retval EFI_UNSUPPORTED This interface does not support the EFI IPv4 Protocol\r | |
448 | driver configuration.\r | |
449 | \r | |
450 | **/\r | |
451 | EFI_STATUS\r | |
452 | EFIAPI\r | |
453 | EfiIp4ConfigStart (\r | |
454 | IN EFI_IP4_CONFIG_PROTOCOL *This,\r | |
455 | IN EFI_EVENT DoneEvent,\r | |
456 | IN EFI_EVENT ReconfigEvent\r | |
457 | );\r | |
458 | \r | |
459 | /**\r | |
460 | Stops running the configuration policy for the EFI IPv4 Protocol driver.\r | |
461 | \r | |
462 | The Stop() function stops the configuration policy for the EFI IPv4 Protocol driver.\r | |
463 | All configuration data will be lost after calling Stop().\r | |
464 | \r | |
465 | @param This Pointer to the EFI_IP4_CONFIG_PROTOCOL instance.\r | |
466 | \r | |
467 | @retval EFI_SUCCESS The configuration policy for the EFI IPv4 Protocol\r | |
468 | driver has been stopped.\r | |
469 | @retval EFI_INVALID_PARAMETER This is NULL.\r | |
470 | @retval EFI_NOT_STARTED The configuration policy for the EFI IPv4 Protocol\r | |
471 | driver was not started.\r | |
472 | \r | |
473 | **/\r | |
474 | EFI_STATUS\r | |
475 | EFIAPI\r | |
476 | EfiIp4ConfigStop (\r | |
477 | IN EFI_IP4_CONFIG_PROTOCOL *This\r | |
478 | );\r | |
479 | \r | |
480 | /**\r | |
481 | Returns the default configuration data (if any) for the EFI IPv4 Protocol driver.\r | |
482 | \r | |
483 | The GetData() function returns the current configuration data for the EFI IPv4\r | |
484 | Protocol driver after the configuration policy has completed.\r | |
485 | \r | |
486 | @param This Pointer to the EFI_IP4_CONFIG_PROTOCOL instance.\r | |
487 | @param ConfigDataSize On input, the size of the ConfigData buffer.\r | |
488 | On output, the count of bytes that were written\r | |
489 | into the ConfigData buffer.\r | |
490 | @param ConfigData Pointer to the EFI IPv4 Configuration Protocol\r | |
491 | driver configuration data structure.\r | |
492 | Type EFI_IP4_IPCONFIG_DATA is defined in\r | |
493 | "Related Definitions" below.\r | |
494 | \r | |
495 | @retval EFI_SUCCESS The EFI IPv4 Protocol driver configuration has been returned.\r | |
496 | @retval EFI_INVALID_PARAMETER This is NULL.\r | |
497 | @retval EFI_NOT_STARTED The configuration policy for the EFI IPv4 Protocol\r | |
498 | driver is not running.\r | |
499 | @retval EFI_NOT_READY EFI IPv4 Protocol driver configuration is still running.\r | |
500 | @retval EFI_ABORTED EFI IPv4 Protocol driver configuration could not complete.\r | |
501 | Currently not implemented.\r | |
502 | @retval EFI_BUFFER_TOO_SMALL *ConfigDataSize is smaller than the configuration\r | |
503 | data buffer or ConfigData is NULL.\r | |
504 | \r | |
505 | **/\r | |
506 | EFI_STATUS\r | |
507 | EFIAPI\r | |
508 | EfiIp4ConfigGetData (\r | |
509 | IN EFI_IP4_CONFIG_PROTOCOL *This,\r | |
510 | IN OUT UINTN *ConfigDataSize,\r | |
511 | OUT EFI_IP4_IPCONFIG_DATA *ConfigData OPTIONAL\r | |
512 | );\r | |
513 | \r | |
9f82599a | 514 | /**\r |
515 | A dedicated timer is used to poll underlying media status. In case of\r | |
516 | cable swap, a new round auto configuration will be initiated. The timer \r | |
517 | will signal the IP4 to run the auto configuration again. IP4 driver will free\r | |
518 | old IP address related resource, such as route table and Interface, then\r | |
519 | initiate a DHCP round by IP4Config->Start to acquire new IP, eventually\r | |
520 | create route table for new IP address.\r | |
521 | \r | |
522 | @param[in] Event The IP4 service instance's heart beat timer.\r | |
523 | @param[in] Context The IP4 service instance.\r | |
524 | \r | |
525 | **/\r | |
526 | VOID\r | |
527 | EFIAPI\r | |
528 | MediaChangeDetect (\r | |
529 | IN EFI_EVENT Event,\r | |
530 | IN VOID *Context\r | |
531 | );\r | |
532 | \r | |
83cbd279 | 533 | #endif\r |