pdr: Add pldm_pdr_find_container_id_range_exclude() API

This API is necessary to find the container id of contained entity
which is not within the record handle ranges of the remote endpoint
PDRs.The remote endpoint has their own set of PDRs and have record
handle ranges defined.

Change-Id: If28325869d4c5c797c33bc4efd41bee16777a7aa
Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/include/libpldm/pdr.h b/include/libpldm/pdr.h
index c38f097..27ad6f1 100644
--- a/include/libpldm/pdr.h
+++ b/include/libpldm/pdr.h
@@ -180,6 +180,26 @@
 pldm_pdr_record *pldm_pdr_find_last_in_range(const pldm_pdr *repo,
 					     uint32_t first, uint32_t last);
 
+/** @brief find the container ID of the contained entity which is not in the
+ *  particular range of record handles given
+ *
+ * @param[in] repo - opaque pointer acting as a PDR repo handle
+ * @param[in] entity_type - entity type
+ * @param[in] entity_instance - instance of the entity
+ * @param[in] range_exclude_start_handle - first record handle in the range of the remote endpoint
+ *            which is ignored
+ * @param[in] range_exclude_end_handle - last record handle in the range of the remote endpoint
+ *            which is ignored
+ * @param[out] container_id - container id of the contained entity
+ *
+ * @return container id of the PDR record found on success, -EINVAL when repo is NULL, or -ENOKEY if
+ * the container id is not found.
+ */
+int pldm_pdr_find_container_id_range_exclude(
+	const pldm_pdr *repo, uint16_t entity_type, uint16_t entity_instance,
+	uint32_t range_exclude_start_handle, uint32_t range_exclude_end_handle,
+	uint16_t *container_id);
+
 /* ======================= */
 /* FRU Record Set PDR APIs */
 /* ======================= */