diff options
author | xdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-07-05 02:03:20 +0000 |
---|---|---|
committer | xdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-07-05 02:03:20 +0000 |
commit | 74df5026b22cd13ab09766a2ba49298b4c5f9ac0 (patch) | |
tree | 393c8ab5847b4866bdc54aa5894adf8941550d7f /MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.h | |
parent | 8df3a682fef2f376111c06884416e73c7f1c6d71 (diff) | |
download | edk2-platforms-74df5026b22cd13ab09766a2ba49298b4c5f9ac0.tar.xz |
1. update to use 1 EFI Variable per NIC (instead of converge all NIC configuration into one EFI Variable), this remove the limitation that max NIC configuration will depend on PcdMaxVariableSize.
2. remove unnecessary Unload function EfiIp4ConfigUnload (use default Unload function NetLibDefaultUnload instead), remove global array for NIC handle tracking since it’s driver model driver.
3. add Ip4Config Variable reclaim to HiiConfigAccess.RouteConfig() to remove variable for NIC which has been removed from the system.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10628 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.h')
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.h | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.h b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.h index 5eadad2746..87bc25c2f1 100644 --- a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.h +++ b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.h @@ -26,6 +26,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Protocol/ServiceBinding.h>
#include <Guid/MdeModuleHii.h>
+#include <Guid/NicIp4ConfigNvData.h>
#include <Library/DevicePathLib.h>
#include <Library/DebugLib.h>
@@ -41,8 +42,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Library/DpcLib.h>
#include <Library/UefiHiiServicesLib.h>
-#include "NicIp4Variable.h"
-
typedef struct _IP4_CONFIG_INSTANCE IP4_CONFIG_INSTANCE;
//
@@ -52,7 +51,6 @@ extern EFI_DRIVER_BINDING_PROTOCOL gIp4ConfigDriverBinding; extern EFI_COMPONENT_NAME_PROTOCOL gIp4ConfigComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL gIp4ConfigComponentName2;
-extern IP4_CONFIG_INSTANCE *mIp4ConfigNicList[MAX_IP4_CONFIG_IN_VARIABLE];
extern EFI_IP4_CONFIG_PROTOCOL mIp4ConfigProtocolTemplate;
#define IP4_PROTO_ICMP 0x01
@@ -122,8 +120,7 @@ struct _IP4_CONFIG_INSTANCE { // Identity of this interface and some configuration info.
//
NIC_ADDR NicAddr;
- UINT16 NicName[IP4_NIC_NAME_LENGTH];
- UINT32 NicIndex;
+ CHAR16 *MacString;
NIC_IP4_CONFIG_INFO *NicConfig;
//
@@ -173,28 +170,18 @@ EfiNicIp4ConfigSetInfo ( );
/**
- Get the configure parameter for this NIC.
+ Get the NIC's configure information from the IP4 configure variable.
+ It will remove the invalid variable.
- @param Instance The IP4 CONFIG Instance.
- @param ConfigLen The length of the NicConfig buffer.
- @param NicConfig The buffer to receive the NIC's configure
- parameter.
+ @param Instance The IP4 CONFIG instance.
- @retval EFI_SUCCESS The configure parameter for this NIC was
- obtained successfully .
- @retval EFI_INVALID_PARAMETER This or ConfigLen is NULL.
- @retval EFI_NOT_FOUND There is no configure parameter for the NIC in
- NVRam.
- @retval EFI_BUFFER_TOO_SMALL The ConfigLen is too small or the NicConfig is
- NULL.
+ @return NULL if no configure for the NIC in the variable, or it is invalid.
+ Otherwise the pointer to the NIC's IP configure parameter will be returned.
**/
-EFI_STATUS
-EFIAPI
+NIC_IP4_CONFIG_INFO *
EfiNicIp4ConfigGetInfo (
- IN IP4_CONFIG_INSTANCE *Instance,
- IN OUT UINTN *ConfigLen,
- OUT NIC_IP4_CONFIG_INFO *NicConfig
+ IN IP4_CONFIG_INSTANCE *Instance
);
/**
|