annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/curl/curl.h @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 #ifndef CURLINC_CURL_H
jpayne@69 2 #define CURLINC_CURL_H
jpayne@69 3 /***************************************************************************
jpayne@69 4 * _ _ ____ _
jpayne@69 5 * Project ___| | | | _ \| |
jpayne@69 6 * / __| | | | |_) | |
jpayne@69 7 * | (__| |_| | _ <| |___
jpayne@69 8 * \___|\___/|_| \_\_____|
jpayne@69 9 *
jpayne@69 10 * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
jpayne@69 11 *
jpayne@69 12 * This software is licensed as described in the file COPYING, which
jpayne@69 13 * you should have received as part of this distribution. The terms
jpayne@69 14 * are also available at https://curl.se/docs/copyright.html.
jpayne@69 15 *
jpayne@69 16 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
jpayne@69 17 * copies of the Software, and permit persons to whom the Software is
jpayne@69 18 * furnished to do so, under the terms of the COPYING file.
jpayne@69 19 *
jpayne@69 20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
jpayne@69 21 * KIND, either express or implied.
jpayne@69 22 *
jpayne@69 23 * SPDX-License-Identifier: curl
jpayne@69 24 *
jpayne@69 25 ***************************************************************************/
jpayne@69 26
jpayne@69 27 /*
jpayne@69 28 * If you have libcurl problems, all docs and details are found here:
jpayne@69 29 * https://curl.se/libcurl/
jpayne@69 30 */
jpayne@69 31
jpayne@69 32 #ifdef CURL_NO_OLDIES
jpayne@69 33 #define CURL_STRICTER
jpayne@69 34 #endif
jpayne@69 35
jpayne@69 36 /* Compile-time deprecation macros. */
jpayne@69 37 #if defined(__GNUC__) && (__GNUC__ >= 6) && \
jpayne@69 38 !defined(__INTEL_COMPILER) && \
jpayne@69 39 !defined(CURL_DISABLE_DEPRECATION) && !defined(BUILDING_LIBCURL)
jpayne@69 40 #define CURL_DEPRECATED(version, message) \
jpayne@69 41 __attribute__((deprecated("since " # version ". " message)))
jpayne@69 42 #define CURL_IGNORE_DEPRECATION(statements) \
jpayne@69 43 _Pragma("GCC diagnostic push") \
jpayne@69 44 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
jpayne@69 45 statements \
jpayne@69 46 _Pragma("GCC diagnostic pop")
jpayne@69 47 #else
jpayne@69 48 #define CURL_DEPRECATED(version, message)
jpayne@69 49 #define CURL_IGNORE_DEPRECATION(statements) statements
jpayne@69 50 #endif
jpayne@69 51
jpayne@69 52 #include "curlver.h" /* libcurl version defines */
jpayne@69 53 #include "system.h" /* determine things run-time */
jpayne@69 54
jpayne@69 55 /*
jpayne@69 56 * Define CURL_WIN32 when build target is Win32 API
jpayne@69 57 */
jpayne@69 58
jpayne@69 59 #if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && \
jpayne@69 60 !defined(__SYMBIAN32__)
jpayne@69 61 #define CURL_WIN32
jpayne@69 62 #endif
jpayne@69 63
jpayne@69 64 #include <stdio.h>
jpayne@69 65 #include <limits.h>
jpayne@69 66
jpayne@69 67 #if (defined(__FreeBSD__) && (__FreeBSD__ >= 2)) || defined(__MidnightBSD__)
jpayne@69 68 /* Needed for __FreeBSD_version or __MidnightBSD_version symbol definition */
jpayne@69 69 #include <osreldate.h>
jpayne@69 70 #endif
jpayne@69 71
jpayne@69 72 /* The include stuff here below is mainly for time_t! */
jpayne@69 73 #include <sys/types.h>
jpayne@69 74 #include <time.h>
jpayne@69 75
jpayne@69 76 #if defined(CURL_WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__)
jpayne@69 77 #if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || \
jpayne@69 78 defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H))
jpayne@69 79 /* The check above prevents the winsock2 inclusion if winsock.h already was
jpayne@69 80 included, since they can't co-exist without problems */
jpayne@69 81 #include <winsock2.h>
jpayne@69 82 #include <ws2tcpip.h>
jpayne@69 83 #endif
jpayne@69 84 #endif
jpayne@69 85
jpayne@69 86 /* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
jpayne@69 87 libc5-based Linux systems. Only include it on systems that are known to
jpayne@69 88 require it! */
jpayne@69 89 #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
jpayne@69 90 defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
jpayne@69 91 defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
jpayne@69 92 defined(__CYGWIN__) || defined(AMIGA) || defined(__NuttX__) || \
jpayne@69 93 (defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) || \
jpayne@69 94 (defined(__MidnightBSD_version) && (__MidnightBSD_version < 100000)) || \
jpayne@69 95 defined(__sun__) || defined(__serenity__)
jpayne@69 96 #include <sys/select.h>
jpayne@69 97 #endif
jpayne@69 98
jpayne@69 99 #if !defined(CURL_WIN32) && !defined(_WIN32_WCE)
jpayne@69 100 #include <sys/socket.h>
jpayne@69 101 #endif
jpayne@69 102
jpayne@69 103 #if !defined(CURL_WIN32)
jpayne@69 104 #include <sys/time.h>
jpayne@69 105 #endif
jpayne@69 106
jpayne@69 107 /* Compatibility for non-Clang compilers */
jpayne@69 108 #ifndef __has_declspec_attribute
jpayne@69 109 # define __has_declspec_attribute(x) 0
jpayne@69 110 #endif
jpayne@69 111
jpayne@69 112 #ifdef __cplusplus
jpayne@69 113 extern "C" {
jpayne@69 114 #endif
jpayne@69 115
jpayne@69 116 #if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER)
jpayne@69 117 typedef struct Curl_easy CURL;
jpayne@69 118 typedef struct Curl_share CURLSH;
jpayne@69 119 #else
jpayne@69 120 typedef void CURL;
jpayne@69 121 typedef void CURLSH;
jpayne@69 122 #endif
jpayne@69 123
jpayne@69 124 /*
jpayne@69 125 * libcurl external API function linkage decorations.
jpayne@69 126 */
jpayne@69 127
jpayne@69 128 #ifdef CURL_STATICLIB
jpayne@69 129 # define CURL_EXTERN
jpayne@69 130 #elif defined(CURL_WIN32) || defined(__SYMBIAN32__) || \
jpayne@69 131 (__has_declspec_attribute(dllexport) && \
jpayne@69 132 __has_declspec_attribute(dllimport))
jpayne@69 133 # if defined(BUILDING_LIBCURL)
jpayne@69 134 # define CURL_EXTERN __declspec(dllexport)
jpayne@69 135 # else
jpayne@69 136 # define CURL_EXTERN __declspec(dllimport)
jpayne@69 137 # endif
jpayne@69 138 #elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS)
jpayne@69 139 # define CURL_EXTERN CURL_EXTERN_SYMBOL
jpayne@69 140 #else
jpayne@69 141 # define CURL_EXTERN
jpayne@69 142 #endif
jpayne@69 143
jpayne@69 144 #ifndef curl_socket_typedef
jpayne@69 145 /* socket typedef */
jpayne@69 146 #if defined(CURL_WIN32) && !defined(__LWIP_OPT_H__) && !defined(LWIP_HDR_OPT_H)
jpayne@69 147 typedef SOCKET curl_socket_t;
jpayne@69 148 #define CURL_SOCKET_BAD INVALID_SOCKET
jpayne@69 149 #else
jpayne@69 150 typedef int curl_socket_t;
jpayne@69 151 #define CURL_SOCKET_BAD -1
jpayne@69 152 #endif
jpayne@69 153 #define curl_socket_typedef
jpayne@69 154 #endif /* curl_socket_typedef */
jpayne@69 155
jpayne@69 156 /* enum for the different supported SSL backends */
jpayne@69 157 typedef enum {
jpayne@69 158 CURLSSLBACKEND_NONE = 0,
jpayne@69 159 CURLSSLBACKEND_OPENSSL = 1,
jpayne@69 160 CURLSSLBACKEND_GNUTLS = 2,
jpayne@69 161 CURLSSLBACKEND_NSS = 3,
jpayne@69 162 CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */
jpayne@69 163 CURLSSLBACKEND_GSKIT = 5,
jpayne@69 164 CURLSSLBACKEND_POLARSSL CURL_DEPRECATED(7.69.0, "") = 6,
jpayne@69 165 CURLSSLBACKEND_WOLFSSL = 7,
jpayne@69 166 CURLSSLBACKEND_SCHANNEL = 8,
jpayne@69 167 CURLSSLBACKEND_SECURETRANSPORT = 9,
jpayne@69 168 CURLSSLBACKEND_AXTLS CURL_DEPRECATED(7.61.0, "") = 10,
jpayne@69 169 CURLSSLBACKEND_MBEDTLS = 11,
jpayne@69 170 CURLSSLBACKEND_MESALINK = 12,
jpayne@69 171 CURLSSLBACKEND_BEARSSL = 13,
jpayne@69 172 CURLSSLBACKEND_RUSTLS = 14
jpayne@69 173 } curl_sslbackend;
jpayne@69 174
jpayne@69 175 /* aliases for library clones and renames */
jpayne@69 176 #define CURLSSLBACKEND_LIBRESSL CURLSSLBACKEND_OPENSSL
jpayne@69 177 #define CURLSSLBACKEND_BORINGSSL CURLSSLBACKEND_OPENSSL
jpayne@69 178
jpayne@69 179 /* deprecated names: */
jpayne@69 180 #define CURLSSLBACKEND_CYASSL CURLSSLBACKEND_WOLFSSL
jpayne@69 181 #define CURLSSLBACKEND_DARWINSSL CURLSSLBACKEND_SECURETRANSPORT
jpayne@69 182
jpayne@69 183 struct curl_httppost {
jpayne@69 184 struct curl_httppost *next; /* next entry in the list */
jpayne@69 185 char *name; /* pointer to allocated name */
jpayne@69 186 long namelength; /* length of name length */
jpayne@69 187 char *contents; /* pointer to allocated data contents */
jpayne@69 188 long contentslength; /* length of contents field, see also
jpayne@69 189 CURL_HTTPPOST_LARGE */
jpayne@69 190 char *buffer; /* pointer to allocated buffer contents */
jpayne@69 191 long bufferlength; /* length of buffer field */
jpayne@69 192 char *contenttype; /* Content-Type */
jpayne@69 193 struct curl_slist *contentheader; /* list of extra headers for this form */
jpayne@69 194 struct curl_httppost *more; /* if one field name has more than one
jpayne@69 195 file, this link should link to following
jpayne@69 196 files */
jpayne@69 197 long flags; /* as defined below */
jpayne@69 198
jpayne@69 199 /* specified content is a file name */
jpayne@69 200 #define CURL_HTTPPOST_FILENAME (1<<0)
jpayne@69 201 /* specified content is a file name */
jpayne@69 202 #define CURL_HTTPPOST_READFILE (1<<1)
jpayne@69 203 /* name is only stored pointer do not free in formfree */
jpayne@69 204 #define CURL_HTTPPOST_PTRNAME (1<<2)
jpayne@69 205 /* contents is only stored pointer do not free in formfree */
jpayne@69 206 #define CURL_HTTPPOST_PTRCONTENTS (1<<3)
jpayne@69 207 /* upload file from buffer */
jpayne@69 208 #define CURL_HTTPPOST_BUFFER (1<<4)
jpayne@69 209 /* upload file from pointer contents */
jpayne@69 210 #define CURL_HTTPPOST_PTRBUFFER (1<<5)
jpayne@69 211 /* upload file contents by using the regular read callback to get the data and
jpayne@69 212 pass the given pointer as custom pointer */
jpayne@69 213 #define CURL_HTTPPOST_CALLBACK (1<<6)
jpayne@69 214 /* use size in 'contentlen', added in 7.46.0 */
jpayne@69 215 #define CURL_HTTPPOST_LARGE (1<<7)
jpayne@69 216
jpayne@69 217 char *showfilename; /* The file name to show. If not set, the
jpayne@69 218 actual file name will be used (if this
jpayne@69 219 is a file part) */
jpayne@69 220 void *userp; /* custom pointer used for
jpayne@69 221 HTTPPOST_CALLBACK posts */
jpayne@69 222 curl_off_t contentlen; /* alternative length of contents
jpayne@69 223 field. Used if CURL_HTTPPOST_LARGE is
jpayne@69 224 set. Added in 7.46.0 */
jpayne@69 225 };
jpayne@69 226
jpayne@69 227
jpayne@69 228 /* This is a return code for the progress callback that, when returned, will
jpayne@69 229 signal libcurl to continue executing the default progress function */
jpayne@69 230 #define CURL_PROGRESSFUNC_CONTINUE 0x10000001
jpayne@69 231
jpayne@69 232 /* This is the CURLOPT_PROGRESSFUNCTION callback prototype. It is now
jpayne@69 233 considered deprecated but was the only choice up until 7.31.0 */
jpayne@69 234 typedef int (*curl_progress_callback)(void *clientp,
jpayne@69 235 double dltotal,
jpayne@69 236 double dlnow,
jpayne@69 237 double ultotal,
jpayne@69 238 double ulnow);
jpayne@69 239
jpayne@69 240 /* This is the CURLOPT_XFERINFOFUNCTION callback prototype. It was introduced
jpayne@69 241 in 7.32.0, avoids the use of floating point numbers and provides more
jpayne@69 242 detailed information. */
jpayne@69 243 typedef int (*curl_xferinfo_callback)(void *clientp,
jpayne@69 244 curl_off_t dltotal,
jpayne@69 245 curl_off_t dlnow,
jpayne@69 246 curl_off_t ultotal,
jpayne@69 247 curl_off_t ulnow);
jpayne@69 248
jpayne@69 249 #ifndef CURL_MAX_READ_SIZE
jpayne@69 250 /* The maximum receive buffer size configurable via CURLOPT_BUFFERSIZE. */
jpayne@69 251 #define CURL_MAX_READ_SIZE 524288
jpayne@69 252 #endif
jpayne@69 253
jpayne@69 254 #ifndef CURL_MAX_WRITE_SIZE
jpayne@69 255 /* Tests have proven that 20K is a very bad buffer size for uploads on
jpayne@69 256 Windows, while 16K for some odd reason performed a lot better.
jpayne@69 257 We do the ifndef check to allow this value to easier be changed at build
jpayne@69 258 time for those who feel adventurous. The practical minimum is about
jpayne@69 259 400 bytes since libcurl uses a buffer of this size as a scratch area
jpayne@69 260 (unrelated to network send operations). */
jpayne@69 261 #define CURL_MAX_WRITE_SIZE 16384
jpayne@69 262 #endif
jpayne@69 263
jpayne@69 264 #ifndef CURL_MAX_HTTP_HEADER
jpayne@69 265 /* The only reason to have a max limit for this is to avoid the risk of a bad
jpayne@69 266 server feeding libcurl with a never-ending header that will cause reallocs
jpayne@69 267 infinitely */
jpayne@69 268 #define CURL_MAX_HTTP_HEADER (100*1024)
jpayne@69 269 #endif
jpayne@69 270
jpayne@69 271 /* This is a magic return code for the write callback that, when returned,
jpayne@69 272 will signal libcurl to pause receiving on the current transfer. */
jpayne@69 273 #define CURL_WRITEFUNC_PAUSE 0x10000001
jpayne@69 274
jpayne@69 275 /* This is a magic return code for the write callback that, when returned,
jpayne@69 276 will signal an error from the callback. */
jpayne@69 277 #define CURL_WRITEFUNC_ERROR 0xFFFFFFFF
jpayne@69 278
jpayne@69 279 typedef size_t (*curl_write_callback)(char *buffer,
jpayne@69 280 size_t size,
jpayne@69 281 size_t nitems,
jpayne@69 282 void *outstream);
jpayne@69 283
jpayne@69 284 /* This callback will be called when a new resolver request is made */
jpayne@69 285 typedef int (*curl_resolver_start_callback)(void *resolver_state,
jpayne@69 286 void *reserved, void *userdata);
jpayne@69 287
jpayne@69 288 /* enumeration of file types */
jpayne@69 289 typedef enum {
jpayne@69 290 CURLFILETYPE_FILE = 0,
jpayne@69 291 CURLFILETYPE_DIRECTORY,
jpayne@69 292 CURLFILETYPE_SYMLINK,
jpayne@69 293 CURLFILETYPE_DEVICE_BLOCK,
jpayne@69 294 CURLFILETYPE_DEVICE_CHAR,
jpayne@69 295 CURLFILETYPE_NAMEDPIPE,
jpayne@69 296 CURLFILETYPE_SOCKET,
jpayne@69 297 CURLFILETYPE_DOOR, /* is possible only on Sun Solaris now */
jpayne@69 298
jpayne@69 299 CURLFILETYPE_UNKNOWN /* should never occur */
jpayne@69 300 } curlfiletype;
jpayne@69 301
jpayne@69 302 #define CURLFINFOFLAG_KNOWN_FILENAME (1<<0)
jpayne@69 303 #define CURLFINFOFLAG_KNOWN_FILETYPE (1<<1)
jpayne@69 304 #define CURLFINFOFLAG_KNOWN_TIME (1<<2)
jpayne@69 305 #define CURLFINFOFLAG_KNOWN_PERM (1<<3)
jpayne@69 306 #define CURLFINFOFLAG_KNOWN_UID (1<<4)
jpayne@69 307 #define CURLFINFOFLAG_KNOWN_GID (1<<5)
jpayne@69 308 #define CURLFINFOFLAG_KNOWN_SIZE (1<<6)
jpayne@69 309 #define CURLFINFOFLAG_KNOWN_HLINKCOUNT (1<<7)
jpayne@69 310
jpayne@69 311 /* Information about a single file, used when doing FTP wildcard matching */
jpayne@69 312 struct curl_fileinfo {
jpayne@69 313 char *filename;
jpayne@69 314 curlfiletype filetype;
jpayne@69 315 time_t time; /* always zero! */
jpayne@69 316 unsigned int perm;
jpayne@69 317 int uid;
jpayne@69 318 int gid;
jpayne@69 319 curl_off_t size;
jpayne@69 320 long int hardlinks;
jpayne@69 321
jpayne@69 322 struct {
jpayne@69 323 /* If some of these fields is not NULL, it is a pointer to b_data. */
jpayne@69 324 char *time;
jpayne@69 325 char *perm;
jpayne@69 326 char *user;
jpayne@69 327 char *group;
jpayne@69 328 char *target; /* pointer to the target filename of a symlink */
jpayne@69 329 } strings;
jpayne@69 330
jpayne@69 331 unsigned int flags;
jpayne@69 332
jpayne@69 333 /* used internally */
jpayne@69 334 char *b_data;
jpayne@69 335 size_t b_size;
jpayne@69 336 size_t b_used;
jpayne@69 337 };
jpayne@69 338
jpayne@69 339 /* return codes for CURLOPT_CHUNK_BGN_FUNCTION */
jpayne@69 340 #define CURL_CHUNK_BGN_FUNC_OK 0
jpayne@69 341 #define CURL_CHUNK_BGN_FUNC_FAIL 1 /* tell the lib to end the task */
jpayne@69 342 #define CURL_CHUNK_BGN_FUNC_SKIP 2 /* skip this chunk over */
jpayne@69 343
jpayne@69 344 /* if splitting of data transfer is enabled, this callback is called before
jpayne@69 345 download of an individual chunk started. Note that parameter "remains" works
jpayne@69 346 only for FTP wildcard downloading (for now), otherwise is not used */
jpayne@69 347 typedef long (*curl_chunk_bgn_callback)(const void *transfer_info,
jpayne@69 348 void *ptr,
jpayne@69 349 int remains);
jpayne@69 350
jpayne@69 351 /* return codes for CURLOPT_CHUNK_END_FUNCTION */
jpayne@69 352 #define CURL_CHUNK_END_FUNC_OK 0
jpayne@69 353 #define CURL_CHUNK_END_FUNC_FAIL 1 /* tell the lib to end the task */
jpayne@69 354
jpayne@69 355 /* If splitting of data transfer is enabled this callback is called after
jpayne@69 356 download of an individual chunk finished.
jpayne@69 357 Note! After this callback was set then it have to be called FOR ALL chunks.
jpayne@69 358 Even if downloading of this chunk was skipped in CHUNK_BGN_FUNC.
jpayne@69 359 This is the reason why we don't need "transfer_info" parameter in this
jpayne@69 360 callback and we are not interested in "remains" parameter too. */
jpayne@69 361 typedef long (*curl_chunk_end_callback)(void *ptr);
jpayne@69 362
jpayne@69 363 /* return codes for FNMATCHFUNCTION */
jpayne@69 364 #define CURL_FNMATCHFUNC_MATCH 0 /* string corresponds to the pattern */
jpayne@69 365 #define CURL_FNMATCHFUNC_NOMATCH 1 /* pattern doesn't match the string */
jpayne@69 366 #define CURL_FNMATCHFUNC_FAIL 2 /* an error occurred */
jpayne@69 367
jpayne@69 368 /* callback type for wildcard downloading pattern matching. If the
jpayne@69 369 string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc. */
jpayne@69 370 typedef int (*curl_fnmatch_callback)(void *ptr,
jpayne@69 371 const char *pattern,
jpayne@69 372 const char *string);
jpayne@69 373
jpayne@69 374 /* These are the return codes for the seek callbacks */
jpayne@69 375 #define CURL_SEEKFUNC_OK 0
jpayne@69 376 #define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */
jpayne@69 377 #define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so
jpayne@69 378 libcurl might try other means instead */
jpayne@69 379 typedef int (*curl_seek_callback)(void *instream,
jpayne@69 380 curl_off_t offset,
jpayne@69 381 int origin); /* 'whence' */
jpayne@69 382
jpayne@69 383 /* This is a return code for the read callback that, when returned, will
jpayne@69 384 signal libcurl to immediately abort the current transfer. */
jpayne@69 385 #define CURL_READFUNC_ABORT 0x10000000
jpayne@69 386 /* This is a return code for the read callback that, when returned, will
jpayne@69 387 signal libcurl to pause sending data on the current transfer. */
jpayne@69 388 #define CURL_READFUNC_PAUSE 0x10000001
jpayne@69 389
jpayne@69 390 /* Return code for when the trailing headers' callback has terminated
jpayne@69 391 without any errors */
jpayne@69 392 #define CURL_TRAILERFUNC_OK 0
jpayne@69 393 /* Return code for when was an error in the trailing header's list and we
jpayne@69 394 want to abort the request */
jpayne@69 395 #define CURL_TRAILERFUNC_ABORT 1
jpayne@69 396
jpayne@69 397 typedef size_t (*curl_read_callback)(char *buffer,
jpayne@69 398 size_t size,
jpayne@69 399 size_t nitems,
jpayne@69 400 void *instream);
jpayne@69 401
jpayne@69 402 typedef int (*curl_trailer_callback)(struct curl_slist **list,
jpayne@69 403 void *userdata);
jpayne@69 404
jpayne@69 405 typedef enum {
jpayne@69 406 CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */
jpayne@69 407 CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */
jpayne@69 408 CURLSOCKTYPE_LAST /* never use */
jpayne@69 409 } curlsocktype;
jpayne@69 410
jpayne@69 411 /* The return code from the sockopt_callback can signal information back
jpayne@69 412 to libcurl: */
jpayne@69 413 #define CURL_SOCKOPT_OK 0
jpayne@69 414 #define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return
jpayne@69 415 CURLE_ABORTED_BY_CALLBACK */
jpayne@69 416 #define CURL_SOCKOPT_ALREADY_CONNECTED 2
jpayne@69 417
jpayne@69 418 typedef int (*curl_sockopt_callback)(void *clientp,
jpayne@69 419 curl_socket_t curlfd,
jpayne@69 420 curlsocktype purpose);
jpayne@69 421
jpayne@69 422 struct curl_sockaddr {
jpayne@69 423 int family;
jpayne@69 424 int socktype;
jpayne@69 425 int protocol;
jpayne@69 426 unsigned int addrlen; /* addrlen was a socklen_t type before 7.18.0 but it
jpayne@69 427 turned really ugly and painful on the systems that
jpayne@69 428 lack this type */
jpayne@69 429 struct sockaddr addr;
jpayne@69 430 };
jpayne@69 431
jpayne@69 432 typedef curl_socket_t
jpayne@69 433 (*curl_opensocket_callback)(void *clientp,
jpayne@69 434 curlsocktype purpose,
jpayne@69 435 struct curl_sockaddr *address);
jpayne@69 436
jpayne@69 437 typedef int
jpayne@69 438 (*curl_closesocket_callback)(void *clientp, curl_socket_t item);
jpayne@69 439
jpayne@69 440 typedef enum {
jpayne@69 441 CURLIOE_OK, /* I/O operation successful */
jpayne@69 442 CURLIOE_UNKNOWNCMD, /* command was unknown to callback */
jpayne@69 443 CURLIOE_FAILRESTART, /* failed to restart the read */
jpayne@69 444 CURLIOE_LAST /* never use */
jpayne@69 445 } curlioerr;
jpayne@69 446
jpayne@69 447 typedef enum {
jpayne@69 448 CURLIOCMD_NOP, /* no operation */
jpayne@69 449 CURLIOCMD_RESTARTREAD, /* restart the read stream from start */
jpayne@69 450 CURLIOCMD_LAST /* never use */
jpayne@69 451 } curliocmd;
jpayne@69 452
jpayne@69 453 typedef curlioerr (*curl_ioctl_callback)(CURL *handle,
jpayne@69 454 int cmd,
jpayne@69 455 void *clientp);
jpayne@69 456
jpayne@69 457 #ifndef CURL_DID_MEMORY_FUNC_TYPEDEFS
jpayne@69 458 /*
jpayne@69 459 * The following typedef's are signatures of malloc, free, realloc, strdup and
jpayne@69 460 * calloc respectively. Function pointers of these types can be passed to the
jpayne@69 461 * curl_global_init_mem() function to set user defined memory management
jpayne@69 462 * callback routines.
jpayne@69 463 */
jpayne@69 464 typedef void *(*curl_malloc_callback)(size_t size);
jpayne@69 465 typedef void (*curl_free_callback)(void *ptr);
jpayne@69 466 typedef void *(*curl_realloc_callback)(void *ptr, size_t size);
jpayne@69 467 typedef char *(*curl_strdup_callback)(const char *str);
jpayne@69 468 typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size);
jpayne@69 469
jpayne@69 470 #define CURL_DID_MEMORY_FUNC_TYPEDEFS
jpayne@69 471 #endif
jpayne@69 472
jpayne@69 473 /* the kind of data that is passed to information_callback */
jpayne@69 474 typedef enum {
jpayne@69 475 CURLINFO_TEXT = 0,
jpayne@69 476 CURLINFO_HEADER_IN, /* 1 */
jpayne@69 477 CURLINFO_HEADER_OUT, /* 2 */
jpayne@69 478 CURLINFO_DATA_IN, /* 3 */
jpayne@69 479 CURLINFO_DATA_OUT, /* 4 */
jpayne@69 480 CURLINFO_SSL_DATA_IN, /* 5 */
jpayne@69 481 CURLINFO_SSL_DATA_OUT, /* 6 */
jpayne@69 482 CURLINFO_END
jpayne@69 483 } curl_infotype;
jpayne@69 484
jpayne@69 485 typedef int (*curl_debug_callback)
jpayne@69 486 (CURL *handle, /* the handle/transfer this concerns */
jpayne@69 487 curl_infotype type, /* what kind of data */
jpayne@69 488 char *data, /* points to the data */
jpayne@69 489 size_t size, /* size of the data pointed to */
jpayne@69 490 void *userptr); /* whatever the user please */
jpayne@69 491
jpayne@69 492 /* This is the CURLOPT_PREREQFUNCTION callback prototype. */
jpayne@69 493 typedef int (*curl_prereq_callback)(void *clientp,
jpayne@69 494 char *conn_primary_ip,
jpayne@69 495 char *conn_local_ip,
jpayne@69 496 int conn_primary_port,
jpayne@69 497 int conn_local_port);
jpayne@69 498
jpayne@69 499 /* Return code for when the pre-request callback has terminated without
jpayne@69 500 any errors */
jpayne@69 501 #define CURL_PREREQFUNC_OK 0
jpayne@69 502 /* Return code for when the pre-request callback wants to abort the
jpayne@69 503 request */
jpayne@69 504 #define CURL_PREREQFUNC_ABORT 1
jpayne@69 505
jpayne@69 506 /* All possible error codes from all sorts of curl functions. Future versions
jpayne@69 507 may return other values, stay prepared.
jpayne@69 508
jpayne@69 509 Always add new return codes last. Never *EVER* remove any. The return
jpayne@69 510 codes must remain the same!
jpayne@69 511 */
jpayne@69 512
jpayne@69 513 typedef enum {
jpayne@69 514 CURLE_OK = 0,
jpayne@69 515 CURLE_UNSUPPORTED_PROTOCOL, /* 1 */
jpayne@69 516 CURLE_FAILED_INIT, /* 2 */
jpayne@69 517 CURLE_URL_MALFORMAT, /* 3 */
jpayne@69 518 CURLE_NOT_BUILT_IN, /* 4 - [was obsoleted in August 2007 for
jpayne@69 519 7.17.0, reused in April 2011 for 7.21.5] */
jpayne@69 520 CURLE_COULDNT_RESOLVE_PROXY, /* 5 */
jpayne@69 521 CURLE_COULDNT_RESOLVE_HOST, /* 6 */
jpayne@69 522 CURLE_COULDNT_CONNECT, /* 7 */
jpayne@69 523 CURLE_WEIRD_SERVER_REPLY, /* 8 */
jpayne@69 524 CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server
jpayne@69 525 due to lack of access - when login fails
jpayne@69 526 this is not returned. */
jpayne@69 527 CURLE_FTP_ACCEPT_FAILED, /* 10 - [was obsoleted in April 2006 for
jpayne@69 528 7.15.4, reused in Dec 2011 for 7.24.0]*/
jpayne@69 529 CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */
jpayne@69 530 CURLE_FTP_ACCEPT_TIMEOUT, /* 12 - timeout occurred accepting server
jpayne@69 531 [was obsoleted in August 2007 for 7.17.0,
jpayne@69 532 reused in Dec 2011 for 7.24.0]*/
jpayne@69 533 CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */
jpayne@69 534 CURLE_FTP_WEIRD_227_FORMAT, /* 14 */
jpayne@69 535 CURLE_FTP_CANT_GET_HOST, /* 15 */
jpayne@69 536 CURLE_HTTP2, /* 16 - A problem in the http2 framing layer.
jpayne@69 537 [was obsoleted in August 2007 for 7.17.0,
jpayne@69 538 reused in July 2014 for 7.38.0] */
jpayne@69 539 CURLE_FTP_COULDNT_SET_TYPE, /* 17 */
jpayne@69 540 CURLE_PARTIAL_FILE, /* 18 */
jpayne@69 541 CURLE_FTP_COULDNT_RETR_FILE, /* 19 */
jpayne@69 542 CURLE_OBSOLETE20, /* 20 - NOT USED */
jpayne@69 543 CURLE_QUOTE_ERROR, /* 21 - quote command failure */
jpayne@69 544 CURLE_HTTP_RETURNED_ERROR, /* 22 */
jpayne@69 545 CURLE_WRITE_ERROR, /* 23 */
jpayne@69 546 CURLE_OBSOLETE24, /* 24 - NOT USED */
jpayne@69 547 CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */
jpayne@69 548 CURLE_READ_ERROR, /* 26 - couldn't open/read from file */
jpayne@69 549 CURLE_OUT_OF_MEMORY, /* 27 */
jpayne@69 550 CURLE_OPERATION_TIMEDOUT, /* 28 - the timeout time was reached */
jpayne@69 551 CURLE_OBSOLETE29, /* 29 - NOT USED */
jpayne@69 552 CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */
jpayne@69 553 CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */
jpayne@69 554 CURLE_OBSOLETE32, /* 32 - NOT USED */
jpayne@69 555 CURLE_RANGE_ERROR, /* 33 - RANGE "command" didn't work */
jpayne@69 556 CURLE_HTTP_POST_ERROR, /* 34 */
jpayne@69 557 CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */
jpayne@69 558 CURLE_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */
jpayne@69 559 CURLE_FILE_COULDNT_READ_FILE, /* 37 */
jpayne@69 560 CURLE_LDAP_CANNOT_BIND, /* 38 */
jpayne@69 561 CURLE_LDAP_SEARCH_FAILED, /* 39 */
jpayne@69 562 CURLE_OBSOLETE40, /* 40 - NOT USED */
jpayne@69 563 CURLE_FUNCTION_NOT_FOUND, /* 41 - NOT USED starting with 7.53.0 */
jpayne@69 564 CURLE_ABORTED_BY_CALLBACK, /* 42 */
jpayne@69 565 CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */
jpayne@69 566 CURLE_OBSOLETE44, /* 44 - NOT USED */
jpayne@69 567 CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */
jpayne@69 568 CURLE_OBSOLETE46, /* 46 - NOT USED */
jpayne@69 569 CURLE_TOO_MANY_REDIRECTS, /* 47 - catch endless re-direct loops */
jpayne@69 570 CURLE_UNKNOWN_OPTION, /* 48 - User specified an unknown option */
jpayne@69 571 CURLE_SETOPT_OPTION_SYNTAX, /* 49 - Malformed setopt option */
jpayne@69 572 CURLE_OBSOLETE50, /* 50 - NOT USED */
jpayne@69 573 CURLE_OBSOLETE51, /* 51 - NOT USED */
jpayne@69 574 CURLE_GOT_NOTHING, /* 52 - when this is a specific error */
jpayne@69 575 CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */
jpayne@69 576 CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as
jpayne@69 577 default */
jpayne@69 578 CURLE_SEND_ERROR, /* 55 - failed sending network data */
jpayne@69 579 CURLE_RECV_ERROR, /* 56 - failure in receiving network data */
jpayne@69 580 CURLE_OBSOLETE57, /* 57 - NOT IN USE */
jpayne@69 581 CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */
jpayne@69 582 CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */
jpayne@69 583 CURLE_PEER_FAILED_VERIFICATION, /* 60 - peer's certificate or fingerprint
jpayne@69 584 wasn't verified fine */
jpayne@69 585 CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized/bad encoding */
jpayne@69 586 CURLE_OBSOLETE62, /* 62 - NOT IN USE since 7.82.0 */
jpayne@69 587 CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */
jpayne@69 588 CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */
jpayne@69 589 CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind
jpayne@69 590 that failed */
jpayne@69 591 CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */
jpayne@69 592 CURLE_LOGIN_DENIED, /* 67 - user, password or similar was not
jpayne@69 593 accepted and we failed to login */
jpayne@69 594 CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */
jpayne@69 595 CURLE_TFTP_PERM, /* 69 - permission problem on server */
jpayne@69 596 CURLE_REMOTE_DISK_FULL, /* 70 - out of disk space on server */
jpayne@69 597 CURLE_TFTP_ILLEGAL, /* 71 - Illegal TFTP operation */
jpayne@69 598 CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */
jpayne@69 599 CURLE_REMOTE_FILE_EXISTS, /* 73 - File already exists */
jpayne@69 600 CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */
jpayne@69 601 CURLE_OBSOLETE75, /* 75 - NOT IN USE since 7.82.0 */
jpayne@69 602 CURLE_OBSOLETE76, /* 76 - NOT IN USE since 7.82.0 */
jpayne@69 603 CURLE_SSL_CACERT_BADFILE, /* 77 - could not load CACERT file, missing
jpayne@69 604 or wrong format */
jpayne@69 605 CURLE_REMOTE_FILE_NOT_FOUND, /* 78 - remote file not found */
jpayne@69 606 CURLE_SSH, /* 79 - error from the SSH layer, somewhat
jpayne@69 607 generic so the error message will be of
jpayne@69 608 interest when this has happened */
jpayne@69 609
jpayne@69 610 CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL
jpayne@69 611 connection */
jpayne@69 612 CURLE_AGAIN, /* 81 - socket is not ready for send/recv,
jpayne@69 613 wait till it's ready and try again (Added
jpayne@69 614 in 7.18.2) */
jpayne@69 615 CURLE_SSL_CRL_BADFILE, /* 82 - could not load CRL file, missing or
jpayne@69 616 wrong format (Added in 7.19.0) */
jpayne@69 617 CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in
jpayne@69 618 7.19.0) */
jpayne@69 619 CURLE_FTP_PRET_FAILED, /* 84 - a PRET command failed */
jpayne@69 620 CURLE_RTSP_CSEQ_ERROR, /* 85 - mismatch of RTSP CSeq numbers */
jpayne@69 621 CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Ids */
jpayne@69 622 CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */
jpayne@69 623 CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */
jpayne@69 624 CURLE_NO_CONNECTION_AVAILABLE, /* 89 - No connection available, the
jpayne@69 625 session will be queued */
jpayne@69 626 CURLE_SSL_PINNEDPUBKEYNOTMATCH, /* 90 - specified pinned public key did not
jpayne@69 627 match */
jpayne@69 628 CURLE_SSL_INVALIDCERTSTATUS, /* 91 - invalid certificate status */
jpayne@69 629 CURLE_HTTP2_STREAM, /* 92 - stream error in HTTP/2 framing layer
jpayne@69 630 */
jpayne@69 631 CURLE_RECURSIVE_API_CALL, /* 93 - an api function was called from
jpayne@69 632 inside a callback */
jpayne@69 633 CURLE_AUTH_ERROR, /* 94 - an authentication function returned an
jpayne@69 634 error */
jpayne@69 635 CURLE_HTTP3, /* 95 - An HTTP/3 layer problem */
jpayne@69 636 CURLE_QUIC_CONNECT_ERROR, /* 96 - QUIC connection error */
jpayne@69 637 CURLE_PROXY, /* 97 - proxy handshake error */
jpayne@69 638 CURLE_SSL_CLIENTCERT, /* 98 - client-side certificate required */
jpayne@69 639 CURLE_UNRECOVERABLE_POLL, /* 99 - poll/select returned fatal error */
jpayne@69 640 CURL_LAST /* never use! */
jpayne@69 641 } CURLcode;
jpayne@69 642
jpayne@69 643 #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
jpayne@69 644 the obsolete stuff removed! */
jpayne@69 645
jpayne@69 646 /* Previously obsolete error code re-used in 7.38.0 */
jpayne@69 647 #define CURLE_OBSOLETE16 CURLE_HTTP2
jpayne@69 648
jpayne@69 649 /* Previously obsolete error codes re-used in 7.24.0 */
jpayne@69 650 #define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED
jpayne@69 651 #define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT
jpayne@69 652
jpayne@69 653 /* compatibility with older names */
jpayne@69 654 #define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING
jpayne@69 655 #define CURLE_FTP_WEIRD_SERVER_REPLY CURLE_WEIRD_SERVER_REPLY
jpayne@69 656
jpayne@69 657 /* The following were added in 7.62.0 */
jpayne@69 658 #define CURLE_SSL_CACERT CURLE_PEER_FAILED_VERIFICATION
jpayne@69 659
jpayne@69 660 /* The following were added in 7.21.5, April 2011 */
jpayne@69 661 #define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION
jpayne@69 662
jpayne@69 663 /* Added for 7.78.0 */
jpayne@69 664 #define CURLE_TELNET_OPTION_SYNTAX CURLE_SETOPT_OPTION_SYNTAX
jpayne@69 665
jpayne@69 666 /* The following were added in 7.17.1 */
jpayne@69 667 /* These are scheduled to disappear by 2009 */
jpayne@69 668 #define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION
jpayne@69 669
jpayne@69 670 /* The following were added in 7.17.0 */
jpayne@69 671 /* These are scheduled to disappear by 2009 */
jpayne@69 672 #define CURLE_OBSOLETE CURLE_OBSOLETE50 /* no one should be using this! */
jpayne@69 673 #define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46
jpayne@69 674 #define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44
jpayne@69 675 #define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10
jpayne@69 676 #define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16
jpayne@69 677 #define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32
jpayne@69 678 #define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29
jpayne@69 679 #define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12
jpayne@69 680 #define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20
jpayne@69 681 #define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40
jpayne@69 682 #define CURLE_MALFORMAT_USER CURLE_OBSOLETE24
jpayne@69 683 #define CURLE_SHARE_IN_USE CURLE_OBSOLETE57
jpayne@69 684 #define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN
jpayne@69 685
jpayne@69 686 #define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED
jpayne@69 687 #define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE
jpayne@69 688 #define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR
jpayne@69 689 #define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL
jpayne@69 690 #define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS
jpayne@69 691 #define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR
jpayne@69 692 #define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED
jpayne@69 693
jpayne@69 694 /* The following were added earlier */
jpayne@69 695
jpayne@69 696 #define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT
jpayne@69 697 #define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR
jpayne@69 698 #define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED
jpayne@69 699 #define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED
jpayne@69 700 #define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE
jpayne@69 701 #define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME
jpayne@69 702 #define CURLE_LDAP_INVALID_URL CURLE_OBSOLETE62
jpayne@69 703 #define CURLE_CONV_REQD CURLE_OBSOLETE76
jpayne@69 704 #define CURLE_CONV_FAILED CURLE_OBSOLETE75
jpayne@69 705
jpayne@69 706 /* This was the error code 50 in 7.7.3 and a few earlier versions, this
jpayne@69 707 is no longer used by libcurl but is instead #defined here only to not
jpayne@69 708 make programs break */
jpayne@69 709 #define CURLE_ALREADY_COMPLETE 99999
jpayne@69 710
jpayne@69 711 /* Provide defines for really old option names */
jpayne@69 712 #define CURLOPT_FILE CURLOPT_WRITEDATA /* name changed in 7.9.7 */
jpayne@69 713 #define CURLOPT_INFILE CURLOPT_READDATA /* name changed in 7.9.7 */
jpayne@69 714 #define CURLOPT_WRITEHEADER CURLOPT_HEADERDATA
jpayne@69 715
jpayne@69 716 /* Since long deprecated options with no code in the lib that does anything
jpayne@69 717 with them. */
jpayne@69 718 #define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40
jpayne@69 719 #define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72
jpayne@69 720
jpayne@69 721 #endif /* !CURL_NO_OLDIES */
jpayne@69 722
jpayne@69 723 /*
jpayne@69 724 * Proxy error codes. Returned in CURLINFO_PROXY_ERROR if CURLE_PROXY was
jpayne@69 725 * return for the transfers.
jpayne@69 726 */
jpayne@69 727 typedef enum {
jpayne@69 728 CURLPX_OK,
jpayne@69 729 CURLPX_BAD_ADDRESS_TYPE,
jpayne@69 730 CURLPX_BAD_VERSION,
jpayne@69 731 CURLPX_CLOSED,
jpayne@69 732 CURLPX_GSSAPI,
jpayne@69 733 CURLPX_GSSAPI_PERMSG,
jpayne@69 734 CURLPX_GSSAPI_PROTECTION,
jpayne@69 735 CURLPX_IDENTD,
jpayne@69 736 CURLPX_IDENTD_DIFFER,
jpayne@69 737 CURLPX_LONG_HOSTNAME,
jpayne@69 738 CURLPX_LONG_PASSWD,
jpayne@69 739 CURLPX_LONG_USER,
jpayne@69 740 CURLPX_NO_AUTH,
jpayne@69 741 CURLPX_RECV_ADDRESS,
jpayne@69 742 CURLPX_RECV_AUTH,
jpayne@69 743 CURLPX_RECV_CONNECT,
jpayne@69 744 CURLPX_RECV_REQACK,
jpayne@69 745 CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED,
jpayne@69 746 CURLPX_REPLY_COMMAND_NOT_SUPPORTED,
jpayne@69 747 CURLPX_REPLY_CONNECTION_REFUSED,
jpayne@69 748 CURLPX_REPLY_GENERAL_SERVER_FAILURE,
jpayne@69 749 CURLPX_REPLY_HOST_UNREACHABLE,
jpayne@69 750 CURLPX_REPLY_NETWORK_UNREACHABLE,
jpayne@69 751 CURLPX_REPLY_NOT_ALLOWED,
jpayne@69 752 CURLPX_REPLY_TTL_EXPIRED,
jpayne@69 753 CURLPX_REPLY_UNASSIGNED,
jpayne@69 754 CURLPX_REQUEST_FAILED,
jpayne@69 755 CURLPX_RESOLVE_HOST,
jpayne@69 756 CURLPX_SEND_AUTH,
jpayne@69 757 CURLPX_SEND_CONNECT,
jpayne@69 758 CURLPX_SEND_REQUEST,
jpayne@69 759 CURLPX_UNKNOWN_FAIL,
jpayne@69 760 CURLPX_UNKNOWN_MODE,
jpayne@69 761 CURLPX_USER_REJECTED,
jpayne@69 762 CURLPX_LAST /* never use */
jpayne@69 763 } CURLproxycode;
jpayne@69 764
jpayne@69 765 /* This prototype applies to all conversion callbacks */
jpayne@69 766 typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length);
jpayne@69 767
jpayne@69 768 typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */
jpayne@69 769 void *ssl_ctx, /* actually an OpenSSL
jpayne@69 770 or WolfSSL SSL_CTX,
jpayne@69 771 or an mbedTLS
jpayne@69 772 mbedtls_ssl_config */
jpayne@69 773 void *userptr);
jpayne@69 774
jpayne@69 775 typedef enum {
jpayne@69 776 CURLPROXY_HTTP = 0, /* added in 7.10, new in 7.19.4 default is to use
jpayne@69 777 CONNECT HTTP/1.1 */
jpayne@69 778 CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT
jpayne@69 779 HTTP/1.0 */
jpayne@69 780 CURLPROXY_HTTPS = 2, /* added in 7.52.0 */
jpayne@69 781 CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already
jpayne@69 782 in 7.10 */
jpayne@69 783 CURLPROXY_SOCKS5 = 5, /* added in 7.10 */
jpayne@69 784 CURLPROXY_SOCKS4A = 6, /* added in 7.18.0 */
jpayne@69 785 CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the
jpayne@69 786 host name rather than the IP address. added
jpayne@69 787 in 7.18.0 */
jpayne@69 788 } curl_proxytype; /* this enum was added in 7.10 */
jpayne@69 789
jpayne@69 790 /*
jpayne@69 791 * Bitmasks for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH options:
jpayne@69 792 *
jpayne@69 793 * CURLAUTH_NONE - No HTTP authentication
jpayne@69 794 * CURLAUTH_BASIC - HTTP Basic authentication (default)
jpayne@69 795 * CURLAUTH_DIGEST - HTTP Digest authentication
jpayne@69 796 * CURLAUTH_NEGOTIATE - HTTP Negotiate (SPNEGO) authentication
jpayne@69 797 * CURLAUTH_GSSNEGOTIATE - Alias for CURLAUTH_NEGOTIATE (deprecated)
jpayne@69 798 * CURLAUTH_NTLM - HTTP NTLM authentication
jpayne@69 799 * CURLAUTH_DIGEST_IE - HTTP Digest authentication with IE flavour
jpayne@69 800 * CURLAUTH_NTLM_WB - HTTP NTLM authentication delegated to winbind helper
jpayne@69 801 * CURLAUTH_BEARER - HTTP Bearer token authentication
jpayne@69 802 * CURLAUTH_ONLY - Use together with a single other type to force no
jpayne@69 803 * authentication or just that single type
jpayne@69 804 * CURLAUTH_ANY - All fine types set
jpayne@69 805 * CURLAUTH_ANYSAFE - All fine types except Basic
jpayne@69 806 */
jpayne@69 807
jpayne@69 808 #define CURLAUTH_NONE ((unsigned long)0)
jpayne@69 809 #define CURLAUTH_BASIC (((unsigned long)1)<<0)
jpayne@69 810 #define CURLAUTH_DIGEST (((unsigned long)1)<<1)
jpayne@69 811 #define CURLAUTH_NEGOTIATE (((unsigned long)1)<<2)
jpayne@69 812 /* Deprecated since the advent of CURLAUTH_NEGOTIATE */
jpayne@69 813 #define CURLAUTH_GSSNEGOTIATE CURLAUTH_NEGOTIATE
jpayne@69 814 /* Used for CURLOPT_SOCKS5_AUTH to stay terminologically correct */
jpayne@69 815 #define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
jpayne@69 816 #define CURLAUTH_NTLM (((unsigned long)1)<<3)
jpayne@69 817 #define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4)
jpayne@69 818 #define CURLAUTH_NTLM_WB (((unsigned long)1)<<5)
jpayne@69 819 #define CURLAUTH_BEARER (((unsigned long)1)<<6)
jpayne@69 820 #define CURLAUTH_AWS_SIGV4 (((unsigned long)1)<<7)
jpayne@69 821 #define CURLAUTH_ONLY (((unsigned long)1)<<31)
jpayne@69 822 #define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE)
jpayne@69 823 #define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
jpayne@69 824
jpayne@69 825 #define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */
jpayne@69 826 #define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */
jpayne@69 827 #define CURLSSH_AUTH_PUBLICKEY (1<<0) /* public/private key files */
jpayne@69 828 #define CURLSSH_AUTH_PASSWORD (1<<1) /* password */
jpayne@69 829 #define CURLSSH_AUTH_HOST (1<<2) /* host key files */
jpayne@69 830 #define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */
jpayne@69 831 #define CURLSSH_AUTH_AGENT (1<<4) /* agent (ssh-agent, pageant...) */
jpayne@69 832 #define CURLSSH_AUTH_GSSAPI (1<<5) /* gssapi (kerberos, ...) */
jpayne@69 833 #define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY
jpayne@69 834
jpayne@69 835 #define CURLGSSAPI_DELEGATION_NONE 0 /* no delegation (default) */
jpayne@69 836 #define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */
jpayne@69 837 #define CURLGSSAPI_DELEGATION_FLAG (1<<1) /* delegate always */
jpayne@69 838
jpayne@69 839 #define CURL_ERROR_SIZE 256
jpayne@69 840
jpayne@69 841 enum curl_khtype {
jpayne@69 842 CURLKHTYPE_UNKNOWN,
jpayne@69 843 CURLKHTYPE_RSA1,
jpayne@69 844 CURLKHTYPE_RSA,
jpayne@69 845 CURLKHTYPE_DSS,
jpayne@69 846 CURLKHTYPE_ECDSA,
jpayne@69 847 CURLKHTYPE_ED25519
jpayne@69 848 };
jpayne@69 849
jpayne@69 850 struct curl_khkey {
jpayne@69 851 const char *key; /* points to a null-terminated string encoded with base64
jpayne@69 852 if len is zero, otherwise to the "raw" data */
jpayne@69 853 size_t len;
jpayne@69 854 enum curl_khtype keytype;
jpayne@69 855 };
jpayne@69 856
jpayne@69 857 /* this is the set of return values expected from the curl_sshkeycallback
jpayne@69 858 callback */
jpayne@69 859 enum curl_khstat {
jpayne@69 860 CURLKHSTAT_FINE_ADD_TO_FILE,
jpayne@69 861 CURLKHSTAT_FINE,
jpayne@69 862 CURLKHSTAT_REJECT, /* reject the connection, return an error */
jpayne@69 863 CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now.
jpayne@69 864 Causes a CURLE_PEER_FAILED_VERIFICATION error but the
jpayne@69 865 connection will be left intact etc */
jpayne@69 866 CURLKHSTAT_FINE_REPLACE, /* accept and replace the wrong key */
jpayne@69 867 CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */
jpayne@69 868 };
jpayne@69 869
jpayne@69 870 /* this is the set of status codes pass in to the callback */
jpayne@69 871 enum curl_khmatch {
jpayne@69 872 CURLKHMATCH_OK, /* match */
jpayne@69 873 CURLKHMATCH_MISMATCH, /* host found, key mismatch! */
jpayne@69 874 CURLKHMATCH_MISSING, /* no matching host/key found */
jpayne@69 875 CURLKHMATCH_LAST /* not for use, only a marker for last-in-list */
jpayne@69 876 };
jpayne@69 877
jpayne@69 878 typedef int
jpayne@69 879 (*curl_sshkeycallback) (CURL *easy, /* easy handle */
jpayne@69 880 const struct curl_khkey *knownkey, /* known */
jpayne@69 881 const struct curl_khkey *foundkey, /* found */
jpayne@69 882 enum curl_khmatch, /* libcurl's view on the keys */
jpayne@69 883 void *clientp); /* custom pointer passed with */
jpayne@69 884 /* CURLOPT_SSH_KEYDATA */
jpayne@69 885
jpayne@69 886 typedef int
jpayne@69 887 (*curl_sshhostkeycallback) (void *clientp,/* custom pointer passed */
jpayne@69 888 /* with CURLOPT_SSH_HOSTKEYDATA */
jpayne@69 889 int keytype, /* CURLKHTYPE */
jpayne@69 890 const char *key, /* hostkey to check */
jpayne@69 891 size_t keylen); /* length of the key */
jpayne@69 892 /* return CURLE_OK to accept */
jpayne@69 893 /* or something else to refuse */
jpayne@69 894
jpayne@69 895
jpayne@69 896 /* parameter for the CURLOPT_USE_SSL option */
jpayne@69 897 typedef enum {
jpayne@69 898 CURLUSESSL_NONE, /* do not attempt to use SSL */
jpayne@69 899 CURLUSESSL_TRY, /* try using SSL, proceed anyway otherwise */
jpayne@69 900 CURLUSESSL_CONTROL, /* SSL for the control connection or fail */
jpayne@69 901 CURLUSESSL_ALL, /* SSL for all communication or fail */
jpayne@69 902 CURLUSESSL_LAST /* not an option, never use */
jpayne@69 903 } curl_usessl;
jpayne@69 904
jpayne@69 905 /* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */
jpayne@69 906
jpayne@69 907 /* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the
jpayne@69 908 name of improving interoperability with older servers. Some SSL libraries
jpayne@69 909 have introduced work-arounds for this flaw but those work-arounds sometimes
jpayne@69 910 make the SSL communication fail. To regain functionality with those broken
jpayne@69 911 servers, a user can this way allow the vulnerability back. */
jpayne@69 912 #define CURLSSLOPT_ALLOW_BEAST (1<<0)
jpayne@69 913
jpayne@69 914 /* - NO_REVOKE tells libcurl to disable certificate revocation checks for those
jpayne@69 915 SSL backends where such behavior is present. */
jpayne@69 916 #define CURLSSLOPT_NO_REVOKE (1<<1)
jpayne@69 917
jpayne@69 918 /* - NO_PARTIALCHAIN tells libcurl to *NOT* accept a partial certificate chain
jpayne@69 919 if possible. The OpenSSL backend has this ability. */
jpayne@69 920 #define CURLSSLOPT_NO_PARTIALCHAIN (1<<2)
jpayne@69 921
jpayne@69 922 /* - REVOKE_BEST_EFFORT tells libcurl to ignore certificate revocation offline
jpayne@69 923 checks and ignore missing revocation list for those SSL backends where such
jpayne@69 924 behavior is present. */
jpayne@69 925 #define CURLSSLOPT_REVOKE_BEST_EFFORT (1<<3)
jpayne@69 926
jpayne@69 927 /* - CURLSSLOPT_NATIVE_CA tells libcurl to use standard certificate store of
jpayne@69 928 operating system. Currently implemented under MS-Windows. */
jpayne@69 929 #define CURLSSLOPT_NATIVE_CA (1<<4)
jpayne@69 930
jpayne@69 931 /* - CURLSSLOPT_AUTO_CLIENT_CERT tells libcurl to automatically locate and use
jpayne@69 932 a client certificate for authentication. (Schannel) */
jpayne@69 933 #define CURLSSLOPT_AUTO_CLIENT_CERT (1<<5)
jpayne@69 934
jpayne@69 935 /* The default connection attempt delay in milliseconds for happy eyeballs.
jpayne@69 936 CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 and happy-eyeballs-timeout-ms.d document
jpayne@69 937 this value, keep them in sync. */
jpayne@69 938 #define CURL_HET_DEFAULT 200L
jpayne@69 939
jpayne@69 940 /* The default connection upkeep interval in milliseconds. */
jpayne@69 941 #define CURL_UPKEEP_INTERVAL_DEFAULT 60000L
jpayne@69 942
jpayne@69 943 #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
jpayne@69 944 the obsolete stuff removed! */
jpayne@69 945
jpayne@69 946 /* Backwards compatibility with older names */
jpayne@69 947 /* These are scheduled to disappear by 2009 */
jpayne@69 948
jpayne@69 949 #define CURLFTPSSL_NONE CURLUSESSL_NONE
jpayne@69 950 #define CURLFTPSSL_TRY CURLUSESSL_TRY
jpayne@69 951 #define CURLFTPSSL_CONTROL CURLUSESSL_CONTROL
jpayne@69 952 #define CURLFTPSSL_ALL CURLUSESSL_ALL
jpayne@69 953 #define CURLFTPSSL_LAST CURLUSESSL_LAST
jpayne@69 954 #define curl_ftpssl curl_usessl
jpayne@69 955 #endif /* !CURL_NO_OLDIES */
jpayne@69 956
jpayne@69 957 /* parameter for the CURLOPT_FTP_SSL_CCC option */
jpayne@69 958 typedef enum {
jpayne@69 959 CURLFTPSSL_CCC_NONE, /* do not send CCC */
jpayne@69 960 CURLFTPSSL_CCC_PASSIVE, /* Let the server initiate the shutdown */
jpayne@69 961 CURLFTPSSL_CCC_ACTIVE, /* Initiate the shutdown */
jpayne@69 962 CURLFTPSSL_CCC_LAST /* not an option, never use */
jpayne@69 963 } curl_ftpccc;
jpayne@69 964
jpayne@69 965 /* parameter for the CURLOPT_FTPSSLAUTH option */
jpayne@69 966 typedef enum {
jpayne@69 967 CURLFTPAUTH_DEFAULT, /* let libcurl decide */
jpayne@69 968 CURLFTPAUTH_SSL, /* use "AUTH SSL" */
jpayne@69 969 CURLFTPAUTH_TLS, /* use "AUTH TLS" */
jpayne@69 970 CURLFTPAUTH_LAST /* not an option, never use */
jpayne@69 971 } curl_ftpauth;
jpayne@69 972
jpayne@69 973 /* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */
jpayne@69 974 typedef enum {
jpayne@69 975 CURLFTP_CREATE_DIR_NONE, /* do NOT create missing dirs! */
jpayne@69 976 CURLFTP_CREATE_DIR, /* (FTP/SFTP) if CWD fails, try MKD and then CWD
jpayne@69 977 again if MKD succeeded, for SFTP this does
jpayne@69 978 similar magic */
jpayne@69 979 CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD
jpayne@69 980 again even if MKD failed! */
jpayne@69 981 CURLFTP_CREATE_DIR_LAST /* not an option, never use */
jpayne@69 982 } curl_ftpcreatedir;
jpayne@69 983
jpayne@69 984 /* parameter for the CURLOPT_FTP_FILEMETHOD option */
jpayne@69 985 typedef enum {
jpayne@69 986 CURLFTPMETHOD_DEFAULT, /* let libcurl pick */
jpayne@69 987 CURLFTPMETHOD_MULTICWD, /* single CWD operation for each path part */
jpayne@69 988 CURLFTPMETHOD_NOCWD, /* no CWD at all */
jpayne@69 989 CURLFTPMETHOD_SINGLECWD, /* one CWD to full dir, then work on file */
jpayne@69 990 CURLFTPMETHOD_LAST /* not an option, never use */
jpayne@69 991 } curl_ftpmethod;
jpayne@69 992
jpayne@69 993 /* bitmask defines for CURLOPT_HEADEROPT */
jpayne@69 994 #define CURLHEADER_UNIFIED 0
jpayne@69 995 #define CURLHEADER_SEPARATE (1<<0)
jpayne@69 996
jpayne@69 997 /* CURLALTSVC_* are bits for the CURLOPT_ALTSVC_CTRL option */
jpayne@69 998 #define CURLALTSVC_READONLYFILE (1<<2)
jpayne@69 999 #define CURLALTSVC_H1 (1<<3)
jpayne@69 1000 #define CURLALTSVC_H2 (1<<4)
jpayne@69 1001 #define CURLALTSVC_H3 (1<<5)
jpayne@69 1002
jpayne@69 1003
jpayne@69 1004 struct curl_hstsentry {
jpayne@69 1005 char *name;
jpayne@69 1006 size_t namelen;
jpayne@69 1007 unsigned int includeSubDomains:1;
jpayne@69 1008 char expire[18]; /* YYYYMMDD HH:MM:SS [null-terminated] */
jpayne@69 1009 };
jpayne@69 1010
jpayne@69 1011 struct curl_index {
jpayne@69 1012 size_t index; /* the provided entry's "index" or count */
jpayne@69 1013 size_t total; /* total number of entries to save */
jpayne@69 1014 };
jpayne@69 1015
jpayne@69 1016 typedef enum {
jpayne@69 1017 CURLSTS_OK,
jpayne@69 1018 CURLSTS_DONE,
jpayne@69 1019 CURLSTS_FAIL
jpayne@69 1020 } CURLSTScode;
jpayne@69 1021
jpayne@69 1022 typedef CURLSTScode (*curl_hstsread_callback)(CURL *easy,
jpayne@69 1023 struct curl_hstsentry *e,
jpayne@69 1024 void *userp);
jpayne@69 1025 typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy,
jpayne@69 1026 struct curl_hstsentry *e,
jpayne@69 1027 struct curl_index *i,
jpayne@69 1028 void *userp);
jpayne@69 1029
jpayne@69 1030 /* CURLHSTS_* are bits for the CURLOPT_HSTS option */
jpayne@69 1031 #define CURLHSTS_ENABLE (long)(1<<0)
jpayne@69 1032 #define CURLHSTS_READONLYFILE (long)(1<<1)
jpayne@69 1033
jpayne@69 1034 /* The CURLPROTO_ defines below are for the **deprecated** CURLOPT_*PROTOCOLS
jpayne@69 1035 options. Do not use. */
jpayne@69 1036 #define CURLPROTO_HTTP (1<<0)
jpayne@69 1037 #define CURLPROTO_HTTPS (1<<1)
jpayne@69 1038 #define CURLPROTO_FTP (1<<2)
jpayne@69 1039 #define CURLPROTO_FTPS (1<<3)
jpayne@69 1040 #define CURLPROTO_SCP (1<<4)
jpayne@69 1041 #define CURLPROTO_SFTP (1<<5)
jpayne@69 1042 #define CURLPROTO_TELNET (1<<6)
jpayne@69 1043 #define CURLPROTO_LDAP (1<<7)
jpayne@69 1044 #define CURLPROTO_LDAPS (1<<8)
jpayne@69 1045 #define CURLPROTO_DICT (1<<9)
jpayne@69 1046 #define CURLPROTO_FILE (1<<10)
jpayne@69 1047 #define CURLPROTO_TFTP (1<<11)
jpayne@69 1048 #define CURLPROTO_IMAP (1<<12)
jpayne@69 1049 #define CURLPROTO_IMAPS (1<<13)
jpayne@69 1050 #define CURLPROTO_POP3 (1<<14)
jpayne@69 1051 #define CURLPROTO_POP3S (1<<15)
jpayne@69 1052 #define CURLPROTO_SMTP (1<<16)
jpayne@69 1053 #define CURLPROTO_SMTPS (1<<17)
jpayne@69 1054 #define CURLPROTO_RTSP (1<<18)
jpayne@69 1055 #define CURLPROTO_RTMP (1<<19)
jpayne@69 1056 #define CURLPROTO_RTMPT (1<<20)
jpayne@69 1057 #define CURLPROTO_RTMPE (1<<21)
jpayne@69 1058 #define CURLPROTO_RTMPTE (1<<22)
jpayne@69 1059 #define CURLPROTO_RTMPS (1<<23)
jpayne@69 1060 #define CURLPROTO_RTMPTS (1<<24)
jpayne@69 1061 #define CURLPROTO_GOPHER (1<<25)
jpayne@69 1062 #define CURLPROTO_SMB (1<<26)
jpayne@69 1063 #define CURLPROTO_SMBS (1<<27)
jpayne@69 1064 #define CURLPROTO_MQTT (1<<28)
jpayne@69 1065 #define CURLPROTO_GOPHERS (1<<29)
jpayne@69 1066 #define CURLPROTO_ALL (~0) /* enable everything */
jpayne@69 1067
jpayne@69 1068 /* long may be 32 or 64 bits, but we should never depend on anything else
jpayne@69 1069 but 32 */
jpayne@69 1070 #define CURLOPTTYPE_LONG 0
jpayne@69 1071 #define CURLOPTTYPE_OBJECTPOINT 10000
jpayne@69 1072 #define CURLOPTTYPE_FUNCTIONPOINT 20000
jpayne@69 1073 #define CURLOPTTYPE_OFF_T 30000
jpayne@69 1074 #define CURLOPTTYPE_BLOB 40000
jpayne@69 1075
jpayne@69 1076 /* *STRINGPOINT is an alias for OBJECTPOINT to allow tools to extract the
jpayne@69 1077 string options from the header file */
jpayne@69 1078
jpayne@69 1079
jpayne@69 1080 #define CURLOPT(na,t,nu) na = t + nu
jpayne@69 1081 #define CURLOPTDEPRECATED(na,t,nu,v,m) na CURL_DEPRECATED(v,m) = t + nu
jpayne@69 1082
jpayne@69 1083 /* CURLOPT aliases that make no run-time difference */
jpayne@69 1084
jpayne@69 1085 /* 'char *' argument to a string with a trailing zero */
jpayne@69 1086 #define CURLOPTTYPE_STRINGPOINT CURLOPTTYPE_OBJECTPOINT
jpayne@69 1087
jpayne@69 1088 /* 'struct curl_slist *' argument */
jpayne@69 1089 #define CURLOPTTYPE_SLISTPOINT CURLOPTTYPE_OBJECTPOINT
jpayne@69 1090
jpayne@69 1091 /* 'void *' argument passed untouched to callback */
jpayne@69 1092 #define CURLOPTTYPE_CBPOINT CURLOPTTYPE_OBJECTPOINT
jpayne@69 1093
jpayne@69 1094 /* 'long' argument with a set of values/bitmask */
jpayne@69 1095 #define CURLOPTTYPE_VALUES CURLOPTTYPE_LONG
jpayne@69 1096
jpayne@69 1097 /*
jpayne@69 1098 * All CURLOPT_* values.
jpayne@69 1099 */
jpayne@69 1100
jpayne@69 1101 typedef enum {
jpayne@69 1102 /* This is the FILE * or void * the regular output should be written to. */
jpayne@69 1103 CURLOPT(CURLOPT_WRITEDATA, CURLOPTTYPE_CBPOINT, 1),
jpayne@69 1104
jpayne@69 1105 /* The full URL to get/put */
jpayne@69 1106 CURLOPT(CURLOPT_URL, CURLOPTTYPE_STRINGPOINT, 2),
jpayne@69 1107
jpayne@69 1108 /* Port number to connect to, if other than default. */
jpayne@69 1109 CURLOPT(CURLOPT_PORT, CURLOPTTYPE_LONG, 3),
jpayne@69 1110
jpayne@69 1111 /* Name of proxy to use. */
jpayne@69 1112 CURLOPT(CURLOPT_PROXY, CURLOPTTYPE_STRINGPOINT, 4),
jpayne@69 1113
jpayne@69 1114 /* "user:password;options" to use when fetching. */
jpayne@69 1115 CURLOPT(CURLOPT_USERPWD, CURLOPTTYPE_STRINGPOINT, 5),
jpayne@69 1116
jpayne@69 1117 /* "user:password" to use with proxy. */
jpayne@69 1118 CURLOPT(CURLOPT_PROXYUSERPWD, CURLOPTTYPE_STRINGPOINT, 6),
jpayne@69 1119
jpayne@69 1120 /* Range to get, specified as an ASCII string. */
jpayne@69 1121 CURLOPT(CURLOPT_RANGE, CURLOPTTYPE_STRINGPOINT, 7),
jpayne@69 1122
jpayne@69 1123 /* not used */
jpayne@69 1124
jpayne@69 1125 /* Specified file stream to upload from (use as input): */
jpayne@69 1126 CURLOPT(CURLOPT_READDATA, CURLOPTTYPE_CBPOINT, 9),
jpayne@69 1127
jpayne@69 1128 /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE
jpayne@69 1129 * bytes big. */
jpayne@69 1130 CURLOPT(CURLOPT_ERRORBUFFER, CURLOPTTYPE_OBJECTPOINT, 10),
jpayne@69 1131
jpayne@69 1132 /* Function that will be called to store the output (instead of fwrite). The
jpayne@69 1133 * parameters will use fwrite() syntax, make sure to follow them. */
jpayne@69 1134 CURLOPT(CURLOPT_WRITEFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 11),
jpayne@69 1135
jpayne@69 1136 /* Function that will be called to read the input (instead of fread). The
jpayne@69 1137 * parameters will use fread() syntax, make sure to follow them. */
jpayne@69 1138 CURLOPT(CURLOPT_READFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 12),
jpayne@69 1139
jpayne@69 1140 /* Time-out the read operation after this amount of seconds */
jpayne@69 1141 CURLOPT(CURLOPT_TIMEOUT, CURLOPTTYPE_LONG, 13),
jpayne@69 1142
jpayne@69 1143 /* If CURLOPT_READDATA is used, this can be used to inform libcurl about
jpayne@69 1144 * how large the file being sent really is. That allows better error
jpayne@69 1145 * checking and better verifies that the upload was successful. -1 means
jpayne@69 1146 * unknown size.
jpayne@69 1147 *
jpayne@69 1148 * For large file support, there is also a _LARGE version of the key
jpayne@69 1149 * which takes an off_t type, allowing platforms with larger off_t
jpayne@69 1150 * sizes to handle larger files. See below for INFILESIZE_LARGE.
jpayne@69 1151 */
jpayne@69 1152 CURLOPT(CURLOPT_INFILESIZE, CURLOPTTYPE_LONG, 14),
jpayne@69 1153
jpayne@69 1154 /* POST static input fields. */
jpayne@69 1155 CURLOPT(CURLOPT_POSTFIELDS, CURLOPTTYPE_OBJECTPOINT, 15),
jpayne@69 1156
jpayne@69 1157 /* Set the referrer page (needed by some CGIs) */
jpayne@69 1158 CURLOPT(CURLOPT_REFERER, CURLOPTTYPE_STRINGPOINT, 16),
jpayne@69 1159
jpayne@69 1160 /* Set the FTP PORT string (interface name, named or numerical IP address)
jpayne@69 1161 Use i.e '-' to use default address. */
jpayne@69 1162 CURLOPT(CURLOPT_FTPPORT, CURLOPTTYPE_STRINGPOINT, 17),
jpayne@69 1163
jpayne@69 1164 /* Set the User-Agent string (examined by some CGIs) */
jpayne@69 1165 CURLOPT(CURLOPT_USERAGENT, CURLOPTTYPE_STRINGPOINT, 18),
jpayne@69 1166
jpayne@69 1167 /* If the download receives less than "low speed limit" bytes/second
jpayne@69 1168 * during "low speed time" seconds, the operations is aborted.
jpayne@69 1169 * You could i.e if you have a pretty high speed connection, abort if
jpayne@69 1170 * it is less than 2000 bytes/sec during 20 seconds.
jpayne@69 1171 */
jpayne@69 1172
jpayne@69 1173 /* Set the "low speed limit" */
jpayne@69 1174 CURLOPT(CURLOPT_LOW_SPEED_LIMIT, CURLOPTTYPE_LONG, 19),
jpayne@69 1175
jpayne@69 1176 /* Set the "low speed time" */
jpayne@69 1177 CURLOPT(CURLOPT_LOW_SPEED_TIME, CURLOPTTYPE_LONG, 20),
jpayne@69 1178
jpayne@69 1179 /* Set the continuation offset.
jpayne@69 1180 *
jpayne@69 1181 * Note there is also a _LARGE version of this key which uses
jpayne@69 1182 * off_t types, allowing for large file offsets on platforms which
jpayne@69 1183 * use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE.
jpayne@69 1184 */
jpayne@69 1185 CURLOPT(CURLOPT_RESUME_FROM, CURLOPTTYPE_LONG, 21),
jpayne@69 1186
jpayne@69 1187 /* Set cookie in request: */
jpayne@69 1188 CURLOPT(CURLOPT_COOKIE, CURLOPTTYPE_STRINGPOINT, 22),
jpayne@69 1189
jpayne@69 1190 /* This points to a linked list of headers, struct curl_slist kind. This
jpayne@69 1191 list is also used for RTSP (in spite of its name) */
jpayne@69 1192 CURLOPT(CURLOPT_HTTPHEADER, CURLOPTTYPE_SLISTPOINT, 23),
jpayne@69 1193
jpayne@69 1194 /* This points to a linked list of post entries, struct curl_httppost */
jpayne@69 1195 CURLOPTDEPRECATED(CURLOPT_HTTPPOST, CURLOPTTYPE_OBJECTPOINT, 24,
jpayne@69 1196 7.56.0, "Use CURLOPT_MIMEPOST"),
jpayne@69 1197
jpayne@69 1198 /* name of the file keeping your private SSL-certificate */
jpayne@69 1199 CURLOPT(CURLOPT_SSLCERT, CURLOPTTYPE_STRINGPOINT, 25),
jpayne@69 1200
jpayne@69 1201 /* password for the SSL or SSH private key */
jpayne@69 1202 CURLOPT(CURLOPT_KEYPASSWD, CURLOPTTYPE_STRINGPOINT, 26),
jpayne@69 1203
jpayne@69 1204 /* send TYPE parameter? */
jpayne@69 1205 CURLOPT(CURLOPT_CRLF, CURLOPTTYPE_LONG, 27),
jpayne@69 1206
jpayne@69 1207 /* send linked-list of QUOTE commands */
jpayne@69 1208 CURLOPT(CURLOPT_QUOTE, CURLOPTTYPE_SLISTPOINT, 28),
jpayne@69 1209
jpayne@69 1210 /* send FILE * or void * to store headers to, if you use a callback it
jpayne@69 1211 is simply passed to the callback unmodified */
jpayne@69 1212 CURLOPT(CURLOPT_HEADERDATA, CURLOPTTYPE_CBPOINT, 29),
jpayne@69 1213
jpayne@69 1214 /* point to a file to read the initial cookies from, also enables
jpayne@69 1215 "cookie awareness" */
jpayne@69 1216 CURLOPT(CURLOPT_COOKIEFILE, CURLOPTTYPE_STRINGPOINT, 31),
jpayne@69 1217
jpayne@69 1218 /* What version to specifically try to use.
jpayne@69 1219 See CURL_SSLVERSION defines below. */
jpayne@69 1220 CURLOPT(CURLOPT_SSLVERSION, CURLOPTTYPE_VALUES, 32),
jpayne@69 1221
jpayne@69 1222 /* What kind of HTTP time condition to use, see defines */
jpayne@69 1223 CURLOPT(CURLOPT_TIMECONDITION, CURLOPTTYPE_VALUES, 33),
jpayne@69 1224
jpayne@69 1225 /* Time to use with the above condition. Specified in number of seconds
jpayne@69 1226 since 1 Jan 1970 */
jpayne@69 1227 CURLOPT(CURLOPT_TIMEVALUE, CURLOPTTYPE_LONG, 34),
jpayne@69 1228
jpayne@69 1229 /* 35 = OBSOLETE */
jpayne@69 1230
jpayne@69 1231 /* Custom request, for customizing the get command like
jpayne@69 1232 HTTP: DELETE, TRACE and others
jpayne@69 1233 FTP: to use a different list command
jpayne@69 1234 */
jpayne@69 1235 CURLOPT(CURLOPT_CUSTOMREQUEST, CURLOPTTYPE_STRINGPOINT, 36),
jpayne@69 1236
jpayne@69 1237 /* FILE handle to use instead of stderr */
jpayne@69 1238 CURLOPT(CURLOPT_STDERR, CURLOPTTYPE_OBJECTPOINT, 37),
jpayne@69 1239
jpayne@69 1240 /* 38 is not used */
jpayne@69 1241
jpayne@69 1242 /* send linked-list of post-transfer QUOTE commands */
jpayne@69 1243 CURLOPT(CURLOPT_POSTQUOTE, CURLOPTTYPE_SLISTPOINT, 39),
jpayne@69 1244
jpayne@69 1245 /* OBSOLETE, do not use! */
jpayne@69 1246 CURLOPT(CURLOPT_OBSOLETE40, CURLOPTTYPE_OBJECTPOINT, 40),
jpayne@69 1247
jpayne@69 1248 /* talk a lot */
jpayne@69 1249 CURLOPT(CURLOPT_VERBOSE, CURLOPTTYPE_LONG, 41),
jpayne@69 1250
jpayne@69 1251 /* throw the header out too */
jpayne@69 1252 CURLOPT(CURLOPT_HEADER, CURLOPTTYPE_LONG, 42),
jpayne@69 1253
jpayne@69 1254 /* shut off the progress meter */
jpayne@69 1255 CURLOPT(CURLOPT_NOPROGRESS, CURLOPTTYPE_LONG, 43),
jpayne@69 1256
jpayne@69 1257 /* use HEAD to get http document */
jpayne@69 1258 CURLOPT(CURLOPT_NOBODY, CURLOPTTYPE_LONG, 44),
jpayne@69 1259
jpayne@69 1260 /* no output on http error codes >= 400 */
jpayne@69 1261 CURLOPT(CURLOPT_FAILONERROR, CURLOPTTYPE_LONG, 45),
jpayne@69 1262
jpayne@69 1263 /* this is an upload */
jpayne@69 1264 CURLOPT(CURLOPT_UPLOAD, CURLOPTTYPE_LONG, 46),
jpayne@69 1265
jpayne@69 1266 /* HTTP POST method */
jpayne@69 1267 CURLOPT(CURLOPT_POST, CURLOPTTYPE_LONG, 47),
jpayne@69 1268
jpayne@69 1269 /* bare names when listing directories */
jpayne@69 1270 CURLOPT(CURLOPT_DIRLISTONLY, CURLOPTTYPE_LONG, 48),
jpayne@69 1271
jpayne@69 1272 /* Append instead of overwrite on upload! */
jpayne@69 1273 CURLOPT(CURLOPT_APPEND, CURLOPTTYPE_LONG, 50),
jpayne@69 1274
jpayne@69 1275 /* Specify whether to read the user+password from the .netrc or the URL.
jpayne@69 1276 * This must be one of the CURL_NETRC_* enums below. */
jpayne@69 1277 CURLOPT(CURLOPT_NETRC, CURLOPTTYPE_VALUES, 51),
jpayne@69 1278
jpayne@69 1279 /* use Location: Luke! */
jpayne@69 1280 CURLOPT(CURLOPT_FOLLOWLOCATION, CURLOPTTYPE_LONG, 52),
jpayne@69 1281
jpayne@69 1282 /* transfer data in text/ASCII format */
jpayne@69 1283 CURLOPT(CURLOPT_TRANSFERTEXT, CURLOPTTYPE_LONG, 53),
jpayne@69 1284
jpayne@69 1285 /* HTTP PUT */
jpayne@69 1286 CURLOPTDEPRECATED(CURLOPT_PUT, CURLOPTTYPE_LONG, 54,
jpayne@69 1287 7.12.1, "Use CURLOPT_UPLOAD"),
jpayne@69 1288
jpayne@69 1289 /* 55 = OBSOLETE */
jpayne@69 1290
jpayne@69 1291 /* DEPRECATED
jpayne@69 1292 * Function that will be called instead of the internal progress display
jpayne@69 1293 * function. This function should be defined as the curl_progress_callback
jpayne@69 1294 * prototype defines. */
jpayne@69 1295 CURLOPTDEPRECATED(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56,
jpayne@69 1296 7.32.0, "Use CURLOPT_XFERINFOFUNCTION"),
jpayne@69 1297
jpayne@69 1298 /* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION
jpayne@69 1299 callbacks */
jpayne@69 1300 CURLOPT(CURLOPT_XFERINFODATA, CURLOPTTYPE_CBPOINT, 57),
jpayne@69 1301 #define CURLOPT_PROGRESSDATA CURLOPT_XFERINFODATA
jpayne@69 1302
jpayne@69 1303 /* We want the referrer field set automatically when following locations */
jpayne@69 1304 CURLOPT(CURLOPT_AUTOREFERER, CURLOPTTYPE_LONG, 58),
jpayne@69 1305
jpayne@69 1306 /* Port of the proxy, can be set in the proxy string as well with:
jpayne@69 1307 "[host]:[port]" */
jpayne@69 1308 CURLOPT(CURLOPT_PROXYPORT, CURLOPTTYPE_LONG, 59),
jpayne@69 1309
jpayne@69 1310 /* size of the POST input data, if strlen() is not good to use */
jpayne@69 1311 CURLOPT(CURLOPT_POSTFIELDSIZE, CURLOPTTYPE_LONG, 60),
jpayne@69 1312
jpayne@69 1313 /* tunnel non-http operations through an HTTP proxy */
jpayne@69 1314 CURLOPT(CURLOPT_HTTPPROXYTUNNEL, CURLOPTTYPE_LONG, 61),
jpayne@69 1315
jpayne@69 1316 /* Set the interface string to use as outgoing network interface */
jpayne@69 1317 CURLOPT(CURLOPT_INTERFACE, CURLOPTTYPE_STRINGPOINT, 62),
jpayne@69 1318
jpayne@69 1319 /* Set the krb4/5 security level, this also enables krb4/5 awareness. This
jpayne@69 1320 * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string
jpayne@69 1321 * is set but doesn't match one of these, 'private' will be used. */
jpayne@69 1322 CURLOPT(CURLOPT_KRBLEVEL, CURLOPTTYPE_STRINGPOINT, 63),
jpayne@69 1323
jpayne@69 1324 /* Set if we should verify the peer in ssl handshake, set 1 to verify. */
jpayne@69 1325 CURLOPT(CURLOPT_SSL_VERIFYPEER, CURLOPTTYPE_LONG, 64),
jpayne@69 1326
jpayne@69 1327 /* The CApath or CAfile used to validate the peer certificate
jpayne@69 1328 this option is used only if SSL_VERIFYPEER is true */
jpayne@69 1329 CURLOPT(CURLOPT_CAINFO, CURLOPTTYPE_STRINGPOINT, 65),
jpayne@69 1330
jpayne@69 1331 /* 66 = OBSOLETE */
jpayne@69 1332 /* 67 = OBSOLETE */
jpayne@69 1333
jpayne@69 1334 /* Maximum number of http redirects to follow */
jpayne@69 1335 CURLOPT(CURLOPT_MAXREDIRS, CURLOPTTYPE_LONG, 68),
jpayne@69 1336
jpayne@69 1337 /* Pass a long set to 1 to get the date of the requested document (if
jpayne@69 1338 possible)! Pass a zero to shut it off. */
jpayne@69 1339 CURLOPT(CURLOPT_FILETIME, CURLOPTTYPE_LONG, 69),
jpayne@69 1340
jpayne@69 1341 /* This points to a linked list of telnet options */
jpayne@69 1342 CURLOPT(CURLOPT_TELNETOPTIONS, CURLOPTTYPE_SLISTPOINT, 70),
jpayne@69 1343
jpayne@69 1344 /* Max amount of cached alive connections */
jpayne@69 1345 CURLOPT(CURLOPT_MAXCONNECTS, CURLOPTTYPE_LONG, 71),
jpayne@69 1346
jpayne@69 1347 /* OBSOLETE, do not use! */
jpayne@69 1348 CURLOPT(CURLOPT_OBSOLETE72, CURLOPTTYPE_LONG, 72),
jpayne@69 1349
jpayne@69 1350 /* 73 = OBSOLETE */
jpayne@69 1351
jpayne@69 1352 /* Set to explicitly use a new connection for the upcoming transfer.
jpayne@69 1353 Do not use this unless you're absolutely sure of this, as it makes the
jpayne@69 1354 operation slower and is less friendly for the network. */
jpayne@69 1355 CURLOPT(CURLOPT_FRESH_CONNECT, CURLOPTTYPE_LONG, 74),
jpayne@69 1356
jpayne@69 1357 /* Set to explicitly forbid the upcoming transfer's connection to be re-used
jpayne@69 1358 when done. Do not use this unless you're absolutely sure of this, as it
jpayne@69 1359 makes the operation slower and is less friendly for the network. */
jpayne@69 1360 CURLOPT(CURLOPT_FORBID_REUSE, CURLOPTTYPE_LONG, 75),
jpayne@69 1361
jpayne@69 1362 /* Set to a file name that contains random data for libcurl to use to
jpayne@69 1363 seed the random engine when doing SSL connects. */
jpayne@69 1364 CURLOPTDEPRECATED(CURLOPT_RANDOM_FILE, CURLOPTTYPE_STRINGPOINT, 76,
jpayne@69 1365 7.84.0, "Serves no purpose anymore"),
jpayne@69 1366
jpayne@69 1367 /* Set to the Entropy Gathering Daemon socket pathname */
jpayne@69 1368 CURLOPTDEPRECATED(CURLOPT_EGDSOCKET, CURLOPTTYPE_STRINGPOINT, 77,
jpayne@69 1369 7.84.0, "Serves no purpose anymore"),
jpayne@69 1370
jpayne@69 1371 /* Time-out connect operations after this amount of seconds, if connects are
jpayne@69 1372 OK within this time, then fine... This only aborts the connect phase. */
jpayne@69 1373 CURLOPT(CURLOPT_CONNECTTIMEOUT, CURLOPTTYPE_LONG, 78),
jpayne@69 1374
jpayne@69 1375 /* Function that will be called to store headers (instead of fwrite). The
jpayne@69 1376 * parameters will use fwrite() syntax, make sure to follow them. */
jpayne@69 1377 CURLOPT(CURLOPT_HEADERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 79),
jpayne@69 1378
jpayne@69 1379 /* Set this to force the HTTP request to get back to GET. Only really usable
jpayne@69 1380 if POST, PUT or a custom request have been used first.
jpayne@69 1381 */
jpayne@69 1382 CURLOPT(CURLOPT_HTTPGET, CURLOPTTYPE_LONG, 80),
jpayne@69 1383
jpayne@69 1384 /* Set if we should verify the Common name from the peer certificate in ssl
jpayne@69 1385 * handshake, set 1 to check existence, 2 to ensure that it matches the
jpayne@69 1386 * provided hostname. */
jpayne@69 1387 CURLOPT(CURLOPT_SSL_VERIFYHOST, CURLOPTTYPE_LONG, 81),
jpayne@69 1388
jpayne@69 1389 /* Specify which file name to write all known cookies in after completed
jpayne@69 1390 operation. Set file name to "-" (dash) to make it go to stdout. */
jpayne@69 1391 CURLOPT(CURLOPT_COOKIEJAR, CURLOPTTYPE_STRINGPOINT, 82),
jpayne@69 1392
jpayne@69 1393 /* Specify which SSL ciphers to use */
jpayne@69 1394 CURLOPT(CURLOPT_SSL_CIPHER_LIST, CURLOPTTYPE_STRINGPOINT, 83),
jpayne@69 1395
jpayne@69 1396 /* Specify which HTTP version to use! This must be set to one of the
jpayne@69 1397 CURL_HTTP_VERSION* enums set below. */
jpayne@69 1398 CURLOPT(CURLOPT_HTTP_VERSION, CURLOPTTYPE_VALUES, 84),
jpayne@69 1399
jpayne@69 1400 /* Specifically switch on or off the FTP engine's use of the EPSV command. By
jpayne@69 1401 default, that one will always be attempted before the more traditional
jpayne@69 1402 PASV command. */
jpayne@69 1403 CURLOPT(CURLOPT_FTP_USE_EPSV, CURLOPTTYPE_LONG, 85),
jpayne@69 1404
jpayne@69 1405 /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */
jpayne@69 1406 CURLOPT(CURLOPT_SSLCERTTYPE, CURLOPTTYPE_STRINGPOINT, 86),
jpayne@69 1407
jpayne@69 1408 /* name of the file keeping your private SSL-key */
jpayne@69 1409 CURLOPT(CURLOPT_SSLKEY, CURLOPTTYPE_STRINGPOINT, 87),
jpayne@69 1410
jpayne@69 1411 /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */
jpayne@69 1412 CURLOPT(CURLOPT_SSLKEYTYPE, CURLOPTTYPE_STRINGPOINT, 88),
jpayne@69 1413
jpayne@69 1414 /* crypto engine for the SSL-sub system */
jpayne@69 1415 CURLOPT(CURLOPT_SSLENGINE, CURLOPTTYPE_STRINGPOINT, 89),
jpayne@69 1416
jpayne@69 1417 /* set the crypto engine for the SSL-sub system as default
jpayne@69 1418 the param has no meaning...
jpayne@69 1419 */
jpayne@69 1420 CURLOPT(CURLOPT_SSLENGINE_DEFAULT, CURLOPTTYPE_LONG, 90),
jpayne@69 1421
jpayne@69 1422 /* Non-zero value means to use the global dns cache */
jpayne@69 1423 /* DEPRECATED, do not use! */
jpayne@69 1424 CURLOPTDEPRECATED(CURLOPT_DNS_USE_GLOBAL_CACHE, CURLOPTTYPE_LONG, 91,
jpayne@69 1425 7.11.1, "Use CURLOPT_SHARE"),
jpayne@69 1426
jpayne@69 1427 /* DNS cache timeout */
jpayne@69 1428 CURLOPT(CURLOPT_DNS_CACHE_TIMEOUT, CURLOPTTYPE_LONG, 92),
jpayne@69 1429
jpayne@69 1430 /* send linked-list of pre-transfer QUOTE commands */
jpayne@69 1431 CURLOPT(CURLOPT_PREQUOTE, CURLOPTTYPE_SLISTPOINT, 93),
jpayne@69 1432
jpayne@69 1433 /* set the debug function */
jpayne@69 1434 CURLOPT(CURLOPT_DEBUGFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 94),
jpayne@69 1435
jpayne@69 1436 /* set the data for the debug function */
jpayne@69 1437 CURLOPT(CURLOPT_DEBUGDATA, CURLOPTTYPE_CBPOINT, 95),
jpayne@69 1438
jpayne@69 1439 /* mark this as start of a cookie session */
jpayne@69 1440 CURLOPT(CURLOPT_COOKIESESSION, CURLOPTTYPE_LONG, 96),
jpayne@69 1441
jpayne@69 1442 /* The CApath directory used to validate the peer certificate
jpayne@69 1443 this option is used only if SSL_VERIFYPEER is true */
jpayne@69 1444 CURLOPT(CURLOPT_CAPATH, CURLOPTTYPE_STRINGPOINT, 97),
jpayne@69 1445
jpayne@69 1446 /* Instruct libcurl to use a smaller receive buffer */
jpayne@69 1447 CURLOPT(CURLOPT_BUFFERSIZE, CURLOPTTYPE_LONG, 98),
jpayne@69 1448
jpayne@69 1449 /* Instruct libcurl to not use any signal/alarm handlers, even when using
jpayne@69 1450 timeouts. This option is useful for multi-threaded applications.
jpayne@69 1451 See libcurl-the-guide for more background information. */
jpayne@69 1452 CURLOPT(CURLOPT_NOSIGNAL, CURLOPTTYPE_LONG, 99),
jpayne@69 1453
jpayne@69 1454 /* Provide a CURLShare for mutexing non-ts data */
jpayne@69 1455 CURLOPT(CURLOPT_SHARE, CURLOPTTYPE_OBJECTPOINT, 100),
jpayne@69 1456
jpayne@69 1457 /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default),
jpayne@69 1458 CURLPROXY_HTTPS, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and
jpayne@69 1459 CURLPROXY_SOCKS5. */
jpayne@69 1460 CURLOPT(CURLOPT_PROXYTYPE, CURLOPTTYPE_VALUES, 101),
jpayne@69 1461
jpayne@69 1462 /* Set the Accept-Encoding string. Use this to tell a server you would like
jpayne@69 1463 the response to be compressed. Before 7.21.6, this was known as
jpayne@69 1464 CURLOPT_ENCODING */
jpayne@69 1465 CURLOPT(CURLOPT_ACCEPT_ENCODING, CURLOPTTYPE_STRINGPOINT, 102),
jpayne@69 1466
jpayne@69 1467 /* Set pointer to private data */
jpayne@69 1468 CURLOPT(CURLOPT_PRIVATE, CURLOPTTYPE_OBJECTPOINT, 103),
jpayne@69 1469
jpayne@69 1470 /* Set aliases for HTTP 200 in the HTTP Response header */
jpayne@69 1471 CURLOPT(CURLOPT_HTTP200ALIASES, CURLOPTTYPE_SLISTPOINT, 104),
jpayne@69 1472
jpayne@69 1473 /* Continue to send authentication (user+password) when following locations,
jpayne@69 1474 even when hostname changed. This can potentially send off the name
jpayne@69 1475 and password to whatever host the server decides. */
jpayne@69 1476 CURLOPT(CURLOPT_UNRESTRICTED_AUTH, CURLOPTTYPE_LONG, 105),
jpayne@69 1477
jpayne@69 1478 /* Specifically switch on or off the FTP engine's use of the EPRT command (
jpayne@69 1479 it also disables the LPRT attempt). By default, those ones will always be
jpayne@69 1480 attempted before the good old traditional PORT command. */
jpayne@69 1481 CURLOPT(CURLOPT_FTP_USE_EPRT, CURLOPTTYPE_LONG, 106),
jpayne@69 1482
jpayne@69 1483 /* Set this to a bitmask value to enable the particular authentications
jpayne@69 1484 methods you like. Use this in combination with CURLOPT_USERPWD.
jpayne@69 1485 Note that setting multiple bits may cause extra network round-trips. */
jpayne@69 1486 CURLOPT(CURLOPT_HTTPAUTH, CURLOPTTYPE_VALUES, 107),
jpayne@69 1487
jpayne@69 1488 /* Set the ssl context callback function, currently only for OpenSSL or
jpayne@69 1489 WolfSSL ssl_ctx, or mbedTLS mbedtls_ssl_config in the second argument.
jpayne@69 1490 The function must match the curl_ssl_ctx_callback prototype. */
jpayne@69 1491 CURLOPT(CURLOPT_SSL_CTX_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 108),
jpayne@69 1492
jpayne@69 1493 /* Set the userdata for the ssl context callback function's third
jpayne@69 1494 argument */
jpayne@69 1495 CURLOPT(CURLOPT_SSL_CTX_DATA, CURLOPTTYPE_CBPOINT, 109),
jpayne@69 1496
jpayne@69 1497 /* FTP Option that causes missing dirs to be created on the remote server.
jpayne@69 1498 In 7.19.4 we introduced the convenience enums for this option using the
jpayne@69 1499 CURLFTP_CREATE_DIR prefix.
jpayne@69 1500 */
jpayne@69 1501 CURLOPT(CURLOPT_FTP_CREATE_MISSING_DIRS, CURLOPTTYPE_LONG, 110),
jpayne@69 1502
jpayne@69 1503 /* Set this to a bitmask value to enable the particular authentications
jpayne@69 1504 methods you like. Use this in combination with CURLOPT_PROXYUSERPWD.
jpayne@69 1505 Note that setting multiple bits may cause extra network round-trips. */
jpayne@69 1506 CURLOPT(CURLOPT_PROXYAUTH, CURLOPTTYPE_VALUES, 111),
jpayne@69 1507
jpayne@69 1508 /* Option that changes the timeout, in seconds, associated with getting a
jpayne@69 1509 response. This is different from transfer timeout time and essentially
jpayne@69 1510 places a demand on the server to acknowledge commands in a timely
jpayne@69 1511 manner. For FTP, SMTP, IMAP and POP3. */
jpayne@69 1512 CURLOPT(CURLOPT_SERVER_RESPONSE_TIMEOUT, CURLOPTTYPE_LONG, 112),
jpayne@69 1513
jpayne@69 1514 /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to
jpayne@69 1515 tell libcurl to use those IP versions only. This only has effect on
jpayne@69 1516 systems with support for more than one, i.e IPv4 _and_ IPv6. */
jpayne@69 1517 CURLOPT(CURLOPT_IPRESOLVE, CURLOPTTYPE_VALUES, 113),
jpayne@69 1518
jpayne@69 1519 /* Set this option to limit the size of a file that will be downloaded from
jpayne@69 1520 an HTTP or FTP server.
jpayne@69 1521
jpayne@69 1522 Note there is also _LARGE version which adds large file support for
jpayne@69 1523 platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below. */
jpayne@69 1524 CURLOPT(CURLOPT_MAXFILESIZE, CURLOPTTYPE_LONG, 114),
jpayne@69 1525
jpayne@69 1526 /* See the comment for INFILESIZE above, but in short, specifies
jpayne@69 1527 * the size of the file being uploaded. -1 means unknown.
jpayne@69 1528 */
jpayne@69 1529 CURLOPT(CURLOPT_INFILESIZE_LARGE, CURLOPTTYPE_OFF_T, 115),
jpayne@69 1530
jpayne@69 1531 /* Sets the continuation offset. There is also a CURLOPTTYPE_LONG version
jpayne@69 1532 * of this; look above for RESUME_FROM.
jpayne@69 1533 */
jpayne@69 1534 CURLOPT(CURLOPT_RESUME_FROM_LARGE, CURLOPTTYPE_OFF_T, 116),
jpayne@69 1535
jpayne@69 1536 /* Sets the maximum size of data that will be downloaded from
jpayne@69 1537 * an HTTP or FTP server. See MAXFILESIZE above for the LONG version.
jpayne@69 1538 */
jpayne@69 1539 CURLOPT(CURLOPT_MAXFILESIZE_LARGE, CURLOPTTYPE_OFF_T, 117),
jpayne@69 1540
jpayne@69 1541 /* Set this option to the file name of your .netrc file you want libcurl
jpayne@69 1542 to parse (using the CURLOPT_NETRC option). If not set, libcurl will do
jpayne@69 1543 a poor attempt to find the user's home directory and check for a .netrc
jpayne@69 1544 file in there. */
jpayne@69 1545 CURLOPT(CURLOPT_NETRC_FILE, CURLOPTTYPE_STRINGPOINT, 118),
jpayne@69 1546
jpayne@69 1547 /* Enable SSL/TLS for FTP, pick one of:
jpayne@69 1548 CURLUSESSL_TRY - try using SSL, proceed anyway otherwise
jpayne@69 1549 CURLUSESSL_CONTROL - SSL for the control connection or fail
jpayne@69 1550 CURLUSESSL_ALL - SSL for all communication or fail
jpayne@69 1551 */
jpayne@69 1552 CURLOPT(CURLOPT_USE_SSL, CURLOPTTYPE_VALUES, 119),
jpayne@69 1553
jpayne@69 1554 /* The _LARGE version of the standard POSTFIELDSIZE option */
jpayne@69 1555 CURLOPT(CURLOPT_POSTFIELDSIZE_LARGE, CURLOPTTYPE_OFF_T, 120),
jpayne@69 1556
jpayne@69 1557 /* Enable/disable the TCP Nagle algorithm */
jpayne@69 1558 CURLOPT(CURLOPT_TCP_NODELAY, CURLOPTTYPE_LONG, 121),
jpayne@69 1559
jpayne@69 1560 /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
jpayne@69 1561 /* 123 OBSOLETE. Gone in 7.16.0 */
jpayne@69 1562 /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
jpayne@69 1563 /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
jpayne@69 1564 /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
jpayne@69 1565 /* 127 OBSOLETE. Gone in 7.16.0 */
jpayne@69 1566 /* 128 OBSOLETE. Gone in 7.16.0 */
jpayne@69 1567
jpayne@69 1568 /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option
jpayne@69 1569 can be used to change libcurl's default action which is to first try
jpayne@69 1570 "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK
jpayne@69 1571 response has been received.
jpayne@69 1572
jpayne@69 1573 Available parameters are:
jpayne@69 1574 CURLFTPAUTH_DEFAULT - let libcurl decide
jpayne@69 1575 CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS
jpayne@69 1576 CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL
jpayne@69 1577 */
jpayne@69 1578 CURLOPT(CURLOPT_FTPSSLAUTH, CURLOPTTYPE_VALUES, 129),
jpayne@69 1579
jpayne@69 1580 CURLOPTDEPRECATED(CURLOPT_IOCTLFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 130,
jpayne@69 1581 7.18.0, "Use CURLOPT_SEEKFUNCTION"),
jpayne@69 1582 CURLOPTDEPRECATED(CURLOPT_IOCTLDATA, CURLOPTTYPE_CBPOINT, 131,
jpayne@69 1583 7.18.0, "Use CURLOPT_SEEKDATA"),
jpayne@69 1584
jpayne@69 1585 /* 132 OBSOLETE. Gone in 7.16.0 */
jpayne@69 1586 /* 133 OBSOLETE. Gone in 7.16.0 */
jpayne@69 1587
jpayne@69 1588 /* null-terminated string for pass on to the FTP server when asked for
jpayne@69 1589 "account" info */
jpayne@69 1590 CURLOPT(CURLOPT_FTP_ACCOUNT, CURLOPTTYPE_STRINGPOINT, 134),
jpayne@69 1591
jpayne@69 1592 /* feed cookie into cookie engine */
jpayne@69 1593 CURLOPT(CURLOPT_COOKIELIST, CURLOPTTYPE_STRINGPOINT, 135),
jpayne@69 1594
jpayne@69 1595 /* ignore Content-Length */
jpayne@69 1596 CURLOPT(CURLOPT_IGNORE_CONTENT_LENGTH, CURLOPTTYPE_LONG, 136),
jpayne@69 1597
jpayne@69 1598 /* Set to non-zero to skip the IP address received in a 227 PASV FTP server
jpayne@69 1599 response. Typically used for FTP-SSL purposes but is not restricted to
jpayne@69 1600 that. libcurl will then instead use the same IP address it used for the
jpayne@69 1601 control connection. */
jpayne@69 1602 CURLOPT(CURLOPT_FTP_SKIP_PASV_IP, CURLOPTTYPE_LONG, 137),
jpayne@69 1603
jpayne@69 1604 /* Select "file method" to use when doing FTP, see the curl_ftpmethod
jpayne@69 1605 above. */
jpayne@69 1606 CURLOPT(CURLOPT_FTP_FILEMETHOD, CURLOPTTYPE_VALUES, 138),
jpayne@69 1607
jpayne@69 1608 /* Local port number to bind the socket to */
jpayne@69 1609 CURLOPT(CURLOPT_LOCALPORT, CURLOPTTYPE_LONG, 139),
jpayne@69 1610
jpayne@69 1611 /* Number of ports to try, including the first one set with LOCALPORT.
jpayne@69 1612 Thus, setting it to 1 will make no additional attempts but the first.
jpayne@69 1613 */
jpayne@69 1614 CURLOPT(CURLOPT_LOCALPORTRANGE, CURLOPTTYPE_LONG, 140),
jpayne@69 1615
jpayne@69 1616 /* no transfer, set up connection and let application use the socket by
jpayne@69 1617 extracting it with CURLINFO_LASTSOCKET */
jpayne@69 1618 CURLOPT(CURLOPT_CONNECT_ONLY, CURLOPTTYPE_LONG, 141),
jpayne@69 1619
jpayne@69 1620 /* Function that will be called to convert from the
jpayne@69 1621 network encoding (instead of using the iconv calls in libcurl) */
jpayne@69 1622 CURLOPTDEPRECATED(CURLOPT_CONV_FROM_NETWORK_FUNCTION,
jpayne@69 1623 CURLOPTTYPE_FUNCTIONPOINT, 142,
jpayne@69 1624 7.82.0, "Serves no purpose anymore"),
jpayne@69 1625
jpayne@69 1626 /* Function that will be called to convert to the
jpayne@69 1627 network encoding (instead of using the iconv calls in libcurl) */
jpayne@69 1628 CURLOPTDEPRECATED(CURLOPT_CONV_TO_NETWORK_FUNCTION,
jpayne@69 1629 CURLOPTTYPE_FUNCTIONPOINT, 143,
jpayne@69 1630 7.82.0, "Serves no purpose anymore"),
jpayne@69 1631
jpayne@69 1632 /* Function that will be called to convert from UTF8
jpayne@69 1633 (instead of using the iconv calls in libcurl)
jpayne@69 1634 Note that this is used only for SSL certificate processing */
jpayne@69 1635 CURLOPTDEPRECATED(CURLOPT_CONV_FROM_UTF8_FUNCTION,
jpayne@69 1636 CURLOPTTYPE_FUNCTIONPOINT, 144,
jpayne@69 1637 7.82.0, "Serves no purpose anymore"),
jpayne@69 1638
jpayne@69 1639 /* if the connection proceeds too quickly then need to slow it down */
jpayne@69 1640 /* limit-rate: maximum number of bytes per second to send or receive */
jpayne@69 1641 CURLOPT(CURLOPT_MAX_SEND_SPEED_LARGE, CURLOPTTYPE_OFF_T, 145),
jpayne@69 1642 CURLOPT(CURLOPT_MAX_RECV_SPEED_LARGE, CURLOPTTYPE_OFF_T, 146),
jpayne@69 1643
jpayne@69 1644 /* Pointer to command string to send if USER/PASS fails. */
jpayne@69 1645 CURLOPT(CURLOPT_FTP_ALTERNATIVE_TO_USER, CURLOPTTYPE_STRINGPOINT, 147),
jpayne@69 1646
jpayne@69 1647 /* callback function for setting socket options */
jpayne@69 1648 CURLOPT(CURLOPT_SOCKOPTFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 148),
jpayne@69 1649 CURLOPT(CURLOPT_SOCKOPTDATA, CURLOPTTYPE_CBPOINT, 149),
jpayne@69 1650
jpayne@69 1651 /* set to 0 to disable session ID re-use for this transfer, default is
jpayne@69 1652 enabled (== 1) */
jpayne@69 1653 CURLOPT(CURLOPT_SSL_SESSIONID_CACHE, CURLOPTTYPE_LONG, 150),
jpayne@69 1654
jpayne@69 1655 /* allowed SSH authentication methods */
jpayne@69 1656 CURLOPT(CURLOPT_SSH_AUTH_TYPES, CURLOPTTYPE_VALUES, 151),
jpayne@69 1657
jpayne@69 1658 /* Used by scp/sftp to do public/private key authentication */
jpayne@69 1659 CURLOPT(CURLOPT_SSH_PUBLIC_KEYFILE, CURLOPTTYPE_STRINGPOINT, 152),
jpayne@69 1660 CURLOPT(CURLOPT_SSH_PRIVATE_KEYFILE, CURLOPTTYPE_STRINGPOINT, 153),
jpayne@69 1661
jpayne@69 1662 /* Send CCC (Clear Command Channel) after authentication */
jpayne@69 1663 CURLOPT(CURLOPT_FTP_SSL_CCC, CURLOPTTYPE_LONG, 154),
jpayne@69 1664
jpayne@69 1665 /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */
jpayne@69 1666 CURLOPT(CURLOPT_TIMEOUT_MS, CURLOPTTYPE_LONG, 155),
jpayne@69 1667 CURLOPT(CURLOPT_CONNECTTIMEOUT_MS, CURLOPTTYPE_LONG, 156),
jpayne@69 1668
jpayne@69 1669 /* set to zero to disable the libcurl's decoding and thus pass the raw body
jpayne@69 1670 data to the application even when it is encoded/compressed */
jpayne@69 1671 CURLOPT(CURLOPT_HTTP_TRANSFER_DECODING, CURLOPTTYPE_LONG, 157),
jpayne@69 1672 CURLOPT(CURLOPT_HTTP_CONTENT_DECODING, CURLOPTTYPE_LONG, 158),
jpayne@69 1673
jpayne@69 1674 /* Permission used when creating new files and directories on the remote
jpayne@69 1675 server for protocols that support it, SFTP/SCP/FILE */
jpayne@69 1676 CURLOPT(CURLOPT_NEW_FILE_PERMS, CURLOPTTYPE_LONG, 159),
jpayne@69 1677 CURLOPT(CURLOPT_NEW_DIRECTORY_PERMS, CURLOPTTYPE_LONG, 160),
jpayne@69 1678
jpayne@69 1679 /* Set the behavior of POST when redirecting. Values must be set to one
jpayne@69 1680 of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */
jpayne@69 1681 CURLOPT(CURLOPT_POSTREDIR, CURLOPTTYPE_VALUES, 161),
jpayne@69 1682
jpayne@69 1683 /* used by scp/sftp to verify the host's public key */
jpayne@69 1684 CURLOPT(CURLOPT_SSH_HOST_PUBLIC_KEY_MD5, CURLOPTTYPE_STRINGPOINT, 162),
jpayne@69 1685
jpayne@69 1686 /* Callback function for opening socket (instead of socket(2)). Optionally,
jpayne@69 1687 callback is able change the address or refuse to connect returning
jpayne@69 1688 CURL_SOCKET_BAD. The callback should have type
jpayne@69 1689 curl_opensocket_callback */
jpayne@69 1690 CURLOPT(CURLOPT_OPENSOCKETFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 163),
jpayne@69 1691 CURLOPT(CURLOPT_OPENSOCKETDATA, CURLOPTTYPE_CBPOINT, 164),
jpayne@69 1692
jpayne@69 1693 /* POST volatile input fields. */
jpayne@69 1694 CURLOPT(CURLOPT_COPYPOSTFIELDS, CURLOPTTYPE_OBJECTPOINT, 165),
jpayne@69 1695
jpayne@69 1696 /* set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy */
jpayne@69 1697 CURLOPT(CURLOPT_PROXY_TRANSFER_MODE, CURLOPTTYPE_LONG, 166),
jpayne@69 1698
jpayne@69 1699 /* Callback function for seeking in the input stream */
jpayne@69 1700 CURLOPT(CURLOPT_SEEKFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 167),
jpayne@69 1701 CURLOPT(CURLOPT_SEEKDATA, CURLOPTTYPE_CBPOINT, 168),
jpayne@69 1702
jpayne@69 1703 /* CRL file */
jpayne@69 1704 CURLOPT(CURLOPT_CRLFILE, CURLOPTTYPE_STRINGPOINT, 169),
jpayne@69 1705
jpayne@69 1706 /* Issuer certificate */
jpayne@69 1707 CURLOPT(CURLOPT_ISSUERCERT, CURLOPTTYPE_STRINGPOINT, 170),
jpayne@69 1708
jpayne@69 1709 /* (IPv6) Address scope */
jpayne@69 1710 CURLOPT(CURLOPT_ADDRESS_SCOPE, CURLOPTTYPE_LONG, 171),
jpayne@69 1711
jpayne@69 1712 /* Collect certificate chain info and allow it to get retrievable with
jpayne@69 1713 CURLINFO_CERTINFO after the transfer is complete. */
jpayne@69 1714 CURLOPT(CURLOPT_CERTINFO, CURLOPTTYPE_LONG, 172),
jpayne@69 1715
jpayne@69 1716 /* "name" and "pwd" to use when fetching. */
jpayne@69 1717 CURLOPT(CURLOPT_USERNAME, CURLOPTTYPE_STRINGPOINT, 173),
jpayne@69 1718 CURLOPT(CURLOPT_PASSWORD, CURLOPTTYPE_STRINGPOINT, 174),
jpayne@69 1719
jpayne@69 1720 /* "name" and "pwd" to use with Proxy when fetching. */
jpayne@69 1721 CURLOPT(CURLOPT_PROXYUSERNAME, CURLOPTTYPE_STRINGPOINT, 175),
jpayne@69 1722 CURLOPT(CURLOPT_PROXYPASSWORD, CURLOPTTYPE_STRINGPOINT, 176),
jpayne@69 1723
jpayne@69 1724 /* Comma separated list of hostnames defining no-proxy zones. These should
jpayne@69 1725 match both hostnames directly, and hostnames within a domain. For
jpayne@69 1726 example, local.com will match local.com and www.local.com, but NOT
jpayne@69 1727 notlocal.com or www.notlocal.com. For compatibility with other
jpayne@69 1728 implementations of this, .local.com will be considered to be the same as
jpayne@69 1729 local.com. A single * is the only valid wildcard, and effectively
jpayne@69 1730 disables the use of proxy. */
jpayne@69 1731 CURLOPT(CURLOPT_NOPROXY, CURLOPTTYPE_STRINGPOINT, 177),
jpayne@69 1732
jpayne@69 1733 /* block size for TFTP transfers */
jpayne@69 1734 CURLOPT(CURLOPT_TFTP_BLKSIZE, CURLOPTTYPE_LONG, 178),
jpayne@69 1735
jpayne@69 1736 /* Socks Service */
jpayne@69 1737 /* DEPRECATED, do not use! */
jpayne@69 1738 CURLOPTDEPRECATED(CURLOPT_SOCKS5_GSSAPI_SERVICE,
jpayne@69 1739 CURLOPTTYPE_STRINGPOINT, 179,
jpayne@69 1740 7.49.0, "Use CURLOPT_PROXY_SERVICE_NAME"),
jpayne@69 1741
jpayne@69 1742 /* Socks Service */
jpayne@69 1743 CURLOPT(CURLOPT_SOCKS5_GSSAPI_NEC, CURLOPTTYPE_LONG, 180),
jpayne@69 1744
jpayne@69 1745 /* set the bitmask for the protocols that are allowed to be used for the
jpayne@69 1746 transfer, which thus helps the app which takes URLs from users or other
jpayne@69 1747 external inputs and want to restrict what protocol(s) to deal
jpayne@69 1748 with. Defaults to CURLPROTO_ALL. */
jpayne@69 1749 CURLOPTDEPRECATED(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181,
jpayne@69 1750 7.85.0, "Use CURLOPT_PROTOCOLS_STR"),
jpayne@69 1751
jpayne@69 1752 /* set the bitmask for the protocols that libcurl is allowed to follow to,
jpayne@69 1753 as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs
jpayne@69 1754 to be set in both bitmasks to be allowed to get redirected to. */
jpayne@69 1755 CURLOPTDEPRECATED(CURLOPT_REDIR_PROTOCOLS, CURLOPTTYPE_LONG, 182,
jpayne@69 1756 7.85.0, "Use CURLOPT_REDIR_PROTOCOLS_STR"),
jpayne@69 1757
jpayne@69 1758 /* set the SSH knownhost file name to use */
jpayne@69 1759 CURLOPT(CURLOPT_SSH_KNOWNHOSTS, CURLOPTTYPE_STRINGPOINT, 183),
jpayne@69 1760
jpayne@69 1761 /* set the SSH host key callback, must point to a curl_sshkeycallback
jpayne@69 1762 function */
jpayne@69 1763 CURLOPT(CURLOPT_SSH_KEYFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 184),
jpayne@69 1764
jpayne@69 1765 /* set the SSH host key callback custom pointer */
jpayne@69 1766 CURLOPT(CURLOPT_SSH_KEYDATA, CURLOPTTYPE_CBPOINT, 185),
jpayne@69 1767
jpayne@69 1768 /* set the SMTP mail originator */
jpayne@69 1769 CURLOPT(CURLOPT_MAIL_FROM, CURLOPTTYPE_STRINGPOINT, 186),
jpayne@69 1770
jpayne@69 1771 /* set the list of SMTP mail receiver(s) */
jpayne@69 1772 CURLOPT(CURLOPT_MAIL_RCPT, CURLOPTTYPE_SLISTPOINT, 187),
jpayne@69 1773
jpayne@69 1774 /* FTP: send PRET before PASV */
jpayne@69 1775 CURLOPT(CURLOPT_FTP_USE_PRET, CURLOPTTYPE_LONG, 188),
jpayne@69 1776
jpayne@69 1777 /* RTSP request method (OPTIONS, SETUP, PLAY, etc...) */
jpayne@69 1778 CURLOPT(CURLOPT_RTSP_REQUEST, CURLOPTTYPE_VALUES, 189),
jpayne@69 1779
jpayne@69 1780 /* The RTSP session identifier */
jpayne@69 1781 CURLOPT(CURLOPT_RTSP_SESSION_ID, CURLOPTTYPE_STRINGPOINT, 190),
jpayne@69 1782
jpayne@69 1783 /* The RTSP stream URI */
jpayne@69 1784 CURLOPT(CURLOPT_RTSP_STREAM_URI, CURLOPTTYPE_STRINGPOINT, 191),
jpayne@69 1785
jpayne@69 1786 /* The Transport: header to use in RTSP requests */
jpayne@69 1787 CURLOPT(CURLOPT_RTSP_TRANSPORT, CURLOPTTYPE_STRINGPOINT, 192),
jpayne@69 1788
jpayne@69 1789 /* Manually initialize the client RTSP CSeq for this handle */
jpayne@69 1790 CURLOPT(CURLOPT_RTSP_CLIENT_CSEQ, CURLOPTTYPE_LONG, 193),
jpayne@69 1791
jpayne@69 1792 /* Manually initialize the server RTSP CSeq for this handle */
jpayne@69 1793 CURLOPT(CURLOPT_RTSP_SERVER_CSEQ, CURLOPTTYPE_LONG, 194),
jpayne@69 1794
jpayne@69 1795 /* The stream to pass to INTERLEAVEFUNCTION. */
jpayne@69 1796 CURLOPT(CURLOPT_INTERLEAVEDATA, CURLOPTTYPE_CBPOINT, 195),
jpayne@69 1797
jpayne@69 1798 /* Let the application define a custom write method for RTP data */
jpayne@69 1799 CURLOPT(CURLOPT_INTERLEAVEFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 196),
jpayne@69 1800
jpayne@69 1801 /* Turn on wildcard matching */
jpayne@69 1802 CURLOPT(CURLOPT_WILDCARDMATCH, CURLOPTTYPE_LONG, 197),
jpayne@69 1803
jpayne@69 1804 /* Directory matching callback called before downloading of an
jpayne@69 1805 individual file (chunk) started */
jpayne@69 1806 CURLOPT(CURLOPT_CHUNK_BGN_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 198),
jpayne@69 1807
jpayne@69 1808 /* Directory matching callback called after the file (chunk)
jpayne@69 1809 was downloaded, or skipped */
jpayne@69 1810 CURLOPT(CURLOPT_CHUNK_END_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 199),
jpayne@69 1811
jpayne@69 1812 /* Change match (fnmatch-like) callback for wildcard matching */
jpayne@69 1813 CURLOPT(CURLOPT_FNMATCH_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 200),
jpayne@69 1814
jpayne@69 1815 /* Let the application define custom chunk data pointer */
jpayne@69 1816 CURLOPT(CURLOPT_CHUNK_DATA, CURLOPTTYPE_CBPOINT, 201),
jpayne@69 1817
jpayne@69 1818 /* FNMATCH_FUNCTION user pointer */
jpayne@69 1819 CURLOPT(CURLOPT_FNMATCH_DATA, CURLOPTTYPE_CBPOINT, 202),
jpayne@69 1820
jpayne@69 1821 /* send linked-list of name:port:address sets */
jpayne@69 1822 CURLOPT(CURLOPT_RESOLVE, CURLOPTTYPE_SLISTPOINT, 203),
jpayne@69 1823
jpayne@69 1824 /* Set a username for authenticated TLS */
jpayne@69 1825 CURLOPT(CURLOPT_TLSAUTH_USERNAME, CURLOPTTYPE_STRINGPOINT, 204),
jpayne@69 1826
jpayne@69 1827 /* Set a password for authenticated TLS */
jpayne@69 1828 CURLOPT(CURLOPT_TLSAUTH_PASSWORD, CURLOPTTYPE_STRINGPOINT, 205),
jpayne@69 1829
jpayne@69 1830 /* Set authentication type for authenticated TLS */
jpayne@69 1831 CURLOPT(CURLOPT_TLSAUTH_TYPE, CURLOPTTYPE_STRINGPOINT, 206),
jpayne@69 1832
jpayne@69 1833 /* Set to 1 to enable the "TE:" header in HTTP requests to ask for
jpayne@69 1834 compressed transfer-encoded responses. Set to 0 to disable the use of TE:
jpayne@69 1835 in outgoing requests. The current default is 0, but it might change in a
jpayne@69 1836 future libcurl release.
jpayne@69 1837
jpayne@69 1838 libcurl will ask for the compressed methods it knows of, and if that
jpayne@69 1839 isn't any, it will not ask for transfer-encoding at all even if this
jpayne@69 1840 option is set to 1.
jpayne@69 1841
jpayne@69 1842 */
jpayne@69 1843 CURLOPT(CURLOPT_TRANSFER_ENCODING, CURLOPTTYPE_LONG, 207),
jpayne@69 1844
jpayne@69 1845 /* Callback function for closing socket (instead of close(2)). The callback
jpayne@69 1846 should have type curl_closesocket_callback */
jpayne@69 1847 CURLOPT(CURLOPT_CLOSESOCKETFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 208),
jpayne@69 1848 CURLOPT(CURLOPT_CLOSESOCKETDATA, CURLOPTTYPE_CBPOINT, 209),
jpayne@69 1849
jpayne@69 1850 /* allow GSSAPI credential delegation */
jpayne@69 1851 CURLOPT(CURLOPT_GSSAPI_DELEGATION, CURLOPTTYPE_VALUES, 210),
jpayne@69 1852
jpayne@69 1853 /* Set the name servers to use for DNS resolution */
jpayne@69 1854 CURLOPT(CURLOPT_DNS_SERVERS, CURLOPTTYPE_STRINGPOINT, 211),
jpayne@69 1855
jpayne@69 1856 /* Time-out accept operations (currently for FTP only) after this amount
jpayne@69 1857 of milliseconds. */
jpayne@69 1858 CURLOPT(CURLOPT_ACCEPTTIMEOUT_MS, CURLOPTTYPE_LONG, 212),
jpayne@69 1859
jpayne@69 1860 /* Set TCP keepalive */
jpayne@69 1861 CURLOPT(CURLOPT_TCP_KEEPALIVE, CURLOPTTYPE_LONG, 213),
jpayne@69 1862
jpayne@69 1863 /* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */
jpayne@69 1864 CURLOPT(CURLOPT_TCP_KEEPIDLE, CURLOPTTYPE_LONG, 214),
jpayne@69 1865 CURLOPT(CURLOPT_TCP_KEEPINTVL, CURLOPTTYPE_LONG, 215),
jpayne@69 1866
jpayne@69 1867 /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */
jpayne@69 1868 CURLOPT(CURLOPT_SSL_OPTIONS, CURLOPTTYPE_VALUES, 216),
jpayne@69 1869
jpayne@69 1870 /* Set the SMTP auth originator */
jpayne@69 1871 CURLOPT(CURLOPT_MAIL_AUTH, CURLOPTTYPE_STRINGPOINT, 217),
jpayne@69 1872
jpayne@69 1873 /* Enable/disable SASL initial response */
jpayne@69 1874 CURLOPT(CURLOPT_SASL_IR, CURLOPTTYPE_LONG, 218),
jpayne@69 1875
jpayne@69 1876 /* Function that will be called instead of the internal progress display
jpayne@69 1877 * function. This function should be defined as the curl_xferinfo_callback
jpayne@69 1878 * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */
jpayne@69 1879 CURLOPT(CURLOPT_XFERINFOFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 219),
jpayne@69 1880
jpayne@69 1881 /* The XOAUTH2 bearer token */
jpayne@69 1882 CURLOPT(CURLOPT_XOAUTH2_BEARER, CURLOPTTYPE_STRINGPOINT, 220),
jpayne@69 1883
jpayne@69 1884 /* Set the interface string to use as outgoing network
jpayne@69 1885 * interface for DNS requests.
jpayne@69 1886 * Only supported by the c-ares DNS backend */
jpayne@69 1887 CURLOPT(CURLOPT_DNS_INTERFACE, CURLOPTTYPE_STRINGPOINT, 221),
jpayne@69 1888
jpayne@69 1889 /* Set the local IPv4 address to use for outgoing DNS requests.
jpayne@69 1890 * Only supported by the c-ares DNS backend */
jpayne@69 1891 CURLOPT(CURLOPT_DNS_LOCAL_IP4, CURLOPTTYPE_STRINGPOINT, 222),
jpayne@69 1892
jpayne@69 1893 /* Set the local IPv6 address to use for outgoing DNS requests.
jpayne@69 1894 * Only supported by the c-ares DNS backend */
jpayne@69 1895 CURLOPT(CURLOPT_DNS_LOCAL_IP6, CURLOPTTYPE_STRINGPOINT, 223),
jpayne@69 1896
jpayne@69 1897 /* Set authentication options directly */
jpayne@69 1898 CURLOPT(CURLOPT_LOGIN_OPTIONS, CURLOPTTYPE_STRINGPOINT, 224),
jpayne@69 1899
jpayne@69 1900 /* Enable/disable TLS NPN extension (http2 over ssl might fail without) */
jpayne@69 1901 CURLOPTDEPRECATED(CURLOPT_SSL_ENABLE_NPN, CURLOPTTYPE_LONG, 225,
jpayne@69 1902 7.86.0, "Has no function"),
jpayne@69 1903
jpayne@69 1904 /* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */
jpayne@69 1905 CURLOPT(CURLOPT_SSL_ENABLE_ALPN, CURLOPTTYPE_LONG, 226),
jpayne@69 1906
jpayne@69 1907 /* Time to wait for a response to an HTTP request containing an
jpayne@69 1908 * Expect: 100-continue header before sending the data anyway. */
jpayne@69 1909 CURLOPT(CURLOPT_EXPECT_100_TIMEOUT_MS, CURLOPTTYPE_LONG, 227),
jpayne@69 1910
jpayne@69 1911 /* This points to a linked list of headers used for proxy requests only,
jpayne@69 1912 struct curl_slist kind */
jpayne@69 1913 CURLOPT(CURLOPT_PROXYHEADER, CURLOPTTYPE_SLISTPOINT, 228),
jpayne@69 1914
jpayne@69 1915 /* Pass in a bitmask of "header options" */
jpayne@69 1916 CURLOPT(CURLOPT_HEADEROPT, CURLOPTTYPE_VALUES, 229),
jpayne@69 1917
jpayne@69 1918 /* The public key in DER form used to validate the peer public key
jpayne@69 1919 this option is used only if SSL_VERIFYPEER is true */
jpayne@69 1920 CURLOPT(CURLOPT_PINNEDPUBLICKEY, CURLOPTTYPE_STRINGPOINT, 230),
jpayne@69 1921
jpayne@69 1922 /* Path to Unix domain socket */
jpayne@69 1923 CURLOPT(CURLOPT_UNIX_SOCKET_PATH, CURLOPTTYPE_STRINGPOINT, 231),
jpayne@69 1924
jpayne@69 1925 /* Set if we should verify the certificate status. */
jpayne@69 1926 CURLOPT(CURLOPT_SSL_VERIFYSTATUS, CURLOPTTYPE_LONG, 232),
jpayne@69 1927
jpayne@69 1928 /* Set if we should enable TLS false start. */
jpayne@69 1929 CURLOPT(CURLOPT_SSL_FALSESTART, CURLOPTTYPE_LONG, 233),
jpayne@69 1930
jpayne@69 1931 /* Do not squash dot-dot sequences */
jpayne@69 1932 CURLOPT(CURLOPT_PATH_AS_IS, CURLOPTTYPE_LONG, 234),
jpayne@69 1933
jpayne@69 1934 /* Proxy Service Name */
jpayne@69 1935 CURLOPT(CURLOPT_PROXY_SERVICE_NAME, CURLOPTTYPE_STRINGPOINT, 235),
jpayne@69 1936
jpayne@69 1937 /* Service Name */
jpayne@69 1938 CURLOPT(CURLOPT_SERVICE_NAME, CURLOPTTYPE_STRINGPOINT, 236),
jpayne@69 1939
jpayne@69 1940 /* Wait/don't wait for pipe/mutex to clarify */
jpayne@69 1941 CURLOPT(CURLOPT_PIPEWAIT, CURLOPTTYPE_LONG, 237),
jpayne@69 1942
jpayne@69 1943 /* Set the protocol used when curl is given a URL without a protocol */
jpayne@69 1944 CURLOPT(CURLOPT_DEFAULT_PROTOCOL, CURLOPTTYPE_STRINGPOINT, 238),
jpayne@69 1945
jpayne@69 1946 /* Set stream weight, 1 - 256 (default is 16) */
jpayne@69 1947 CURLOPT(CURLOPT_STREAM_WEIGHT, CURLOPTTYPE_LONG, 239),
jpayne@69 1948
jpayne@69 1949 /* Set stream dependency on another CURL handle */
jpayne@69 1950 CURLOPT(CURLOPT_STREAM_DEPENDS, CURLOPTTYPE_OBJECTPOINT, 240),
jpayne@69 1951
jpayne@69 1952 /* Set E-xclusive stream dependency on another CURL handle */
jpayne@69 1953 CURLOPT(CURLOPT_STREAM_DEPENDS_E, CURLOPTTYPE_OBJECTPOINT, 241),
jpayne@69 1954
jpayne@69 1955 /* Do not send any tftp option requests to the server */
jpayne@69 1956 CURLOPT(CURLOPT_TFTP_NO_OPTIONS, CURLOPTTYPE_LONG, 242),
jpayne@69 1957
jpayne@69 1958 /* Linked-list of host:port:connect-to-host:connect-to-port,
jpayne@69 1959 overrides the URL's host:port (only for the network layer) */
jpayne@69 1960 CURLOPT(CURLOPT_CONNECT_TO, CURLOPTTYPE_SLISTPOINT, 243),
jpayne@69 1961
jpayne@69 1962 /* Set TCP Fast Open */
jpayne@69 1963 CURLOPT(CURLOPT_TCP_FASTOPEN, CURLOPTTYPE_LONG, 244),
jpayne@69 1964
jpayne@69 1965 /* Continue to send data if the server responds early with an
jpayne@69 1966 * HTTP status code >= 300 */
jpayne@69 1967 CURLOPT(CURLOPT_KEEP_SENDING_ON_ERROR, CURLOPTTYPE_LONG, 245),
jpayne@69 1968
jpayne@69 1969 /* The CApath or CAfile used to validate the proxy certificate
jpayne@69 1970 this option is used only if PROXY_SSL_VERIFYPEER is true */
jpayne@69 1971 CURLOPT(CURLOPT_PROXY_CAINFO, CURLOPTTYPE_STRINGPOINT, 246),
jpayne@69 1972
jpayne@69 1973 /* The CApath directory used to validate the proxy certificate
jpayne@69 1974 this option is used only if PROXY_SSL_VERIFYPEER is true */
jpayne@69 1975 CURLOPT(CURLOPT_PROXY_CAPATH, CURLOPTTYPE_STRINGPOINT, 247),
jpayne@69 1976
jpayne@69 1977 /* Set if we should verify the proxy in ssl handshake,
jpayne@69 1978 set 1 to verify. */
jpayne@69 1979 CURLOPT(CURLOPT_PROXY_SSL_VERIFYPEER, CURLOPTTYPE_LONG, 248),
jpayne@69 1980
jpayne@69 1981 /* Set if we should verify the Common name from the proxy certificate in ssl
jpayne@69 1982 * handshake, set 1 to check existence, 2 to ensure that it matches
jpayne@69 1983 * the provided hostname. */
jpayne@69 1984 CURLOPT(CURLOPT_PROXY_SSL_VERIFYHOST, CURLOPTTYPE_LONG, 249),
jpayne@69 1985
jpayne@69 1986 /* What version to specifically try to use for proxy.
jpayne@69 1987 See CURL_SSLVERSION defines below. */
jpayne@69 1988 CURLOPT(CURLOPT_PROXY_SSLVERSION, CURLOPTTYPE_VALUES, 250),
jpayne@69 1989
jpayne@69 1990 /* Set a username for authenticated TLS for proxy */
jpayne@69 1991 CURLOPT(CURLOPT_PROXY_TLSAUTH_USERNAME, CURLOPTTYPE_STRINGPOINT, 251),
jpayne@69 1992
jpayne@69 1993 /* Set a password for authenticated TLS for proxy */
jpayne@69 1994 CURLOPT(CURLOPT_PROXY_TLSAUTH_PASSWORD, CURLOPTTYPE_STRINGPOINT, 252),
jpayne@69 1995
jpayne@69 1996 /* Set authentication type for authenticated TLS for proxy */
jpayne@69 1997 CURLOPT(CURLOPT_PROXY_TLSAUTH_TYPE, CURLOPTTYPE_STRINGPOINT, 253),
jpayne@69 1998
jpayne@69 1999 /* name of the file keeping your private SSL-certificate for proxy */
jpayne@69 2000 CURLOPT(CURLOPT_PROXY_SSLCERT, CURLOPTTYPE_STRINGPOINT, 254),
jpayne@69 2001
jpayne@69 2002 /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") for
jpayne@69 2003 proxy */
jpayne@69 2004 CURLOPT(CURLOPT_PROXY_SSLCERTTYPE, CURLOPTTYPE_STRINGPOINT, 255),
jpayne@69 2005
jpayne@69 2006 /* name of the file keeping your private SSL-key for proxy */
jpayne@69 2007 CURLOPT(CURLOPT_PROXY_SSLKEY, CURLOPTTYPE_STRINGPOINT, 256),
jpayne@69 2008
jpayne@69 2009 /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") for
jpayne@69 2010 proxy */
jpayne@69 2011 CURLOPT(CURLOPT_PROXY_SSLKEYTYPE, CURLOPTTYPE_STRINGPOINT, 257),
jpayne@69 2012
jpayne@69 2013 /* password for the SSL private key for proxy */
jpayne@69 2014 CURLOPT(CURLOPT_PROXY_KEYPASSWD, CURLOPTTYPE_STRINGPOINT, 258),
jpayne@69 2015
jpayne@69 2016 /* Specify which SSL ciphers to use for proxy */
jpayne@69 2017 CURLOPT(CURLOPT_PROXY_SSL_CIPHER_LIST, CURLOPTTYPE_STRINGPOINT, 259),
jpayne@69 2018
jpayne@69 2019 /* CRL file for proxy */
jpayne@69 2020 CURLOPT(CURLOPT_PROXY_CRLFILE, CURLOPTTYPE_STRINGPOINT, 260),
jpayne@69 2021
jpayne@69 2022 /* Enable/disable specific SSL features with a bitmask for proxy, see
jpayne@69 2023 CURLSSLOPT_* */
jpayne@69 2024 CURLOPT(CURLOPT_PROXY_SSL_OPTIONS, CURLOPTTYPE_LONG, 261),
jpayne@69 2025
jpayne@69 2026 /* Name of pre proxy to use. */
jpayne@69 2027 CURLOPT(CURLOPT_PRE_PROXY, CURLOPTTYPE_STRINGPOINT, 262),
jpayne@69 2028
jpayne@69 2029 /* The public key in DER form used to validate the proxy public key
jpayne@69 2030 this option is used only if PROXY_SSL_VERIFYPEER is true */
jpayne@69 2031 CURLOPT(CURLOPT_PROXY_PINNEDPUBLICKEY, CURLOPTTYPE_STRINGPOINT, 263),
jpayne@69 2032
jpayne@69 2033 /* Path to an abstract Unix domain socket */
jpayne@69 2034 CURLOPT(CURLOPT_ABSTRACT_UNIX_SOCKET, CURLOPTTYPE_STRINGPOINT, 264),
jpayne@69 2035
jpayne@69 2036 /* Suppress proxy CONNECT response headers from user callbacks */
jpayne@69 2037 CURLOPT(CURLOPT_SUPPRESS_CONNECT_HEADERS, CURLOPTTYPE_LONG, 265),
jpayne@69 2038
jpayne@69 2039 /* The request target, instead of extracted from the URL */
jpayne@69 2040 CURLOPT(CURLOPT_REQUEST_TARGET, CURLOPTTYPE_STRINGPOINT, 266),
jpayne@69 2041
jpayne@69 2042 /* bitmask of allowed auth methods for connections to SOCKS5 proxies */
jpayne@69 2043 CURLOPT(CURLOPT_SOCKS5_AUTH, CURLOPTTYPE_LONG, 267),
jpayne@69 2044
jpayne@69 2045 /* Enable/disable SSH compression */
jpayne@69 2046 CURLOPT(CURLOPT_SSH_COMPRESSION, CURLOPTTYPE_LONG, 268),
jpayne@69 2047
jpayne@69 2048 /* Post MIME data. */
jpayne@69 2049 CURLOPT(CURLOPT_MIMEPOST, CURLOPTTYPE_OBJECTPOINT, 269),
jpayne@69 2050
jpayne@69 2051 /* Time to use with the CURLOPT_TIMECONDITION. Specified in number of
jpayne@69 2052 seconds since 1 Jan 1970. */
jpayne@69 2053 CURLOPT(CURLOPT_TIMEVALUE_LARGE, CURLOPTTYPE_OFF_T, 270),
jpayne@69 2054
jpayne@69 2055 /* Head start in milliseconds to give happy eyeballs. */
jpayne@69 2056 CURLOPT(CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS, CURLOPTTYPE_LONG, 271),
jpayne@69 2057
jpayne@69 2058 /* Function that will be called before a resolver request is made */
jpayne@69 2059 CURLOPT(CURLOPT_RESOLVER_START_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 272),
jpayne@69 2060
jpayne@69 2061 /* User data to pass to the resolver start callback. */
jpayne@69 2062 CURLOPT(CURLOPT_RESOLVER_START_DATA, CURLOPTTYPE_CBPOINT, 273),
jpayne@69 2063
jpayne@69 2064 /* send HAProxy PROXY protocol header? */
jpayne@69 2065 CURLOPT(CURLOPT_HAPROXYPROTOCOL, CURLOPTTYPE_LONG, 274),
jpayne@69 2066
jpayne@69 2067 /* shuffle addresses before use when DNS returns multiple */
jpayne@69 2068 CURLOPT(CURLOPT_DNS_SHUFFLE_ADDRESSES, CURLOPTTYPE_LONG, 275),
jpayne@69 2069
jpayne@69 2070 /* Specify which TLS 1.3 ciphers suites to use */
jpayne@69 2071 CURLOPT(CURLOPT_TLS13_CIPHERS, CURLOPTTYPE_STRINGPOINT, 276),
jpayne@69 2072 CURLOPT(CURLOPT_PROXY_TLS13_CIPHERS, CURLOPTTYPE_STRINGPOINT, 277),
jpayne@69 2073
jpayne@69 2074 /* Disallow specifying username/login in URL. */
jpayne@69 2075 CURLOPT(CURLOPT_DISALLOW_USERNAME_IN_URL, CURLOPTTYPE_LONG, 278),
jpayne@69 2076
jpayne@69 2077 /* DNS-over-HTTPS URL */
jpayne@69 2078 CURLOPT(CURLOPT_DOH_URL, CURLOPTTYPE_STRINGPOINT, 279),
jpayne@69 2079
jpayne@69 2080 /* Preferred buffer size to use for uploads */
jpayne@69 2081 CURLOPT(CURLOPT_UPLOAD_BUFFERSIZE, CURLOPTTYPE_LONG, 280),
jpayne@69 2082
jpayne@69 2083 /* Time in ms between connection upkeep calls for long-lived connections. */
jpayne@69 2084 CURLOPT(CURLOPT_UPKEEP_INTERVAL_MS, CURLOPTTYPE_LONG, 281),
jpayne@69 2085
jpayne@69 2086 /* Specify URL using CURL URL API. */
jpayne@69 2087 CURLOPT(CURLOPT_CURLU, CURLOPTTYPE_OBJECTPOINT, 282),
jpayne@69 2088
jpayne@69 2089 /* add trailing data just after no more data is available */
jpayne@69 2090 CURLOPT(CURLOPT_TRAILERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 283),
jpayne@69 2091
jpayne@69 2092 /* pointer to be passed to HTTP_TRAILER_FUNCTION */
jpayne@69 2093 CURLOPT(CURLOPT_TRAILERDATA, CURLOPTTYPE_CBPOINT, 284),
jpayne@69 2094
jpayne@69 2095 /* set this to 1L to allow HTTP/0.9 responses or 0L to disallow */
jpayne@69 2096 CURLOPT(CURLOPT_HTTP09_ALLOWED, CURLOPTTYPE_LONG, 285),
jpayne@69 2097
jpayne@69 2098 /* alt-svc control bitmask */
jpayne@69 2099 CURLOPT(CURLOPT_ALTSVC_CTRL, CURLOPTTYPE_LONG, 286),
jpayne@69 2100
jpayne@69 2101 /* alt-svc cache file name to possibly read from/write to */
jpayne@69 2102 CURLOPT(CURLOPT_ALTSVC, CURLOPTTYPE_STRINGPOINT, 287),
jpayne@69 2103
jpayne@69 2104 /* maximum age (idle time) of a connection to consider it for reuse
jpayne@69 2105 * (in seconds) */
jpayne@69 2106 CURLOPT(CURLOPT_MAXAGE_CONN, CURLOPTTYPE_LONG, 288),
jpayne@69 2107
jpayne@69 2108 /* SASL authorization identity */
jpayne@69 2109 CURLOPT(CURLOPT_SASL_AUTHZID, CURLOPTTYPE_STRINGPOINT, 289),
jpayne@69 2110
jpayne@69 2111 /* allow RCPT TO command to fail for some recipients */
jpayne@69 2112 CURLOPT(CURLOPT_MAIL_RCPT_ALLLOWFAILS, CURLOPTTYPE_LONG, 290),
jpayne@69 2113
jpayne@69 2114 /* the private SSL-certificate as a "blob" */
jpayne@69 2115 CURLOPT(CURLOPT_SSLCERT_BLOB, CURLOPTTYPE_BLOB, 291),
jpayne@69 2116 CURLOPT(CURLOPT_SSLKEY_BLOB, CURLOPTTYPE_BLOB, 292),
jpayne@69 2117 CURLOPT(CURLOPT_PROXY_SSLCERT_BLOB, CURLOPTTYPE_BLOB, 293),
jpayne@69 2118 CURLOPT(CURLOPT_PROXY_SSLKEY_BLOB, CURLOPTTYPE_BLOB, 294),
jpayne@69 2119 CURLOPT(CURLOPT_ISSUERCERT_BLOB, CURLOPTTYPE_BLOB, 295),
jpayne@69 2120
jpayne@69 2121 /* Issuer certificate for proxy */
jpayne@69 2122 CURLOPT(CURLOPT_PROXY_ISSUERCERT, CURLOPTTYPE_STRINGPOINT, 296),
jpayne@69 2123 CURLOPT(CURLOPT_PROXY_ISSUERCERT_BLOB, CURLOPTTYPE_BLOB, 297),
jpayne@69 2124
jpayne@69 2125 /* the EC curves requested by the TLS client (RFC 8422, 5.1);
jpayne@69 2126 * OpenSSL support via 'set_groups'/'set_curves':
jpayne@69 2127 * https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set1_groups.html
jpayne@69 2128 */
jpayne@69 2129 CURLOPT(CURLOPT_SSL_EC_CURVES, CURLOPTTYPE_STRINGPOINT, 298),
jpayne@69 2130
jpayne@69 2131 /* HSTS bitmask */
jpayne@69 2132 CURLOPT(CURLOPT_HSTS_CTRL, CURLOPTTYPE_LONG, 299),
jpayne@69 2133 /* HSTS file name */
jpayne@69 2134 CURLOPT(CURLOPT_HSTS, CURLOPTTYPE_STRINGPOINT, 300),
jpayne@69 2135
jpayne@69 2136 /* HSTS read callback */
jpayne@69 2137 CURLOPT(CURLOPT_HSTSREADFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 301),
jpayne@69 2138 CURLOPT(CURLOPT_HSTSREADDATA, CURLOPTTYPE_CBPOINT, 302),
jpayne@69 2139
jpayne@69 2140 /* HSTS write callback */
jpayne@69 2141 CURLOPT(CURLOPT_HSTSWRITEFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 303),
jpayne@69 2142 CURLOPT(CURLOPT_HSTSWRITEDATA, CURLOPTTYPE_CBPOINT, 304),
jpayne@69 2143
jpayne@69 2144 /* Parameters for V4 signature */
jpayne@69 2145 CURLOPT(CURLOPT_AWS_SIGV4, CURLOPTTYPE_STRINGPOINT, 305),
jpayne@69 2146
jpayne@69 2147 /* Same as CURLOPT_SSL_VERIFYPEER but for DoH (DNS-over-HTTPS) servers. */
jpayne@69 2148 CURLOPT(CURLOPT_DOH_SSL_VERIFYPEER, CURLOPTTYPE_LONG, 306),
jpayne@69 2149
jpayne@69 2150 /* Same as CURLOPT_SSL_VERIFYHOST but for DoH (DNS-over-HTTPS) servers. */
jpayne@69 2151 CURLOPT(CURLOPT_DOH_SSL_VERIFYHOST, CURLOPTTYPE_LONG, 307),
jpayne@69 2152
jpayne@69 2153 /* Same as CURLOPT_SSL_VERIFYSTATUS but for DoH (DNS-over-HTTPS) servers. */
jpayne@69 2154 CURLOPT(CURLOPT_DOH_SSL_VERIFYSTATUS, CURLOPTTYPE_LONG, 308),
jpayne@69 2155
jpayne@69 2156 /* The CA certificates as "blob" used to validate the peer certificate
jpayne@69 2157 this option is used only if SSL_VERIFYPEER is true */
jpayne@69 2158 CURLOPT(CURLOPT_CAINFO_BLOB, CURLOPTTYPE_BLOB, 309),
jpayne@69 2159
jpayne@69 2160 /* The CA certificates as "blob" used to validate the proxy certificate
jpayne@69 2161 this option is used only if PROXY_SSL_VERIFYPEER is true */
jpayne@69 2162 CURLOPT(CURLOPT_PROXY_CAINFO_BLOB, CURLOPTTYPE_BLOB, 310),
jpayne@69 2163
jpayne@69 2164 /* used by scp/sftp to verify the host's public key */
jpayne@69 2165 CURLOPT(CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256, CURLOPTTYPE_STRINGPOINT, 311),
jpayne@69 2166
jpayne@69 2167 /* Function that will be called immediately before the initial request
jpayne@69 2168 is made on a connection (after any protocol negotiation step). */
jpayne@69 2169 CURLOPT(CURLOPT_PREREQFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 312),
jpayne@69 2170
jpayne@69 2171 /* Data passed to the CURLOPT_PREREQFUNCTION callback */
jpayne@69 2172 CURLOPT(CURLOPT_PREREQDATA, CURLOPTTYPE_CBPOINT, 313),
jpayne@69 2173
jpayne@69 2174 /* maximum age (since creation) of a connection to consider it for reuse
jpayne@69 2175 * (in seconds) */
jpayne@69 2176 CURLOPT(CURLOPT_MAXLIFETIME_CONN, CURLOPTTYPE_LONG, 314),
jpayne@69 2177
jpayne@69 2178 /* Set MIME option flags. */
jpayne@69 2179 CURLOPT(CURLOPT_MIME_OPTIONS, CURLOPTTYPE_LONG, 315),
jpayne@69 2180
jpayne@69 2181 /* set the SSH host key callback, must point to a curl_sshkeycallback
jpayne@69 2182 function */
jpayne@69 2183 CURLOPT(CURLOPT_SSH_HOSTKEYFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 316),
jpayne@69 2184
jpayne@69 2185 /* set the SSH host key callback custom pointer */
jpayne@69 2186 CURLOPT(CURLOPT_SSH_HOSTKEYDATA, CURLOPTTYPE_CBPOINT, 317),
jpayne@69 2187
jpayne@69 2188 /* specify which protocols that are allowed to be used for the transfer,
jpayne@69 2189 which thus helps the app which takes URLs from users or other external
jpayne@69 2190 inputs and want to restrict what protocol(s) to deal with. Defaults to
jpayne@69 2191 all built-in protocols. */
jpayne@69 2192 CURLOPT(CURLOPT_PROTOCOLS_STR, CURLOPTTYPE_STRINGPOINT, 318),
jpayne@69 2193
jpayne@69 2194 /* specify which protocols that libcurl is allowed to follow directs to */
jpayne@69 2195 CURLOPT(CURLOPT_REDIR_PROTOCOLS_STR, CURLOPTTYPE_STRINGPOINT, 319),
jpayne@69 2196
jpayne@69 2197 /* websockets options */
jpayne@69 2198 CURLOPT(CURLOPT_WS_OPTIONS, CURLOPTTYPE_LONG, 320),
jpayne@69 2199
jpayne@69 2200 /* CA cache timeout */
jpayne@69 2201 CURLOPT(CURLOPT_CA_CACHE_TIMEOUT, CURLOPTTYPE_LONG, 321),
jpayne@69 2202
jpayne@69 2203 /* Can leak things, gonna exit() soon */
jpayne@69 2204 CURLOPT(CURLOPT_QUICK_EXIT, CURLOPTTYPE_LONG, 322),
jpayne@69 2205
jpayne@69 2206 CURLOPT_LASTENTRY /* the last unused */
jpayne@69 2207 } CURLoption;
jpayne@69 2208
jpayne@69 2209 #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
jpayne@69 2210 the obsolete stuff removed! */
jpayne@69 2211
jpayne@69 2212 /* Backwards compatibility with older names */
jpayne@69 2213 /* These are scheduled to disappear by 2011 */
jpayne@69 2214
jpayne@69 2215 /* This was added in version 7.19.1 */
jpayne@69 2216 #define CURLOPT_POST301 CURLOPT_POSTREDIR
jpayne@69 2217
jpayne@69 2218 /* These are scheduled to disappear by 2009 */
jpayne@69 2219
jpayne@69 2220 /* The following were added in 7.17.0 */
jpayne@69 2221 #define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD
jpayne@69 2222 #define CURLOPT_FTPAPPEND CURLOPT_APPEND
jpayne@69 2223 #define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY
jpayne@69 2224 #define CURLOPT_FTP_SSL CURLOPT_USE_SSL
jpayne@69 2225
jpayne@69 2226 /* The following were added earlier */
jpayne@69 2227
jpayne@69 2228 #define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD
jpayne@69 2229 #define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL
jpayne@69 2230
jpayne@69 2231 /* */
jpayne@69 2232 #define CURLOPT_FTP_RESPONSE_TIMEOUT CURLOPT_SERVER_RESPONSE_TIMEOUT
jpayne@69 2233
jpayne@69 2234 #else
jpayne@69 2235 /* This is set if CURL_NO_OLDIES is defined at compile-time */
jpayne@69 2236 #undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */
jpayne@69 2237 #endif
jpayne@69 2238
jpayne@69 2239
jpayne@69 2240 /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host
jpayne@69 2241 name resolves addresses using more than one IP protocol version, this
jpayne@69 2242 option might be handy to force libcurl to use a specific IP version. */
jpayne@69 2243 #define CURL_IPRESOLVE_WHATEVER 0 /* default, uses addresses to all IP
jpayne@69 2244 versions that your system allows */
jpayne@69 2245 #define CURL_IPRESOLVE_V4 1 /* uses only IPv4 addresses/connections */
jpayne@69 2246 #define CURL_IPRESOLVE_V6 2 /* uses only IPv6 addresses/connections */
jpayne@69 2247
jpayne@69 2248 /* Convenient "aliases" */
jpayne@69 2249 #define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER
jpayne@69 2250
jpayne@69 2251 /* These enums are for use with the CURLOPT_HTTP_VERSION option. */
jpayne@69 2252 enum {
jpayne@69 2253 CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd
jpayne@69 2254 like the library to choose the best possible
jpayne@69 2255 for us! */
jpayne@69 2256 CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */
jpayne@69 2257 CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */
jpayne@69 2258 CURL_HTTP_VERSION_2_0, /* please use HTTP 2 in the request */
jpayne@69 2259 CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */
jpayne@69 2260 CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, /* please use HTTP 2 without HTTP/1.1
jpayne@69 2261 Upgrade */
jpayne@69 2262 CURL_HTTP_VERSION_3 = 30, /* Makes use of explicit HTTP/3 without fallback.
jpayne@69 2263 Use CURLOPT_ALTSVC to enable HTTP/3 upgrade */
jpayne@69 2264 CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */
jpayne@69 2265 };
jpayne@69 2266
jpayne@69 2267 /* Convenience definition simple because the name of the version is HTTP/2 and
jpayne@69 2268 not 2.0. The 2_0 version of the enum name was set while the version was
jpayne@69 2269 still planned to be 2.0 and we stick to it for compatibility. */
jpayne@69 2270 #define CURL_HTTP_VERSION_2 CURL_HTTP_VERSION_2_0
jpayne@69 2271
jpayne@69 2272 /*
jpayne@69 2273 * Public API enums for RTSP requests
jpayne@69 2274 */
jpayne@69 2275 enum {
jpayne@69 2276 CURL_RTSPREQ_NONE, /* first in list */
jpayne@69 2277 CURL_RTSPREQ_OPTIONS,
jpayne@69 2278 CURL_RTSPREQ_DESCRIBE,
jpayne@69 2279 CURL_RTSPREQ_ANNOUNCE,
jpayne@69 2280 CURL_RTSPREQ_SETUP,
jpayne@69 2281 CURL_RTSPREQ_PLAY,
jpayne@69 2282 CURL_RTSPREQ_PAUSE,
jpayne@69 2283 CURL_RTSPREQ_TEARDOWN,
jpayne@69 2284 CURL_RTSPREQ_GET_PARAMETER,
jpayne@69 2285 CURL_RTSPREQ_SET_PARAMETER,
jpayne@69 2286 CURL_RTSPREQ_RECORD,
jpayne@69 2287 CURL_RTSPREQ_RECEIVE,
jpayne@69 2288 CURL_RTSPREQ_LAST /* last in list */
jpayne@69 2289 };
jpayne@69 2290
jpayne@69 2291 /* These enums are for use with the CURLOPT_NETRC option. */
jpayne@69 2292 enum CURL_NETRC_OPTION {
jpayne@69 2293 CURL_NETRC_IGNORED, /* The .netrc will never be read.
jpayne@69 2294 * This is the default. */
jpayne@69 2295 CURL_NETRC_OPTIONAL, /* A user:password in the URL will be preferred
jpayne@69 2296 * to one in the .netrc. */
jpayne@69 2297 CURL_NETRC_REQUIRED, /* A user:password in the URL will be ignored.
jpayne@69 2298 * Unless one is set programmatically, the .netrc
jpayne@69 2299 * will be queried. */
jpayne@69 2300 CURL_NETRC_LAST
jpayne@69 2301 };
jpayne@69 2302
jpayne@69 2303 enum {
jpayne@69 2304 CURL_SSLVERSION_DEFAULT,
jpayne@69 2305 CURL_SSLVERSION_TLSv1, /* TLS 1.x */
jpayne@69 2306 CURL_SSLVERSION_SSLv2,
jpayne@69 2307 CURL_SSLVERSION_SSLv3,
jpayne@69 2308 CURL_SSLVERSION_TLSv1_0,
jpayne@69 2309 CURL_SSLVERSION_TLSv1_1,
jpayne@69 2310 CURL_SSLVERSION_TLSv1_2,
jpayne@69 2311 CURL_SSLVERSION_TLSv1_3,
jpayne@69 2312
jpayne@69 2313 CURL_SSLVERSION_LAST /* never use, keep last */
jpayne@69 2314 };
jpayne@69 2315
jpayne@69 2316 enum {
jpayne@69 2317 CURL_SSLVERSION_MAX_NONE = 0,
jpayne@69 2318 CURL_SSLVERSION_MAX_DEFAULT = (CURL_SSLVERSION_TLSv1 << 16),
jpayne@69 2319 CURL_SSLVERSION_MAX_TLSv1_0 = (CURL_SSLVERSION_TLSv1_0 << 16),
jpayne@69 2320 CURL_SSLVERSION_MAX_TLSv1_1 = (CURL_SSLVERSION_TLSv1_1 << 16),
jpayne@69 2321 CURL_SSLVERSION_MAX_TLSv1_2 = (CURL_SSLVERSION_TLSv1_2 << 16),
jpayne@69 2322 CURL_SSLVERSION_MAX_TLSv1_3 = (CURL_SSLVERSION_TLSv1_3 << 16),
jpayne@69 2323
jpayne@69 2324 /* never use, keep last */
jpayne@69 2325 CURL_SSLVERSION_MAX_LAST = (CURL_SSLVERSION_LAST << 16)
jpayne@69 2326 };
jpayne@69 2327
jpayne@69 2328 enum CURL_TLSAUTH {
jpayne@69 2329 CURL_TLSAUTH_NONE,
jpayne@69 2330 CURL_TLSAUTH_SRP,
jpayne@69 2331 CURL_TLSAUTH_LAST /* never use, keep last */
jpayne@69 2332 };
jpayne@69 2333
jpayne@69 2334 /* symbols to use with CURLOPT_POSTREDIR.
jpayne@69 2335 CURL_REDIR_POST_301, CURL_REDIR_POST_302 and CURL_REDIR_POST_303
jpayne@69 2336 can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302
jpayne@69 2337 | CURL_REDIR_POST_303 == CURL_REDIR_POST_ALL */
jpayne@69 2338
jpayne@69 2339 #define CURL_REDIR_GET_ALL 0
jpayne@69 2340 #define CURL_REDIR_POST_301 1
jpayne@69 2341 #define CURL_REDIR_POST_302 2
jpayne@69 2342 #define CURL_REDIR_POST_303 4
jpayne@69 2343 #define CURL_REDIR_POST_ALL \
jpayne@69 2344 (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303)
jpayne@69 2345
jpayne@69 2346 typedef enum {
jpayne@69 2347 CURL_TIMECOND_NONE,
jpayne@69 2348
jpayne@69 2349 CURL_TIMECOND_IFMODSINCE,
jpayne@69 2350 CURL_TIMECOND_IFUNMODSINCE,
jpayne@69 2351 CURL_TIMECOND_LASTMOD,
jpayne@69 2352
jpayne@69 2353 CURL_TIMECOND_LAST
jpayne@69 2354 } curl_TimeCond;
jpayne@69 2355
jpayne@69 2356 /* Special size_t value signaling a null-terminated string. */
jpayne@69 2357 #define CURL_ZERO_TERMINATED ((size_t) -1)
jpayne@69 2358
jpayne@69 2359 /* curl_strequal() and curl_strnequal() are subject for removal in a future
jpayne@69 2360 release */
jpayne@69 2361 CURL_EXTERN int curl_strequal(const char *s1, const char *s2);
jpayne@69 2362 CURL_EXTERN int curl_strnequal(const char *s1, const char *s2, size_t n);
jpayne@69 2363
jpayne@69 2364 /* Mime/form handling support. */
jpayne@69 2365 typedef struct curl_mime curl_mime; /* Mime context. */
jpayne@69 2366 typedef struct curl_mimepart curl_mimepart; /* Mime part context. */
jpayne@69 2367
jpayne@69 2368 /* CURLMIMEOPT_ defines are for the CURLOPT_MIME_OPTIONS option. */
jpayne@69 2369 #define CURLMIMEOPT_FORMESCAPE (1<<0) /* Use backslash-escaping for forms. */
jpayne@69 2370
jpayne@69 2371 /*
jpayne@69 2372 * NAME curl_mime_init()
jpayne@69 2373 *
jpayne@69 2374 * DESCRIPTION
jpayne@69 2375 *
jpayne@69 2376 * Create a mime context and return its handle. The easy parameter is the
jpayne@69 2377 * target handle.
jpayne@69 2378 */
jpayne@69 2379 CURL_EXTERN curl_mime *curl_mime_init(CURL *easy);
jpayne@69 2380
jpayne@69 2381 /*
jpayne@69 2382 * NAME curl_mime_free()
jpayne@69 2383 *
jpayne@69 2384 * DESCRIPTION
jpayne@69 2385 *
jpayne@69 2386 * release a mime handle and its substructures.
jpayne@69 2387 */
jpayne@69 2388 CURL_EXTERN void curl_mime_free(curl_mime *mime);
jpayne@69 2389
jpayne@69 2390 /*
jpayne@69 2391 * NAME curl_mime_addpart()
jpayne@69 2392 *
jpayne@69 2393 * DESCRIPTION
jpayne@69 2394 *
jpayne@69 2395 * Append a new empty part to the given mime context and return a handle to
jpayne@69 2396 * the created part.
jpayne@69 2397 */
jpayne@69 2398 CURL_EXTERN curl_mimepart *curl_mime_addpart(curl_mime *mime);
jpayne@69 2399
jpayne@69 2400 /*
jpayne@69 2401 * NAME curl_mime_name()
jpayne@69 2402 *
jpayne@69 2403 * DESCRIPTION
jpayne@69 2404 *
jpayne@69 2405 * Set mime/form part name.
jpayne@69 2406 */
jpayne@69 2407 CURL_EXTERN CURLcode curl_mime_name(curl_mimepart *part, const char *name);
jpayne@69 2408
jpayne@69 2409 /*
jpayne@69 2410 * NAME curl_mime_filename()
jpayne@69 2411 *
jpayne@69 2412 * DESCRIPTION
jpayne@69 2413 *
jpayne@69 2414 * Set mime part remote file name.
jpayne@69 2415 */
jpayne@69 2416 CURL_EXTERN CURLcode curl_mime_filename(curl_mimepart *part,
jpayne@69 2417 const char *filename);
jpayne@69 2418
jpayne@69 2419 /*
jpayne@69 2420 * NAME curl_mime_type()
jpayne@69 2421 *
jpayne@69 2422 * DESCRIPTION
jpayne@69 2423 *
jpayne@69 2424 * Set mime part type.
jpayne@69 2425 */
jpayne@69 2426 CURL_EXTERN CURLcode curl_mime_type(curl_mimepart *part, const char *mimetype);
jpayne@69 2427
jpayne@69 2428 /*
jpayne@69 2429 * NAME curl_mime_encoder()
jpayne@69 2430 *
jpayne@69 2431 * DESCRIPTION
jpayne@69 2432 *
jpayne@69 2433 * Set mime data transfer encoder.
jpayne@69 2434 */
jpayne@69 2435 CURL_EXTERN CURLcode curl_mime_encoder(curl_mimepart *part,
jpayne@69 2436 const char *encoding);
jpayne@69 2437
jpayne@69 2438 /*
jpayne@69 2439 * NAME curl_mime_data()
jpayne@69 2440 *
jpayne@69 2441 * DESCRIPTION
jpayne@69 2442 *
jpayne@69 2443 * Set mime part data source from memory data,
jpayne@69 2444 */
jpayne@69 2445 CURL_EXTERN CURLcode curl_mime_data(curl_mimepart *part,
jpayne@69 2446 const char *data, size_t datasize);
jpayne@69 2447
jpayne@69 2448 /*
jpayne@69 2449 * NAME curl_mime_filedata()
jpayne@69 2450 *
jpayne@69 2451 * DESCRIPTION
jpayne@69 2452 *
jpayne@69 2453 * Set mime part data source from named file.
jpayne@69 2454 */
jpayne@69 2455 CURL_EXTERN CURLcode curl_mime_filedata(curl_mimepart *part,
jpayne@69 2456 const char *filename);
jpayne@69 2457
jpayne@69 2458 /*
jpayne@69 2459 * NAME curl_mime_data_cb()
jpayne@69 2460 *
jpayne@69 2461 * DESCRIPTION
jpayne@69 2462 *
jpayne@69 2463 * Set mime part data source from callback function.
jpayne@69 2464 */
jpayne@69 2465 CURL_EXTERN CURLcode curl_mime_data_cb(curl_mimepart *part,
jpayne@69 2466 curl_off_t datasize,
jpayne@69 2467 curl_read_callback readfunc,
jpayne@69 2468 curl_seek_callback seekfunc,
jpayne@69 2469 curl_free_callback freefunc,
jpayne@69 2470 void *arg);
jpayne@69 2471
jpayne@69 2472 /*
jpayne@69 2473 * NAME curl_mime_subparts()
jpayne@69 2474 *
jpayne@69 2475 * DESCRIPTION
jpayne@69 2476 *
jpayne@69 2477 * Set mime part data source from subparts.
jpayne@69 2478 */
jpayne@69 2479 CURL_EXTERN CURLcode curl_mime_subparts(curl_mimepart *part,
jpayne@69 2480 curl_mime *subparts);
jpayne@69 2481 /*
jpayne@69 2482 * NAME curl_mime_headers()
jpayne@69 2483 *
jpayne@69 2484 * DESCRIPTION
jpayne@69 2485 *
jpayne@69 2486 * Set mime part headers.
jpayne@69 2487 */
jpayne@69 2488 CURL_EXTERN CURLcode curl_mime_headers(curl_mimepart *part,
jpayne@69 2489 struct curl_slist *headers,
jpayne@69 2490 int take_ownership);
jpayne@69 2491
jpayne@69 2492 typedef enum {
jpayne@69 2493 /********* the first one is unused ************/
jpayne@69 2494 CURLFORM_NOTHING CURL_DEPRECATED(7.56.0, ""),
jpayne@69 2495 CURLFORM_COPYNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"),
jpayne@69 2496 CURLFORM_PTRNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"),
jpayne@69 2497 CURLFORM_NAMELENGTH CURL_DEPRECATED(7.56.0, ""),
jpayne@69 2498 CURLFORM_COPYCONTENTS CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
jpayne@69 2499 CURLFORM_PTRCONTENTS CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
jpayne@69 2500 CURLFORM_CONTENTSLENGTH CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
jpayne@69 2501 CURLFORM_FILECONTENT CURL_DEPRECATED(7.56.0, "Use curl_mime_data_cb()"),
jpayne@69 2502 CURLFORM_ARRAY CURL_DEPRECATED(7.56.0, ""),
jpayne@69 2503 CURLFORM_OBSOLETE,
jpayne@69 2504 CURLFORM_FILE CURL_DEPRECATED(7.56.0, "Use curl_mime_filedata()"),
jpayne@69 2505
jpayne@69 2506 CURLFORM_BUFFER CURL_DEPRECATED(7.56.0, "Use curl_mime_filename()"),
jpayne@69 2507 CURLFORM_BUFFERPTR CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
jpayne@69 2508 CURLFORM_BUFFERLENGTH CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
jpayne@69 2509
jpayne@69 2510 CURLFORM_CONTENTTYPE CURL_DEPRECATED(7.56.0, "Use curl_mime_type()"),
jpayne@69 2511 CURLFORM_CONTENTHEADER CURL_DEPRECATED(7.56.0, "Use curl_mime_headers()"),
jpayne@69 2512 CURLFORM_FILENAME CURL_DEPRECATED(7.56.0, "Use curl_mime_filename()"),
jpayne@69 2513 CURLFORM_END,
jpayne@69 2514 CURLFORM_OBSOLETE2,
jpayne@69 2515
jpayne@69 2516 CURLFORM_STREAM CURL_DEPRECATED(7.56.0, "Use curl_mime_data_cb()"),
jpayne@69 2517 CURLFORM_CONTENTLEN /* added in 7.46.0, provide a curl_off_t length */
jpayne@69 2518 CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
jpayne@69 2519
jpayne@69 2520 CURLFORM_LASTENTRY /* the last unused */
jpayne@69 2521 } CURLformoption;
jpayne@69 2522
jpayne@69 2523 /* structure to be used as parameter for CURLFORM_ARRAY */
jpayne@69 2524 struct curl_forms {
jpayne@69 2525 CURLformoption option;
jpayne@69 2526 const char *value;
jpayne@69 2527 };
jpayne@69 2528
jpayne@69 2529 /* use this for multipart formpost building */
jpayne@69 2530 /* Returns code for curl_formadd()
jpayne@69 2531 *
jpayne@69 2532 * Returns:
jpayne@69 2533 * CURL_FORMADD_OK on success
jpayne@69 2534 * CURL_FORMADD_MEMORY if the FormInfo allocation fails
jpayne@69 2535 * CURL_FORMADD_OPTION_TWICE if one option is given twice for one Form
jpayne@69 2536 * CURL_FORMADD_NULL if a null pointer was given for a char
jpayne@69 2537 * CURL_FORMADD_MEMORY if the allocation of a FormInfo struct failed
jpayne@69 2538 * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used
jpayne@69 2539 * CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or error)
jpayne@69 2540 * CURL_FORMADD_MEMORY if a curl_httppost struct cannot be allocated
jpayne@69 2541 * CURL_FORMADD_MEMORY if some allocation for string copying failed.
jpayne@69 2542 * CURL_FORMADD_ILLEGAL_ARRAY if an illegal option is used in an array
jpayne@69 2543 *
jpayne@69 2544 ***************************************************************************/
jpayne@69 2545 typedef enum {
jpayne@69 2546 CURL_FORMADD_OK CURL_DEPRECATED(7.56.0, ""), /* 1st, no error */
jpayne@69 2547
jpayne@69 2548 CURL_FORMADD_MEMORY CURL_DEPRECATED(7.56.0, ""),
jpayne@69 2549 CURL_FORMADD_OPTION_TWICE CURL_DEPRECATED(7.56.0, ""),
jpayne@69 2550 CURL_FORMADD_NULL CURL_DEPRECATED(7.56.0, ""),
jpayne@69 2551 CURL_FORMADD_UNKNOWN_OPTION CURL_DEPRECATED(7.56.0, ""),
jpayne@69 2552 CURL_FORMADD_INCOMPLETE CURL_DEPRECATED(7.56.0, ""),
jpayne@69 2553 CURL_FORMADD_ILLEGAL_ARRAY CURL_DEPRECATED(7.56.0, ""),
jpayne@69 2554 /* libcurl was built with form api disabled */
jpayne@69 2555 CURL_FORMADD_DISABLED CURL_DEPRECATED(7.56.0, ""),
jpayne@69 2556
jpayne@69 2557 CURL_FORMADD_LAST /* last */
jpayne@69 2558 } CURLFORMcode;
jpayne@69 2559
jpayne@69 2560 /*
jpayne@69 2561 * NAME curl_formadd()
jpayne@69 2562 *
jpayne@69 2563 * DESCRIPTION
jpayne@69 2564 *
jpayne@69 2565 * Pretty advanced function for building multi-part formposts. Each invoke
jpayne@69 2566 * adds one part that together construct a full post. Then use
jpayne@69 2567 * CURLOPT_HTTPPOST to send it off to libcurl.
jpayne@69 2568 */
jpayne@69 2569 CURL_EXTERN CURLFORMcode CURL_DEPRECATED(7.56.0, "Use curl_mime_init()")
jpayne@69 2570 curl_formadd(struct curl_httppost **httppost,
jpayne@69 2571 struct curl_httppost **last_post,
jpayne@69 2572 ...);
jpayne@69 2573
jpayne@69 2574 /*
jpayne@69 2575 * callback function for curl_formget()
jpayne@69 2576 * The void *arg pointer will be the one passed as second argument to
jpayne@69 2577 * curl_formget().
jpayne@69 2578 * The character buffer passed to it must not be freed.
jpayne@69 2579 * Should return the buffer length passed to it as the argument "len" on
jpayne@69 2580 * success.
jpayne@69 2581 */
jpayne@69 2582 typedef size_t (*curl_formget_callback)(void *arg, const char *buf,
jpayne@69 2583 size_t len);
jpayne@69 2584
jpayne@69 2585 /*
jpayne@69 2586 * NAME curl_formget()
jpayne@69 2587 *
jpayne@69 2588 * DESCRIPTION
jpayne@69 2589 *
jpayne@69 2590 * Serialize a curl_httppost struct built with curl_formadd().
jpayne@69 2591 * Accepts a void pointer as second argument which will be passed to
jpayne@69 2592 * the curl_formget_callback function.
jpayne@69 2593 * Returns 0 on success.
jpayne@69 2594 */
jpayne@69 2595 CURL_EXTERN int CURL_DEPRECATED(7.56.0, "")
jpayne@69 2596 curl_formget(struct curl_httppost *form, void *arg,
jpayne@69 2597 curl_formget_callback append);
jpayne@69 2598 /*
jpayne@69 2599 * NAME curl_formfree()
jpayne@69 2600 *
jpayne@69 2601 * DESCRIPTION
jpayne@69 2602 *
jpayne@69 2603 * Free a multipart formpost previously built with curl_formadd().
jpayne@69 2604 */
jpayne@69 2605 CURL_EXTERN void CURL_DEPRECATED(7.56.0, "Use curl_mime_free()")
jpayne@69 2606 curl_formfree(struct curl_httppost *form);
jpayne@69 2607
jpayne@69 2608 /*
jpayne@69 2609 * NAME curl_getenv()
jpayne@69 2610 *
jpayne@69 2611 * DESCRIPTION
jpayne@69 2612 *
jpayne@69 2613 * Returns a malloc()'ed string that MUST be curl_free()ed after usage is
jpayne@69 2614 * complete. DEPRECATED - see lib/README.curlx
jpayne@69 2615 */
jpayne@69 2616 CURL_EXTERN char *curl_getenv(const char *variable);
jpayne@69 2617
jpayne@69 2618 /*
jpayne@69 2619 * NAME curl_version()
jpayne@69 2620 *
jpayne@69 2621 * DESCRIPTION
jpayne@69 2622 *
jpayne@69 2623 * Returns a static ascii string of the libcurl version.
jpayne@69 2624 */
jpayne@69 2625 CURL_EXTERN char *curl_version(void);
jpayne@69 2626
jpayne@69 2627 /*
jpayne@69 2628 * NAME curl_easy_escape()
jpayne@69 2629 *
jpayne@69 2630 * DESCRIPTION
jpayne@69 2631 *
jpayne@69 2632 * Escapes URL strings (converts all letters consider illegal in URLs to their
jpayne@69 2633 * %XX versions). This function returns a new allocated string or NULL if an
jpayne@69 2634 * error occurred.
jpayne@69 2635 */
jpayne@69 2636 CURL_EXTERN char *curl_easy_escape(CURL *handle,
jpayne@69 2637 const char *string,
jpayne@69 2638 int length);
jpayne@69 2639
jpayne@69 2640 /* the previous version: */
jpayne@69 2641 CURL_EXTERN char *curl_escape(const char *string,
jpayne@69 2642 int length);
jpayne@69 2643
jpayne@69 2644
jpayne@69 2645 /*
jpayne@69 2646 * NAME curl_easy_unescape()
jpayne@69 2647 *
jpayne@69 2648 * DESCRIPTION
jpayne@69 2649 *
jpayne@69 2650 * Unescapes URL encoding in strings (converts all %XX codes to their 8bit
jpayne@69 2651 * versions). This function returns a new allocated string or NULL if an error
jpayne@69 2652 * occurred.
jpayne@69 2653 * Conversion Note: On non-ASCII platforms the ASCII %XX codes are
jpayne@69 2654 * converted into the host encoding.
jpayne@69 2655 */
jpayne@69 2656 CURL_EXTERN char *curl_easy_unescape(CURL *handle,
jpayne@69 2657 const char *string,
jpayne@69 2658 int length,
jpayne@69 2659 int *outlength);
jpayne@69 2660
jpayne@69 2661 /* the previous version */
jpayne@69 2662 CURL_EXTERN char *curl_unescape(const char *string,
jpayne@69 2663 int length);
jpayne@69 2664
jpayne@69 2665 /*
jpayne@69 2666 * NAME curl_free()
jpayne@69 2667 *
jpayne@69 2668 * DESCRIPTION
jpayne@69 2669 *
jpayne@69 2670 * Provided for de-allocation in the same translation unit that did the
jpayne@69 2671 * allocation. Added in libcurl 7.10
jpayne@69 2672 */
jpayne@69 2673 CURL_EXTERN void curl_free(void *p);
jpayne@69 2674
jpayne@69 2675 /*
jpayne@69 2676 * NAME curl_global_init()
jpayne@69 2677 *
jpayne@69 2678 * DESCRIPTION
jpayne@69 2679 *
jpayne@69 2680 * curl_global_init() should be invoked exactly once for each application that
jpayne@69 2681 * uses libcurl and before any call of other libcurl functions.
jpayne@69 2682
jpayne@69 2683 * This function is thread-safe if CURL_VERSION_THREADSAFE is set in the
jpayne@69 2684 * curl_version_info_data.features flag (fetch by curl_version_info()).
jpayne@69 2685
jpayne@69 2686 */
jpayne@69 2687 CURL_EXTERN CURLcode curl_global_init(long flags);
jpayne@69 2688
jpayne@69 2689 /*
jpayne@69 2690 * NAME curl_global_init_mem()
jpayne@69 2691 *
jpayne@69 2692 * DESCRIPTION
jpayne@69 2693 *
jpayne@69 2694 * curl_global_init() or curl_global_init_mem() should be invoked exactly once
jpayne@69 2695 * for each application that uses libcurl. This function can be used to
jpayne@69 2696 * initialize libcurl and set user defined memory management callback
jpayne@69 2697 * functions. Users can implement memory management routines to check for
jpayne@69 2698 * memory leaks, check for mis-use of the curl library etc. User registered
jpayne@69 2699 * callback routines will be invoked by this library instead of the system
jpayne@69 2700 * memory management routines like malloc, free etc.
jpayne@69 2701 */
jpayne@69 2702 CURL_EXTERN CURLcode curl_global_init_mem(long flags,
jpayne@69 2703 curl_malloc_callback m,
jpayne@69 2704 curl_free_callback f,
jpayne@69 2705 curl_realloc_callback r,
jpayne@69 2706 curl_strdup_callback s,
jpayne@69 2707 curl_calloc_callback c);
jpayne@69 2708
jpayne@69 2709 /*
jpayne@69 2710 * NAME curl_global_cleanup()
jpayne@69 2711 *
jpayne@69 2712 * DESCRIPTION
jpayne@69 2713 *
jpayne@69 2714 * curl_global_cleanup() should be invoked exactly once for each application
jpayne@69 2715 * that uses libcurl
jpayne@69 2716 */
jpayne@69 2717 CURL_EXTERN void curl_global_cleanup(void);
jpayne@69 2718
jpayne@69 2719 /* linked-list structure for the CURLOPT_QUOTE option (and other) */
jpayne@69 2720 struct curl_slist {
jpayne@69 2721 char *data;
jpayne@69 2722 struct curl_slist *next;
jpayne@69 2723 };
jpayne@69 2724
jpayne@69 2725 /*
jpayne@69 2726 * NAME curl_global_sslset()
jpayne@69 2727 *
jpayne@69 2728 * DESCRIPTION
jpayne@69 2729 *
jpayne@69 2730 * When built with multiple SSL backends, curl_global_sslset() allows to
jpayne@69 2731 * choose one. This function can only be called once, and it must be called
jpayne@69 2732 * *before* curl_global_init().
jpayne@69 2733 *
jpayne@69 2734 * The backend can be identified by the id (e.g. CURLSSLBACKEND_OPENSSL). The
jpayne@69 2735 * backend can also be specified via the name parameter (passing -1 as id).
jpayne@69 2736 * If both id and name are specified, the name will be ignored. If neither id
jpayne@69 2737 * nor name are specified, the function will fail with
jpayne@69 2738 * CURLSSLSET_UNKNOWN_BACKEND and set the "avail" pointer to the
jpayne@69 2739 * NULL-terminated list of available backends.
jpayne@69 2740 *
jpayne@69 2741 * Upon success, the function returns CURLSSLSET_OK.
jpayne@69 2742 *
jpayne@69 2743 * If the specified SSL backend is not available, the function returns
jpayne@69 2744 * CURLSSLSET_UNKNOWN_BACKEND and sets the "avail" pointer to a NULL-terminated
jpayne@69 2745 * list of available SSL backends.
jpayne@69 2746 *
jpayne@69 2747 * The SSL backend can be set only once. If it has already been set, a
jpayne@69 2748 * subsequent attempt to change it will result in a CURLSSLSET_TOO_LATE.
jpayne@69 2749 */
jpayne@69 2750
jpayne@69 2751 struct curl_ssl_backend {
jpayne@69 2752 curl_sslbackend id;
jpayne@69 2753 const char *name;
jpayne@69 2754 };
jpayne@69 2755 typedef struct curl_ssl_backend curl_ssl_backend;
jpayne@69 2756
jpayne@69 2757 typedef enum {
jpayne@69 2758 CURLSSLSET_OK = 0,
jpayne@69 2759 CURLSSLSET_UNKNOWN_BACKEND,
jpayne@69 2760 CURLSSLSET_TOO_LATE,
jpayne@69 2761 CURLSSLSET_NO_BACKENDS /* libcurl was built without any SSL support */
jpayne@69 2762 } CURLsslset;
jpayne@69 2763
jpayne@69 2764 CURL_EXTERN CURLsslset curl_global_sslset(curl_sslbackend id, const char *name,
jpayne@69 2765 const curl_ssl_backend ***avail);
jpayne@69 2766
jpayne@69 2767 /*
jpayne@69 2768 * NAME curl_slist_append()
jpayne@69 2769 *
jpayne@69 2770 * DESCRIPTION
jpayne@69 2771 *
jpayne@69 2772 * Appends a string to a linked list. If no list exists, it will be created
jpayne@69 2773 * first. Returns the new list, after appending.
jpayne@69 2774 */
jpayne@69 2775 CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *list,
jpayne@69 2776 const char *data);
jpayne@69 2777
jpayne@69 2778 /*
jpayne@69 2779 * NAME curl_slist_free_all()
jpayne@69 2780 *
jpayne@69 2781 * DESCRIPTION
jpayne@69 2782 *
jpayne@69 2783 * free a previously built curl_slist.
jpayne@69 2784 */
jpayne@69 2785 CURL_EXTERN void curl_slist_free_all(struct curl_slist *list);
jpayne@69 2786
jpayne@69 2787 /*
jpayne@69 2788 * NAME curl_getdate()
jpayne@69 2789 *
jpayne@69 2790 * DESCRIPTION
jpayne@69 2791 *
jpayne@69 2792 * Returns the time, in seconds since 1 Jan 1970 of the time string given in
jpayne@69 2793 * the first argument. The time argument in the second parameter is unused
jpayne@69 2794 * and should be set to NULL.
jpayne@69 2795 */
jpayne@69 2796 CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused);
jpayne@69 2797
jpayne@69 2798 /* info about the certificate chain, only for OpenSSL, GnuTLS, Schannel, NSS
jpayne@69 2799 and GSKit builds. Asked for with CURLOPT_CERTINFO / CURLINFO_CERTINFO */
jpayne@69 2800 struct curl_certinfo {
jpayne@69 2801 int num_of_certs; /* number of certificates with information */
jpayne@69 2802 struct curl_slist **certinfo; /* for each index in this array, there's a
jpayne@69 2803 linked list with textual information in the
jpayne@69 2804 format "name: value" */
jpayne@69 2805 };
jpayne@69 2806
jpayne@69 2807 /* Information about the SSL library used and the respective internal SSL
jpayne@69 2808 handle, which can be used to obtain further information regarding the
jpayne@69 2809 connection. Asked for with CURLINFO_TLS_SSL_PTR or CURLINFO_TLS_SESSION. */
jpayne@69 2810 struct curl_tlssessioninfo {
jpayne@69 2811 curl_sslbackend backend;
jpayne@69 2812 void *internals;
jpayne@69 2813 };
jpayne@69 2814
jpayne@69 2815 #define CURLINFO_STRING 0x100000
jpayne@69 2816 #define CURLINFO_LONG 0x200000
jpayne@69 2817 #define CURLINFO_DOUBLE 0x300000
jpayne@69 2818 #define CURLINFO_SLIST 0x400000
jpayne@69 2819 #define CURLINFO_PTR 0x400000 /* same as SLIST */
jpayne@69 2820 #define CURLINFO_SOCKET 0x500000
jpayne@69 2821 #define CURLINFO_OFF_T 0x600000
jpayne@69 2822 #define CURLINFO_MASK 0x0fffff
jpayne@69 2823 #define CURLINFO_TYPEMASK 0xf00000
jpayne@69 2824
jpayne@69 2825 typedef enum {
jpayne@69 2826 CURLINFO_NONE, /* first, never use this */
jpayne@69 2827 CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1,
jpayne@69 2828 CURLINFO_RESPONSE_CODE = CURLINFO_LONG + 2,
jpayne@69 2829 CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3,
jpayne@69 2830 CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4,
jpayne@69 2831 CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5,
jpayne@69 2832 CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6,
jpayne@69 2833 CURLINFO_SIZE_UPLOAD CURL_DEPRECATED(7.55.0, "Use CURLINFO_SIZE_UPLOAD_T")
jpayne@69 2834 = CURLINFO_DOUBLE + 7,
jpayne@69 2835 CURLINFO_SIZE_UPLOAD_T = CURLINFO_OFF_T + 7,
jpayne@69 2836 CURLINFO_SIZE_DOWNLOAD
jpayne@69 2837 CURL_DEPRECATED(7.55.0, "Use CURLINFO_SIZE_DOWNLOAD_T")
jpayne@69 2838 = CURLINFO_DOUBLE + 8,
jpayne@69 2839 CURLINFO_SIZE_DOWNLOAD_T = CURLINFO_OFF_T + 8,
jpayne@69 2840 CURLINFO_SPEED_DOWNLOAD
jpayne@69 2841 CURL_DEPRECATED(7.55.0, "Use CURLINFO_SPEED_DOWNLOAD_T")
jpayne@69 2842 = CURLINFO_DOUBLE + 9,
jpayne@69 2843 CURLINFO_SPEED_DOWNLOAD_T = CURLINFO_OFF_T + 9,
jpayne@69 2844 CURLINFO_SPEED_UPLOAD
jpayne@69 2845 CURL_DEPRECATED(7.55.0, "Use CURLINFO_SPEED_UPLOAD_T")
jpayne@69 2846 = CURLINFO_DOUBLE + 10,
jpayne@69 2847 CURLINFO_SPEED_UPLOAD_T = CURLINFO_OFF_T + 10,
jpayne@69 2848 CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11,
jpayne@69 2849 CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12,
jpayne@69 2850 CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13,
jpayne@69 2851 CURLINFO_FILETIME = CURLINFO_LONG + 14,
jpayne@69 2852 CURLINFO_FILETIME_T = CURLINFO_OFF_T + 14,
jpayne@69 2853 CURLINFO_CONTENT_LENGTH_DOWNLOAD
jpayne@69 2854 CURL_DEPRECATED(7.55.0,
jpayne@69 2855 "Use CURLINFO_CONTENT_LENGTH_DOWNLOAD_T")
jpayne@69 2856 = CURLINFO_DOUBLE + 15,
jpayne@69 2857 CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = CURLINFO_OFF_T + 15,
jpayne@69 2858 CURLINFO_CONTENT_LENGTH_UPLOAD
jpayne@69 2859 CURL_DEPRECATED(7.55.0,
jpayne@69 2860 "Use CURLINFO_CONTENT_LENGTH_UPLOAD_T")
jpayne@69 2861 = CURLINFO_DOUBLE + 16,
jpayne@69 2862 CURLINFO_CONTENT_LENGTH_UPLOAD_T = CURLINFO_OFF_T + 16,
jpayne@69 2863 CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17,
jpayne@69 2864 CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18,
jpayne@69 2865 CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19,
jpayne@69 2866 CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20,
jpayne@69 2867 CURLINFO_PRIVATE = CURLINFO_STRING + 21,
jpayne@69 2868 CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22,
jpayne@69 2869 CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23,
jpayne@69 2870 CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24,
jpayne@69 2871 CURLINFO_OS_ERRNO = CURLINFO_LONG + 25,
jpayne@69 2872 CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26,
jpayne@69 2873 CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27,
jpayne@69 2874 CURLINFO_COOKIELIST = CURLINFO_SLIST + 28,
jpayne@69 2875 CURLINFO_LASTSOCKET CURL_DEPRECATED(7.45.0, "Use CURLINFO_ACTIVESOCKET")
jpayne@69 2876 = CURLINFO_LONG + 29,
jpayne@69 2877 CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30,
jpayne@69 2878 CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31,
jpayne@69 2879 CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32,
jpayne@69 2880 CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33,
jpayne@69 2881 CURLINFO_CERTINFO = CURLINFO_PTR + 34,
jpayne@69 2882 CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35,
jpayne@69 2883 CURLINFO_RTSP_SESSION_ID = CURLINFO_STRING + 36,
jpayne@69 2884 CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG + 37,
jpayne@69 2885 CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG + 38,
jpayne@69 2886 CURLINFO_RTSP_CSEQ_RECV = CURLINFO_LONG + 39,
jpayne@69 2887 CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40,
jpayne@69 2888 CURLINFO_LOCAL_IP = CURLINFO_STRING + 41,
jpayne@69 2889 CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42,
jpayne@69 2890 CURLINFO_TLS_SESSION CURL_DEPRECATED(7.48.0, "Use CURLINFO_TLS_SSL_PTR")
jpayne@69 2891 = CURLINFO_PTR + 43,
jpayne@69 2892 CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44,
jpayne@69 2893 CURLINFO_TLS_SSL_PTR = CURLINFO_PTR + 45,
jpayne@69 2894 CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46,
jpayne@69 2895 CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47,
jpayne@69 2896 CURLINFO_PROTOCOL CURL_DEPRECATED(7.85.0, "Use CURLINFO_SCHEME")
jpayne@69 2897 = CURLINFO_LONG + 48,
jpayne@69 2898 CURLINFO_SCHEME = CURLINFO_STRING + 49,
jpayne@69 2899 CURLINFO_TOTAL_TIME_T = CURLINFO_OFF_T + 50,
jpayne@69 2900 CURLINFO_NAMELOOKUP_TIME_T = CURLINFO_OFF_T + 51,
jpayne@69 2901 CURLINFO_CONNECT_TIME_T = CURLINFO_OFF_T + 52,
jpayne@69 2902 CURLINFO_PRETRANSFER_TIME_T = CURLINFO_OFF_T + 53,
jpayne@69 2903 CURLINFO_STARTTRANSFER_TIME_T = CURLINFO_OFF_T + 54,
jpayne@69 2904 CURLINFO_REDIRECT_TIME_T = CURLINFO_OFF_T + 55,
jpayne@69 2905 CURLINFO_APPCONNECT_TIME_T = CURLINFO_OFF_T + 56,
jpayne@69 2906 CURLINFO_RETRY_AFTER = CURLINFO_OFF_T + 57,
jpayne@69 2907 CURLINFO_EFFECTIVE_METHOD = CURLINFO_STRING + 58,
jpayne@69 2908 CURLINFO_PROXY_ERROR = CURLINFO_LONG + 59,
jpayne@69 2909 CURLINFO_REFERER = CURLINFO_STRING + 60,
jpayne@69 2910 CURLINFO_CAINFO = CURLINFO_STRING + 61,
jpayne@69 2911 CURLINFO_CAPATH = CURLINFO_STRING + 62,
jpayne@69 2912 CURLINFO_LASTONE = 62
jpayne@69 2913 } CURLINFO;
jpayne@69 2914
jpayne@69 2915 /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
jpayne@69 2916 CURLINFO_HTTP_CODE */
jpayne@69 2917 #define CURLINFO_HTTP_CODE CURLINFO_RESPONSE_CODE
jpayne@69 2918
jpayne@69 2919 typedef enum {
jpayne@69 2920 CURLCLOSEPOLICY_NONE, /* first, never use this */
jpayne@69 2921
jpayne@69 2922 CURLCLOSEPOLICY_OLDEST,
jpayne@69 2923 CURLCLOSEPOLICY_LEAST_RECENTLY_USED,
jpayne@69 2924 CURLCLOSEPOLICY_LEAST_TRAFFIC,
jpayne@69 2925 CURLCLOSEPOLICY_SLOWEST,
jpayne@69 2926 CURLCLOSEPOLICY_CALLBACK,
jpayne@69 2927
jpayne@69 2928 CURLCLOSEPOLICY_LAST /* last, never use this */
jpayne@69 2929 } curl_closepolicy;
jpayne@69 2930
jpayne@69 2931 #define CURL_GLOBAL_SSL (1<<0) /* no purpose since 7.57.0 */
jpayne@69 2932 #define CURL_GLOBAL_WIN32 (1<<1)
jpayne@69 2933 #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32)
jpayne@69 2934 #define CURL_GLOBAL_NOTHING 0
jpayne@69 2935 #define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
jpayne@69 2936 #define CURL_GLOBAL_ACK_EINTR (1<<2)
jpayne@69 2937
jpayne@69 2938
jpayne@69 2939 /*****************************************************************************
jpayne@69 2940 * Setup defines, protos etc for the sharing stuff.
jpayne@69 2941 */
jpayne@69 2942
jpayne@69 2943 /* Different data locks for a single share */
jpayne@69 2944 typedef enum {
jpayne@69 2945 CURL_LOCK_DATA_NONE = 0,
jpayne@69 2946 /* CURL_LOCK_DATA_SHARE is used internally to say that
jpayne@69 2947 * the locking is just made to change the internal state of the share
jpayne@69 2948 * itself.
jpayne@69 2949 */
jpayne@69 2950 CURL_LOCK_DATA_SHARE,
jpayne@69 2951 CURL_LOCK_DATA_COOKIE,
jpayne@69 2952 CURL_LOCK_DATA_DNS,
jpayne@69 2953 CURL_LOCK_DATA_SSL_SESSION,
jpayne@69 2954 CURL_LOCK_DATA_CONNECT,
jpayne@69 2955 CURL_LOCK_DATA_PSL,
jpayne@69 2956 CURL_LOCK_DATA_LAST
jpayne@69 2957 } curl_lock_data;
jpayne@69 2958
jpayne@69 2959 /* Different lock access types */
jpayne@69 2960 typedef enum {
jpayne@69 2961 CURL_LOCK_ACCESS_NONE = 0, /* unspecified action */
jpayne@69 2962 CURL_LOCK_ACCESS_SHARED = 1, /* for read perhaps */
jpayne@69 2963 CURL_LOCK_ACCESS_SINGLE = 2, /* for write perhaps */
jpayne@69 2964 CURL_LOCK_ACCESS_LAST /* never use */
jpayne@69 2965 } curl_lock_access;
jpayne@69 2966
jpayne@69 2967 typedef void (*curl_lock_function)(CURL *handle,
jpayne@69 2968 curl_lock_data data,
jpayne@69 2969 curl_lock_access locktype,
jpayne@69 2970 void *userptr);
jpayne@69 2971 typedef void (*curl_unlock_function)(CURL *handle,
jpayne@69 2972 curl_lock_data data,
jpayne@69 2973 void *userptr);
jpayne@69 2974
jpayne@69 2975
jpayne@69 2976 typedef enum {
jpayne@69 2977 CURLSHE_OK, /* all is fine */
jpayne@69 2978 CURLSHE_BAD_OPTION, /* 1 */
jpayne@69 2979 CURLSHE_IN_USE, /* 2 */
jpayne@69 2980 CURLSHE_INVALID, /* 3 */
jpayne@69 2981 CURLSHE_NOMEM, /* 4 out of memory */
jpayne@69 2982 CURLSHE_NOT_BUILT_IN, /* 5 feature not present in lib */
jpayne@69 2983 CURLSHE_LAST /* never use */
jpayne@69 2984 } CURLSHcode;
jpayne@69 2985
jpayne@69 2986 typedef enum {
jpayne@69 2987 CURLSHOPT_NONE, /* don't use */
jpayne@69 2988 CURLSHOPT_SHARE, /* specify a data type to share */
jpayne@69 2989 CURLSHOPT_UNSHARE, /* specify which data type to stop sharing */
jpayne@69 2990 CURLSHOPT_LOCKFUNC, /* pass in a 'curl_lock_function' pointer */
jpayne@69 2991 CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */
jpayne@69 2992 CURLSHOPT_USERDATA, /* pass in a user data pointer used in the lock/unlock
jpayne@69 2993 callback functions */
jpayne@69 2994 CURLSHOPT_LAST /* never use */
jpayne@69 2995 } CURLSHoption;
jpayne@69 2996
jpayne@69 2997 CURL_EXTERN CURLSH *curl_share_init(void);
jpayne@69 2998 CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option,
jpayne@69 2999 ...);
jpayne@69 3000 CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *share);
jpayne@69 3001
jpayne@69 3002 /****************************************************************************
jpayne@69 3003 * Structures for querying information about the curl library at runtime.
jpayne@69 3004 */
jpayne@69 3005
jpayne@69 3006 typedef enum {
jpayne@69 3007 CURLVERSION_FIRST,
jpayne@69 3008 CURLVERSION_SECOND,
jpayne@69 3009 CURLVERSION_THIRD,
jpayne@69 3010 CURLVERSION_FOURTH,
jpayne@69 3011 CURLVERSION_FIFTH,
jpayne@69 3012 CURLVERSION_SIXTH,
jpayne@69 3013 CURLVERSION_SEVENTH,
jpayne@69 3014 CURLVERSION_EIGHTH,
jpayne@69 3015 CURLVERSION_NINTH,
jpayne@69 3016 CURLVERSION_TENTH,
jpayne@69 3017 CURLVERSION_ELEVENTH,
jpayne@69 3018 CURLVERSION_LAST /* never actually use this */
jpayne@69 3019 } CURLversion;
jpayne@69 3020
jpayne@69 3021 /* The 'CURLVERSION_NOW' is the symbolic name meant to be used by
jpayne@69 3022 basically all programs ever that want to get version information. It is
jpayne@69 3023 meant to be a built-in version number for what kind of struct the caller
jpayne@69 3024 expects. If the struct ever changes, we redefine the NOW to another enum
jpayne@69 3025 from above. */
jpayne@69 3026 #define CURLVERSION_NOW CURLVERSION_ELEVENTH
jpayne@69 3027
jpayne@69 3028 struct curl_version_info_data {
jpayne@69 3029 CURLversion age; /* age of the returned struct */
jpayne@69 3030 const char *version; /* LIBCURL_VERSION */
jpayne@69 3031 unsigned int version_num; /* LIBCURL_VERSION_NUM */
jpayne@69 3032 const char *host; /* OS/host/cpu/machine when configured */
jpayne@69 3033 int features; /* bitmask, see defines below */
jpayne@69 3034 const char *ssl_version; /* human readable string */
jpayne@69 3035 long ssl_version_num; /* not used anymore, always 0 */
jpayne@69 3036 const char *libz_version; /* human readable string */
jpayne@69 3037 /* protocols is terminated by an entry with a NULL protoname */
jpayne@69 3038 const char * const *protocols;
jpayne@69 3039
jpayne@69 3040 /* The fields below this were added in CURLVERSION_SECOND */
jpayne@69 3041 const char *ares;
jpayne@69 3042 int ares_num;
jpayne@69 3043
jpayne@69 3044 /* This field was added in CURLVERSION_THIRD */
jpayne@69 3045 const char *libidn;
jpayne@69 3046
jpayne@69 3047 /* These field were added in CURLVERSION_FOURTH */
jpayne@69 3048
jpayne@69 3049 /* Same as '_libiconv_version' if built with HAVE_ICONV */
jpayne@69 3050 int iconv_ver_num;
jpayne@69 3051
jpayne@69 3052 const char *libssh_version; /* human readable string */
jpayne@69 3053
jpayne@69 3054 /* These fields were added in CURLVERSION_FIFTH */
jpayne@69 3055 unsigned int brotli_ver_num; /* Numeric Brotli version
jpayne@69 3056 (MAJOR << 24) | (MINOR << 12) | PATCH */
jpayne@69 3057 const char *brotli_version; /* human readable string. */
jpayne@69 3058
jpayne@69 3059 /* These fields were added in CURLVERSION_SIXTH */
jpayne@69 3060 unsigned int nghttp2_ver_num; /* Numeric nghttp2 version
jpayne@69 3061 (MAJOR << 16) | (MINOR << 8) | PATCH */
jpayne@69 3062 const char *nghttp2_version; /* human readable string. */
jpayne@69 3063 const char *quic_version; /* human readable quic (+ HTTP/3) library +
jpayne@69 3064 version or NULL */
jpayne@69 3065
jpayne@69 3066 /* These fields were added in CURLVERSION_SEVENTH */
jpayne@69 3067 const char *cainfo; /* the built-in default CURLOPT_CAINFO, might
jpayne@69 3068 be NULL */
jpayne@69 3069 const char *capath; /* the built-in default CURLOPT_CAPATH, might
jpayne@69 3070 be NULL */
jpayne@69 3071
jpayne@69 3072 /* These fields were added in CURLVERSION_EIGHTH */
jpayne@69 3073 unsigned int zstd_ver_num; /* Numeric Zstd version
jpayne@69 3074 (MAJOR << 24) | (MINOR << 12) | PATCH */
jpayne@69 3075 const char *zstd_version; /* human readable string. */
jpayne@69 3076
jpayne@69 3077 /* These fields were added in CURLVERSION_NINTH */
jpayne@69 3078 const char *hyper_version; /* human readable string. */
jpayne@69 3079
jpayne@69 3080 /* These fields were added in CURLVERSION_TENTH */
jpayne@69 3081 const char *gsasl_version; /* human readable string. */
jpayne@69 3082
jpayne@69 3083 /* These fields were added in CURLVERSION_ELEVENTH */
jpayne@69 3084 /* feature_names is terminated by an entry with a NULL feature name */
jpayne@69 3085 const char * const *feature_names;
jpayne@69 3086 };
jpayne@69 3087 typedef struct curl_version_info_data curl_version_info_data;
jpayne@69 3088
jpayne@69 3089 #define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */
jpayne@69 3090 #define CURL_VERSION_KERBEROS4 (1<<1) /* Kerberos V4 auth is supported
jpayne@69 3091 (deprecated) */
jpayne@69 3092 #define CURL_VERSION_SSL (1<<2) /* SSL options are present */
jpayne@69 3093 #define CURL_VERSION_LIBZ (1<<3) /* libz features are present */
jpayne@69 3094 #define CURL_VERSION_NTLM (1<<4) /* NTLM auth is supported */
jpayne@69 3095 #define CURL_VERSION_GSSNEGOTIATE (1<<5) /* Negotiate auth is supported
jpayne@69 3096 (deprecated) */
jpayne@69 3097 #define CURL_VERSION_DEBUG (1<<6) /* Built with debug capabilities */
jpayne@69 3098 #define CURL_VERSION_ASYNCHDNS (1<<7) /* Asynchronous DNS resolves */
jpayne@69 3099 #define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth is supported */
jpayne@69 3100 #define CURL_VERSION_LARGEFILE (1<<9) /* Supports files larger than 2GB */
jpayne@69 3101 #define CURL_VERSION_IDN (1<<10) /* Internationized Domain Names are
jpayne@69 3102 supported */
jpayne@69 3103 #define CURL_VERSION_SSPI (1<<11) /* Built against Windows SSPI */
jpayne@69 3104 #define CURL_VERSION_CONV (1<<12) /* Character conversions supported */
jpayne@69 3105 #define CURL_VERSION_CURLDEBUG (1<<13) /* Debug memory tracking supported */
jpayne@69 3106 #define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */
jpayne@69 3107 #define CURL_VERSION_NTLM_WB (1<<15) /* NTLM delegation to winbind helper
jpayne@69 3108 is supported */
jpayne@69 3109 #define CURL_VERSION_HTTP2 (1<<16) /* HTTP2 support built-in */
jpayne@69 3110 #define CURL_VERSION_GSSAPI (1<<17) /* Built against a GSS-API library */
jpayne@69 3111 #define CURL_VERSION_KERBEROS5 (1<<18) /* Kerberos V5 auth is supported */
jpayne@69 3112 #define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */
jpayne@69 3113 #define CURL_VERSION_PSL (1<<20) /* Mozilla's Public Suffix List, used
jpayne@69 3114 for cookie domain verification */
jpayne@69 3115 #define CURL_VERSION_HTTPS_PROXY (1<<21) /* HTTPS-proxy support built-in */
jpayne@69 3116 #define CURL_VERSION_MULTI_SSL (1<<22) /* Multiple SSL backends available */
jpayne@69 3117 #define CURL_VERSION_BROTLI (1<<23) /* Brotli features are present. */
jpayne@69 3118 #define CURL_VERSION_ALTSVC (1<<24) /* Alt-Svc handling built-in */
jpayne@69 3119 #define CURL_VERSION_HTTP3 (1<<25) /* HTTP3 support built-in */
jpayne@69 3120 #define CURL_VERSION_ZSTD (1<<26) /* zstd features are present */
jpayne@69 3121 #define CURL_VERSION_UNICODE (1<<27) /* Unicode support on Windows */
jpayne@69 3122 #define CURL_VERSION_HSTS (1<<28) /* HSTS is supported */
jpayne@69 3123 #define CURL_VERSION_GSASL (1<<29) /* libgsasl is supported */
jpayne@69 3124 #define CURL_VERSION_THREADSAFE (1<<30) /* libcurl API is thread-safe */
jpayne@69 3125
jpayne@69 3126 /*
jpayne@69 3127 * NAME curl_version_info()
jpayne@69 3128 *
jpayne@69 3129 * DESCRIPTION
jpayne@69 3130 *
jpayne@69 3131 * This function returns a pointer to a static copy of the version info
jpayne@69 3132 * struct. See above.
jpayne@69 3133 */
jpayne@69 3134 CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion);
jpayne@69 3135
jpayne@69 3136 /*
jpayne@69 3137 * NAME curl_easy_strerror()
jpayne@69 3138 *
jpayne@69 3139 * DESCRIPTION
jpayne@69 3140 *
jpayne@69 3141 * The curl_easy_strerror function may be used to turn a CURLcode value
jpayne@69 3142 * into the equivalent human readable error string. This is useful
jpayne@69 3143 * for printing meaningful error messages.
jpayne@69 3144 */
jpayne@69 3145 CURL_EXTERN const char *curl_easy_strerror(CURLcode);
jpayne@69 3146
jpayne@69 3147 /*
jpayne@69 3148 * NAME curl_share_strerror()
jpayne@69 3149 *
jpayne@69 3150 * DESCRIPTION
jpayne@69 3151 *
jpayne@69 3152 * The curl_share_strerror function may be used to turn a CURLSHcode value
jpayne@69 3153 * into the equivalent human readable error string. This is useful
jpayne@69 3154 * for printing meaningful error messages.
jpayne@69 3155 */
jpayne@69 3156 CURL_EXTERN const char *curl_share_strerror(CURLSHcode);
jpayne@69 3157
jpayne@69 3158 /*
jpayne@69 3159 * NAME curl_easy_pause()
jpayne@69 3160 *
jpayne@69 3161 * DESCRIPTION
jpayne@69 3162 *
jpayne@69 3163 * The curl_easy_pause function pauses or unpauses transfers. Select the new
jpayne@69 3164 * state by setting the bitmask, use the convenience defines below.
jpayne@69 3165 *
jpayne@69 3166 */
jpayne@69 3167 CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
jpayne@69 3168
jpayne@69 3169 #define CURLPAUSE_RECV (1<<0)
jpayne@69 3170 #define CURLPAUSE_RECV_CONT (0)
jpayne@69 3171
jpayne@69 3172 #define CURLPAUSE_SEND (1<<2)
jpayne@69 3173 #define CURLPAUSE_SEND_CONT (0)
jpayne@69 3174
jpayne@69 3175 #define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND)
jpayne@69 3176 #define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT)
jpayne@69 3177
jpayne@69 3178 #ifdef __cplusplus
jpayne@69 3179 } /* end of extern "C" */
jpayne@69 3180 #endif
jpayne@69 3181
jpayne@69 3182 /* unfortunately, the easy.h and multi.h include files need options and info
jpayne@69 3183 stuff before they can be included! */
jpayne@69 3184 #include "easy.h" /* nothing in curl is fun without the easy stuff */
jpayne@69 3185 #include "multi.h"
jpayne@69 3186 #include "urlapi.h"
jpayne@69 3187 #include "options.h"
jpayne@69 3188 #include "header.h"
jpayne@69 3189 #include "websockets.h"
jpayne@69 3190
jpayne@69 3191 /* the typechecker doesn't work in C++ (yet) */
jpayne@69 3192 #if defined(__GNUC__) && defined(__GNUC_MINOR__) && \
jpayne@69 3193 ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \
jpayne@69 3194 !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK)
jpayne@69 3195 #include "typecheck-gcc.h"
jpayne@69 3196 #else
jpayne@69 3197 #if defined(__STDC__) && (__STDC__ >= 1)
jpayne@69 3198 /* This preprocessor magic that replaces a call with the exact same call is
jpayne@69 3199 only done to make sure application authors pass exactly three arguments
jpayne@69 3200 to these functions. */
jpayne@69 3201 #define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param)
jpayne@69 3202 #define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg)
jpayne@69 3203 #define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)
jpayne@69 3204 #define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param)
jpayne@69 3205 #endif /* __STDC__ >= 1 */
jpayne@69 3206 #endif /* gcc >= 4.3 && !__cplusplus && !CURL_DISABLE_TYPECHECK */
jpayne@69 3207
jpayne@69 3208 #endif /* CURLINC_CURL_H */