Sortix cross-nightly manual
This manual documents Sortix cross-nightly. You can instead view this document in the latest official manual.
| curl_version_info(3) | Library Functions Manual | curl_version_info(3) |
NAME
curl_version_info - returns runtime libcurl version infoDESCRIPTION
Returns a pointer to a filled in static struct with information about various features in the running version of libcurl. age should be set to the version of this functionality by the time you write your program. This way, libcurl always returns a proper struct that your program understands, while programs in the future might get a different struct. CURLVERSION_NOW is the most recent one for the library you have installed:data = curl_version_info(CURLVERSION_NOW);
Applications should use this information to judge if things are possible to do or not, instead of using compile-time checks, as dynamic/DLL libraries can be changed independent of applications.
typedef struct {
CURLversion age; /* see description below */
const char *version; /* human readable string */
unsigned int version_num; /* numeric representation */
const char *host; /* human readable string */
int features; /* bitmask, see below */
char *ssl_version; /* human readable string */
long ssl_version_num; /* not used, always zero */
const char *libz_version; /* human readable string */
const char *const *protocols; /* protocols */
/* when 'age' is CURLVERSION_SECOND or higher, the members below exist */
const char *ares; /* human readable string */
int ares_num; /* number */
/* when 'age' is CURLVERSION_THIRD or higher, the members below exist */
const char *libidn; /* human readable string */
/* when 'age' is CURLVERSION_FOURTH or higher (>= 7.16.1), the members
below exist */
int iconv_ver_num; /* '_libiconv_version' if iconv support enabled */
const char *libssh_version; /* human readable string */
/* when 'age' is CURLVERSION_FIFTH or higher (>= 7.57.0), the members
below exist */
unsigned int brotli_ver_num; /* Numeric Brotli version
(MAJOR << 24) | (MINOR << 12) | PATCH */
const char *brotli_version; /* human readable string. */
/* when 'age' is CURLVERSION_SIXTH or higher (>= 7.66.0), the members
below exist */
unsigned int nghttp2_ver_num; /* Numeric nghttp2 version
(MAJOR << 16) | (MINOR << 8) | PATCH */
const char *nghttp2_version; /* human readable string. */
const char *quic_version; /* human readable quic (+ HTTP/3) library +
version or NULL */
/* when 'age' is CURLVERSION_SEVENTH or higher (>= 7.70.0), the members
below exist */
const char *cainfo; /* the built-in default CURLOPT_CAINFO, might
be NULL */
const char *capath; /* the built-in default CURLOPT_CAPATH, might
be NULL */
/* when 'age' is CURLVERSION_EIGHTH or higher (>= 7.71.0), the members
below exist */
unsigned int zstd_ver_num; /* Numeric Zstd version
(MAJOR << 24) | (MINOR << 12) | PATCH */
const char *zstd_version; /* human readable string. */
/* when 'age' is CURLVERSION_NINTH or higher (>= 7.75.0), the members
below exist */
const char *hyper_version; /* human readable string. */
/* when 'age' is CURLVERSION_TENTH or higher (>= 7.77.0), the members
below exist */
const char *gsasl_version; /* human readable string. */
/* when 'age' is CURLVERSION_ELEVENTH or higher (>= 7.87.0), the members
below exist */
const char *const *feature_names; /* Feature names. */
/* when 'age' is CURLVERSION_TWELFTH or higher (>= 8.8.0), the members
below exist */
const char *const *rtmp_version; /* human readable string */
} curl_version_info_data;
FEATURES
- alt-svc
-
features mask bit: CURL_VERSION_ALTSVCHTTP Alt-Svc parsing and the associated options (Added in 7.64.1)
- AsynchDNS
-
features mask bit: CURL_VERSION_ASYNCHDNSlibcurl was built with support for asynchronous name lookups, which allows more exact timeouts (even on Windows) and less blocking when using the multi interface. (added in 7.10.7)
- brotli
-
features mask bit: CURL_VERSION_BROTLIsupports HTTP Brotli content encoding using libbrotlidec (Added in 7.57.0)
- Debug
-
features mask bit: CURL_VERSION_DEBUGlibcurl was built with debug capabilities (added in 7.10.6)
- ECH
-
features mask bit: non-existentlibcurl was built with ECH support (experimental, added in 8.8.0)
- gsasl
-
features mask bit: CURL_VERSION_GSASLlibcurl was built with libgsasl and thus with some extra SCRAM-SHA authentication methods. (added in 7.76.0)
- GSS-API
-
features mask bit: CURL_VERSION_GSSAPIlibcurl was built with support for GSS-API. This makes libcurl use provided functions for Kerberos and SPNEGO authentication. It also allows libcurl to use the current user credentials without the app having to pass them on. (Added in 7.38.0)
- HSTS
-
features mask bit: CURL_VERSION_HSTSlibcurl was built with support for HSTS (HTTP Strict Transport Security) (Added in 7.74.0)
- HTTP2
-
features mask bit: CURL_VERSION_HTTP2libcurl was built with support for HTTP2. (Added in 7.33.0)
- HTTP3
-
features mask bit: CURL_VERSION_HTTP3HTTP/3 and QUIC support are built-in (Added in 7.66.0)
- HTTPS-proxy
-
features mask bit: CURL_VERSION_HTTPS_PROXYlibcurl was built with support for HTTPS-proxy. (Added in 7.52.0)
- IDN
-
features mask bit: CURL_VERSION_IDNlibcurl was built with support for IDNA, domain names with international letters. (Added in 7.12.0)
- IPv6
-
features mask bit: CURL_VERSION_IPV6supports IPv6
- Kerberos
-
features mask bit: CURL_VERSION_KERBEROS5supports Kerberos V5 authentication for FTP, IMAP, LDAP, POP3, SMTP and SOCKSv5 proxy. (Added in 7.40.0)
- Largefile
-
features mask bit: CURL_VERSION_LARGEFILElibcurl was built with support for large files. (Added in 7.11.1)
- libz
-
features mask bit: CURL_VERSION_LIBZsupports HTTP deflate using libz (Added in 7.10)
- MultiSSL
-
features mask bit: CURL_VERSION_MULTI_SSLlibcurl was built with multiple SSL backends. For details, see curl_global_sslset(3). (Added in 7.56.0)
- NTLM
-
features mask bit: CURL_VERSION_NTLMsupports HTTP NTLM (added in 7.10.6)
- NTLM_WB
-
features mask bit: CURL_VERSION_NTLM_WBlibcurl was built with support for NTLM delegation to a winbind helper. (Added in 7.22.0) This feature was removed from curl in 8.8.0.
- PSL
-
features mask bit: CURL_VERSION_PSLlibcurl was built with support for Mozilla's Public Suffix List. This makes libcurl ignore cookies with a domain that is on the list. (Added in 7.47.0)
- SPNEGO
-
features mask bit: CURL_VERSION_SPNEGOlibcurl was built with support for SPNEGO authentication (Simple and Protected GSS-API Negotiation Mechanism, defined in RFC 2478.) (added in 7.10.8)
- SSL
-
features mask bit: CURL_VERSION_SSLsupports SSL (HTTPS/FTPS) (Added in 7.10)
- SSPI
-
features mask bit: CURL_VERSION_SSPIlibcurl was built with support for SSPI. This is only available on Windows and makes libcurl use Windows-provided functions for Kerberos, NTLM, SPNEGO and Digest authentication. It also allows libcurl to use the current user credentials without the app having to pass them on. (Added in 7.13.2)
- threadsafe
-
features mask bit: CURL_VERSION_THREADSAFElibcurl was built with thread-safety support (Atomic or SRWLOCK) to protect curl initialization. (Added in 7.84.0) See libcurl-thread(3)
- TLS-SRP
-
features mask bit: CURL_VERSION_TLSAUTH_SRPlibcurl was built with support for TLS-SRP (in one or more of the built-in TLS backends). (Added in 7.21.4)
- TrackMemory
-
features mask bit: CURL_VERSION_CURLDEBUGlibcurl was built with memory tracking debug capabilities. This is mainly of interest for libcurl hackers. (added in 7.19.6)
- Unicode
-
features mask bit: CURL_VERSION_UNICODElibcurl was built with Unicode support on Windows. This makes non-ASCII characters work in filenames and options passed to libcurl. (Added in 7.72.0)
- UnixSockets
-
features mask bit: CURL_VERSION_UNIX_SOCKETSlibcurl was built with support for Unix domain sockets. (Added in 7.40.0)
- zstd
-
features mask bit: CURL_VERSION_ZSTDsupports HTTP zstd content encoding using zstd library (Added in 7.72.0)
- no name
-
features mask bit: CURL_VERSION_CONVlibcurl was built with support for character conversions, as provided by the CURLOPT_CONV_* callbacks. Always 0 since 7.82.0. (Added in 7.15.4, deprecated.)
- no name
-
features mask bit: CURL_VERSION_GSSNEGOTIATEsupports HTTP GSS-Negotiate (added in 7.10.6, deprecated in 7.38.0)
- no name
-
features mask bit: CURL_VERSION_KERBEROS4supports Kerberos V4 (when using FTP). Legacy bit. Deprecated since 7.33.0.
PROTOCOLS
This functionality affects all supported protocolsEXAMPLE
int main(void)
{
curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
printf("libcurl version %u.%u.%u\n",
(ver->version_num >> 16) & 0xff,
(ver->version_num >> 8) & 0xff,
ver->version_num & 0xff);
}
AVAILABILITY
Added in curl 7.10.0RETURN VALUE
A pointer to a curl_version_info_data struct.SEE ALSO
curl_version(3)| 2025-10-24 | libcurl |