]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h
BaseTools: StructurePcd array Value support flexible format
[mirror_edk2.git] / NetworkPkg / Ip6Dxe / Ip6ConfigImpl.h
index ccb09ccc77036c8f0c7cc8508cea8320d89a305d..3a6e8ad4d17c28e7b70180c5a0e42dba44077275 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Definitions for EFI IPv6 Configuartion Protocol implementation.\r
 \r
 /** @file\r
   Definitions for EFI IPv6 Configuartion Protocol implementation.\r
 \r
-  Copyright (c) 2009 - 2012, 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
 \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_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
 \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
 \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
   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
   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
 /**\r
   The event process routine when the DHCPv6 server is answered with a reply packet\r
   for an information request.\r