Home
last modified time | relevance | path

Searched refs:SOL_SOCKET (Results 1 – 25 of 55) sorted by relevance

123

/tools/testing/selftests/bpf/progs/
Dbind4_prog.c34 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_BINDTODEVICE, in bind_to_device()
37 if (bpf_getsockopt(ctx, SOL_SOCKET, SO_BINDTOIFINDEX, in bind_to_device()
40 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_BINDTODEVICE, in bind_to_device()
43 if (bpf_getsockopt(ctx, SOL_SOCKET, SO_BINDTOIFINDEX, in bind_to_device()
47 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_BINDTODEVICE, in bind_to_device()
50 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_BINDTOIFINDEX, in bind_to_device()
53 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_BINDTODEVICE, in bind_to_device()
64 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_REUSEPORT, in bind_reuseport()
67 if (bpf_getsockopt(ctx, SOL_SOCKET, SO_REUSEPORT, in bind_reuseport()
71 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_REUSEPORT, in bind_reuseport()
[all …]
Dbind6_prog.c40 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_BINDTODEVICE, in bind_to_device()
43 if (bpf_getsockopt(ctx, SOL_SOCKET, SO_BINDTOIFINDEX, in bind_to_device()
46 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_BINDTODEVICE, in bind_to_device()
49 if (bpf_getsockopt(ctx, SOL_SOCKET, SO_BINDTOIFINDEX, in bind_to_device()
53 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_BINDTODEVICE, in bind_to_device()
56 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_BINDTOIFINDEX, in bind_to_device()
59 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_BINDTODEVICE, in bind_to_device()
70 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_REUSEPORT, in bind_reuseport()
73 if (bpf_getsockopt(ctx, SOL_SOCKET, SO_REUSEPORT, in bind_reuseport()
77 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_REUSEPORT, in bind_reuseport()
[all …]
Dconnect4_prog.c95 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_BINDTODEVICE, in bind_to_device()
98 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_BINDTODEVICE, in bind_to_device()
101 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_BINDTODEVICE, in bind_to_device()
104 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_BINDTODEVICE, in bind_to_device()
115 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_KEEPALIVE, &one, sizeof(one))) in set_keepalive()
129 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_KEEPALIVE, &zero, sizeof(zero))) in set_keepalive()
Dsockopt_sk.c59 if (ctx->level == SOL_SOCKET && ctx->optname == SO_SNDBUF) { in _getsockopt()
163 if (ctx->level == SOL_SOCKET && ctx->optname == SO_SNDBUF) { in _setsockopt()
/tools/testing/selftests/bpf/
Dbpf_sockopt_helpers.h15 if (bpf_getsockopt(ctx, SOL_SOCKET, SO_PRIORITY, &prio, sizeof(prio))) in get_set_sk_priority()
17 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_PRIORITY, &prio, sizeof(prio))) in get_set_sk_priority()
Dnetwork_helpers.c52 if (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, in settimeo()
58 if (setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &timeout, in settimeo()
85 setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &on, sizeof(on))) { in __start_server()
249 if (getsockopt(server_fd, SOL_SOCKET, SO_TYPE, &type, &optlen)) { in connect_to_fd_opts()
/tools/testing/selftests/net/
Dso_netns_cookie.c35 if (getsockopt(sock1, SOL_SOCKET, SO_NETNS_COOKIE, &cookie1, &vallen) != 0) in main()
49 if (getsockopt(sock2, SOL_SOCKET, SO_NETNS_COOKIE, &cookie2, &vallen) != 0) in main()
Dtimestamping.c177 case SOL_SOCKET: in printpacket()
425 if (setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, interface, if_len)) in main()
450 setsockopt(sock, SOL_SOCKET, SO_TIMESTAMP, in main()
455 setsockopt(sock, SOL_SOCKET, SO_TIMESTAMPNS, in main()
460 setsockopt(sock, SOL_SOCKET, SO_TIMESTAMPING, &so_timestamping, in main()
471 if (getsockopt(sock, SOL_SOCKET, SO_TIMESTAMP, &val, &len) < 0) in main()
476 if (getsockopt(sock, SOL_SOCKET, SO_TIMESTAMPNS, &val, &len) < 0) in main()
483 if (getsockopt(sock, SOL_SOCKET, SO_TIMESTAMPING, &so_timestamping_get, in main()
Dreuseport_bpf.c126 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_REUSEPORT_EBPF, &bpf_fd, in attach_ebpf()
148 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_REUSEPORT_CBPF, &p, sizeof(p))) in attach_cbpf()
165 if (setsockopt(fd[i], SOL_SOCKET, SO_REUSEPORT, &opt, in build_recv_group()
199 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one))) in send_from()
322 if (setsockopt(fd1, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt))) in test_extra_filter()
324 if (setsockopt(fd2, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt))) in test_extra_filter()
378 if (!setsockopt(fd, SOL_SOCKET, SO_ATTACH_REUSEPORT_EBPF, &bpf_fd, in test_filter_no_reuseport()
383 if (!setsockopt(fd, SOL_SOCKET, SO_ATTACH_REUSEPORT_CBPF, &cprog, in test_filter_no_reuseport()
401 if (setsockopt(fd1, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt))) in test_filter_without_bind()
403 if (setsockopt(fd2, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt))) in test_filter_without_bind()
Dtcp_mmap.c269 if (rcvbuf && setsockopt(fd, SOL_SOCKET, in apply_rcvsnd_buf()
274 if (sndbuf && setsockopt(fd, SOL_SOCKET, in apply_rcvsnd_buf()
318 if (setsockopt(fdlisten, SOL_SOCKET, SO_RCVLOWAT, in do_accept()
448 setsockopt(fdlisten, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); in main()
494 setsockopt(fd, SOL_SOCKET, SO_MAX_PACING_RATE, in main()
498 if (zflg && setsockopt(fd, SOL_SOCKET, SO_ZEROCOPY, in main()
Drxtimestamp.c209 if (cmsg->cmsg_level != SOL_SOCKET) in do_recv()
258 if (setsockopt(rcv, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0) in config_so_flags()
262 setsockopt(rcv, SOL_SOCKET, SO_TIMESTAMP, in config_so_flags()
267 setsockopt(rcv, SOL_SOCKET, SO_TIMESTAMPNS, in config_so_flags()
272 setsockopt(rcv, SOL_SOCKET, SO_TIMESTAMPING, in config_so_flags()
Dreuseaddr_ports_exhausted.c63 ret = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(int)); in bind_port()
66 ret = setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &reuseport, sizeof(int)); in bind_port()
Dso_txtime.c100 cm->cmsg_level = SOL_SOCKET; in do_send_one()
271 if (setsockopt(fd, SOL_SOCKET, SO_TXTIME, in setsockopt_txtime()
275 if (getsockopt(fd, SOL_SOCKET, SO_TXTIME, in setsockopt_txtime()
298 setsockopt(fd, SOL_SOCKET, SO_MARK, &cfg_mark, sizeof(cfg_mark))) in setup_tx()
316 if (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv))) in setup_rx()
Dfin_ack_lat.c48 if (setsockopt(sock, SOL_SOCKET, SO_LINGER, &sl, sizeof(sl))) in client()
125 if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR | SO_REUSEPORT, in main()
Dreuseport_dualstack.c61 if (setsockopt(rcv_fds[i], SOL_SOCKET, SO_REUSEPORT, &opt, in build_rcv_fd()
150 if (getsockopt(test_fd, SOL_SOCKET, SO_DOMAIN, &test_family, &len)) in test()
Dreuseaddr_conflict.c62 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, in open_port()
Dmsg_zerocopy.c330 do_setsockopt(fd, SOL_SOCKET, SO_SNDBUF, 1 << 21); in do_setup_tx()
332 do_setsockopt(fd, SOL_SOCKET, SO_ZEROCOPY, 1); in do_setup_tx()
587 do_setsockopt(fd, SOL_SOCKET, SO_RCVBUF, 1 << 21); in do_setup_rx()
588 do_setsockopt(fd, SOL_SOCKET, SO_RCVLOWAT, 1 << 16); in do_setup_rx()
589 do_setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, 1); in do_setup_rx()
Dreuseport_bpf_numa.c61 if (setsockopt(rcv_fd[i], SOL_SOCKET, SO_REUSEPORT, &opt, in build_rcv_group()
100 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_REUSEPORT_EBPF, &bpf_fd, in attach_bpf()
Dpsock_lib.h68 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &bpf_prog, in pair_udp_setfilter()
Dudpgso_bench_tx.c148 case SOL_SOCKET: in flush_cmsg()
318 cm->cmsg_level = SOL_SOCKET; in send_ts_cmsg()
578 if (setsockopt(fd, SOL_SOCKET, SO_TIMESTAMPING, &val, sizeof(val))) in set_tx_timestamping()
662 ret = setsockopt(fd, SOL_SOCKET, SO_ZEROCOPY, in main()
/tools/testing/selftests/bpf/prog_tests/
Dsockopt_sk.c123 err = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buf, 4); in getsetsockopt()
131 err = getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buf, &optlen); in getsetsockopt()
Dnetns_cookie.c58 err = getsockopt(client_fd, SOL_SOCKET, SO_NETNS_COOKIE, in test_netns_cookie()
/tools/include/uapi/asm-generic/
Dsocket.h9 #define SOL_SOCKET 1 macro
/tools/usb/usbip/src/
Dusbip_network.c215 ret = setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); in usbip_net_set_reuseaddr()
239 ret = setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val)); in usbip_net_set_keepalive()
/tools/testing/selftests/net/mptcp/
Dmptcp_connect.c159 err = setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size)); in set_rcvbuf()
170 err = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &size, sizeof(size)); in set_sndbuf()
181 err = setsockopt(fd, SOL_SOCKET, SO_MARK, &mark, sizeof(mark)); in set_mark()
211 if (-1 == setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &one, in sock_listen_mptcp()
371 if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SO_TIMESTAMPNS_NEW) { in process_cmsg()
921 xsetsockopt(fd, SOL_SOCKET, SO_TIMESTAMPNS_NEW, &on, sizeof(on)); in apply_cmsg_types()

123