core: Add TX/RX API that exposes message tag and tag owner
MCTP received packets can carry a message tag and tag owner bit
which is set by a remote MCTP endpoint. This can be used by the
remote MCTP endpoint to track the responses. Thus, libmctp should
provide a mechanism for the upper layer MCTP applications to
respond with the same message tag.
This patchset extends TX and RX API with message tag and
tag owner bits.
Signed-off-by: Sumanth Bhat <sumanth.bhat@linux.intel.com>
Change-Id: I6d07eafa86c653abdd4313ab7cc77e5a93124477
diff --git a/utils/mctp-astlpc-daemon.c b/utils/mctp-astlpc-daemon.c
index f782d4c..3852bd4 100644
--- a/utils/mctp-astlpc-daemon.c
+++ b/utils/mctp-astlpc-daemon.c
@@ -28,11 +28,12 @@
type = len > 0 ? *(uint8_t *)(msg) : 0x00;
fprintf(stderr, "TX: dest EID 0x%02x: %zd bytes, first byte [0x%02x]\n",
- eid, len, type);
- mctp_message_tx(ctx->mctp, eid, msg, len);
+ eid, len, type);
+ mctp_message_tx(ctx->mctp, eid, 0, MCTP_MESSAGE_TO_SRC, msg, len);
}
-static void rx_message(uint8_t eid, void *data, void *msg, size_t len)
+static void rx_message(uint8_t eid, uint8_t msg_tag, bool tag_owner, void *data,
+ void *msg, size_t len)
{
struct ctx *ctx = data;
uint8_t type;