/* Calculate the Dhcp6 get mapping timeout by adding additional delay to the IP6 DAD transmits count. */
EFI_STATUS Dhcp6GetMappingTimeOut(IN EFI_IP6_CONFIG_PROTOCOL *Ip6Cfg, OUT UINTN *TimeOut)
/* Calculate the Dhcp6 get mapping timeout by adding additional delay to the IP6 DAD transmits count. */
EFI_STATUS Dhcp6GetMappingTimeOut(IN EFI_IP6_CONFIG_PROTOCOL *Ip6Cfg, OUT UINTN *TimeOut)
{
  EFI_STATUS                                Status;
  UINTN                                     DataSize;
  EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS  DadXmits;
  if ((Ip6Cfg == NULL) || (TimeOut == NULL)) {
    return EFI_INVALID_PARAMETER;
  }
  DataSize = sizeof (EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS);
  Status   = Ip6Cfg->GetData (
                       Ip6Cfg,
                       Ip6ConfigDataTypeDupAddrDetectTransmits,
                       &DataSize,
                       &DadXmits
                       );
  if (EFI_ERROR (Status)) {
    return Status;
  }
  *TimeOut = TICKS_PER_SECOND * DadXmits.DupAddrDetectTransmits + DHCP6_DAD_ADDITIONAL_DELAY;
  return EFI_SUCCESS;
}