/* This function swaps the bytes in a 128-bit IPv6 address to switch the value from little endian to big endian or vice versa. The byte swapped value is returned. */
EFI_IPv6_ADDRESS* EFIAPI Ip6Swap128(EFI_IPv6_ADDRESS *Ip6)
/* This function swaps the bytes in a 128-bit IPv6 address to switch the value from little endian to big endian or vice versa. The byte swapped value is returned. */
EFI_IPv6_ADDRESS* EFIAPI Ip6Swap128(EFI_IPv6_ADDRESS *Ip6)
{
  UINT64  High;
  UINT64  Low;
  ASSERT (Ip6 != NULL);
  CopyMem (&High, Ip6, sizeof (UINT64));
  CopyMem (&Low, &Ip6->Addr[8], sizeof (UINT64));
  High = SwapBytes64 (High);
  Low  = SwapBytes64 (Low);
  CopyMem (Ip6, &Low, sizeof (UINT64));
  CopyMem (&Ip6->Addr[8], &High, sizeof (UINT64));
  return Ip6;
}