/tools/testing/selftests/net/ |
D | tcp_mmap.c | 231 if (rcvbuf && setsockopt(fd, SOL_SOCKET, in apply_rcvsnd_buf() 236 if (sndbuf && setsockopt(fd, SOL_SOCKET, in apply_rcvsnd_buf() 273 if (setsockopt(fdlisten, SOL_SOCKET, SO_RCVLOWAT, in do_accept() 364 setsockopt(fdlisten, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); in main() 410 setsockopt(fd, SOL_SOCKET, SO_MAX_PACING_RATE, in main() 414 if (zflg && setsockopt(fd, SOL_SOCKET, SO_ZEROCOPY, 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 | so_txtime.c | 79 cm->cmsg_level = SOL_SOCKET; in do_send_one() 134 if (setsockopt(fd, SOL_SOCKET, SO_TXTIME, in setsockopt_txtime() 138 if (getsockopt(fd, SOL_SOCKET, SO_TXTIME, in setsockopt_txtime() 175 if (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv))) in setup_rx()
|
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 | psock_lib.h | 68 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &bpf_prog, in pair_udp_setfilter()
|
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 | udpgso_bench_tx.c | 147 case SOL_SOCKET: in flush_cmsg() 302 cm->cmsg_level = SOL_SOCKET; in send_ts_cmsg() 550 if (setsockopt(fd, SOL_SOCKET, SO_TIMESTAMPING, &val, sizeof(val))) in set_tx_timestamping() 634 ret = setsockopt(fd, SOL_SOCKET, SO_ZEROCOPY, in main()
|
D | msg_zerocopy.c | 331 do_setsockopt(fd, SOL_SOCKET, SO_SNDBUF, 1 << 21); in do_setup_tx() 333 do_setsockopt(fd, SOL_SOCKET, SO_ZEROCOPY, 1); in do_setup_tx() 588 do_setsockopt(fd, SOL_SOCKET, SO_RCVBUF, 1 << 21); in do_setup_rx() 589 do_setsockopt(fd, SOL_SOCKET, SO_RCVLOWAT, 1 << 16); in do_setup_rx() 590 do_setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, 1); in do_setup_rx()
|
D | reuseport_bpf_cpu.c | 65 if (setsockopt(rcv_fd[i], SOL_SOCKET, SO_REUSEPORT, &opt, in build_rcv_group() 90 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_REUSEPORT_CBPF, &p, sizeof(p))) in attach_bpf()
|
D | nettest.c | 295 rc = setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, name, strlen(name)+1); in bind_to_device() 308 rc = getsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, name, &optlen); in get_bind_to_device() 451 if (setsockopt(sd, SOL_SOCKET, SO_BROADCAST, &one, sizeof(one)) != 0) { in set_broadcast() 464 if (setsockopt(sd, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)) != 0) { in set_reuseport() 477 if (setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) != 0) { in set_reuseaddr() 1026 if (setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, in msock_init() 1032 if (setsockopt(sd, SOL_SOCKET, SO_BROADCAST, in msock_init() 1271 if (getsockopt(sd, SOL_SOCKET, SO_ERROR, &val, (socklen_t *)&sz) < 0) { in wait_for_connect()
|
D | udpgso_bench_rx.c | 132 if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &val, sizeof(val))) in do_socket() 135 if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &val, sizeof(val))) in do_socket()
|
D | psock_snd.c | 261 if (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv))) in setup_rx() 299 if (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv))) in setup_sniffer()
|
D | tcp_inq.c | 128 if (setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, in main()
|
D | reuseport_addr_any.c | 76 if (setsockopt(rcv_fds[i], SOL_SOCKET, SO_REUSEPORT, &opt, in build_rcv_fd()
|
/tools/testing/selftests/networking/timestamping/ |
D | timestamping.c | 158 case SOL_SOCKET: in printpacket() 411 setsockopt(sock, SOL_SOCKET, SO_TIMESTAMP, in main() 416 setsockopt(sock, SOL_SOCKET, SO_TIMESTAMPNS, in main() 421 setsockopt(sock, SOL_SOCKET, SO_TIMESTAMPING, in main() 433 if (getsockopt(sock, SOL_SOCKET, SO_TIMESTAMP, &val, &len) < 0) in main() 438 if (getsockopt(sock, SOL_SOCKET, SO_TIMESTAMPNS, &val, &len) < 0) in main() 444 if (getsockopt(sock, SOL_SOCKET, SO_TIMESTAMPING, &val, &len) < 0) { in main()
|
D | rxtimestamp.c | 204 if (cmsg->cmsg_level != SOL_SOCKET) in do_recv() 253 if (setsockopt(rcv, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0) in config_so_flags() 257 setsockopt(rcv, SOL_SOCKET, SO_TIMESTAMP, in config_so_flags() 262 setsockopt(rcv, SOL_SOCKET, SO_TIMESTAMPNS, in config_so_flags() 267 setsockopt(rcv, SOL_SOCKET, SO_TIMESTAMPING, in config_so_flags()
|
D | txtimestamp.c | 223 if (cm->cmsg_level == SOL_SOCKET && in __recv_errmsg_cmsg() 460 if (setsockopt(fd, SOL_SOCKET, SO_TIMESTAMPING, in do_test() 516 cmsg->cmsg_level = SOL_SOCKET; in do_test()
|
/tools/testing/selftests/bpf/progs/ |
D | sockopt_sk.c | 39 if (ctx->level == SOL_SOCKET && ctx->optname == SO_SNDBUF) { in _getsockopt() 92 if (ctx->level == SOL_SOCKET && ctx->optname == SO_SNDBUF) { in _setsockopt()
|
/tools/testing/selftests/android/ion/ |
D | ipcsocket.c | 31 if (setsockopt(*sockfd, SOL_SOCKET, SO_REUSEADDR, in opensocket() 145 cmsg->cmsg_level = SOL_SOCKET; in sendtosocket() 198 cmsg->cmsg_level = SOL_SOCKET; in receivefromsocket()
|
/tools/testing/selftests/bpf/prog_tests/ |
D | sockopt_sk.c | 84 err = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buf, 4); in getsetsockopt() 92 err = getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buf, &optlen); in getsetsockopt()
|
/tools/include/uapi/asm-generic/ |
D | socket.h | 9 #define SOL_SOCKET 1 macro
|
/tools/usb/usbip/src/ |
D | usbip_network.c | 207 ret = setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); in usbip_net_set_reuseaddr() 231 ret = setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val)); in usbip_net_set_keepalive()
|
/tools/testing/vsock/ |
D | control.c | 68 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, in control_init()
|
/tools/testing/selftests/bpf/ |
D | test_select_reuseport.c | 536 err = setsockopt(sk_fds[0], SOL_SOCKET, SO_DETACH_REUSEPORT_BPF, in test_detach_bpf() 541 err = setsockopt(sk_fds[1], SOL_SOCKET, SO_DETACH_REUSEPORT_BPF, in test_detach_bpf() 599 err = setsockopt(sk_fds[i], SOL_SOCKET, SO_REUSEPORT, in prepare_sk_fds() 606 err = setsockopt(sk_fds[i], SOL_SOCKET, in prepare_sk_fds()
|