Home
last modified time | relevance | path

Searched refs:setsockopt (Results 1 – 25 of 189) sorted by relevance

12345678

/Linux-v5.15/tools/testing/selftests/bpf/prog_tests/
Dsockopt_sk.c42 err = setsockopt(fd, SOL_IP, IP_TOS, big_buf, optlen); in getsetsockopt()
65 err = setsockopt(fd, SOL_IP, IP_TTL, &buf, 1); in getsetsockopt()
74 err = setsockopt(fd, SOL_CUSTOM, 0, &buf, 1); in getsetsockopt()
102 err = setsockopt(fd, SOL_IP, IP_FREEBIND, big_buf, optlen); in getsetsockopt()
122 err = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buf, 4); in getsetsockopt()
145 err = setsockopt(fd, SOL_TCP, TCP_CONGESTION, &buf, strlen("nv")); in getsetsockopt()
Dsockopt_multi.c67 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_getsockopt_test()
141 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_getsockopt_test()
180 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_getsockopt_test()
217 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_setsockopt_test()
244 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_setsockopt_test()
271 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_setsockopt_test()
Dsockopt_qos_to_cc.c15 err = setsockopt(sock_fd, SOL_IPV6, IPV6_TCLASS, &buf, sizeof(buf)); in run_setsockopt_test()
49 err = setsockopt(sock_fd, SOL_TCP, TCP_CONGESTION, &cc_cubic, in test_sockopt_qos_to_cc()
Dmigrate_reuseport.c233 err = setsockopt(test_case->servers[i], SOL_SOCKET, in start_servers()
245 err = setsockopt(test_case->servers[i], SOL_SOCKET, in start_servers()
260 err = setsockopt(test_case->servers[i], in start_servers()
299 err = setsockopt(test_case->clients[i], IPPROTO_TCP, in start_clients()
/Linux-v5.15/arch/um/drivers/
Dumcast_user.c87 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) < 0) { in umcast_open()
96 if (setsockopt(fd, SOL_IP, IP_MULTICAST_TTL, &pri->ttl, in umcast_open()
105 if (setsockopt(fd, SOL_IP, IP_MULTICAST_LOOP, in umcast_open()
126 if (setsockopt(fd, SOL_IP, IP_ADD_MEMBERSHIP, in umcast_open()
158 if (setsockopt(fd, SOL_IP, IP_DROP_MEMBERSHIP, in umcast_close()
/Linux-v5.15/tools/testing/selftests/net/
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()
453 setsockopt(fdlisten, IPPROTO_TCP, TCP_MAXSEG, in main()
485 setsockopt(fd, IPPROTO_TCP, TCP_MAXSEG, &mss, sizeof(mss)) == -1) { in main()
494 setsockopt(fd, SOL_SOCKET, SO_MAX_PACING_RATE, in main()
498 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()
177 if (setsockopt(fd[i], SOL_TCP, TCP_FASTOPEN, &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()
[all …]
Dtimestamping.c425 if (setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, interface, if_len)) in main()
434 if (setsockopt(sock, IPPROTO_IP, IP_MULTICAST_IF, in main()
439 if (setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, in main()
443 if (setsockopt(sock, IPPROTO_IP, IP_MULTICAST_LOOP, 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()
465 if (setsockopt(sock, SOL_IP, IP_PKTINFO, in main()
Dtoeplitz.c268 if (setsockopt(fd, SOL_PACKET, PACKET_RX_RING, &req3, sizeof(req3))) in setup_ring()
299 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &prog, sizeof(prog))) in __set_filter()
328 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &prog, sizeof(prog))) in set_filter_null()
347 if (setsockopt(fd, SOL_PACKET, PACKET_VERSION, &val, sizeof(val))) in create_ring()
364 if (setsockopt(fd, SOL_PACKET, PACKET_FANOUT, &args, sizeof(args))) { in create_ring()
371 setsockopt(fd, SOL_PACKET, PACKET_FANOUT, in create_ring()
389 if (setsockopt(fd, SOL_SOCKET, SO_RCVBUFFORCE, &val, sizeof(val))) in setup_sink()
Dpsock_fanout.c93 err = setsockopt(fd, SOL_PACKET, PACKET_FANOUT, &args, in sock_fanout_open()
97 err = setsockopt(fd, SOL_PACKET, PACKET_FANOUT, &val, in sock_fanout_open()
122 if (setsockopt(fd, SOL_PACKET, PACKET_FANOUT_DATA, &bpf_prog, in sock_fanout_set_cbpf()
178 if (setsockopt(fd, SOL_PACKET, PACKET_FANOUT_DATA, &pfd, sizeof(pfd))) { in sock_fanout_set_ebpf()
200 if (setsockopt(fd, SOL_PACKET, PACKET_VERSION, (void *) &val, in sock_fanout_open_ring()
205 if (setsockopt(fd, SOL_PACKET, PACKET_RX_RING, (void *) &req, in sock_fanout_open_ring()
Dfin_ack_lat.c48 if (setsockopt(sock, SOL_SOCKET, SO_LINGER, &sl, sizeof(sl))) in client()
51 if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, in client()
125 if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR | SO_REUSEPORT, in main()
Dnettest.c287 rc = setsockopt(sd, IPPROTO_TCP, opt, &md5sig, sizeof(md5sig)); in tcp_md5sig()
366 rc = setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, name, strlen(name)+1); in bind_to_device()
419 rc = setsockopt(sd, SOL_IP, IP_PKTINFO, &one, sizeof(one)); in set_pktinfo_v4()
431 rc = setsockopt(sd, SOL_IPV6, IPV6_RECVPKTINFO, &one, sizeof(one)); in set_recvpktinfo_v6()
443 rc = setsockopt(sd, SOL_IP, IP_RECVERR, &one, sizeof(one)); in set_recverr_v4()
455 rc = setsockopt(sd, SOL_IPV6, IPV6_RECVERR, &one, sizeof(one)); in set_recverr_v6()
474 rc = setsockopt(sd, level, opt, &ifindex, sizeof(ifindex)); in set_unicast_if()
486 rc = setsockopt(sd, SOL_IP, IP_MULTICAST_IF, &mreq, sizeof(mreq)); in set_multicast_if()
508 rc = setsockopt(sd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq)); in set_membership()
522 if (setsockopt(sd, SOL_SOCKET, SO_BROADCAST, &one, sizeof(one)) != 0) { in set_broadcast()
[all …]
Dtls.c107 ret = setsockopt(self->fd, IPPROTO_TCP, TCP_ULP, "tls", sizeof("tls")); in FIXTURE_SETUP()
115 ret = setsockopt(self->cfd, IPPROTO_TCP, TCP_ULP, "tls", sizeof("tls")); in FIXTURE_SETUP()
206 ret = setsockopt(self->fd, IPPROTO_TCP, TCP_ULP, "tls", sizeof("tls")); in FIXTURE_SETUP()
213 ret = setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, in FIXTURE_SETUP()
222 ret = setsockopt(self->cfd, IPPROTO_TCP, TCP_ULP, "tls", in FIXTURE_SETUP()
226 ret = setsockopt(self->cfd, SOL_TLS, TLS_RX, &tls12, in FIXTURE_SETUP()
852 EXPECT_EQ(setsockopt(self->cfd, SOL_SOCKET, SO_RCVLOWAT, in TEST_F()
875 ret = setsockopt(self->fd, SOL_TLS, TLS_RX, &tls12, in TEST_F()
879 ret = setsockopt(self->cfd, SOL_TLS, TLS_TX, &tls12, in TEST_F()
1011 EXPECT_EQ(setsockopt(self->fd, SOL_SOCKET, SO_SNDBUF, in TEST_F()
[all …]
Dreuseaddr_conflict.c56 if (ipv6 && setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (void*)&v6only, in open_port()
62 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, in open_port()
Dpsock_snd.c231 setsockopt(fd, SOL_PACKET, PACKET_QDISC_BYPASS, &one, sizeof(one))) in do_tx()
235 setsockopt(fd, SOL_PACKET, PACKET_VNET_HDR, &one, sizeof(one))) in do_tx()
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()
Drxtimestamp.c258 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()
Dreuseport_addr_any.c80 if (setsockopt(rcv_fds[i], SOL_SOCKET, SO_REUSEPORT, &opt, in build_rcv_fd()
90 if (setsockopt(rcv_fds[i], SOL_DCCP, in build_rcv_fd()
152 setsockopt(fd, SOL_DCCP, DCCP_SOCKOPT_SERVICE, in connect_and_send()
Dudpgso_bench_rx.c135 if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &val, sizeof(val))) in do_socket()
138 if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &val, sizeof(val))) in do_socket()
361 if (setsockopt(fd, IPPROTO_UDP, UDP_GRO, &val, sizeof(val))) in do_recv()
Dtcp_inq.c128 if (setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, in main()
146 if (setsockopt(fd, SOL_TCP, TCP_INQ, &one, sizeof(one)) != 0) in main()
Dipv6_flowlabel_mgr.c61 return setsockopt(fd, SOL_IPV6, IPV6_FLOWLABEL_MGR, &req, sizeof(req)); in flowlabel_get()
71 return setsockopt(fd, SOL_IPV6, IPV6_FLOWLABEL_MGR, &req, sizeof(req)); in flowlabel_put()
/Linux-v5.15/tools/usb/usbip/src/
Dusbip_network.c215 ret = setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); in usbip_net_set_reuseaddr()
227 ret = setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val)); in usbip_net_set_nodelay()
239 ret = setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val)); in usbip_net_set_keepalive()
251 ret = setsockopt(sockfd, IPPROTO_IPV6, IPV6_V6ONLY, &val, sizeof(val)); in usbip_net_set_v6only()
/Linux-v5.15/tools/testing/selftests/bpf/
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()
271 setsockopt(fd, SOL_TCP, TCP_CONGESTION, opts->cc, in connect_to_fd_opts()
/Linux-v5.15/Documentation/crypto/
Duserspace-if.rst43 addition, the setsockopt option type is SOL_ALG. In case the user space
117 salg_name. Please see below for the setsockopt interface that explains
134 the setsockopt() option of ALG_SET_KEY. If the key is not set the HMAC
156 the setsockopt invocation below.
210 the setsockopt invocation below.
214 To set the authentication tag size, the caller must use the setsockopt
270 sendmsg and setsockopt calls (see there). As the kernel knows the size
305 using the setsockopt interface to set the key. For example, the
322 ALG_SET_DRBG_ENTROPY setsockopt interface. Setting the entropy requires
366 additional information is set using the setsockopt system call that must
[all …]
/Linux-v5.15/Documentation/networking/
Dpacket_mmap.rst68 setsockopt() ---> allocation of the circular buffer (ring)
108 setsockopt() ---> allocation of the circular buffer (ring)
183 to make this work it must be enabled previously with setsockopt()
193 setsockopt(fd, SOL_PACKET, PACKET_RX_RING, (void *) &req, sizeof(req))
197 setsockopt(fd, SOL_PACKET, PACKET_TX_RING, (void *) &req, sizeof(req))
422 setsockopt(fd, SOL_PACKET, PACKET_RX_RING, &foo, sizeof(foo));
423 setsockopt(fd, SOL_PACKET, PACKET_TX_RING, &bar, sizeof(bar));
453 enabled previously with setsockopt() and
546 setsockopt(fd, SOL_PACKET, PACKET_VERSION, &val, sizeof(val));
552 - Default if not otherwise specified by setsockopt(2)
[all …]

12345678