Home
last modified time | relevance | path

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

12

/tools/testing/selftests/net/
Dtcp_mmap.c231 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()
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()
Dso_txtime.c79 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()
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()
Dpsock_lib.h68 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &bpf_prog, in pair_udp_setfilter()
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()
Dudpgso_bench_tx.c147 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()
Dmsg_zerocopy.c331 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()
Dreuseport_bpf_cpu.c65 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()
Dnettest.c295 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()
Dudpgso_bench_rx.c132 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()
Dpsock_snd.c261 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()
Dtcp_inq.c128 if (setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, in main()
Dreuseport_addr_any.c76 if (setsockopt(rcv_fds[i], SOL_SOCKET, SO_REUSEPORT, &opt, in build_rcv_fd()
/tools/testing/selftests/networking/timestamping/
Dtimestamping.c158 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()
Drxtimestamp.c204 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()
Dtxtimestamp.c223 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/
Dsockopt_sk.c39 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/
Dipcsocket.c31 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/
Dsockopt_sk.c84 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/
Dsocket.h9 #define SOL_SOCKET 1 macro
/tools/usb/usbip/src/
Dusbip_network.c207 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/
Dcontrol.c68 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, in control_init()
/tools/testing/selftests/bpf/
Dtest_select_reuseport.c536 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()

12