| 1 | |
| 2 |
|
| 3 | #include <linux/net.h>
|
| 4 | #include <linux/uio.h>
|
| 5 | #include <linux/io_uring_types.h>
|
| 6 | #include <uapi/linux/io_uring/bpf_filter.h>
|
| 7 |
|
| 8 | struct io_async_msghdr {
|
| 9 | #if defined(CONFIG_NET)
|
| 10 | struct iou_vec vec;
|
| 11 |
|
| 12 | struct_group(clear,
|
| 13 | int namelen;
|
| 14 | struct iovec fast_iov;
|
| 15 | __kernel_size_t controllen;
|
| 16 | __kernel_size_t payloadlen;
|
| 17 | struct sockaddr __user *uaddr;
|
| 18 | struct msghdr msg;
|
| 19 | struct sockaddr_storage addr;
|
| 20 | );
|
| 21 | #else
|
| 22 | struct_group(clear);
|
| 23 | #endif
|
| 24 | };
|
| 25 |
|
| 26 | #if defined(CONFIG_NET)
|
| 27 |
|
| 28 | int io_shutdown_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
| 29 | int io_shutdown(struct io_kiocb *req, unsigned int issue_flags);
|
| 30 |
|
| 31 | void io_sendmsg_recvmsg_cleanup(struct io_kiocb *req);
|
| 32 | int io_sendmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
| 33 | int io_sendmsg(struct io_kiocb *req, unsigned int issue_flags);
|
| 34 |
|
| 35 | int io_send(struct io_kiocb *req, unsigned int issue_flags);
|
| 36 |
|
| 37 | int io_recvmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
| 38 | int io_recvmsg(struct io_kiocb *req, unsigned int issue_flags);
|
| 39 | int io_recv(struct io_kiocb *req, unsigned int issue_flags);
|
| 40 |
|
| 41 | void io_sendrecv_fail(struct io_kiocb *req);
|
| 42 |
|
| 43 | int io_accept_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
| 44 | int io_accept(struct io_kiocb *req, unsigned int issue_flags);
|
| 45 |
|
| 46 | int io_socket_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
| 47 | int io_socket(struct io_kiocb *req, unsigned int issue_flags);
|
| 48 | void io_socket_bpf_populate(struct io_uring_bpf_ctx *bctx, struct io_kiocb *req);
|
| 49 | void io_connect_bpf_populate(struct io_uring_bpf_ctx *bctx, struct io_kiocb *req);
|
| 50 |
|
| 51 | int io_connect_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
| 52 | int io_connect(struct io_kiocb *req, unsigned int issue_flags);
|
| 53 |
|
| 54 | int io_sendmsg_zc(struct io_kiocb *req, unsigned int issue_flags);
|
| 55 | int io_send_zc_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
| 56 | void io_send_zc_cleanup(struct io_kiocb *req);
|
| 57 |
|
| 58 | int io_bind_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
| 59 | int io_bind(struct io_kiocb *req, unsigned int issue_flags);
|
| 60 |
|
| 61 | int io_listen_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
| 62 | int io_listen(struct io_kiocb *req, unsigned int issue_flags);
|
| 63 |
|
| 64 | void io_netmsg_cache_free(const void *entry);
|
| 65 | #else
|
| 66 | static inline void io_netmsg_cache_free(const void *entry)
|
| 67 | {
|
| 68 | }
|
| 69 | static inline void io_socket_bpf_populate(struct io_uring_bpf_ctx *bctx,
|
| 70 | struct io_kiocb *req)
|
| 71 | {
|
| 72 | }
|
| 73 |
|
| 74 | static inline void io_connect_bpf_populate(struct io_uring_bpf_ctx *bctx,
|
| 75 | struct io_kiocb *req)
|
| 76 | {
|
| 77 | }
|
| 78 |
|
| 79 | #endif
|