/** @file\r
- Routines used to operate the Ip4 configure variable\r
+ Routines used to operate the Ip4 configure variable.\r
\r
-Copyright (c) 2006 - 2008, Intel Corporation.<BR> \r
+Copyright (c) 2006 - 2009, Intel Corporation.<BR> \r
All rights reserved. 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
#ifndef _NIC_IP4_VARIABLE_H_\r
#define _NIC_IP4_VARIABLE_H_\r
\r
-\r
-#include <Protocol/NicIp4Config.h>\r
+#include <Uefi.h>\r
+\r
+#include <Guid/NicIp4ConfigNvData.h>\r
+\r
+#include <Library/NetLib.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/UefiRuntimeServicesTableLib.h>\r
+\r
+///\r
+/// IP4_CONFIG_VARIABLE is the EFI variable to\r
+/// save the configuration. IP4_CONFIG_VARIABLE is\r
+/// of variable length.\r
+///\r
+typedef struct {\r
+ UINT32 Len; ///< Total length of the variable\r
+ UINT16 CheckSum; ///< CheckSum, the same as IP4 head checksum\r
+ UINT32 Count; ///< Number of NIC_IP4_CONFIG_INFO follows\r
+ NIC_IP4_CONFIG_INFO ConfigInfo;\r
+} IP4_CONFIG_VARIABLE;\r
\r
//\r
// Return the size of NIC_IP4_CONFIG_INFO and EFI_IP4_IPCONFIG_DATA.\r
**/\r
EFI_STATUS\r
Ip4ConfigWriteVariable (\r
- IN IP4_CONFIG_VARIABLE *Config OPTIONAL\r
+ IN IP4_CONFIG_VARIABLE *Config OPTIONAL\r
);\r
\r
/**\r
@param Config The new configuration parameter (NULL to remove the old)\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
+ least one NIC configure and no EFI_OUT_OF_RESOURCES failure.\r
+ Return NULL either because failed to locate memory for new variable\r
+ or the only NIC configure is removed from the Variable.\r
\r
**/\r
IP4_CONFIG_VARIABLE *\r
Ip4ConfigModifyVariable (\r
- IN IP4_CONFIG_VARIABLE *Variable, OPTIONAL\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