]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h
MdeModulePkg/EmmcDxe: demote DEBUG print to DEBUG_BLKIO
[mirror_edk2.git] / NetworkPkg / Ip6Dxe / Ip6ConfigImpl.h
index 5ae483931a97940ea5bcccafbd5d3cba000946e8..3a6e8ad4d17c28e7b70180c5a0e42dba44077275 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Definitions for EFI IPv6 Configuartion Protocol implementation.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<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
@@ -21,8 +21,6 @@
 #define IP6_CONFIG_VARIABLE_ATTRIBUTE    (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS)\r
 \r
 #define IP6_CONFIG_DEFAULT_DAD_XMITS        1\r
-#define IP6_CONFIG_DHCP6_OPTION_ORO         6\r
-#define IP6_CONFIG_DHCP6_OPTION_DNS_SERVERS 23\r
 \r
 #define DATA_ATTRIB_SIZE_FIXED              0x1\r
 #define DATA_ATTRIB_VOLATILE                0x2\r
@@ -129,7 +127,7 @@ typedef struct {
 \r
 typedef struct {\r
   UINT16                    Offset;\r
-  UINT                    DataSize;\r
+  UINT32                    DataSize;\r
   EFI_IP6_CONFIG_DATA_TYPE  DataType;\r
 } IP6_CONFIG_DATA_RECORD;\r
 \r
@@ -215,6 +213,26 @@ struct _IP6_CONFIG_INSTANCE {
   IP6_CONFIG_NVDATA                         Ip6NvData;\r
 };\r
 \r
+/**\r
+  Read the configuration data from variable storage according to the VarName and\r
+  gEfiIp6ConfigProtocolGuid. It checks the integrity of variable data. If the\r
+  data is corrupted, it clears the variable data to ZERO. Othewise, it outputs the\r
+  configuration data to IP6_CONFIG_INSTANCE.\r
+\r
+  @param[in]      VarName  The pointer to the variable name\r
+  @param[in, out] Instance The pointer to the IP6 config instance data.\r
+\r
+  @retval EFI_NOT_FOUND         The variable can not be found or already corrupted.\r
+  @retval EFI_OUT_OF_RESOURCES  Fail to allocate resource to complete the operation.\r
+  @retval EFI_SUCCESS           The configuration data was retrieved successfully.\r
+\r
+**/\r
+EFI_STATUS\r
+Ip6ConfigReadConfigData (\r
+  IN     CHAR16               *VarName,\r
+  IN OUT IP6_CONFIG_INSTANCE  *Instance\r
+  );\r
+\r
 /**\r
   The event process routine when the DHCPv6 server is answered with a reply packet\r
   for an information request.\r
@@ -279,12 +297,12 @@ Ip6ConfigCleanInstance (
   );\r
 \r
 /**\r
-  Destory the Dhcp6 child in IP6_CONFIG_INSTANCE and release the resources.\r
+  Destroy the Dhcp6 child in IP6_CONFIG_INSTANCE and release the resources.\r
 \r
   @param[in, out] Instance    The buffer of IP6_CONFIG_INSTANCE to be freed.\r
 \r
   @retval EFI_SUCCESS         The child was successfully destroyed.\r
-  @retval Others              Failed to destory the child.\r
+  @retval Others              Failed to destroy the child.\r
   \r
 **/\r
 EFI_STATUS\r