Rashmica Gupta | ba6971b | 2022-12-09 16:27:38 +1100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */ |
| 2 | #ifndef LIBPLDM_AF_MCTP_H |
| 3 | #define LIBPLDM_AF_MCTP_H |
Andrew Jeffery | 9d2a1c6 | 2023-06-05 13:02:16 +0930 | [diff] [blame] | 4 | |
Rashmica Gupta | ba6971b | 2022-12-09 16:27:38 +1100 | [diff] [blame] | 5 | #include "libpldm/base.h" |
| 6 | #include "libpldm/pldm.h" |
| 7 | |
| 8 | #ifdef __cplusplus |
| 9 | extern "C" { |
| 10 | #endif |
| 11 | |
| 12 | struct pldm_transport_af_mctp; |
| 13 | |
| 14 | /* Init the transport backend */ |
| 15 | int pldm_transport_af_mctp_init(struct pldm_transport_af_mctp **ctx); |
| 16 | |
| 17 | /* Destroy the transport backend */ |
| 18 | void pldm_transport_af_mctp_destroy(struct pldm_transport_af_mctp *ctx); |
| 19 | |
| 20 | /* Get the core pldm transport struct */ |
| 21 | struct pldm_transport * |
| 22 | pldm_transport_af_mctp_core(struct pldm_transport_af_mctp *ctx); |
| 23 | |
| 24 | #ifdef PLDM_HAS_POLL |
| 25 | struct pollfd; |
| 26 | /* Init pollfd for async calls */ |
| 27 | int pldm_transport_af_mctp_init_pollfd(struct pldm_transport_af_mctp *ctx, |
| 28 | struct pollfd *pollfd); |
| 29 | #endif |
| 30 | |
| 31 | /* Inserts a TID-to-EID mapping into the transport's device map */ |
| 32 | int pldm_transport_af_mctp_map_tid(struct pldm_transport_af_mctp *ctx, |
| 33 | pldm_tid_t tid, mctp_eid_t eid); |
| 34 | |
| 35 | /* Removes a TID-to-EID mapping from the transport's device map */ |
| 36 | int pldm_transport_af_mctp_unmap_tid(struct pldm_transport_af_mctp *ctx, |
| 37 | pldm_tid_t tid, mctp_eid_t eid); |
| 38 | |
| 39 | #ifdef __cplusplus |
| 40 | } |
| 41 | #endif |
| 42 | |
Andrew Jeffery | 9d2a1c6 | 2023-06-05 13:02:16 +0930 | [diff] [blame] | 43 | #endif /* LIBPLDM_AF_MCTP*/ |