![]() |
![]()
| ![]() |
![]()
NAMEcurl_version_info - returns runtime libcurl version info SYNOPSIS#include <curl/curl.h> curl_version_info_data *curl_version_info(CURLversion age); DESCRIPTIONReturns a pointer to a filled in static struct with information about various features in the running version of libcurl. age should be set to the version of this functionality by the time you write your program. This way, libcurl always returns a proper struct that your program understands, while programs in the future might get a different struct. CURLVERSION_NOW is the most recent one for the library you have installed:
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. This function can alter the returned static data as long as curl_global_init(3) has not been called. It is therefore not thread-safe before libcurl initialization occurs. The curl_version_info_data struct looks like this typedef struct { age describes what the age of this struct is. The number depends on how new the libcurl you are using is. You are however guaranteed to get a struct that you have a matching struct for in the header, as you tell libcurl your "age" with the input argument. version is just an ASCII string for the libcurl version. version_num is a 24 bit number created like this: <8 bits major number> | <8 bits minor number> | <8 bits patch number>. Version 7.9.8 is therefore returned as 0x070908. host is an ASCII string showing what host information that this libcurl was built for. As discovered by a configure script or set by the build environment. features is a bit mask representing available features. It can have none, one or more bits set. The use of this field is deprecated: use feature_names instead. The feature names description below lists the associated bits. feature_names is a pointer to an array of string pointers, containing the names of the features that libcurl supports. The array is terminated by a NULL entry. See the list of features names below. ssl_version is an ASCII string for the TLS library name + version used. If libcurl has no SSL support, this is NULL. For example "Schannel", "Secure Transport" or "OpenSSL/1.1.0g". For MultiSSL builds the string contains all SSL backend names and the inactive backend names are in parentheses. For example "(OpenSSL/3.0.8) Schannel" or "OpenSSL/3.0.8 (Schannel)". ssl_version_num is always 0. libz_version is an ASCII string (there is no numerical version). If libcurl has no libz support, this is NULL. protocols is a pointer to an array of char * pointers, containing the names protocols that libcurl supports (using lowercase letters). The protocol names are the same as would be used in URLs. The array is terminated by a NULL entry. FEATURES
PROTOCOLSThis functionality affects all supported protocols EXAMPLEint main(void) { AVAILABILITYAdded in curl 7.10 RETURN VALUEA pointer to a curl_version_info_data struct. SEE ALSOcurl_version(3)
|