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