/* Callback function for DhcpIterateOptions. This callback sets the EFI_DHCP4_PACKET_OPTION array in the DHCP_PARSE_CONTEXT to point the individual DHCP option in the packet. */
EFI_STATUS Dhcp4ParseCheckOption(IN UINT8 Tag, IN UINT8 Len, IN UINT8 *Data, IN VOID *Context)
/* Callback function for DhcpIterateOptions. This callback sets the EFI_DHCP4_PACKET_OPTION array in the DHCP_PARSE_CONTEXT to point the individual DHCP option in the packet. */
EFI_STATUS Dhcp4ParseCheckOption(IN UINT8 Tag, IN UINT8 Len, IN UINT8 *Data, IN VOID *Context)
{
  DHCP_PARSE_CONTEXT  *Parse;
  Parse = (DHCP_PARSE_CONTEXT *)Context;
  Parse->Index++;
  if (Parse->Index <= Parse->OptionCount) {
    Parse->Option[Parse->Index - 1] = BASE_CR (Data, EFI_DHCP4_PACKET_OPTION, Data);
  }
  return EFI_SUCCESS;
}