/Zephyr-latest/subsys/net/lib/sockets/ |
D | sockets_tls.c | 762 socklen_t optlen = sizeof(optval); in wait() local 765 &optval, &optlen) == 0) { in wait() 1456 const void *optval, socklen_t optlen) in tls_opt_sec_tag_list_set() argument 1464 if (optlen % sizeof(sec_tag_t) != 0) { in tls_opt_sec_tag_list_set() 1468 sec_tag_cnt = optlen / sizeof(sec_tag_t); in tls_opt_sec_tag_list_set() 1474 memcpy(context->options.sec_tag_list.sec_tags, optval, optlen); in tls_opt_sec_tag_list_set() 1481 void *optval, socklen_t *optlen) in sock_opt_protocol_get() argument 1485 if (*optlen != sizeof(protocol)) { in sock_opt_protocol_get() 1495 void *optval, socklen_t *optlen) in tls_opt_sec_tag_list_get() argument 1499 if (*optlen % sizeof(sec_tag_t) != 0 || *optlen == 0) { in tls_opt_sec_tag_list_get() [all …]
|
D | sockets_inet.c | 1616 socklen_t optlen, bool do_get) in ipv4_multicast_if() argument 1625 if (optval == NULL || (optlen != sizeof(struct in_addr))) { in ipv4_multicast_if() 1657 if (optval == NULL || (optlen != sizeof(struct ip_mreqn) && in ipv4_multicast_if() 1658 optlen != sizeof(struct ip_mreq))) { in ipv4_multicast_if() 1663 if (optlen == sizeof(struct ip_mreqn)) { in ipv4_multicast_if() 1709 void *optval, socklen_t *optlen) in zsock_getsockopt_ctx() argument 1717 if (*optlen != sizeof(int)) { in zsock_getsockopt_ctx() 1730 if (*optlen != sizeof(type)) { in zsock_getsockopt_ctx() 1744 optval, optlen); in zsock_getsockopt_ctx() 1757 if (*optlen != sizeof(proto)) { in zsock_getsockopt_ctx() [all …]
|
D | sockets_net_mgmt.c | 227 int optname, void *optval, socklen_t *optlen) in znet_mgmt_getsockopt() argument 229 if (level != SOL_NET_MGMT_RAW || !optval || !optlen) { in znet_mgmt_getsockopt() 244 mgmt->iface, (void *)optval, *optlen); in znet_mgmt_getsockopt() 264 socklen_t optlen) in znet_mgmt_setsockopt() argument 266 if (level != SOL_NET_MGMT_RAW || !optval || !optlen) { in znet_mgmt_setsockopt() 281 mgmt->iface, (void *)optval, optlen); in znet_mgmt_setsockopt() 361 void *optval, socklen_t *optlen) in net_mgmt_sock_getsockopt() argument 363 return znet_mgmt_getsockopt(obj, level, optname, optval, optlen); in net_mgmt_sock_getsockopt() 367 const void *optval, socklen_t optlen) in net_mgmt_sock_setsockopt() argument 369 return znet_mgmt_setsockopt(obj, level, optname, optval, optlen); in net_mgmt_sock_setsockopt()
|
D | sockets_can.c | 348 void *optval, socklen_t *optlen) in zcan_getsockopt_ctx() argument 350 if (!optval || !optlen) { in zcan_getsockopt_ctx() 356 optval, optlen); in zcan_getsockopt_ctx() 360 const void *optval, socklen_t optlen) in zcan_setsockopt_ctx() argument 363 optval, optlen); in zcan_setsockopt_ctx() 515 void *optval, socklen_t *optlen) in can_sock_getsockopt_vmeth() argument 537 optlen); in can_sock_getsockopt_vmeth() 540 return zcan_getsockopt_ctx(obj, level, optname, optval, optlen); in can_sock_getsockopt_vmeth() 625 const void *optval, socklen_t optlen) in can_sock_setsockopt_vmeth() argument 633 return zcan_setsockopt_ctx(obj, level, optname, optval, optlen); in can_sock_setsockopt_vmeth() [all …]
|
D | sockets_packet.c | 364 void *optval, socklen_t *optlen) in zpacket_getsockopt_ctx() argument 366 if (!optval || !optlen) { in zpacket_getsockopt_ctx() 372 optval, optlen); in zpacket_getsockopt_ctx() 376 const void *optval, socklen_t optlen) in zpacket_setsockopt_ctx() argument 379 optval, optlen); in zpacket_setsockopt_ctx() 454 void *optval, socklen_t *optlen) in packet_sock_getsockopt_vmeth() argument 456 return zpacket_getsockopt_ctx(obj, level, optname, optval, optlen); in packet_sock_getsockopt_vmeth() 460 const void *optval, socklen_t optlen) in packet_sock_setsockopt_vmeth() argument 462 return zpacket_setsockopt_ctx(obj, level, optname, optval, optlen); in packet_sock_setsockopt_vmeth()
|
D | socket_dispatcher.c | 303 void *optval, socklen_t *optlen) in sock_dispatch_getsockopt_vmeth() argument 311 return zsock_getsockopt(fd, level, optname, optval, optlen); in sock_dispatch_getsockopt_vmeth() 315 const void *optval, socklen_t optlen) in sock_dispatch_setsockopt_vmeth() argument 323 if ((ifreq == NULL) || (optlen != sizeof(*ifreq))) { in sock_dispatch_setsockopt_vmeth() 369 if ((tls_native == NULL) || (optlen != sizeof(int))) { in sock_dispatch_setsockopt_vmeth() 393 return zsock_setsockopt(fd, level, optname, optval, optlen); in sock_dispatch_setsockopt_vmeth()
|
D | sockets.c | 848 void *optval, socklen_t *optlen) in z_impl_zsock_getsockopt() argument 854 ret = VTABLE_CALL(getsockopt, sock, level, optname, optval, optlen); in z_impl_zsock_getsockopt() 857 optval, *optlen, ret < 0 ? -errno : ret); in z_impl_zsock_getsockopt() 863 void *optval, socklen_t *optlen) in z_vrfy_zsock_getsockopt() argument 865 socklen_t kernel_optlen = *(socklen_t *)optlen; in z_vrfy_zsock_getsockopt() 882 K_OOPS(k_usermode_to_copy((void *)optlen, &kernel_optlen, in z_vrfy_zsock_getsockopt() 893 const void *optval, socklen_t optlen) in z_impl_zsock_setsockopt() argument 898 level, optname, optval, optlen); in z_impl_zsock_setsockopt() 900 ret = VTABLE_CALL(setsockopt, sock, level, optname, optval, optlen); in z_impl_zsock_setsockopt() 909 const void *optval, socklen_t optlen) in z_vrfy_zsock_setsockopt() argument [all …]
|
/Zephyr-latest/subsys/net/lib/dhcpv4/ |
D | dhcpv4_server.c | 110 uint8_t *optlen, uint8_t opt_code) in dhcpv4_find_option() argument 145 *optlen = len; in dhcpv4_find_option() 160 uint8_t optlen; in dhcpv4_find_message_type_option() local 162 opt = dhcpv4_find_option(data, datalen, &optlen, in dhcpv4_find_message_type_option() 168 if (optlen != 1) { in dhcpv4_find_message_type_option() 181 uint8_t optlen; in dhcpv4_find_server_id_option() local 183 opt = dhcpv4_find_option(data, datalen, &optlen, in dhcpv4_find_server_id_option() 189 if (optlen != sizeof(struct in_addr)) { in dhcpv4_find_server_id_option() 202 uint8_t optlen; in dhcpv4_find_client_id_option() local 204 opt = dhcpv4_find_option(data, datalen, &optlen, in dhcpv4_find_client_id_option() [all …]
|
/Zephyr-latest/tests/net/conn_mgr_conn/src/ |
D | test_conn_impl.c | 151 const void *optval, size_t optlen) in test_set_opt_a() argument 155 int len = MIN(optlen, TEST_CONN_DATA_LEN); in test_set_opt_a() 175 void *optval, size_t *optlen) in test_get_opt_a() argument 185 *optlen = 0; in test_get_opt_a() 189 len = MIN(strlen(target) + 1, *optlen); in test_get_opt_a() 192 *optlen = 0; in test_get_opt_a() 195 *optlen = len; in test_get_opt_a()
|
/Zephyr-latest/tests/net/pmtu/src/ |
D | main.c | 787 size_t optlen; in ZTEST() local 799 optval = 0; optlen = sizeof(int); in ZTEST() 800 ret = zsock_getsockopt(client_sock, IPPROTO_IP, IP_MTU, &optval, &optlen); in ZTEST() 803 zexpect_equal(optlen, sizeof(int), "setsockopt optlen (%d)", optlen); in ZTEST() 806 optval = 0; optlen = sizeof(int); in ZTEST() 807 ret = zsock_setsockopt(client_sock, IPPROTO_IP, IP_MTU, &optval, optlen); in ZTEST() 810 zexpect_equal(optlen, sizeof(int), "setsockopt optlen (%d)", optlen); in ZTEST() 826 size_t optlen; in ZTEST() local 838 optval = 0; optlen = sizeof(int); in ZTEST() 839 ret = zsock_getsockopt(client_sock, IPPROTO_IPV6, IPV6_MTU, &optval, &optlen); in ZTEST() [all …]
|
/Zephyr-latest/drivers/net/ |
D | nsos_sockets.c | 1024 void *optval, socklen_t *optlen) in nsos_getsockopt_int() argument 1029 if (*optlen != sizeof(int)) { in nsos_getsockopt_int() 1041 *optlen = nsos_mid_optlen; in nsos_getsockopt_int() 1047 void *optval, socklen_t *optlen) in nsos_getsockopt() argument 1058 if (*optlen != sizeof(int)) { in nsos_getsockopt() 1078 if (*optlen != sizeof(nsos_mid_type)) { in nsos_getsockopt() 1102 if (*optlen != sizeof(nsos_mid_proto)) { in nsos_getsockopt() 1126 if (*optlen != sizeof(nsos_mid_family)) { in nsos_getsockopt() 1149 optval, optlen); in nsos_getsockopt() 1153 optval, optlen); in nsos_getsockopt() [all …]
|
D | nsos_adapt.c | 609 socklen_t optlen = *nsos_mid_optlen; in nsos_adapt_getsockopt_int() local 612 ret = getsockopt(fd, level, optname, optval, &optlen); in nsos_adapt_getsockopt_int() 617 *nsos_mid_optlen = optlen; in nsos_adapt_getsockopt_int() 630 socklen_t optlen = sizeof(err); in nsos_adapt_getsockopt() local 633 ret = getsockopt(fd, SOL_SOCKET, SO_ERROR, &err, &optlen); in nsos_adapt_getsockopt() 644 socklen_t optlen = sizeof(type); in nsos_adapt_getsockopt() local 648 ret = getsockopt(fd, SOL_SOCKET, SO_TYPE, &type, &optlen); in nsos_adapt_getsockopt() 662 socklen_t optlen = sizeof(proto); in nsos_adapt_getsockopt() local 666 ret = getsockopt(fd, SOL_SOCKET, SO_PROTOCOL, &proto, &optlen); in nsos_adapt_getsockopt() 680 socklen_t optlen = sizeof(family); in nsos_adapt_getsockopt() local [all …]
|
D | canbus.c | 60 int optname, const void *optval, socklen_t optlen) in net_canbus_setsockopt() argument 72 __ASSERT_NO_MSG(optlen == sizeof(struct can_filter)); in net_canbus_setsockopt()
|
/Zephyr-latest/samples/net/sockets/echo_service/src/ |
D | main.c | 114 socklen_t optlen = sizeof(int); in setup_tcp_socket() local 123 ret = getsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &opt, &optlen); in setup_tcp_socket() 128 ret = setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &opt, optlen); in setup_tcp_socket() 151 socklen_t optlen = sizeof(int); in setup_udp_socket() local 160 ret = getsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &opt, &optlen); in setup_udp_socket() 165 ret = setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &opt, optlen); in setup_udp_socket()
|
/Zephyr-latest/include/zephyr/net/ |
D | canbus.h | 42 const void *optval, socklen_t optlen); 47 const void *optval, socklen_t *optlen);
|
D | conn_mgr_connectivity.h | 166 int conn_mgr_if_set_opt(struct net_if *iface, int optname, const void *optval, size_t optlen); 194 int conn_mgr_if_get_opt(struct net_if *iface, int optname, void *optval, size_t *optlen);
|
D | conn_mgr_connectivity_impl.h | 97 int optname, const void *optval, size_t optlen); 115 int optname, void *optval, size_t *optlen);
|
/Zephyr-latest/tests/net/socket/udp/src/ |
D | main.c | 737 socklen_t optlen; in ZTEST() local 759 optlen = sizeof(optval); in ZTEST() 760 rv = zsock_getsockopt(sock1, SOL_SOCKET, SO_TXTIME, &optval, &optlen); in ZTEST() 762 zassert_equal(optlen, sizeof(optval), "invalid optlen %d vs %d", in ZTEST() 763 optlen, sizeof(optval)); in ZTEST() 766 optlen = sizeof(optval); in ZTEST() 767 rv = zsock_getsockopt(sock2, SOL_SOCKET, SO_TXTIME, &optval, &optlen); in ZTEST() 769 zassert_equal(optlen, sizeof(optval), "invalid optlen %d vs %d", in ZTEST() 770 optlen, sizeof(optval)); in ZTEST() 1719 socklen_t optlen; in run_ancillary_recvmsg_test() local [all …]
|
/Zephyr-latest/samples/net/sockets/echo/src/ |
D | socket_echo.c | 30 socklen_t optlen = sizeof(int); in main() local 45 ret = getsockopt(serv, IPPROTO_IPV6, IPV6_V6ONLY, &opt, &optlen); in main() 52 &opt, optlen); in main()
|
/Zephyr-latest/subsys/net/conn_mgr/ |
D | conn_mgr_connectivity.c | 103 int conn_mgr_if_get_opt(struct net_if *iface, int optname, void *optval, size_t *optlen) in conn_mgr_if_get_opt() argument 109 if (!optlen) { in conn_mgr_if_get_opt() 114 *optlen = 0; in conn_mgr_if_get_opt() 120 *optlen = 0; in conn_mgr_if_get_opt() 126 *optlen = 0; in conn_mgr_if_get_opt() 132 status = api->get_opt(binding, optname, optval, optlen); in conn_mgr_if_get_opt() 139 int conn_mgr_if_set_opt(struct net_if *iface, int optname, const void *optval, size_t optlen) in conn_mgr_if_set_opt() argument 161 status = api->set_opt(binding, optname, optval, optlen); in conn_mgr_if_set_opt()
|
/Zephyr-latest/tests/net/socket/net_mgmt/src/ |
D | main.c | 523 socklen_t optlen = sizeof(params); in test_ethernet_get_qav() local 533 ¶ms, &optlen); in test_ethernet_get_qav() 535 zassert_equal(optlen, sizeof(params), "Invalid optlen (%d)", optlen); in test_ethernet_get_qav() 553 socklen_t optlen = sizeof(params); in test_ethernet_get_unknown_option() local 560 ¶ms, &optlen); in test_ethernet_get_unknown_option() 578 socklen_t optlen = sizeof(params); in test_ethernet_set_unknown_option() local 585 ¶ms, optlen); in test_ethernet_set_unknown_option()
|
/Zephyr-latest/tests/net/socket/tcp/src/ |
D | main.c | 1267 socklen_t optlen = sizeof(optval); in ZTEST() local 1276 rv = zsock_getsockopt(sock1, SOL_SOCKET, SO_TYPE, &optval, &optlen); in ZTEST() 1279 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST() 1281 rv = zsock_getsockopt(sock2, SOL_SOCKET, SO_TYPE, &optval, &optlen); in ZTEST() 1284 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST() 1300 socklen_t optlen = sizeof(optval); in ZTEST() local 1305 rv = zsock_getsockopt(sock1, SOL_SOCKET, SO_PROTOCOL, &optval, &optlen); in ZTEST() 1308 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST() 1310 rv = zsock_getsockopt(sock2, SOL_SOCKET, SO_PROTOCOL, &optval, &optlen); in ZTEST() 1313 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST() [all …]
|
/Zephyr-latest/drivers/wifi/simplelink/ |
D | simplelink_sockets.c | 650 static int map_credentials(int sd, const void *optval, socklen_t optlen) in map_credentials() argument 660 if ((optlen % sizeof(sec_tag_t)) != 0 || (optlen == 0)) { in map_credentials() 664 sec_tags_len = optlen / sizeof(sec_tag_t); in map_credentials() 706 static int map_credentials(int sd, const void *optval, socklen_t optlen) in map_credentials() argument 716 const void *optval, socklen_t optlen) in simplelink_setsockopt() argument 726 retval = map_credentials(sd, optval, optlen); in simplelink_setsockopt() 735 (const char *)optval, optlen); in simplelink_setsockopt() 798 (SlSocklen_t)optlen); in simplelink_setsockopt() 810 void *optval, socklen_t *optlen) in simplelink_getsockopt() argument 854 (SlSocklen_t *)optlen); in simplelink_getsockopt() [all …]
|
/Zephyr-latest/include/zephyr/posix/sys/ |
D | socket.h | 35 int getsockopt(int sock, int level, int optname, void *optval, socklen_t *optlen); 45 int setsockopt(int sock, int level, int optname, const void *optval, socklen_t optlen);
|
/Zephyr-latest/subsys/net/lib/zperf/ |
D | zperf_tcp_receiver.c | 130 socklen_t optlen = sizeof(int); in tcp_recv_data() local 140 SO_DOMAIN, &family, &optlen); in tcp_recv_data() 142 SO_ERROR, &sock_error, &optlen); in tcp_recv_data() 165 SO_DOMAIN, &family, &optlen); in tcp_recv_data() 195 SO_DOMAIN, &family, &optlen); in tcp_recv_data()
|