summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/liburing.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/include/liburing.h b/src/include/liburing.h
index 7d884c9..c4189b1 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -5,6 +5,7 @@
extern "C" {
#endif
+#include <sys/socket.h>
#include <sys/uio.h>
#include <signal.h>
#include <string.h>
@@ -187,6 +188,20 @@ static inline void io_uring_prep_write_fixed(struct io_uring_sqe *sqe, int fd,
sqe->buf_index = buf_index;
}
+static inline void io_uring_prep_recvmsg(struct io_uring_sqe *sqe, int fd,
+ struct msghdr *msg, unsigned flags)
+{
+ io_uring_prep_rw(IORING_OP_RECVMSG, sqe, fd, msg, 1, 0);
+ sqe->msg_flags = flags;
+}
+
+static inline void io_uring_prep_sendmsg(struct io_uring_sqe *sqe, int fd,
+ const struct msghdr *msg, unsigned flags)
+{
+ io_uring_prep_rw(IORING_OP_SENDMSG, sqe, fd, msg, 1, 0);
+ sqe->msg_flags = flags;
+}
+
static inline void io_uring_prep_poll_add(struct io_uring_sqe *sqe, int fd,
short poll_mask)
{