Home
last modified time | relevance | path

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

12345678

/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/
Dsockopt_sk.c34 err = setsockopt(fd, SOL_IP, IP_TOS, big_buf, optlen); in getsetsockopt()
57 err = setsockopt(fd, SOL_IP, IP_TTL, &buf, 1); in getsetsockopt()
66 err = setsockopt(fd, SOL_CUSTOM, 0, &buf, 1); in getsetsockopt()
94 err = setsockopt(fd, SOL_IP, IP_FREEBIND, big_buf, optlen); in getsetsockopt()
114 err = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buf, 4); in getsetsockopt()
137 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()
Dbpf_tcp_ca.c21 err = setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeo_sec, in settimeo()
27 err = setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &timeo_sec, in settimeo()
40 err = setsockopt(fd, IPPROTO_TCP, TCP_CONGESTION, tcp_ca, strlen(tcp_ca)); in settcpca()
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/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.c401 if (setsockopt(sock, IPPROTO_IP, IP_MULTICAST_IF, in main()
406 if (setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, in main()
410 if (setsockopt(sock, IPPROTO_IP, IP_MULTICAST_LOOP, in main()
417 setsockopt(sock, SOL_SOCKET, SO_TIMESTAMP, in main()
422 setsockopt(sock, SOL_SOCKET, SO_TIMESTAMPNS, in main()
427 setsockopt(sock, SOL_SOCKET, SO_TIMESTAMPING, in main()
433 if (setsockopt(sock, SOL_IP, IP_PKTINFO, in main()
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()
Dtls.c66 ret = setsockopt(self->fd, IPPROTO_TCP, TCP_ULP, "tls", sizeof("tls")); in FIXTURE_SETUP()
74 ret = setsockopt(self->cfd, IPPROTO_TCP, TCP_ULP, "tls", sizeof("tls")); in FIXTURE_SETUP()
151 ret = setsockopt(self->fd, IPPROTO_TCP, TCP_ULP, "tls", sizeof("tls")); in FIXTURE_SETUP()
158 ret = setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, in FIXTURE_SETUP()
167 ret = setsockopt(self->cfd, IPPROTO_TCP, TCP_ULP, "tls", in FIXTURE_SETUP()
171 ret = setsockopt(self->cfd, SOL_TLS, TLS_RX, &tls12, in FIXTURE_SETUP()
788 EXPECT_EQ(setsockopt(self->cfd, SOL_SOCKET, SO_RCVLOWAT, in TEST_F()
812 ret = setsockopt(self->fd, SOL_TLS, TLS_RX, &tls12, in TEST_F()
816 ret = setsockopt(self->cfd, SOL_TLS, TLS_TX, &tls12, in TEST_F()
948 EXPECT_EQ(setsockopt(self->fd, SOL_SOCKET, SO_SNDBUF, in TEST_F()
[all …]
Dpsock_fanout.c87 if (setsockopt(fd, SOL_PACKET, PACKET_FANOUT, &val, sizeof(val))) { in sock_fanout_open()
109 if (setsockopt(fd, SOL_PACKET, PACKET_FANOUT_DATA, &bpf_prog, in sock_fanout_set_cbpf()
165 if (setsockopt(fd, SOL_PACKET, PACKET_FANOUT_DATA, &pfd, sizeof(pfd))) { in sock_fanout_set_ebpf()
187 if (setsockopt(fd, SOL_PACKET, PACKET_VERSION, (void *) &val, in sock_fanout_open_ring()
192 if (setsockopt(fd, SOL_PACKET, PACKET_RX_RING, (void *) &req, in sock_fanout_open_ring()
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()
Dnettest.c236 rc = setsockopt(sd, IPPROTO_TCP, opt, &md5sig, sizeof(md5sig)); in tcp_md5sig()
315 rc = setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, name, strlen(name)+1); in bind_to_device()
368 rc = setsockopt(sd, SOL_IP, IP_PKTINFO, &one, sizeof(one)); in set_pktinfo_v4()
380 rc = setsockopt(sd, SOL_IPV6, IPV6_RECVPKTINFO, &one, sizeof(one)); in set_recvpktinfo_v6()
392 rc = setsockopt(sd, SOL_IP, IP_RECVERR, &one, sizeof(one)); in set_recverr_v4()
404 rc = setsockopt(sd, SOL_IPV6, IPV6_RECVERR, &one, sizeof(one)); in set_recverr_v6()
423 rc = setsockopt(sd, level, opt, &ifindex, sizeof(ifindex)); in set_unicast_if()
435 rc = setsockopt(sd, SOL_IP, IP_MULTICAST_IF, &mreq, sizeof(mreq)); in set_multicast_if()
457 rc = setsockopt(sd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq)); in set_membership()
471 if (setsockopt(sd, SOL_SOCKET, SO_BROADCAST, &one, sizeof(one)) != 0) { in set_broadcast()
[all …]
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()
364 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()
/kernel/linux/linux-5.10/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()
/kernel/liteos_m/components/net/test/
Dnet_socket_test_004.c62 ret = setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, len); in SockOptTest()
79 ret = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(flag)); in SockOptTest()
/kernel/liteos_a/net/telnet/src/
Dtelnet_loop.c265 if (setsockopt(listenFd, SOL_SOCKET, SO_REUSEADDR, &reuseAddr, sizeof(reuseAddr)) != 0) { in TelnetdInit()
321 if (setsockopt(clientFd, SOL_SOCKET, SO_KEEPALIVE, (VOID *)&keepAlive, sizeof(keepAlive)) < 0) { in TelnetClientPrepare()
324 if (setsockopt(clientFd, IPPROTO_TCP, TCP_KEEPIDLE, (VOID *)&keepIdle, sizeof(keepIdle)) < 0) { in TelnetClientPrepare()
327 …if (setsockopt(clientFd, IPPROTO_TCP, TCP_KEEPINTVL, (VOID *)&keepInterval, sizeof(keepInterval)) … in TelnetClientPrepare()
330 if (setsockopt(clientFd, IPPROTO_TCP, TCP_KEEPCNT, (VOID *)&keepCnt, sizeof(keepCnt)) < 0) { in TelnetClientPrepare()
/kernel/liteos_a/testsuites/unittest/net/socket/smoke/
Dnet_socket_test_004.cpp59 ret = setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, len); in SockOptTest()
76 ret = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(flag)); in SockOptTest()
Dnet_socket_test_013.cpp186 ret = setsockopt(fd, SOL_SOCKET, SO_BROADCAST, &broadcast, sizeof(broadcast)); in ClientsThread()
270 ret = setsockopt(lsfd, SOL_SOCKET, SO_BROADCAST, &broadcast, sizeof(broadcast)); in UdpBrdcastSelectTest()
280 ret = setsockopt(lsfd, IPPROTO_IP, IP_MULTICAST_LOOP, &loop, sizeof(loop)); in UdpBrdcastSelectTest()
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-5.10/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))
423 setsockopt(fd, SOL_PACKET, PACKET_RX_RING, &foo, sizeof(foo));
424 setsockopt(fd, SOL_PACKET, PACKET_TX_RING, &bar, sizeof(bar));
454 enabled previously with setsockopt() and
547 setsockopt(fd, SOL_PACKET, PACKET_VERSION, &val, sizeof(val));
553 - Default if not otherwise specified by setsockopt(2)
[all …]

12345678