summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/include/curl/curl.h
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmcurl/include/curl/curl.h')
-rw-r--r--Utilities/cmcurl/include/curl/curl.h243
1 files changed, 154 insertions, 89 deletions
diff --git a/Utilities/cmcurl/include/curl/curl.h b/Utilities/cmcurl/include/curl/curl.h
index 86ce1ff..dfaea5d 100644
--- a/Utilities/cmcurl/include/curl/curl.h
+++ b/Utilities/cmcurl/include/curl/curl.h
@@ -7,11 +7,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, 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.
+ * are also available at https://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
@@ -24,10 +24,10 @@
/*
* If you have libcurl problems, all docs and details are found here:
- * http://curl.haxx.se/libcurl/
+ * https://curl.haxx.se/libcurl/
*
* curl-library mailing list subscription and unsubscription web interface:
- * http://cool.haxx.se/mailman/listinfo/curl-library/
+ * https://cool.haxx.se/mailman/listinfo/curl-library/
*/
#include "curlver.h" /* libcurl version defines */
@@ -56,7 +56,8 @@
#include <time.h>
#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__)
-#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || defined(__LWIP_OPT_H__))
+#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || \
+ defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H))
/* The check above prevents the winsock2 inclusion if winsock.h already was
included, since they can't co-exist without problems */
#include <winsock2.h>
@@ -90,7 +91,13 @@
extern "C" {
#endif
+#if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER)
+typedef struct Curl_easy CURL;
+typedef struct Curl_share CURLSH;
+#else
typedef void CURL;
+typedef void CURLSH;
+#endif
/*
* libcurl external API function linkage decorations.
@@ -112,7 +119,7 @@ typedef void CURL;
#ifndef curl_socket_typedef
/* socket typedef */
-#if defined(WIN32) && !defined(__LWIP_OPT_H__)
+#if defined(WIN32) && !defined(__LWIP_OPT_H__) && !defined(LWIP_HDR_OPT_H)
typedef SOCKET curl_socket_t;
#define CURL_SOCKET_BAD INVALID_SOCKET
#else
@@ -127,7 +134,8 @@ struct curl_httppost {
char *name; /* pointer to allocated name */
long namelength; /* length of name length */
char *contents; /* pointer to allocated data contents */
- long contentslength; /* length of contents field */
+ long contentslength; /* length of contents field, see also
+ CURL_HTTPPOST_LARGE */
char *buffer; /* pointer to allocated buffer contents */
long bufferlength; /* length of buffer field */
char *contenttype; /* Content-Type */
@@ -136,24 +144,33 @@ struct curl_httppost {
file, this link should link to following
files */
long flags; /* as defined below */
-#define HTTPPOST_FILENAME (1<<0) /* specified content is a file name */
-#define HTTPPOST_READFILE (1<<1) /* specified content is a file name */
-#define HTTPPOST_PTRNAME (1<<2) /* name is only stored pointer
- do not free in formfree */
-#define HTTPPOST_PTRCONTENTS (1<<3) /* contents is only stored pointer
- do not free in formfree */
-#define HTTPPOST_BUFFER (1<<4) /* upload file from buffer */
-#define HTTPPOST_PTRBUFFER (1<<5) /* upload file from pointer contents */
-#define HTTPPOST_CALLBACK (1<<6) /* upload file contents by using the
- regular read callback to get the data
- and pass the given pointer as custom
- pointer */
+
+/* specified content is a file name */
+#define CURL_HTTPPOST_FILENAME (1<<0)
+/* specified content is a file name */
+#define CURL_HTTPPOST_READFILE (1<<1)
+/* name is only stored pointer do not free in formfree */
+#define CURL_HTTPPOST_PTRNAME (1<<2)
+/* contents is only stored pointer do not free in formfree */
+#define CURL_HTTPPOST_PTRCONTENTS (1<<3)
+/* upload file from buffer */
+#define CURL_HTTPPOST_BUFFER (1<<4)
+/* upload file from pointer contents */
+#define CURL_HTTPPOST_PTRBUFFER (1<<5)
+/* upload file contents by using the regular read callback to get the data and
+ pass the given pointer as custom pointer */
+#define CURL_HTTPPOST_CALLBACK (1<<6)
+/* use size in 'contentlen', added in 7.46.0 */
+#define CURL_HTTPPOST_LARGE (1<<7)
char *showfilename; /* The file name to show. If not set, the
actual file name will be used (if this
is a file part) */
void *userp; /* custom pointer used for
HTTPPOST_CALLBACK posts */
+ curl_off_t contentlen; /* alternative length of contents
+ field. Used if CURL_HTTPPOST_LARGE is
+ set. Added in 7.46.0 */
};
/* This is the CURLOPT_PROGRESSFUNCTION callback proto. It is now considered
@@ -362,6 +379,7 @@ typedef curlioerr (*curl_ioctl_callback)(CURL *handle,
int cmd,
void *clientp);
+#ifndef CURL_DID_MEMORY_FUNC_TYPEDEFS
/*
* The following typedef's are signatures of malloc, free, realloc, strdup and
* calloc respectively. Function pointers of these types can be passed to the
@@ -374,6 +392,9 @@ typedef void *(*curl_realloc_callback)(void *ptr, size_t size);
typedef char *(*curl_strdup_callback)(const char *str);
typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size);
+#define CURL_DID_MEMORY_FUNC_TYPEDEFS
+#endif
+
/* the kind of data that is passed to information_callback*/
typedef enum {
CURLINFO_TEXT = 0,
@@ -460,9 +481,9 @@ typedef enum {
CURLE_OBSOLETE44, /* 44 - NOT USED */
CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */
CURLE_OBSOLETE46, /* 46 - NOT USED */
- CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */
+ CURLE_TOO_MANY_REDIRECTS, /* 47 - catch endless re-direct loops */
CURLE_UNKNOWN_OPTION, /* 48 - User specified an unknown option */
- CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */
+ CURLE_TELNET_OPTION_SYNTAX, /* 49 - Malformed telnet option */
CURLE_OBSOLETE50, /* 50 - NOT USED */
CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint
wasn't verified fine */
@@ -524,6 +545,8 @@ typedef enum {
CURLE_SSL_PINNEDPUBKEYNOTMATCH, /* 90 - specified pinned public key did not
match */
CURLE_SSL_INVALIDCERTSTATUS, /* 91 - invalid certificate status */
+ CURLE_HTTP2_STREAM, /* 92 - stream error in HTTP/2 framing layer
+ */
CURL_LAST /* never use! */
} CURLcode;
@@ -818,9 +841,13 @@ typedef enum {
but 32 */
#define CURLOPTTYPE_LONG 0
#define CURLOPTTYPE_OBJECTPOINT 10000
+#define CURLOPTTYPE_STRINGPOINT 10000
#define CURLOPTTYPE_FUNCTIONPOINT 20000
#define CURLOPTTYPE_OFF_T 30000
+/* *STRINGPOINT is an alias for OBJECTPOINT to allow tools to extract the
+ string options from the header file */
+
/* name is uppercase CURLOPT_<name>,
type is one of the defined CURLOPTTYPE_<type>
number is unique identifier */
@@ -834,6 +861,7 @@ typedef enum {
/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
#define LONG CURLOPTTYPE_LONG
#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT
+#define STRINGPOINT CURLOPTTYPE_OBJECTPOINT
#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT
#define OFF_T CURLOPTTYPE_OFF_T
#define CINIT(name,type,number) CURLOPT_/**/name = type + number
@@ -850,22 +878,22 @@ typedef enum {
CINIT(WRITEDATA, OBJECTPOINT, 1),
/* The full URL to get/put */
- CINIT(URL, OBJECTPOINT, 2),
+ CINIT(URL, STRINGPOINT, 2),
/* Port number to connect to, if other than default. */
CINIT(PORT, LONG, 3),
/* Name of proxy to use. */
- CINIT(PROXY, OBJECTPOINT, 4),
+ CINIT(PROXY, STRINGPOINT, 4),
/* "user:password;options" to use when fetching. */
- CINIT(USERPWD, OBJECTPOINT, 5),
+ CINIT(USERPWD, STRINGPOINT, 5),
/* "user:password" to use with proxy. */
- CINIT(PROXYUSERPWD, OBJECTPOINT, 6),
+ CINIT(PROXYUSERPWD, STRINGPOINT, 6),
/* Range to get, specified as an ASCII string. */
- CINIT(RANGE, OBJECTPOINT, 7),
+ CINIT(RANGE, STRINGPOINT, 7),
/* not used */
@@ -902,14 +930,14 @@ typedef enum {
CINIT(POSTFIELDS, OBJECTPOINT, 15),
/* Set the referrer page (needed by some CGIs) */
- CINIT(REFERER, OBJECTPOINT, 16),
+ CINIT(REFERER, STRINGPOINT, 16),
/* Set the FTP PORT string (interface name, named or numerical IP address)
Use i.e '-' to use default address. */
- CINIT(FTPPORT, OBJECTPOINT, 17),
+ CINIT(FTPPORT, STRINGPOINT, 17),
/* Set the User-Agent string (examined by some CGIs) */
- CINIT(USERAGENT, OBJECTPOINT, 18),
+ CINIT(USERAGENT, STRINGPOINT, 18),
/* If the download receives less than "low speed limit" bytes/second
* during "low speed time" seconds, the operations is aborted.
@@ -932,7 +960,7 @@ typedef enum {
CINIT(RESUME_FROM, LONG, 21),
/* Set cookie in request: */
- CINIT(COOKIE, OBJECTPOINT, 22),
+ CINIT(COOKIE, STRINGPOINT, 22),
/* This points to a linked list of headers, struct curl_slist kind. This
list is also used for RTSP (in spite of its name) */
@@ -942,10 +970,10 @@ typedef enum {
CINIT(HTTPPOST, OBJECTPOINT, 24),
/* name of the file keeping your private SSL-certificate */
- CINIT(SSLCERT, OBJECTPOINT, 25),
+ CINIT(SSLCERT, STRINGPOINT, 25),
/* password for the SSL or SSH private key */
- CINIT(KEYPASSWD, OBJECTPOINT, 26),
+ CINIT(KEYPASSWD, STRINGPOINT, 26),
/* send TYPE parameter? */
CINIT(CRLF, LONG, 27),
@@ -959,7 +987,7 @@ typedef enum {
/* point to a file to read the initial cookies from, also enables
"cookie awareness" */
- CINIT(COOKIEFILE, OBJECTPOINT, 31),
+ CINIT(COOKIEFILE, STRINGPOINT, 31),
/* What version to specifically try to use.
See CURL_SSLVERSION defines below. */
@@ -978,9 +1006,9 @@ typedef enum {
HTTP: DELETE, TRACE and others
FTP: to use a different list command
*/
- CINIT(CUSTOMREQUEST, OBJECTPOINT, 36),
+ CINIT(CUSTOMREQUEST, STRINGPOINT, 36),
- /* HTTP request, for odd commands like DELETE, TRACE and others */
+ /* FILE handle to use instead of stderr */
CINIT(STDERR, OBJECTPOINT, 37),
/* 38 is not used */
@@ -1037,19 +1065,19 @@ typedef enum {
CINIT(HTTPPROXYTUNNEL, LONG, 61),
/* Set the interface string to use as outgoing network interface */
- CINIT(INTERFACE, OBJECTPOINT, 62),
+ CINIT(INTERFACE, STRINGPOINT, 62),
/* Set 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' will be used. */
- CINIT(KRBLEVEL, OBJECTPOINT, 63),
+ CINIT(KRBLEVEL, STRINGPOINT, 63),
/* Set if we should verify the peer in ssl handshake, set 1 to verify. */
CINIT(SSL_VERIFYPEER, LONG, 64),
/* The CApath or CAfile used to validate the peer certificate
this option is used only if SSL_VERIFYPEER is true */
- CINIT(CAINFO, OBJECTPOINT, 65),
+ CINIT(CAINFO, STRINGPOINT, 65),
/* 66 = OBSOLETE */
/* 67 = OBSOLETE */
@@ -1083,10 +1111,10 @@ typedef enum {
/* Set to a file name that contains random data for libcurl to use to
seed the random engine when doing SSL connects. */
- CINIT(RANDOM_FILE, OBJECTPOINT, 76),
+ CINIT(RANDOM_FILE, STRINGPOINT, 76),
/* Set to the Entropy Gathering Daemon socket pathname */
- CINIT(EGDSOCKET, OBJECTPOINT, 77),
+ CINIT(EGDSOCKET, STRINGPOINT, 77),
/* Time-out connect operations after this amount of seconds, if connects are
OK within this time, then fine... This only aborts the connect phase. */
@@ -1108,10 +1136,10 @@ typedef enum {
/* Specify which file name to write all known cookies in after completed
operation. Set file name to "-" (dash) to make it go to stdout. */
- CINIT(COOKIEJAR, OBJECTPOINT, 82),
+ CINIT(COOKIEJAR, STRINGPOINT, 82),
/* Specify which SSL ciphers to use */
- CINIT(SSL_CIPHER_LIST, OBJECTPOINT, 83),
+ CINIT(SSL_CIPHER_LIST, STRINGPOINT, 83),
/* Specify which HTTP version to use! This must be set to one of the
CURL_HTTP_VERSION* enums set below. */
@@ -1123,16 +1151,16 @@ typedef enum {
CINIT(FTP_USE_EPSV, LONG, 85),
/* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */
- CINIT(SSLCERTTYPE, OBJECTPOINT, 86),
+ CINIT(SSLCERTTYPE, STRINGPOINT, 86),
/* name of the file keeping your private SSL-key */
- CINIT(SSLKEY, OBJECTPOINT, 87),
+ CINIT(SSLKEY, STRINGPOINT, 87),
/* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */
- CINIT(SSLKEYTYPE, OBJECTPOINT, 88),
+ CINIT(SSLKEYTYPE, STRINGPOINT, 88),
/* crypto engine for the SSL-sub system */
- CINIT(SSLENGINE, OBJECTPOINT, 89),
+ CINIT(SSLENGINE, STRINGPOINT, 89),
/* set the crypto engine for the SSL-sub system as default
the param has no meaning...
@@ -1159,7 +1187,7 @@ typedef enum {
/* The CApath directory used to validate the peer certificate
this option is used only if SSL_VERIFYPEER is true */
- CINIT(CAPATH, OBJECTPOINT, 97),
+ CINIT(CAPATH, STRINGPOINT, 97),
/* Instruct libcurl to use a smaller receive buffer */
CINIT(BUFFERSIZE, LONG, 98),
@@ -1179,7 +1207,7 @@ typedef enum {
/* Set the Accept-Encoding string. Use this to tell a server you would like
the response to be compressed. Before 7.21.6, this was known as
CURLOPT_ENCODING */
- CINIT(ACCEPT_ENCODING, OBJECTPOINT, 102),
+ CINIT(ACCEPT_ENCODING, STRINGPOINT, 102),
/* Set pointer to private data */
CINIT(PRIVATE, OBJECTPOINT, 103),
@@ -1260,7 +1288,7 @@ typedef enum {
to parse (using the CURLOPT_NETRC option). If not set, libcurl will do
a poor attempt to find the user's home directory and check for a .netrc
file in there. */
- CINIT(NETRC_FILE, OBJECTPOINT, 118),
+ CINIT(NETRC_FILE, STRINGPOINT, 118),
/* Enable SSL/TLS for FTP, pick one of:
CURLUSESSL_TRY - try using SSL, proceed anyway otherwise
@@ -1303,10 +1331,10 @@ typedef enum {
/* zero terminated string for pass on to the FTP server when asked for
"account" info */
- CINIT(FTP_ACCOUNT, OBJECTPOINT, 134),
+ CINIT(FTP_ACCOUNT, STRINGPOINT, 134),
- /* feed cookies into cookie engine */
- CINIT(COOKIELIST, OBJECTPOINT, 135),
+ /* feed cookie into cookie engine */
+ CINIT(COOKIELIST, STRINGPOINT, 135),
/* ignore Content-Length */
CINIT(IGNORE_CONTENT_LENGTH, LONG, 136),
@@ -1352,7 +1380,7 @@ typedef enum {
CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146),
/* Pointer to command string to send if USER/PASS fails. */
- CINIT(FTP_ALTERNATIVE_TO_USER, OBJECTPOINT, 147),
+ CINIT(FTP_ALTERNATIVE_TO_USER, STRINGPOINT, 147),
/* callback function for setting socket options */
CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148),
@@ -1366,8 +1394,8 @@ typedef enum {
CINIT(SSH_AUTH_TYPES, LONG, 151),
/* Used by scp/sftp to do public/private key authentication */
- CINIT(SSH_PUBLIC_KEYFILE, OBJECTPOINT, 152),
- CINIT(SSH_PRIVATE_KEYFILE, OBJECTPOINT, 153),
+ CINIT(SSH_PUBLIC_KEYFILE, STRINGPOINT, 152),
+ CINIT(SSH_PRIVATE_KEYFILE, STRINGPOINT, 153),
/* Send CCC (Clear Command Channel) after authentication */
CINIT(FTP_SSL_CCC, LONG, 154),
@@ -1391,7 +1419,7 @@ typedef enum {
CINIT(POSTREDIR, LONG, 161),
/* used by scp/sftp to verify the host's public key */
- CINIT(SSH_HOST_PUBLIC_KEY_MD5, OBJECTPOINT, 162),
+ CINIT(SSH_HOST_PUBLIC_KEY_MD5, STRINGPOINT, 162),
/* Callback function for opening socket (instead of socket(2)). Optionally,
callback is able change the address or refuse to connect returning
@@ -1411,10 +1439,10 @@ typedef enum {
CINIT(SEEKDATA, OBJECTPOINT, 168),
/* CRL file */
- CINIT(CRLFILE, OBJECTPOINT, 169),
+ CINIT(CRLFILE, STRINGPOINT, 169),
/* Issuer certificate */
- CINIT(ISSUERCERT, OBJECTPOINT, 170),
+ CINIT(ISSUERCERT, STRINGPOINT, 170),
/* (IPv6) Address scope */
CINIT(ADDRESS_SCOPE, LONG, 171),
@@ -1424,12 +1452,12 @@ typedef enum {
CINIT(CERTINFO, LONG, 172),
/* "name" and "pwd" to use when fetching. */
- CINIT(USERNAME, OBJECTPOINT, 173),
- CINIT(PASSWORD, OBJECTPOINT, 174),
+ CINIT(USERNAME, STRINGPOINT, 173),
+ CINIT(PASSWORD, STRINGPOINT, 174),
/* "name" and "pwd" to use with Proxy when fetching. */
- CINIT(PROXYUSERNAME, OBJECTPOINT, 175),
- CINIT(PROXYPASSWORD, OBJECTPOINT, 176),
+ CINIT(PROXYUSERNAME, STRINGPOINT, 175),
+ CINIT(PROXYPASSWORD, STRINGPOINT, 176),
/* Comma separated list of hostnames defining no-proxy zones. These should
match both hostnames directly, and hostnames within a domain. For
@@ -1438,13 +1466,13 @@ typedef enum {
implementations of this, .local.com will be considered to be the same as
local.com. A single * is the only valid wildcard, and effectively
disables the use of proxy. */
- CINIT(NOPROXY, OBJECTPOINT, 177),
+ CINIT(NOPROXY, STRINGPOINT, 177),
/* block size for TFTP transfers */
CINIT(TFTP_BLKSIZE, LONG, 178),
/* Socks Service */
- CINIT(SOCKS5_GSSAPI_SERVICE, OBJECTPOINT, 179),
+ CINIT(SOCKS5_GSSAPI_SERVICE, STRINGPOINT, 179), /* DEPRECATED, do not use! */
/* Socks Service */
CINIT(SOCKS5_GSSAPI_NEC, LONG, 180),
@@ -1462,7 +1490,7 @@ typedef enum {
CINIT(REDIR_PROTOCOLS, LONG, 182),
/* set the SSH knownhost file name to use */
- CINIT(SSH_KNOWNHOSTS, OBJECTPOINT, 183),
+ CINIT(SSH_KNOWNHOSTS, STRINGPOINT, 183),
/* set the SSH host key callback, must point to a curl_sshkeycallback
function */
@@ -1472,9 +1500,9 @@ typedef enum {
CINIT(SSH_KEYDATA, OBJECTPOINT, 185),
/* set the SMTP mail originator */
- CINIT(MAIL_FROM, OBJECTPOINT, 186),
+ CINIT(MAIL_FROM, STRINGPOINT, 186),
- /* set the SMTP mail receiver(s) */
+ /* set the list of SMTP mail receiver(s) */
CINIT(MAIL_RCPT, OBJECTPOINT, 187),
/* FTP: send PRET before PASV */
@@ -1484,13 +1512,13 @@ typedef enum {
CINIT(RTSP_REQUEST, LONG, 189),
/* The RTSP session identifier */
- CINIT(RTSP_SESSION_ID, OBJECTPOINT, 190),
+ CINIT(RTSP_SESSION_ID, STRINGPOINT, 190),
/* The RTSP stream URI */
- CINIT(RTSP_STREAM_URI, OBJECTPOINT, 191),
+ CINIT(RTSP_STREAM_URI, STRINGPOINT, 191),
/* The Transport: header to use in RTSP requests */
- CINIT(RTSP_TRANSPORT, OBJECTPOINT, 192),
+ CINIT(RTSP_TRANSPORT, STRINGPOINT, 192),
/* Manually initialize the client RTSP CSeq for this handle */
CINIT(RTSP_CLIENT_CSEQ, LONG, 193),
@@ -1528,13 +1556,13 @@ typedef enum {
CINIT(RESOLVE, OBJECTPOINT, 203),
/* Set a username for authenticated TLS */
- CINIT(TLSAUTH_USERNAME, OBJECTPOINT, 204),
+ CINIT(TLSAUTH_USERNAME, STRINGPOINT, 204),
/* Set a password for authenticated TLS */
- CINIT(TLSAUTH_PASSWORD, OBJECTPOINT, 205),
+ CINIT(TLSAUTH_PASSWORD, STRINGPOINT, 205),
/* Set authentication type for authenticated TLS */
- CINIT(TLSAUTH_TYPE, OBJECTPOINT, 206),
+ CINIT(TLSAUTH_TYPE, STRINGPOINT, 206),
/* Set to 1 to enable the "TE:" header in HTTP requests to ask for
compressed transfer-encoded responses. Set to 0 to disable the use of TE:
@@ -1557,7 +1585,7 @@ typedef enum {
CINIT(GSSAPI_DELEGATION, LONG, 210),
/* Set the name servers to use for DNS resolution */
- CINIT(DNS_SERVERS, OBJECTPOINT, 211),
+ CINIT(DNS_SERVERS, STRINGPOINT, 211),
/* Time-out accept operations (currently for FTP only) after this amount
of miliseconds. */
@@ -1574,7 +1602,7 @@ typedef enum {
CINIT(SSL_OPTIONS, LONG, 216),
/* Set the SMTP auth originator */
- CINIT(MAIL_AUTH, OBJECTPOINT, 217),
+ CINIT(MAIL_AUTH, STRINGPOINT, 217),
/* Enable/disable SASL initial response */
CINIT(SASL_IR, LONG, 218),
@@ -1585,23 +1613,23 @@ typedef enum {
CINIT(XFERINFOFUNCTION, FUNCTIONPOINT, 219),
/* The XOAUTH2 bearer token */
- CINIT(XOAUTH2_BEARER, OBJECTPOINT, 220),
+ CINIT(XOAUTH2_BEARER, STRINGPOINT, 220),
/* Set the interface string to use as outgoing network
* interface for DNS requests.
* Only supported by the c-ares DNS backend */
- CINIT(DNS_INTERFACE, OBJECTPOINT, 221),
+ CINIT(DNS_INTERFACE, STRINGPOINT, 221),
/* Set the local IPv4 address to use for outgoing DNS requests.
* Only supported by the c-ares DNS backend */
- CINIT(DNS_LOCAL_IP4, OBJECTPOINT, 222),
+ CINIT(DNS_LOCAL_IP4, STRINGPOINT, 222),
/* Set the local IPv4 address to use for outgoing DNS requests.
* Only supported by the c-ares DNS backend */
- CINIT(DNS_LOCAL_IP6, OBJECTPOINT, 223),
+ CINIT(DNS_LOCAL_IP6, STRINGPOINT, 223),
/* Set authentication options directly */
- CINIT(LOGIN_OPTIONS, OBJECTPOINT, 224),
+ CINIT(LOGIN_OPTIONS, STRINGPOINT, 224),
/* Enable/disable TLS NPN extension (http2 over ssl might fail without) */
CINIT(SSL_ENABLE_NPN, LONG, 225),
@@ -1622,10 +1650,10 @@ typedef enum {
/* The public key in DER form used to validate the peer public key
this option is used only if SSL_VERIFYPEER is true */
- CINIT(PINNEDPUBLICKEY, OBJECTPOINT, 230),
+ CINIT(PINNEDPUBLICKEY, STRINGPOINT, 230),
/* Path to Unix domain socket */
- CINIT(UNIX_SOCKET_PATH, OBJECTPOINT, 231),
+ CINIT(UNIX_SOCKET_PATH, STRINGPOINT, 231),
/* Set if we should verify the certificate status. */
CINIT(SSL_VERIFYSTATUS, LONG, 232),
@@ -1637,14 +1665,36 @@ typedef enum {
CINIT(PATH_AS_IS, LONG, 234),
/* Proxy Service Name */
- CINIT(PROXY_SERVICE_NAME, OBJECTPOINT, 235),
+ CINIT(PROXY_SERVICE_NAME, STRINGPOINT, 235),
/* Service Name */
- CINIT(SERVICE_NAME, OBJECTPOINT, 236),
+ CINIT(SERVICE_NAME, STRINGPOINT, 236),
/* Wait/don't wait for pipe/mutex to clarify */
CINIT(PIPEWAIT, LONG, 237),
+ /* Set the protocol used when curl is given a URL without a protocol */
+ CINIT(DEFAULT_PROTOCOL, STRINGPOINT, 238),
+
+ /* Set stream weight, 1 - 256 (default is 16) */
+ CINIT(STREAM_WEIGHT, LONG, 239),
+
+ /* Set stream dependency on another CURL handle */
+ CINIT(STREAM_DEPENDS, OBJECTPOINT, 240),
+
+ /* Set E-xclusive stream dependency on another CURL handle */
+ CINIT(STREAM_DEPENDS_E, OBJECTPOINT, 241),
+
+ /* Do not send any tftp option requests to the server */
+ CINIT(TFTP_NO_OPTIONS, LONG, 242),
+
+ /* Linked-list of host:port:connect-to-host:connect-to-port,
+ overrides the URL's host:port (only for the network layer) */
+ CINIT(CONNECT_TO, OBJECTPOINT, 243),
+
+ /* Set TCP Fast Open */
+ CINIT(TCP_FASTOPEN, LONG, 244),
+
CURLOPT_LASTENTRY /* the last unused */
} CURLoption;
@@ -1694,7 +1744,10 @@ enum {
for us! */
CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */
CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */
- CURL_HTTP_VERSION_2_0, /* please use HTTP 2.0 in the request */
+ CURL_HTTP_VERSION_2_0, /* please use HTTP 2 in the request */
+ CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */
+ CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, /* please use HTTP 2 without HTTP/1.1
+ Upgrade */
CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */
};
@@ -1819,6 +1872,7 @@ typedef enum {
CFINIT(OBSOLETE2),
CFINIT(STREAM),
+ CFINIT(CONTENTLEN), /* added in 7.46.0, provide a curl_off_t length */
CURLFORM_LASTENTRY /* the last unused */
} CURLformoption;
@@ -2073,12 +2127,18 @@ typedef enum {
CURLSSLBACKEND_CYASSL = 7,
CURLSSLBACKEND_SCHANNEL = 8,
CURLSSLBACKEND_DARWINSSL = 9,
- CURLSSLBACKEND_AXTLS = 10
+ CURLSSLBACKEND_AXTLS = 10,
+ CURLSSLBACKEND_MBEDTLS = 11
} curl_sslbackend;
+/* aliases for library clones and renames */
+#define CURLSSLBACKEND_LIBRESSL 1
+#define CURLSSLBACKEND_BORINGSSL 1
+#define CURLSSLBACKEND_WOLFSSL 6
+
/* Information about the SSL library used and the respective internal SSL
handle, which can be used to obtain further information regarding the
- connection. Asked for with CURLINFO_TLS_SESSION. */
+ connection. Asked for with CURLINFO_TLS_SSL_PTR or CURLINFO_TLS_SESSION. */
struct curl_tlssessioninfo {
curl_sslbackend backend;
void *internals;
@@ -2088,6 +2148,7 @@ struct curl_tlssessioninfo {
#define CURLINFO_LONG 0x200000
#define CURLINFO_DOUBLE 0x300000
#define CURLINFO_SLIST 0x400000
+#define CURLINFO_SOCKET 0x500000
#define CURLINFO_MASK 0x0fffff
#define CURLINFO_TYPEMASK 0xf00000
@@ -2136,9 +2197,12 @@ typedef enum {
CURLINFO_LOCAL_IP = CURLINFO_STRING + 41,
CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42,
CURLINFO_TLS_SESSION = CURLINFO_SLIST + 43,
+ CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44,
+ CURLINFO_TLS_SSL_PTR = CURLINFO_SLIST + 45,
+ CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46,
/* Fill in new entries below here! */
- CURLINFO_LASTONE = 43
+ CURLINFO_LASTONE = 46
} CURLINFO;
/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
@@ -2200,7 +2264,6 @@ typedef void (*curl_unlock_function)(CURL *handle,
curl_lock_data data,
void *userptr);
-typedef void CURLSH;
typedef enum {
CURLSHE_OK, /* all is fine */
@@ -2298,6 +2361,8 @@ typedef struct {
#define CURL_VERSION_GSSAPI (1<<17) /* Built against a GSS-API library */
#define CURL_VERSION_KERBEROS5 (1<<18) /* Kerberos V5 auth is supported */
#define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */
+#define CURL_VERSION_PSL (1<<20) /* Mozilla's Public Suffix List, used
+ for cookie domain verification */
/*
* NAME curl_version_info()