Home
last modified time | relevance | path

Searched refs:optlen (Results 1 – 25 of 54) sorted by relevance

123

/Zephyr-latest/subsys/net/lib/sockets/
Dsockets_tls.c762 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 …]
Dsockets_inet.c1616 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 …]
Dsockets_net_mgmt.c227 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()
Dsockets_can.c348 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 …]
Dsockets_packet.c364 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()
Dsocket_dispatcher.c303 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()
Dsockets.c848 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/
Ddhcpv4_server.c110 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/
Dtest_conn_impl.c151 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/
Dmain.c787 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/
Dnsos_sockets.c1024 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 …]
Dnsos_adapt.c609 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 …]
Dcanbus.c60 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/
Dmain.c114 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/
Dcanbus.h42 const void *optval, socklen_t optlen);
47 const void *optval, socklen_t *optlen);
Dconn_mgr_connectivity.h166 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);
Dconn_mgr_connectivity_impl.h97 int optname, const void *optval, size_t optlen);
115 int optname, void *optval, size_t *optlen);
/Zephyr-latest/tests/net/socket/udp/src/
Dmain.c737 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/
Dsocket_echo.c30 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/
Dconn_mgr_connectivity.c103 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/
Dmain.c523 socklen_t optlen = sizeof(params); in test_ethernet_get_qav() local
533 &params, &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 &params, &optlen); in test_ethernet_get_unknown_option()
578 socklen_t optlen = sizeof(params); in test_ethernet_set_unknown_option() local
585 &params, optlen); in test_ethernet_set_unknown_option()
/Zephyr-latest/tests/net/socket/tcp/src/
Dmain.c1267 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/
Dsimplelink_sockets.c650 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/
Dsocket.h35 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/
Dzperf_tcp_receiver.c130 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()

123