Home
last modified time | relevance | path

Searched refs:server_fd (Results 1 – 12 of 12) sorted by relevance

/Linux-v5.10/tools/testing/selftests/bpf/prog_tests/
Dconnect_force_port.c49 static int run_test(int cgroup_fd, int server_fd, int family, int type) in run_test() argument
117 fd = connect_to_fd(server_fd, 0); in run_test()
134 int server_fd, cgroup_fd; in test_connect_force_port() local
140 server_fd = start_server(AF_INET, SOCK_STREAM, NULL, 60123, 0); in test_connect_force_port()
141 if (CHECK_FAIL(server_fd < 0)) in test_connect_force_port()
143 CHECK_FAIL(run_test(cgroup_fd, server_fd, AF_INET, SOCK_STREAM)); in test_connect_force_port()
144 close(server_fd); in test_connect_force_port()
146 server_fd = start_server(AF_INET6, SOCK_STREAM, NULL, 60124, 0); in test_connect_force_port()
147 if (CHECK_FAIL(server_fd < 0)) in test_connect_force_port()
149 CHECK_FAIL(run_test(cgroup_fd, server_fd, AF_INET6, SOCK_STREAM)); in test_connect_force_port()
[all …]
Dtcp_rtt.c92 static int run_test(int cgroup_fd, int server_fd) in run_test() argument
121 client_fd = connect_to_fd(server_fd, 0); in run_test()
158 int server_fd, cgroup_fd; in test_tcp_rtt() local
164 server_fd = start_server(AF_INET, SOCK_STREAM, NULL, 0, 0); in test_tcp_rtt()
165 if (CHECK_FAIL(server_fd < 0)) in test_tcp_rtt()
168 CHECK_FAIL(run_test(cgroup_fd, server_fd)); in test_tcp_rtt()
170 close(server_fd); in test_tcp_rtt()
Dload_bytes_relative.c12 int server_fd, cgroup_fd, prog_fd, map_fd, client_fd; in test_load_bytes_relative() local
26 server_fd = start_server(AF_INET, SOCK_STREAM, NULL, 0, 0); in test_load_bytes_relative()
27 if (CHECK_FAIL(server_fd < 0)) in test_load_bytes_relative()
52 client_fd = connect_to_fd(server_fd, 0); in test_load_bytes_relative()
67 close(server_fd); in test_load_bytes_relative()
Dsockopt_inherit.c10 static int connect_to_server(int server_fd) in connect_to_server() argument
22 if (getsockname(server_fd, (struct sockaddr *)&addr, &len)) { in connect_to_server()
173 int server_fd = -1, client_fd; in run_test() local
192 server_fd = start_server(); in run_test()
193 if (CHECK_FAIL(server_fd < 0)) in run_test()
198 (void *)&server_fd))) in run_test()
203 client_fd = connect_to_server(server_fd); in run_test()
219 close(server_fd); in run_test()
Dsk_lookup.c270 static int tcp_recv_send(int server_fd) in tcp_recv_send() argument
276 fd = accept(server_fd, NULL, NULL); in tcp_recv_send()
315 static int udp_recv_send(int server_fd) in udp_recv_send() argument
339 n = recvmsg(server_fd, &msg, 0); in udp_recv_send()
395 static int tcp_echo_test(int client_fd, int server_fd) in tcp_echo_test() argument
402 err = tcp_recv_send(server_fd); in tcp_echo_test()
412 static int udp_echo_test(int client_fd, int server_fd) in udp_echo_test() argument
419 err = udp_recv_send(server_fd); in udp_echo_test()
827 int client_fd, server_fd, err; in drop_on_lookup() local
835 server_fd = make_server(t->sotype, t->listen_at.ip, t->listen_at.port, in drop_on_lookup()
[all …]
Dsk_assign.c144 run_test(int server_fd, const struct sockaddr *addr, socklen_t len, int type) in run_test() argument
158 srv_client = accept(server_fd, NULL, NULL); in run_test()
164 srv_client = server_fd; in run_test()
196 if (srv_client != server_fd) in run_test()
Dcg_storage_multi.c60 int server_fd = -1, client_fd = -1; in connect_send() local
65 server_fd = start_server(AF_INET, SOCK_DGRAM, NULL, 0, 0); in connect_send()
66 if (server_fd < 0) in connect_send()
69 client_fd = connect_to_fd(server_fd, 0); in connect_send()
80 close(server_fd); in connect_send()
/Linux-v5.10/tools/testing/selftests/net/
Dtcp_inq.c61 int server_fd = (int)(unsigned long)arg; in start_server() local
71 fd = accept(server_fd, (struct sockaddr *)&addr, &addrlen); in start_server()
92 close(server_fd); in start_server()
105 int server_fd, fd; in main() local
124 server_fd = socket(family, SOCK_STREAM, 0); in main()
125 if (server_fd < 0) in main()
128 if (setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, in main()
131 if (bind(server_fd, (const struct sockaddr *)&listen_addr, in main()
134 if (listen(server_fd, 128) == -1) in main()
137 (void *)(unsigned long)server_fd) != 0) in main()
/Linux-v5.10/tools/testing/selftests/bpf/
Dtest_socket_cookie.c61 static int connect_to_server(int server_fd) in connect_to_server() argument
73 if (getsockname(server_fd, (struct sockaddr *)&addr, &len)) { in connect_to_server()
137 int server_fd = -1; in run_test() local
167 server_fd = start_server(); in run_test()
168 if (server_fd == -1) in run_test()
171 client_fd = connect_to_server(server_fd); in run_test()
183 close(server_fd); in run_test()
Dnetwork_helpers.c107 int fastopen_connect(int server_fd, const char *data, unsigned int data_len, in fastopen_connect() argument
115 if (getsockname(server_fd, (struct sockaddr *)&addr, &addrlen)) { in fastopen_connect()
156 int connect_to_fd(int server_fd, int timeout_ms) in connect_to_fd() argument
164 if (getsockopt(server_fd, SOL_SOCKET, SO_TYPE, &type, &optlen)) { in connect_to_fd()
170 if (getsockname(server_fd, (struct sockaddr *)&addr, &addrlen)) { in connect_to_fd()
195 int connect_fd_to_fd(int client_fd, int server_fd, int timeout_ms) in connect_fd_to_fd() argument
203 if (getsockname(server_fd, (struct sockaddr *)&addr, &len)) { in connect_fd_to_fd()
Dnetwork_helpers.h38 int connect_to_fd(int server_fd, int timeout_ms);
39 int connect_fd_to_fd(int client_fd, int server_fd, int timeout_ms);
40 int fastopen_connect(int server_fd, const char *data, unsigned int data_len,
Dtest_tcp_check_syncookie_user.c50 static int connect_to_server(int server_fd) in connect_to_server() argument
56 if (getsockname(server_fd, (struct sockaddr *)&addr, &len)) { in connect_to_server()
119 static int run_test(int server_fd, int results_fd, bool xdp) in run_test() argument
145 client = connect_to_server(server_fd); in run_test()
149 srv_client = accept(server_fd, NULL, 0); in run_test()