]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h
BaseTools:Change the path of the file that Binary Cache
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4Impl.h
index 7a7ad9d785a15d05cd9213c5e5c384cce255a58e..a322a85981a57ec10d7c6b6c57889201fefe4aa4 100644 (file)
@@ -1,16 +1,10 @@
 /** @file\r
   Ip4 internal functions and type defintions.\r
-  \r
-Copyright (c) 2005 - 2016, 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
-http://opensource.org/licenses/bsd-license.php\r
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>\r
+(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -64,12 +58,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
@@ -136,6 +128,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
@@ -206,13 +200,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
@@ -334,10 +328,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
@@ -350,6 +343,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