Revert "Update to 7.40.1"
[platform/upstream/curl.git] / docs / libcurl / curl_version_info.3
1 .\" **************************************************************************
2 .\" *                                  _   _ ____  _
3 .\" *  Project                     ___| | | |  _ \| |
4 .\" *                             / __| | | | |_) | |
5 .\" *                            | (__| |_| |  _ <| |___
6 .\" *                             \___|\___/|_| \_\_____|
7 .\" *
8 .\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
9 .\" *
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.
13 .\" *
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.
17 .\" *
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
20 .\" *
21 .\" **************************************************************************
22 .\"
23 .TH curl_version_info 3 "18 Feb 2014" "libcurl 7.33.0" "libcurl Manual"
24 .SH NAME
25 curl_version_info - returns run-time libcurl version info
26 .SH SYNOPSIS
27 .B #include <curl/curl.h>
28 .sp
29 .BI "curl_version_info_data *curl_version_info( CURLversion "type ");"
30 .ad
31 .SH DESCRIPTION
32 Returns a pointer to a filled in static struct with information about various
33 features in the running version of libcurl. \fItype\fP should be set to the
34 version of this functionality by the time you write your program. This way,
35 libcurl will always return a proper struct that your program understands,
36 while programs in the future might get a different
37 struct. \fBCURLVERSION_NOW\fP will be the most recent one for the library you
38 have installed:
39
40         data = curl_version_info(CURLVERSION_NOW);
41
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.
45
46 The curl_version_info_data struct looks like this
47
48 .nf
49 typedef struct {
50   CURLversion age;          /* see description below */
51
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 */
61
62   /* when 'age' is 1 or higher, the members below also exist: */
63   const char *ares;         /* human readable string */
64   int ares_num;             /* number */
65
66   /* when 'age' is 2 or higher, the member below also exists: */
67   const char *libidn;       /* human readable string */
68
69   /* when 'age' is 3 or higher (7.16.1 or later), the members below also
70      exist  */
71   int iconv_ver_num;       /* '_libiconv_version' if iconv support enabled */
72
73   const char *libssh_version; /* human readable string */
74
75 } curl_version_info_data;
76 .fi
77
78 \fIage\fP describes what the age of this struct is. The number depends on how
79 new the libcurl you're using is. You are however guaranteed to get a struct that you
80 have a matching struct for in the header, as you tell libcurl your "age" with
81 the input argument.
82
83 \fIversion\fP is just an ascii string for the libcurl version.
84
85 \fIversion_num\fP is a 24 bit number created like this: <8 bits major number>
86 | <8 bits minor number> | <8 bits patch number>. Version 7.9.8 is therefore
87 returned as 0x070908.
88
89 \fIhost\fP is an ascii string showing what host information that this libcurl
90 was built for. As discovered by a configure script or set by the build
91 environment.
92
93 \fIfeatures\fP can have none, one or more bits set, and the currently defined
94 bits are:
95 .RS
96 .IP CURL_VERSION_IPV6
97 supports IPv6
98 .IP CURL_VERSION_KERBEROS4
99 supports kerberos4 (when using FTP)
100 .IP CURL_VERSION_SSL
101 supports SSL (HTTPS/FTPS) (Added in 7.10)
102 .IP CURL_VERSION_LIBZ
103 supports HTTP deflate using libz (Added in 7.10)
104 .IP CURL_VERSION_NTLM
105 supports HTTP NTLM (added in 7.10.6)
106 .IP CURL_VERSION_GSSNEGOTIATE
107 supports HTTP GSS-Negotiate (added in 7.10.6)
108 .IP CURL_VERSION_DEBUG
109 libcurl was built with debug capabilities (added in 7.10.6)
110 .IP CURL_VERSION_CURLDEBUG
111 libcurl was built with memory tracking debug capabilities. This is mainly of
112 interest for libcurl hackers. (added in 7.19.6)
113 .IP CURL_VERSION_ASYNCHDNS
114 libcurl was built with support for asynchronous name lookups, which allows
115 more exact timeouts (even on Windows) and less blocking when using the multi
116 interface. (added in 7.10.7)
117 .IP CURL_VERSION_SPNEGO
118 libcurl was built with support for SPNEGO authentication (Simple and Protected
119 GSS-API Negotiation Mechanism, defined in RFC 2478.) (added in 7.10.8)
120 .IP CURL_VERSION_LARGEFILE
121 libcurl was built with support for large files. (Added in 7.11.1)
122 .IP CURL_VERSION_IDN
123 libcurl was built with support for IDNA, domain names with international
124 letters. (Added in 7.12.0)
125 .IP CURL_VERSION_SSPI
126 libcurl was built with support for SSPI. This is only available on Windows and
127 makes libcurl use Windows-provided functions for NTLM authentication. It also
128 allows libcurl to use the current user and the current user's password without
129 the app having to pass them on. (Added in 7.13.2)
130 .IP CURL_VERSION_CONV
131 libcurl was built with support for character conversions, as provided by the
132 CURLOPT_CONV_* callbacks. (Added in 7.15.4)
133 .IP CURL_VERSION_TLSAUTH_SRP
134 libcurl was built with support for TLS-SRP. (Added in 7.21.4)
135 .IP CURL_VERSION_NTLM_WB
136 libcurl was built with support for NTLM delegation to a winbind helper.
137 (Added in 7.22.0)
138 .IP CURL_VERSION_HTTP2
139 libcurl was built with support for HTTP2.
140 (Added in 7.33.0)
141 .RE
142 \fIssl_version\fP is an ASCII string for the OpenSSL version used. If libcurl
143 has no SSL support, this is NULL.
144
145 \fIssl_version_num\fP is the numerical OpenSSL version value as defined by the
146 OpenSSL project. If libcurl has no SSL support, this is 0.
147
148 \fIlibz_version\fP is an ASCII string (there is no numerical version). If
149 libcurl has no libz support, this is NULL.
150
151 \fIprotocols\fP is a pointer to an array of char * pointers, containing the
152 names protocols that libcurl supports (using lowercase letters). The protocol
153 names are the same as would be used in URLs. The array is terminated by a NULL
154 entry.
155 .SH RETURN VALUE
156 A pointer to a curl_version_info_data struct.
157 .SH "SEE ALSO"
158 \fIcurl_version(3)\fP
159