/tools/testing/selftests/bpf/progs/ |
D | bind4_prog.c | 34 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 …]
|
D | bind6_prog.c | 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() 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 …]
|
D | connect4_prog.c | 95 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()
|
D | sockopt_sk.c | 59 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/ |
D | bpf_sockopt_helpers.h | 15 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()
|
D | network_helpers.c | 52 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/ |
D | so_netns_cookie.c | 35 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()
|
D | timestamping.c | 177 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()
|
D | reuseport_bpf.c | 126 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()
|
D | tcp_mmap.c | 269 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()
|
D | rxtimestamp.c | 209 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()
|
D | reuseaddr_ports_exhausted.c | 63 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()
|
D | so_txtime.c | 100 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()
|
D | fin_ack_lat.c | 48 if (setsockopt(sock, SOL_SOCKET, SO_LINGER, &sl, sizeof(sl))) in client() 125 if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR | SO_REUSEPORT, in main()
|
D | reuseport_dualstack.c | 61 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()
|
D | reuseaddr_conflict.c | 62 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, in open_port()
|
D | msg_zerocopy.c | 330 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()
|
D | reuseport_bpf_numa.c | 61 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()
|
D | psock_lib.h | 68 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &bpf_prog, in pair_udp_setfilter()
|
D | udpgso_bench_tx.c | 148 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/ |
D | sockopt_sk.c | 123 err = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buf, 4); in getsetsockopt() 131 err = getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buf, &optlen); in getsetsockopt()
|
D | netns_cookie.c | 58 err = getsockopt(client_fd, SOL_SOCKET, SO_NETNS_COOKIE, in test_netns_cookie()
|
/tools/include/uapi/asm-generic/ |
D | socket.h | 9 #define SOL_SOCKET 1 macro
|
/tools/usb/usbip/src/ |
D | usbip_network.c | 215 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/ |
D | mptcp_connect.c | 159 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()
|