/** @file\r
Ip4 internal functions and type defintions.\r
- \r
-Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>\r
+\r
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
\r
This program and the accompanying materials\r
#include <Protocol/HiiConfigRouting.h>\r
#include <Protocol/HiiConfigAccess.h>\r
\r
+#include <IndustryStandard/Dhcp.h>\r
+\r
#include <Library/DebugLib.h>\r
#include <Library/UefiRuntimeServicesTableLib.h>\r
#include <Library/UefiDriverEntryPoint.h>\r
//\r
// The state of IP4 protocol. It starts from UNCONFIGED. if it is\r
// successfully configured, it goes to CONFIGED. if configure NULL\r
-// is called, it becomes UNCONFIGED again. If (partly) destroyed, it\r
-// becomes DESTROY.\r
+// is called, it becomes UNCONFIGED again.\r
//\r
#define IP4_STATE_UNCONFIGED 0\r
#define IP4_STATE_CONFIGED 1\r
-#define IP4_STATE_DESTROY 2\r
\r
//\r
// The state of IP4 service. It starts from UNSTARTED. It transits\r
EFI_HANDLE Handle;\r
INTN State;\r
\r
+ BOOLEAN InDestroy;\r
+\r
IP4_SERVICE *Service;\r
LIST_ENTRY Link; // Link to all the IP protocol from the service\r
\r
EFI_SIMPLE_NETWORK_MODE SnpMode;\r
\r
EFI_EVENT Timer;\r
-\r
+ EFI_EVENT ReconfigCheckTimer;\r
EFI_EVENT ReconfigEvent;\r
\r
BOOLEAN Reconfig;\r
\r
//\r
- // Underlying media present status. \r
+ // Underlying media present status.\r
//\r
BOOLEAN MediaPresent;\r
\r
);\r
\r
/**\r
- The heart beat timer of IP4 service instance. It times out\r
- all of its IP4 children's received-but-not-delivered and\r
- transmitted-but-not-recycle packets, and provides time input\r
- for its IGMP protocol.\r
+ This heart beat timer of IP4 service instance times out all of its IP4 children's\r
+ received-but-not-delivered and transmitted-but-not-recycle packets, and provides\r
+ time input for its IGMP protocol.\r
\r
@param[in] Event The IP4 service instance's heart beat timer.\r
@param[in] Context The IP4 service instance.\r
IN VOID *Context\r
);\r
\r
+/**\r
+ This dedicated timer is used to poll underlying network media status. In case\r
+ of cable swap or wireless network switch, a new round auto configuration will\r
+ be initiated. The timer will signal the IP4 to run DHCP configuration again.\r
+ IP4 driver will free old IP address related resource, such as route table and\r
+ Interface, then initiate a DHCP process to acquire new IP, eventually create\r
+ route table for new IP address.\r
+\r
+ @param[in] Event The IP4 service instance's heart beat timer.\r
+ @param[in] Context The IP4 service instance.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+Ip4TimerReconfigChecking (\r
+ IN EFI_EVENT Event,\r
+ IN VOID *Context\r
+ );\r
+\r
/**\r
Decrease the life of the transmitted packets. If it is\r
decreased to zero, cancel the packet. This function is\r