Lines Matching refs:optval
761 int optval; in wait() local
762 socklen_t optlen = sizeof(optval); in wait()
765 &optval, &optlen) == 0) { in wait()
767 -optval); in wait()
768 return -optval; in wait()
1456 const void *optval, socklen_t optlen) in tls_opt_sec_tag_list_set() argument
1460 if (!optval) { 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
1489 *(int *)optval = protocol; in sock_opt_protocol_get()
1495 void *optval, socklen_t *optlen) in tls_opt_sec_tag_list_get() argument
1506 memcpy(optval, context->options.sec_tag_list.sec_tags, len); in tls_opt_sec_tag_list_get()
1513 const void *optval, socklen_t optlen) in tls_opt_hostname_set() argument
1518 if (mbedtls_ssl_set_hostname(&context->ssl, optval) != 0) { in tls_opt_hostname_set()
1531 const void *optval, socklen_t optlen) in tls_opt_ciphersuite_list_set() argument
1535 if (!optval) { in tls_opt_ciphersuite_list_set()
1550 memcpy(context->options.ciphersuites, optval, optlen); in tls_opt_ciphersuite_list_set()
1559 void *optval, socklen_t *optlen) in tls_opt_ciphersuite_list_get() argument
1563 int *ciphers = optval; in tls_opt_ciphersuite_list_get()
1591 void *optval, socklen_t *optlen) in tls_opt_ciphersuite_used_get() argument
1604 *(int *)optval = mbedtls_ssl_get_ciphersuite_id(ciph); in tls_opt_ciphersuite_used_get()
1610 const void *optval, socklen_t optlen) in tls_opt_alpn_list_set() argument
1618 if (!optval) { in tls_opt_alpn_list_set()
1632 memcpy(context->options.alpn_list, optval, optlen); in tls_opt_alpn_list_set()
1640 void *optval, socklen_t *optlen, in tls_opt_dtls_handshake_timeout_get() argument
1643 uint32_t *val = (uint32_t *)optval; in tls_opt_dtls_handshake_timeout_get()
1659 const void *optval, in tls_opt_dtls_handshake_timeout_set() argument
1662 uint32_t *val = (uint32_t *)optval; in tls_opt_dtls_handshake_timeout_set()
1664 if (!optval) { in tls_opt_dtls_handshake_timeout_set()
1692 const void *optval, socklen_t optlen) in tls_opt_dtls_connection_id_set() argument
1697 if (optlen > 0 && optval == NULL) { in tls_opt_dtls_connection_id_set()
1705 value = *((int *)optval); in tls_opt_dtls_connection_id_set()
1741 const void *optval, in tls_opt_dtls_connection_id_value_set() argument
1745 if (optlen > 0 && optval == NULL) { in tls_opt_dtls_connection_id_value_set()
1754 memcpy(context->options.dtls_cid.cid, optval, optlen); in tls_opt_dtls_connection_id_value_set()
1763 void *optval, socklen_t *optlen) in tls_opt_dtls_connection_id_value_get() argument
1772 memcpy(optval, context->options.dtls_cid.cid, *optlen); in tls_opt_dtls_connection_id_value_get()
1781 void *optval, in tls_opt_dtls_peer_connection_id_value_get() argument
1792 ret = mbedtls_ssl_get_peer_cid(&context->ssl, &enabled, optval, optlen); in tls_opt_dtls_peer_connection_id_value_get()
1803 void *optval, socklen_t *optlen) in tls_opt_dtls_connection_id_status_get() argument
1845 *((int *)optval) = val; in tls_opt_dtls_connection_id_status_get()
1853 const void *optval, in tls_opt_dtls_handshake_on_connect_set() argument
1856 int *val = (int *)optval; in tls_opt_dtls_handshake_on_connect_set()
1858 if (!optval) { in tls_opt_dtls_handshake_on_connect_set()
1872 void *optval, in tls_opt_dtls_handshake_on_connect_get() argument
1879 *(int *)optval = context->options.dtls_handshake_on_connect; in tls_opt_dtls_handshake_on_connect_get()
1886 void *optval, socklen_t *optlen) in tls_opt_alpn_list_get() argument
1890 const char **ret_list = optval; in tls_opt_alpn_list_get()
1915 const void *optval, socklen_t optlen) in tls_opt_session_cache_set() argument
1917 int *val = (int *)optval; in tls_opt_session_cache_set()
1919 if (!optval) { in tls_opt_session_cache_set()
1933 void *optval, socklen_t *optlen) in tls_opt_session_cache_get() argument
1943 *(int *)optval = cache_enabled; in tls_opt_session_cache_get()
1949 const void *optval, socklen_t optlen) in tls_opt_session_cache_purge_set() argument
1952 ARG_UNUSED(optval); in tls_opt_session_cache_purge_set()
1961 const void *optval, socklen_t optlen) in tls_opt_peer_verify_set() argument
1965 if (!optval) { in tls_opt_peer_verify_set()
1973 peer_verify = (int *)optval; in tls_opt_peer_verify_set()
1987 const void *optval, socklen_t optlen) in tls_opt_cert_nocopy_set() argument
1991 if (!optval) { in tls_opt_cert_nocopy_set()
1999 cert_nocopy = (int *)optval; in tls_opt_cert_nocopy_set()
2012 const void *optval, socklen_t optlen) in tls_opt_dtls_role_set() argument
2016 if (!optval) { in tls_opt_dtls_role_set()
2024 role = (int *)optval; in tls_opt_dtls_role_set()
3433 void *optval, socklen_t *optlen) in ztls_getsockopt_ctx() argument
3437 if (!optval || !optlen) { in ztls_getsockopt_ctx()
3446 err = sock_opt_protocol_get(ctx, optval, optlen); in ztls_getsockopt_ctx()
3465 *(int *)optval = ctx->error; in ztls_getsockopt_ctx()
3472 optval, optlen); in ztls_getsockopt_ctx()
3477 err = tls_opt_sec_tag_list_get(ctx, optval, optlen); in ztls_getsockopt_ctx()
3481 err = tls_opt_ciphersuite_list_get(ctx, optval, optlen); in ztls_getsockopt_ctx()
3485 err = tls_opt_ciphersuite_used_get(ctx, optval, optlen); in ztls_getsockopt_ctx()
3489 err = tls_opt_alpn_list_get(ctx, optval, optlen); in ztls_getsockopt_ctx()
3493 err = tls_opt_session_cache_get(ctx, optval, optlen); in ztls_getsockopt_ctx()
3498 err = tls_opt_dtls_handshake_timeout_get(ctx, optval, in ztls_getsockopt_ctx()
3503 err = tls_opt_dtls_handshake_timeout_get(ctx, optval, in ztls_getsockopt_ctx()
3508 err = tls_opt_dtls_connection_id_status_get(ctx, optval, in ztls_getsockopt_ctx()
3513 err = tls_opt_dtls_connection_id_value_get(ctx, optval, optlen); in ztls_getsockopt_ctx()
3517 err = tls_opt_dtls_peer_connection_id_value_get(ctx, optval, in ztls_getsockopt_ctx()
3522 err = tls_opt_dtls_handshake_on_connect_get(ctx, optval, optlen); in ztls_getsockopt_ctx()
3540 static int set_timeout_opt(k_timeout_t *timeout, const void *optval, in set_timeout_opt() argument
3543 const struct zsock_timeval *tval = optval; in set_timeout_opt()
3559 const void *optval, socklen_t optlen) in ztls_setsockopt_ctx() argument
3567 err = set_timeout_opt(&ctx->options.timeout_tx, optval, optlen); in ztls_setsockopt_ctx()
3572 err = set_timeout_opt(&ctx->options.timeout_rx, optval, optlen); in ztls_setsockopt_ctx()
3578 optval, optlen); in ztls_setsockopt_ctx()
3583 err = tls_opt_sec_tag_list_set(ctx, optval, optlen); in ztls_setsockopt_ctx()
3587 err = tls_opt_hostname_set(ctx, optval, optlen); in ztls_setsockopt_ctx()
3591 err = tls_opt_ciphersuite_list_set(ctx, optval, optlen); in ztls_setsockopt_ctx()
3595 err = tls_opt_peer_verify_set(ctx, optval, optlen); in ztls_setsockopt_ctx()
3599 err = tls_opt_cert_nocopy_set(ctx, optval, optlen); in ztls_setsockopt_ctx()
3603 err = tls_opt_dtls_role_set(ctx, optval, optlen); in ztls_setsockopt_ctx()
3607 err = tls_opt_alpn_list_set(ctx, optval, optlen); in ztls_setsockopt_ctx()
3611 err = tls_opt_session_cache_set(ctx, optval, optlen); in ztls_setsockopt_ctx()
3615 err = tls_opt_session_cache_purge_set(ctx, optval, optlen); in ztls_setsockopt_ctx()
3620 err = tls_opt_dtls_handshake_timeout_set(ctx, optval, in ztls_setsockopt_ctx()
3625 err = tls_opt_dtls_handshake_timeout_set(ctx, optval, in ztls_setsockopt_ctx()
3630 err = tls_opt_dtls_connection_id_set(ctx, optval, optlen); in ztls_setsockopt_ctx()
3634 err = tls_opt_dtls_connection_id_value_set(ctx, optval, optlen); in ztls_setsockopt_ctx()
3638 err = tls_opt_dtls_handshake_on_connect_set(ctx, optval, optlen); in ztls_setsockopt_ctx()
3828 void *optval, socklen_t *optlen) in tls_sock_getsockopt_vmeth() argument
3830 return ztls_getsockopt_ctx(obj, level, optname, optval, optlen); in tls_sock_getsockopt_vmeth()
3834 const void *optval, socklen_t optlen) in tls_sock_setsockopt_vmeth() argument
3836 return ztls_setsockopt_ctx(obj, level, optname, optval, optlen); in tls_sock_setsockopt_vmeth()