/* Cache the DHCPv6 proxy offer packet according to the received order. */
EFI_STATUS PxeBcCopyDhcp6Proxy(IN PXEBC_PRIVATE_DATA *Private, IN UINT32 OfferIndex)
/* Cache the DHCPv6 proxy offer packet according to the received order. */
EFI_STATUS PxeBcCopyDhcp6Proxy(IN PXEBC_PRIVATE_DATA *Private, IN UINT32 OfferIndex)
{
  EFI_PXE_BASE_CODE_MODE  *Mode;
  EFI_DHCP6_PACKET        *Offer;
  EFI_STATUS              Status;
  ASSERT (OfferIndex < Private->OfferNum);
  ASSERT (OfferIndex < PXEBC_OFFER_MAX_NUM);
  Mode  = Private->PxeBc.Mode;
  Offer = &Private->OfferBuffer[OfferIndex].Dhcp6.Packet.Offer;
  Status = PxeBcCacheDhcp6Packet (&Private->ProxyOffer.Dhcp6.Packet.Offer, Offer);
  if (EFI_ERROR (Status)) {
    return Status;
  }
  PxeBcParseDhcp6Packet (&Private->ProxyOffer.Dhcp6);
  CopyMem (&Mode->ProxyOffer.Dhcpv6, &Offer->Dhcp6, Offer->Length);
  Mode->ProxyOfferReceived = TRUE;
  return EFI_SUCCESS;
}