curl_version_info.3 6.2 KB

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