]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.h
1. Enabled IP4 layer auto configuration in case cable swap is detected.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4ConfigDxe / Ip4Config.h
index eacd89389065a932d21722adeef23a49f2400935..622b87ee032f237f9e615ee164ae3daf2acf3c4b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Header file for IP4Config driver.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\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<BR>\r
@@ -128,6 +128,16 @@ typedef struct _IP4_CONFIG_INSTANCE {
   EFI_DHCP4_PROTOCOL              *Dhcp4;\r
   EFI_HANDLE                      Dhcp4Handle;\r
   EFI_EVENT                       Dhcp4Event;\r
+\r
+  //\r
+  // A dedicated timer is used to poll underlying media status\r
+  //\r
+  EFI_EVENT                       Timer;\r
+\r
+  //\r
+  // Underlying media present status. \r
+  //\r
+  BOOLEAN                         MediaPresent; \r
 } IP4_CONFIG_INSTANCE;\r
 \r
 #define IP4_CONFIG_INSTANCE_FROM_IP4CONFIG(this) \\r
@@ -496,4 +506,23 @@ EfiIp4ConfigGetData (
   OUT EFI_IP4_IPCONFIG_DATA   *ConfigData           OPTIONAL\r
   );\r
 \r
+/**\r
+  A dedicated timer is used to poll underlying media status. In case of\r
+  cable swap, a new round auto configuration will be initiated. The timer \r
+  will signal the IP4 to run the auto configuration again. IP4 driver will free\r
+  old IP address related resource, such as route table and Interface, then\r
+  initiate a DHCP round by IP4Config->Start to acquire new IP, eventually\r
+  create 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
+MediaChangeDetect (\r
+  IN EFI_EVENT              Event,\r
+  IN VOID                   *Context\r
+  );\r
+\r
 #endif\r