/* Parse a certain dhcp4 option by OptTag in Buffer, and return with start pointer. */
EFI_DHCP4_PACKET_OPTION* HttpBootParseDhcp4Options(IN UINT8 *Buffer, IN UINT32 Length, IN UINT8 OptTag)
/* Parse a certain dhcp4 option by OptTag in Buffer, and return with start pointer. */
EFI_DHCP4_PACKET_OPTION* HttpBootParseDhcp4Options(IN UINT8 *Buffer, IN UINT32 Length, IN UINT8 OptTag)
{
  EFI_DHCP4_PACKET_OPTION  *Option;
  UINT32                   Offset;
  Option = (EFI_DHCP4_PACKET_OPTION *)Buffer;
  Offset = 0;
  while (Offset < Length && Option->OpCode != DHCP4_TAG_EOP) {
    if (Option->OpCode == OptTag) {
      return Option;
    }
    if (Option->OpCode == DHCP4_TAG_PAD) {
      Offset++;
    } else {
      Offset += Option->Length + 2;
    }
    Option = (EFI_DHCP4_PACKET_OPTION *)(Buffer + Offset);
  }
  return NULL;
}