Lines Matching refs:optlen

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()
1504 sizeof(sec_tag_t), *optlen); in tls_opt_sec_tag_list_get()
1507 *optlen = len; in tls_opt_sec_tag_list_get()
1513 const void *optval, socklen_t optlen) in tls_opt_hostname_set() argument
1515 ARG_UNUSED(optlen); in tls_opt_hostname_set()
1531 const void *optval, socklen_t optlen) in tls_opt_ciphersuite_list_set() argument
1539 if (optlen % sizeof(int) != 0) { in tls_opt_ciphersuite_list_set()
1543 cipher_cnt = optlen / sizeof(int); 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
1565 if (*optlen % sizeof(int) != 0 || *optlen == 0) { in tls_opt_ciphersuite_list_get()
1576 cipher_cnt = *optlen / sizeof(int); in tls_opt_ciphersuite_list_get()
1585 *optlen = i * sizeof(int); in tls_opt_ciphersuite_list_get()
1591 void *optval, socklen_t *optlen) in tls_opt_ciphersuite_used_get() argument
1595 if (*optlen != sizeof(int)) { in tls_opt_ciphersuite_used_get()
1610 const void *optval, socklen_t optlen) in tls_opt_alpn_list_set() argument
1622 if (optlen % sizeof(const char *) != 0) { in tls_opt_alpn_list_set()
1626 alpn_cnt = optlen / sizeof(const char *); 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
1645 if (sizeof(uint32_t) != *optlen) { in tls_opt_dtls_handshake_timeout_get()
1660 socklen_t optlen, bool is_max) in tls_opt_dtls_handshake_timeout_set() argument
1668 if (sizeof(uint32_t) != optlen) { 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()
1701 if (optlen != sizeof(int)) { in tls_opt_dtls_connection_id_set()
1742 socklen_t optlen) in tls_opt_dtls_connection_id_value_set() argument
1745 if (optlen > 0 && optval == NULL) { in tls_opt_dtls_connection_id_value_set()
1749 if (optlen > MBEDTLS_SSL_CID_IN_LEN_MAX) { in tls_opt_dtls_connection_id_value_set()
1753 context->options.dtls_cid.cid_len = optlen; 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
1767 if (*optlen < context->options.dtls_cid.cid_len) { in tls_opt_dtls_connection_id_value_get()
1771 *optlen = context->options.dtls_cid.cid_len; in tls_opt_dtls_connection_id_value_get()
1772 memcpy(optval, context->options.dtls_cid.cid, *optlen); in tls_opt_dtls_connection_id_value_get()
1782 socklen_t *optlen) 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()
1794 *optlen = 0; in tls_opt_dtls_peer_connection_id_value_get()
1803 void *optval, socklen_t *optlen) in tls_opt_dtls_connection_id_status_get() argument
1813 if (sizeof(int) != *optlen) { in tls_opt_dtls_connection_id_status_get()
1854 socklen_t optlen) in tls_opt_dtls_handshake_on_connect_set() argument
1862 if (sizeof(int) != optlen) { in tls_opt_dtls_handshake_on_connect_set()
1873 socklen_t *optlen) in tls_opt_dtls_handshake_on_connect_get() argument
1875 if (*optlen != sizeof(int)) { in tls_opt_dtls_handshake_on_connect_get()
1886 void *optval, socklen_t *optlen) in tls_opt_alpn_list_get() argument
1896 if (*optlen % sizeof(const char *) != 0 || *optlen == 0) { in tls_opt_alpn_list_get()
1900 alpn_cnt = *optlen / sizeof(const char *); in tls_opt_alpn_list_get()
1909 *optlen = i * sizeof(const char *); in tls_opt_alpn_list_get()
1915 const void *optval, socklen_t optlen) in tls_opt_session_cache_set() argument
1923 if (sizeof(int) != optlen) { in tls_opt_session_cache_set()
1933 void *optval, socklen_t *optlen) in tls_opt_session_cache_get() argument
1939 if (*optlen != sizeof(cache_enabled)) { in tls_opt_session_cache_get()
1949 const void *optval, socklen_t optlen) in tls_opt_session_cache_purge_set() argument
1953 ARG_UNUSED(optlen); in tls_opt_session_cache_purge_set()
1961 const void *optval, socklen_t optlen) in tls_opt_peer_verify_set() argument
1969 if (optlen != sizeof(int)) { in tls_opt_peer_verify_set()
1987 const void *optval, socklen_t optlen) in tls_opt_cert_nocopy_set() argument
1995 if (optlen != sizeof(int)) { in tls_opt_cert_nocopy_set()
2012 const void *optval, socklen_t optlen) in tls_opt_dtls_role_set() argument
2020 if (optlen != sizeof(int)) { 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()
3460 if (*optlen != sizeof(int)) { 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()
3499 optlen, false); in ztls_getsockopt_ctx()
3504 optlen, true); in ztls_getsockopt_ctx()
3509 optlen); in ztls_getsockopt_ctx()
3513 err = tls_opt_dtls_connection_id_value_get(ctx, optval, optlen); in ztls_getsockopt_ctx()
3518 optlen); in ztls_getsockopt_ctx()
3522 err = tls_opt_dtls_handshake_on_connect_get(ctx, optval, optlen); in ztls_getsockopt_ctx()
3541 socklen_t optlen) in set_timeout_opt() argument
3545 if (optlen != sizeof(struct zsock_timeval)) { 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()
3621 optlen, false); in ztls_setsockopt_ctx()
3626 optlen, true); 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()