]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.h
Fix the comments to follow UEFI Spec regarding how to check an EFI_HANDLE is valid...
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4ConfigDxe / Ip4Config.h
CommitLineData
83cbd279 1/** @file\r
402fa70f 2 Header file for IP4Config driver.\r
83cbd279 3\r
9f82599a 4Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
e5eed7d3 5This program and the accompanying materials\r
83cbd279 6are licensed and made available under the terms and conditions of the BSD License\r
402fa70f 7which accompanies this distribution. The full text of the license may be found at<BR>\r
83cbd279 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
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 49extern EFI_DRIVER_BINDING_PROTOCOL gIp4ConfigDriverBinding;\r
50extern EFI_COMPONENT_NAME_PROTOCOL gIp4ConfigComponentName;\r
51extern EFI_COMPONENT_NAME2_PROTOCOL gIp4ConfigComponentName2;\r
d80ea739 52\r
f6b7393c 53extern 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
72typedef 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 78typedef 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 86typedef 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
140 BOOLEAN MediaPresent; \r
72ed3d75 141} IP4_CONFIG_INSTANCE;\r
83cbd279 142\r
143#define IP4_CONFIG_INSTANCE_FROM_IP4CONFIG(this) \\r
144 CR (this, IP4_CONFIG_INSTANCE, Ip4ConfigProtocol, IP4_CONFIG_INSTANCE_SIGNATURE)\r
145\r
d80ea739 146#define IP4_CONFIG_INSTANCE_FROM_CONFIG_ACCESS(this) \\r
147 CR (this, IP4_CONFIG_INSTANCE, HiiConfigAccessProtocol, IP4_CONFIG_INSTANCE_SIGNATURE)\r
63886849 148\r
149\r
150/**\r
d80ea739 151 Set the IP configure parameters for this NIC.\r
63886849 152\r
d80ea739 153 If Reconfig is TRUE, the IP driver will be informed to discard current\r
154 auto configure parameter and restart the auto configuration process.\r
63886849 155 If current there is a pending auto configuration, EFI_ALREADY_STARTED is\r
156 returned. You can only change the configure setting when either\r
157 the configure has finished or not started yet. If NicConfig, the\r
158 NIC's configure parameter is removed from the variable.\r
159\r
160 @param Instance The IP4 CONFIG instance.\r
d80ea739 161 @param NicConfig The new NIC IP4 configure parameter.\r
63886849 162 @param Reconfig Inform the IP4 driver to restart the auto\r
d80ea739 163 configuration.\r
164\r
165 @retval EFI_SUCCESS The configure parameter for this NIC was\r
166 set successfully.\r
63886849 167 @retval EFI_INVALID_PARAMETER This is NULL or the configure parameter is\r
168 invalid.\r
169 @retval EFI_ALREADY_STARTED There is a pending auto configuration.\r
d80ea739 170 @retval EFI_NOT_FOUND No auto configure parameter is found.\r
63886849 171\r
172**/\r
173EFI_STATUS\r
174EFIAPI\r
175EfiNicIp4ConfigSetInfo (\r
176 IN IP4_CONFIG_INSTANCE *Instance,\r
177 IN NIC_IP4_CONFIG_INFO *NicConfig OPTIONAL,\r
178 IN BOOLEAN Reconfig\r
179 );\r
180\r
181/**\r
74df5026 182 Get the NIC's configure information from the IP4 configure variable.\r
183 It will remove the invalid variable.\r
63886849 184\r
74df5026 185 @param Instance The IP4 CONFIG instance.\r
63886849 186\r
74df5026 187 @return NULL if no configure for the NIC in the variable, or it is invalid.\r
188 Otherwise the pointer to the NIC's IP configure parameter will be returned.\r
63886849 189\r
190**/\r
74df5026 191NIC_IP4_CONFIG_INFO *\r
63886849 192EfiNicIp4ConfigGetInfo (\r
74df5026 193 IN IP4_CONFIG_INSTANCE *Instance\r
63886849 194 );\r
83cbd279 195\r
7bce0c5a 196/**\r
197 Release all the DHCP related resources.\r
198\r
199 @param This The IP4 configure instance\r
200\r
201 @return None\r
202\r
203**/\r
83cbd279 204VOID\r
205Ip4ConfigCleanDhcp4 (\r
c8d8f1e3 206 IN IP4_CONFIG_INSTANCE *This\r
83cbd279 207 );\r
208\r
7bce0c5a 209/**\r
210 Clean up all the configuration parameters.\r
211\r
212 @param Instance The IP4 configure instance\r
213\r
214 @return None\r
215\r
216**/\r
83cbd279 217VOID\r
218Ip4ConfigCleanConfig (\r
219 IN IP4_CONFIG_INSTANCE *Instance\r
220 );\r
63886849 221\r
c8d8f1e3 222//\r
223// EFI Component Name Functions\r
224//\r
225\r
226/**\r
227 Retrieves a Unicode string that is the user readable name of the driver.\r
228\r
229 This function retrieves the user readable name of a driver in the form of a\r
230 Unicode string. If the driver specified by This has a user readable name in\r
231 the language specified by Language, then a pointer to the driver name is\r
232 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r
233 by This does not support the language specified by Language,\r
234 then EFI_UNSUPPORTED is returned.\r
235\r
236 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
237 EFI_COMPONENT_NAME_PROTOCOL instance.\r
238 @param Language[in] A pointer to a Null-terminated ASCII string\r
239 array indicating the language. This is the\r
240 language of the driver name that the caller is\r
241 requesting, and it must match one of the\r
242 languages specified in SupportedLanguages. The\r
243 number of languages supported by a driver is up\r
244 to the driver writer. Language is specified\r
63886849 245 in RFC 3066 or ISO 639-2 language code format.\r
c8d8f1e3 246 @param DriverName[out] A pointer to the Unicode string to return.\r
247 This Unicode string is the name of the\r
248 driver specified by This in the language\r
249 specified by Language.\r
250\r
251 @retval EFI_SUCCESS The Unicode string for the Driver specified by\r
252 This and the language specified by Language was\r
253 returned in DriverName.\r
254 @retval EFI_INVALID_PARAMETER Language is NULL.\r
255 @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
256 @retval EFI_UNSUPPORTED The driver specified by This does not support\r
257 the language specified by Language.\r
258\r
259**/\r
260EFI_STATUS\r
261EFIAPI\r
262Ip4ConfigComponentNameGetDriverName (\r
263 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
264 IN CHAR8 *Language,\r
265 OUT CHAR16 **DriverName\r
266 );\r
267\r
268/**\r
269 Retrieves a Unicode string that is the user readable name of the controller\r
270 that is being managed by a driver.\r
271\r
272 This function retrieves the user readable name of the controller specified by\r
273 ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
274 driver specified by This has a user readable name in the language specified by\r
275 Language, then a pointer to the controller name is returned in ControllerName,\r
276 and EFI_SUCCESS is returned. If the driver specified by This is not currently\r
277 managing the controller specified by ControllerHandle and ChildHandle,\r
278 then EFI_UNSUPPORTED is returned. If the driver specified by This does not\r
279 support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
280\r
281 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
282 EFI_COMPONENT_NAME_PROTOCOL instance.\r
283 @param ControllerHandle[in] The handle of a controller that the driver\r
284 specified by This is managing. This handle\r
285 specifies the controller whose name is to be\r
286 returned.\r
287 @param ChildHandle[in] The handle of the child controller to retrieve\r
288 the name of. This is an optional parameter that\r
289 may be NULL. It will be NULL for device\r
290 drivers. It will also be NULL for a bus drivers\r
291 that wish to retrieve the name of the bus\r
292 controller. It will not be NULL for a bus\r
293 driver that wishes to retrieve the name of a\r
294 child controller.\r
295 @param Language[in] A pointer to a Null-terminated ASCII string\r
296 array indicating the language. This is the\r
297 language of the driver name that the caller is\r
298 requesting, and it must match one of the\r
299 languages specified in SupportedLanguages. The\r
300 number of languages supported by a driver is up\r
301 to the driver writer. Language is specified in\r
63886849 302 RFC 3066 or ISO 639-2 language code format.\r
c8d8f1e3 303 @param ControllerName[out] A pointer to the Unicode string to return.\r
304 This Unicode string is the name of the\r
305 controller specified by ControllerHandle and\r
306 ChildHandle in the language specified by\r
307 Language from the point of view of the driver\r
308 specified by This.\r
63886849 309\r
c8d8f1e3 310 @retval EFI_SUCCESS The Unicode string for the user readable name in\r
311 the language specified by Language for the\r
312 driver specified by This was returned in\r
313 DriverName.\r
284ee2e8 314 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r
c8d8f1e3 315 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
316 EFI_HANDLE.\r
317 @retval EFI_INVALID_PARAMETER Language is NULL.\r
318 @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
319 @retval EFI_UNSUPPORTED The driver specified by This is not currently\r
320 managing the controller specified by\r
321 ControllerHandle and ChildHandle.\r
322 @retval EFI_UNSUPPORTED The driver specified by This does not support\r
323 the language specified by Language.\r
324\r
325**/\r
326EFI_STATUS\r
327EFIAPI\r
328Ip4ConfigComponentNameGetControllerName (\r
329 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
330 IN EFI_HANDLE ControllerHandle,\r
331 IN EFI_HANDLE ChildHandle OPTIONAL,\r
332 IN CHAR8 *Language,\r
333 OUT CHAR16 **ControllerName\r
334 );\r
63886849 335\r
c8d8f1e3 336/**\r
337 Test to see if this driver supports ControllerHandle.\r
338\r
339 @param This Protocol instance pointer.\r
340 @param ControllerHandle Handle of device to test\r
341 @param RemainingDevicePath Optional parameter use to pick a specific child\r
342 device to start.\r
343\r
344 @retval EFI_SUCCES This driver supports this device\r
345 @retval EFI_ALREADY_STARTED This driver is already running on this device\r
346 @retval other This driver does not support this device\r
347\r
348**/\r
349EFI_STATUS\r
350EFIAPI\r
351Ip4ConfigDriverBindingSupported (\r
352 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
353 IN EFI_HANDLE ControllerHandle,\r
354 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
355 );\r
63886849 356\r
c8d8f1e3 357/**\r
358 Start this driver on ControllerHandle.\r
359\r
360 @param This Protocol instance pointer.\r
361 @param ControllerHandle Handle of device to bind driver to\r
362 @param RemainingDevicePath Optional parameter use to pick a specific child\r
363 device to start.\r
364\r
365 @retval EFI_SUCCES This driver is added to ControllerHandle\r
366 @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle\r
367 @retval other This driver does not support this device\r
368\r
369**/\r
370EFI_STATUS\r
371EFIAPI\r
372Ip4ConfigDriverBindingStart (\r
373 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
374 IN EFI_HANDLE ControllerHandle,\r
375 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
376 );\r
63886849 377\r
c8d8f1e3 378/**\r
379 Stop this driver on ControllerHandle.\r
380\r
381 @param This Protocol instance pointer.\r
382 @param ControllerHandle Handle of device to stop driver on\r
383 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
384 children is zero stop the entire bus driver.\r
385 @param ChildHandleBuffer List of Child Handles to Stop.\r
386\r
387 @retval EFI_SUCCES This driver is removed ControllerHandle\r
388 @retval other This driver was not removed from this device\r
389\r
390**/\r
391EFI_STATUS\r
392EFIAPI\r
393Ip4ConfigDriverBindingStop (\r
394 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
395 IN EFI_HANDLE ControllerHandle,\r
396 IN UINTN NumberOfChildren,\r
397 IN EFI_HANDLE *ChildHandleBuffer\r
398 );\r
63886849 399\r
72ed3d75 400/**\r
401 Starts running the configuration policy for the EFI IPv4 Protocol driver.\r
402\r
403 The Start() function is called to determine and to begin the platform\r
404 configuration policy by the EFI IPv4 Protocol driver. This determination may\r
405 be as simple as returning EFI_UNSUPPORTED if there is no EFI IPv4 Protocol\r
406 driver configuration policy. It may be as involved as loading some defaults\r
407 from nonvolatile storage, downloading dynamic data from a DHCP server, and\r
408 checking permissions with a site policy server.\r
409 Starting the configuration policy is just the beginning. It may finish almost\r
410 instantly or it may take several minutes before it fails to retrieve configuration\r
411 information from one or more servers. Once the policy is started, drivers\r
412 should use the DoneEvent parameter to determine when the configuration policy\r
413 has completed. EFI_IP4_CONFIG_PROTOCOL.GetData() must then be called to\r
414 determine if the configuration succeeded or failed.\r
415 Until the configuration completes successfully, EFI IPv4 Protocol driver instances\r
416 that are attempting to use default configurations must return EFI_NO_MAPPING.\r
417 Once the configuration is complete, the EFI IPv4 Configuration Protocol driver\r
418 signals DoneEvent. The configuration may need to be updated in the future,\r
419 however; in this case, the EFI IPv4 Configuration Protocol driver must signal\r
420 ReconfigEvent, and all EFI IPv4 Protocol driver instances that are using default\r
421 configurations must return EFI_NO_MAPPING until the configuration policy has\r
422 been rerun.\r
423\r
424 @param This Pointer to the EFI_IP4_CONFIG_PROTOCOL instance.\r
425 @param DoneEvent Event that will be signaled when the EFI IPv4\r
426 Protocol driver configuration policy completes\r
427 execution. This event must be of type EVT_NOTIFY_SIGNAL.\r
428 @param ReconfigEvent Event that will be signaled when the EFI IPv4\r
429 Protocol driver configuration needs to be updated.\r
430 This event must be of type EVT_NOTIFY_SIGNAL.\r
431\r
432 @retval EFI_SUCCESS The configuration policy for the EFI IPv4 Protocol\r
433 driver is now running.\r
434 @retval EFI_INVALID_PARAMETER One or more of the following parameters is NULL:\r
435 This\r
436 DoneEvent\r
437 ReconfigEvent\r
438 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
439 @retval EFI_ALREADY_STARTED The configuration policy for the EFI IPv4 Protocol\r
440 driver was already started.\r
441 @retval EFI_DEVICE_ERROR An unexpected system error or network error occurred.\r
442 @retval EFI_UNSUPPORTED This interface does not support the EFI IPv4 Protocol\r
443 driver configuration.\r
444\r
445**/\r
446EFI_STATUS\r
447EFIAPI\r
448EfiIp4ConfigStart (\r
449 IN EFI_IP4_CONFIG_PROTOCOL *This,\r
450 IN EFI_EVENT DoneEvent,\r
451 IN EFI_EVENT ReconfigEvent\r
452 );\r
453\r
454/**\r
455 Stops running the configuration policy for the EFI IPv4 Protocol driver.\r
456\r
457 The Stop() function stops the configuration policy for the EFI IPv4 Protocol driver.\r
458 All configuration data will be lost after calling Stop().\r
459\r
460 @param This Pointer to the EFI_IP4_CONFIG_PROTOCOL instance.\r
461\r
462 @retval EFI_SUCCESS The configuration policy for the EFI IPv4 Protocol\r
463 driver has been stopped.\r
464 @retval EFI_INVALID_PARAMETER This is NULL.\r
465 @retval EFI_NOT_STARTED The configuration policy for the EFI IPv4 Protocol\r
466 driver was not started.\r
467\r
468**/\r
469EFI_STATUS\r
470EFIAPI\r
471EfiIp4ConfigStop (\r
472 IN EFI_IP4_CONFIG_PROTOCOL *This\r
473 );\r
474\r
475/**\r
476 Returns the default configuration data (if any) for the EFI IPv4 Protocol driver.\r
477\r
478 The GetData() function returns the current configuration data for the EFI IPv4\r
479 Protocol driver after the configuration policy has completed.\r
480\r
481 @param This Pointer to the EFI_IP4_CONFIG_PROTOCOL instance.\r
482 @param ConfigDataSize On input, the size of the ConfigData buffer.\r
483 On output, the count of bytes that were written\r
484 into the ConfigData buffer.\r
485 @param ConfigData Pointer to the EFI IPv4 Configuration Protocol\r
486 driver configuration data structure.\r
487 Type EFI_IP4_IPCONFIG_DATA is defined in\r
488 "Related Definitions" below.\r
489\r
490 @retval EFI_SUCCESS The EFI IPv4 Protocol driver configuration has been returned.\r
491 @retval EFI_INVALID_PARAMETER This is NULL.\r
492 @retval EFI_NOT_STARTED The configuration policy for the EFI IPv4 Protocol\r
493 driver is not running.\r
494 @retval EFI_NOT_READY EFI IPv4 Protocol driver configuration is still running.\r
495 @retval EFI_ABORTED EFI IPv4 Protocol driver configuration could not complete.\r
496 Currently not implemented.\r
497 @retval EFI_BUFFER_TOO_SMALL *ConfigDataSize is smaller than the configuration\r
498 data buffer or ConfigData is NULL.\r
499\r
500**/\r
501EFI_STATUS\r
502EFIAPI\r
503EfiIp4ConfigGetData (\r
504 IN EFI_IP4_CONFIG_PROTOCOL *This,\r
505 IN OUT UINTN *ConfigDataSize,\r
506 OUT EFI_IP4_IPCONFIG_DATA *ConfigData OPTIONAL\r
507 );\r
508\r
9f82599a 509/**\r
510 A dedicated timer is used to poll underlying media status. In case of\r
511 cable swap, a new round auto configuration will be initiated. The timer \r
512 will signal the IP4 to run the auto configuration again. IP4 driver will free\r
513 old IP address related resource, such as route table and Interface, then\r
514 initiate a DHCP round by IP4Config->Start to acquire new IP, eventually\r
515 create route table for new IP address.\r
516\r
517 @param[in] Event The IP4 service instance's heart beat timer.\r
518 @param[in] Context The IP4 service instance.\r
519\r
520**/\r
521VOID\r
522EFIAPI\r
523MediaChangeDetect (\r
524 IN EFI_EVENT Event,\r
525 IN VOID *Context\r
526 );\r
527\r
83cbd279 528#endif\r