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 an 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 age of this struct this is. The  number  depends  on
57       how  new  libcurl  you're  using.  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 extra debug capabilities built-in.
94                     This is mainly of interest for libcurl hackers. (added in
95                     7.10.6)
96
97              CURL_VERSION_ASYNCHDNS
98                     libcurl was built  with  support  for  asynchronous  name
99                     lookups,  which  allows more exact timeouts (even on Win‐
100                     dows) and less blocking when using the  multi  interface.
101                     (added in 7.10.7)
102
103              CURL_VERSION_SPNEGO
104                     libcurl  was built with support for SPNEGO authentication
105                     (Simple  and  Protected  GSS-API  Negotiation  Mechanism,
106                     defined in RFC 2478.) (added in 7.10.8)
107
108              CURL_VERSION_LARGEFILE
109                     libcurl was built with support for large files. (Added in
110                     7.11.1)
111
112              CURL_VERSION_IDN
113                     libcurl was built with support  for  IDNA,  domain  names
114                     with international letters. (Added in 7.12.0)
115
116              CURL_VERSION_SSPI
117                     libcurl  was  built  with  support for SSPI. This is only
118                     available on Windows and makes libcurl  use  Windows-pro‐
119                     vided  functions  for NTLM authentication. It also allows
120                     libcurl to use the current user and  the  current  user's
121                     password  without  the app having to pass them on. (Added
122                     in 7.13.2)
123
124              CURL_VERSION_CONV
125                     libcurl was built with support for character conversions,
126                     as  provided  by the CUURLOPT_CONV_* callbacks. (Added in
127                     7.15.4)
128       ssl_version is an ascii string for the OpenSSL version used. If libcurl
129       has no SSL support, this is NULL.
130
131       ssl_version_num  is  the  numerical OpenSSL version value as defined by
132       the OpenSSL project. If libcurl has no SSL support, this is 0.
133
134       libz_version is an ascii string (there is  no  numerical  version).  If
135       libcurl has no libz support, this is NULL.
136
137       protocols  is  a pointer to an array of char * pointers, containing the
138       names protocols that libcurl supports (using  lowercase  letters).  The
139       protocol names are the same as would be used in URLs. The array is ter‐
140       minated by a NULL entry.
141

RETURN VALUE

143       A pointer to a curl_version_info_data struct.
144

SEE ALSO

146       curl_version(3)
147
148
149
150
151libcurl 7.16.1                    2 Nov 2006              curl_version_info(3)
Impressum