/* This function will register the station IP address and flush IP instance to start using the new IP address. */
EFI_STATUS PxeBcSetIp6Address(IN PXEBC_PRIVATE_DATA *Private)
/* This function will register the station IP address and flush IP instance to start using the new IP address. */
EFI_STATUS PxeBcSetIp6Address(IN PXEBC_PRIVATE_DATA *Private)
{
  EFI_STATUS          Status;
  EFI_DHCP6_PROTOCOL  *Dhcp6;
  Dhcp6 = Private->Dhcp6;
  CopyMem (&Private->StationIp.v6, &Private->TmpStationIp.v6, sizeof (EFI_IPv6_ADDRESS));
  CopyMem (&Private->PxeBc.Mode->StationIp.v6, &Private->StationIp.v6, sizeof (EFI_IPv6_ADDRESS));
  Status = PxeBcRegisterIp6Address (Private, &Private->StationIp.v6);
  if (EFI_ERROR (Status)) {
    Dhcp6->Stop (Dhcp6);
    return Status;
  }
  Status = PxeBcFlushStationIp (Private, &Private->StationIp, NULL);
  if (EFI_ERROR (Status)) {
    PxeBcUnregisterIp6Address (Private);
    Dhcp6->Stop (Dhcp6);
    return Status;
  }
  AsciiPrint ("\n  Station IP address is ");
  PxeBcShowIp6Addr (&Private->StationIp.v6);
  return EFI_SUCCESS;
}