curl_version_info.3 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 1998 - 2019, 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 https://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 "2 Nov 2014" "libcurl 7.40.0" "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 "age ");"
  30. .ad
  31. .SH DESCRIPTION
  32. Returns a pointer to a filled in static struct with information about various
  33. features in the running version of libcurl. \fIage\fP should be set to the
  34. version of this functionality by the time you write your program. This way,
  35. libcurl will always return a proper struct that your program understands,
  36. while programs in the future might get a different
  37. struct. \fBCURLVERSION_NOW\fP will be the most recent one for the library you
  38. 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 * const *protocols; /* 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 (7.16.1 or later), the members below also
  62. exist */
  63. int iconv_ver_num; /* '_libiconv_version' if iconv support enabled */
  64. const char *libssh_version; /* human readable string */
  65. /* when 'age' is 4 or higher (7.57.0 or later), the members below also
  66. exist */
  67. unsigned int brotli_ver_num; /* Numeric Brotli version
  68. (MAJOR << 24) | (MINOR << 12) | PATCH */
  69. const char *brotli_version; /* human readable string. */
  70. /* when 'age is CURLVERSION_SIXTH or alter (7.66.0 or later), these fields
  71. also exist */
  72. unsigned int nghttp2_ver_num; /* Numeric nghttp2 version
  73. (MAJOR << 16) | (MINOR << 8) | PATCH */
  74. const char *nghttp2_version; /* human readable string. */
  75. const char *quic_version; /* human readable quic (+ HTTP/3) library +
  76. version or NULL */
  77. } curl_version_info_data;
  78. .fi
  79. \fIage\fP describes what the age of this struct is. The number depends on how
  80. new the libcurl you're using is. You are however guaranteed to get a struct
  81. that you have a matching struct for in the header, as you tell libcurl your
  82. "age" with the input argument.
  83. \fIversion\fP is just an ascii string for the libcurl version.
  84. \fIversion_num\fP is a 24 bit number created like this: <8 bits major number>
  85. | <8 bits minor number> | <8 bits patch number>. Version 7.9.8 is therefore
  86. returned as 0x070908.
  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. \fIfeatures\fP can have none, one or more bits set, and the currently defined
  91. bits are:
  92. .RS
  93. .IP CURL_VERSION_ALTSVC
  94. HTTP Alt-Svc parsing and the associated options (Added in 7.64.1)
  95. .IP CURL_VERSION_ASYNCHDNS
  96. libcurl was built with support for asynchronous name lookups, which allows
  97. more exact timeouts (even on Windows) and less blocking when using the multi
  98. interface. (added in 7.10.7)
  99. .IP CURL_VERSION_BROTLI
  100. supports HTTP Brotli content encoding using libbrotlidec (Added in 7.57.0)
  101. .IP CURL_VERSION_CONV
  102. libcurl was built with support for character conversions, as provided by the
  103. CURLOPT_CONV_* callbacks. (Added in 7.15.4)
  104. .IP CURL_VERSION_CURLDEBUG
  105. libcurl was built with memory tracking debug capabilities. This is mainly of
  106. interest for libcurl hackers. (added in 7.19.6)
  107. .IP CURL_VERSION_DEBUG
  108. libcurl was built with debug capabilities (added in 7.10.6)
  109. .IP CURL_VERSION_GSSAPI
  110. libcurl was built with support for GSS-API. This makes libcurl use provided
  111. functions for Kerberos and SPNEGO authentication. It also allows libcurl
  112. to use the current user credentials without the app having to pass them on.
  113. (Added in 7.38.0)
  114. .IP CURL_VERSION_GSSNEGOTIATE
  115. supports HTTP GSS-Negotiate (added in 7.10.6)
  116. .IP CURL_VERSION_HTTPS_PROXY
  117. libcurl was built with support for HTTPS-proxy.
  118. (Added in 7.52.0)
  119. .IP CURL_VERSION_HTTP2
  120. libcurl was built with support for HTTP2.
  121. (Added in 7.33.0)
  122. .IP CURL_VERSION_HTTP3
  123. HTTP/3 and QUIC support are built-in (Added in 7.66.0)
  124. .IP CURL_VERSION_IDN
  125. libcurl was built with support for IDNA, domain names with international
  126. letters. (Added in 7.12.0)
  127. .IP CURL_VERSION_IPV6
  128. supports IPv6
  129. .IP CURL_VERSION_KERBEROS4
  130. supports Kerberos V4 (when using FTP)
  131. .IP CURL_VERSION_KERBEROS5
  132. supports Kerberos V5 authentication for FTP, IMAP, POP3, SMTP and SOCKSv5 proxy
  133. (Added in 7.40.0)
  134. .IP CURL_VERSION_LARGEFILE
  135. libcurl was built with support for large files. (Added in 7.11.1)
  136. .IP CURL_VERSION_LIBZ
  137. supports HTTP deflate using libz (Added in 7.10)
  138. .IP CURL_VERSION_MULTI_SSL
  139. libcurl was built with multiple SSL backends. For details, see
  140. \fIcurl_global_sslset(3)\fP.
  141. (Added in 7.56.0)
  142. .IP CURL_VERSION_NTLM
  143. supports HTTP NTLM (added in 7.10.6)
  144. .IP CURL_VERSION_NTLM_WB
  145. libcurl was built with support for NTLM delegation to a winbind helper.
  146. (Added in 7.22.0)
  147. .IP CURL_VERSION_PSL
  148. libcurl was built with support for Mozilla's Public Suffix List. This makes
  149. libcurl ignore cookies with a domain that's on the list.
  150. (Added in 7.47.0)
  151. .IP CURL_VERSION_SPNEGO
  152. libcurl was built with support for SPNEGO authentication (Simple and Protected
  153. GSS-API Negotiation Mechanism, defined in RFC 2478.) (added in 7.10.8)
  154. .IP CURL_VERSION_SSL
  155. supports SSL (HTTPS/FTPS) (Added in 7.10)
  156. .IP CURL_VERSION_SSPI
  157. libcurl was built with support for SSPI. This is only available on Windows and
  158. makes libcurl use Windows-provided functions for Kerberos, NTLM, SPNEGO and
  159. Digest authentication. It also allows libcurl to use the current user
  160. credentials without the app having to pass them on. (Added in 7.13.2)
  161. .IP CURL_VERSION_TLSAUTH_SRP
  162. libcurl was built with support for TLS-SRP. (Added in 7.21.4)
  163. .IP CURL_VERSION_UNIX_SOCKETS
  164. libcurl was built with support for Unix domain sockets.
  165. (Added in 7.40.0)
  166. .RE
  167. \fIssl_version\fP is an ASCII string for the TLS library name + version
  168. used. If libcurl has no SSL support, this is NULL. For example "Schannel",
  169. \&"SecureTransport" or "OpenSSL/1.1.0g".
  170. \fIssl_version_num\fP is always 0.
  171. \fIlibz_version\fP is an ASCII string (there is no numerical version). If
  172. libcurl has no libz support, this is NULL.
  173. \fIprotocols\fP is a pointer to an array of char * pointers, containing the
  174. names protocols that libcurl supports (using lowercase letters). The protocol
  175. names are the same as would be used in URLs. The array is terminated by a NULL
  176. entry.
  177. .SH RETURN VALUE
  178. A pointer to a curl_version_info_data struct.
  179. .SH "SEE ALSO"
  180. \fIcurl_version(3)\fP