@@ -669,6 +669,13 @@ IOURINGINLINE void io_uring_prep_connect(struct io_uring_sqe *sqe, int fd,
io_uring_prep_rw(IORING_OP_CONNECT, sqe, fd, addr, 0, addrlen);
}
+IOURINGINLINE void io_uring_prep_bind(struct io_uring_sqe *sqe, int fd,
+ struct sockaddr *addr,
+ socklen_t addrlen)
+{
+ io_uring_prep_rw(IORING_OP_BIND, sqe, fd, addr, 0, addrlen);
+}
+
IOURINGINLINE void io_uring_prep_files_update(struct io_uring_sqe *sqe,
int *fds, unsigned nr_fds,
int offset)
@@ -257,6 +257,7 @@ enum io_uring_op {
IORING_OP_FUTEX_WAITV,
IORING_OP_FIXED_FD_INSTALL,
IORING_OP_FTRUNCATE,
+ IORING_OP_BIND,
/* this goes last, obviously */
IORING_OP_LAST,
@@ -201,4 +201,5 @@ LIBURING_2.6 {
LIBURING_2.7 {
io_uring_prep_fadvise64;
io_uring_prep_madvise64;
+ io_uring_prep_bind;
} LIBURING_2.6;
Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de> --- src/include/liburing.h | 7 +++++++ src/include/liburing/io_uring.h | 1 + src/liburing-ffi.map | 1 + 3 files changed, 9 insertions(+)