blob: 3908929cd8b8c2bebb1ccd65e6afb61321b80aab [file] [log] [blame]
Rashmica Guptaba6971b2022-12-09 16:27:38 +11001/* 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 Jeffery9d2a1c62023-06-05 13:02:16 +09304
Rashmica Guptaba6971b2022-12-09 16:27:38 +11005#include "libpldm/base.h"
6#include "libpldm/pldm.h"
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12struct pldm_transport_af_mctp;
13
14/* Init the transport backend */
15int pldm_transport_af_mctp_init(struct pldm_transport_af_mctp **ctx);
16
17/* Destroy the transport backend */
18void pldm_transport_af_mctp_destroy(struct pldm_transport_af_mctp *ctx);
19
20/* Get the core pldm transport struct */
21struct pldm_transport *
22pldm_transport_af_mctp_core(struct pldm_transport_af_mctp *ctx);
23
24#ifdef PLDM_HAS_POLL
25struct pollfd;
26/* Init pollfd for async calls */
27int 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 */
32int 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 */
36int 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 Jeffery9d2a1c62023-06-05 13:02:16 +093043#endif /* LIBPLDM_AF_MCTP*/