/third_party/musl/libc-test/src/functionalext/supplement/network/ |
D | getsockopt_network.c | 34 int optlen = 0; in getsockopt_0100() local 36 int content = getsockopt(sockfd, SOL_SOCKET, SO_DEBUG, &optval, (socklen_t *)(&optlen)); in getsockopt_0100() 48 int optlen = 0; in getsockopt_0200() local 50 int content = getsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &optval, (socklen_t *)(&optlen)); in getsockopt_0200() 62 int optlen = 0; in getsockopt_0300() local 64 int content = getsockopt(sockfd, SOL_SOCKET, SO_TYPE, &optval, (socklen_t *)(&optlen)); in getsockopt_0300() 76 int optlen = 0; in getsockopt_0400() local 78 int content = getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &optval, (socklen_t *)(&optlen)); in getsockopt_0400() 90 int optlen = 0; in getsockopt_0500() local 92 int content = getsockopt(sockfd, SOL_SOCKET, SO_DONTROUTE, &optval, (socklen_t *)(&optlen)); in getsockopt_0500() [all …]
|
/third_party/ltp/utils/sctp/func_tests/ |
D | test_sockopt.c | 101 socklen_t optlen, addrlen; in main() local 171 optlen = sizeof(struct sctp_status); in main() 172 memset(&status, 0, optlen); in main() 174 &optlen); in main() 239 optlen = sizeof(struct sctp_status); in main() 240 memset(&status, 0, optlen); in main() 242 test_getsockopt(udp_clt_sk, SCTP_STATUS, &status, &optlen); in main() 247 optlen = sizeof(struct sctp_status); in main() 248 memset(&status, 0, optlen); in main() 251 &optlen); in main() [all …]
|
D | test_fragments.c | 97 socklen_t optlen; in main() local 216 optlen = sizeof(disable_frag); in main() 218 &optlen); in main()
|
/third_party/ltp/testcases/kernel/syscalls/getsockopt/ |
D | getsockopt01.c | 64 socklen_t optlen; variable 76 socklen_t *optlen; member 87 &optlen, (struct sockaddr *)&fsin1, sizeof(fsin1), 91 &optlen, (struct sockaddr *)&fsin1, sizeof(fsin1), 96 PF_INET, SOCK_STREAM, 0, SOL_SOCKET, SO_OOBINLINE, 0, &optlen, 106 PF_INET, SOCK_STREAM, 0, 500, SO_OOBINLINE, &optval, &optlen, 111 &optlen, (struct sockaddr *)&fsin1, sizeof(fsin1), 115 &optlen, (struct sockaddr *)&fsin1, sizeof(fsin1), 119 PF_INET, SOCK_STREAM, 0, IPPROTO_IP, -1, &optval, &optlen, 123 PF_INET, SOCK_STREAM, 0, IPPROTO_TCP, -1, &optval, &optlen, [all …]
|
/third_party/lwip/src/core/ |
D | tcp_out.c | 173 u8_t optlen; in tcp_create_segment() local 178 optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb); in tcp_create_segment() 188 LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen); in tcp_create_segment() 189 seg->len = p->tot_len - optlen; in tcp_create_segment() 213 TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), hdrflags); in tcp_create_segment() 408 u8_t optlen; in tcp_write() local 455 optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(TF_SEG_OPTS_TS, pcb); in tcp_write() 461 optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb); in tcp_write() 612 u16_t max_len = mss_local - optlen; in tcp_write() 622 …if ((p = tcp_pbuf_prealloc(PBUF_TRANSPORT, seglen + optlen, mss_local, &oversize, pcb, apiflags, q… in tcp_write() [all …]
|
/third_party/musl/src/network/ |
D | getsockopt.c | 6 int getsockopt(int fd, int level, int optname, void *restrict optval, socklen_t *restrict optlen) in getsockopt() argument 11 int r = __socketcall(getsockopt, fd, level, optname, optval, optlen, 0); in getsockopt() 19 if (*optlen < sizeof *tv) return __syscall_ret(-EINVAL); in getsockopt() 28 *optlen = sizeof *tv; in getsockopt() 36 optname, optval, optlen, 0); in getsockopt()
|
D | setsockopt.c | 9 int setsockopt(int fd, int level, int optname, const void *optval, socklen_t optlen) in setsockopt() argument 15 int r = __socketcall(setsockopt, fd, level, optname, optval, optlen, 0); in setsockopt() 23 if (optlen < sizeof *tv) return __syscall_ret(-EINVAL); in setsockopt() 41 optname, optval, optlen, 0); in setsockopt()
|
/third_party/toybox/lib/ |
D | commas.c | 66 int optlen = strlen(opt), len, no, got = 0; in comma_scan() local 73 if (optlen == len-no && !strncmp(opt, s+no, optlen)) { in comma_scan() 105 int optlen = strlen(opt), len, got = 0; in comma_remove() local 111 if (optlen == len && !strncmp(opt, s, optlen)) { in comma_remove()
|
/third_party/libwebsockets/lib/plat/freertos/ |
D | freertos-sockets.c | 90 socklen_t optlen = sizeof(optval); in lws_plat_set_socket_options() local 103 (const void *)&optval, optlen) < 0) in lws_plat_set_socket_options() 119 (const void *)&optval, optlen) < 0) in lws_plat_set_socket_options() 124 (const void *)&optval, optlen) < 0) in lws_plat_set_socket_options() 129 (const void *)&optval, optlen) < 0) in lws_plat_set_socket_options() 136 if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &optval, optlen) < 0) in lws_plat_set_socket_options() 158 socklen_t optlen = sizeof(optval); in lws_plat_set_socket_options_ip() local 166 (const void *)&optval, optlen) < 0) { in lws_plat_set_socket_options_ip() 184 optlen) < 0) { in lws_plat_set_socket_options_ip()
|
/third_party/libwebsockets/lib/plat/unix/ |
D | unix-sockets.c | 105 socklen_t optlen = sizeof(optval); in lws_plat_set_socket_options() local 121 (const void *)&optval, optlen) < 0) in lws_plat_set_socket_options() 141 (const void *)&optval, optlen) < 0) in lws_plat_set_socket_options() 146 (const void *)&optval, optlen) < 0) in lws_plat_set_socket_options() 151 (const void *)&optval, optlen) < 0) in lws_plat_set_socket_options() 156 (const void *)&optval, optlen) < 0) in lws_plat_set_socket_options() 175 if (!unix_skt && setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (const void *)&optval, optlen) < 0) in lws_plat_set_socket_options() 182 if (!unix_skt && setsockopt(fd, SOL_TCP, TCP_NODELAY, (const void *)&optval, optlen) < 0) in lws_plat_set_socket_options() 186 if (!unix_skt && setsockopt(fd, tcp_proto->p_proto, TCP_NODELAY, &optval, optlen) < 0) in lws_plat_set_socket_options() 218 socklen_t optlen = sizeof(optval); in lws_plat_set_socket_options_ip() local [all …]
|
/third_party/ltp/testcases/kernel/syscalls/setsockopt/ |
D | setsockopt04.c | 30 socklen_t optlen; in run() local 34 optlen = sizeof(sndbuf); in run() 36 SAFE_SETSOCKOPT(sockfd, SOL_SOCKET, SO_SNDBUFFORCE, &sndbuf, optlen); in run() 37 SAFE_GETSOCKOPT(sockfd, SOL_SOCKET, SO_SNDBUF, &rec_sndbuf, &optlen); in run()
|
D | setsockopt01.c | 31 int optlen; member 79 TEST(setsockopt(fd, tc->level, tc->optname, tc->optval, tc->optlen)); in run()
|
/third_party/lwip/src/api/ |
D | sockets.c | 170 #define LWIP_SOCKOPT_CHECK_OPTLEN(sock, optlen, opttype) do { if ((optlen) < sizeof(opttype)) { don… argument 171 #define LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, opttype) do { \ argument 172 LWIP_SOCKOPT_CHECK_OPTLEN(sock, optlen, opttype); \ 174 #define LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, opttype) do { \ argument 175 LWIP_SOCKOPT_CHECK_OPTLEN(sock, optlen, opttype); \ 177 #define LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, opttype, netconntype) do { \ argument 178 LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, opttype); \ 306 static int lwip_getsockopt_impl(int s, int level, int optname, void *optval, socklen_t *optlen); 307 static int lwip_setsockopt_impl(int s, int level, int optname, const void *optval, socklen_t optlen… 2837 lwip_getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen) in lwip_getsockopt() argument [all …]
|
/third_party/ltp/include/ |
D | tst_safe_net.h | 23 #define SAFE_GETSOCKOPT(fd, level, optname, optval, optlen) \ argument 24 safe_getsockopt(__FILE__, __LINE__, fd, level, optname, optval, optlen) 26 #define SAFE_SETSOCKOPT(fd, level, optname, optval, optlen) \ argument 27 safe_setsockopt(__FILE__, __LINE__, fd, level, optname, optval, optlen)
|
D | safe_net_fn.h | 35 int optname, void *optval, socklen_t *optlen); 38 int optname, const void *optval, socklen_t optlen);
|
/third_party/ltp/lib/ |
D | safe_net.c | 170 int optname, void *optval, socklen_t *optlen) in safe_getsockopt() argument 172 int rval = getsockopt(sockfd, level, optname, optval, optlen); in safe_getsockopt() 177 sockfd, level, optname, optval, optlen); in safe_getsockopt() 181 sockfd, level, optname, optval, optlen, rval); in safe_getsockopt() 188 int optname, const void *optval, socklen_t optlen) in safe_setsockopt() argument 192 rval = setsockopt(sockfd, level, optname, optval, optlen); in safe_setsockopt() 197 sockfd, level, optname, optval, optlen); in safe_setsockopt() 201 sockfd, level, optname, optval, optlen, rval); in safe_setsockopt()
|
/third_party/lwip/src/core/ipv4/ |
D | ip4.c | 845 u16_t optlen) argument 857 ip_options, optlen); 883 u16_t optlen) argument 902 if (optlen != 0) { 906 if (optlen > (IP_HLEN_MAX - IP_HLEN)) { 914 optlen_aligned = (u16_t)((optlen + 3) & ~3); 923 MEMCPY(p->payload, ip_options, optlen); 924 if (optlen < optlen_aligned) { 926 memset(((char *)p->payload) + optlen, 0, (size_t)(optlen_aligned - optlen));
|
/third_party/ffmpeg/libavformat/ |
D | network.c | 264 socklen_t optlen; in ff_listen_connect() local 281 optlen = sizeof(ret); in ff_listen_connect() 282 if (getsockopt (fd, SOL_SOCKET, SO_ERROR, &ret, &optlen)) in ff_listen_connect() 412 socklen_t optlen; in ff_connect_parallel() local 473 optlen = sizeof(last_err); in ff_connect_parallel() 474 if (getsockopt(attempts[i].fd, SOL_SOCKET, SO_ERROR, &last_err, &optlen)) in ff_connect_parallel()
|
/third_party/ltp/utils/sctp/testlib/ |
D | sctputil.h | 271 socklen_t *optlen) in test_getsockopt() argument 273 int error = getsockopt(sk, SOL_SCTP, optname, optval, optlen); in test_getsockopt() 282 socklen_t optlen) in test_setsockopt() argument 284 int error = setsockopt(sk, SOL_SCTP, optname, optval, optlen); in test_setsockopt()
|
/third_party/lwip/src/include/lwip/ |
D | sockets.h | 581 int lwip_getsockopt (int s, int level, int optname, void *optval, socklen_t *optlen); 582 int lwip_setsockopt (int s, int level, int optname, const void *optval, socklen_t optlen); 643 #define setsockopt(s,level,optname,opval,optlen) lwip_setsockopt(s,level,optname,opval,optlen) argument 645 #define getsockopt(s,level,optname,opval,optlen) lwip_getsockopt(s,level,optname,opval,optlen) argument
|
D | ip4.h | 93 u16_t optlen); 96 u16_t optlen);
|
/third_party/ltp/testcases/network/stress/ns-tools/ |
D | ns-mcast_receiver.c | 373 socklen_t optlen; /* size of the result parameter */ in receive_mcast() local 380 optlen = sizeof(msgbuf_size); in receive_mcast() 381 if (getsockopt(sd, SOL_SOCKET, SO_RCVBUF, &msgbuf_size, &optlen) < 0) { in receive_mcast()
|
/third_party/rust/crates/rustix/src/backend/linux_raw/net/ |
D | syscalls.rs | 768 let mut optlen = core::mem::size_of::<T>(); in getsockopt() localVariable 770 optlen as usize >= core::mem::size_of::<c::c_int>(), in getsockopt() 783 by_mut(&mut optlen) in getsockopt() 787 optlen as usize, in getsockopt() 804 by_mut(&mut optlen), in getsockopt() 808 optlen as usize, in getsockopt() 825 let optlen = core::mem::size_of::<T>().try_into().unwrap(); in setsockopt() localVariable 827 optlen as usize >= core::mem::size_of::<c::c_int>(), in setsockopt() 839 socklen_t(optlen) in setsockopt() 852 socklen_t(optlen), in setsockopt()
|
/third_party/lwip/src/netif/ppp/ |
D | ccp.c | 1525 int optlen; in ccp_printpkt() local 1552 optlen = p[1]; in ccp_printpkt() 1553 if (optlen < 2 || optlen > len) in ccp_printpkt() 1556 len -= optlen; in ccp_printpkt() 1557 optend = p + optlen; in ccp_printpkt() 1561 if (optlen >= CILEN_MPPE) { in ccp_printpkt() 1583 if (optlen >= CILEN_DEFLATE) { in ccp_printpkt() 1597 if (optlen >= CILEN_BSD_COMPRESS) { in ccp_printpkt() 1606 if (optlen >= CILEN_PREDICTOR_1) { in ccp_printpkt() 1612 if (optlen >= CILEN_PREDICTOR_2) { in ccp_printpkt()
|
/third_party/libcoap/src/ |
D | coap_tcp.c | 170 int optlen = (int)sizeof(error); local 172 socklen_t optlen = (socklen_t)sizeof(error); local 178 &optlen) == COAP_SOCKET_ERROR) {
|