libpldm : Add encode API for QueryDeviceIdentifiers cmd

QueryDeviceIdentifiers command is used by update agent to obtain the
firmware identifiers for the fimrware device and its defined in DSP0267
Version 1.1.0 sec:10.1.

Tested: Unit tests passed

Signed-off-by: gokulsanker <gokul.sanker.v.g@intel.com>
Change-Id: I472e85414b1a04b550b88c3e6058b86efb9b89b1
diff --git a/libpldm/firmware_update.c b/libpldm/firmware_update.c
new file mode 100644
index 0000000..25b2997
--- /dev/null
+++ b/libpldm/firmware_update.c
@@ -0,0 +1,17 @@
+#include "firmware_update.h"

+

+int encode_query_device_identifiers_req(uint8_t instance_id,

+					size_t payload_length,

+					struct pldm_msg *msg)

+{

+	if (msg == NULL) {

+		return PLDM_ERROR_INVALID_DATA;

+	}

+

+	if (payload_length != PLDM_QUERY_DEVICE_IDENTIFIERS_REQ_BYTES) {

+		return PLDM_ERROR_INVALID_LENGTH;

+	}

+

+	return encode_pldm_header_only(PLDM_REQUEST, instance_id, PLDM_FWUP,

+				       PLDM_QUERY_DEVICE_IDENTIFIERS, msg);

+}