ssl_version_num is not used anymore
[platform/upstream/curl.git] / docs / libcurl / curl_version_info.3
1 .\" $Id$
2 .\"
3 .TH curl_version_info 3 "11 Mar 2005" "libcurl 7.13.2" "libcurl Manual"
4 .SH NAME
5 curl_version_info - returns run-time libcurl version info
6 .SH SYNOPSIS
7 .B #include <curl/curl.h>
8 .sp
9 .BI "curl_version_info_data *curl_version_info( CURLversion "type ");"
10 .ad
11 .SH DESCRIPTION
12 Returns a pointer to a filled in struct with information about various
13 run-time features in libcurl. \fItype\fP should be set to the version of this
14 functionality by the time you write your program. This way, libcurl will
15 always return a proper struct that your program understands, while programs in
16 the future might get an different struct. CURLVERSION_NOW will be the most
17 recent one for the library you have installed:
18
19         data = curl_version_info(CURLVERSION_NOW);
20
21 Applications should use this information to judge if things are possible to do
22 or not, instead of using compile-time checks, as dynamic/DLL libraries can be
23 changed independent of applications.
24
25 The curl_version_info_data struct looks like this
26
27 .nf
28 typedef struct {
29   CURLversion age;          /* see description below */
30
31   /* when 'age' is 0 or higher, the members below also exist: */
32   const char *version;      /* human readable string */
33   unsigned int version_num; /* numeric representation */
34   const char *host;         /* human readable string */
35   int features;             /* bitmask, see below */
36   char *ssl_version;        /* human readable string */
37   long ssl_version_num;     /* not used, always zero */
38   const char *libz_version; /* human readable string */
39   const char **protocols;   /* list of protocols */
40
41   /* when 'age' is 1 or higher, the members below also exist: */
42   const char *ares;         /* human readable string */
43   int ares_num;             /* number */
44
45   /* when 'age' is 2 or higher, the member below also exists: */
46   const char *libidn;       /* human readable string */
47
48 } curl_version_info_data;
49 .fi
50
51 \fIage\fP describes what age of this struct this is. The number depends on how
52 new libcurl you're using. You are however guaranteed to get a struct that you
53 have a matching struct for in the header, as you tell libcurl your "age" with
54 the input argument.
55
56 \fIversion\fP is just an ascii string for the libcurl version.
57
58 \fIversion_num\fP is a 24 bit number created like this: <8 bits major number>
59 | <8 bits minor number> | <8 bits patch number>. Version 7.9.8 is therefore
60 returned as 0x070908.
61
62 \fIhost\fP is an ascii string showing what host information that this libcurl
63 was built for. As discovered by a configure script or set by the build
64 environment.
65
66 \fIfeatures\fP can have none, one or more bits set, and the currently defined
67 bits are:
68 .RS
69 .IP CURL_VERSION_IPV6
70 supports IPv6
71 .IP CURL_VERSION_KERBEROS4
72 supports kerberos4 (when using FTP)
73 .IP CURL_VERSION_SSL
74 supports SSL (HTTPS/FTPS) (Added in 7.10)
75 .IP CURL_VERSION_LIBZ
76 supports HTTP deflate using libz (Added in 7.10)
77 .IP CURL_VERSION_NTLM
78 supports HTTP NTLM (added in 7.10.6)
79 .IP CURL_VERSION_GSSNEGOTIATE
80 supports HTTP GSS-Negotiate (added in 7.10.6)
81 .IP CURL_VERSION_DEBUG
82 libcurl was built with extra debug capabilities built-in. This is mainly of
83 interest for libcurl hackers. (added in 7.10.6)
84 .IP CURL_VERSION_ASYNCHDNS
85 libcurl was built with support for asynchronous name lookups, which allows
86 more exact timeouts (even on Windows) and less blocking when using the multi
87 interface. (added in 7.10.7)
88 .IP CURL_VERSION_SPNEGO
89 libcurl was built with support for SPNEGO authentication (Simple and Protected
90 GSS-API Negotiation Mechanism, defined in RFC 2478.) (added in 7.10.8)
91 .IP CURL_VERSION_LARGEFILE
92 libcurl was built with support for large files. (Added in 7.11.1)
93 .IP CURL_VERSION_IDN
94 libcurl was built with support for IDNA, domain names with international
95 letters. (Added in 7.12.0)
96 .IP CURL_VERSION_SSPI
97 libcurl was built with support for SSPI. This is only available on Windows and
98 makes libcurl use Windows-provided functions for NTLM authentication. It also
99 allows libcurl to use the current user and the current user's password without
100 the app having to pass them on. (Added in 7.13.2)
101 .RE
102 \fIssl_version\fP is an ascii string for the OpenSSL version used. If libcurl
103 has no SSL support, this is NULL.
104
105 \fIssl_version_num\fP is the numerical OpenSSL version value as defined by the
106 OpenSSL project. If libcurl has no SSL support, this is 0.
107
108 \fIlibz_version\fP is an ascii string (there is no numerical version). If
109 libcurl has no libz support, this is NULL.
110
111 \fIprotocols\fP is a pointer to an array of char * pointers, containing the
112 names protocols that libcurl supports (using lowercase letters). The protocol
113 names are the same as would be used in URLs. The array is terminated by a NULL
114 entry.
115 .SH RETURN VALUE
116 A pointer to a curl_version_info_data struct.
117 .SH "SEE ALSO"
118 \fIcurl_version(3)\fP
119