1 // SPDX-License-Identifier: Apache-2.0 2 3 #pragma once 4 5 #include <libpldm/pldm.h> 6 7 namespace phosphor 8 { 9 namespace dump 10 { 11 namespace pldm 12 { 13 14 /** 15 * @brief Opens the PLDM file descriptor 16 * 17 * @return file descriptor on success and throw 18 * exception (xyz::openbmc_project::Common::Error::NotAllowed) on 19 * failures. 20 */ 21 int openPLDM(); 22 23 /** 24 * @brief Returns the PLDM instance ID to use for PLDM commands 25 * 26 * @param[in] eid - The PLDM EID 27 * 28 * @return uint8_t - The instance ID 29 **/ 30 uint8_t getPLDMInstanceID(uint8_t eid); 31 32 } // namespace pldm 33 } // namespace dump 34 } // namespace phosphor 35