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 /* when 'age is CURLVERSION_SIXTH or alter (7.66.0 or later), these fields
63 also exist */
64 unsigned int nghttp2_ver_num; /* Numeric nghttp2 version
65 (MAJOR << 16) | (MINOR << 8) | PATCH */
66 const char *nghttp2_version; /* human readable string. */
67
68 const char *quic_version; /* human readable quic (+ HTTP/3) library +
69 version or NULL */
70
71 } curl_version_info_data;
72
73 age describes what the age of this struct is. The number depends on how
74 new the libcurl you're using is. You are however guaranteed to get a
75 struct that you have a matching struct for in the header, as you tell
76 libcurl your "age" with the input argument.
77
78 version is just an ascii string for the libcurl version.
79
80 version_num is a 24 bit number created like this: <8 bits major number>
81 | <8 bits minor number> | <8 bits patch number>. Version 7.9.8 is
82 therefore returned as 0x070908.
83
84 host is an ascii string showing what host information that this libcurl
85 was built for. As discovered by a configure script or set by the build
86 environment.
87
88 features can have none, one or more bits set, and the currently defined
89 bits are:
90
91 CURL_VERSION_ALTSVC
92 HTTP Alt-Svc parsing and the associated options (Added in
93 7.64.1)
94
95 CURL_VERSION_ASYNCHDNS
96 libcurl was built with support for asynchronous name
97 lookups, which allows more exact timeouts (even on Win‐
98 dows) and less blocking when using the multi interface.
99 (added in 7.10.7)
100
101 CURL_VERSION_BROTLI
102 supports HTTP Brotli content encoding using libbrotlidec
103 (Added in 7.57.0)
104
105 CURL_VERSION_CONV
106 libcurl was built with support for character conversions,
107 as provided by the CURLOPT_CONV_* callbacks. (Added in
108 7.15.4)
109
110 CURL_VERSION_CURLDEBUG
111 libcurl was built with memory tracking debug capabili‐
112 ties. This is mainly of interest for libcurl hackers.
113 (added in 7.19.6)
114
115 CURL_VERSION_DEBUG
116 libcurl was built with debug capabilities (added in
117 7.10.6)
118
119 CURL_VERSION_GSSAPI
120 libcurl was built with support for GSS-API. This makes
121 libcurl use provided functions for Kerberos and SPNEGO
122 authentication. It also allows libcurl to use the current
123 user credentials without the app having to pass them on.
124 (Added in 7.38.0)
125
126 CURL_VERSION_GSSNEGOTIATE
127 supports HTTP GSS-Negotiate (added in 7.10.6)
128
129 CURL_VERSION_HTTPS_PROXY
130 libcurl was built with support for HTTPS-proxy. (Added
131 in 7.52.0)
132
133 CURL_VERSION_HTTP2
134 libcurl was built with support for HTTP2. (Added in
135 7.33.0)
136
137 CURL_VERSION_HTTP3
138 HTTP/3 and QUIC support are built-in (Added in 7.66.0)
139
140 CURL_VERSION_IDN
141 libcurl was built with support for IDNA, domain names
142 with international letters. (Added in 7.12.0)
143
144 CURL_VERSION_IPV6
145 supports IPv6
146
147 CURL_VERSION_KERBEROS4
148 supports Kerberos V4 (when using FTP)
149
150 CURL_VERSION_KERBEROS5
151 supports Kerberos V5 authentication for FTP, IMAP, POP3,
152 SMTP and SOCKSv5 proxy (Added in 7.40.0)
153
154 CURL_VERSION_LARGEFILE
155 libcurl was built with support for large files. (Added in
156 7.11.1)
157
158 CURL_VERSION_LIBZ
159 supports HTTP deflate using libz (Added in 7.10)
160
161 CURL_VERSION_MULTI_SSL
162 libcurl was built with multiple SSL backends. For
163 details, see curl_global_sslset(3). (Added in 7.56.0)
164
165 CURL_VERSION_NTLM
166 supports HTTP NTLM (added in 7.10.6)
167
168 CURL_VERSION_NTLM_WB
169 libcurl was built with support for NTLM delegation to a
170 winbind helper. (Added in 7.22.0)
171
172 CURL_VERSION_PSL
173 libcurl was built with support for Mozilla's Public Suf‐
174 fix List. This makes libcurl ignore cookies with a domain
175 that's on the list. (Added in 7.47.0)
176
177 CURL_VERSION_SPNEGO
178 libcurl was built with support for SPNEGO authentication
179 (Simple and Protected GSS-API Negotiation Mechanism,
180 defined in RFC 2478.) (added in 7.10.8)
181
182 CURL_VERSION_SSL
183 supports SSL (HTTPS/FTPS) (Added in 7.10)
184
185 CURL_VERSION_SSPI
186 libcurl was built with support for SSPI. This is only
187 available on Windows and makes libcurl use Windows-pro‐
188 vided functions for Kerberos, NTLM, SPNEGO and Digest
189 authentication. It also allows libcurl to use the current
190 user credentials without the app having to pass them on.
191 (Added in 7.13.2)
192
193 CURL_VERSION_TLSAUTH_SRP
194 libcurl was built with support for TLS-SRP. (Added in
195 7.21.4)
196
197 CURL_VERSION_UNIX_SOCKETS
198 libcurl was built with support for Unix domain sockets.
199 (Added in 7.40.0)
200 ssl_version is an ASCII string for the TLS library name + version used.
201 If libcurl has no SSL support, this is NULL. For example "Schannel",
202 "SecureTransport" or "OpenSSL/1.1.0g".
203
204 ssl_version_num is always 0.
205
206 libz_version is an ASCII string (there is no numerical version). If
207 libcurl has no libz support, this is NULL.
208
209 protocols is a pointer to an array of char * pointers, containing the
210 names protocols that libcurl supports (using lowercase letters). The
211 protocol names are the same as would be used in URLs. The array is ter‐
212 minated by a NULL entry.
213
215 A pointer to a curl_version_info_data struct.
216
218 curl_version(3)
219
220
221
222libcurl 7.66.0 August 13, 2019 curl_version_info(3)