]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h
MdeModulePkg Ip4Dxe: Remove a redundant function
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4Impl.h
index a1a76bd612b9c33f5f94e2aff15173636cba9281..ddca6ce897f6ecdee0e46d1af6ec2b50893bf473 100644 (file)
@@ -1,7 +1,9 @@
 /** @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
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -26,6 +28,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #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
@@ -60,12 +64,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\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
@@ -132,6 +134,8 @@ struct _IP4_PROTOCOL {
   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
@@ -202,13 +206,13 @@ struct _IP4_SERVICE {
   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
@@ -330,10 +334,9 @@ Ip4Groups (
   );\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
@@ -346,6 +349,25 @@ Ip4TimerTicking (
   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
@@ -396,5 +418,6 @@ Ip4FreeTxToken (
   );\r
 \r
 extern EFI_IPSEC2_PROTOCOL   *mIpSec;\r
+extern BOOLEAN               mIpSec2Installed;\r
 \r
 #endif\r