curl_version_info.3 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. .\" You can view this file with:
  2. .\" nroff -man [file]
  3. .\" $Id: curl_version_info.3,v 1.6 2004/02/27 15:34:06 bagder Exp $
  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. data = curl_version_info(CURLVERSION_NOW);
  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. The curl_version_info_data struct looks like this
  25. .nf
  26. typedef struct {
  27. CURLversion age; /* 0 - this kind of struct */
  28. const char *version; /* human readable string */
  29. unsigned int version_num; /* numeric representation */
  30. const char *host; /* human readable string */
  31. int features; /* bitmask, see below */
  32. char *ssl_version; /* human readable string */
  33. long ssl_version_num; /* number */
  34. char *libz_version; /* human readable string */
  35. const char *protocols[]; /* list of protocols */
  36. } curl_version_info_data;
  37. .fi
  38. \fIage\fP describes what kind of struct this is. It is always 0 now. In a
  39. future libcurl, if this struct changes, this age counter may be increased, and
  40. then the struct for number 1 will look different (except for this first struct
  41. field).
  42. \fIversion\fP is just an ascii string for the libcurl version.
  43. \fIversion_num\fP is a 24 bit number created like this: <8 bits major number>
  44. | <8 bits minor number> | <8 bits patch number>. Version 7.9.8 is therefore
  45. returned as 0x070908.
  46. \fIhost\fP is an ascii string showing what host information that this libcurl
  47. was built for. As discovered by a configure script or set by the build
  48. environment.
  49. \fIfeatures\fP can have none, one or more bits set, and the currently defined
  50. bits are:
  51. .TP 5.5
  52. .B CURL_VERSION_IPV6
  53. supports IPv6
  54. .TP
  55. .B CURL_VERSION_KERBEROS4
  56. supports kerberos4 (when using FTP)
  57. .TP
  58. .B CURL_VERSION_SSL
  59. supports SSL (HTTPS/FTPS)
  60. .TP
  61. .B CURL_VERSION_LIBZ
  62. supports HTTP deflate using libz
  63. .TP
  64. .B CURL_VERSION_NTLM
  65. supports HTTP NTLM (added in 7.10.6)
  66. .TP
  67. .B CURL_VERSION_GSSNEGOTIATE
  68. supports HTTP GSS-Negotiate (added in 7.10.6)
  69. .TP
  70. .B CURL_VERSION_DEBUG
  71. libcurl was built with extra debug capabilities built-in. This is mainly of
  72. interest for libcurl hackers. (added in 7.10.6)
  73. .TP
  74. .B CURL_VERSION_ASYNCHDNS
  75. libcurl was built with support for asynchronous name lookups, which allows
  76. more exact timeouts (even on Windows) and less blocking when using the multi
  77. interface. (added in 7.10.7)
  78. .TP
  79. .B CURL_VERSION_SPNEGO
  80. libcurl was built with support for SPNEGO authentication (Simple and Protected
  81. GSS-API Negotiation Mechanism, defined in RFC 2478.) (added in 7.10.8)
  82. .PP
  83. \fIssl_version\fP is an ascii string for the OpenSSL version used. If libcurl
  84. has no SSL support, this is NULL.
  85. \fIssl_version_num\fP is the numerical OpenSSL version value as defined by the
  86. OpenSSL project. If libcurl has no SSL support, this is 0.
  87. \fIlibz_version\fP is an ascii string (there is no numerical version). If
  88. libcurl has no libz support, this is NULL.
  89. \fIprotocols\fP is a pointer to an array of char * pointers, containing the
  90. names protocols that libcurl supports (using lowercase letters). The protocol
  91. names are the same as would be used in URLs. The array is terminated by a NULL
  92. entry.
  93. .SH RETURN VALUE
  94. A pointer to a curl_version_info_data struct.
  95. .SH "SEE ALSO"
  96. \fIcurl_version(3)\fP