blob: 80a4725df6e0b6e283755dc79d9f08d81191b5a9 [file] [log] [blame]
Ramesh Iyyar3af5c322020-12-04 00:38:42 -06001// SPDX-License-Identifier: Apache-2.0
2
3#pragma once
4
5#include <libpldm/pldm.h>
6
7namespace phosphor
8{
9namespace dump
10{
11namespace 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 */
21int 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 **/
30uint8_t getPLDMInstanceID(uint8_t eid);
31
32} // namespace pldm
33} // namespace dump
34} // namespace phosphor