pdr: Introduce remote_container_id and associated APIs

We have a concept of a Primary PDR repository and merging the PDRs from
a remote PLDM endpoint (DSP0248 section 7: PDRs support functions).

The main functions of the PLDM discovery Agent (DSP0248 section 14)
(assuming a PLDM terminus like BMC) is maintaining a primary PDR
repository, adding/deleting/updating the PDRs to form a complete system
model. And to do so this API (pldm_entity_node_get_remote_container_id)
will help us update the container id field of the PDR obtained by the
remote PLDM terminus.

Change-Id: I249e627a1e05ee6d9644f3f93f326e47256d914a
Signed-off-by: Archana Kakani <archana.kakani@ibm.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/include/libpldm/pdr.h b/include/libpldm/pdr.h
index 5443fba..6a72028 100644
--- a/include/libpldm/pdr.h
+++ b/include/libpldm/pdr.h
@@ -280,6 +280,15 @@
  */
 pldm_entity pldm_entity_extract(pldm_entity_node *node);
 
+/** @brief Extract remote container id from the pldm_entity_node
+ *
+ *  @param[in] entity         - pointer to existing entity
+ *
+ *  @param[out] cid           -  remote container id
+ */
+int pldm_entity_node_get_remote_container_id(const pldm_entity_node *entity,
+					     uint16_t *cid);
+
 /** @brief Destroy entity association tree
  *
  *  @param[in] tree - opaque pointer acting as a handle to the tree
@@ -362,7 +371,6 @@
  *  @param[in] tree - pointer to entity association tree
  *  @param[in/out] entity - entity type and instance id set on input, container
  *                 id set on output
- *
  *  @return pldm_entity_node* pointer to entity if found, NULL otherwise
  */
 pldm_entity_node *