Home
last modified time | relevance | path

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

1234

/kernel/liteos_m/components/net/test/
Dnet_socket_test_004.c50 ret = getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &len); in SockOptTest()
57 ret = getsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, &len); in SockOptTest()
62 ret = setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, len); in SockOptTest()
66 ret = getsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, &len); in SockOptTest()
72 ret = getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &len); in SockOptTest()
/kernel/liteos_a/testsuites/unittest/net/socket/smoke/
Dnet_socket_test_004.cpp48 ret = getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &len); in SockOptTest()
54 ret = getsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, &len); in SockOptTest()
59 ret = setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, len); in SockOptTest()
64 ret = getsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, &len); in SockOptTest()
70 ret = getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &len); in SockOptTest()
Dnet_socket_test_007.cpp112 …ret = setsockopt(lsfd, SOL_SOCKET, SO_RCVTIMEO, reinterpret_cast<struct timeval *>(INVALID_USER_AD… in TcpTest()
116 …ret = setsockopt(lsfd, SOL_SOCKET, SO_RCVTIMEO, reinterpret_cast<struct timeval *>(INVALID_KERNEL_… in TcpTest()
120 …ret = getsockopt(lsfd, SOL_SOCKET, SO_RCVTIMEO, reinterpret_cast<struct timeval *>(INVALID_USER_AD… in TcpTest()
124 …ret = getsockopt(lsfd, SOL_SOCKET, SO_RCVTIMEO, reinterpret_cast<struct timeval *>(INVALID_KERNEL_… in TcpTest()
Dnet_socket_test_012.cpp126 ret = getsockopt(sfd, SOL_SOCKET, SO_RCVTIMEO, NULL, NULL); in SocketNullTestInternal()
130 ret = getsockopt(sfd, SOL_SOCKET, SO_RCVTIMEO, NULL, &addrlen); in SocketNullTestInternal()
134 ret = getsockopt(sfd, SOL_SOCKET, SO_RCVTIMEO, &addr, NULL); in SocketNullTestInternal()
139 ret = getsockopt(sfd, SOL_SOCKET, SO_RCVTIMEO, bad, &zero); in SocketNullTestInternal()
146 ret = setsockopt(sfd, SOL_SOCKET, SO_RCVTIMEO, NULL, addrlen); in SocketNullTestInternal()
150 ret = setsockopt(sfd, SOL_SOCKET, SO_RCVTIMEO, bad, 0); in SocketNullTestInternal()
154 ret = setsockopt(sfd, SOL_SOCKET, SO_RCVTIMEO, bad, addrlen); in SocketNullTestInternal()
/kernel/linux/linux-5.10/samples/bpf/
Dtcp_bufs_kern.c57 rv = bpf_setsockopt(skops, SOL_SOCKET, SO_SNDBUF, &bufsize, in bpf_bufs()
59 rv += bpf_setsockopt(skops, SOL_SOCKET, SO_RCVBUF, in bpf_bufs()
67 rv = bpf_setsockopt(skops, SOL_SOCKET, SO_SNDBUF, &bufsize, in bpf_bufs()
69 rv += bpf_setsockopt(skops, SOL_SOCKET, SO_RCVBUF, in bpf_bufs()
Dtcp_iw_kern.c58 rv = bpf_setsockopt(skops, SOL_SOCKET, SO_SNDBUF, &bufsize, in bpf_iw()
60 rv += bpf_setsockopt(skops, SOL_SOCKET, SO_RCVBUF, in bpf_iw()
69 rv = bpf_setsockopt(skops, SOL_SOCKET, SO_SNDBUF, &bufsize, in bpf_iw()
71 rv += bpf_setsockopt(skops, SOL_SOCKET, SO_RCVBUF, in bpf_iw()
Dtcp_clamp_kern.c62 rv = bpf_setsockopt(skops, SOL_SOCKET, SO_SNDBUF, in bpf_clamp()
64 rv += bpf_setsockopt(skops, SOL_SOCKET, in bpf_clamp()
78 rv += bpf_setsockopt(skops, SOL_SOCKET, in bpf_clamp()
81 rv += bpf_setsockopt(skops, SOL_SOCKET, in bpf_clamp()
Dtest_cgrp2_sock.c132 rc = getsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, name, &optlen); in get_bind_to_device()
145 rc = getsockopt(sd, SOL_SOCKET, SO_MARK, &mark, &optlen); in get_somark()
158 rc = getsockopt(sd, SOL_SOCKET, SO_PRIORITY, &prio, &optlen); in get_priority()
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/
Dconnect4_prog.c95 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_BINDTODEVICE, in bind_to_device()
98 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_BINDTODEVICE, in bind_to_device()
101 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_BINDTODEVICE, in bind_to_device()
104 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_BINDTODEVICE, in bind_to_device()
115 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_KEEPALIVE, &one, sizeof(one))) in set_keepalive()
129 if (bpf_setsockopt(ctx, SOL_SOCKET, SO_KEEPALIVE, &zero, sizeof(zero))) in set_keepalive()
Dsockopt_sk.c44 if (ctx->level == SOL_SOCKET && ctx->optname == SO_SNDBUF) { in _getsockopt()
119 if (ctx->level == SOL_SOCKET && ctx->optname == SO_SNDBUF) { in _setsockopt()
/kernel/linux/linux-5.10/tools/testing/selftests/net/
Dtimestamping.c158 case SOL_SOCKET: in printpacket()
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()
439 if (getsockopt(sock, SOL_SOCKET, SO_TIMESTAMP, &val, &len) < 0) in main()
444 if (getsockopt(sock, SOL_SOCKET, SO_TIMESTAMPNS, &val, &len) < 0) in main()
450 if (getsockopt(sock, SOL_SOCKET, SO_TIMESTAMPING, &val, &len) < 0) { 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()
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()
494 setsockopt(fd, SOL_SOCKET, SO_MAX_PACING_RATE, in main()
498 if (zflg && setsockopt(fd, SOL_SOCKET, SO_ZEROCOPY, in main()
Drxtimestamp.c209 if (cmsg->cmsg_level != SOL_SOCKET) in do_recv()
258 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()
Dso_txtime.c87 cm->cmsg_level = SOL_SOCKET; in do_send_one()
222 if (setsockopt(fd, SOL_SOCKET, SO_TXTIME, in setsockopt_txtime()
226 if (getsockopt(fd, SOL_SOCKET, SO_TXTIME, in setsockopt_txtime()
263 if (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv))) in setup_rx()
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()
Dfin_ack_lat.c48 if (setsockopt(sock, SOL_SOCKET, SO_LINGER, &sl, sizeof(sl))) in client()
125 if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR | SO_REUSEPORT, in main()
Dmsg_zerocopy.c330 do_setsockopt(fd, SOL_SOCKET, SO_SNDBUF, 1 << 21); in do_setup_tx()
332 do_setsockopt(fd, SOL_SOCKET, SO_ZEROCOPY, 1); in do_setup_tx()
587 do_setsockopt(fd, SOL_SOCKET, SO_RCVBUF, 1 << 21); in do_setup_rx()
588 do_setsockopt(fd, SOL_SOCKET, SO_RCVLOWAT, 1 << 16); in do_setup_rx()
589 do_setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, 1); in do_setup_rx()
/kernel/linux/linux-5.10/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()
164 if (getsockopt(server_fd, SOL_SOCKET, SO_TYPE, &type, &optlen)) { in connect_to_fd()
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/net/core/
Dscm.c150 if (cmsg->cmsg_level != SOL_SOCKET) in __scm_send()
265 put_cmsg(msg, SOL_SOCKET, SO_TIMESTAMPING_NEW, sizeof(tss), &tss); in put_cmsg_scm_timestamping64()
279 put_cmsg(msg, SOL_SOCKET, SO_TIMESTAMPING_OLD, sizeof(tss), &tss); in put_cmsg_scm_timestamping()
317 err = put_user(SOL_SOCKET, &cm->cmsg_level); in scm_detach_fds()
/kernel/linux/linux-5.10/include/net/
Dscm.h103 put_cmsg(msg, SOL_SOCKET, SCM_SECURITY, seclen, secdata); in scm_passec()
130 put_cmsg(msg, SOL_SOCKET, SCM_CREDENTIALS, sizeof(ucreds), &ucreds); in scm_recv()
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/
Dsockopt_sk.c114 err = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buf, 4); in getsetsockopt()
122 err = getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buf, &optlen); in getsetsockopt()
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()
/kernel/liteos_m/kal/libc/newlib/porting/include/sys/
Dsocket.h178 #ifndef SOL_SOCKET
179 #define SOL_SOCKET 1 macro

1234