diff --git a/include/libpldm/base.h b/include/libpldm/base.h
index 7580efb..e230482 100644
--- a/include/libpldm/base.h
+++ b/include/libpldm/base.h
@@ -89,6 +89,7 @@
 #define PLDM_INSTANCE_MAX 31
 #define PLDM_MAX_TYPES 64
 #define PLDM_MAX_CMDS_PER_TYPE 256
+#define PLDM_MAX_TIDS 256
 
 /* Message payload lengths */
 #define PLDM_GET_COMMANDS_REQ_BYTES 5
diff --git a/include/libpldm/meson.build b/include/libpldm/meson.build
index b3da4b2..39c53ea 100644
--- a/include/libpldm/meson.build
+++ b/include/libpldm/meson.build
@@ -32,5 +32,9 @@
     'requester/instance-id.h',
     'requester/pldm.h'
     )
+   libpldm_transport_headers += files(
+    'transport.h',
+    'transport/mctp-demux.h'
+   )
 endif
 
diff --git a/include/libpldm/requester/pldm.h b/include/libpldm/requester/pldm.h
index e0f092f..9e3b08d 100644
--- a/include/libpldm/requester/pldm.h
+++ b/include/libpldm/requester/pldm.h
@@ -8,6 +8,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
+/* Delete when deleting old api */
 typedef uint8_t mctp_eid_t;
 
 typedef enum pldm_requester_error_codes {
@@ -21,8 +22,12 @@
 	PLDM_REQUESTER_SEND_FAIL = -7,
 	PLDM_REQUESTER_RECV_FAIL = -8,
 	PLDM_REQUESTER_INVALID_RECV_LEN = -9,
+	PLDM_REQUESTER_SETUP_FAIL = -10,
+	PLDM_REQUESTER_INVALID_SETUP = -11,
+	PLDM_REQUESTER_POLL_FAIL = -12,
 } pldm_requester_rc_t;
 
+/* ------ Old API ---- deprecated */
 /**
  * @brief Connect to the MCTP socket and provide an fd to it. The fd can be
  *        used to pass as input to other APIs below, or can be polled.
diff --git a/include/libpldm/transport.h b/include/libpldm/transport.h
new file mode 100644
index 0000000..802fae5
--- /dev/null
+++ b/include/libpldm/transport.h
@@ -0,0 +1,117 @@
+#ifndef TRANSPORT_PLDM_H
+#define TRANSPORT_PLDM_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "libpldm/base.h"
+#include "libpldm/pldm.h"
+#include <stddef.h>
+
+struct pldm_transport;
+
+/**
+ * @brief Waits for a PLDM event.
+ *
+ * @pre The pldm transport instance must be initialised; otherwise,
+ * 	PLDM_REQUESTER_INVALID_SETUP is returned. This should be called after
+ * 	pldm_transport_send_msg has been called.
+ *
+ * @return pldm_requester_rc_t (errno may be set)
+ */
+pldm_requester_rc_t pldm_transport_poll(struct pldm_transport *transport,
+					int timeout);
+
+/**
+ * @brief Asynchronously send a PLDM message. Control is immediately returned to
+ * 	  the caller.
+ *
+ * @pre The pldm transport instance must be initialised; otherwise,
+ * 	PLDM_REQUESTER_INVALID_SETUP is returned. If the transport requires a
+ * 	TID to transport specific identifier mapping, this must already be set
+ * 	up.
+ *
+ * @param[in] ctx - pldm transport instance
+ * @param[in] tid - destination PLDM TID
+ * @param[in] pldm_req_msg - caller owned pointer to PLDM request msg or async
+ *            notification. If this is NULL, PLDM_REQUESTER_INVALID_SETUP is
+ * 	      returned.
+ * @param[in] req_msg_len - size of PLDM request msg. If this is less than the
+ * 	      minimum size of a PLDM msg PLDM_REQUESTER_NOT_REQ_MSG is returned.
+ * 	      Otherwise, if this is not the correct length of the PLDM msg,
+ * 	      behaviour is undefined.
+ *
+ * @return pldm_requester_rc_t (errno may be set)
+ */
+pldm_requester_rc_t pldm_transport_send_msg(struct pldm_transport *transport,
+					    pldm_tid_t tid,
+					    const void *pldm_req_msg,
+					    size_t req_msg_len);
+
+/**
+ * @brief Asynchronously get a PLDM response message for the given TID
+ * 	  regardless of instance ID. Control is immediately returned to the
+ * 	  caller.
+ *
+ * @pre The pldm transport instance must be initialised; otherwise,
+ * 	PLDM_REQUESTER_INVALID_SETUP is returned. If the transport requires a
+ * 	TID to transport specific identifier mapping, this must already be set
+ * 	up.
+ *
+ * @param[in] ctx - pldm transport instance
+ * @param[in] tid - destination PLDM TID
+ * @param[out] pldm_resp_msg - *pldm_resp_msg will point to PLDM response msg if
+ * 	       return code is PLDM_REQUESTER_SUCCESS; otherwise, NULL. On
+ * 	       success this function allocates memory, caller to
+ * 	       free(*pldm_resp_msg).
+ * @param[out] resp_msg_len - caller owned pointer that will be made to point to
+ *             the size of the PLDM response msg. If NULL,
+ * 	       PLDM_REQUESTER_INVALID_SETUP is returned.
+ *
+ * @return pldm_requester_rc_t (errno may be set). Failure is returned if no
+ * 	   PLDM response messages are available.
+ *
+ */
+pldm_requester_rc_t pldm_transport_recv_msg(struct pldm_transport *transport,
+					    pldm_tid_t tid,
+					    void **pldm_resp_msg,
+					    size_t *resp_msg_len);
+
+/**
+ * @brief Synchronously send a PLDM request and receive the response. Control is
+ * 	  returned to the caller once the response is received.
+ *
+ * @pre The pldm transport instance must be initialised; otherwise,
+ * 	PLDM_REQUESTER_INVALID_SETUP is returned. If the transport requires a
+ * 	TID to transport specific identifier mapping, this must already be set
+ * 	up.
+ *
+ * @param[in] ctx - pldm transport instance with a registered transport
+ * @param[in] tid - destination PLDM TID
+ * @param[in] pldm_req_msg - caller owned pointer to PLDM request msg or async
+ * 	      notification. If NULL, PLDM_REQUESTER_INVALID_SETUP is returned.
+ * @param[in] req_msg_len - size of PLDM request msg. If this is less than the
+ * 	      minimum size of a PLDM msg PLDM_REQUESTER_NOT_REQ_MSG is returned.
+ * 	      Otherwise, if this is not the correct length of the PLDM msg,
+ * 	      behaviour is undefined.
+ * @param[out] pldm_resp_msg - *pldm_resp_msg will point to PLDM response msg if
+ * 	       return code is PLDM_REQUESTER_SUCCESS; otherwise, NULL. On
+ * 	       success this function allocates memory, caller to
+ * 	       free(*pldm_resp_msg).
+ * @param[out] resp_msg_len - caller owned pointer that will be made to point to
+ *             the size of the PLDM response msg. If NULL,
+ * 	       PLDM_REQUESTER_INVALID_SETUP is returned.
+ *
+ * @return pldm_requester_rc_t (errno may be set)
+ */
+pldm_requester_rc_t
+pldm_transport_send_recv_msg(struct pldm_transport *transport, pldm_tid_t tid,
+			     const void *pldm_req_msg, size_t req_msg_len,
+			     void **pldm_resp_msg, size_t *resp_msg_len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* TRANSPORT_PLDM_H */
diff --git a/include/libpldm/transport/mctp-demux.h b/include/libpldm/transport/mctp-demux.h
new file mode 100644
index 0000000..fa1a544
--- /dev/null
+++ b/include/libpldm/transport/mctp-demux.h
@@ -0,0 +1,43 @@
+/* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */
+#ifndef LIBPLDM_DEMUX_H
+#define LIBPLDM_DEMUX_H
+#include "../config.h"
+#include "libpldm/base.h"
+#include "libpldm/pldm.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct pldm_transport_mctp_demux;
+
+/* Init the transport backend */
+int pldm_transport_mctp_demux_init(struct pldm_transport_mctp_demux **ctx);
+
+/* Destroy the transport backend */
+void pldm_transport_mctp_demux_destroy(struct pldm_transport_mctp_demux *ctx);
+
+/* Get the core pldm transport struct */
+struct pldm_transport *
+pldm_transport_mctp_demux_core(struct pldm_transport_mctp_demux *ctx);
+
+#ifdef PLDM_HAS_POLL
+struct pollfd;
+/* Init pollfd for async calls */
+int pldm_transport_mctp_demux_init_pollfd(struct pldm_transport_mctp_demux *ctx,
+					  struct pollfd *pollfd);
+#endif
+
+/* Inserts a TID-to-EID mapping into the transport's device map */
+int pldm_transport_mctp_demux_map_tid(struct pldm_transport_mctp_demux *ctx,
+				      pldm_tid_t tid, mctp_eid_t eid);
+
+/* Removes a TID-to-EID mapping from the transport's device map */
+int pldm_transport_mctp_demux_unmap_tid(struct pldm_transport_mctp_demux *ctx,
+					pldm_tid_t tid, mctp_eid_t eid);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // LIBPLDM_DEMUX_H
diff --git a/meson.build b/meson.build
index e9b4be2..e1097d6 100644
--- a/meson.build
+++ b/meson.build
@@ -18,6 +18,7 @@
 
 libpldm_include_dir = ['include', 'src']
 libpldm_headers = files()
+libpldm_transport_headers = files()
 
 subdir('include/libpldm')
 
@@ -35,6 +36,11 @@
   subdir:'libpldm'
   )
 
+install_headers(
+  libpldm_transport_headers,
+  subdir:'libpldm/transport'
+  )
+
 libpldm_dep = declare_dependency(
   include_directories: libpldm_include_dir,
   link_with: libpldm)
@@ -45,6 +51,15 @@
   version: meson.project_version(),
   libraries: libpldm)
 
+compiler = meson.get_compiler('c')
+conf = configuration_data()
+if compiler.has_header('poll.h')
+  conf.set('PLDM_HAS_POLL', 1)
+endif
+configure_file(output: 'config.h',
+  configuration: conf
+)
+
 if get_option('tests').enabled()
   subdir('tests')
 endif
diff --git a/src/mctp-defines.h b/src/mctp-defines.h
new file mode 100644
index 0000000..6c3d086
--- /dev/null
+++ b/src/mctp-defines.h
@@ -0,0 +1,15 @@
+#ifndef MCTP_DEFINES_H
+#define MCTP_DEFINES_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define MCTP_MSG_TYPE_PLDM 1
+#define MCTP_MAX_NUM_EID 256
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MCTP_DEFINES_H
diff --git a/src/meson.build b/src/meson.build
index fc44e8a..c1359c4 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -16,4 +16,5 @@
 
 if get_option('requester-api').enabled()
    subdir('requester')
+   subdir('transport')
 endif
diff --git a/src/requester/pldm.c b/src/requester/pldm.c
index b1916de..c78512f 100644
--- a/src/requester/pldm.c
+++ b/src/requester/pldm.c
@@ -1,138 +1,110 @@
-#include "pldm.h"
+#include "libpldm/requester/pldm.h"
 #include "base.h"
+#include "libpldm/transport.h"
 
 #include <bits/types/struct_iovec.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <unistd.h>
 
-const uint8_t mctp_msg_type_pldm = 1;
+/* Temporary for old api */
+#include "libpldm/transport/mctp-demux.h"
+extern int
+pldm_transport_mctp_demux_get_socket_fd(struct pldm_transport_mctp_demux *ctx);
+extern struct pldm_transport_mctp_demux *
+pldm_transport_mctp_demux_init_with_fd(int mctp_fd);
+
+/* ---  old APIS written in terms of the new API -- */
+/*
+ * pldm_open returns the file descriptor to the MCTP socket, which needs to
+ * persist over api calls (so a consumer can poll it for incoming messages).
+ * So we need a global variable to store the transport struct
+ */
+static struct pldm_transport_mctp_demux *open_transport;
 
 pldm_requester_rc_t pldm_open(void)
 {
-	ssize_t rc = -1;
-	int fd = -1;
+	int fd;
+	int rc;
 
-	fd = socket(AF_UNIX, SOCK_SEQPACKET, 0);
-	if (-1 == fd) {
-		return fd;
+	if (open_transport) {
+		return -1;
 	}
 
-	const char path[] = "\0mctp-mux";
-	struct sockaddr_un addr;
-	addr.sun_family = AF_UNIX;
-	memcpy(addr.sun_path, path, sizeof(path) - 1);
-	rc = connect(fd, (struct sockaddr *)&addr,
-		     sizeof(path) + sizeof(addr.sun_family) - 1);
-	if (-1 == rc) {
-		return PLDM_REQUESTER_OPEN_FAIL;
+	struct pldm_transport_mctp_demux *demux = NULL;
+	rc = pldm_transport_mctp_demux_init(&demux);
+	if (rc) {
+		return rc;
 	}
-	rc = write(fd, &mctp_msg_type_pldm, sizeof(mctp_msg_type_pldm));
-	if (-1 == rc) {
-		return PLDM_REQUESTER_OPEN_FAIL;
-	}
+
+	fd = pldm_transport_mctp_demux_get_socket_fd(demux);
+
+	open_transport = demux;
 
 	return fd;
 }
 
-/**
- * @brief Read MCTP socket. If there's data available, return success only if
- *        data is a PLDM message.
- *
- * @param[in] eid - destination MCTP eid
- * @param[in] mctp_fd - MCTP socket fd
- * @param[out] pldm_resp_msg - *pldm_resp_msg will point to PLDM msg,
- *             this function allocates memory, caller to free(*pldm_resp_msg) on
- *             success.
- * @param[out] resp_msg_len - caller owned pointer that will be made point to
- *             the size of the PLDM msg.
- *
- * @return pldm_requester_rc_t (errno may be set). failure is returned even
- *         when data was read, but wasn't a PLDM response message
- */
-static pldm_requester_rc_t mctp_recv(mctp_eid_t eid, int mctp_fd,
-				     uint8_t **pldm_resp_msg,
-				     size_t *resp_msg_len)
-{
-	ssize_t min_len = sizeof(eid) + sizeof(mctp_msg_type_pldm) +
-			  sizeof(struct pldm_msg_hdr);
-	ssize_t length = recv(mctp_fd, NULL, 0, MSG_PEEK | MSG_TRUNC);
-	if (length <= 0) {
-		return PLDM_REQUESTER_RECV_FAIL;
-	}
-	if (length < min_len) {
-		/* read and discard */
-		uint8_t buf[length];
-		recv(mctp_fd, buf, length, 0);
-		return PLDM_REQUESTER_INVALID_RECV_LEN;
-	}
-	struct iovec iov[2];
-	size_t mctp_prefix_len = sizeof(eid) + sizeof(mctp_msg_type_pldm);
-	uint8_t mctp_prefix[mctp_prefix_len];
-	size_t pldm_len = length - mctp_prefix_len;
-	iov[0].iov_len = mctp_prefix_len;
-	iov[0].iov_base = mctp_prefix;
-	*pldm_resp_msg = malloc(pldm_len);
-	iov[1].iov_len = pldm_len;
-	iov[1].iov_base = *pldm_resp_msg;
-	struct msghdr msg = {0};
-	msg.msg_iov = iov;
-	msg.msg_iovlen = sizeof(iov) / sizeof(iov[0]);
-	ssize_t bytes = recvmsg(mctp_fd, &msg, 0);
-	if (length != bytes) {
-		free(*pldm_resp_msg);
-		return PLDM_REQUESTER_INVALID_RECV_LEN;
-	}
-	if ((mctp_prefix[0] != eid) || (mctp_prefix[1] != mctp_msg_type_pldm)) {
-		free(*pldm_resp_msg);
-		return PLDM_REQUESTER_NOT_PLDM_MSG;
-	}
-	*resp_msg_len = pldm_len;
-	return PLDM_REQUESTER_SUCCESS;
-}
+/* This macro does the setup and teardown required for the old API to use the
+ * new API. Since the setup/teardown logic is the same for all four send/recv
+ * functions, it makes sense to only define it once. */
+#define PLDM_REQ_FN(eid, fd, fn, ...)                                          \
+	do {                                                                   \
+		struct pldm_transport_mctp_demux *demux;                       \
+		bool using_open_transport = false;                             \
+		pldm_requester_rc_t rc;                                        \
+		pldm_tid_t tid = 1;                                            \
+		struct pldm_transport *ctx;                                    \
+		/* The fd can be for a socket we opened or one the consumer    \
+		 * opened. */                                                  \
+		if (open_transport &&                                          \
+		    mctp_fd == pldm_transport_mctp_demux_get_socket_fd(        \
+				   open_transport)) {                          \
+			using_open_transport = true;                           \
+			demux = open_transport;                                \
+		} else {                                                       \
+			demux = pldm_transport_mctp_demux_init_with_fd(fd);    \
+			if (!demux) {                                          \
+				rc = PLDM_REQUESTER_OPEN_FAIL;                 \
+				goto transport_out;                            \
+			}                                                      \
+		}                                                              \
+		ctx = pldm_transport_mctp_demux_core(demux);                   \
+		rc = pldm_transport_mctp_demux_map_tid(demux, tid, eid);       \
+		if (rc) {                                                      \
+			rc = PLDM_REQUESTER_OPEN_FAIL;                         \
+			goto transport_out;                                    \
+		}                                                              \
+		rc = fn(ctx, tid, __VA_ARGS__);                                \
+	transport_out:                                                         \
+		if (!using_open_transport) {                                   \
+			pldm_transport_mctp_demux_destroy(demux);              \
+		}                                                              \
+		return rc;                                                     \
+	} while (0)
 
 pldm_requester_rc_t pldm_recv_any(mctp_eid_t eid, int mctp_fd,
 				  uint8_t **pldm_resp_msg, size_t *resp_msg_len)
 {
-	pldm_requester_rc_t rc =
-	    mctp_recv(eid, mctp_fd, pldm_resp_msg, resp_msg_len);
-	if (rc != PLDM_REQUESTER_SUCCESS) {
-		return rc;
-	}
-
-	struct pldm_msg_hdr *hdr = (struct pldm_msg_hdr *)(*pldm_resp_msg);
-	if (hdr->request != PLDM_RESPONSE) {
-		free(*pldm_resp_msg);
-		return PLDM_REQUESTER_NOT_RESP_MSG;
-	}
-
-	uint8_t pldm_rc = 0;
-	if (*resp_msg_len < (sizeof(struct pldm_msg_hdr) + sizeof(pldm_rc))) {
-		free(*pldm_resp_msg);
-		return PLDM_REQUESTER_RESP_MSG_TOO_SMALL;
-	}
-
-	return PLDM_REQUESTER_SUCCESS;
+	PLDM_REQ_FN(eid, mctp_fd, pldm_transport_recv_msg,
+		    (void **)pldm_resp_msg, resp_msg_len);
 }
 
-pldm_requester_rc_t pldm_recv(mctp_eid_t eid, int mctp_fd, uint8_t instance_id,
+pldm_requester_rc_t pldm_recv(mctp_eid_t eid, int mctp_fd,
+			      __attribute__((unused)) uint8_t instance_id,
 			      uint8_t **pldm_resp_msg, size_t *resp_msg_len)
 {
 	pldm_requester_rc_t rc =
 	    pldm_recv_any(eid, mctp_fd, pldm_resp_msg, resp_msg_len);
-	if (rc != PLDM_REQUESTER_SUCCESS) {
-		return rc;
-	}
-
 	struct pldm_msg_hdr *hdr = (struct pldm_msg_hdr *)(*pldm_resp_msg);
 	if (hdr->instance_id != instance_id) {
 		free(*pldm_resp_msg);
+		*pldm_resp_msg = NULL;
 		return PLDM_REQUESTER_INSTANCE_ID_MISMATCH;
 	}
-
-	return PLDM_REQUESTER_SUCCESS;
+	return rc;
 }
 
 pldm_requester_rc_t pldm_send_recv(mctp_eid_t eid, int mctp_fd,
@@ -140,47 +112,23 @@
 				   size_t req_msg_len, uint8_t **pldm_resp_msg,
 				   size_t *resp_msg_len)
 {
-	struct pldm_msg_hdr *hdr = (struct pldm_msg_hdr *)pldm_req_msg;
-	if ((hdr->request != PLDM_REQUEST) &&
-	    (hdr->request != PLDM_ASYNC_REQUEST_NOTIFY)) {
-		return PLDM_REQUESTER_NOT_REQ_MSG;
-	}
-
-	pldm_requester_rc_t rc =
-	    pldm_send(eid, mctp_fd, pldm_req_msg, req_msg_len);
-	if (rc != PLDM_REQUESTER_SUCCESS) {
-		return rc;
-	}
-
-	while (1) {
-		rc = pldm_recv(eid, mctp_fd, hdr->instance_id, pldm_resp_msg,
-			       resp_msg_len);
-		if (rc == PLDM_REQUESTER_SUCCESS) {
-			break;
-		}
-	}
-
-	return rc;
+	PLDM_REQ_FN(eid, mctp_fd, pldm_transport_send_recv_msg, pldm_req_msg,
+		    req_msg_len, (void **)pldm_resp_msg, resp_msg_len);
 }
 
 pldm_requester_rc_t pldm_send(mctp_eid_t eid, int mctp_fd,
 			      const uint8_t *pldm_req_msg, size_t req_msg_len)
 {
-	uint8_t hdr[2] = {eid, mctp_msg_type_pldm};
+	PLDM_REQ_FN(eid, mctp_fd, pldm_transport_send_msg, (void *)pldm_req_msg,
+		    req_msg_len);
+}
 
-	struct iovec iov[2];
-	iov[0].iov_base = hdr;
-	iov[0].iov_len = sizeof(hdr);
-	iov[1].iov_base = (uint8_t *)pldm_req_msg;
-	iov[1].iov_len = req_msg_len;
-
-	struct msghdr msg = {0};
-	msg.msg_iov = iov;
-	msg.msg_iovlen = sizeof(iov) / sizeof(iov[0]);
-
-	ssize_t rc = sendmsg(mctp_fd, &msg, 0);
-	if (rc == -1) {
-		return PLDM_REQUESTER_SEND_FAIL;
+/* Adding this here for completeness in the case we can't smoothly
+ * transition apps over to the new api */
+void pldm_close()
+{
+	if (open_transport) {
+		pldm_transport_mctp_demux_destroy(open_transport);
 	}
-	return PLDM_REQUESTER_SUCCESS;
+	open_transport = NULL;
 }
diff --git a/src/transport/container-of.h b/src/transport/container-of.h
new file mode 100644
index 0000000..facefe5
--- /dev/null
+++ b/src/transport/container-of.h
@@ -0,0 +1,9 @@
+#ifndef CONTAINER_OF_H
+#define CONTAINER_OF_H
+
+#ifndef container_of
+#define container_of(ptr, type, member)                                        \
+	(type *)((char *)(ptr)-offsetof(type, member))
+#endif
+
+#endif
diff --git a/src/transport/mctp-demux.c b/src/transport/mctp-demux.c
new file mode 100644
index 0000000..4b56f2f
--- /dev/null
+++ b/src/transport/mctp-demux.c
@@ -0,0 +1,259 @@
+#include "../mctp-defines.h"
+#include "base.h"
+#include "container-of.h"
+#include "libpldm/pldm.h"
+#include "libpldm/transport.h"
+#include "transport.h"
+
+#include <errno.h>
+#include <poll.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <sys/un.h>
+#include <unistd.h>
+
+#define MCTP_DEMUX_NAME "libmctp-demux-daemon"
+const uint8_t mctp_msg_type = MCTP_MSG_TYPE_PLDM;
+
+struct pldm_transport_mctp_demux {
+	struct pldm_transport transport;
+	int socket;
+	/* In the future this probably needs to move to a tid-eid-uuid/network
+	 * id mapping for multi mctp networks */
+	pldm_tid_t tid_eid_map[MCTP_MAX_NUM_EID];
+};
+
+#define transport_to_demux(ptr)                                                \
+	container_of(ptr, struct pldm_transport_mctp_demux, transport)
+
+struct pldm_transport *
+pldm_transport_mctp_demux_core(struct pldm_transport_mctp_demux *ctx)
+{
+	return &ctx->transport;
+}
+
+static pldm_requester_rc_t pldm_transport_mctp_demux_open(void)
+{
+	int fd = -1;
+	ssize_t rc = -1;
+
+	fd = socket(AF_UNIX, SOCK_SEQPACKET, 0);
+	if (fd == -1) {
+		return fd;
+	}
+
+	const char path[] = "\0mctp-mux";
+	struct sockaddr_un addr;
+	addr.sun_family = AF_UNIX;
+	memcpy(addr.sun_path, path, sizeof(path) - 1);
+	rc = connect(fd, (struct sockaddr *)&addr,
+		     sizeof(path) + sizeof(addr.sun_family) - 1);
+	if (rc == -1) {
+		return PLDM_REQUESTER_OPEN_FAIL;
+	}
+	rc = write(fd, &mctp_msg_type, sizeof(mctp_msg_type));
+	if (rc == -1) {
+		return PLDM_REQUESTER_OPEN_FAIL;
+	}
+
+	return fd;
+}
+
+int pldm_transport_mctp_demux_init_pollfd(struct pldm_transport *t,
+					  struct pollfd *pollfd)
+{
+	struct pldm_transport_mctp_demux *ctx = transport_to_demux(t);
+	pollfd->fd = ctx->socket;
+	pollfd->events = POLLIN;
+	return 0;
+}
+
+static int
+pldm_transport_mctp_demux_get_eid(struct pldm_transport_mctp_demux *ctx,
+				  pldm_tid_t tid, mctp_eid_t *eid)
+{
+	int i;
+	for (i = 0; i < MCTP_MAX_NUM_EID; i++) {
+		if (ctx->tid_eid_map[i] == tid) {
+			*eid = i;
+			return 0;
+		}
+	}
+	*eid = -1;
+	return -1;
+}
+
+int pldm_transport_mctp_demux_map_tid(struct pldm_transport_mctp_demux *ctx,
+				      pldm_tid_t tid, mctp_eid_t eid)
+{
+	ctx->tid_eid_map[eid] = tid;
+
+	return 0;
+}
+
+int pldm_transport_mctp_demux_unmap_tid(struct pldm_transport_mctp_demux *ctx,
+					__attribute__((unused)) pldm_tid_t tid,
+					mctp_eid_t eid)
+{
+	ctx->tid_eid_map[eid] = 0;
+
+	return 0;
+}
+
+static pldm_requester_rc_t
+pldm_transport_mctp_demux_recv(struct pldm_transport *t, pldm_tid_t tid,
+			       void **pldm_resp_msg, size_t *resp_msg_len)
+{
+	struct pldm_transport_mctp_demux *demux = transport_to_demux(t);
+	mctp_eid_t eid = 0;
+	int rc = pldm_transport_mctp_demux_get_eid(demux, tid, &eid);
+	if (rc) {
+		return PLDM_REQUESTER_RECV_FAIL;
+	}
+
+	ssize_t min_len =
+	    sizeof(eid) + sizeof(mctp_msg_type) + sizeof(struct pldm_msg_hdr);
+	ssize_t length = recv(demux->socket, NULL, 0, MSG_PEEK | MSG_TRUNC);
+	if (length <= 0) {
+		return PLDM_REQUESTER_RECV_FAIL;
+	}
+	uint8_t *buf = malloc(length);
+	if (buf == NULL) {
+		return PLDM_REQUESTER_RECV_FAIL;
+	}
+	if (length < min_len) {
+		/* read and discard */
+		recv(demux->socket, buf, length, 0);
+		free(buf);
+		return PLDM_REQUESTER_INVALID_RECV_LEN;
+	}
+	struct iovec iov[2];
+	uint8_t mctp_prefix[2];
+	size_t mctp_prefix_len = 2;
+	size_t pldm_len = length - mctp_prefix_len;
+	iov[0].iov_len = mctp_prefix_len;
+	iov[0].iov_base = mctp_prefix;
+	*pldm_resp_msg = buf;
+	if (*pldm_resp_msg == NULL) {
+		return PLDM_REQUESTER_RECV_FAIL;
+	}
+	iov[1].iov_len = pldm_len;
+	iov[1].iov_base = *pldm_resp_msg;
+	struct msghdr msg = {0};
+	msg.msg_iov = iov;
+	msg.msg_iovlen = sizeof(iov) / sizeof(iov[0]);
+	ssize_t bytes = recvmsg(demux->socket, &msg, 0);
+	if (length != bytes) {
+		free(*pldm_resp_msg);
+		*pldm_resp_msg = NULL;
+		return PLDM_REQUESTER_INVALID_RECV_LEN;
+	}
+	if ((mctp_prefix[0] != eid) || (mctp_prefix[1] != mctp_msg_type)) {
+		free(*pldm_resp_msg);
+		*pldm_resp_msg = NULL;
+		return PLDM_REQUESTER_NOT_PLDM_MSG;
+	}
+	*resp_msg_len = pldm_len;
+	return PLDM_REQUESTER_SUCCESS;
+}
+
+static pldm_requester_rc_t
+pldm_transport_mctp_demux_send(struct pldm_transport *t, pldm_tid_t tid,
+			       const void *pldm_req_msg, size_t req_msg_len)
+{
+	struct pldm_transport_mctp_demux *demux = transport_to_demux(t);
+	mctp_eid_t eid = 0;
+	if (pldm_transport_mctp_demux_get_eid(demux, tid, &eid)) {
+		return PLDM_REQUESTER_SEND_FAIL;
+	}
+
+	uint8_t hdr[2] = {eid, mctp_msg_type};
+
+	struct iovec iov[2];
+	iov[0].iov_base = hdr;
+	iov[0].iov_len = sizeof(hdr);
+	iov[1].iov_base = (uint8_t *)pldm_req_msg;
+	iov[1].iov_len = req_msg_len;
+
+	struct msghdr msg = {0};
+	msg.msg_iov = iov;
+	msg.msg_iovlen = sizeof(iov) / sizeof(iov[0]);
+
+	ssize_t rc = sendmsg(demux->socket, &msg, 0);
+	if (rc == -1) {
+		return PLDM_REQUESTER_SEND_FAIL;
+	}
+	return PLDM_REQUESTER_SUCCESS;
+}
+
+int pldm_transport_mctp_demux_init(struct pldm_transport_mctp_demux **ctx)
+{
+	if (!ctx || *ctx) {
+		return -EINVAL;
+	}
+
+	struct pldm_transport_mctp_demux *demux =
+	    calloc(1, sizeof(struct pldm_transport_mctp_demux));
+	if (!demux) {
+		return -ENOMEM;
+	}
+
+	demux->transport.name = MCTP_DEMUX_NAME;
+	demux->transport.version = 1;
+	demux->transport.recv = pldm_transport_mctp_demux_recv;
+	demux->transport.send = pldm_transport_mctp_demux_send;
+	demux->transport.init_pollfd = pldm_transport_mctp_demux_init_pollfd;
+	demux->socket = pldm_transport_mctp_demux_open();
+	if (demux->socket == -1) {
+		free(demux);
+		return -1;
+	}
+	*ctx = demux;
+	return 0;
+}
+
+void pldm_transport_mctp_demux_destroy(struct pldm_transport_mctp_demux *ctx)
+{
+	if (!ctx) {
+		return;
+	}
+	close(ctx->socket);
+	free(ctx);
+}
+
+/* Temporary for old API */
+struct pldm_transport_mctp_demux *
+pldm_transport_mctp_demux_init_with_fd(int mctp_fd)
+{
+	struct pldm_transport_mctp_demux *demux =
+	    calloc(1, sizeof(struct pldm_transport_mctp_demux));
+	if (!demux) {
+		return NULL;
+	}
+
+	demux->transport.name = MCTP_DEMUX_NAME;
+	demux->transport.version = 1;
+	demux->transport.recv = pldm_transport_mctp_demux_recv;
+	demux->transport.send = pldm_transport_mctp_demux_send;
+	demux->transport.init_pollfd = pldm_transport_mctp_demux_init_pollfd;
+	/* dup is so we can call pldm_transport_mctp_demux_destroy which closes
+	 * the socket, without closing the fd that is being used by the consumer
+	 */
+	demux->socket = dup(mctp_fd);
+	if (demux->socket == -1) {
+		free(demux);
+		return NULL;
+	}
+	return demux;
+}
+
+int pldm_transport_mctp_demux_get_socket_fd(
+    struct pldm_transport_mctp_demux *ctx)
+{
+	if (ctx && ctx->socket) {
+		return ctx->socket;
+	}
+	return -1;
+}
diff --git a/src/transport/meson.build b/src/transport/meson.build
new file mode 100644
index 0000000..1a2acc9
--- /dev/null
+++ b/src/transport/meson.build
@@ -0,0 +1,4 @@
+libpldm_sources += files(
+  'mctp-demux.c',
+  'transport.c'
+)
diff --git a/src/transport/transport.c b/src/transport/transport.c
new file mode 100644
index 0000000..0681e23
--- /dev/null
+++ b/src/transport/transport.c
@@ -0,0 +1,130 @@
+#include "libpldm/transport.h"
+#include "base.h"
+#include "libpldm/requester/pldm.h"
+#include "transport.h"
+
+#ifdef PLDM_HAS_POLL
+#include <poll.h>
+#endif
+#include <stdlib.h>
+#include <unistd.h>
+
+#ifndef PLDM_HAS_POLL
+struct pollfd {
+	int fd;	       /* file descriptor */
+	short events;  /* requested events */
+	short revents; /* returned events */
+};
+
+static inline int poll(struct pollfd *fds __attribute__((unused)),
+		       int nfds __attribute__((unused)),
+		       int timeout __attribute__((unused)))
+{
+	return 0;
+}
+#endif
+
+pldm_requester_rc_t pldm_transport_poll(struct pldm_transport *transport,
+					int timeout)
+{
+	struct pollfd pollfd;
+	int rc = 0;
+	if (!transport) {
+		return PLDM_REQUESTER_INVALID_SETUP;
+	}
+	if (!transport->init_pollfd) {
+		return PLDM_REQUESTER_SUCCESS;
+	}
+
+	transport->init_pollfd(transport, &pollfd);
+	rc = poll(&pollfd, 1, timeout);
+	if (rc < 0) {
+		return PLDM_REQUESTER_POLL_FAIL;
+	}
+
+	return PLDM_REQUESTER_SUCCESS;
+}
+
+pldm_requester_rc_t pldm_transport_send_msg(struct pldm_transport *transport,
+					    pldm_tid_t tid,
+					    const void *pldm_req_msg,
+					    size_t req_msg_len)
+{
+	if (!transport || !pldm_req_msg) {
+		return PLDM_REQUESTER_INVALID_SETUP;
+	}
+
+	if (req_msg_len < sizeof(struct pldm_msg_hdr)) {
+		return PLDM_REQUESTER_NOT_REQ_MSG;
+	}
+
+	const struct pldm_msg_hdr *hdr = pldm_req_msg;
+	if (!hdr->request) {
+		return PLDM_REQUESTER_NOT_REQ_MSG;
+	}
+
+	return transport->send(transport, tid, pldm_req_msg, req_msg_len);
+}
+
+pldm_requester_rc_t pldm_transport_recv_msg(struct pldm_transport *transport,
+					    pldm_tid_t tid,
+					    void **pldm_resp_msg,
+					    size_t *resp_msg_len)
+{
+	if (!transport || !resp_msg_len) {
+		return PLDM_REQUESTER_INVALID_SETUP;
+	}
+
+	pldm_requester_rc_t rc =
+	    transport->recv(transport, tid, pldm_resp_msg, resp_msg_len);
+	if (rc != PLDM_REQUESTER_SUCCESS) {
+		return rc;
+	}
+
+	struct pldm_msg_hdr *hdr = *pldm_resp_msg;
+	if (hdr->request || hdr->datagram) {
+		free(*pldm_resp_msg);
+		*pldm_resp_msg = NULL;
+		return PLDM_REQUESTER_NOT_RESP_MSG;
+	}
+
+	uint8_t pldm_rc = 0;
+	if (*resp_msg_len < (sizeof(struct pldm_msg_hdr) + sizeof(pldm_rc))) {
+		free(*pldm_resp_msg);
+		*pldm_resp_msg = NULL;
+		return PLDM_REQUESTER_RESP_MSG_TOO_SMALL;
+	}
+
+	return PLDM_REQUESTER_SUCCESS;
+}
+
+pldm_requester_rc_t
+pldm_transport_send_recv_msg(struct pldm_transport *transport, pldm_tid_t tid,
+			     const void *pldm_req_msg, size_t req_msg_len,
+			     void **pldm_resp_msg, size_t *resp_msg_len)
+
+{
+	if (!resp_msg_len) {
+		return PLDM_REQUESTER_INVALID_SETUP;
+	}
+
+	pldm_requester_rc_t rc =
+	    pldm_transport_send_msg(transport, tid, pldm_req_msg, req_msg_len);
+	if (rc != PLDM_REQUESTER_SUCCESS) {
+		return rc;
+	}
+
+	while (1) {
+		rc = pldm_transport_poll(transport, -1);
+		if (rc != PLDM_REQUESTER_SUCCESS) {
+			break;
+		}
+		rc = pldm_transport_recv_msg(transport, tid, pldm_resp_msg,
+					     resp_msg_len);
+		if (rc == PLDM_REQUESTER_SUCCESS) {
+			break;
+		}
+	}
+
+	return rc;
+}
diff --git a/src/transport/transport.h b/src/transport/transport.h
new file mode 100644
index 0000000..28d7f9b
--- /dev/null
+++ b/src/transport/transport.h
@@ -0,0 +1,38 @@
+#ifndef TRANSPORT_H
+#define TRANSPORT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "libpldm/base.h"
+#include "libpldm/requester/pldm.h"
+struct pollfd;
+
+/**
+ * @brief Generic PLDM transport struct
+ *
+ * @var name - name of the transport
+ * @var version - version of transport to use
+ * @var recv - pointer to the transport specific function to receive a message
+ * @var send - pointer to the transport specific function to send a message
+ * @var init_pollfd - pointer to the transport specific init_pollfd function
+ */
+struct pldm_transport {
+	const char *name;
+	uint8_t version;
+	pldm_requester_rc_t (*recv)(struct pldm_transport *transport,
+				    pldm_tid_t tid, void **pldm_resp_msg,
+				    size_t *resp_msg_len);
+	pldm_requester_rc_t (*send)(struct pldm_transport *transport,
+				    pldm_tid_t tid, const void *pldm_req_msg,
+				    size_t req_msg_len);
+	int (*init_pollfd)(struct pldm_transport *transport,
+			   struct pollfd *pollfd);
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // TRANSPORT_H
