1curl_version_info(3) libcurl Manual curl_version_info(3)
2
3
4
6 curl_version_info - returns run-time libcurl version info
7
9 #include <curl/curl.h>
10
11 curl_version_info_data *curl_version_info( CURLversion age);
12
14 Returns a pointer to a filled in static struct with information about
15 various features in the running version of libcurl. age should be set
16 to the version of this functionality by the time you write your pro‐
17 gram. This way, libcurl will always return a proper struct that your
18 program understands, while programs in the future might get a different
19 struct. CURLVERSION_NOW will be the most recent one for the library you
20 have installed:
21
22 data = curl_version_info(CURLVERSION_NOW);
23
24 Applications should use this information to judge if things are possi‐
25 ble to do or not, instead of using compile-time checks, as dynamic/DLL
26 libraries can be changed independent of applications.
27
28 The curl_version_info_data struct looks like this
29
30 typedef struct {
31 CURLversion age; /* see description below */
32
33 /* when 'age' is 0 or higher, the members below also exist: */
34 const char *version; /* human readable string */
35 unsigned int version_num; /* numeric representation */
36 const char *host; /* human readable string */
37 int features; /* bitmask, see below */
38 char *ssl_version; /* human readable string */
39 long ssl_version_num; /* not used, always zero */
40 const char *libz_version; /* human readable string */
41 const char * const *protocols; /* protocols */
42
43 /* when 'age' is 1 or higher, the members below also exist: */
44 const char *ares; /* human readable string */
45 int ares_num; /* number */
46
47 /* when 'age' is 2 or higher, the member below also exists: */
48 const char *libidn; /* human readable string */
49
50 /* when 'age' is 3 or higher (7.16.1 or later), the members below also
51 exist */
52 int iconv_ver_num; /* '_libiconv_version' if iconv support enabled */
53
54 const char *libssh_version; /* human readable string */
55
56 /* when 'age' is 4 or higher (7.57.0 or later), the members below also
57 exist */
58 unsigned int brotli_ver_num; /* Numeric Brotli version
59 (MAJOR << 24) | (MINOR << 12) | PATCH */
60 const char *brotli_version; /* human readable string. */
61
62 } curl_version_info_data;
63
64 age describes what the age of this struct is. The number depends on how
65 new the libcurl you're using is. You are however guaranteed to get a
66 struct that you have a matching struct for in the header, as you tell
67 libcurl your "age" with the input argument.
68
69 version is just an ascii string for the libcurl version.
70
71 version_num is a 24 bit number created like this: <8 bits major number>
72 | <8 bits minor number> | <8 bits patch number>. Version 7.9.8 is
73 therefore returned as 0x070908.
74
75 host is an ascii string showing what host information that this libcurl
76 was built for. As discovered by a configure script or set by the build
77 environment.
78
79 features can have none, one or more bits set, and the currently defined
80 bits are:
81
82 CURL_VERSION_IPV6
83 supports IPv6
84
85 CURL_VERSION_KERBEROS4
86 supports Kerberos V4 (when using FTP)
87
88 CURL_VERSION_KERBEROS5
89 supports Kerberos V5 authentication for FTP, IMAP, POP3,
90 SMTP and SOCKSv5 proxy (Added in 7.40.0)
91
92 CURL_VERSION_SSL
93 supports SSL (HTTPS/FTPS) (Added in 7.10)
94
95 CURL_VERSION_LIBZ
96 supports HTTP deflate using libz (Added in 7.10)
97
98 CURL_VERSION_NTLM
99 supports HTTP NTLM (added in 7.10.6)
100
101 CURL_VERSION_GSSNEGOTIATE
102 supports HTTP GSS-Negotiate (added in 7.10.6)
103
104 CURL_VERSION_DEBUG
105 libcurl was built with debug capabilities (added in
106 7.10.6)
107
108 CURL_VERSION_CURLDEBUG
109 libcurl was built with memory tracking debug capabili‐
110 ties. This is mainly of interest for libcurl hackers.
111 (added in 7.19.6)
112
113 CURL_VERSION_ASYNCHDNS
114 libcurl was built with support for asynchronous name
115 lookups, which allows more exact timeouts (even on Win‐
116 dows) and less blocking when using the multi interface.
117 (added in 7.10.7)
118
119 CURL_VERSION_SPNEGO
120 libcurl was built with support for SPNEGO authentication
121 (Simple and Protected GSS-API Negotiation Mechanism,
122 defined in RFC 2478.) (added in 7.10.8)
123
124 CURL_VERSION_LARGEFILE
125 libcurl was built with support for large files. (Added in
126 7.11.1)
127
128 CURL_VERSION_IDN
129 libcurl was built with support for IDNA, domain names
130 with international letters. (Added in 7.12.0)
131
132 CURL_VERSION_SSPI
133 libcurl was built with support for SSPI. This is only
134 available on Windows and makes libcurl use Windows-pro‐
135 vided functions for Kerberos, NTLM, SPNEGO and Digest
136 authentication. It also allows libcurl to use the current
137 user credentials without the app having to pass them on.
138 (Added in 7.13.2)
139
140 CURL_VERSION_GSSAPI
141 libcurl was built with support for GSS-API. This makes
142 libcurl use provided functions for Kerberos and SPNEGO
143 authentication. It also allows libcurl to use the current
144 user credentials without the app having to pass them on.
145 (Added in 7.38.0)
146
147 CURL_VERSION_CONV
148 libcurl was built with support for character conversions,
149 as provided by the CURLOPT_CONV_* callbacks. (Added in
150 7.15.4)
151
152 CURL_VERSION_TLSAUTH_SRP
153 libcurl was built with support for TLS-SRP. (Added in
154 7.21.4)
155
156 CURL_VERSION_NTLM_WB
157 libcurl was built with support for NTLM delegation to a
158 winbind helper. (Added in 7.22.0)
159
160 CURL_VERSION_HTTP2
161 libcurl was built with support for HTTP2. (Added in
162 7.33.0)
163
164 CURL_VERSION_UNIX_SOCKETS
165 libcurl was built with support for Unix domain sockets.
166 (Added in 7.40.0)
167
168 CURL_VERSION_PSL
169 libcurl was built with support for Mozilla's Public Suf‐
170 fix List. This makes libcurl ignore cookies with a domain
171 that's on the list. (Added in 7.47.0)
172
173 CURL_VERSION_HTTPS_PROXY
174 libcurl was built with support for HTTPS-proxy. (Added
175 in 7.52.0)
176
177 CURL_VERSION_MULTI_SSL
178 libcurl was built with multiple SSL backends. For
179 details, see curl_global_sslset(3). (Added in 7.56.0)
180
181 CURL_VERSION_BROTLI
182 supports HTTP Brotli content encoding using libbrotlidec
183 (Added in 7.57.0)
184 ssl_version is an ASCII string for the TLS library name + version used.
185 If libcurl has no SSL support, this is NULL. For example "Schannel",
186 "SecureTransport" or "OpenSSL/1.1.0g".
187
188 ssl_version_num is always 0.
189
190 libz_version is an ASCII string (there is no numerical version). If
191 libcurl has no libz support, this is NULL.
192
193 protocols is a pointer to an array of char * pointers, containing the
194 names protocols that libcurl supports (using lowercase letters). The
195 protocol names are the same as would be used in URLs. The array is ter‐
196 minated by a NULL entry.
197
199 A pointer to a curl_version_info_data struct.
200
202 curl_version(3)
203
204
205
206libcurl 7.64.0 January 29, 2019 curl_version_info(3)