/* Check whether the addresses are all included by the configured Ia. */
EFI_STATUS Dhcp6CheckAddress(IN EFI_DHCP6_IA *Ia, IN UINT32 AddressCount, IN EFI_IPv6_ADDRESS *Addresses)
/* Check whether the addresses are all included by the configured Ia. */
EFI_STATUS Dhcp6CheckAddress(IN EFI_DHCP6_IA *Ia, IN UINT32 AddressCount, IN EFI_IPv6_ADDRESS *Addresses)
{
  UINTN    Index1;
  UINTN    Index2;
  BOOLEAN  Found;
  for (Index1 = 0; Index1 < AddressCount; Index1++) {
    Found = FALSE;
    for (Index2 = 0; Index2 < Ia->IaAddressCount; Index2++) {
      if (CompareMem (
            &Addresses[Index1],
            &Ia->IaAddress[Index2],
            sizeof (EFI_IPv6_ADDRESS)
            ) == 0)
      {
        Found = TRUE;
        break;
      }
    }
    if (!Found) {
      return EFI_NOT_FOUND;
    }
  }
  return EFI_SUCCESS;
}