summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/network_helpers.h
diff options
context:
space:
mode:
authorGeliang Tang <tanggeliang@kylinos.cn>2024-04-18 11:09:10 +0300
committerMartin KaFai Lau <martin.lau@kernel.org>2024-04-20 03:13:28 +0300
commitdb9994d022ecd42006354609f6e4e3f57e5a4b03 (patch)
tree9211f503d5d85c9add809589018f514f7e71b6f4 /tools/testing/selftests/bpf/network_helpers.h
parenta2e4979536c440838794ee292955ce9ed55ad181 (diff)
downloadlinux-db9994d022ecd42006354609f6e4e3f57e5a4b03.tar.xz
selftests/bpf: Update arguments of connect_to_addr
Move the third argument "int type" of connect_to_addr() to the first one which is closer to how the socket syscall is doing it. And add a network_helper_opts argument as the fourth one. Then change its usages in sock_addr.c too. Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> Link: https://lore.kernel.org/r/088ea8a95055f93409c5f57d12f0e58d43059ac4.1713427236.git.tanggeliang@kylinos.cn Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/network_helpers.h')
-rw-r--r--tools/testing/selftests/bpf/network_helpers.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/network_helpers.h b/tools/testing/selftests/bpf/network_helpers.h
index 414ea50bb3fc..aef297dfa6ca 100644
--- a/tools/testing/selftests/bpf/network_helpers.h
+++ b/tools/testing/selftests/bpf/network_helpers.h
@@ -56,7 +56,8 @@ int *start_reuseport_server(int family, int type, const char *addr_str,
int start_server_addr(int type, const struct sockaddr_storage *addr, socklen_t len,
const struct network_helper_opts *opts);
void free_fds(int *fds, unsigned int nr_close_fds);
-int connect_to_addr(const struct sockaddr_storage *addr, socklen_t len, int type);
+int connect_to_addr(int type, const struct sockaddr_storage *addr, socklen_t len,
+ const struct network_helper_opts *opts);
int connect_to_fd(int server_fd, int timeout_ms);
int connect_to_fd_opts(int server_fd, const struct network_helper_opts *opts);
int connect_fd_to_fd(int client_fd, int server_fd, int timeout_ms);