Home
last modified time | relevance | path

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

123456789

/linux-6.6.21/tools/testing/selftests/bpf/prog_tests/
Dsockopt_sk.c43 err = setsockopt(fd, SOL_IP, IP_TOS, big_buf, optlen); in getsetsockopt()
66 err = setsockopt(fd, SOL_IP, IP_TTL, &buf, 1); in getsetsockopt()
75 err = setsockopt(fd, SOL_CUSTOM, 0, &buf, 1); in getsetsockopt()
103 err = setsockopt(fd, SOL_IP, IP_FREEBIND, big_buf, optlen); in getsetsockopt()
123 err = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buf, 4); in getsetsockopt()
146 err = setsockopt(fd, SOL_TCP, TCP_CONGESTION, &buf, strlen("nv")); in getsetsockopt()
198 err = setsockopt(fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, &buf, optlen); in getsetsockopt()
Dsockopt_multi.c19 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_getsockopt_test()
95 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_getsockopt_test()
131 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_getsockopt_test()
170 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_setsockopt_test()
198 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_setsockopt_test()
226 err = setsockopt(sock_fd, SOL_IP, IP_TOS, &buf, 1); in run_setsockopt_test()
Dsetget_sockopt.c112 ret = setsockopt(fd, IPPROTO_TCP, TCP_ULP, "tls", sizeof("tls")); in test_ktls()
115 ret = setsockopt(cfd, IPPROTO_TCP, TCP_ULP, "tls", sizeof("tls")); in test_ktls()
123 ret = setsockopt(fd, SOL_TLS, TLS_TX, &aes128, sizeof(aes128)); in test_ktls()
127 ret = setsockopt(cfd, SOL_TLS, TLS_RX, &aes128, sizeof(aes128)); in test_ktls()
Dcgroup_getset_retval.c38 if (!ASSERT_ERR(setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, in test_setsockopt_set()
78 if (!ASSERT_ERR(setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, in test_setsockopt_set_and_get()
117 if (!ASSERT_OK(setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, in test_setsockopt_default_zero()
158 if (!ASSERT_ERR(setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, in test_setsockopt_default_zero_and_set()
207 if (!ASSERT_ERR(setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, in test_setsockopt_override()
253 if (!ASSERT_ERR(setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, in test_setsockopt_legacy_eperm()
304 if (!ASSERT_ERR(setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, in test_setsockopt_legacy_no_override()
Dsockopt_qos_to_cc.c15 err = setsockopt(sock_fd, SOL_IPV6, IPV6_TCLASS, &buf, sizeof(buf)); in run_setsockopt_test()
51 err = setsockopt(sock_fd, SOL_TCP, TCP_CONGESTION, &cc_cubic, in test_sockopt_qos_to_cc()
Dsockmap_ktls.c62 err = setsockopt(cli, IPPROTO_TCP, TCP_ULP, "tls", strlen("tls")); in test_sockmap_ktls_disconnect_after_delete()
118 err = setsockopt(s, IPPROTO_TCP, TCP_ULP, "tls", strlen("tls")); in test_sockmap_ktls_update_fails_when_sock_has_ulp()
128 err = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, &zero, sizeof(zero)); in test_sockmap_ktls_update_fails_when_sock_has_ulp()
/linux-6.6.21/tools/testing/selftests/net/
Dip_local_port_range.c179 err = setsockopt(fd, SOL_IP, IP_LOCAL_PORT_RANGE, &val16, sizeof(val16)); in TEST_F()
185 err = setsockopt(fd, SOL_IP, IP_LOCAL_PORT_RANGE, &val32, sizeof(val32)); in TEST_F()
191 err = setsockopt(fd, SOL_IP, IP_LOCAL_PORT_RANGE, &val64, sizeof(val64)); in TEST_F()
228 err = setsockopt(fd, SOL_IP, IP_LOCAL_PORT_RANGE, &range, sizeof(range)); in TEST_F()
274 err = setsockopt(fd, SOL_IP, IP_LOCAL_PORT_RANGE, &range, sizeof(range)); in TEST_F()
301 err = setsockopt(fd, SOL_IP, IP_LOCAL_PORT_RANGE, &range, sizeof(range)); in TEST_F()
323 err = setsockopt(fd, SOL_IP, IP_LOCAL_PORT_RANGE, &range, sizeof(range)); in TEST_F()
359 err = setsockopt(fd, SOL_IP, IP_LOCAL_PORT_RANGE, &range, sizeof(range)); in TEST_F()
362 err = setsockopt(fd, SOL_IP, IP_BIND_ADDRESS_NO_PORT, &one, sizeof(one)); in TEST_F()
419 err = setsockopt(fd, SOL_IP, IP_LOCAL_PORT_RANGE, &range, sizeof(range)); in TEST_F()
[all …]
Dreuseport_bpf.c124 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_REUSEPORT_EBPF, &bpf_fd, in attach_ebpf()
146 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_REUSEPORT_CBPF, &p, sizeof(p))) in attach_cbpf()
163 if (setsockopt(fd[i], SOL_SOCKET, SO_REUSEPORT, &opt, in build_recv_group()
175 if (setsockopt(fd[i], SOL_TCP, TCP_FASTOPEN, &opt, in build_recv_group()
197 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one))) in send_from()
320 if (setsockopt(fd1, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt))) in test_extra_filter()
322 if (setsockopt(fd2, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt))) in test_extra_filter()
376 if (!setsockopt(fd, SOL_SOCKET, SO_ATTACH_REUSEPORT_EBPF, &bpf_fd, in test_filter_no_reuseport()
381 if (!setsockopt(fd, SOL_SOCKET, SO_ATTACH_REUSEPORT_CBPF, &cprog, in test_filter_no_reuseport()
399 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()
Dtcp_mmap.c325 if (rcvbuf && setsockopt(fd, SOL_SOCKET, in apply_rcvsnd_buf()
330 if (sndbuf && setsockopt(fd, SOL_SOCKET, in apply_rcvsnd_buf()
374 if (setsockopt(fdlisten, SOL_SOCKET, SO_RCVLOWAT, in do_accept()
526 setsockopt(fdlisten, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); in main()
531 setsockopt(fdlisten, IPPROTO_TCP, TCP_MAXSEG, in main()
563 setsockopt(fd, IPPROTO_TCP, TCP_MAXSEG, &mss, sizeof(mss)) == -1) { in main()
572 setsockopt(fd, SOL_SOCKET, SO_MAX_PACING_RATE, in main()
576 if (zflg && setsockopt(fd, SOL_SOCKET, SO_ZEROCOPY, in main()
Dtls.c142 ret = setsockopt(*fd, IPPROTO_TCP, TCP_ULP, "tls", sizeof("tls")); in ulp_sock_pair()
150 ret = setsockopt(*cfd, IPPROTO_TCP, TCP_ULP, "tls", sizeof("tls")); in ulp_sock_pair()
250 …EXPECT_EQ(setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, sizeof(struct tls12_crypto_info_aes_gcm_12… in TEST_F()
254 …EXPECT_EQ(setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, sizeof(struct tls12_crypto_info_aes_gcm_12… in TEST_F()
258 …EXPECT_EQ(setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, sizeof(struct tls12_crypto_info_aes_gcm_12… in TEST_F()
262 …EXPECT_EQ(setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, sizeof(struct tls12_crypto_info_aes_gcm_12… in TEST_F()
266 …EXPECT_EQ(setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, sizeof(struct tls12_crypto_info_aes_gcm_12… in TEST_F()
382 ret = setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, tls12.len); in FIXTURE_SETUP()
385 ret = setsockopt(self->cfd, SOL_TLS, TLS_RX, &tls12, tls12.len); in FIXTURE_SETUP()
389 ret = setsockopt(self->cfd, SOL_TLS, TLS_RX_EXPECT_NO_PAD, in FIXTURE_SETUP()
[all …]
Dnettest.c294 rc = setsockopt(sd, IPPROTO_TCP, opt, &md5sig, sizeof(md5sig)); in tcp_md5sig()
373 rc = setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, name, strlen(name)+1); in bind_to_device()
426 rc = setsockopt(sd, SOL_IP, IP_PKTINFO, &one, sizeof(one)); in set_pktinfo_v4()
438 rc = setsockopt(sd, SOL_IPV6, IPV6_RECVPKTINFO, &one, sizeof(one)); in set_recvpktinfo_v6()
450 rc = setsockopt(sd, SOL_IP, IP_RECVERR, &one, sizeof(one)); in set_recverr_v4()
462 rc = setsockopt(sd, SOL_IPV6, IPV6_RECVERR, &one, sizeof(one)); in set_recverr_v6()
481 rc = setsockopt(sd, level, opt, &ifindex, sizeof(ifindex)); in set_unicast_if()
493 rc = setsockopt(sd, SOL_IP, IP_MULTICAST_IF, &mreq, sizeof(mreq)); in set_multicast_if()
515 rc = setsockopt(sd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq)); in set_membership()
531 if (setsockopt(sd, SOL_IP, IP_FREEBIND, &one, sizeof(one))) { in set_freebind()
[all …]
Dtoeplitz.c272 if (setsockopt(fd, SOL_PACKET, PACKET_RX_RING, &req3, sizeof(req3))) in setup_ring()
303 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &prog, sizeof(prog))) in __set_filter()
332 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &prog, sizeof(prog))) in set_filter_null()
351 if (setsockopt(fd, SOL_PACKET, PACKET_VERSION, &val, sizeof(val))) in create_ring()
368 if (setsockopt(fd, SOL_PACKET, PACKET_FANOUT, &args, sizeof(args))) { in create_ring()
375 setsockopt(fd, SOL_PACKET, PACKET_FANOUT, in create_ring()
393 if (setsockopt(fd, SOL_SOCKET, SO_RCVBUFFORCE, &val, sizeof(val))) in setup_sink()
Dpsock_fanout.c94 err = setsockopt(fd, SOL_PACKET, PACKET_FANOUT, &args, in sock_fanout_open()
98 err = setsockopt(fd, SOL_PACKET, PACKET_FANOUT, &val, in sock_fanout_open()
123 if (setsockopt(fd, SOL_PACKET, PACKET_FANOUT_DATA, &bpf_prog, in sock_fanout_set_cbpf()
179 if (setsockopt(fd, SOL_PACKET, PACKET_FANOUT_DATA, &pfd, sizeof(pfd))) { in sock_fanout_set_ebpf()
201 if (setsockopt(fd, SOL_PACKET, PACKET_VERSION, (void *) &val, in sock_fanout_open_ring()
206 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()
Dsk_bind_sendto_listen.c27 if (setsockopt(fd1, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one))) { in main()
49 if (setsockopt(fd2, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one))) { in main()
Dcmsg_sender.c260 if (setsockopt(fd, SOL_SOCKET, SO_TXTIME, in cs_write_cmsg()
282 if (setsockopt(fd, SOL_SOCKET, SO_TIMESTAMPING, in cs_write_cmsg()
398 setsockopt(fd, SOL_SOCKET, SO_MARK, in ca_set_sockopts()
402 setsockopt(fd, SOL_IPV6, IPV6_DONTFRAG, in ca_set_sockopts()
406 setsockopt(fd, SOL_IPV6, IPV6_TCLASS, in ca_set_sockopts()
410 setsockopt(fd, SOL_IPV6, IPV6_UNICAST_HOPS, in ca_set_sockopts()
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()
Dipv6_flowlabel.c188 if (setsockopt(fd, SOL_IPV6, IPV6_FLOWLABEL_MGR, &req, sizeof(req))) in flowlabel_get()
243 if (setsockopt(fdr, SOL_IPV6, IPV6_FLOWINFO, &one, sizeof(one))) in main()
259 if (setsockopt(fdt, SOL_IPV6, IPV6_FLOWINFO_SEND, &one, in main()
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()
/linux-6.6.21/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-6.6.21/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-6.6.21/Documentation/bpf/
Dprog_cgroup_sockopt.rst12 * ``BPF_CGROUP_SETSOCKOPT`` - called every time process executes ``setsockopt``
28 chain finish (i.e. kernel ``setsockopt`` handling will *not* be executed).
86 *not* the original input ``setsockopt`` arguments. The potentially
138 SEC("cgroup/setsockopt")
139 int setsockopt(struct bpf_sockopt *ctx)
/linux-6.6.21/tools/testing/selftests/netfilter/
Dconnect_close.c58 setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)); in do_accept()
59 setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)); in do_accept()

123456789