1 .\" **************************************************************************
3 .\" * Project ___| | | | _ \| |
4 .\" * / __| | | | |_) | |
5 .\" * | (__| |_| | _ <| |___
6 .\" * \___|\___/|_| \_\_____|
8 .\" * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
10 .\" * This software is licensed as described in the file COPYING, which
11 .\" * you should have received as part of this distribution. The terms
12 .\" * are also available at http://curl.haxx.se/docs/copyright.html.
14 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 .\" * copies of the Software, and permit persons to whom the Software is
16 .\" * furnished to do so, under the terms of the COPYING file.
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
21 .\" * $Id: curl_version_info.3,v 1.1.1.1 2008-09-23 16:32:05 hoffman Exp $
22 .\" **************************************************************************
24 .TH curl_version_info 3 "2 Nov 2006" "libcurl 7.16.1" "libcurl Manual"
26 curl_version_info - returns run-time libcurl version info
28 .B #include <curl/curl.h>
30 .BI "curl_version_info_data *curl_version_info( CURLversion "type ");"
33 Returns a pointer to a filled in struct with information about various
34 run-time features in libcurl. \fItype\fP should be set to the version of this
35 functionality by the time you write your program. This way, libcurl will
36 always return a proper struct that your program understands, while programs in
37 the future might get an different struct. CURLVERSION_NOW will be the most
38 recent one for the library you have installed:
40 data = curl_version_info(CURLVERSION_NOW);
42 Applications should use this information to judge if things are possible to do
43 or not, instead of using compile-time checks, as dynamic/DLL libraries can be
44 changed independent of applications.
46 The curl_version_info_data struct looks like this
50 CURLversion age; /* see description below */
52 /* when 'age' is 0 or higher, the members below also exist: */
53 const char *version; /* human readable string */
54 unsigned int version_num; /* numeric representation */
55 const char *host; /* human readable string */
56 int features; /* bitmask, see below */
57 char *ssl_version; /* human readable string */
58 long ssl_version_num; /* not used, always zero */
59 const char *libz_version; /* human readable string */
60 const char **protocols; /* list of protocols */
62 /* when 'age' is 1 or higher, the members below also exist: */
63 const char *ares; /* human readable string */
64 int ares_num; /* number */
66 /* when 'age' is 2 or higher, the member below also exists: */
67 const char *libidn; /* human readable string */
69 /* when 'age' is 3 or higher, the members below also exist: */
70 int iconv_ver_num; /* '_libiconv_version' if iconv support enabled */
72 const char *libssh_version; /* human readable string */
74 } curl_version_info_data;
77 \fIage\fP describes what age of this struct this is. The number depends on how
78 new libcurl you're using. You are however guaranteed to get a struct that you
79 have a matching struct for in the header, as you tell libcurl your "age" with
82 \fIversion\fP is just an ascii string for the libcurl version.
84 \fIversion_num\fP is a 24 bit number created like this: <8 bits major number>
85 | <8 bits minor number> | <8 bits patch number>. Version 7.9.8 is therefore
88 \fIhost\fP is an ascii string showing what host information that this libcurl
89 was built for. As discovered by a configure script or set by the build
92 \fIfeatures\fP can have none, one or more bits set, and the currently defined
97 .IP CURL_VERSION_KERBEROS4
98 supports kerberos4 (when using FTP)
100 supports SSL (HTTPS/FTPS) (Added in 7.10)
101 .IP CURL_VERSION_LIBZ
102 supports HTTP deflate using libz (Added in 7.10)
103 .IP CURL_VERSION_NTLM
104 supports HTTP NTLM (added in 7.10.6)
105 .IP CURL_VERSION_GSSNEGOTIATE
106 supports HTTP GSS-Negotiate (added in 7.10.6)
107 .IP CURL_VERSION_DEBUG
108 libcurl was built with extra debug capabilities built-in. This is mainly of
109 interest for libcurl hackers. (added in 7.10.6)
110 .IP CURL_VERSION_ASYNCHDNS
111 libcurl was built with support for asynchronous name lookups, which allows
112 more exact timeouts (even on Windows) and less blocking when using the multi
113 interface. (added in 7.10.7)
114 .IP CURL_VERSION_SPNEGO
115 libcurl was built with support for SPNEGO authentication (Simple and Protected
116 GSS-API Negotiation Mechanism, defined in RFC 2478.) (added in 7.10.8)
117 .IP CURL_VERSION_LARGEFILE
118 libcurl was built with support for large files. (Added in 7.11.1)
120 libcurl was built with support for IDNA, domain names with international
121 letters. (Added in 7.12.0)
122 .IP CURL_VERSION_SSPI
123 libcurl was built with support for SSPI. This is only available on Windows and
124 makes libcurl use Windows-provided functions for NTLM authentication. It also
125 allows libcurl to use the current user and the current user's password without
126 the app having to pass them on. (Added in 7.13.2)
127 .IP CURL_VERSION_CONV
128 libcurl was built with support for character conversions, as provided by the
129 CUURLOPT_CONV_* callbacks. (Added in 7.15.4)
131 \fIssl_version\fP is an ascii string for the OpenSSL version used. If libcurl
132 has no SSL support, this is NULL.
134 \fIssl_version_num\fP is the numerical OpenSSL version value as defined by the
135 OpenSSL project. If libcurl has no SSL support, this is 0.
137 \fIlibz_version\fP is an ascii string (there is no numerical version). If
138 libcurl has no libz support, this is NULL.
140 \fIprotocols\fP is a pointer to an array of char * pointers, containing the
141 names protocols that libcurl supports (using lowercase letters). The protocol
142 names are the same as would be used in URLs. The array is terminated by a NULL
145 A pointer to a curl_version_info_data struct.
147 \fIcurl_version(3)\fP