793fc2ac7f44fbeda4069bcaaf03d68d802f2854
[platform/upstream/curl.git] / docs / libcurl / curl_version_info.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2  "http://www.w3.org/TR/html4/loose.dtd">
3 <html><head>
4 <title>curl_version_info man page</title>
5 <meta name="generator" content="roffit">
6 <STYLE type="text/css">
7 P.level0 {
8  padding-left: 2em;
9 }
10
11 P.level1 {
12  padding-left: 4em;
13 }
14
15 P.level2 {
16  padding-left: 6em;
17 }
18
19 span.emphasis {
20  font-style: italic;
21 }
22
23 span.bold {
24  font-weight: bold;
25 }
26
27 span.manpage {
28  font-weight: bold;
29 }
30
31 h2.nroffsh {
32  background-color: #e0e0e0;
33 }
34
35 span.nroffip {
36  font-weight: bold;
37  font-size: 120%;
38  font-family: monospace;
39 }
40
41 p.roffit {
42  text-align: center;
43  font-size: 80%;
44 }
45 </STYLE>
46 </head><body>
47
48 <p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
49 <p class="level0">curl_version_info - returns run-time libcurl version info <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
50 <p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span> 
51 <p class="level0"><span Class="bold">curl_version_info_data *curl_version_info( CURLversion type );</span> 
52 <p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
53 <p class="level0">Returns a pointer to a filled in static struct with information about various features in the running version of libcurl. <span Class="emphasis">type</span> should be set to the version of this functionality by the time you write your program. This way, libcurl will always return a proper struct that your program understands, while programs in the future might get a different struct. <span Class="bold">CURLVERSION_NOW</span> will be the most recent one for the library you have installed: 
54 <p class="level0">&nbsp;       data = curl_version_info(CURLVERSION_NOW); 
55 <p class="level0">Applications should use this information to judge if things are possible to do or not, instead of using compile-time checks, as dynamic/DLL libraries can be changed independent of applications. 
56 <p class="level0">The curl_version_info_data struct looks like this 
57 <p class="level0"><pre>
58 <p class="level0">typedef struct {
59  &nbsp; CURLversion age;          /* see description below */
60  <p class="level0">&nbsp; /* when 'age' is 0 or higher, the members below also exist: */
61  &nbsp; const char *version;      /* human readable string */
62  &nbsp; unsigned int version_num; /* numeric representation */
63  &nbsp; const char *host;         /* human readable string */
64  &nbsp; int features;             /* bitmask, see below */
65  &nbsp; char *ssl_version;        /* human readable string */
66  &nbsp; long ssl_version_num;     /* not used, always zero */
67  &nbsp; const char *libz_version; /* human readable string */
68  &nbsp; const char **protocols;   /* list of protocols */
69  <p class="level0">&nbsp; /* when 'age' is 1 or higher, the members below also exist: */
70  &nbsp; const char *ares;         /* human readable string */
71  &nbsp; int ares_num;             /* number */
72  <p class="level0">&nbsp; /* when 'age' is 2 or higher, the member below also exists: */
73  &nbsp; const char *libidn;       /* human readable string */
74  <p class="level0">&nbsp; /* when 'age' is 3 or higher (7.16.1 or later), the members below also
75  &nbsp;    exist  */
76  &nbsp; int iconv_ver_num;       /* '_libiconv_version' if iconv support enabled */
77  <p class="level0">&nbsp; const char *libssh_version; /* human readable string */
78  <p class="level0">} curl_version_info_data;
79  </pre>
80
81 <p class="level0">
82 <p class="level0"><span Class="emphasis">age</span> describes what the age of this struct is. The number depends on how new the libcurl you're using is. You are however guaranteed to get a struct that you have a matching struct for in the header, as you tell libcurl your "age" with the input argument. 
83 <p class="level0"><span Class="emphasis">version</span> is just an ascii string for the libcurl version. 
84 <p class="level0"><span Class="emphasis">version_num</span> is a 24 bit number created like this: &lt;8 bits major number&gt; | &lt;8 bits minor number&gt; | &lt;8 bits patch number&gt;. Version 7.9.8 is therefore returned as 0x070908. 
85 <p class="level0"><span Class="emphasis">host</span> is an ascii string showing what host information that this libcurl was built for. As discovered by a configure script or set by the build environment. 
86 <p class="level0"><span Class="emphasis">features</span> can have none, one or more bits set, and the currently defined bits are: 
87 <p class="level1">
88 <p class="level0"><a name="CURLVERSIONIPV6"></a><span class="nroffip">CURL_VERSION_IPV6</span> 
89 <p class="level1">supports IPv6 
90 <p class="level0"><a name="CURLVERSIONKERBEROS4"></a><span class="nroffip">CURL_VERSION_KERBEROS4</span> 
91 <p class="level1">supports Kerberos V4 (when using FTP) 
92 <p class="level0"><a name="CURLVERSIONKERBEROS5"></a><span class="nroffip">CURL_VERSION_KERBEROS5</span> 
93 <p class="level1">supports Kerberos V5 authentication for FTP, IMAP, POP3, SMTP and SOCKSv5 proxy (Added in 7.40.0) 
94 <p class="level0"><a name="CURLVERSIONSSL"></a><span class="nroffip">CURL_VERSION_SSL</span> 
95 <p class="level1">supports SSL (HTTPS/FTPS) (Added in 7.10) 
96 <p class="level0"><a name="CURLVERSIONLIBZ"></a><span class="nroffip">CURL_VERSION_LIBZ</span> 
97 <p class="level1">supports HTTP deflate using libz (Added in 7.10) 
98 <p class="level0"><a name="CURLVERSIONNTLM"></a><span class="nroffip">CURL_VERSION_NTLM</span> 
99 <p class="level1">supports HTTP NTLM (added in 7.10.6) 
100 <p class="level0"><a name="CURLVERSIONGSSNEGOTIATE"></a><span class="nroffip">CURL_VERSION_GSSNEGOTIATE</span> 
101 <p class="level1">supports HTTP GSS-Negotiate (added in 7.10.6) 
102 <p class="level0"><a name="CURLVERSIONDEBUG"></a><span class="nroffip">CURL_VERSION_DEBUG</span> 
103 <p class="level1">libcurl was built with debug capabilities (added in 7.10.6) 
104 <p class="level0"><a name="CURLVERSIONCURLDEBUG"></a><span class="nroffip">CURL_VERSION_CURLDEBUG</span> 
105 <p class="level1">libcurl was built with memory tracking debug capabilities. This is mainly of interest for libcurl hackers. (added in 7.19.6) 
106 <p class="level0"><a name="CURLVERSIONASYNCHDNS"></a><span class="nroffip">CURL_VERSION_ASYNCHDNS</span> 
107 <p class="level1">libcurl was built with support for asynchronous name lookups, which allows more exact timeouts (even on Windows) and less blocking when using the multi interface. (added in 7.10.7) 
108 <p class="level0"><a name="CURLVERSIONSPNEGO"></a><span class="nroffip">CURL_VERSION_SPNEGO</span> 
109 <p class="level1">libcurl was built with support for SPNEGO authentication (Simple and Protected GSS-API Negotiation Mechanism, defined in <a href="http://www.ietf.org/rfc/rfc2478.txt">RFC 2478</a>.) (added in 7.10.8) 
110 <p class="level0"><a name="CURLVERSIONLARGEFILE"></a><span class="nroffip">CURL_VERSION_LARGEFILE</span> 
111 <p class="level1">libcurl was built with support for large files. (Added in 7.11.1) 
112 <p class="level0"><a name="CURLVERSIONIDN"></a><span class="nroffip">CURL_VERSION_IDN</span> 
113 <p class="level1">libcurl was built with support for IDNA, domain names with international letters. (Added in 7.12.0) 
114 <p class="level0"><a name="CURLVERSIONSSPI"></a><span class="nroffip">CURL_VERSION_SSPI</span> 
115 <p class="level1">libcurl was built with support for SSPI. This is only available on Windows and makes libcurl use Windows-provided functions for Kerberos, NTLM, SPNEGO and Digest authentication. It also allows libcurl to use the current user credentials without the app having to pass them on. (Added in 7.13.2) 
116 <p class="level0"><a name="CURLVERSIONGSSAPI"></a><span class="nroffip">CURL_VERSION_GSSAPI</span> 
117 <p class="level1">libcurl was built with support for GSS-API. This makes libcurl use provided functions for Kerberos and SPNEGO authentication. It also allows libcurl to use the current user credentials without the app having to pass them on. (Added in 7.38.0) 
118 <p class="level0"><a name="CURLVERSIONCONV"></a><span class="nroffip">CURL_VERSION_CONV</span> 
119 <p class="level1">libcurl was built with support for character conversions, as provided by the CURLOPT_CONV_* callbacks. (Added in 7.15.4) 
120 <p class="level0"><a name="CURLVERSIONTLSAUTHSRP"></a><span class="nroffip">CURL_VERSION_TLSAUTH_SRP</span> 
121 <p class="level1">libcurl was built with support for TLS-SRP. (Added in 7.21.4) 
122 <p class="level0"><a name="CURLVERSIONNTLMWB"></a><span class="nroffip">CURL_VERSION_NTLM_WB</span> 
123 <p class="level1">libcurl was built with support for NTLM delegation to a winbind helper. (Added in 7.22.0) 
124 <p class="level0"><a name="CURLVERSIONHTTP2"></a><span class="nroffip">CURL_VERSION_HTTP2</span> 
125 <p class="level1">libcurl was built with support for HTTP2. (Added in 7.33.0) 
126 <p class="level0"><a name="CURLVERSIONUNIXSOCKETS"></a><span class="nroffip">CURL_VERSION_UNIX_SOCKETS</span> 
127 <p class="level1">libcurl was built with support for Unix domain sockets. (Added in 7.40.0) 
128 <p class="level0"><span Class="emphasis">ssl_version</span> is an ASCII string for the OpenSSL version used. If libcurl has no SSL support, this is NULL. 
129 <p class="level0"><span Class="emphasis">ssl_version_num</span> is always 0. 
130 <p class="level0"><span Class="emphasis">libz_version</span> is an ASCII string (there is no numerical version). If libcurl has no libz support, this is NULL. 
131 <p class="level0"><span Class="emphasis">protocols</span> is a pointer to an array of char * pointers, containing the names protocols that libcurl supports (using lowercase letters). The protocol names are the same as would be used in URLs. The array is terminated by a NULL entry. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
132 <p class="level0">A pointer to a curl_version_info_data struct. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
133 <p class="level0"><a Class="emphasis" href="./curl_version.html">curl_version</a> 
134 <p class="level0"><p class="roffit">
135  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
136 </body></html>