diff include/rtp_alloc_resp.h @ 3:60b512a868b4

librtpalloc: port of recvmsg wrapper module
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 27 May 2024 20:41:21 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/rtp_alloc_resp.h	Mon May 27 20:41:21 2024 +0000
@@ -0,0 +1,20 @@
+/*
+ * This header file declares the interface to the librtpalloc module
+ * that provides a wrapper around the recvmsg(2) call retrieving
+ * the response "packet" (structure plus UNIX access rights passing)
+ * from themwi-rtp-mgr.
+ */
+
+#pragma once
+
+#include <themwi/rtp/rtp_alloc_if.h>
+
+struct rtp_alloc_resp_wrap {
+	struct rtp_alloc_resp resp;
+	unsigned	resp_len;
+	int		fd_buf[4];
+	unsigned	num_fd;
+};
+
+int collect_rtpmgr_resp(int ctrl_fd, int recv_flags,
+			struct rtp_alloc_resp_wrap *out);