formatting update to produce better links with the new roffit version
[platform/upstream/curl.git] / docs / libcurl / curl_version_info.3
1 .\" You can view this file with:
2 .\" nroff -man [file]
3 .\" $Id$
4 .\"
5 .TH curl_version_info 3 "19 Sep 2003" "libcurl 7.10.8" "libcurl Manual"
6 .SH NAME
7 curl_version_info - returns run-time libcurl version info
8 .SH SYNOPSIS
9 .B #include <curl/curl.h>
10 .sp
11 .BI "curl_version_info_data *curl_version_info( CURLversion "type ");"
12 .ad
13 .SH DESCRIPTION
14 Returns a pointer to a filled in struct with information about various
15 run-time features in libcurl. \fItype\fP should be set to the version of this
16 functionality by the time you write your program. This way, libcurl will
17 always return a proper struct that your program understands, while programs in
18 the future might get an different struct. CURLVERSION_NOW will be the most
19 recent one for the library you have installed:
20
21         data = curl_version_info(CURLVERSION_NOW);
22
23 Applications should use this information to judge if things are possible to do
24 or not, instead of using compile-time checks, as dynamic/DLL libraries can be
25 changed independent of applications.
26
27 The curl_version_info_data struct looks like this
28
29 .nf
30 typedef struct {
31   CURLversion age;          /* 0 - this kind of struct */
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;     /* number */
38   char *libz_version;       /* human readable string */
39   const char *protocols[];  /* list of protocols */
40 } curl_version_info_data;
41 .fi
42
43 \fIage\fP describes what kind of struct this is. It is always 0 now. In a
44 future libcurl, if this struct changes, this age counter may be increased, and
45 then the struct for number 1 will look different (except for this first struct
46 field).
47
48 \fIversion\fP is just an ascii string for the libcurl version.
49
50 \fIversion_num\fP is a 24 bit number created like this: <8 bits major number>
51 | <8 bits minor number> | <8 bits patch number>. Version 7.9.8 is therefore
52 returned as 0x070908.
53
54 \fIhost\fP is an ascii string showing what host information that this libcurl
55 was built for. As discovered by a configure script or set by the build
56 environment.
57
58 \fIfeatures\fP can have none, one or more bits set, and the currently defined
59 bits are:
60 .TP 5.5
61 .B CURL_VERSION_IPV6
62 supports IPv6
63 .TP
64 .B CURL_VERSION_KERBEROS4
65 supports kerberos4 (when using FTP)
66 .TP
67 .B CURL_VERSION_SSL
68 supports SSL (HTTPS/FTPS)
69 .TP
70 .B CURL_VERSION_LIBZ
71 supports HTTP deflate using libz
72 .TP
73 .B CURL_VERSION_NTLM
74 supports HTTP NTLM (added in 7.10.6)
75 .TP
76 .B CURL_VERSION_GSSNEGOTIATE
77 supports HTTP GSS-Negotiate (added in 7.10.6)
78 .TP
79 .B CURL_VERSION_DEBUG
80 libcurl was built with extra debug capabilities built-in. This is mainly of
81 interest for libcurl hackers. (added in 7.10.6)
82 .TP
83 .B CURL_VERSION_ASYNCHDNS
84 libcurl was built with support for asynchronous name lookups, which allows
85 more exact timeouts (even on Windows) and less blocking when using the multi
86 interface. (added in 7.10.7)
87 .TP
88 .B 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 .PP
92 \fIssl_version\fP is an ascii string for the OpenSSL version used. If libcurl
93 has no SSL support, this is NULL.
94
95 \fIssl_version_num\fP is the numerical OpenSSL version value as defined by the
96 OpenSSL project. If libcurl has no SSL support, this is 0.
97
98 \fIlibz_version\fP is an ascii string (there is no numerical version). If
99 libcurl has no libz support, this is NULL.
100
101 \fIprotocols\fP is a pointer to an array of char * pointers, containing the
102 names protocols that libcurl supports (using lowercase letters). The protocol
103 names are the same as would be used in URLs. The array is terminated by a NULL
104 entry.
105 .SH RETURN VALUE
106 A pointer to a curl_version_info_data struct.
107 .SH "SEE ALSO"
108 \fIcurl_version(3)\fP
109