summaryrefslogtreecommitdiff
path: root/include/linux/socket.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-11-24 00:17:16 +0300
committerJens Axboe <axboe@kernel.dk>2019-11-26 05:56:11 +0300
commitbd3ded3146daa2cbb57ed353749ef99cf75371b0 (patch)
tree72d55790cbd79afedf04b8fe819ae483eda22ea9 /include/linux/socket.h
parentc4a2ed72c9a61594b6afc23e1fbc78878d32b5a3 (diff)
downloadlinux-bd3ded3146daa2cbb57ed353749ef99cf75371b0.tar.xz
net: add __sys_connect_file() helper
This is identical to __sys_connect(), except it takes a struct file instead of an fd, and it also allows passing in extra file->f_flags flags. The latter is done to support masking in O_NONBLOCK without manipulating the original file flags. No functional changes in this patch. Cc: netdev@vger.kernel.org Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/socket.h')
-rw-r--r--include/linux/socket.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/socket.h b/include/linux/socket.h
index 09c32a21555b..4bde63021c09 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -399,6 +399,9 @@ extern int __sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr,
int __user *upeer_addrlen, int flags);
extern int __sys_socket(int family, int type, int protocol);
extern int __sys_bind(int fd, struct sockaddr __user *umyaddr, int addrlen);
+extern int __sys_connect_file(struct file *file,
+ struct sockaddr __user *uservaddr, int addrlen,
+ int file_flags);
extern int __sys_connect(int fd, struct sockaddr __user *uservaddr,
int addrlen);
extern int __sys_listen(int fd, int backlog);