/* Check whether the DestinationAddress is an anycast address. */
BOOLEAN Ip6IsAnycast(IN IP6_SERVICE *IpSb, IN EFI_IPv6_ADDRESS *DestinationAddress)
/* Check whether the DestinationAddress is an anycast address. */
BOOLEAN Ip6IsAnycast(IN IP6_SERVICE *IpSb, IN EFI_IPv6_ADDRESS *DestinationAddress)
{
  IP6_PREFIX_LIST_ENTRY  *PrefixEntry;
  EFI_IPv6_ADDRESS       Prefix;
  BOOLEAN                Flag;
  ZeroMem (&Prefix, sizeof (EFI_IPv6_ADDRESS));
  Flag = FALSE;
  do {
    PrefixEntry = Ip6FindPrefixListEntry (IpSb, Flag, 255, DestinationAddress);
    if (PrefixEntry != NULL) {
      IP6_COPY_ADDRESS (&Prefix, &PrefixEntry->Prefix);
      Ip6GetPrefix (PrefixEntry->PrefixLength, &Prefix);
      if (EFI_IP6_EQUAL (&Prefix, DestinationAddress)) {
        return TRUE;
      }
    }
    Flag = (BOOLEAN) !Flag;
  } while (Flag);
  return FALSE;
}