]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Igmp.c
Use Mde library and definition instead of some native definitions in NetLib, to simpl...
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4Igmp.c
index 70fbebdc44e0d886f2f61f1b84ea4cd0852aac70..4fbabe2f362d034f526bc68cbf14f05f58a65275 100644 (file)
@@ -56,7 +56,7 @@ Ip4InitIgmp (
   //\r
   // Configure MNP to receive ALL_SYSTEM multicast\r
   //\r
-  Group    = NetAllocatePool (sizeof (IGMP_GROUP));\r
+  Group    = AllocatePool (sizeof (IGMP_GROUP));\r
 \r
   if (Group == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
@@ -81,11 +81,11 @@ Ip4InitIgmp (
     goto ON_ERROR;\r
   }\r
 \r
-  NetListInsertHead (&IgmpCtrl->Groups, &Group->Link);\r
+  InsertHeadList (&IgmpCtrl->Groups, &Group->Link);\r
   return EFI_SUCCESS;\r
 \r
 ON_ERROR:\r
-  NetFreePool (Group);\r
+  gBS->FreePool (Group);\r
   return Status;\r
 }\r
 \r
@@ -108,7 +108,7 @@ Ip4FindGroup (
   IN IP4_ADDR               Address\r
   )\r
 {\r
-  NET_LIST_ENTRY            *Entry;\r
+  LIST_ENTRY                *Entry;\r
   IGMP_GROUP                *Group;\r
 \r
   NET_LIST_FOR_EACH (Entry, &IgmpCtrl->Groups) {\r
@@ -141,7 +141,7 @@ Ip4FindMac (
   IN EFI_MAC_ADDRESS        *Mac\r
   )\r
 {\r
-  NET_LIST_ENTRY            *Entry;\r
+  LIST_ENTRY                *Entry;\r
   IGMP_GROUP                *Group;\r
   INTN                      Count;\r
 \r
@@ -298,7 +298,7 @@ Ip4JoinGroup (
   // Otherwise, create a new IGMP_GROUP,  Get the multicast's MAC address,\r
   // send a report, then direct MNP to receive the multicast.\r
   //\r
-  Group = NetAllocatePool (sizeof (IGMP_GROUP));\r
+  Group = AllocatePool (sizeof (IGMP_GROUP));\r
 \r
   if (Group == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
@@ -327,11 +327,11 @@ Ip4JoinGroup (
     goto ON_ERROR;\r
   }\r
 \r
-  NetListInsertHead (&IgmpCtrl->Groups, &Group->Link);\r
+  InsertHeadList (&IgmpCtrl->Groups, &Group->Link);\r
   return EFI_SUCCESS;\r
 \r
 ON_ERROR:\r
-  NetFreePool (Group);\r
+  gBS->FreePool (Group);\r
   return Status;\r
 }\r
 \r
@@ -399,8 +399,8 @@ Ip4LeaveGroup (
     Ip4SendIgmpMessage (IpSb, IP4_ALLROUTER_ADDRESS, IGMP_LEAVE_GROUP, Group->Address);\r
   }\r
 \r
-  NetListRemoveEntry (&Group->Link);\r
-  NetFreePool (Group);\r
+  RemoveEntryList (&Group->Link);\r
+  gBS->FreePool (Group);\r
 \r
   return EFI_SUCCESS;\r
 }\r
@@ -428,7 +428,7 @@ Ip4IgmpHandle (
   IGMP_HEAD                 Igmp;\r
   IGMP_GROUP                *Group;\r
   IP4_ADDR                  Address;\r
-  NET_LIST_ENTRY            *Entry;\r
+  LIST_ENTRY                *Entry;\r
 \r
   IgmpCtrl = &IpSb->IgmpCtrl;\r
 \r
@@ -526,7 +526,7 @@ Ip4IgmpTicking (
   )\r
 {\r
   IGMP_SERVICE_DATA         *IgmpCtrl;\r
-  NET_LIST_ENTRY            *Entry;\r
+  LIST_ENTRY                *Entry;\r
   IGMP_GROUP                *Group;\r
 \r
   IgmpCtrl = &IpSb->IgmpCtrl;\r
@@ -578,13 +578,13 @@ Ip4CombineGroups (
 {\r
   IP4_ADDR                  *Groups;\r
 \r
-  Groups = NetAllocatePool (sizeof (IP4_ADDR) * (Count + 1));\r
+  Groups = AllocatePool (sizeof (IP4_ADDR) * (Count + 1));\r
 \r
   if (Groups == NULL) {\r
     return NULL;\r
   }\r
 \r
-  NetCopyMem (Groups, Source, Count * sizeof (IP4_ADDR));\r
+  CopyMem (Groups, Source, Count * sizeof (IP4_ADDR));\r
   Groups[Count] = Addr;\r
 \r
   return Groups;\r