/* This function removes the multicast group specified by Arg from the Map. */
EFI_STATUS EFIAPI Udp6LeaveGroup(IN NET_MAP *Map, IN NET_MAP_ITEM *Item, IN VOID *Arg OPTIONAL)
/* This function removes the multicast group specified by Arg from the Map. */
EFI_STATUS EFIAPI Udp6LeaveGroup(IN NET_MAP *Map, IN NET_MAP_ITEM *Item, IN VOID *Arg OPTIONAL)
{
  EFI_IPv6_ADDRESS  *McastIp;
  McastIp = Arg;
  if ((McastIp != NULL) &&
      !EFI_IP6_EQUAL (McastIp, ((EFI_IPv6_ADDRESS *)Item->Key))
      )
  {
    return EFI_SUCCESS;
  }
  FreePool (Item->Key);
  NetMapRemoveItem (Map, Item, NULL);
  if (McastIp != NULL) {
    return EFI_ABORTED;
  }
  return EFI_SUCCESS;
}