Home
last modified time | relevance | path

Searched refs:cli_fd (Results 1 – 5 of 5) sorted by relevance

/Linux-v6.6/tools/testing/selftests/bpf/prog_tests/
Dtcpbpf_user.c49 int listen_fd = -1, cli_fd = -1, accept_fd = -1; in run_test() local
58 cli_fd = connect_to_fd(listen_fd, 0); in run_test()
59 if (!ASSERT_NEQ(cli_fd, -1, "connect_to_fd(listen_fd)")) in run_test()
70 rv = send(cli_fd, buf, 1000, 0); in run_test()
86 rv = recv(cli_fd, buf, 500, 0); in run_test()
95 err = recv(cli_fd, buf, 1, 0); in run_test()
99 shutdown(cli_fd, SHUT_WR); in run_test()
105 if (cli_fd != -1) in run_test()
106 close(cli_fd); in run_test()
Dbtf_skc_cls_ingress.c76 int listen_fd = -1, cli_fd = -1, srv_fd = -1, err; in test_conn() local
94 cli_fd = connect_to_fd(listen_fd, 0); in test_conn()
95 if (CHECK_FAIL(cli_fd == -1)) in test_conn()
122 if (cli_fd != -1) in test_conn()
123 close(cli_fd); in test_conn()
130 int listen_fd = -1, cli_fd = -1, srv_fd = -1, err; in test_syncookie() local
149 cli_fd = connect_to_fd(listen_fd, 0); in test_syncookie()
150 if (CHECK_FAIL(cli_fd == -1)) in test_syncookie()
182 if (cli_fd != -1) in test_syncookie()
183 close(cli_fd); in test_syncookie()
Dsock_fields.c211 static void check_sk_pkt_out_cnt(int accept_fd, int cli_fd) in check_sk_pkt_out_cnt() argument
236 err = bpf_map_lookup_elem(sk_pkt_out_cnt_fd, &cli_fd, &pkt_out_cnt); in check_sk_pkt_out_cnt()
238 err = bpf_map_lookup_elem(sk_pkt_out_cnt10_fd, &cli_fd, in check_sk_pkt_out_cnt()
276 int listen_fd = -1, cli_fd = -1, accept_fd = -1, err, i; in test() local
292 cli_fd = connect_to_fd(listen_fd, 0); in test()
293 if (CHECK_FAIL(cli_fd == -1)) in test()
296 err = getsockname(cli_fd, (struct sockaddr *)&cli_sa6, &addrlen); in test()
319 err = recv(cli_fd, buf, DATA_LEN, 0); in test()
325 shutdown(cli_fd, SHUT_WR); in test()
331 err = recv(cli_fd, buf, 1, 0); in test()
[all …]
Dselect_reuseport.c238 int cli_fd) in check_data() argument
246 err = getsockname(cli_fd, (struct sockaddr *)&cli_sa, in check_data()
399 int nev, srv_fd, cli_fd; in do_test() local
404 cli_fd = send_data(type, family, cmd, cmd ? sizeof(*cmd) : 0, in do_test()
406 if (cli_fd < 0) in do_test()
417 check_data(type, family, cmd, cli_fd); in do_test()
451 close(cli_fd); in do_test()
546 int cli_fd, err, nev; in test_detach_bpf() local
568 cli_fd = send_data(type, family, &cmd, sizeof(cmd), PASS); in test_detach_bpf()
569 if (cli_fd < 0) in test_detach_bpf()
[all …]
Dbpf_tcp_ca.c262 int err, lfd = -1, cli_fd = -1, srv_fd = -1; in test_dctcp_fallback() local
287 cli_fd = connect_to_fd_opts(lfd, &opts); in test_dctcp_fallback()
288 if (!ASSERT_GE(cli_fd, 0, "cli_fd")) in test_dctcp_fallback()
313 if (cli_fd != -1) in test_dctcp_fallback()
314 close(cli_fd); in test_dctcp_fallback()