]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4ConfigDxe/NicIp4Variable.c
Use Mde library and definition instead of some native definitions in NetLib, to simpl...
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4ConfigDxe / NicIp4Variable.c
index d6e617eaa76ecd1a5d3aeb1f835bc2eb000832a9..dabd13c1dba383ed711d394cb781f409691d2d64 100644 (file)
@@ -129,7 +129,7 @@ Ip4ConfigReadVariable (
     goto REMOVE_VARIABLE;\r
   }\r
 \r
-  Variable = NetAllocatePool (Size);\r
+  Variable = AllocatePool (Size);\r
 \r
   if (Variable == NULL) {\r
     return NULL;\r
@@ -167,7 +167,7 @@ REMOVE_VARIABLE:
 \r
 ON_ERROR:\r
   if (Variable != NULL) {\r
-    NetFreePool (Variable);\r
+    gBS->FreePool (Variable);\r
   }\r
 \r
   return NULL;\r
@@ -234,7 +234,7 @@ Ip4ConfigFindNicVariable (
     //\r
     // Copy the data to Temp to avoid the alignment problems\r
     //\r
-    NetCopyMem (&Temp, Cur, sizeof (NIC_IP4_CONFIG_INFO));\r
+    CopyMem (&Temp, Cur, sizeof (NIC_IP4_CONFIG_INFO));\r
     Len = SIZEOF_NIC_IP4_CONFIG_INFO (&Temp);\r
 \r
     //\r
@@ -242,13 +242,13 @@ Ip4ConfigFindNicVariable (
     // a block of memory then copy it out.\r
     //\r
     if (NIC_ADDR_EQUAL (&Temp.NicAddr, NicAddr)) {\r
-      Config = NetAllocatePool (Len);\r
+      Config = AllocatePool (Len);\r
 \r
       if (Config == NULL) {\r
         return NULL;\r
       }\r
 \r
-      NetCopyMem (Config, Cur, Len);\r
+      CopyMem (Config, Cur, Len);\r
       return Config;\r
     }\r
 \r
@@ -311,7 +311,7 @@ Ip4ConfigModifyVariable (
 \r
     if (Old != NULL) {\r
       TotalLen -= SIZEOF_NIC_IP4_CONFIG_INFO (Old);\r
-      NetFreePool (Old);\r
+      gBS->FreePool (Old);\r
     }\r
 \r
     if (Config != NULL) {\r
@@ -338,7 +338,7 @@ Ip4ConfigModifyVariable (
 \r
   ASSERT (TotalLen >= sizeof (IP4_CONFIG_VARIABLE));\r
 \r
-  NewVar = NetAllocateZeroPool (TotalLen);\r
+  NewVar = AllocateZeroPool (TotalLen);\r
 \r
   if (NewVar == NULL) {\r
     return NULL;\r
@@ -352,11 +352,11 @@ Ip4ConfigModifyVariable (
   Next = (UINT8 *)&NewVar->ConfigInfo;\r
 \r
   for (Index = 0; Index < Count; Index++) {\r
-    NetCopyMem (&Temp, Cur, sizeof (NIC_IP4_CONFIG_INFO));\r
+    CopyMem (&Temp, Cur, sizeof (NIC_IP4_CONFIG_INFO));\r
     Len = SIZEOF_NIC_IP4_CONFIG_INFO (&Temp);\r
 \r
     if (!NIC_ADDR_EQUAL (&Temp.NicAddr, NicAddr)) {\r
-      NetCopyMem (Next, Cur, Len);\r
+      CopyMem (Next, Cur, Len);\r
       Next += Len;\r
       NewVar->Count++;\r
     }\r
@@ -372,7 +372,7 @@ Ip4ConfigModifyVariable (
   if (Config != NULL) {\r
     Len = SIZEOF_NIC_IP4_CONFIG_INFO (Config);\r
 \r
-    NetCopyMem (Next, Config, Len);\r
+    CopyMem (Next, Config, Len);\r
     NewVar->Count++;\r
   }\r
 \r