diff options
author | Luigi Leonardi <luigi.leonardi@outlook.com> | 2024-07-30 21:43:06 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-08-02 09:20:28 +0100 |
commit | 744500d81f81346b4d442809c0511684bb28c829 (patch) | |
tree | 8cdd72112e1bcaf0a4d43e5cbe053feb9535f611 /include | |
parent | 5fe164fb0e6e31dbcbb4b706fd76bc578e5af4c6 (diff) | |
download | lwn-744500d81f81346b4d442809c0511684bb28c829.tar.gz lwn-744500d81f81346b4d442809c0511684bb28c829.zip |
vsock: add support for SIOCOUTQ ioctl
Add support for ioctl(s) in AF_VSOCK.
The only ioctl available is SIOCOUTQ/TIOCOUTQ, which returns the number
of unsent bytes in the socket. This information is transport-specific
and is delegated to them using a callback.
Suggested-by: Daan De Meyer <daan.j.demeyer@gmail.com>
Signed-off-by: Luigi Leonardi <luigi.leonardi@outlook.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/af_vsock.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h index 535701efc1e5..fc504d2da3d0 100644 --- a/include/net/af_vsock.h +++ b/include/net/af_vsock.h @@ -169,6 +169,9 @@ struct vsock_transport { void (*notify_buffer_size)(struct vsock_sock *, u64 *); int (*notify_set_rcvlowat)(struct vsock_sock *vsk, int val); + /* SIOCOUTQ ioctl */ + ssize_t (*unsent_bytes)(struct vsock_sock *vsk); + /* Shutdown. */ int (*shutdown)(struct vsock_sock *, int); |