Updates to libpldm base
Use constants to track pldm version and update some doxygen comments
Change-Id: I40ce1d606eb68b979fac825a3ddfaaa840e10810
Signed-off-by: Christian Geddes <crgeddes@us.ibm.com>
diff --git a/libpldm/base.c b/libpldm/base.c
index 6d9a67f..79f5ba5 100644
--- a/libpldm/base.c
+++ b/libpldm/base.c
@@ -34,7 +34,7 @@
msg->datagram = datagram;
msg->reserved = 0;
msg->instance_id = hdr->instance;
- msg->header_ver = 0;
+ msg->header_ver = PLDM_CURRENT_VERSION;
msg->type = hdr->pldm_type;
msg->command = hdr->command;
diff --git a/libpldm/base.h b/libpldm/base.h
index bdecc20..870e9d8 100644
--- a/libpldm/base.h
+++ b/libpldm/base.h
@@ -80,6 +80,9 @@
/* Response data has only one version and does not contain the checksum */
#define PLDM_GET_VERSION_RESP_BYTES 10
+#define PLDM_VERSION_0 0
+#define PLDM_CURRENT_VERSION PLDM_VERSION_0
+
/** @struct pldm_msg_hdr
*
* Structure representing PLDM message header fields
@@ -203,6 +206,8 @@
* @param[out] msg - Pointer to PLDM message header
*
* @return 0 on success, otherwise PLDM error codes.
+ * @note Caller is responsible for alloc and dealloc of msg
+ * and hdr params
*/
int pack_pldm_header(const struct pldm_header_info *hdr,
struct pldm_msg_hdr *msg);
@@ -214,6 +219,8 @@
* @param[out] hdr - Pointer to the PLDM header information
*
* @return 0 on success, otherwise PLDM error codes.
+ * @note Caller is responsible for alloc and dealloc of msg
+ * and hdr params
*/
int unpack_pldm_header(const struct pldm_msg_hdr *msg,
struct pldm_header_info *hdr);