summaryrefslogtreecommitdiff
path: root/tools/testing/vsock/util.h
diff options
context:
space:
mode:
authorFilippo Storniolo <f.storniolo95@gmail.com>2023-11-03 18:55:51 +0100
committerDavid S. Miller <davem@davemloft.net>2023-11-07 22:27:07 +0000
commitd80f63f690257b04b4fe3731b90dbf34a9ebb93f (patch)
tree17b39006bbf109634fd944cca078e3d84b3aa163 /tools/testing/vsock/util.h
parent84d5fb9741316ca53f0f7c23b82f30e0bb33c38e (diff)
test/vsock: add dobule bind connect test
This add bind connect test which creates a listening server socket and tries to connect a client with a bound local port to it twice. Co-developed-by: Luigi Leonardi <luigi.leonardi@outlook.com> Signed-off-by: Luigi Leonardi <luigi.leonardi@outlook.com> Signed-off-by: Filippo Storniolo <f.storniolo95@gmail.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/vsock/util.h')
-rw-r--r--tools/testing/vsock/util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/vsock/util.h b/tools/testing/vsock/util.h
index a77175d25864..03c88d0cb861 100644
--- a/tools/testing/vsock/util.h
+++ b/tools/testing/vsock/util.h
@@ -36,9 +36,12 @@ struct test_case {
void init_signals(void);
unsigned int parse_cid(const char *str);
int vsock_stream_connect(unsigned int cid, unsigned int port);
+int vsock_bind_connect(unsigned int cid, unsigned int port,
+ unsigned int bind_port, int type);
int vsock_seqpacket_connect(unsigned int cid, unsigned int port);
int vsock_stream_accept(unsigned int cid, unsigned int port,
struct sockaddr_vm *clientaddrp);
+int vsock_stream_listen(unsigned int cid, unsigned int port);
int vsock_seqpacket_accept(unsigned int cid, unsigned int port,
struct sockaddr_vm *clientaddrp);
void vsock_wait_remote_close(int fd);