/kernel/liteos_m/components/net/test/ |
D | net_socket_test_004.c | 50 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/ |
D | net_socket_test_004.cpp | 48 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()
|
D | net_socket_test_007.cpp | 112 …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()
|
D | net_socket_test_012.cpp | 126 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/ |
D | tcp_bufs_kern.c | 57 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()
|
D | tcp_iw_kern.c | 58 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()
|
D | tcp_clamp_kern.c | 62 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()
|
D | test_cgrp2_sock.c | 132 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/ |
D | connect4_prog.c | 95 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()
|
D | sockopt_sk.c | 44 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/ |
D | timestamping.c | 158 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()
|
D | reuseport_bpf.c | 126 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()
|
D | tcp_mmap.c | 269 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()
|
D | rxtimestamp.c | 209 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()
|
D | so_txtime.c | 87 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()
|
D | reuseaddr_ports_exhausted.c | 63 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()
|
D | fin_ack_lat.c | 48 if (setsockopt(sock, SOL_SOCKET, SO_LINGER, &sl, sizeof(sl))) in client() 125 if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR | SO_REUSEPORT, in main()
|
D | msg_zerocopy.c | 330 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/ |
D | network_helpers.c | 52 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/ |
D | ipcsocket.c | 31 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/ |
D | scm.c | 150 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/ |
D | scm.h | 103 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/ |
D | sockopt_sk.c | 114 err = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buf, 4); in getsetsockopt() 122 err = getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buf, &optlen); in getsetsockopt()
|
D | bpf_tcp_ca.c | 21 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/ |
D | socket.h | 178 #ifndef SOL_SOCKET 179 #define SOL_SOCKET 1 macro
|