/** @file\r
+ Routines used to operate the Ip4 configure variable.\r
\r
-Copyright (c) 2006 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2010, 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\r
+which accompanies this distribution. The full text of the license may be found at<BR>\r
http://opensource.org/licenses/bsd-license.php\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
\r
-Module Name:\r
-\r
- NicIp4Variable.h\r
-\r
-Abstract:\r
-\r
- Routines used to operate the Ip4 configure variable\r
-\r
-\r
**/\r
\r
#ifndef _NIC_IP4_VARIABLE_H_\r
#define _NIC_IP4_VARIABLE_H_\r
\r
-\r
-#include <Protocol/NicIp4Config.h>\r
-\r
//\r
// Return the size of NIC_IP4_CONFIG_INFO and EFI_IP4_IPCONFIG_DATA.\r
// They are of variable size\r
/**\r
Read the ip4 configure variable from the EFI variable.\r
\r
- None\r
+ @param Instance The IP4 CONFIG instance.\r
\r
- @return The IP4 configure read if it is there and is valid, otherwise NULL\r
+ @return The IP4 configure read if it is there and is valid, otherwise NULL.\r
\r
**/\r
-IP4_CONFIG_VARIABLE *\r
+NIC_IP4_CONFIG_INFO *\r
Ip4ConfigReadVariable (\r
- VOID\r
+ IN IP4_CONFIG_INSTANCE *Instance\r
);\r
\r
/**\r
Write the IP4 configure variable to the NVRAM. If Config\r
is NULL, remove the variable.\r
\r
- @param Config The IP4 configure data to write\r
+ @param Instance The IP4 CONFIG instance.\r
+ @param NicConfig The IP4 configure data to write.\r
\r
- @retval EFI_SUCCESS The variable is written to the NVRam\r
+ @retval EFI_SUCCESS The variable is written to the NVRam.\r
@retval Others Failed to write the variable.\r
\r
**/\r
EFI_STATUS\r
Ip4ConfigWriteVariable (\r
- IN IP4_CONFIG_VARIABLE *Config OPTIONAL\r
+ IN IP4_CONFIG_INSTANCE *Instance,\r
+ IN NIC_IP4_CONFIG_INFO *NicConfig OPTIONAL\r
);\r
\r
/**\r
- Locate the IP4 configure parameters from the variable.If a\r
- configuration is found, copy it to a newly allocated block\r
- of memory to avoid the alignment problem. Caller should\r
- release the memory after use.\r
-\r
- @param Variable The IP4 configure variable to search in\r
- @param NicAddr The interface address to check\r
-\r
- @return The point to the NIC's IP4 configure info if it is found\r
- @return in the IP4 variable, otherwise NULL.\r
+ Reclaim Ip4Config Variables for NIC which has been removed from the platform.\r
\r
**/\r
-NIC_IP4_CONFIG_INFO *\r
-Ip4ConfigFindNicVariable (\r
- IN IP4_CONFIG_VARIABLE *Variable,\r
- IN NIC_ADDR *NicAddr\r
+VOID\r
+Ip4ConfigReclaimVariable (\r
+ VOID\r
);\r
\r
/**\r
- Modify the configuration parameter for the NIC in the variable.\r
- If Config is NULL, old configuration will be remove from the new\r
- variable. Otherwise, append it or replace the old one.\r
+ Fix the RouteTable pointer in an EFI_IP4_IPCONFIG_DATA structure.\r
\r
- @param Variable The IP4 variable to change\r
- @param NicAddr The interface to search\r
- @param Config The new configuration parameter (NULL to remove the old)\r
+ The pointer is set to be immediately follow the ConfigData if there're entries\r
+ in the RouteTable. Otherwise it is set to NULL.\r
\r
- @return The new IP4_CONFIG_VARIABLE variable if the new variable has at\r
- @return least one NIC configure and no EFI_OUT_OF_RESOURCES failure.\r
- @return Return NULL either because failed to locate memory for new variable\r
- @return or the only NIC configure is removed from the Variable.\r
+ @param ConfigData The IP4 IP configure data.\r
\r
**/\r
-IP4_CONFIG_VARIABLE *\r
-Ip4ConfigModifyVariable (\r
- IN IP4_CONFIG_VARIABLE *Variable, OPTIONAL\r
- IN NIC_ADDR *NicAddr,\r
- IN NIC_IP4_CONFIG_INFO *Config OPTIONAL\r
- );\r
-\r
VOID\r
Ip4ConfigFixRouteTablePointer (\r
- IN EFI_IP4_IPCONFIG_DATA *ConfigData\r
+ IN OUT EFI_IP4_IPCONFIG_DATA *ConfigData\r
);\r
\r
#endif\r
+\r