/* Parse out a DHCPv6 option by OptTag, and find the position in buffer. */
EFI_DHCP6_PACKET_OPTION* HttpBootParseDhcp6Options(IN UINT8 *Buffer, IN UINT32 Length, IN UINT16 OptTag)
/* Parse out a DHCPv6 option by OptTag, and find the position in buffer. */
EFI_DHCP6_PACKET_OPTION* HttpBootParseDhcp6Options(IN UINT8 *Buffer, IN UINT32 Length, IN UINT16 OptTag)
{
  EFI_DHCP6_PACKET_OPTION  *Option;
  UINT32                   Offset;
  Option = (EFI_DHCP6_PACKET_OPTION *)Buffer;
  Offset = 0;
  while (Offset < Length) {
    if (NTOHS (Option->OpCode) == OptTag) {
      return Option;
    }
    Offset += (NTOHS (Option->OpLen) + 4);
    Option  = (EFI_DHCP6_PACKET_OPTION *)(Buffer + Offset);
  }
  return NULL;
}