Home
last modified time | relevance | path

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

1234567891011

/linux-6.12.1/tools/testing/selftests/net/tcp_ao/lib/
Drepair.c48 if (setsockopt(sk, SOL_TCP, TCP_REPAIR_QUEUE, &queue, sizeof(queue))) in test_sock_checkpoint_queue()
129 if (setsockopt(sk, SOL_TCP, TCP_REPAIR_QUEUE, &queue, sizeof(queue))) in test_sock_restore_seq()
132 if (setsockopt(sk, SOL_TCP, TCP_QUEUE_SEQ, &seq, sizeof(seq))) in test_sock_restore_seq()
144 if (setsockopt(sk, SOL_TCP, TCP_REPAIR_QUEUE, &queue, sizeof(queue))) in test_sock_restore_queue()
181 if (device != NULL && setsockopt(sk, SOL_SOCKET, SO_BINDTODEVICE, in __test_sock_restore()
208 if (setsockopt(sk, SOL_TCP, TCP_REPAIR_OPTIONS, opts, opt_nr * sizeof(opts[0]))) in __test_sock_restore()
212 if (setsockopt(sk, SOL_TCP, TCP_TIMESTAMP, in __test_sock_restore()
218 if (setsockopt(sk, SOL_TCP, TCP_REPAIR_WINDOW, &state->trw, sizeof(state->trw))) in __test_sock_restore()
224 if (setsockopt(sk, SOL_TCP, TCP_AO_REPAIR, state, sizeof(*state))) in test_ao_restore()
238 if (setsockopt(sk, SOL_TCP, TCP_REPAIR, &val, sizeof(val))) in test_enable_repair()
[all …]
/linux-6.12.1/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()
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()
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()
/linux-6.12.1/tools/testing/selftests/net/
Dip_local_port_range.c195 err = setsockopt(fd, SOL_IP, IP_LOCAL_PORT_RANGE, &val16, sizeof(val16)); in TEST_F()
201 err = setsockopt(fd, SOL_IP, IP_LOCAL_PORT_RANGE, &val32, sizeof(val32)); in TEST_F()
207 err = setsockopt(fd, SOL_IP, IP_LOCAL_PORT_RANGE, &val64, sizeof(val64)); in TEST_F()
244 err = setsockopt(fd, SOL_IP, IP_LOCAL_PORT_RANGE, &range, sizeof(range)); in TEST_F()
290 err = setsockopt(fd, SOL_IP, IP_LOCAL_PORT_RANGE, &range, sizeof(range)); in TEST_F()
317 err = setsockopt(fd, SOL_IP, IP_LOCAL_PORT_RANGE, &range, sizeof(range)); in TEST_F()
339 err = setsockopt(fd, SOL_IP, IP_LOCAL_PORT_RANGE, &range, sizeof(range)); in TEST_F()
372 err = setsockopt(fd, SOL_IP, IP_LOCAL_PORT_RANGE, &range, sizeof(range)); in TEST_F()
375 err = setsockopt(fd, SOL_IP, IP_BIND_ADDRESS_NO_PORT, &one, sizeof(one)); in TEST_F()
435 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()
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 …]
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 …]
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()
Dcmsg_sender.c396 setsockopt(fd, SOL_SOCKET, SO_MARK, in ca_set_sockopts()
400 setsockopt(fd, SOL_IPV6, IPV6_DONTFRAG, in ca_set_sockopts()
404 setsockopt(fd, SOL_IPV6, IPV6_TCLASS, in ca_set_sockopts()
408 setsockopt(fd, SOL_IPV6, IPV6_UNICAST_HOPS, in ca_set_sockopts()
412 setsockopt(fd, SOL_SOCKET, SO_PRIORITY, in ca_set_sockopts()
421 if (setsockopt(fd, SOL_SOCKET, SO_TXTIME, in ca_set_sockopts()
429 if (setsockopt(fd, SOL_SOCKET, SO_TIMESTAMPING, in ca_set_sockopts()
/linux-6.12.1/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.12.1/tools/testing/selftests/net/packetdrill/
Dtcp_zerocopy_batch.pkt9 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
10 +0 setsockopt(3, SOL_SOCKET, SO_ZEROCOPY, [1], 4) = 0
19 +0 setsockopt(4, SOL_SOCKET, SO_MARK, [666], 4) = 0
Dtcp_zerocopy_fastopen-server.pkt12 +.1 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
15 +0 setsockopt(3, SOL_TCP, TCP_FASTOPEN, [2], 4) = 0
16 +0 setsockopt(3, SOL_SOCKET, SO_ZEROCOPY, [1], 4) = 0
Dtcp_zerocopy_maxfrags.pkt13 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
14 +0 setsockopt(3, SOL_SOCKET, SO_ZEROCOPY, [1], 4) = 0
19 +0 setsockopt(3, SOL_SOCKET, SO_SNDBUF, [2000000], 4) = 0
Dtcp_slow_start_slow-start-app-limited.pkt9 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
17 +0 setsockopt(4, SOL_SOCKET, SO_SNDBUF, [200000], 4) = 0
Dtcp_slow_start_slow-start-app-limited-9-packets-out.pkt11 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
19 +0 setsockopt(4, SOL_SOCKET, SO_SNDBUF, [200000], 4) = 0
Dtcp_slow_start_slow-start-ack-per-4pkt.pkt12 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
20 +0 setsockopt(4, SOL_SOCKET, SO_SNDBUF, [200000], 4) = 0
/linux-6.12.1/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()

1234567891011