curl_version_info.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <html><head>
  2. <title>curl_version_info man page</title>
  3. <meta name="generator" content="roffit 0.5">
  4. <STYLE type="text/css">
  5. P.level0 {
  6. padding-left: 2em;
  7. }
  8. P.level1 {
  9. padding-left: 4em;
  10. }
  11. P.level2 {
  12. padding-left: 6em;
  13. }
  14. span.emphasis {
  15. font-style: italic;
  16. }
  17. span.bold {
  18. font-weight: bold;
  19. }
  20. span.manpage {
  21. font-weight: bold;
  22. }
  23. h2.nroffsh {
  24. background-color: #e0e0e0;
  25. }
  26. span.nroffip {
  27. font-weight: bold;
  28. font-size: 120%;
  29. font-family: monospace;
  30. }
  31. p.roffit {
  32. text-align: center;
  33. font-size: 80%;
  34. }
  35. </STYLE>
  36. </head><body>
  37. <p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
  38. <p class="level0">curl_version_info - returns run-time libcurl version info <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
  39. <p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span>
  40. <p class="level0"><span Class="bold">curl_version_info_data *curl_version_info( CURLversion type );</span>
  41. <p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
  42. <p class="level0">Returns a pointer to a filled in struct with information about various run-time features in 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 an different struct. CURLVERSION_NOW will be the most recent one for the library you have installed:
  43. <p class="level0">&nbsp; data = curl_version_info(CURLVERSION_NOW);
  44. <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.
  45. <p class="level0">The curl_version_info_data struct looks like this
  46. <p class="level0"><pre>
  47. <p class="level0">typedef struct {
  48. &nbsp; CURLversion age; /* 0 - this kind of struct */
  49. &nbsp; const char *version; /* human readable string */
  50. &nbsp; unsigned int version_num; /* numeric representation */
  51. &nbsp; const char *host; /* human readable string */
  52. &nbsp; int features; /* bitmask, see below */
  53. &nbsp; char *ssl_version; /* human readable string */
  54. &nbsp; long ssl_version_num; /* number */
  55. &nbsp; char *libz_version; /* human readable string */
  56. &nbsp; const char *protocols[]; /* list of protocols */
  57. } curl_version_info_data;
  58. <p class="level0"><span Class="emphasis">age</span> describes what kind of struct this is. It is always 0 now. In a
  59. future libcurl, if this struct changes, this age counter may be increased, and
  60. then the struct for number 1 will look different (except for this first struct
  61. field).
  62. <p class="level0"><span Class="emphasis">version</span> is just an ascii string for the libcurl version.
  63. <p class="level0"><span Class="emphasis">version_num</span> is a 24 bit number created like this: &lt;8 bits major number&gt;
  64. | &lt;8 bits minor number&gt; | &lt;8 bits patch number&gt;. Version 7.9.8 is therefore
  65. returned as 0x070908.
  66. <p class="level0"><span Class="emphasis">host</span> is an ascii string showing what host information that this libcurl
  67. was built for. As discovered by a configure script or set by the build
  68. environment.
  69. <p class="level0"><span Class="emphasis">features</span> can have none, one or more bits set, and the currently defined
  70. bits are:
  71. <p class="level0"><span Class="bold">CURL_VERSION_IPV6</span>
  72. supports IPv6
  73. <p class="level0"><span Class="bold">CURL_VERSION_KERBEROS4</span>
  74. supports kerberos4 (when using FTP)
  75. <p class="level0"><span Class="bold">CURL_VERSION_SSL</span>
  76. supports SSL (HTTPS/FTPS)
  77. <p class="level0"><span Class="bold">CURL_VERSION_LIBZ</span>
  78. supports HTTP deflate using libz
  79. <p class="level0"><span Class="bold">CURL_VERSION_NTLM</span>
  80. supports HTTP NTLM (added in 7.10.6)
  81. <p class="level0"><span Class="bold">CURL_VERSION_GSSNEGOTIATE</span>
  82. supports HTTP GSS-Negotiate (added in 7.10.6)
  83. <p class="level0"><span Class="bold">CURL_VERSION_DEBUG</span>
  84. libcurl was built with extra debug capabilities built-in. This is mainly of
  85. interest for libcurl hackers. (added in 7.10.6)
  86. <p class="level0"><span Class="bold">CURL_VERSION_ASYNCHDNS</span>
  87. libcurl was built with support for asynchronous name lookups, which allows
  88. more exact timeouts (even on Windows) and less blocking when using the multi
  89. interface. (added in 7.10.7)
  90. <p class="level0"><span Class="bold">CURL_VERSION_SPNEGO</span>
  91. libcurl was built with support for SPNEGO authentication (Simple and Protected
  92. GSS-API Negotiation Mechanism, defined in RFC 2478.) (added in 7.10.8)
  93. <span Class="emphasis">ssl_version</span> is an ascii string for the OpenSSL version used. If libcurl
  94. has no SSL support, this is NULL.
  95. <p class="level0"><span Class="emphasis">ssl_version_num</span> is the numerical OpenSSL version value as defined by the
  96. OpenSSL project. If libcurl has no SSL support, this is 0.
  97. <p class="level0"><span Class="emphasis">libz_version</span> is an ascii string (there is no numerical version). If
  98. libcurl has no libz support, this is NULL.
  99. <p class="level0"><span Class="emphasis">protocols</span> is a pointer to an array of char * pointers, containing the
  100. names protocols that libcurl supports (using lowercase letters). The protocol
  101. names are the same as would be used in URLs. The array is terminated by a NULL
  102. entry.
  103. </pre>
  104. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
  105. <p class="level0">A pointer to a curl_version_info_data struct. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
  106. <p class="level0"><a class="emphasis" href="./curl_version.html">curl_version(3)</a>
  107. <p class="level0"><p class="roffit">
  108. This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
  109. </body></html>