Home
last modified time | relevance | path

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

/Linux-v5.10/tools/testing/selftests/bpf/prog_tests/
Dsockopt_inherit.c70 int client_fd; in server_thread() local
88 client_fd = accept(fd, (struct sockaddr *)&addr, &len); in server_thread()
89 if (CHECK_FAIL(client_fd < 0)) { in server_thread()
94 err += verify_sockopt(client_fd, CUSTOM_INHERIT1, "accept", 1); in server_thread()
95 err += verify_sockopt(client_fd, CUSTOM_INHERIT2, "accept", 1); in server_thread()
96 err += verify_sockopt(client_fd, CUSTOM_LISTENER, "accept", 0); in server_thread()
98 close(client_fd); in server_thread()
173 int server_fd = -1, client_fd; in run_test() local
203 client_fd = connect_to_server(server_fd); in run_test()
204 if (CHECK_FAIL(client_fd < 0)) in run_test()
[all …]
Dtcp_rtt.c46 static int verify_sk(int map_fd, int client_fd, const char *msg, __u32 invoked, in verify_sk() argument
53 if (CHECK_FAIL(bpf_map_lookup_elem(map_fd, &client_fd, &val) < 0)) { in verify_sk()
101 int client_fd; in run_test() local
121 client_fd = connect_to_fd(server_fd, 0); in run_test()
122 if (client_fd < 0) { in run_test()
127 err += verify_sk(map_fd, client_fd, "syn-ack", in run_test()
134 send_byte(client_fd); in run_test()
135 if (wait_for_ack(client_fd, 100) < 0) { in run_test()
141 err += verify_sk(map_fd, client_fd, "first payload byte", in run_test()
149 close(client_fd); in run_test()
Dsk_lookup.c395 static int tcp_echo_test(int client_fd, int server_fd) in tcp_echo_test() argument
399 err = send_byte(client_fd); in tcp_echo_test()
405 err = recv_byte(client_fd); in tcp_echo_test()
412 static int udp_echo_test(int client_fd, int server_fd) in udp_echo_test() argument
416 err = send_byte(client_fd); in udp_echo_test()
422 err = recv_byte(client_fd); in udp_echo_test()
560 int client_fd, reuse_conn_fd = -1; in run_lookup_prog() local
610 client_fd = make_client(t->sotype, t->connect_to.ip, t->connect_to.port); in run_lookup_prog()
611 if (client_fd < 0) in run_lookup_prog()
615 tcp_echo_test(client_fd, server_fds[t->accept_on]); in run_lookup_prog()
[all …]
Dload_bytes_relative.c12 int server_fd, cgroup_fd, prog_fd, map_fd, client_fd; in test_load_bytes_relative() local
52 client_fd = connect_to_fd(server_fd, 0); in test_load_bytes_relative()
53 if (CHECK_FAIL(client_fd < 0)) in test_load_bytes_relative()
55 close(client_fd); in test_load_bytes_relative()
Dcg_storage_multi.c60 int server_fd = -1, client_fd = -1; in connect_send() local
69 client_fd = connect_to_fd(server_fd, 0); in connect_send()
70 if (client_fd < 0) in connect_send()
73 if (send(client_fd, "message", strlen("message"), 0) < 0) in connect_send()
79 close(client_fd); in connect_send()
/Linux-v5.10/tools/testing/selftests/bpf/
Dtest_socket_cookie.c92 static int validate_map(struct bpf_map *map, int client_fd) in validate_map() argument
108 err = bpf_map_lookup_elem(map_fd, &client_fd, &val); in validate_map()
110 err = getsockname(client_fd, (struct sockaddr *)&addr, &len); in validate_map()
138 int client_fd = -1; in run_test() local
171 client_fd = connect_to_server(server_fd); in run_test()
172 if (client_fd == -1) in run_test()
175 if (validate_map(bpf_map__next(NULL, pobj), client_fd)) in run_test()
182 close(client_fd); in run_test()
Dnetwork_helpers.c195 int connect_fd_to_fd(int client_fd, int server_fd, int timeout_ms) in connect_fd_to_fd() argument
200 if (settimeo(client_fd, timeout_ms)) in connect_fd_to_fd()
208 if (connect_fd_to_addr(client_fd, &addr, len)) in connect_fd_to_fd()
Dnetwork_helpers.h39 int connect_fd_to_fd(int client_fd, int server_fd, int timeout_ms);
/Linux-v5.10/tools/testing/vsock/
Dutil.c145 int client_fd; in vsock_stream_accept() local
164 client_fd = accept(fd, &clientaddr.sa, &clientaddr_len); in vsock_stream_accept()
166 } while (client_fd < 0 && errno == EINTR); in vsock_stream_accept()
173 if (client_fd < 0) in vsock_stream_accept()
174 return client_fd; in vsock_stream_accept()
189 return client_fd; in vsock_stream_accept()
Dvsock_diag_test.c406 int client_fd; in test_connect_server() local
408 client_fd = vsock_stream_accept(VMADDR_CID_ANY, 1234, NULL); in test_connect_server()
409 if (client_fd < 0) { in test_connect_server()
417 st = find_vsock_stat(&sockets, client_fd); in test_connect_server()
423 close(client_fd); in test_connect_server()
/Linux-v5.10/tools/testing/selftests/android/ion/
Dionapp_export.c32 int sockfd, client_fd, shared_fd; in main() local
102 client_fd = info.ionfd; in main()
109 printf("Sharing fd: %d, Client fd: %d\n", shared_fd, client_fd); in main()
/Linux-v5.10/fs/notify/fanotify/
Dfanotify_user.c131 int client_fd; in create_fd() local
134 client_fd = get_unused_fd_flags(group->fanotify_data.f_flags); in create_fd()
135 if (client_fd < 0) in create_fd()
136 return client_fd; in create_fd()
153 put_unused_fd(client_fd); in create_fd()
154 client_fd = PTR_ERR(new_file); in create_fd()
159 return client_fd; in create_fd()