1curl_version_info(3)            libcurl Manual            curl_version_info(3)
2
3
4

NAME

6       curl_version_info - returns run-time libcurl version info
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       curl_version_info_data *curl_version_info( CURLversion type);
12

DESCRIPTION

14       Returns  a pointer to a filled in struct with information about various
15       run-time features in libcurl. type should be set to the version of this
16       functionality  by  the  time  you write your program. This way, libcurl
17       will always return a proper struct that your program understands, while
18       programs  in  the  future might get a different struct. CURLVERSION_NOW
19       will be the most recent one for the library you have installed:
20
21               data = curl_version_info(CURLVERSION_NOW);
22
23       Applications should use this information to judge if things are  possi‐
24       ble  to do or not, instead of using compile-time checks, as dynamic/DLL
25       libraries can be changed independent of applications.
26
27       The curl_version_info_data struct looks like this
28
29       typedef struct {
30         CURLversion age;          /* see description below */
31
32         /* when 'age' is 0 or higher, the members below also exist: */
33         const char *version;      /* human readable string */
34         unsigned int version_num; /* numeric representation */
35         const char *host;         /* human readable string */
36         int features;             /* bitmask, see below */
37         char *ssl_version;        /* human readable string */
38         long ssl_version_num;     /* not used, always zero */
39         const char *libz_version; /* human readable string */
40         const char **protocols;   /* list of protocols */
41
42         /* when 'age' is 1 or higher, the members below also exist: */
43         const char *ares;         /* human readable string */
44         int ares_num;             /* number */
45
46         /* when 'age' is 2 or higher, the member below also exists: */
47         const char *libidn;       /* human readable string */
48
49         /* when 'age' is 3 or higher, the members below also exist: */
50         int iconv_ver_num;       /* '_libiconv_version' if iconv support enabled */
51
52         const char *libssh_version; /* human readable string */
53
54       } curl_version_info_data;
55
56       age describes what the age of this struct is. The number depends on how
57       new  the  libcurl  you're using is. You are however guaranteed to get a
58       struct that you have a matching struct for in the header, as  you  tell
59       libcurl your "age" with the input argument.
60
61       version is just an ascii string for the libcurl version.
62
63       version_num is a 24 bit number created like this: <8 bits major number>
64       | <8 bits minor number> | <8  bits  patch  number>.  Version  7.9.8  is
65       therefore returned as 0x070908.
66
67       host is an ascii string showing what host information that this libcurl
68       was built for. As discovered by a configure script or set by the  build
69       environment.
70
71       features can have none, one or more bits set, and the currently defined
72       bits are:
73
74              CURL_VERSION_IPV6
75                     supports IPv6
76
77              CURL_VERSION_KERBEROS4
78                     supports kerberos4 (when using FTP)
79
80              CURL_VERSION_SSL
81                     supports SSL (HTTPS/FTPS) (Added in 7.10)
82
83              CURL_VERSION_LIBZ
84                     supports HTTP deflate using libz (Added in 7.10)
85
86              CURL_VERSION_NTLM
87                     supports HTTP NTLM (added in 7.10.6)
88
89              CURL_VERSION_GSSNEGOTIATE
90                     supports HTTP GSS-Negotiate (added in 7.10.6)
91
92              CURL_VERSION_DEBUG
93                     libcurl was  built  with  debug  capabilities  (added  in
94                     7.10.6)
95
96              CURL_VERSION_CURLDEBUG
97                     libcurl  was  built  with memory tracking debug capabili‐
98                     ties. This is mainly of  interest  for  libcurl  hackers.
99                     (added in 7.19.6)
100
101              CURL_VERSION_ASYNCHDNS
102                     libcurl  was  built  with  support  for asynchronous name
103                     lookups, which allows more exact timeouts (even  on  Win‐
104                     dows)  and  less blocking when using the multi interface.
105                     (added in 7.10.7)
106
107              CURL_VERSION_SPNEGO
108                     libcurl was built with support for SPNEGO  authentication
109                     (Simple  and  Protected  GSS-API  Negotiation  Mechanism,
110                     defined in RFC 2478.) (added in 7.10.8)
111
112              CURL_VERSION_LARGEFILE
113                     libcurl was built with support for large files. (Added in
114                     7.11.1)
115
116              CURL_VERSION_IDN
117                     libcurl  was  built  with  support for IDNA, domain names
118                     with international letters. (Added in 7.12.0)
119
120              CURL_VERSION_SSPI
121                     libcurl was built with support for  SSPI.  This  is  only
122                     available  on  Windows and makes libcurl use Windows-pro‐
123                     vided functions for NTLM authentication. It  also  allows
124                     libcurl  to  use  the current user and the current user's
125                     password without the app having to pass them  on.  (Added
126                     in 7.13.2)
127
128              CURL_VERSION_CONV
129                     libcurl was built with support for character conversions,
130                     as provided by the CURLOPT_CONV_*  callbacks.  (Added  in
131                     7.15.4)
132
133              CURL_VERSION_TLSAUTH_SRP
134                     libcurl  was  built  with  support for TLS-SRP. (Added in
135                     7.21.4)
136
137              CURL_VERSION_NTLM_WB
138                     libcurl was built with support for NTLM delegation  to  a
139                     winbind helper.  (Added in 7.22.0)
140
141              CURL_VERSION_UNIX_SOCKETS
142                     libcurl was built with support for UNIX domain sockets.
143       ssl_version is an ASCII string for the OpenSSL version used. If libcurl
144       has no SSL support, this is NULL.
145
146       ssl_version_num is the numerical OpenSSL version value  as  defined  by
147       the OpenSSL project. If libcurl has no SSL support, this is 0.
148
149       libz_version  is  an  ASCII  string (there is no numerical version). If
150       libcurl has no libz support, this is NULL.
151
152       protocols is a pointer to an array of char * pointers,  containing  the
153       names  protocols  that  libcurl supports (using lowercase letters). The
154       protocol names are the same as would be used in URLs. The array is ter‐
155       minated by a NULL entry.
156

RETURN VALUE

158       A pointer to a curl_version_info_data struct.
159

SEE ALSO

161       curl_version(3)
162
163
164
165
166libcurl 7.19.6                   10 June 2009             curl_version_info(3)
Impressum