/* Allocate memory for configure parameter such as timeout value for Dst, then copy the configure parameter from Src to Dst. */
EFI_STATUS Dns6CopyConfigure(OUT EFI_DNS6_CONFIG_DATA *Dst, IN EFI_DNS6_CONFIG_DATA *Src)
/* Allocate memory for configure parameter such as timeout value for Dst, then copy the configure parameter from Src to Dst. */
EFI_STATUS Dns6CopyConfigure(OUT EFI_DNS6_CONFIG_DATA *Dst, IN EFI_DNS6_CONFIG_DATA *Src)
{
  UINTN   Len;
  UINT32  Index;
  CopyMem (Dst, Src, sizeof (*Dst));
  Dst->DnsServerList = NULL;
  if (Src->DnsServerList != NULL) {
    Len                = Src->DnsServerCount * sizeof (EFI_IPv6_ADDRESS);
    Dst->DnsServerList = AllocatePool (Len);
    if (Dst->DnsServerList == NULL) {
      Dns6CleanConfigure (Dst);
      return EFI_OUT_OF_RESOURCES;
    }
    for (Index = 0; Index < Src->DnsServerCount; Index++) {
      CopyMem (&Dst->DnsServerList[Index], &Src->DnsServerList[Index], sizeof (EFI_IPv6_ADDRESS));
    }
  }
  return EFI_SUCCESS;
}