etc.c.curl

This is an interface to the libcurl library.

Converted to D from curl headers by htod and cleaned up by Jonas Drewsen (jdrewsen)

Windows x86 note: A DMD compatible libcurl static library can be downloaded from the dlang.org

download page.

Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.

This software is licensed as described in the file COPYING, which you should have received as part of this distribution. The terms are also available at http://curl.haxx.se/docs/copyright.html.

You may opt to use, copy, modify, merge, publish, distribute and/or sell copies of the Software, and permit persons to whom the Software is furnished to do so, under the terms of the COPYING file.

This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.

union _N31

Types 124

aliascurl_off_t = long

Data type definition of curl_off_t.

jdrewsen - Always 64bit signed and that is what long is in D.

Comment below is from curlbuild.h:

NOTE 2:

For any given platform/compiler curl_off_t must be typedef'ed to a 64-bit wide signed integral data type. The width of this data type must remain constant and independent of any possible large file support settings.

As an exception to the above, curl_off_t shall be typedef'ed to a 32-bit wide signed integral data type if there is no 64-bit type.

aliasCURL = void
aliascurl_socket_t = socket_t

jdrewsen - Get socket alias from std.socket

structcurl_httppost
Fields
curl_httppost *next next
char *name name
c_long namelength
char *contents contents
c_long contentslength
char *buffer buffer
c_long bufferlength
char *contenttype contenttype
curl_slist *contentheader contentheader
curl_httppost *more more
c_long flags
char *showfilename showfilename
void *userp userp
aliascurl_progress_callback = int function(void * clientp, double dltotal, double dlnow, double ultotal, double ulnow)
aliascurl_write_callback = size_t function(char * buffer, size_t size, size_t nitems, void * outstream)

enumeration of file types

file
directory
symlink
device_block
device_char
namedpipe
socket
door
unknownis possible only on Sun Solaris now
aliascurlfiletype = int
filename = 1
filetype = 2
time = 4
perm = 8
uid = 16
gid = 32
size = 64
hlinkcount = 128
struct_N2

Content of this structure depends on information which is known and is achievable (e.g. by FTP LIST parsing). Please see the url_easy_setopt(3) man page for callbacks returning this structure -- some fields are mandatory, some others are optional. The FLAG field has special meaning. If some of these fields is not NULL, it is a pointer to b_data.

Fields
char *time time
char *perm perm
char *user user
char *group group
char *target target
structcurl_fileinfo

Content of this structure depends on information which is known and is achievable (e.g. by FTP LIST parsing). Please see the url_easy_setopt(3) man page for callbacks returning this structure -- some fields are mandatory, some others are optional. The FLAG field has special meaning.

Fields
char *filename filename
curlfiletype filetype
time_t time
uint perm
int uid
int gid
curl_off_t size
c_long hardlinks
_N2 strings
uint flags
char *b_data b_data
size_t b_size
size_t b_used

return codes for CURLOPT_CHUNK_BGN_FUNCTION

ok = 0
fail = 1tell the lib to end the task
skip = 2skip this chunk over
aliascurl_chunk_bgn_callback = c_long function(const(void) * transfer_info, void * ptr, int remains)

if splitting of data transfer is enabled, this callback is called before download of an individual chunk started. Note that parameter "remains" works only for FTP wildcard downloading (for now), otherwise is not used

return codes for CURLOPT_CHUNK_END_FUNCTION

ok = 0
fail = 1
aliascurl_chunk_end_callback = c_long function(void * ptr)

If splitting of data transfer is enabled this callback is called after download of an individual chunk finished. Note! After this callback was set then it have to be called FOR ALL chunks. Even if downloading of this chunk was skipped in CHUNK_BGN_FUNC. This is the reason why we don't need "transfer_info" parameter in this callback and we are not interested in "remains" parameter too.

return codes for FNMATCHFUNCTION

match = 0
nomatch = 1
fail = 2
aliascurl_fnmatch_callback = int function(void * ptr, in const(char) * pattern, in const(char) * string)

callback type for wildcard downloading pattern matching. If the string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc.

seek whence...

set
current
end

These are the return codes for the seek callbacks

ok
failfail the entire transfer
cantseektell libcurl seeking can't be done, so libcurl might try other means instead
aliascurl_seek_callback = int function(void * instream, curl_off_t offset, int origin)
abort = 0x10000000This is a return code for the read callback that, when returned, will signal libcurl to immediately abort the current transfer.
pause = 0x10000001This is a return code for the read callback that, when returned, will const signal libcurl to pause sending data on the current transfer.
aliascurl_read_callback = size_t function(char * buffer, size_t size, size_t nitems, void * instream)
ipcxnsocket created for a specific IP connection
lastnever use
aliascurlsocktype = int
aliascurl_sockopt_callback = int function(void * clientp, curl_socket_t curlfd, curlsocktype purpose)
structcurl_sockaddr

addrlen was a socklen_t type before 7.18.0 but it turned really ugly and painful on the systems that lack this type

Fields
int family
int socktype
int protocol
uint addrlen
sockaddr addr
aliascurl_opensocket_callback = curl_socket_t function(void * clientp, curlsocktype purpose, curl_sockaddr * address)
okI/O operation successful
unknowncmdcommand was unknown to callback
failrestartfailed to restart the read
lastnever use
aliascurlioerr = int
nopcommand was unknown to callback
restartreadfailed to restart the read
lastnever use
aliascurliocmd = int
aliascurl_ioctl_callback = curlioerr function(CURL * handle, int cmd, void * clientp)
aliascurl_malloc_callback = void * function(size_t size)

The following typedef's are signatures of malloc, free, realloc, strdup and calloc respectively. Function pointers of these types can be passed to the curl_global_init_mem() function to set user defined memory management callback routines.

aliascurl_free_callback = void function(void * ptr)

ditto

aliascurl_realloc_callback = void * function(void * ptr, size_t size)

ditto

aliascurl_strdup_callback = char * function(in const(char) * str)

ditto

aliascurl_calloc_callback = void * function(size_t nmemb, size_t size)

ditto

the kind of data that is passed to information_callback

text
header_in
header_out
data_in
data_out
ssl_data_in
ssl_data_out
end
aliascurl_infotype = int
aliascurl_debug_callback = int function(CURL * handle, /** the handle/transfer this concerns */ curl_infotype type, /** what kind of data */ char * data, /** points to the data */ size_t size, /** size of the data pointed to */ void * userptr /** whatever the user please */ )

All possible error codes from all sorts of curl functions. Future versions may return other values, stay prepared.

Always add new return codes last. Never EVER remove any. The return codes must remain the same!

ok
unsupported_protocol1
failed_init2
url_malformat3
not_built_in4 - [was obsoleted in August 2007 for 7.17.0, reused in April 2011 for 7.21.5]
couldnt_resolve_proxy5
couldnt_resolve_host6
couldnt_connect7
ftp_weird_server_reply8
remote_access_denied9 a service was denied by the server due to lack of access - when login fails this is not returned.
obsolete1010 - NOT USED
ftp_weird_pass_reply11
obsolete1212 - NOT USED
ftp_weird_pasv_reply13
ftp_weird_227_format14
ftp_cant_get_host15
obsolete1616 - NOT USED
ftp_couldnt_set_type17
partial_file18
ftp_couldnt_retr_file19
obsolete2020 - NOT USED
quote_error21 - quote command failure
http_returned_error22
write_error23
obsolete2424 - NOT USED
upload_failed25 - failed upload "command"
read_error26 - couldn't open/read from file
out_of_memory27
operation_timedoutNote: CURLEOUTOFMEMORY may sometimes indicate a conversion error instead of a memory allocation error if CURLDOES_CONVERSIONS is defined
obsolete2929 - NOT USED
ftp_port_failed30 - FTP PORT operation failed
ftp_couldnt_use_rest31 - the REST command failed
obsolete3232 - NOT USED
range_error33 - RANGE "command" didn't work
http_post_error34
ssl_connect_error35 - wrong when connecting with SSL
bad_download_resume36 - couldn't resume download
file_couldnt_read_file37
ldap_cannot_bind38
ldap_search_failed39
obsolete4040 - NOT USED
function_not_found41
aborted_by_callback42
bad_function_argument43
obsolete4444 - NOT USED
interface_failed45 - CURLOPT_INTERFACE failed
obsolete4646 - NOT USED
too_many_redirects47 - catch endless re-direct loops
unknown_option48 - User specified an unknown option
telnet_option_syntax49 - Malformed telnet option
obsolete5050 - NOT USED
peer_failed_verification51 - peer's certificate or fingerprint wasn't verified fine
got_nothing52 - when this is a specific error
ssl_engine_notfound53 - SSL crypto engine not found
ssl_engine_setfailed54 - can not set SSL crypto engine as default
send_error55 - failed sending network data
recv_error56 - failure in receiving network data
obsolete5757 - NOT IN USE
ssl_certproblem58 - problem with the local certificate
ssl_cipher59 - couldn't use specified cipher
ssl_cacert60 - problem with the CA cert (path?)
bad_content_encoding61 - Unrecognized transfer encoding
ldap_invalid_url62 - Invalid LDAP URL
filesize_exceeded63 - Maximum file size exceeded
use_ssl_failed64 - Requested FTP SSL level failed
send_fail_rewind65 - Sending the data requires a rewind that failed
ssl_engine_initfailed66 - failed to initialise ENGINE
login_denied67 - user, password or similar was not accepted and we failed to login
tftp_notfound68 - file not found on server
tftp_perm69 - permission problem on server
remote_disk_full70 - out of disk space on server
tftp_illegal71 - Illegal TFTP operation
tftp_unknownid72 - Unknown transfer ID
remote_file_exists73 - File already exists
tftp_nosuchuser74 - No such user
conv_failed75 - conversion failed
conv_reqd76 - caller must register conversion callbacks using curleasysetopt options CURLOPTCONVFROMNETWORKFUNCTION, CURLOPTCONVTONETWORKFUNCTION, and CURLOPTCONVFROMUTF8FUNCTION
ssl_cacert_badfile77 - could not load CACERT file, missing or wrong format
remote_file_not_found78 - remote file not found
ssh79 - error from the SSH layer, somewhat generic so the error message will be of interest when this has happened
ssl_shutdown_failed80 - Failed to shut down the SSL connection
again81 - socket is not ready for send/recv, wait till it's ready and try again (Added in 7.18.2)
ssl_crl_badfile82 - could not load CRL file, missing or wrong format (Added in 7.19.0)
ssl_issuer_error83 - Issuer check failed. (Added in 7.19.0)
ftp_pret_failed84 - a PRET command failed
rtsp_cseq_error85 - mismatch of RTSP CSeq numbers
rtsp_session_error86 - mismatch of RTSP Session Identifiers
ftp_bad_file_list87 - unable to parse FTP file list
chunk_failed88 - chunk callback reported error
curl_lastnever use!
aliasCURLcode = int
aliascurl_conv_callback = CURLcode function(char * buffer, size_t length)

This prototype applies to all conversion callbacks

aliascurl_ssl_ctx_callback = CURLcode function(CURL * curl, /** easy handle */ void * ssl_ctx, /** actually an OpenSSL SSL_CTX */ void * userptr )

actually an OpenSSL SSL_CTX

httpadded in 7.10, new in 7.19.4 default is to use CONNECT HTTP/1.1
http_1_0added in 7.19.4, force to use CONNECT HTTP/1.0
socks4 = 4support added in 7.15.2, enum existed already in 7.10
socks5 = 5added in 7.10
socks4a = 6added in 7.18.0
socks5_hostname = 7Use the SOCKS5 protocol but pass along the host name rather than the IP address. added in 7.18.0
aliascurl_proxytype = int
enumCurlAuth : ulong
none = 0ULNone
basic = 1UL << 0Basic (default)
digest = 1UL << 1Digest
negotiate = 1UL << 2Negotiate (SPNEGO)
gssnegotiate = negotiateGSS-Negotiate
gssapi = negotiateGSS-Negoatiate
ntlm = 1UL << 3NTLM
digest_ie = 1UL << 4Digest with IE flavour
ntlm_WB = 1UL << 5NTML delegated to winbind helper
bearer = 1UL << 6Bearer token authentication
only = 1UL << 31used together with a single other type to force no auth or just that single type
any = ~ digest_ieany allows
anysafe = ~(basic | digest_ie)any except basic
any = ~ 0all types supported by the server
none = 0none allowed, silly but complete
publickey = 1 << 0public/private key files
password = 1 << 1password
host = 1 << 2host key files
keyboard = 1 << 3keyboard interactive
agent = 1 << 4agent (ssh-agent, pageant...)
gssapi = 1 << 5gssapi (kerberos, ...)
default_ = any

points to a zero-terminated string encoded with base64 if len is zero, otherwise to the "raw" data

unknown
rsa1
rsa
dss
structcurl_khkey
Fields
const(char) *key key
size_t len
CurlKHType keytype

this is the set of return values expected from the curl_sshkeycallback callback

fine_add_to_file
fine
rejectreject the connection, return an error
deferdo not accept it, but we can't answer right now so this causes a CURLE_DEFER error but otherwise the connection will be left intact etc
lastnot for use, only a marker for last-in-list

this is the set of status codes pass in to the callback

okmatch
mismatchhost found, key mismatch!
missingno matching host/key found
lastnot for use, only a marker for last-in-list
aliascurl_sshkeycallback = int function(CURL * easy, /** easy handle */ const(curl_khkey) * knownkey, /** known */ const(curl_khkey) * foundkey, /** found */ CurlKHMatch m, /** libcurl's view on the keys */ void * clientp /** custom pointer passed from app */ )

parameter for the CURLOPT_USE_SSL option

nonedo not attempt to use SSL
tryssltry using SSL, proceed anyway otherwise
controlSSL for the control connection or fail
allSSL for all communication or fail
lastnot an option, never use
aliascurl_usessl = int

parameter for the CURLOPT_FTP_SSL_CCC option

ccc_nonedo not send CCC
ccc_passiveLet the server initiate the shutdown
ccc_activeInitiate the shutdown
ccc_lastnot an option, never use
aliascurl_ftpccc = int

parameter for the CURLOPT_FTPSSLAUTH option

defaultauthlet libcurl decide
ssluse "AUTH SSL"
tlsuse "AUTH TLS"
lastnot an option, never use
aliascurl_ftpauth = int

parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option

create_dir_nonedo NOT create missing dirs!
create_dir(FTP/SFTP) if CWD fails, try MKD and then CWD again if MKD succeeded, for SFTP this does similar magic
create_dir_retry(FTP only) if CWD fails, try MKD and then CWD again even if MKD failed!
create_dir_lastnot an option, never use
aliascurl_ftpcreatedir = int

parameter for the CURLOPT_FTP_FILEMETHOD option

defaultmethodlet libcurl pick
multicwdsingle CWD operation for each path part
nocwdno CWD at all
singlecwdone CWD to full dir, then work on file
lastnot an option, never use
aliascurl_ftpmethod = int

CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options

http = 1
https = 2
ftp = 4
ftps = 8
scp = 16
sftp = 32
telnet = 64
ldap = 128
ldaps = 256
dict = 512
file = 1024
tftp = 2048
imap = 4096
imaps = 8192
pop3 = 16_384
pop3s = 32_768
smtp = 65_536
smtps = 131_072
rtsp = 262_144
rtmp = 524_288
rtmpt = 1_048_576
rtmpe = 2_097_152
rtmpte = 4_194_304
rtmps = 8_388_608
rtmpts = 16_777_216
gopher = 33_554_432
all = - 1enable everything
aliasLONG = CURLOPTTYPE_LONG

name is uppercase CURLOPT_<name≥, type is one of the defined CURLOPTTYPE_<type≥ number is unique identifier The macro "##" is ISO C, we assume pre-ISO C doesn't support it.

aliasOBJECTPOINT = CURLOPTTYPE_OBJECTPOINT

ditto

aliasFUNCTIONPOINT = CURLOPTTYPE_FUNCTIONPOINT

ditto

aliasOFF_T = CURLOPTTYPE_OFF_T

ditto

file = 10_001This is the FILE or void the regular output should be written to.
urlThe full URL to get/put
port = 3Port number to connect to, if other than default.
proxy = 10_004Name of proxy to use.
userpwd"name:password" to use when fetching.
proxyuserpwd"name:password" to use with proxy.
rangeRange to get, specified as an ASCII string.
infile = 10_009not used Specified file stream to upload from (use as input):
errorbufferBuffer to receive error messages in, must be at least CURLERRORSIZE bytes big. If this is not used, error messages go to stderr instead:
writefunction = 20_011Function that will be called to store the output (instead of fwrite). The parameters will use fwrite() syntax, make sure to follow them.
readfunctionFunction that will be called to read the input (instead of fread). The parameters will use fread() syntax, make sure to follow them.
timeout = 13Time-out the read operation after this amount of seconds
infilesizeIf the CURLOPT_INFILE is used, this can be used to inform libcurl about how large the file being sent really is. That allows better error checking and better verifies that the upload was successful...
postfields = 10_015POST static input fields.
refererSet the referrer page (needed by some CGIs)
ftpportSet the FTP PORT string (interface name, named or numerical IP address) Use i.e '-' to use default address.
useragentSet the User-Agent string (examined by some CGIs)
low_speed_limit = 19If the download receives less than "low speed limit" bytes/second during "low speed time" seconds, the operations is aborted. You could i.e if you have a pretty high speed connection, abort if it i...
low_speed_timeSet the "low speed time"
resume_fromSet the continuation offset.
cookie = 10_022Set cookie in request:
httpheaderThis points to a linked list of headers, struct curl_slist kind
httppostThis points to a linked list of post entries, struct curl_httppost
sslcertname of the file keeping your private SSL-certificate
keypasswdpassword for the SSL or SSH private key
crlf = 27send TYPE parameter?
quote = 10_028send linked-list of QUOTE commands
writeheadersend FILE or void to store headers to, if you use a callback it is simply passed to the callback unmodified
cookiefile = 10_031point to a file to read the initial cookies from, also enables "cookie awareness"
sslversion = 32What version to specifically try to use. See CURL_SSLVERSION defines below.
timeconditionWhat kind of HTTP time condition to use, see defines
timevalueTime to use with the above condition. Specified in number of seconds since 1 Jan 1970
customrequest = 10_036Custom request, for customizing the get command like HTTP: DELETE, TRACE and others FTP: to use a different list command
stderrHTTP request, for odd commands like DELETE, TRACE and others
postquote = 10_039send linked-list of post-transfer QUOTE commands
writeinfoPass a pointer to string of the output using full variable-replacement as described elsewhere.
verbose = 41talk a lot
headerthrow the header out too
noprogressshut off the progress meter
nobodyuse HEAD to get http document
failonerrorno output on http error codes >= 300
uploadthis is an upload
postHTTP POST method
dirlistonlyreturn bare names when listing directories
append = 50Append instead of overwrite on upload!
netrcSpecify whether to read the user+password from the .netrc or the URL. This must be one of the CURLNETRC* enums below.
followlocationuse Location: Luke!
transfertexttransfer data in text/ASCII format
putHTTP PUT
progressfunction = 20_056Function that will be called instead of the internal progress display function. This function should be defined as the curlprogresscallback prototype defines.
progressdata = 10_057Data passed to the progress callback
autoreferer = 58We want the referrer field set automatically when following locations
proxyportPort of the proxy, can be set in the proxy string as well with: `[host]:[port]`
postfieldsizesize of the POST input data, if strlen() is not good to use
httpproxytunneltunnel non-http operations through a HTTP proxy
intrface = 10_062Set the interface string to use as outgoing network interface
krblevelSet the krb4/5 security level, this also enables krb4/5 awareness. This is a string, 'clear', 'safe', 'confidential' or 'private'. If the string is set but doesn't match one of these, 'private' w...
ssl_verifypeer = 64Set if we should verify the peer in ssl handshake, set 1 to verify.
cainfo = 10_065The CApath or CAfile used to validate the peer certificate this option is used only if SSL_VERIFYPEER is true
maxredirs = 68Maximum number of http redirects to follow
filetimePass a long set to 1 to get the date of the requested document (if possible)! Pass a zero to shut it off.
telnetoptions = 10_070This points to a linked list of telnet options
maxconnects = 71Max amount of cached alive connections
closepolicyWhat policy to use when closing connections when the cache is filled up
fresh_connect = 74Set to explicitly use a new connection for the upcoming transfer. Do not use this unless you're absolutely sure of this, as it makes the operation slower and is less friendly for the network.
forbid_reuseSet to explicitly forbid the upcoming transfer's connection to be re-used when done. Do not use this unless you're absolutely sure of this, as it makes the operation slower and is less friendly for...
random_file = 10_076Set to a file name that contains random data for libcurl to use to seed the random engine when doing SSL connects.
egdsocketSet to the Entropy Gathering Daemon socket pathname
connecttimeout = 78Time-out connect operations after this amount of seconds, if connects are OK within this time, then fine... This only aborts the connect phase. [Only works on unix-style/SIGALRM operating systems]
headerfunction = 20_079Function that will be called to store headers (instead of fwrite). The parameters will use fwrite() syntax, make sure to follow them.
httpget = 80Set this to force the HTTP request to get back to GET. Only really usable if POST, PUT or a custom request have been used first.
ssl_verifyhostSet if we should verify the Common name from the peer certificate in ssl handshake, set 1 to check existence, 2 to ensure that it matches the provided hostname.
cookiejar = 10_082Specify which file name to write all known cookies in after completed operation. Set file name to "-" (dash) to make it go to stdout.
ssl_cipher_listSpecify which SSL ciphers to use
http_version = 84Specify which HTTP version to use! This must be set to one of the CURLHTTPVERSION* enums set below.
ftp_use_epsvSpecifically switch on or off the FTP engine's use of the EPSV command. By default, that one will always be attempted before the more traditional PASV command.
sslcerttype = 10_086type of the file keeping your SSL-certificate ("DER", "PEM", "ENG")
sslkeyname of the file keeping your private SSL-key
sslkeytypetype of the file keeping your private SSL-key ("DER", "PEM", "ENG")
sslenginecrypto engine for the SSL-sub system
sslengine_default = 90set the crypto engine for the SSL-sub system as default the param has no meaning...
dns_use_global_cacheNon-zero value means to use the global dns cache
dns_cache_timeoutDNS cache timeout
prequote = 10_093send linked-list of pre-transfer QUOTE commands
debugfunction = 20_094set the debug function
debugdata = 10_095set the data for the debug function
cookiesession = 96mark this as start of a cookie session
capath = 10_097The CApath directory used to validate the peer certificate this option is used only if SSL_VERIFYPEER is true
buffersize = 98Instruct libcurl to use a smaller receive buffer
nosignalInstruct libcurl to not use any signal/alarm handlers, even when using timeouts. This option is useful for multi-threaded applications. See libcurl-the-guide for more background information.
share = 10_100Provide a CURLShare for mutexing non-ts data
proxytype = 101indicates type of proxy. accepted values are CURLPROXYHTTP (default), CURLPROXYSOCKS4, CURLPROXYSOCKS4A and CURLPROXYSOCKS5.
encoding = 10_102Set the Accept-Encoding string. Use this to tell a server you would like the response to be compressed.
private_optSet pointer to private data
http200aliasesSet aliases for HTTP 200 in the HTTP Response header
unrestricted_auth = 105Continue to send authentication (user+password) when following locations, even when hostname changed. This can potentially send off the name and password to whatever host the server decides.
ftp_use_eprtSpecifically switch on or off the FTP engine's use of the EPRT command ( it also disables the LPRT attempt). By default, those ones will always be attempted before the good old traditional PORT com...
httpauthSet this to a bitmask value to enable the particular authentications methods you like. Use this in combination with CURLOPT_USERPWD. Note that setting multiple bits may cause extra network round-tr...
ssl_ctx_function = 20_108Set the ssl context callback function, currently only for OpenSSL sslctx in second argument. The function must be matching the curlsslctxcallback proto.
ssl_ctx_data = 10_109Set the userdata for the ssl context callback function's third argument
ftp_create_missing_dirs = 110FTP Option that causes missing dirs to be created on the remote server. In 7.19.4 we introduced the convenience enums for this option using the CURLFTPCREATEDIR prefix.
proxyauthSet this to a bitmask value to enable the particular authentications methods you like. Use this in combination with CURLOPT_PROXYUSERPWD. Note that setting multiple bits may cause extra network rou...
ftp_response_timeoutFTP option that changes the timeout, in seconds, associated with getting a response. This is different from transfer timeout time and essentially places a demand on the FTP server to acknowledge c...
ipresolveSet this option to one of the CURLIPRESOLVE* defines (see below) to tell libcurl to resolve names to those IP versions only. This only has affect on systems with support for more than one, i.e IPv4...
maxfilesizeSet this option to limit the size of a file that will be downloaded from an HTTP or FTP server.
infilesize_large = 30_115See the comment for INFILESIZE above, but in short, specifies the size of the file being uploaded. -1 means unknown.
resume_from_largeSets the continuation offset. There is also a LONG version of this; look above for RESUME_FROM.
maxfilesize_largeSets the maximum size of data that will be downloaded from an HTTP or FTP server. See MAXFILESIZE above for the LONG version.
netrc_file = 10_118Set this option to the file name of your .netrc file you want libcurl to parse (using the CURLOPT_NETRC option). If not set, libcurl will do a poor attempt to find the user's home directory and che...
use_ssl = 119Enable SSL/TLS for FTP, pick one of: CURLFTPSSLTRY - try using SSL, proceed anyway otherwise CURLFTPSSLCONTROL - SSL for the control connection or fail CURLFTPSSL_ALL - SSL for all communic...
postfieldsize_large = 30_120The LARGE version of the standard POSTFIELDSIZE option
tcp_nodelay = 121Enable/disable the TCP Nagle algorithm
ftpsslauth = 129When FTP over SSL/TLS is selected (with CURLOPTUSESSL), this option can be used to change libcurl's default action which is to first try "AUTH SSL" and then "AUTH TLS" in this order, and proceed wh...
ioctlfunction = 20_130
ioctldata = 10_131
ftp_account = 10_134zero terminated string for pass on to the FTP server when asked for "account" info
cookielistfeed cookies into cookie engine
ignore_content_length = 136ignore Content-Length
ftp_skip_pasv_ipSet to non-zero to skip the IP address received in a 227 PASV FTP server response. Typically used for FTP-SSL purposes but is not restricted to that. libcurl will then instead use the same IP addre...
ftp_filemethodSelect "file method" to use when doing FTP, see the curl_ftpmethod above.
localportLocal port number to bind the socket to
localportrangeNumber of ports to try, including the first one set with LOCALPORT. Thus, setting it to 1 will make no additional attempts but the first.
connect_onlyno transfer, set up connection and let application use the socket by extracting it with CURLINFO_LASTSOCKET
conv_from_network_function = 20_142Function that will be called to convert from the network encoding (instead of using the iconv calls in libcurl)
conv_to_network_functionFunction that will be called to convert to the network encoding (instead of using the iconv calls in libcurl)
conv_from_utf8_functionFunction that will be called to convert from UTF8 (instead of using the iconv calls in libcurl) Note that this is used only for SSL certificate processing
max_send_speed_large = 30_145If the connection proceeds too quickly then need to slow it down
max_recv_speed_largeditto
ftp_alternative_to_user = 10_147Pointer to command string to send if USER/PASS fails.
sockoptfunction = 20_148callback function for setting socket options
sockoptdata = 10_149
ssl_sessionid_cache = 150set to 0 to disable session ID re-use for this transfer, default is enabled (== 1)
ssh_auth_typesallowed SSH authentication methods
ssh_public_keyfile = 10_152Used by scp/sftp to do public/private key authentication
ssh_private_keyfile
ftp_ssl_ccc = 154Send CCC (Clear Command Channel) after authentication
timeout_msSame as TIMEOUT and CONNECTTIMEOUT, but with ms resolution
connecttimeout_msditto
http_transfer_decodingset to zero to disable the libcurl's decoding and thus pass the raw body data to the application even when it is encoded/compressed
http_content_decodingditto
new_file_permsPermission used when creating new files and directories on the remote server for protocols that support it, SFTP/SCP/FILE
new_directory_permsditto
postredirSet the behaviour of POST when redirecting. Values must be set to one of CURLREDIR* defines below. This used to be called CURLOPTPOST301
ssh_host_public_key_md5 = 10_162used by scp/sftp to verify the host's public key
opensocketfunction = 20_163Callback function for opening socket (instead of socket(2)). Optionally, callback is able change the address or refuse to connect returning CURLSOCKETBAD. The callback should have type curlopensoc...
opensocketdata = 10_164ditto
copypostfieldsPOST volatile input fields.
proxy_transfer_mode = 166set transfer mode (;type=a|i) when doing FTP via an HTTP proxy
seekfunction = 20_167Callback function for seeking in the input stream
seekdata = 10_168ditto
crlfileCRL file
issuercertIssuer certificate
address_scope = 171(IPv6) Address scope
certinfoCollect certificate chain info and allow it to get retrievable with CURLINFO_CERTINFO after the transfer is complete. (Unfortunately) only working with OpenSSL-powered builds.
username = 10_173"name" and "pwd" to use when fetching.
passwordditto
proxyusername"name" and "pwd" to use with Proxy when fetching.
proxypasswordditto
noproxyComma separated list of hostnames defining no-proxy zones. These should match both hostnames directly, and hostnames within a domain. For example, local.com will match local.com and www.local.com, ...
tftp_blksize = 178block size for TFTP transfers
socks5_gssapi_service = 10_179Socks Service
socks5_gssapi_nec = 180Socks Service
protocolsset the bitmask for the protocols that are allowed to be used for the transfer, which thus helps the app which takes URLs from users or other external inputs and want to restrict what protocol(s) t...
redir_protocolsset the bitmask for the protocols that libcurl is allowed to follow to, as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs to be set in both bitmasks to be allowed to get redi...
ssh_knownhosts = 10_183set the SSH knownhost file name to use
ssh_keyfunction = 20_184set the SSH host key callback, must point to a curl_sshkeycallback function
ssh_keydata = 10_185set the SSH host key callback custom pointer
mail_fromset the SMTP mail originator
mail_rcptset the SMTP mail receiver(s)
ftp_use_pret = 188FTP: send PRET before PASV
rtsp_requestRTSP request method (OPTIONS, SETUP, PLAY, etc...)
rtsp_session_id = 10_190The RTSP session identifier
rtsp_stream_uriThe RTSP stream URI
rtsp_transportThe Transport: header to use in RTSP requests
rtsp_client_cseq = 193Manually initialize the client RTSP CSeq for this handle
rtsp_server_cseqManually initialize the server RTSP CSeq for this handle
interleavedata = 10_195The stream to pass to INTERLEAVEFUNCTION.
interleavefunction = 20_196Let the application define a custom write method for RTP data
wildcardmatch = 197Turn on wildcard matching
chunk_bgn_function = 20_198Directory matching callback called before downloading of an individual file (chunk) started
chunk_end_functionDirectory matching callback called after the file (chunk) was downloaded, or skipped
fnmatch_functionChange match (fnmatch-like) callback for wildcard matching
chunk_data = 10_201Let the application define custom chunk data pointer
fnmatch_dataFNMATCH_FUNCTION user pointer
resolvesend linked-list of name:port:address sets
tlsauth_usernameSet a username for authenticated TLS
tlsauth_passwordSet a password for authenticated TLS
tlsauth_typeSet authentication type for authenticated TLS
lastentrythe last unused
writedata = fileconvenient alias
readdata = infileditto
headerdata = writeheaderditto
rtspheader = httpheaderditto
aliasCURLoption = int

Below here follows defines for the CURLOPT_IPRESOLVE option. If a host name resolves addresses using more than one IP protocol version, this option might be handy to force libcurl to use a specific IP version.

whatever = 0default, resolves addresses to all IP versions that your system allows
v4 = 1resolve to ipv4 addresses
v6 = 2resolve to ipv6 addresses

These enums are for use with the CURLOPT_HTTP_VERSION option.

nonesetting this means we don't care, and that we'd like the library to choose the best possible for us!
v1_0please use HTTP 1.0 in the request
v1_1please use HTTP 1.1 in the request
lastILLEGAL http version

Public API enums for RTSP requests

none
options
describe
announce
setup
play
pause
teardown
get_parameter
set_parameter
record
receive
last

These enums are for use with the CURLOPT_NETRC option.

ignoredThe .netrc will never be read. This is the default.
optional
requiredA user:password in the URL will be ignored. Unless one is set programmatically, the .netrc will be queried.
last
default_version
tlsv1
sslv2
sslv3
lastnever use
none
srp
lastnever use

symbols to use with CURLOPT_POSTREDIR. CURL_REDIR_POST_301 and CURL_REDIR_POST_302 can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302 == CURL_REDIR_POST_ALL

get_all = 0
post_301 = 1
post_302 = 2
post_all = (1 | 2)
none
ifmodsince
ifunmodsince
lastmod
last
aliascurl_TimeCond = int
nothingthe first one is unused ***********
copyname
ptrname
namelength
copycontents
ptrcontents
contentslength
filecontent
array
obsolete
file
buffer
bufferptr
bufferlength
contenttype
contentheader
filename
end
obsolete2
stream
lastentrythe last unused
aliasCURLformoption = int
structcurl_forms

structure to be used as parameter for CURLFORM_ARRAY

Fields
const(char) *value value

Use this for multipart formpost building

Returns code for curl_formadd()

Returns

  • CURL_FORMADD_OK on success
  • CURL_FORMADD_MEMORY if the FormInfo allocation fails
  • CURL_FORMADD_OPTION_TWICE if one option is given twice for one Form
  • CURL_FORMADD_NULL if a null pointer was given for a char
  • CURL_FORMADD_MEMORY if the allocation of a FormInfo struct failed
  • CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used
  • CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or error)
  • CURL_FORMADD_MEMORY if a curl_httppost struct cannot be allocated
  • CURL_FORMADD_MEMORY if some allocation for string copying failed.
  • CURL_FORMADD_ILLEGAL_ARRAY if an illegal option is used in an array
okfirst, no error
memory
option_twice
null_ptr
unknown_option
incomplete
illegal_array
disabledlibcurl was built with this disabled
last
aliasCURLFORMcode = int
aliascurl_formget_callback = size_t function(void * arg, const(char) * buf, size_t len)

callback function for curl_formget() The void *arg pointer will be the one passed as second argument to curl_formget(). The character buffer passed to it must not be freed. Should return the buffer length passed to it as the argument "len" on success.

structcurl_slist

linked-list structure for the CURLOPT_QUOTE option (and other)

Fields
char *data data
curl_slist *next next
structcurl_certinfo

info about the certificate chain, only for OpenSSL builds. Asked for with CURLOPT_CERTINFO / CURLINFO_CERTINFO

Fields
int num_of_certs
curl_slist * *certinfo certinfo
none
effective_url = 1_048_577
response_code = 2_097_154
total_time = 3_145_731
namelookup_time
connect_time
pretransfer_time
size_upload
size_download
speed_download
speed_upload
header_size = 2_097_163
request_size
ssl_verifyresult
filetime
content_length_download = 3_145_743
content_length_upload
starttransfer_time
content_type = 1_048_594
redirect_time = 3_145_747
redirect_count = 2_097_172
private_info = 1_048_597
http_connectcode = 2_097_174
httpauth_avail
proxyauth_avail
os_errno
num_connects
ssl_engines = 4_194_331
cookielist
lastsocket = 2_097_181
ftp_entry_path = 1_048_606
redirect_url
primary_ip
appconnect_time = 3_145_761
certinfo = 4_194_338
condition_unmet = 2_097_187
rtsp_session_id = 1_048_612
rtsp_client_cseq = 2_097_189
rtsp_server_cseq
rtsp_cseq_recv
primary_port
local_ip = 1_048_617
local_port = 2_097_194
lastone = 42Fill in new entries below here!
aliasCURLINFO = int
none
oldest
least_recently_used
least_traffic
slowest
callback
last
aliascurl_closepolicy = int
ssl = 1
win32 = 2
all = (1 | 2)
nothing = 0
default_ = (1 | 2)all

Setup defines, protos etc for the sharing stuff. Different data locks for a single share

none
shareCURLLOCKDATA_SHARE is used internally to say that the locking is just made to change the internal state of the share itself.
cookie
dns
ssl_session
connect
last
aliascurl_lock_data = int

Different lock access types

noneunspecified action
shared_accessfor read perhaps
singlefor write perhaps
lastnever use
aliascurl_lock_access = int
aliascurl_lock_function = void function(CURL * handle, curl_lock_data data, curl_lock_access locktype, void * userptr)
aliascurl_unlock_function = void function(CURL * handle, curl_lock_data data, void * userptr)
aliasCURLSH = void
okall is fine
bad_option1
in_use2
invalid3
nomemout of memory
lastnever use
aliasCURLSHcode = int

pass in a user data pointer used in the lock/unlock callback functions

nonedon't use
sharespecify a data type to share
unsharespecify which data type to stop sharing
lockfuncpass in a 'curllockfunction' pointer
unlockfuncpass in a 'curlunlockfunction' pointer
userdatapass in a user data pointer used in the lock/unlock callback functions
lastnever use
aliasCURLSHoption = int

Structures for querying information about the curl library at runtime.

first
second
third
fourth
last
aliasCURLversion = int
struct_N28
Fields
const(char) *version_ version_
uint version_num
const(char) *host host
int features
const(char) *ssl_version ssl_version
c_long ssl_version_num
const(char) *libz_version libz_version
const(char) * *protocols protocolsprotocols is terminated by an entry with a NULL protoname
const(char) *ares aresThe fields below this were added in CURLVERSION_SECOND
int ares_num
const(char) *libidn libidnThis field was added in CURLVERSION_THIRD
int iconv_ver_numThese field were added in CURLVERSIONFOURTH. Same as 'libiconvversion' if built with HAVEICONV
const(char) *libssh_version libssh_version
aliascurl_version_info_data = _N28
ipv6 = 1IPv6-enabled
kerberos4 = 2kerberos auth is supported
ssl = 4SSL options are present
libz = 8libz features are present
ntlm = 16NTLM auth is supported
gssnegotiate = 32Negotiate auth support
dbg = 64built with debug capabilities
asynchdns = 128asynchronous dns resolves
spnego = 256SPNEGO auth
largefile = 512supports files bigger than 2GB
idn = 1024International Domain Names support
sspi = 2048SSPI is supported
conv = 4096character conversions supported
curldebug = 8192debug memory tracking supported
tlsauth_srp = 16_384TLS-SRP auth is supported
recv = 1
recv_cont = 0
send = 4
send_cont = 0
all = (1 | 4)
cont = (0 | 0)
aliasCURLM = void
enumCurlM
call_multi_perform = - 1please call curlmultiperform() or curlmultisocket*() soon
ok
bad_handlethe passed-in handle is not a valid CURLM handle
bad_easy_handlean easy handle was not good/valid
out_of_memoryif you ever get this, you're in deep sh*t
internal_errorthis is a libcurl bug
bad_socketthe passed in socket argument did not match
unknown_optioncurlmultisetopt() with unsupported option
last
aliasCURLMcode = int
none
doneThis easy handle has completed. 'result' contains the CURLcode of the transfer
lastno used
aliasCURLMSG = int
union_N31
Fields
void *whatever whatever
CURLcode result
structCURLMsg
Fields
CURL *easy_handle easy_handle
_N31 data
aliasfd_set = int

Name: curl_multi_fdset()

Desc: Ask curl for its fd_set sets. The app can use these to select() or poll() on. We want curl_multi_perform() called as soon as one of them are ready.

Returns

CURLMcode type, general multi error code.

tmp decl

Name: curl_multi_socket() and curl_multi_socket_all()

Desc: An alternative version of curl_multi_perform() that allows the application to pass in one of the file descriptors that have been detected to have "action" on them and let libcurl perform. See man page for details.

none_ = 0jdrewsen - underscored in order not to clash with reserved D symbols
in_ = 1
out_ = 2
inout_ = 3
remove_ = 4
aliasCURL_SOCKET_TIMEOUT = CURL_SOCKET_BAD
in_ = 0x01jdrewsen - underscored in order not to clash with reserved D symbols
out_ = 0x02
err_ = 0x04
aliascurl_socket_callback = int function(CURL * easy, /** easy handle */ curl_socket_t s, /** socket */ int what, /** see above */ void * userp, /** private callback pointer */ void * socketp)

private socket pointer

aliascurl_multi_timer_callback = int function(CURLM * multi, /** multi handle */ c_long timeout_ms, /** see above */ void * userp)

Name: curl_multi_timer_callback

Desc: Called by libcurl whenever the library detects a change in the maximum number of milliseconds the app is allowed to wait before curl_multi_socket() or curl_multi_perform() must be called (to allow libcurl's timed events to take place).

Returns

The callback should return zero.

private callback pointer

socketfunction = 20_001This is the socket callback function pointer
socketdata = 10_002This is the argument passed to the socket callback
pipelining = 3set to 1 to enable pipelining for this multi handle
timerfunction = 20_004This is the timer callback function pointer
timerdata = 10_005This is the argument passed to the timer callback
maxconnects = 6maximum number of entries in the connection cache
lastentry
aliasCURLMoption = int

Functions 48

fnint curl_strequal(scope const(char) * s1, scope const(char) * s2)curlstrequal() and curlstrnequal() are subject for removal in a future libcurl, see lib/README.curlx for details
fnint curl_strnequal(scope const(char) * s1, scope const(char) * s2, size_t n)ditto
fnCURLFORMcode curl_formadd(curl_httppost * * httppost, curl_httppost * * last_post,...)Name: curl_formadd()
fnint curl_formget(curl_httppost * form, void * arg, curl_formget_callback append)Name: curl_formget()
fnvoid curl_formfree(curl_httppost * form)Name: curl_formfree()
fnchar * curl_getenv(scope const(char) * variable)Name: curl_getenv()
fnchar * curl_version()Name: curl_version()
fnchar * curl_easy_escape(CURL * handle, scope const(char) * string, int length)Name: curleasyescape()
fnchar * curl_escape(scope const(char) * string, int length)the previous version:
fnchar * curl_easy_unescape(CURL * handle, scope const(char) * string, int length, int * outlength)Name: curleasyunescape()
fnchar * curl_unescape(scope const(char) * string, int length)the previous version
fnvoid curl_free(void * p)Name: curl_free()
fnCURLcode curl_global_init(c_long flags)Name: curlglobalinit()
fnCURLcode curl_global_init_mem( c_long flags, curl_malloc_callback m, curl_free_callback f, curl_realloc_callback r, curl_strdup_callback s, curl_calloc_callback c )Name: curlglobalinit_mem()
fnvoid curl_global_cleanup()Name: curlglobalcleanup()
fncurl_slist * curl_slist_append(curl_slist *, const(char) *)Name: curlslistappend()
fnvoid curl_slist_free_all(curl_slist *)Name: curlslistfree_all()
fntime_t curl_getdate(const(char) * p, const(time_t) * unused)Name: curl_getdate()
fncurl_version_info_data * curl_version_info(CURLversion )Name: curlversioninfo()
fnconst(char) * curl_easy_strerror(CURLcode )Name: curleasystrerror()
fnconst(char) * curl_share_strerror(CURLSHcode )Name: curlsharestrerror()
fnCURLcode curl_easy_pause(CURL * handle, int bitmask)Name: curleasypause()
fnvoid curl_easy_cleanup(CURL * curl)
fnCURLcode curl_easy_getinfo(CURL * curl, CURLINFO info,...)Name: curleasygetinfo()
fnCURL * curl_easy_duphandle(CURL * curl)Name: curleasyduphandle()
fnvoid curl_easy_reset(CURL * curl)Name: curleasyreset()
fnCURLcode curl_easy_recv(CURL * curl, void * buffer, size_t buflen, size_t * n)Name: curleasyrecv()
fnCURLcode curl_easy_send(CURL * curl, void * buffer, size_t buflen, size_t * n)Name: curleasysend()
fnCURLM * curl_multi_init()Name: curlmultiinit()
fnCURLMcode curl_multi_add_handle(CURLM * multi_handle, CURL * curl_handle)Name: curlmultiadd_handle()
fnCURLMcode curl_multi_remove_handle(CURLM * multi_handle, CURL * curl_handle)Name: curlmultiremove_handle()
fnCURLMcode curl_multi_fdset( CURLM * multi_handle, fd_set * read_fd_set, fd_set * write_fd_set, fd_set * exc_fd_set, int * max_fd )
fnCURLMcode curl_multi_perform(CURLM * multi_handle, int * running_handles)Name: curlmultiperform()
fnCURLMcode curl_multi_cleanup(CURLM * multi_handle)Name: curlmulticleanup()
fnCURLMsg * curl_multi_info_read(CURLM * multi_handle, int * msgs_in_queue)Name: curlmultiinfo_read()
fnconst(char) * curl_multi_strerror(CURLMcode )Name: curlmultistrerror()
fnCURLMcode curl_multi_socket(CURLM * multi_handle, curl_socket_t s, int * running_handles)ditto
fnCURLMcode curl_multi_socket_action(CURLM * multi_handle, curl_socket_t s, int ev_bitmask, int * running_handles)ditto
fnCURLMcode curl_multi_socket_all(CURLM * multi_handle, int * running_handles)ditto
fnCURLMcode curl_multi_timeout(CURLM * multi_handle, c_long * milliseconds)This macro below was added in 7.16.3 to push users who recompile to use the new curlmultisocketaction() instead of the old curlmultisocket() Name: curlmulti_timeout()
fnCURLMcode curl_multi_setopt(CURLM * multi_handle, CURLMoption option,...)Name: curlmultisetopt()
fnCURLMcode curl_multi_assign(CURLM * multi_handle, curl_socket_t sockfd, void * sockp)Name: curlmultiassign()

Variables 36

enumvarLIBCURL_COPYRIGHT = "1996 - 2010 Daniel Stenberg, <daniel@haxx.se>."

This is the global package copyright

enumvarLIBCURL_VERSION = "7.21.4"

This is the version number of the libcurl package from which this header file origins:

enumvarLIBCURL_VERSION_MAJOR = 7

The numeric version number is also available "in parts" by using these constants

enumvarLIBCURL_VERSION_MINOR = 21

ditto

enumvarLIBCURL_VERSION_PATCH = 4

ditto

enumvarLIBCURL_VERSION_NUM = 0x071504

This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will always follow this syntax:

0xXXYYZZ

Where XX, YY and ZZ are the main version, release and patch numbers in hexadecimal (using 8 bits each). All three numbers are always represented using two digits. 1.2 would appear as "0x010200" while version 9.11.7 appears as "0x090b07".

This 6-digit (24 bits) hexadecimal number does not show pre-release number, and it is always a greater number in a more recent release. It makes comparisons with greater than and less than work.

enumvarLIBCURL_TIMESTAMP = "Thu Feb 17 12:19:40 UTC 2011"

This is the date and time when the full source package was created. The timestamp is not stored in git, as the timestamp is properly set in the tarballs by the maketgz script.

The format of the date should follow this template:

"Mon Feb 12 11:35:33 UTC 2007"

enumvarHTTPPOST_FILENAME = 1

specified content is a file name

enumvarHTTPPOST_READFILE = 2

specified content is a file name

enumvarHTTPPOST_PTRNAME = 4

name is only stored pointer do not free in formfree

enumvarHTTPPOST_PTRCONTENTS = 8

contents is only stored pointer do not free in formfree

enumvarHTTPPOST_BUFFER = 16

upload file from buffer

enumvarHTTPPOST_PTRBUFFER = 32

upload file from pointer contents

enumvarHTTPPOST_CALLBACK = 64

upload file contents by using the regular read callback to get the data and pass the given pointer as custom pointer

enumvarCURL_MAX_WRITE_SIZE = 16_384

Tests have proven that 20K is a very bad buffer size for uploads on Windows, while 16K for some odd reason performed a lot better. We do the ifndef check to allow this value to easier be changed at build time for those who feel adventurous. The practical minimum is about 400 bytes since libcurl uses a buffer of this size as a scratch area (unrelated to network send operations).

enumvarCURL_MAX_HTTP_HEADER = (100 * 1024)

The only reason to have a max limit for this is to avoid the risk of a bad server feeding libcurl with a never-ending header that will cause reallocs infinitely

enumvarCURL_WRITEFUNC_PAUSE = 0x10000001

This is a magic return code for the write callback that, when returned, will signal libcurl to pause receiving on the current transfer.

enumvarCURL_ERROR_SIZE = 256
enumvarCURLOPTTYPE_LONG = 0

long may be 32 or 64 bits, but we should never depend on anything else but 32

enumvarCURLOPTTYPE_OBJECTPOINT = 10_000

ditto

enumvarCURLOPTTYPE_FUNCTIONPOINT = 20_000

ditto

enumvarCURLOPTTYPE_OFF_T = 30_000

ditto

enumvarCURLOPT_SERVER_RESPONSE_TIMEOUT = CurlOption.ftp_response_timeout
enumvarCURLOPT_WRITEDATA = CurlOption.file

three convenient "aliases" that follow the name scheme better

enumvarCURLOPT_READDATA = CurlOption.infile

ditto

enumvarCURLOPT_HEADERDATA = CurlOption.writeheader

ditto

enumvarCURLOPT_RTSPHEADER = CurlOption.httpheader

ditto

enumvarCURLINFO_STRING = 0x100000
enumvarCURLINFO_LONG = 0x200000
enumvarCURLINFO_DOUBLE = 0x300000
enumvarCURLINFO_SLIST = 0x400000
enumvarCURLINFO_MASK = 0x0fffff
enumvarCURLINFO_TYPEMASK = 0xf00000
enumvarCURLINFO_HTTP_CODE = CurlInfo.response_code

CURLINFO_RESPONSE_CODE is the new name for the option previously known as CURLINFO_HTTP_CODE

enumvarCURLVERSION_NOW = CurlVer.fourth

The 'CURLVERSION_NOW' is the symbolic name meant to be used by basically all programs ever that want to get version information. It is meant to be a built-in version number for what kind of struct the caller expects. If the struct ever changes, we redefine the NOW to another enum from above.

enumvarCURLM_CALL_MULTI_SOCKET = CurlM.call_multi_perform

just to make code nicer when using curl_multi_socket() you can now check for CURLM_CALL_MULTI_SOCKET too in the same style it works for curl_multi_perform() and CURLM_CALL_MULTI_PERFORM