curl.h
Go to the documentation of this file.
00001 #ifndef __CURL_CURL_H
00002 #define __CURL_CURL_H
00003 /***************************************************************************
00004  *                                  _   _ ____  _
00005  *  Project                     ___| | | |  _ \| |
00006  *                             / __| | | | |_) | |
00007  *                            | (__| |_| |  _ <| |___
00008  *                             \___|\___/|_| \_\_____|
00009  *
00010  * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
00011  *
00012  * This software is licensed as described in the file COPYING, which
00013  * you should have received as part of this distribution. The terms
00014  * are also available at https://curl.haxx.se/docs/copyright.html.
00015  *
00016  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
00017  * copies of the Software, and permit persons to whom the Software is
00018  * furnished to do so, under the terms of the COPYING file.
00019  *
00020  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
00021  * KIND, either express or implied.
00022  *
00023  ***************************************************************************/
00024 
00025 /*
00026  * If you have libcurl problems, all docs and details are found here:
00027  *   https://curl.haxx.se/libcurl/
00028  *
00029  * curl-library mailing list subscription and unsubscription web interface:
00030  *   https://cool.haxx.se/mailman/listinfo/curl-library/
00031  */
00032 
00033 #ifdef CURL_NO_OLDIES
00034 #define CURL_STRICTER
00035 #endif
00036 
00037 #include "curlver.h"         /* libcurl version defines   */
00038 #include "curlbuild.h"       /* libcurl build definitions */
00039 #include "curlrules.h"       /* libcurl rules enforcement */
00040 
00041 /*
00042  * Define WIN32 when build target is Win32 API
00043  */
00044 
00045 #if (defined(_WIN32) || defined(__WIN32__)) && \
00046      !defined(WIN32) && !defined(__SYMBIAN32__)
00047 #define WIN32
00048 #endif
00049 
00050 #include <stdio.h>
00051 #include <limits.h>
00052 
00053 #if defined(__FreeBSD__) && (__FreeBSD__ >= 2)
00054 /* Needed for __FreeBSD_version symbol definition */
00055 #include <osreldate.h>
00056 #endif
00057 
00058 /* The include stuff here below is mainly for time_t! */
00059 #include <sys/types.h>
00060 #include <time.h>
00061 
00062 #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__)
00063 #if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || \
00064       defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H))
00065 /* The check above prevents the winsock2 inclusion if winsock.h already was
00066    included, since they can't co-exist without problems */
00067 #include <winsock2.h>
00068 #include <ws2tcpip.h>
00069 #endif
00070 #endif
00071 
00072 /* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
00073    libc5-based Linux systems. Only include it on systems that are known to
00074    require it! */
00075 #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
00076     defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
00077     defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
00078    (defined(__FreeBSD_version) && (__FreeBSD_version < 800000))
00079 #include <sys/select.h>
00080 #endif
00081 
00082 #if !defined(WIN32) && !defined(_WIN32_WCE)
00083 #include <sys/socket.h>
00084 #endif
00085 
00086 #if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__)
00087 #include <sys/time.h>
00088 #endif
00089 
00090 #ifdef __BEOS__
00091 #include <support/SupportDefs.h>
00092 #endif
00093 
00094 #ifdef  __cplusplus
00095 extern "C" {
00096 #endif
00097 
00098 #if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER)
00099 typedef struct Curl_easy CURL;
00100 typedef struct Curl_share CURLSH;
00101 #else
00102 typedef void CURL;
00103 typedef void CURLSH;
00104 #endif
00105 
00106 /*
00107  * libcurl external API function linkage decorations.
00108  */
00109 
00110 #ifdef CURL_STATICLIB
00111 #  define CURL_EXTERN
00112 #elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)
00113 #  if defined(BUILDING_LIBCURL)
00114 #    define CURL_EXTERN  __declspec(dllexport)
00115 #  else
00116 #    define CURL_EXTERN  __declspec(dllimport)
00117 #  endif
00118 #elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS)
00119 #  define CURL_EXTERN CURL_EXTERN_SYMBOL
00120 #else
00121 #  define CURL_EXTERN
00122 #endif
00123 
00124 #ifndef curl_socket_typedef
00125 /* socket typedef */
00126 #if defined(WIN32) && !defined(__LWIP_OPT_H__) && !defined(LWIP_HDR_OPT_H)
00127 typedef SOCKET curl_socket_t;
00128 #define CURL_SOCKET_BAD INVALID_SOCKET
00129 #else
00130 typedef int curl_socket_t;
00131 #define CURL_SOCKET_BAD -1
00132 #endif
00133 #define curl_socket_typedef
00134 #endif /* curl_socket_typedef */
00135 
00136 struct curl_httppost {
00137   struct curl_httppost *next;       /* next entry in the list */
00138   char *name;                       /* pointer to allocated name */
00139   long namelength;                  /* length of name length */
00140   char *contents;                   /* pointer to allocated data contents */
00141   long contentslength;              /* length of contents field, see also
00142                                        CURL_HTTPPOST_LARGE */
00143   char *buffer;                     /* pointer to allocated buffer contents */
00144   long bufferlength;                /* length of buffer field */
00145   char *contenttype;                /* Content-Type */
00146   struct curl_slist *contentheader; /* list of extra headers for this form */
00147   struct curl_httppost *more;       /* if one field name has more than one
00148                                        file, this link should link to following
00149                                        files */
00150   long flags;                       /* as defined below */
00151 
00152 /* specified content is a file name */
00153 #define CURL_HTTPPOST_FILENAME (1<<0)
00154 /* specified content is a file name */
00155 #define CURL_HTTPPOST_READFILE (1<<1)
00156 /* name is only stored pointer do not free in formfree */
00157 #define CURL_HTTPPOST_PTRNAME (1<<2)
00158 /* contents is only stored pointer do not free in formfree */
00159 #define CURL_HTTPPOST_PTRCONTENTS (1<<3)
00160 /* upload file from buffer */
00161 #define CURL_HTTPPOST_BUFFER (1<<4)
00162 /* upload file from pointer contents */
00163 #define CURL_HTTPPOST_PTRBUFFER (1<<5)
00164 /* upload file contents by using the regular read callback to get the data and
00165    pass the given pointer as custom pointer */
00166 #define CURL_HTTPPOST_CALLBACK (1<<6)
00167 /* use size in 'contentlen', added in 7.46.0 */
00168 #define CURL_HTTPPOST_LARGE (1<<7)
00169 
00170   char *showfilename;               /* The file name to show. If not set, the
00171                                        actual file name will be used (if this
00172                                        is a file part) */
00173   void *userp;                      /* custom pointer used for
00174                                        HTTPPOST_CALLBACK posts */
00175   curl_off_t contentlen;            /* alternative length of contents
00176                                        field. Used if CURL_HTTPPOST_LARGE is
00177                                        set. Added in 7.46.0 */
00178 };
00179 
00180 /* This is the CURLOPT_PROGRESSFUNCTION callback proto. It is now considered
00181    deprecated but was the only choice up until 7.31.0 */
00182 typedef int (*curl_progress_callback)(void *clientp,
00183                                       double dltotal,
00184                                       double dlnow,
00185                                       double ultotal,
00186                                       double ulnow);
00187 
00188 /* This is the CURLOPT_XFERINFOFUNCTION callback proto. It was introduced in
00189    7.32.0, it avoids floating point and provides more detailed information. */
00190 typedef int (*curl_xferinfo_callback)(void *clientp,
00191                                       curl_off_t dltotal,
00192                                       curl_off_t dlnow,
00193                                       curl_off_t ultotal,
00194                                       curl_off_t ulnow);
00195 
00196 #ifndef CURL_MAX_WRITE_SIZE
00197   /* Tests have proven that 20K is a very bad buffer size for uploads on
00198      Windows, while 16K for some odd reason performed a lot better.
00199      We do the ifndef check to allow this value to easier be changed at build
00200      time for those who feel adventurous. The practical minimum is about
00201      400 bytes since libcurl uses a buffer of this size as a scratch area
00202      (unrelated to network send operations). */
00203 #define CURL_MAX_WRITE_SIZE 16384
00204 #endif
00205 
00206 #ifndef CURL_MAX_HTTP_HEADER
00207 /* The only reason to have a max limit for this is to avoid the risk of a bad
00208    server feeding libcurl with a never-ending header that will cause reallocs
00209    infinitely */
00210 #define CURL_MAX_HTTP_HEADER (100*1024)
00211 #endif
00212 
00213 /* This is a magic return code for the write callback that, when returned,
00214    will signal libcurl to pause receiving on the current transfer. */
00215 #define CURL_WRITEFUNC_PAUSE 0x10000001
00216 
00217 typedef size_t (*curl_write_callback)(char *buffer,
00218                                       size_t size,
00219                                       size_t nitems,
00220                                       void *outstream);
00221 
00222 
00223 
00224 /* enumeration of file types */
00225 typedef enum {
00226   CURLFILETYPE_FILE = 0,
00227   CURLFILETYPE_DIRECTORY,
00228   CURLFILETYPE_SYMLINK,
00229   CURLFILETYPE_DEVICE_BLOCK,
00230   CURLFILETYPE_DEVICE_CHAR,
00231   CURLFILETYPE_NAMEDPIPE,
00232   CURLFILETYPE_SOCKET,
00233   CURLFILETYPE_DOOR, /* is possible only on Sun Solaris now */
00234 
00235   CURLFILETYPE_UNKNOWN /* should never occur */
00236 } curlfiletype;
00237 
00238 #define CURLFINFOFLAG_KNOWN_FILENAME    (1<<0)
00239 #define CURLFINFOFLAG_KNOWN_FILETYPE    (1<<1)
00240 #define CURLFINFOFLAG_KNOWN_TIME        (1<<2)
00241 #define CURLFINFOFLAG_KNOWN_PERM        (1<<3)
00242 #define CURLFINFOFLAG_KNOWN_UID         (1<<4)
00243 #define CURLFINFOFLAG_KNOWN_GID         (1<<5)
00244 #define CURLFINFOFLAG_KNOWN_SIZE        (1<<6)
00245 #define CURLFINFOFLAG_KNOWN_HLINKCOUNT  (1<<7)
00246 
00247 /* Content of this structure depends on information which is known and is
00248    achievable (e.g. by FTP LIST parsing). Please see the url_easy_setopt(3) man
00249    page for callbacks returning this structure -- some fields are mandatory,
00250    some others are optional. The FLAG field has special meaning. */
00251 struct curl_fileinfo {
00252   char *filename;
00253   curlfiletype filetype;
00254   time_t time;
00255   unsigned int perm;
00256   int uid;
00257   int gid;
00258   curl_off_t size;
00259   long int hardlinks;
00260 
00261   struct {
00262     /* If some of these fields is not NULL, it is a pointer to b_data. */
00263     char *time;
00264     char *perm;
00265     char *user;
00266     char *group;
00267     char *target; /* pointer to the target filename of a symlink */
00268   } strings;
00269 
00270   unsigned int flags;
00271 
00272   /* used internally */
00273   char *b_data;
00274   size_t b_size;
00275   size_t b_used;
00276 };
00277 
00278 /* return codes for CURLOPT_CHUNK_BGN_FUNCTION */
00279 #define CURL_CHUNK_BGN_FUNC_OK      0
00280 #define CURL_CHUNK_BGN_FUNC_FAIL    1 /* tell the lib to end the task */
00281 #define CURL_CHUNK_BGN_FUNC_SKIP    2 /* skip this chunk over */
00282 
00283 /* if splitting of data transfer is enabled, this callback is called before
00284    download of an individual chunk started. Note that parameter "remains" works
00285    only for FTP wildcard downloading (for now), otherwise is not used */
00286 typedef long (*curl_chunk_bgn_callback)(const void *transfer_info,
00287                                         void *ptr,
00288                                         int remains);
00289 
00290 /* return codes for CURLOPT_CHUNK_END_FUNCTION */
00291 #define CURL_CHUNK_END_FUNC_OK      0
00292 #define CURL_CHUNK_END_FUNC_FAIL    1 /* tell the lib to end the task */
00293 
00294 /* If splitting of data transfer is enabled this callback is called after
00295    download of an individual chunk finished.
00296    Note! After this callback was set then it have to be called FOR ALL chunks.
00297    Even if downloading of this chunk was skipped in CHUNK_BGN_FUNC.
00298    This is the reason why we don't need "transfer_info" parameter in this
00299    callback and we are not interested in "remains" parameter too. */
00300 typedef long (*curl_chunk_end_callback)(void *ptr);
00301 
00302 /* return codes for FNMATCHFUNCTION */
00303 #define CURL_FNMATCHFUNC_MATCH    0 /* string corresponds to the pattern */
00304 #define CURL_FNMATCHFUNC_NOMATCH  1 /* pattern doesn't match the string */
00305 #define CURL_FNMATCHFUNC_FAIL     2 /* an error occurred */
00306 
00307 /* callback type for wildcard downloading pattern matching. If the
00308    string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc. */
00309 typedef int (*curl_fnmatch_callback)(void *ptr,
00310                                      const char *pattern,
00311                                      const char *string);
00312 
00313 /* These are the return codes for the seek callbacks */
00314 #define CURL_SEEKFUNC_OK       0
00315 #define CURL_SEEKFUNC_FAIL     1 /* fail the entire transfer */
00316 #define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so
00317                                     libcurl might try other means instead */
00318 typedef int (*curl_seek_callback)(void *instream,
00319                                   curl_off_t offset,
00320                                   int origin); /* 'whence' */
00321 
00322 /* This is a return code for the read callback that, when returned, will
00323    signal libcurl to immediately abort the current transfer. */
00324 #define CURL_READFUNC_ABORT 0x10000000
00325 /* This is a return code for the read callback that, when returned, will
00326    signal libcurl to pause sending data on the current transfer. */
00327 #define CURL_READFUNC_PAUSE 0x10000001
00328 
00329 typedef size_t (*curl_read_callback)(char *buffer,
00330                                       size_t size,
00331                                       size_t nitems,
00332                                       void *instream);
00333 
00334 typedef enum  {
00335   CURLSOCKTYPE_IPCXN,  /* socket created for a specific IP connection */
00336   CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */
00337   CURLSOCKTYPE_LAST    /* never use */
00338 } curlsocktype;
00339 
00340 /* The return code from the sockopt_callback can signal information back
00341    to libcurl: */
00342 #define CURL_SOCKOPT_OK 0
00343 #define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return
00344                                 CURLE_ABORTED_BY_CALLBACK */
00345 #define CURL_SOCKOPT_ALREADY_CONNECTED 2
00346 
00347 typedef int (*curl_sockopt_callback)(void *clientp,
00348                                      curl_socket_t curlfd,
00349                                      curlsocktype purpose);
00350 
00351 struct curl_sockaddr {
00352   int family;
00353   int socktype;
00354   int protocol;
00355   unsigned int addrlen; /* addrlen was a socklen_t type before 7.18.0 but it
00356                            turned really ugly and painful on the systems that
00357                            lack this type */
00358   struct sockaddr addr;
00359 };
00360 
00361 typedef curl_socket_t
00362 (*curl_opensocket_callback)(void *clientp,
00363                             curlsocktype purpose,
00364                             struct curl_sockaddr *address);
00365 
00366 typedef int
00367 (*curl_closesocket_callback)(void *clientp, curl_socket_t item);
00368 
00369 typedef enum {
00370   CURLIOE_OK,            /* I/O operation successful */
00371   CURLIOE_UNKNOWNCMD,    /* command was unknown to callback */
00372   CURLIOE_FAILRESTART,   /* failed to restart the read */
00373   CURLIOE_LAST           /* never use */
00374 } curlioerr;
00375 
00376 typedef enum  {
00377   CURLIOCMD_NOP,         /* no operation */
00378   CURLIOCMD_RESTARTREAD, /* restart the read stream from start */
00379   CURLIOCMD_LAST         /* never use */
00380 } curliocmd;
00381 
00382 typedef curlioerr (*curl_ioctl_callback)(CURL *handle,
00383                                          int cmd,
00384                                          void *clientp);
00385 
00386 #ifndef CURL_DID_MEMORY_FUNC_TYPEDEFS
00387 /*
00388  * The following typedef's are signatures of malloc, free, realloc, strdup and
00389  * calloc respectively.  Function pointers of these types can be passed to the
00390  * curl_global_init_mem() function to set user defined memory management
00391  * callback routines.
00392  */
00393 typedef void *(*curl_malloc_callback)(size_t size);
00394 typedef void (*curl_free_callback)(void *ptr);
00395 typedef void *(*curl_realloc_callback)(void *ptr, size_t size);
00396 typedef char *(*curl_strdup_callback)(const char *str);
00397 typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size);
00398 
00399 #define CURL_DID_MEMORY_FUNC_TYPEDEFS
00400 #endif
00401 
00402 /* the kind of data that is passed to information_callback*/
00403 typedef enum {
00404   CURLINFO_TEXT = 0,
00405   CURLINFO_HEADER_IN,    /* 1 */
00406   CURLINFO_HEADER_OUT,   /* 2 */
00407   CURLINFO_DATA_IN,      /* 3 */
00408   CURLINFO_DATA_OUT,     /* 4 */
00409   CURLINFO_SSL_DATA_IN,  /* 5 */
00410   CURLINFO_SSL_DATA_OUT, /* 6 */
00411   CURLINFO_END
00412 } curl_infotype;
00413 
00414 typedef int (*curl_debug_callback)
00415        (CURL *handle,      /* the handle/transfer this concerns */
00416         curl_infotype type, /* what kind of data */
00417         char *data,        /* points to the data */
00418         size_t size,       /* size of the data pointed to */
00419         void *userptr);    /* whatever the user please */
00420 
00421 /* All possible error codes from all sorts of curl functions. Future versions
00422    may return other values, stay prepared.
00423 
00424    Always add new return codes last. Never *EVER* remove any. The return
00425    codes must remain the same!
00426  */
00427 
00428 typedef enum {
00429   CURLE_OK = 0,
00430   CURLE_UNSUPPORTED_PROTOCOL,    /* 1 */
00431   CURLE_FAILED_INIT,             /* 2 */
00432   CURLE_URL_MALFORMAT,           /* 3 */
00433   CURLE_NOT_BUILT_IN,            /* 4 - [was obsoleted in August 2007 for
00434                                     7.17.0, reused in April 2011 for 7.21.5] */
00435   CURLE_COULDNT_RESOLVE_PROXY,   /* 5 */
00436   CURLE_COULDNT_RESOLVE_HOST,    /* 6 */
00437   CURLE_COULDNT_CONNECT,         /* 7 */
00438   CURLE_WEIRD_SERVER_REPLY,      /* 8 */
00439   CURLE_REMOTE_ACCESS_DENIED,    /* 9 a service was denied by the server
00440                                     due to lack of access - when login fails
00441                                     this is not returned. */
00442   CURLE_FTP_ACCEPT_FAILED,       /* 10 - [was obsoleted in April 2006 for
00443                                     7.15.4, reused in Dec 2011 for 7.24.0]*/
00444   CURLE_FTP_WEIRD_PASS_REPLY,    /* 11 */
00445   CURLE_FTP_ACCEPT_TIMEOUT,      /* 12 - timeout occurred accepting server
00446                                     [was obsoleted in August 2007 for 7.17.0,
00447                                     reused in Dec 2011 for 7.24.0]*/
00448   CURLE_FTP_WEIRD_PASV_REPLY,    /* 13 */
00449   CURLE_FTP_WEIRD_227_FORMAT,    /* 14 */
00450   CURLE_FTP_CANT_GET_HOST,       /* 15 */
00451   CURLE_HTTP2,                   /* 16 - A problem in the http2 framing layer.
00452                                     [was obsoleted in August 2007 for 7.17.0,
00453                                     reused in July 2014 for 7.38.0] */
00454   CURLE_FTP_COULDNT_SET_TYPE,    /* 17 */
00455   CURLE_PARTIAL_FILE,            /* 18 */
00456   CURLE_FTP_COULDNT_RETR_FILE,   /* 19 */
00457   CURLE_OBSOLETE20,              /* 20 - NOT USED */
00458   CURLE_QUOTE_ERROR,             /* 21 - quote command failure */
00459   CURLE_HTTP_RETURNED_ERROR,     /* 22 */
00460   CURLE_WRITE_ERROR,             /* 23 */
00461   CURLE_OBSOLETE24,              /* 24 - NOT USED */
00462   CURLE_UPLOAD_FAILED,           /* 25 - failed upload "command" */
00463   CURLE_READ_ERROR,              /* 26 - couldn't open/read from file */
00464   CURLE_OUT_OF_MEMORY,           /* 27 */
00465   /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error
00466            instead of a memory allocation error if CURL_DOES_CONVERSIONS
00467            is defined
00468   */
00469   CURLE_OPERATION_TIMEDOUT,      /* 28 - the timeout time was reached */
00470   CURLE_OBSOLETE29,              /* 29 - NOT USED */
00471   CURLE_FTP_PORT_FAILED,         /* 30 - FTP PORT operation failed */
00472   CURLE_FTP_COULDNT_USE_REST,    /* 31 - the REST command failed */
00473   CURLE_OBSOLETE32,              /* 32 - NOT USED */
00474   CURLE_RANGE_ERROR,             /* 33 - RANGE "command" didn't work */
00475   CURLE_HTTP_POST_ERROR,         /* 34 */
00476   CURLE_SSL_CONNECT_ERROR,       /* 35 - wrong when connecting with SSL */
00477   CURLE_BAD_DOWNLOAD_RESUME,     /* 36 - couldn't resume download */
00478   CURLE_FILE_COULDNT_READ_FILE,  /* 37 */
00479   CURLE_LDAP_CANNOT_BIND,        /* 38 */
00480   CURLE_LDAP_SEARCH_FAILED,      /* 39 */
00481   CURLE_OBSOLETE40,              /* 40 - NOT USED */
00482   CURLE_FUNCTION_NOT_FOUND,      /* 41 */
00483   CURLE_ABORTED_BY_CALLBACK,     /* 42 */
00484   CURLE_BAD_FUNCTION_ARGUMENT,   /* 43 */
00485   CURLE_OBSOLETE44,              /* 44 - NOT USED */
00486   CURLE_INTERFACE_FAILED,        /* 45 - CURLOPT_INTERFACE failed */
00487   CURLE_OBSOLETE46,              /* 46 - NOT USED */
00488   CURLE_TOO_MANY_REDIRECTS,      /* 47 - catch endless re-direct loops */
00489   CURLE_UNKNOWN_OPTION,          /* 48 - User specified an unknown option */
00490   CURLE_TELNET_OPTION_SYNTAX,    /* 49 - Malformed telnet option */
00491   CURLE_OBSOLETE50,              /* 50 - NOT USED */
00492   CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint
00493                                      wasn't verified fine */
00494   CURLE_GOT_NOTHING,             /* 52 - when this is a specific error */
00495   CURLE_SSL_ENGINE_NOTFOUND,     /* 53 - SSL crypto engine not found */
00496   CURLE_SSL_ENGINE_SETFAILED,    /* 54 - can not set SSL crypto engine as
00497                                     default */
00498   CURLE_SEND_ERROR,              /* 55 - failed sending network data */
00499   CURLE_RECV_ERROR,              /* 56 - failure in receiving network data */
00500   CURLE_OBSOLETE57,              /* 57 - NOT IN USE */
00501   CURLE_SSL_CERTPROBLEM,         /* 58 - problem with the local certificate */
00502   CURLE_SSL_CIPHER,              /* 59 - couldn't use specified cipher */
00503   CURLE_SSL_CACERT,              /* 60 - problem with the CA cert (path?) */
00504   CURLE_BAD_CONTENT_ENCODING,    /* 61 - Unrecognized/bad encoding */
00505   CURLE_LDAP_INVALID_URL,        /* 62 - Invalid LDAP URL */
00506   CURLE_FILESIZE_EXCEEDED,       /* 63 - Maximum file size exceeded */
00507   CURLE_USE_SSL_FAILED,          /* 64 - Requested FTP SSL level failed */
00508   CURLE_SEND_FAIL_REWIND,        /* 65 - Sending the data requires a rewind
00509                                     that failed */
00510   CURLE_SSL_ENGINE_INITFAILED,   /* 66 - failed to initialise ENGINE */
00511   CURLE_LOGIN_DENIED,            /* 67 - user, password or similar was not
00512                                     accepted and we failed to login */
00513   CURLE_TFTP_NOTFOUND,           /* 68 - file not found on server */
00514   CURLE_TFTP_PERM,               /* 69 - permission problem on server */
00515   CURLE_REMOTE_DISK_FULL,        /* 70 - out of disk space on server */
00516   CURLE_TFTP_ILLEGAL,            /* 71 - Illegal TFTP operation */
00517   CURLE_TFTP_UNKNOWNID,          /* 72 - Unknown transfer ID */
00518   CURLE_REMOTE_FILE_EXISTS,      /* 73 - File already exists */
00519   CURLE_TFTP_NOSUCHUSER,         /* 74 - No such user */
00520   CURLE_CONV_FAILED,             /* 75 - conversion failed */
00521   CURLE_CONV_REQD,               /* 76 - caller must register conversion
00522                                     callbacks using curl_easy_setopt options
00523                                     CURLOPT_CONV_FROM_NETWORK_FUNCTION,
00524                                     CURLOPT_CONV_TO_NETWORK_FUNCTION, and
00525                                     CURLOPT_CONV_FROM_UTF8_FUNCTION */
00526   CURLE_SSL_CACERT_BADFILE,      /* 77 - could not load CACERT file, missing
00527                                     or wrong format */
00528   CURLE_REMOTE_FILE_NOT_FOUND,   /* 78 - remote file not found */
00529   CURLE_SSH,                     /* 79 - error from the SSH layer, somewhat
00530                                     generic so the error message will be of
00531                                     interest when this has happened */
00532 
00533   CURLE_SSL_SHUTDOWN_FAILED,     /* 80 - Failed to shut down the SSL
00534                                     connection */
00535   CURLE_AGAIN,                   /* 81 - socket is not ready for send/recv,
00536                                     wait till it's ready and try again (Added
00537                                     in 7.18.2) */
00538   CURLE_SSL_CRL_BADFILE,         /* 82 - could not load CRL file, missing or
00539                                     wrong format (Added in 7.19.0) */
00540   CURLE_SSL_ISSUER_ERROR,        /* 83 - Issuer check failed.  (Added in
00541                                     7.19.0) */
00542   CURLE_FTP_PRET_FAILED,         /* 84 - a PRET command failed */
00543   CURLE_RTSP_CSEQ_ERROR,         /* 85 - mismatch of RTSP CSeq numbers */
00544   CURLE_RTSP_SESSION_ERROR,      /* 86 - mismatch of RTSP Session Ids */
00545   CURLE_FTP_BAD_FILE_LIST,       /* 87 - unable to parse FTP file list */
00546   CURLE_CHUNK_FAILED,            /* 88 - chunk callback reported error */
00547   CURLE_NO_CONNECTION_AVAILABLE, /* 89 - No connection available, the
00548                                     session will be queued */
00549   CURLE_SSL_PINNEDPUBKEYNOTMATCH, /* 90 - specified pinned public key did not
00550                                      match */
00551   CURLE_SSL_INVALIDCERTSTATUS,   /* 91 - invalid certificate status */
00552   CURLE_HTTP2_STREAM,            /* 92 - stream error in HTTP/2 framing layer
00553                                     */
00554   CURL_LAST /* never use! */
00555 } CURLcode;
00556 
00557 #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
00558                           the obsolete stuff removed! */
00559 
00560 /* Previously obsolete error code re-used in 7.38.0 */
00561 #define CURLE_OBSOLETE16 CURLE_HTTP2
00562 
00563 /* Previously obsolete error codes re-used in 7.24.0 */
00564 #define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED
00565 #define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT
00566 
00567 /*  compatibility with older names */
00568 #define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING
00569 #define CURLE_FTP_WEIRD_SERVER_REPLY CURLE_WEIRD_SERVER_REPLY
00570 
00571 /* The following were added in 7.21.5, April 2011 */
00572 #define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION
00573 
00574 /* The following were added in 7.17.1 */
00575 /* These are scheduled to disappear by 2009 */
00576 #define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION
00577 
00578 /* The following were added in 7.17.0 */
00579 /* These are scheduled to disappear by 2009 */
00580 #define CURLE_OBSOLETE CURLE_OBSOLETE50 /* no one should be using this! */
00581 #define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46
00582 #define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44
00583 #define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10
00584 #define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16
00585 #define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32
00586 #define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29
00587 #define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12
00588 #define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20
00589 #define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40
00590 #define CURLE_MALFORMAT_USER CURLE_OBSOLETE24
00591 #define CURLE_SHARE_IN_USE CURLE_OBSOLETE57
00592 #define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN
00593 
00594 #define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED
00595 #define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE
00596 #define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR
00597 #define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL
00598 #define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS
00599 #define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR
00600 #define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED
00601 
00602 /* The following were added earlier */
00603 
00604 #define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT
00605 
00606 #define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR
00607 #define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED
00608 #define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED
00609 
00610 #define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE
00611 #define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME
00612 
00613 /* This was the error code 50 in 7.7.3 and a few earlier versions, this
00614    is no longer used by libcurl but is instead #defined here only to not
00615    make programs break */
00616 #define CURLE_ALREADY_COMPLETE 99999
00617 
00618 /* Provide defines for really old option names */
00619 #define CURLOPT_FILE CURLOPT_WRITEDATA /* name changed in 7.9.7 */
00620 #define CURLOPT_INFILE CURLOPT_READDATA /* name changed in 7.9.7 */
00621 #define CURLOPT_WRITEHEADER CURLOPT_HEADERDATA
00622 
00623 /* Since long deprecated options with no code in the lib that does anything
00624    with them. */
00625 #define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40
00626 #define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72
00627 
00628 #endif 
00630 /* This prototype applies to all conversion callbacks */
00631 typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length);
00632 
00633 typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl,    /* easy handle */
00634                                           void *ssl_ctx, /* actually an
00635                                                             OpenSSL SSL_CTX */
00636                                           void *userptr);
00637 
00638 typedef enum {
00639   CURLPROXY_HTTP = 0,   /* added in 7.10, new in 7.19.4 default is to use
00640                            CONNECT HTTP/1.1 */
00641   CURLPROXY_HTTP_1_0 = 1,   /* added in 7.19.4, force to use CONNECT
00642                                HTTP/1.0  */
00643   CURLPROXY_HTTPS = 2, /* added in 7.52.0 */
00644   CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already
00645                            in 7.10 */
00646   CURLPROXY_SOCKS5 = 5, /* added in 7.10 */
00647   CURLPROXY_SOCKS4A = 6, /* added in 7.18.0 */
00648   CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the
00649                                    host name rather than the IP address. added
00650                                    in 7.18.0 */
00651 } curl_proxytype;  /* this enum was added in 7.10 */
00652 
00653 /*
00654  * Bitmasks for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH options:
00655  *
00656  * CURLAUTH_NONE         - No HTTP authentication
00657  * CURLAUTH_BASIC        - HTTP Basic authentication (default)
00658  * CURLAUTH_DIGEST       - HTTP Digest authentication
00659  * CURLAUTH_NEGOTIATE    - HTTP Negotiate (SPNEGO) authentication
00660  * CURLAUTH_GSSNEGOTIATE - Alias for CURLAUTH_NEGOTIATE (deprecated)
00661  * CURLAUTH_NTLM         - HTTP NTLM authentication
00662  * CURLAUTH_DIGEST_IE    - HTTP Digest authentication with IE flavour
00663  * CURLAUTH_NTLM_WB      - HTTP NTLM authentication delegated to winbind helper
00664  * CURLAUTH_ONLY         - Use together with a single other type to force no
00665  *                         authentication or just that single type
00666  * CURLAUTH_ANY          - All fine types set
00667  * CURLAUTH_ANYSAFE      - All fine types except Basic
00668  */
00669 
00670 #define CURLAUTH_NONE         ((unsigned long)0)
00671 #define CURLAUTH_BASIC        (((unsigned long)1)<<0)
00672 #define CURLAUTH_DIGEST       (((unsigned long)1)<<1)
00673 #define CURLAUTH_NEGOTIATE    (((unsigned long)1)<<2)
00674 /* Deprecated since the advent of CURLAUTH_NEGOTIATE */
00675 #define CURLAUTH_GSSNEGOTIATE CURLAUTH_NEGOTIATE
00676 #define CURLAUTH_NTLM         (((unsigned long)1)<<3)
00677 #define CURLAUTH_DIGEST_IE    (((unsigned long)1)<<4)
00678 #define CURLAUTH_NTLM_WB      (((unsigned long)1)<<5)
00679 #define CURLAUTH_ONLY         (((unsigned long)1)<<31)
00680 #define CURLAUTH_ANY          (~CURLAUTH_DIGEST_IE)
00681 #define CURLAUTH_ANYSAFE      (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
00682 
00683 #define CURLSSH_AUTH_ANY       ~0     /* all types supported by the server */
00684 #define CURLSSH_AUTH_NONE      0      /* none allowed, silly but complete */
00685 #define CURLSSH_AUTH_PUBLICKEY (1<<0) /* public/private key files */
00686 #define CURLSSH_AUTH_PASSWORD  (1<<1) /* password */
00687 #define CURLSSH_AUTH_HOST      (1<<2) /* host key files */
00688 #define CURLSSH_AUTH_KEYBOARD  (1<<3) /* keyboard interactive */
00689 #define CURLSSH_AUTH_AGENT     (1<<4) /* agent (ssh-agent, pageant...) */
00690 #define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY
00691 
00692 #define CURLGSSAPI_DELEGATION_NONE        0      /* no delegation (default) */
00693 #define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */
00694 #define CURLGSSAPI_DELEGATION_FLAG        (1<<1) /* delegate always */
00695 
00696 #define CURL_ERROR_SIZE 256
00697 
00698 enum curl_khtype {
00699   CURLKHTYPE_UNKNOWN,
00700   CURLKHTYPE_RSA1,
00701   CURLKHTYPE_RSA,
00702   CURLKHTYPE_DSS
00703 };
00704 
00705 struct curl_khkey {
00706   const char *key; /* points to a zero-terminated string encoded with base64
00707                       if len is zero, otherwise to the "raw" data */
00708   size_t len;
00709   enum curl_khtype keytype;
00710 };
00711 
00712 /* this is the set of return values expected from the curl_sshkeycallback
00713    callback */
00714 enum curl_khstat {
00715   CURLKHSTAT_FINE_ADD_TO_FILE,
00716   CURLKHSTAT_FINE,
00717   CURLKHSTAT_REJECT, /* reject the connection, return an error */
00718   CURLKHSTAT_DEFER,  /* do not accept it, but we can't answer right now so
00719                         this causes a CURLE_DEFER error but otherwise the
00720                         connection will be left intact etc */
00721   CURLKHSTAT_LAST    /* not for use, only a marker for last-in-list */
00722 };
00723 
00724 /* this is the set of status codes pass in to the callback */
00725 enum curl_khmatch {
00726   CURLKHMATCH_OK,       /* match */
00727   CURLKHMATCH_MISMATCH, /* host found, key mismatch! */
00728   CURLKHMATCH_MISSING,  /* no matching host/key found */
00729   CURLKHMATCH_LAST      /* not for use, only a marker for last-in-list */
00730 };
00731 
00732 typedef int
00733   (*curl_sshkeycallback) (CURL *easy,     /* easy handle */
00734                           const struct curl_khkey *knownkey, /* known */
00735                           const struct curl_khkey *foundkey, /* found */
00736                           enum curl_khmatch, /* libcurl's view on the keys */
00737                           void *clientp); /* custom pointer passed from app */
00738 
00739 /* parameter for the CURLOPT_USE_SSL option */
00740 typedef enum {
00741   CURLUSESSL_NONE,    /* do not attempt to use SSL */
00742   CURLUSESSL_TRY,     /* try using SSL, proceed anyway otherwise */
00743   CURLUSESSL_CONTROL, /* SSL for the control connection or fail */
00744   CURLUSESSL_ALL,     /* SSL for all communication or fail */
00745   CURLUSESSL_LAST     /* not an option, never use */
00746 } curl_usessl;
00747 
00748 /* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */
00749 
00750 /* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the
00751    name of improving interoperability with older servers. Some SSL libraries
00752    have introduced work-arounds for this flaw but those work-arounds sometimes
00753    make the SSL communication fail. To regain functionality with those broken
00754    servers, a user can this way allow the vulnerability back. */
00755 #define CURLSSLOPT_ALLOW_BEAST (1<<0)
00756 
00757 /* - NO_REVOKE tells libcurl to disable certificate revocation checks for those
00758    SSL backends where such behavior is present. */
00759 #define CURLSSLOPT_NO_REVOKE (1<<1)
00760 
00761 #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
00762                           the obsolete stuff removed! */
00763 
00764 /* Backwards compatibility with older names */
00765 /* These are scheduled to disappear by 2009 */
00766 
00767 #define CURLFTPSSL_NONE CURLUSESSL_NONE
00768 #define CURLFTPSSL_TRY CURLUSESSL_TRY
00769 #define CURLFTPSSL_CONTROL CURLUSESSL_CONTROL
00770 #define CURLFTPSSL_ALL CURLUSESSL_ALL
00771 #define CURLFTPSSL_LAST CURLUSESSL_LAST
00772 #define curl_ftpssl curl_usessl
00773 #endif 
00775 /* parameter for the CURLOPT_FTP_SSL_CCC option */
00776 typedef enum {
00777   CURLFTPSSL_CCC_NONE,    /* do not send CCC */
00778   CURLFTPSSL_CCC_PASSIVE, /* Let the server initiate the shutdown */
00779   CURLFTPSSL_CCC_ACTIVE,  /* Initiate the shutdown */
00780   CURLFTPSSL_CCC_LAST     /* not an option, never use */
00781 } curl_ftpccc;
00782 
00783 /* parameter for the CURLOPT_FTPSSLAUTH option */
00784 typedef enum {
00785   CURLFTPAUTH_DEFAULT, /* let libcurl decide */
00786   CURLFTPAUTH_SSL,     /* use "AUTH SSL" */
00787   CURLFTPAUTH_TLS,     /* use "AUTH TLS" */
00788   CURLFTPAUTH_LAST /* not an option, never use */
00789 } curl_ftpauth;
00790 
00791 /* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */
00792 typedef enum {
00793   CURLFTP_CREATE_DIR_NONE,  /* do NOT create missing dirs! */
00794   CURLFTP_CREATE_DIR,       /* (FTP/SFTP) if CWD fails, try MKD and then CWD
00795                                again if MKD succeeded, for SFTP this does
00796                                similar magic */
00797   CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD
00798                                again even if MKD failed! */
00799   CURLFTP_CREATE_DIR_LAST   /* not an option, never use */
00800 } curl_ftpcreatedir;
00801 
00802 /* parameter for the CURLOPT_FTP_FILEMETHOD option */
00803 typedef enum {
00804   CURLFTPMETHOD_DEFAULT,   /* let libcurl pick */
00805   CURLFTPMETHOD_MULTICWD,  /* single CWD operation for each path part */
00806   CURLFTPMETHOD_NOCWD,     /* no CWD at all */
00807   CURLFTPMETHOD_SINGLECWD, /* one CWD to full dir, then work on file */
00808   CURLFTPMETHOD_LAST       /* not an option, never use */
00809 } curl_ftpmethod;
00810 
00811 /* bitmask defines for CURLOPT_HEADEROPT */
00812 #define CURLHEADER_UNIFIED  0
00813 #define CURLHEADER_SEPARATE (1<<0)
00814 
00815 /* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */
00816 #define CURLPROTO_HTTP   (1<<0)
00817 #define CURLPROTO_HTTPS  (1<<1)
00818 #define CURLPROTO_FTP    (1<<2)
00819 #define CURLPROTO_FTPS   (1<<3)
00820 #define CURLPROTO_SCP    (1<<4)
00821 #define CURLPROTO_SFTP   (1<<5)
00822 #define CURLPROTO_TELNET (1<<6)
00823 #define CURLPROTO_LDAP   (1<<7)
00824 #define CURLPROTO_LDAPS  (1<<8)
00825 #define CURLPROTO_DICT   (1<<9)
00826 #define CURLPROTO_FILE   (1<<10)
00827 #define CURLPROTO_TFTP   (1<<11)
00828 #define CURLPROTO_IMAP   (1<<12)
00829 #define CURLPROTO_IMAPS  (1<<13)
00830 #define CURLPROTO_POP3   (1<<14)
00831 #define CURLPROTO_POP3S  (1<<15)
00832 #define CURLPROTO_SMTP   (1<<16)
00833 #define CURLPROTO_SMTPS  (1<<17)
00834 #define CURLPROTO_RTSP   (1<<18)
00835 #define CURLPROTO_RTMP   (1<<19)
00836 #define CURLPROTO_RTMPT  (1<<20)
00837 #define CURLPROTO_RTMPE  (1<<21)
00838 #define CURLPROTO_RTMPTE (1<<22)
00839 #define CURLPROTO_RTMPS  (1<<23)
00840 #define CURLPROTO_RTMPTS (1<<24)
00841 #define CURLPROTO_GOPHER (1<<25)
00842 #define CURLPROTO_SMB    (1<<26)
00843 #define CURLPROTO_SMBS   (1<<27)
00844 #define CURLPROTO_ALL    (~0) /* enable everything */
00845 
00846 /* long may be 32 or 64 bits, but we should never depend on anything else
00847    but 32 */
00848 #define CURLOPTTYPE_LONG          0
00849 #define CURLOPTTYPE_OBJECTPOINT   10000
00850 #define CURLOPTTYPE_STRINGPOINT   10000
00851 #define CURLOPTTYPE_FUNCTIONPOINT 20000
00852 #define CURLOPTTYPE_OFF_T         30000
00853 
00854 /* *STRINGPOINT is an alias for OBJECTPOINT to allow tools to extract the
00855    string options from the header file */
00856 
00857 /* name is uppercase CURLOPT_<name>,
00858    type is one of the defined CURLOPTTYPE_<type>
00859    number is unique identifier */
00860 #ifdef CINIT
00861 #undef CINIT
00862 #endif
00863 
00864 #ifdef CURL_ISOCPP
00865 #define CINIT(na,t,nu) CURLOPT_ ## na = CURLOPTTYPE_ ## t + nu
00866 #else
00867 /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
00868 #define LONG          CURLOPTTYPE_LONG
00869 #define OBJECTPOINT   CURLOPTTYPE_OBJECTPOINT
00870 #define STRINGPOINT   CURLOPTTYPE_OBJECTPOINT
00871 #define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT
00872 #define OFF_T         CURLOPTTYPE_OFF_T
00873 #define CINIT(name,type,number) CURLOPT_name = type + number
00874 #endif
00875 
00876 /*
00877  * This macro-mania below setups the CURLOPT_[what] enum, to be used with
00878  * curl_easy_setopt(). The first argument in the CINIT() macro is the [what]
00879  * word.
00880  */
00881 
00882 typedef enum {
00883   /* This is the FILE * or void * the regular output should be written to. */
00884   CINIT(WRITEDATA, OBJECTPOINT, 1),
00885 
00886   /* The full URL to get/put */
00887   CINIT(URL, STRINGPOINT, 2),
00888 
00889   /* Port number to connect to, if other than default. */
00890   CINIT(PORT, LONG, 3),
00891 
00892   /* Name of proxy to use. */
00893   CINIT(PROXY, STRINGPOINT, 4),
00894 
00895   /* "user:password;options" to use when fetching. */
00896   CINIT(USERPWD, STRINGPOINT, 5),
00897 
00898   /* "user:password" to use with proxy. */
00899   CINIT(PROXYUSERPWD, STRINGPOINT, 6),
00900 
00901   /* Range to get, specified as an ASCII string. */
00902   CINIT(RANGE, STRINGPOINT, 7),
00903 
00904   /* not used */
00905 
00906   /* Specified file stream to upload from (use as input): */
00907   CINIT(READDATA, OBJECTPOINT, 9),
00908 
00909   /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE
00910    * bytes big. If this is not used, error messages go to stderr instead: */
00911   CINIT(ERRORBUFFER, OBJECTPOINT, 10),
00912 
00913   /* Function that will be called to store the output (instead of fwrite). The
00914    * parameters will use fwrite() syntax, make sure to follow them. */
00915   CINIT(WRITEFUNCTION, FUNCTIONPOINT, 11),
00916 
00917   /* Function that will be called to read the input (instead of fread). The
00918    * parameters will use fread() syntax, make sure to follow them. */
00919   CINIT(READFUNCTION, FUNCTIONPOINT, 12),
00920 
00921   /* Time-out the read operation after this amount of seconds */
00922   CINIT(TIMEOUT, LONG, 13),
00923 
00924   /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about
00925    * how large the file being sent really is. That allows better error
00926    * checking and better verifies that the upload was successful. -1 means
00927    * unknown size.
00928    *
00929    * For large file support, there is also a _LARGE version of the key
00930    * which takes an off_t type, allowing platforms with larger off_t
00931    * sizes to handle larger files.  See below for INFILESIZE_LARGE.
00932    */
00933   CINIT(INFILESIZE, LONG, 14),
00934 
00935   /* POST static input fields. */
00936   CINIT(POSTFIELDS, OBJECTPOINT, 15),
00937 
00938   /* Set the referrer page (needed by some CGIs) */
00939   CINIT(REFERER, STRINGPOINT, 16),
00940 
00941   /* Set the FTP PORT string (interface name, named or numerical IP address)
00942      Use i.e '-' to use default address. */
00943   CINIT(FTPPORT, STRINGPOINT, 17),
00944 
00945   /* Set the User-Agent string (examined by some CGIs) */
00946   CINIT(USERAGENT, STRINGPOINT, 18),
00947 
00948   /* If the download receives less than "low speed limit" bytes/second
00949    * during "low speed time" seconds, the operations is aborted.
00950    * You could i.e if you have a pretty high speed connection, abort if
00951    * it is less than 2000 bytes/sec during 20 seconds.
00952    */
00953 
00954   /* Set the "low speed limit" */
00955   CINIT(LOW_SPEED_LIMIT, LONG, 19),
00956 
00957   /* Set the "low speed time" */
00958   CINIT(LOW_SPEED_TIME, LONG, 20),
00959 
00960   /* Set the continuation offset.
00961    *
00962    * Note there is also a _LARGE version of this key which uses
00963    * off_t types, allowing for large file offsets on platforms which
00964    * use larger-than-32-bit off_t's.  Look below for RESUME_FROM_LARGE.
00965    */
00966   CINIT(RESUME_FROM, LONG, 21),
00967 
00968   /* Set cookie in request: */
00969   CINIT(COOKIE, STRINGPOINT, 22),
00970 
00971   /* This points to a linked list of headers, struct curl_slist kind. This
00972      list is also used for RTSP (in spite of its name) */
00973   CINIT(HTTPHEADER, OBJECTPOINT, 23),
00974 
00975   /* This points to a linked list of post entries, struct curl_httppost */
00976   CINIT(HTTPPOST, OBJECTPOINT, 24),
00977 
00978   /* name of the file keeping your private SSL-certificate */
00979   CINIT(SSLCERT, STRINGPOINT, 25),
00980 
00981   /* password for the SSL or SSH private key */
00982   CINIT(KEYPASSWD, STRINGPOINT, 26),
00983 
00984   /* send TYPE parameter? */
00985   CINIT(CRLF, LONG, 27),
00986 
00987   /* send linked-list of QUOTE commands */
00988   CINIT(QUOTE, OBJECTPOINT, 28),
00989 
00990   /* send FILE * or void * to store headers to, if you use a callback it
00991      is simply passed to the callback unmodified */
00992   CINIT(HEADERDATA, OBJECTPOINT, 29),
00993 
00994   /* point to a file to read the initial cookies from, also enables
00995      "cookie awareness" */
00996   CINIT(COOKIEFILE, STRINGPOINT, 31),
00997 
00998   /* What version to specifically try to use.
00999      See CURL_SSLVERSION defines below. */
01000   CINIT(SSLVERSION, LONG, 32),
01001 
01002   /* What kind of HTTP time condition to use, see defines */
01003   CINIT(TIMECONDITION, LONG, 33),
01004 
01005   /* Time to use with the above condition. Specified in number of seconds
01006      since 1 Jan 1970 */
01007   CINIT(TIMEVALUE, LONG, 34),
01008 
01009   /* 35 = OBSOLETE */
01010 
01011   /* Custom request, for customizing the get command like
01012      HTTP: DELETE, TRACE and others
01013      FTP: to use a different list command
01014      */
01015   CINIT(CUSTOMREQUEST, STRINGPOINT, 36),
01016 
01017   /* FILE handle to use instead of stderr */
01018   CINIT(STDERR, OBJECTPOINT, 37),
01019 
01020   /* 38 is not used */
01021 
01022   /* send linked-list of post-transfer QUOTE commands */
01023   CINIT(POSTQUOTE, OBJECTPOINT, 39),
01024 
01025   CINIT(OBSOLETE40, OBJECTPOINT, 40), /* OBSOLETE, do not use! */
01026 
01027   CINIT(VERBOSE, LONG, 41),      /* talk a lot */
01028   CINIT(HEADER, LONG, 42),       /* throw the header out too */
01029   CINIT(NOPROGRESS, LONG, 43),   /* shut off the progress meter */
01030   CINIT(NOBODY, LONG, 44),       /* use HEAD to get http document */
01031   CINIT(FAILONERROR, LONG, 45),  /* no output on http error codes >= 400 */
01032   CINIT(UPLOAD, LONG, 46),       /* this is an upload */
01033   CINIT(POST, LONG, 47),         /* HTTP POST method */
01034   CINIT(DIRLISTONLY, LONG, 48),  /* bare names when listing directories */
01035 
01036   CINIT(APPEND, LONG, 50),       /* Append instead of overwrite on upload! */
01037 
01038   /* Specify whether to read the user+password from the .netrc or the URL.
01039    * This must be one of the CURL_NETRC_* enums below. */
01040   CINIT(NETRC, LONG, 51),
01041 
01042   CINIT(FOLLOWLOCATION, LONG, 52),  /* use Location: Luke! */
01043 
01044   CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */
01045   CINIT(PUT, LONG, 54),          /* HTTP PUT */
01046 
01047   /* 55 = OBSOLETE */
01048 
01049   /* DEPRECATED
01050    * Function that will be called instead of the internal progress display
01051    * function. This function should be defined as the curl_progress_callback
01052    * prototype defines. */
01053   CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56),
01054 
01055   /* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION
01056      callbacks */
01057   CINIT(PROGRESSDATA, OBJECTPOINT, 57),
01058 #define CURLOPT_XFERINFODATA CURLOPT_PROGRESSDATA
01059 
01060   /* We want the referrer field set automatically when following locations */
01061   CINIT(AUTOREFERER, LONG, 58),
01062 
01063   /* Port of the proxy, can be set in the proxy string as well with:
01064      "[host]:[port]" */
01065   CINIT(PROXYPORT, LONG, 59),
01066 
01067   /* size of the POST input data, if strlen() is not good to use */
01068   CINIT(POSTFIELDSIZE, LONG, 60),
01069 
01070   /* tunnel non-http operations through a HTTP proxy */
01071   CINIT(HTTPPROXYTUNNEL, LONG, 61),
01072 
01073   /* Set the interface string to use as outgoing network interface */
01074   CINIT(INTERFACE, STRINGPOINT, 62),
01075 
01076   /* Set the krb4/5 security level, this also enables krb4/5 awareness.  This
01077    * is a string, 'clear', 'safe', 'confidential' or 'private'.  If the string
01078    * is set but doesn't match one of these, 'private' will be used.  */
01079   CINIT(KRBLEVEL, STRINGPOINT, 63),
01080 
01081   /* Set if we should verify the peer in ssl handshake, set 1 to verify. */
01082   CINIT(SSL_VERIFYPEER, LONG, 64),
01083 
01084   /* The CApath or CAfile used to validate the peer certificate
01085      this option is used only if SSL_VERIFYPEER is true */
01086   CINIT(CAINFO, STRINGPOINT, 65),
01087 
01088   /* 66 = OBSOLETE */
01089   /* 67 = OBSOLETE */
01090 
01091   /* Maximum number of http redirects to follow */
01092   CINIT(MAXREDIRS, LONG, 68),
01093 
01094   /* Pass a long set to 1 to get the date of the requested document (if
01095      possible)! Pass a zero to shut it off. */
01096   CINIT(FILETIME, LONG, 69),
01097 
01098   /* This points to a linked list of telnet options */
01099   CINIT(TELNETOPTIONS, OBJECTPOINT, 70),
01100 
01101   /* Max amount of cached alive connections */
01102   CINIT(MAXCONNECTS, LONG, 71),
01103 
01104   CINIT(OBSOLETE72, LONG, 72), /* OBSOLETE, do not use! */
01105 
01106   /* 73 = OBSOLETE */
01107 
01108   /* Set to explicitly use a new connection for the upcoming transfer.
01109      Do not use this unless you're absolutely sure of this, as it makes the
01110      operation slower and is less friendly for the network. */
01111   CINIT(FRESH_CONNECT, LONG, 74),
01112 
01113   /* Set to explicitly forbid the upcoming transfer's connection to be re-used
01114      when done. Do not use this unless you're absolutely sure of this, as it
01115      makes the operation slower and is less friendly for the network. */
01116   CINIT(FORBID_REUSE, LONG, 75),
01117 
01118   /* Set to a file name that contains random data for libcurl to use to
01119      seed the random engine when doing SSL connects. */
01120   CINIT(RANDOM_FILE, STRINGPOINT, 76),
01121 
01122   /* Set to the Entropy Gathering Daemon socket pathname */
01123   CINIT(EGDSOCKET, STRINGPOINT, 77),
01124 
01125   /* Time-out connect operations after this amount of seconds, if connects are
01126      OK within this time, then fine... This only aborts the connect phase. */
01127   CINIT(CONNECTTIMEOUT, LONG, 78),
01128 
01129   /* Function that will be called to store headers (instead of fwrite). The
01130    * parameters will use fwrite() syntax, make sure to follow them. */
01131   CINIT(HEADERFUNCTION, FUNCTIONPOINT, 79),
01132 
01133   /* Set this to force the HTTP request to get back to GET. Only really usable
01134      if POST, PUT or a custom request have been used first.
01135    */
01136   CINIT(HTTPGET, LONG, 80),
01137 
01138   /* Set if we should verify the Common name from the peer certificate in ssl
01139    * handshake, set 1 to check existence, 2 to ensure that it matches the
01140    * provided hostname. */
01141   CINIT(SSL_VERIFYHOST, LONG, 81),
01142 
01143   /* Specify which file name to write all known cookies in after completed
01144      operation. Set file name to "-" (dash) to make it go to stdout. */
01145   CINIT(COOKIEJAR, STRINGPOINT, 82),
01146 
01147   /* Specify which SSL ciphers to use */
01148   CINIT(SSL_CIPHER_LIST, STRINGPOINT, 83),
01149 
01150   /* Specify which HTTP version to use! This must be set to one of the
01151      CURL_HTTP_VERSION* enums set below. */
01152   CINIT(HTTP_VERSION, LONG, 84),
01153 
01154   /* Specifically switch on or off the FTP engine's use of the EPSV command. By
01155      default, that one will always be attempted before the more traditional
01156      PASV command. */
01157   CINIT(FTP_USE_EPSV, LONG, 85),
01158 
01159   /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */
01160   CINIT(SSLCERTTYPE, STRINGPOINT, 86),
01161 
01162   /* name of the file keeping your private SSL-key */
01163   CINIT(SSLKEY, STRINGPOINT, 87),
01164 
01165   /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */
01166   CINIT(SSLKEYTYPE, STRINGPOINT, 88),
01167 
01168   /* crypto engine for the SSL-sub system */
01169   CINIT(SSLENGINE, STRINGPOINT, 89),
01170 
01171   /* set the crypto engine for the SSL-sub system as default
01172      the param has no meaning...
01173    */
01174   CINIT(SSLENGINE_DEFAULT, LONG, 90),
01175 
01176   /* Non-zero value means to use the global dns cache */
01177   CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* DEPRECATED, do not use! */
01178 
01179   /* DNS cache timeout */
01180   CINIT(DNS_CACHE_TIMEOUT, LONG, 92),
01181 
01182   /* send linked-list of pre-transfer QUOTE commands */
01183   CINIT(PREQUOTE, OBJECTPOINT, 93),
01184 
01185   /* set the debug function */
01186   CINIT(DEBUGFUNCTION, FUNCTIONPOINT, 94),
01187 
01188   /* set the data for the debug function */
01189   CINIT(DEBUGDATA, OBJECTPOINT, 95),
01190 
01191   /* mark this as start of a cookie session */
01192   CINIT(COOKIESESSION, LONG, 96),
01193 
01194   /* The CApath directory used to validate the peer certificate
01195      this option is used only if SSL_VERIFYPEER is true */
01196   CINIT(CAPATH, STRINGPOINT, 97),
01197 
01198   /* Instruct libcurl to use a smaller receive buffer */
01199   CINIT(BUFFERSIZE, LONG, 98),
01200 
01201   /* Instruct libcurl to not use any signal/alarm handlers, even when using
01202      timeouts. This option is useful for multi-threaded applications.
01203      See libcurl-the-guide for more background information. */
01204   CINIT(NOSIGNAL, LONG, 99),
01205 
01206   /* Provide a CURLShare for mutexing non-ts data */
01207   CINIT(SHARE, OBJECTPOINT, 100),
01208 
01209   /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default),
01210      CURLPROXY_HTTPS, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and
01211      CURLPROXY_SOCKS5. */
01212   CINIT(PROXYTYPE, LONG, 101),
01213 
01214   /* Set the Accept-Encoding string. Use this to tell a server you would like
01215      the response to be compressed. Before 7.21.6, this was known as
01216      CURLOPT_ENCODING */
01217   CINIT(ACCEPT_ENCODING, STRINGPOINT, 102),
01218 
01219   /* Set pointer to private data */
01220   CINIT(PRIVATE, OBJECTPOINT, 103),
01221 
01222   /* Set aliases for HTTP 200 in the HTTP Response header */
01223   CINIT(HTTP200ALIASES, OBJECTPOINT, 104),
01224 
01225   /* Continue to send authentication (user+password) when following locations,
01226      even when hostname changed. This can potentially send off the name
01227      and password to whatever host the server decides. */
01228   CINIT(UNRESTRICTED_AUTH, LONG, 105),
01229 
01230   /* Specifically switch on or off the FTP engine's use of the EPRT command (
01231      it also disables the LPRT attempt). By default, those ones will always be
01232      attempted before the good old traditional PORT command. */
01233   CINIT(FTP_USE_EPRT, LONG, 106),
01234 
01235   /* Set this to a bitmask value to enable the particular authentications
01236      methods you like. Use this in combination with CURLOPT_USERPWD.
01237      Note that setting multiple bits may cause extra network round-trips. */
01238   CINIT(HTTPAUTH, LONG, 107),
01239 
01240   /* Set the ssl context callback function, currently only for OpenSSL ssl_ctx
01241      in second argument. The function must be matching the
01242      curl_ssl_ctx_callback proto. */
01243   CINIT(SSL_CTX_FUNCTION, FUNCTIONPOINT, 108),
01244 
01245   /* Set the userdata for the ssl context callback function's third
01246      argument */
01247   CINIT(SSL_CTX_DATA, OBJECTPOINT, 109),
01248 
01249   /* FTP Option that causes missing dirs to be created on the remote server.
01250      In 7.19.4 we introduced the convenience enums for this option using the
01251      CURLFTP_CREATE_DIR prefix.
01252   */
01253   CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110),
01254 
01255   /* Set this to a bitmask value to enable the particular authentications
01256      methods you like. Use this in combination with CURLOPT_PROXYUSERPWD.
01257      Note that setting multiple bits may cause extra network round-trips. */
01258   CINIT(PROXYAUTH, LONG, 111),
01259 
01260   /* FTP option that changes the timeout, in seconds, associated with
01261      getting a response.  This is different from transfer timeout time and
01262      essentially places a demand on the FTP server to acknowledge commands
01263      in a timely manner. */
01264   CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112),
01265 #define CURLOPT_SERVER_RESPONSE_TIMEOUT CURLOPT_FTP_RESPONSE_TIMEOUT
01266 
01267   /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to
01268      tell libcurl to resolve names to those IP versions only. This only has
01269      affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */
01270   CINIT(IPRESOLVE, LONG, 113),
01271 
01272   /* Set this option to limit the size of a file that will be downloaded from
01273      an HTTP or FTP server.
01274 
01275      Note there is also _LARGE version which adds large file support for
01276      platforms which have larger off_t sizes.  See MAXFILESIZE_LARGE below. */
01277   CINIT(MAXFILESIZE, LONG, 114),
01278 
01279   /* See the comment for INFILESIZE above, but in short, specifies
01280    * the size of the file being uploaded.  -1 means unknown.
01281    */
01282   CINIT(INFILESIZE_LARGE, OFF_T, 115),
01283 
01284   /* Sets the continuation offset.  There is also a LONG version of this;
01285    * look above for RESUME_FROM.
01286    */
01287   CINIT(RESUME_FROM_LARGE, OFF_T, 116),
01288 
01289   /* Sets the maximum size of data that will be downloaded from
01290    * an HTTP or FTP server.  See MAXFILESIZE above for the LONG version.
01291    */
01292   CINIT(MAXFILESIZE_LARGE, OFF_T, 117),
01293 
01294   /* Set this option to the file name of your .netrc file you want libcurl
01295      to parse (using the CURLOPT_NETRC option). If not set, libcurl will do
01296      a poor attempt to find the user's home directory and check for a .netrc
01297      file in there. */
01298   CINIT(NETRC_FILE, STRINGPOINT, 118),
01299 
01300   /* Enable SSL/TLS for FTP, pick one of:
01301      CURLUSESSL_TRY     - try using SSL, proceed anyway otherwise
01302      CURLUSESSL_CONTROL - SSL for the control connection or fail
01303      CURLUSESSL_ALL     - SSL for all communication or fail
01304   */
01305   CINIT(USE_SSL, LONG, 119),
01306 
01307   /* The _LARGE version of the standard POSTFIELDSIZE option */
01308   CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120),
01309 
01310   /* Enable/disable the TCP Nagle algorithm */
01311   CINIT(TCP_NODELAY, LONG, 121),
01312 
01313   /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
01314   /* 123 OBSOLETE. Gone in 7.16.0 */
01315   /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
01316   /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
01317   /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
01318   /* 127 OBSOLETE. Gone in 7.16.0 */
01319   /* 128 OBSOLETE. Gone in 7.16.0 */
01320 
01321   /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option
01322      can be used to change libcurl's default action which is to first try
01323      "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK
01324      response has been received.
01325 
01326      Available parameters are:
01327      CURLFTPAUTH_DEFAULT - let libcurl decide
01328      CURLFTPAUTH_SSL     - try "AUTH SSL" first, then TLS
01329      CURLFTPAUTH_TLS     - try "AUTH TLS" first, then SSL
01330   */
01331   CINIT(FTPSSLAUTH, LONG, 129),
01332 
01333   CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130),
01334   CINIT(IOCTLDATA, OBJECTPOINT, 131),
01335 
01336   /* 132 OBSOLETE. Gone in 7.16.0 */
01337   /* 133 OBSOLETE. Gone in 7.16.0 */
01338 
01339   /* zero terminated string for pass on to the FTP server when asked for
01340      "account" info */
01341   CINIT(FTP_ACCOUNT, STRINGPOINT, 134),
01342 
01343   /* feed cookie into cookie engine */
01344   CINIT(COOKIELIST, STRINGPOINT, 135),
01345 
01346   /* ignore Content-Length */
01347   CINIT(IGNORE_CONTENT_LENGTH, LONG, 136),
01348 
01349   /* Set to non-zero to skip the IP address received in a 227 PASV FTP server
01350      response. Typically used for FTP-SSL purposes but is not restricted to
01351      that. libcurl will then instead use the same IP address it used for the
01352      control connection. */
01353   CINIT(FTP_SKIP_PASV_IP, LONG, 137),
01354 
01355   /* Select "file method" to use when doing FTP, see the curl_ftpmethod
01356      above. */
01357   CINIT(FTP_FILEMETHOD, LONG, 138),
01358 
01359   /* Local port number to bind the socket to */
01360   CINIT(LOCALPORT, LONG, 139),
01361 
01362   /* Number of ports to try, including the first one set with LOCALPORT.
01363      Thus, setting it to 1 will make no additional attempts but the first.
01364   */
01365   CINIT(LOCALPORTRANGE, LONG, 140),
01366 
01367   /* no transfer, set up connection and let application use the socket by
01368      extracting it with CURLINFO_LASTSOCKET */
01369   CINIT(CONNECT_ONLY, LONG, 141),
01370 
01371   /* Function that will be called to convert from the
01372      network encoding (instead of using the iconv calls in libcurl) */
01373   CINIT(CONV_FROM_NETWORK_FUNCTION, FUNCTIONPOINT, 142),
01374 
01375   /* Function that will be called to convert to the
01376      network encoding (instead of using the iconv calls in libcurl) */
01377   CINIT(CONV_TO_NETWORK_FUNCTION, FUNCTIONPOINT, 143),
01378 
01379   /* Function that will be called to convert from UTF8
01380      (instead of using the iconv calls in libcurl)
01381      Note that this is used only for SSL certificate processing */
01382   CINIT(CONV_FROM_UTF8_FUNCTION, FUNCTIONPOINT, 144),
01383 
01384   /* if the connection proceeds too quickly then need to slow it down */
01385   /* limit-rate: maximum number of bytes per second to send or receive */
01386   CINIT(MAX_SEND_SPEED_LARGE, OFF_T, 145),
01387   CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146),
01388 
01389   /* Pointer to command string to send if USER/PASS fails. */
01390   CINIT(FTP_ALTERNATIVE_TO_USER, STRINGPOINT, 147),
01391 
01392   /* callback function for setting socket options */
01393   CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148),
01394   CINIT(SOCKOPTDATA, OBJECTPOINT, 149),
01395 
01396   /* set to 0 to disable session ID re-use for this transfer, default is
01397      enabled (== 1) */
01398   CINIT(SSL_SESSIONID_CACHE, LONG, 150),
01399 
01400   /* allowed SSH authentication methods */
01401   CINIT(SSH_AUTH_TYPES, LONG, 151),
01402 
01403   /* Used by scp/sftp to do public/private key authentication */
01404   CINIT(SSH_PUBLIC_KEYFILE, STRINGPOINT, 152),
01405   CINIT(SSH_PRIVATE_KEYFILE, STRINGPOINT, 153),
01406 
01407   /* Send CCC (Clear Command Channel) after authentication */
01408   CINIT(FTP_SSL_CCC, LONG, 154),
01409 
01410   /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */
01411   CINIT(TIMEOUT_MS, LONG, 155),
01412   CINIT(CONNECTTIMEOUT_MS, LONG, 156),
01413 
01414   /* set to zero to disable the libcurl's decoding and thus pass the raw body
01415      data to the application even when it is encoded/compressed */
01416   CINIT(HTTP_TRANSFER_DECODING, LONG, 157),
01417   CINIT(HTTP_CONTENT_DECODING, LONG, 158),
01418 
01419   /* Permission used when creating new files and directories on the remote
01420      server for protocols that support it, SFTP/SCP/FILE */
01421   CINIT(NEW_FILE_PERMS, LONG, 159),
01422   CINIT(NEW_DIRECTORY_PERMS, LONG, 160),
01423 
01424   /* Set the behaviour of POST when redirecting. Values must be set to one
01425      of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */
01426   CINIT(POSTREDIR, LONG, 161),
01427 
01428   /* used by scp/sftp to verify the host's public key */
01429   CINIT(SSH_HOST_PUBLIC_KEY_MD5, STRINGPOINT, 162),
01430 
01431   /* Callback function for opening socket (instead of socket(2)). Optionally,
01432      callback is able change the address or refuse to connect returning
01433      CURL_SOCKET_BAD.  The callback should have type
01434      curl_opensocket_callback */
01435   CINIT(OPENSOCKETFUNCTION, FUNCTIONPOINT, 163),
01436   CINIT(OPENSOCKETDATA, OBJECTPOINT, 164),
01437 
01438   /* POST volatile input fields. */
01439   CINIT(COPYPOSTFIELDS, OBJECTPOINT, 165),
01440 
01441   /* set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy */
01442   CINIT(PROXY_TRANSFER_MODE, LONG, 166),
01443 
01444   /* Callback function for seeking in the input stream */
01445   CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167),
01446   CINIT(SEEKDATA, OBJECTPOINT, 168),
01447 
01448   /* CRL file */
01449   CINIT(CRLFILE, STRINGPOINT, 169),
01450 
01451   /* Issuer certificate */
01452   CINIT(ISSUERCERT, STRINGPOINT, 170),
01453 
01454   /* (IPv6) Address scope */
01455   CINIT(ADDRESS_SCOPE, LONG, 171),
01456 
01457   /* Collect certificate chain info and allow it to get retrievable with
01458      CURLINFO_CERTINFO after the transfer is complete. */
01459   CINIT(CERTINFO, LONG, 172),
01460 
01461   /* "name" and "pwd" to use when fetching. */
01462   CINIT(USERNAME, STRINGPOINT, 173),
01463   CINIT(PASSWORD, STRINGPOINT, 174),
01464 
01465     /* "name" and "pwd" to use with Proxy when fetching. */
01466   CINIT(PROXYUSERNAME, STRINGPOINT, 175),
01467   CINIT(PROXYPASSWORD, STRINGPOINT, 176),
01468 
01469   /* Comma separated list of hostnames defining no-proxy zones. These should
01470      match both hostnames directly, and hostnames within a domain. For
01471      example, local.com will match local.com and www.local.com, but NOT
01472      notlocal.com or www.notlocal.com. For compatibility with other
01473      implementations of this, .local.com will be considered to be the same as
01474      local.com. A single * is the only valid wildcard, and effectively
01475      disables the use of proxy. */
01476   CINIT(NOPROXY, STRINGPOINT, 177),
01477 
01478   /* block size for TFTP transfers */
01479   CINIT(TFTP_BLKSIZE, LONG, 178),
01480 
01481   /* Socks Service */
01482   CINIT(SOCKS5_GSSAPI_SERVICE, STRINGPOINT, 179), /* DEPRECATED, do not use! */
01483 
01484   /* Socks Service */
01485   CINIT(SOCKS5_GSSAPI_NEC, LONG, 180),
01486 
01487   /* set the bitmask for the protocols that are allowed to be used for the
01488      transfer, which thus helps the app which takes URLs from users or other
01489      external inputs and want to restrict what protocol(s) to deal
01490      with. Defaults to CURLPROTO_ALL. */
01491   CINIT(PROTOCOLS, LONG, 181),
01492 
01493   /* set the bitmask for the protocols that libcurl is allowed to follow to,
01494      as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs
01495      to be set in both bitmasks to be allowed to get redirected to. Defaults
01496      to all protocols except FILE and SCP. */
01497   CINIT(REDIR_PROTOCOLS, LONG, 182),
01498 
01499   /* set the SSH knownhost file name to use */
01500   CINIT(SSH_KNOWNHOSTS, STRINGPOINT, 183),
01501 
01502   /* set the SSH host key callback, must point to a curl_sshkeycallback
01503      function */
01504   CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184),
01505 
01506   /* set the SSH host key callback custom pointer */
01507   CINIT(SSH_KEYDATA, OBJECTPOINT, 185),
01508 
01509   /* set the SMTP mail originator */
01510   CINIT(MAIL_FROM, STRINGPOINT, 186),
01511 
01512   /* set the list of SMTP mail receiver(s) */
01513   CINIT(MAIL_RCPT, OBJECTPOINT, 187),
01514 
01515   /* FTP: send PRET before PASV */
01516   CINIT(FTP_USE_PRET, LONG, 188),
01517 
01518   /* RTSP request method (OPTIONS, SETUP, PLAY, etc...) */
01519   CINIT(RTSP_REQUEST, LONG, 189),
01520 
01521   /* The RTSP session identifier */
01522   CINIT(RTSP_SESSION_ID, STRINGPOINT, 190),
01523 
01524   /* The RTSP stream URI */
01525   CINIT(RTSP_STREAM_URI, STRINGPOINT, 191),
01526 
01527   /* The Transport: header to use in RTSP requests */
01528   CINIT(RTSP_TRANSPORT, STRINGPOINT, 192),
01529 
01530   /* Manually initialize the client RTSP CSeq for this handle */
01531   CINIT(RTSP_CLIENT_CSEQ, LONG, 193),
01532 
01533   /* Manually initialize the server RTSP CSeq for this handle */
01534   CINIT(RTSP_SERVER_CSEQ, LONG, 194),
01535 
01536   /* The stream to pass to INTERLEAVEFUNCTION. */
01537   CINIT(INTERLEAVEDATA, OBJECTPOINT, 195),
01538 
01539   /* Let the application define a custom write method for RTP data */
01540   CINIT(INTERLEAVEFUNCTION, FUNCTIONPOINT, 196),
01541 
01542   /* Turn on wildcard matching */
01543   CINIT(WILDCARDMATCH, LONG, 197),
01544 
01545   /* Directory matching callback called before downloading of an
01546      individual file (chunk) started */
01547   CINIT(CHUNK_BGN_FUNCTION, FUNCTIONPOINT, 198),
01548 
01549   /* Directory matching callback called after the file (chunk)
01550      was downloaded, or skipped */
01551   CINIT(CHUNK_END_FUNCTION, FUNCTIONPOINT, 199),
01552 
01553   /* Change match (fnmatch-like) callback for wildcard matching */
01554   CINIT(FNMATCH_FUNCTION, FUNCTIONPOINT, 200),
01555 
01556   /* Let the application define custom chunk data pointer */
01557   CINIT(CHUNK_DATA, OBJECTPOINT, 201),
01558 
01559   /* FNMATCH_FUNCTION user pointer */
01560   CINIT(FNMATCH_DATA, OBJECTPOINT, 202),
01561 
01562   /* send linked-list of name:port:address sets */
01563   CINIT(RESOLVE, OBJECTPOINT, 203),
01564 
01565   /* Set a username for authenticated TLS */
01566   CINIT(TLSAUTH_USERNAME, STRINGPOINT, 204),
01567 
01568   /* Set a password for authenticated TLS */
01569   CINIT(TLSAUTH_PASSWORD, STRINGPOINT, 205),
01570 
01571   /* Set authentication type for authenticated TLS */
01572   CINIT(TLSAUTH_TYPE, STRINGPOINT, 206),
01573 
01574   /* Set to 1 to enable the "TE:" header in HTTP requests to ask for
01575      compressed transfer-encoded responses. Set to 0 to disable the use of TE:
01576      in outgoing requests. The current default is 0, but it might change in a
01577      future libcurl release.
01578 
01579      libcurl will ask for the compressed methods it knows of, and if that
01580      isn't any, it will not ask for transfer-encoding at all even if this
01581      option is set to 1.
01582 
01583   */
01584   CINIT(TRANSFER_ENCODING, LONG, 207),
01585 
01586   /* Callback function for closing socket (instead of close(2)). The callback
01587      should have type curl_closesocket_callback */
01588   CINIT(CLOSESOCKETFUNCTION, FUNCTIONPOINT, 208),
01589   CINIT(CLOSESOCKETDATA, OBJECTPOINT, 209),
01590 
01591   /* allow GSSAPI credential delegation */
01592   CINIT(GSSAPI_DELEGATION, LONG, 210),
01593 
01594   /* Set the name servers to use for DNS resolution */
01595   CINIT(DNS_SERVERS, STRINGPOINT, 211),
01596 
01597   /* Time-out accept operations (currently for FTP only) after this amount
01598      of miliseconds. */
01599   CINIT(ACCEPTTIMEOUT_MS, LONG, 212),
01600 
01601   /* Set TCP keepalive */
01602   CINIT(TCP_KEEPALIVE, LONG, 213),
01603 
01604   /* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */
01605   CINIT(TCP_KEEPIDLE, LONG, 214),
01606   CINIT(TCP_KEEPINTVL, LONG, 215),
01607 
01608   /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */
01609   CINIT(SSL_OPTIONS, LONG, 216),
01610 
01611   /* Set the SMTP auth originator */
01612   CINIT(MAIL_AUTH, STRINGPOINT, 217),
01613 
01614   /* Enable/disable SASL initial response */
01615   CINIT(SASL_IR, LONG, 218),
01616 
01617   /* Function that will be called instead of the internal progress display
01618    * function. This function should be defined as the curl_xferinfo_callback
01619    * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */
01620   CINIT(XFERINFOFUNCTION, FUNCTIONPOINT, 219),
01621 
01622   /* The XOAUTH2 bearer token */
01623   CINIT(XOAUTH2_BEARER, STRINGPOINT, 220),
01624 
01625   /* Set the interface string to use as outgoing network
01626    * interface for DNS requests.
01627    * Only supported by the c-ares DNS backend */
01628   CINIT(DNS_INTERFACE, STRINGPOINT, 221),
01629 
01630   /* Set the local IPv4 address to use for outgoing DNS requests.
01631    * Only supported by the c-ares DNS backend */
01632   CINIT(DNS_LOCAL_IP4, STRINGPOINT, 222),
01633 
01634   /* Set the local IPv4 address to use for outgoing DNS requests.
01635    * Only supported by the c-ares DNS backend */
01636   CINIT(DNS_LOCAL_IP6, STRINGPOINT, 223),
01637 
01638   /* Set authentication options directly */
01639   CINIT(LOGIN_OPTIONS, STRINGPOINT, 224),
01640 
01641   /* Enable/disable TLS NPN extension (http2 over ssl might fail without) */
01642   CINIT(SSL_ENABLE_NPN, LONG, 225),
01643 
01644   /* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */
01645   CINIT(SSL_ENABLE_ALPN, LONG, 226),
01646 
01647   /* Time to wait for a response to a HTTP request containing an
01648    * Expect: 100-continue header before sending the data anyway. */
01649   CINIT(EXPECT_100_TIMEOUT_MS, LONG, 227),
01650 
01651   /* This points to a linked list of headers used for proxy requests only,
01652      struct curl_slist kind */
01653   CINIT(PROXYHEADER, OBJECTPOINT, 228),
01654 
01655   /* Pass in a bitmask of "header options" */
01656   CINIT(HEADEROPT, LONG, 229),
01657 
01658   /* The public key in DER form used to validate the peer public key
01659      this option is used only if SSL_VERIFYPEER is true */
01660   CINIT(PINNEDPUBLICKEY, STRINGPOINT, 230),
01661 
01662   /* Path to Unix domain socket */
01663   CINIT(UNIX_SOCKET_PATH, STRINGPOINT, 231),
01664 
01665   /* Set if we should verify the certificate status. */
01666   CINIT(SSL_VERIFYSTATUS, LONG, 232),
01667 
01668   /* Set if we should enable TLS false start. */
01669   CINIT(SSL_FALSESTART, LONG, 233),
01670 
01671   /* Do not squash dot-dot sequences */
01672   CINIT(PATH_AS_IS, LONG, 234),
01673 
01674   /* Proxy Service Name */
01675   CINIT(PROXY_SERVICE_NAME, STRINGPOINT, 235),
01676 
01677   /* Service Name */
01678   CINIT(SERVICE_NAME, STRINGPOINT, 236),
01679 
01680   /* Wait/don't wait for pipe/mutex to clarify */
01681   CINIT(PIPEWAIT, LONG, 237),
01682 
01683   /* Set the protocol used when curl is given a URL without a protocol */
01684   CINIT(DEFAULT_PROTOCOL, STRINGPOINT, 238),
01685 
01686   /* Set stream weight, 1 - 256 (default is 16) */
01687   CINIT(STREAM_WEIGHT, LONG, 239),
01688 
01689   /* Set stream dependency on another CURL handle */
01690   CINIT(STREAM_DEPENDS, OBJECTPOINT, 240),
01691 
01692   /* Set E-xclusive stream dependency on another CURL handle */
01693   CINIT(STREAM_DEPENDS_E, OBJECTPOINT, 241),
01694 
01695   /* Do not send any tftp option requests to the server */
01696   CINIT(TFTP_NO_OPTIONS, LONG, 242),
01697 
01698   /* Linked-list of host:port:connect-to-host:connect-to-port,
01699      overrides the URL's host:port (only for the network layer) */
01700   CINIT(CONNECT_TO, OBJECTPOINT, 243),
01701 
01702   /* Set TCP Fast Open */
01703   CINIT(TCP_FASTOPEN, LONG, 244),
01704 
01705   /* Continue to send data if the server responds early with an
01706    * HTTP status code >= 300 */
01707   CINIT(KEEP_SENDING_ON_ERROR, LONG, 245),
01708 
01709   /* The CApath or CAfile used to validate the proxy certificate
01710      this option is used only if PROXY_SSL_VERIFYPEER is true */
01711   CINIT(PROXY_CAINFO, STRINGPOINT, 246),
01712 
01713   /* The CApath directory used to validate the proxy certificate
01714      this option is used only if PROXY_SSL_VERIFYPEER is true */
01715   CINIT(PROXY_CAPATH, STRINGPOINT, 247),
01716 
01717   /* Set if we should verify the proxy in ssl handshake,
01718      set 1 to verify. */
01719   CINIT(PROXY_SSL_VERIFYPEER, LONG, 248),
01720 
01721   /* Set if we should verify the Common name from the proxy certificate in ssl
01722    * handshake, set 1 to check existence, 2 to ensure that it matches
01723    * the provided hostname. */
01724   CINIT(PROXY_SSL_VERIFYHOST, LONG, 249),
01725 
01726   /* What version to specifically try to use for proxy.
01727      See CURL_SSLVERSION defines below. */
01728   CINIT(PROXY_SSLVERSION, LONG, 250),
01729 
01730   /* Set a username for authenticated TLS for proxy */
01731   CINIT(PROXY_TLSAUTH_USERNAME, STRINGPOINT, 251),
01732 
01733   /* Set a password for authenticated TLS for proxy */
01734   CINIT(PROXY_TLSAUTH_PASSWORD, STRINGPOINT, 252),
01735 
01736   /* Set authentication type for authenticated TLS for proxy */
01737   CINIT(PROXY_TLSAUTH_TYPE, STRINGPOINT, 253),
01738 
01739   /* name of the file keeping your private SSL-certificate for proxy */
01740   CINIT(PROXY_SSLCERT, STRINGPOINT, 254),
01741 
01742   /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") for
01743      proxy */
01744   CINIT(PROXY_SSLCERTTYPE, STRINGPOINT, 255),
01745 
01746   /* name of the file keeping your private SSL-key for proxy */
01747   CINIT(PROXY_SSLKEY, STRINGPOINT, 256),
01748 
01749   /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") for
01750      proxy */
01751   CINIT(PROXY_SSLKEYTYPE, STRINGPOINT, 257),
01752 
01753   /* password for the SSL private key for proxy */
01754   CINIT(PROXY_KEYPASSWD, STRINGPOINT, 258),
01755 
01756   /* Specify which SSL ciphers to use for proxy */
01757   CINIT(PROXY_SSL_CIPHER_LIST, STRINGPOINT, 259),
01758 
01759   /* CRL file for proxy */
01760   CINIT(PROXY_CRLFILE, STRINGPOINT, 260),
01761 
01762   /* Enable/disable specific SSL features with a bitmask for proxy, see
01763      CURLSSLOPT_* */
01764   CINIT(PROXY_SSL_OPTIONS, LONG, 261),
01765 
01766   /* Name of pre proxy to use. */
01767   CINIT(PRE_PROXY, STRINGPOINT, 262),
01768 
01769   /* The public key in DER form used to validate the proxy public key
01770      this option is used only if PROXY_SSL_VERIFYPEER is true */
01771   CINIT(PROXY_PINNEDPUBLICKEY, STRINGPOINT, 263),
01772 
01773   CURLOPT_LASTENTRY /* the last unused */
01774 } CURLoption;
01775 
01776 #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
01777                           the obsolete stuff removed! */
01778 
01779 /* Backwards compatibility with older names */
01780 /* These are scheduled to disappear by 2011 */
01781 
01782 /* This was added in version 7.19.1 */
01783 #define CURLOPT_POST301 CURLOPT_POSTREDIR
01784 
01785 /* These are scheduled to disappear by 2009 */
01786 
01787 /* The following were added in 7.17.0 */
01788 #define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD
01789 #define CURLOPT_FTPAPPEND CURLOPT_APPEND
01790 #define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY
01791 #define CURLOPT_FTP_SSL CURLOPT_USE_SSL
01792 
01793 /* The following were added earlier */
01794 
01795 #define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD
01796 #define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL
01797 
01798 #else
01799 /* This is set if CURL_NO_OLDIES is defined at compile-time */
01800 #undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */
01801 #endif
01802 
01803 
01804   /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host
01805      name resolves addresses using more than one IP protocol version, this
01806      option might be handy to force libcurl to use a specific IP version. */
01807 #define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP
01808                                      versions that your system allows */
01809 #define CURL_IPRESOLVE_V4       1 /* resolve to IPv4 addresses */
01810 #define CURL_IPRESOLVE_V6       2 /* resolve to IPv6 addresses */
01811 
01812   /* three convenient "aliases" that follow the name scheme better */
01813 #define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER
01814 
01815   /* These enums are for use with the CURLOPT_HTTP_VERSION option. */
01816 enum {
01817   CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd
01818                              like the library to choose the best possible
01819                              for us! */
01820   CURL_HTTP_VERSION_1_0,  /* please use HTTP 1.0 in the request */
01821   CURL_HTTP_VERSION_1_1,  /* please use HTTP 1.1 in the request */
01822   CURL_HTTP_VERSION_2_0,  /* please use HTTP 2 in the request */
01823   CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */
01824   CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE,  /* please use HTTP 2 without HTTP/1.1
01825                                            Upgrade */
01826 
01827   CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */
01828 };
01829 
01830 /* Convenience definition simple because the name of the version is HTTP/2 and
01831    not 2.0. The 2_0 version of the enum name was set while the version was
01832    still planned to be 2.0 and we stick to it for compatibility. */
01833 #define CURL_HTTP_VERSION_2 CURL_HTTP_VERSION_2_0
01834 
01835 /*
01836  * Public API enums for RTSP requests
01837  */
01838 enum {
01839     CURL_RTSPREQ_NONE, /* first in list */
01840     CURL_RTSPREQ_OPTIONS,
01841     CURL_RTSPREQ_DESCRIBE,
01842     CURL_RTSPREQ_ANNOUNCE,
01843     CURL_RTSPREQ_SETUP,
01844     CURL_RTSPREQ_PLAY,
01845     CURL_RTSPREQ_PAUSE,
01846     CURL_RTSPREQ_TEARDOWN,
01847     CURL_RTSPREQ_GET_PARAMETER,
01848     CURL_RTSPREQ_SET_PARAMETER,
01849     CURL_RTSPREQ_RECORD,
01850     CURL_RTSPREQ_RECEIVE,
01851     CURL_RTSPREQ_LAST /* last in list */
01852 };
01853 
01854   /* These enums are for use with the CURLOPT_NETRC option. */
01855 enum CURL_NETRC_OPTION {
01856   CURL_NETRC_IGNORED,     /* The .netrc will never be read.
01857                            * This is the default. */
01858   CURL_NETRC_OPTIONAL,    /* A user:password in the URL will be preferred
01859                            * to one in the .netrc. */
01860   CURL_NETRC_REQUIRED,    /* A user:password in the URL will be ignored.
01861                            * Unless one is set programmatically, the .netrc
01862                            * will be queried. */
01863   CURL_NETRC_LAST
01864 };
01865 
01866 enum {
01867   CURL_SSLVERSION_DEFAULT,
01868   CURL_SSLVERSION_TLSv1, /* TLS 1.x */
01869   CURL_SSLVERSION_SSLv2,
01870   CURL_SSLVERSION_SSLv3,
01871   CURL_SSLVERSION_TLSv1_0,
01872   CURL_SSLVERSION_TLSv1_1,
01873   CURL_SSLVERSION_TLSv1_2,
01874   CURL_SSLVERSION_TLSv1_3,
01875 
01876   CURL_SSLVERSION_LAST /* never use, keep last */
01877 };
01878 
01879 enum CURL_TLSAUTH {
01880   CURL_TLSAUTH_NONE,
01881   CURL_TLSAUTH_SRP,
01882   CURL_TLSAUTH_LAST /* never use, keep last */
01883 };
01884 
01885 /* symbols to use with CURLOPT_POSTREDIR.
01886    CURL_REDIR_POST_301, CURL_REDIR_POST_302 and CURL_REDIR_POST_303
01887    can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302
01888    | CURL_REDIR_POST_303 == CURL_REDIR_POST_ALL */
01889 
01890 #define CURL_REDIR_GET_ALL  0
01891 #define CURL_REDIR_POST_301 1
01892 #define CURL_REDIR_POST_302 2
01893 #define CURL_REDIR_POST_303 4
01894 #define CURL_REDIR_POST_ALL \
01895     (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303)
01896 
01897 typedef enum {
01898   CURL_TIMECOND_NONE,
01899 
01900   CURL_TIMECOND_IFMODSINCE,
01901   CURL_TIMECOND_IFUNMODSINCE,
01902   CURL_TIMECOND_LASTMOD,
01903 
01904   CURL_TIMECOND_LAST
01905 } curl_TimeCond;
01906 
01907 
01908 /* curl_strequal() and curl_strnequal() are subject for removal in a future
01909    libcurl, see lib/README.curlx for details
01910 
01911    !checksrc! disable SPACEBEFOREPAREN 2
01912 */
01913 CURL_EXTERN int (curl_strequal)(const char *s1, const char *s2);
01914 CURL_EXTERN int (curl_strnequal)(const char *s1, const char *s2, size_t n);
01915 
01916 /* name is uppercase CURLFORM_<name> */
01917 #ifdef CFINIT
01918 #undef CFINIT
01919 #endif
01920 
01921 #ifdef CURL_ISOCPP
01922 #define CFINIT(name) CURLFORM_ ## name
01923 #else
01924 /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
01925 #define CFINIT(name) CURLFORM_name
01926 #endif
01927 
01928 typedef enum {
01929   CFINIT(NOTHING),        /********* the first one is unused ************/
01930 
01931   /*  */
01932   CFINIT(COPYNAME),
01933   CFINIT(PTRNAME),
01934   CFINIT(NAMELENGTH),
01935   CFINIT(COPYCONTENTS),
01936   CFINIT(PTRCONTENTS),
01937   CFINIT(CONTENTSLENGTH),
01938   CFINIT(FILECONTENT),
01939   CFINIT(ARRAY),
01940   CFINIT(OBSOLETE),
01941   CFINIT(FILE),
01942 
01943   CFINIT(BUFFER),
01944   CFINIT(BUFFERPTR),
01945   CFINIT(BUFFERLENGTH),
01946 
01947   CFINIT(CONTENTTYPE),
01948   CFINIT(CONTENTHEADER),
01949   CFINIT(FILENAME),
01950   CFINIT(END),
01951   CFINIT(OBSOLETE2),
01952 
01953   CFINIT(STREAM),
01954   CFINIT(CONTENTLEN), /* added in 7.46.0, provide a curl_off_t length */
01955 
01956   CURLFORM_LASTENTRY /* the last unused */
01957 } CURLformoption;
01958 
01959 #undef CFINIT /* done */
01960 
01961 /* structure to be used as parameter for CURLFORM_ARRAY */
01962 struct curl_forms {
01963   CURLformoption option;
01964   const char     *value;
01965 };
01966 
01967 /* use this for multipart formpost building */
01968 /* Returns code for curl_formadd()
01969  *
01970  * Returns:
01971  * CURL_FORMADD_OK             on success
01972  * CURL_FORMADD_MEMORY         if the FormInfo allocation fails
01973  * CURL_FORMADD_OPTION_TWICE   if one option is given twice for one Form
01974  * CURL_FORMADD_NULL           if a null pointer was given for a char
01975  * CURL_FORMADD_MEMORY         if the allocation of a FormInfo struct failed
01976  * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used
01977  * CURL_FORMADD_INCOMPLETE     if the some FormInfo is not complete (or error)
01978  * CURL_FORMADD_MEMORY         if a curl_httppost struct cannot be allocated
01979  * CURL_FORMADD_MEMORY         if some allocation for string copying failed.
01980  * CURL_FORMADD_ILLEGAL_ARRAY  if an illegal option is used in an array
01981  *
01982  ***************************************************************************/
01983 typedef enum {
01984   CURL_FORMADD_OK, /* first, no error */
01985 
01986   CURL_FORMADD_MEMORY,
01987   CURL_FORMADD_OPTION_TWICE,
01988   CURL_FORMADD_NULL,
01989   CURL_FORMADD_UNKNOWN_OPTION,
01990   CURL_FORMADD_INCOMPLETE,
01991   CURL_FORMADD_ILLEGAL_ARRAY,
01992   CURL_FORMADD_DISABLED, /* libcurl was built with this disabled */
01993 
01994   CURL_FORMADD_LAST /* last */
01995 } CURLFORMcode;
01996 
01997 /*
01998  * NAME curl_formadd()
01999  *
02000  * DESCRIPTION
02001  *
02002  * Pretty advanced function for building multi-part formposts. Each invoke
02003  * adds one part that together construct a full post. Then use
02004  * CURLOPT_HTTPPOST to send it off to libcurl.
02005  */
02006 CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost,
02007                                       struct curl_httppost **last_post,
02008                                       ...);
02009 
02010 /*
02011  * callback function for curl_formget()
02012  * The void *arg pointer will be the one passed as second argument to
02013  *   curl_formget().
02014  * The character buffer passed to it must not be freed.
02015  * Should return the buffer length passed to it as the argument "len" on
02016  *   success.
02017  */
02018 typedef size_t (*curl_formget_callback)(void *arg, const char *buf,
02019                                         size_t len);
02020 
02021 /*
02022  * NAME curl_formget()
02023  *
02024  * DESCRIPTION
02025  *
02026  * Serialize a curl_httppost struct built with curl_formadd().
02027  * Accepts a void pointer as second argument which will be passed to
02028  * the curl_formget_callback function.
02029  * Returns 0 on success.
02030  */
02031 CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg,
02032                              curl_formget_callback append);
02033 /*
02034  * NAME curl_formfree()
02035  *
02036  * DESCRIPTION
02037  *
02038  * Free a multipart formpost previously built with curl_formadd().
02039  */
02040 CURL_EXTERN void curl_formfree(struct curl_httppost *form);
02041 
02042 /*
02043  * NAME curl_getenv()
02044  *
02045  * DESCRIPTION
02046  *
02047  * Returns a malloc()'ed string that MUST be curl_free()ed after usage is
02048  * complete. DEPRECATED - see lib/README.curlx
02049  */
02050 CURL_EXTERN char *curl_getenv(const char *variable);
02051 
02052 /*
02053  * NAME curl_version()
02054  *
02055  * DESCRIPTION
02056  *
02057  * Returns a static ascii string of the libcurl version.
02058  */
02059 CURL_EXTERN char *curl_version(void);
02060 
02061 /*
02062  * NAME curl_easy_escape()
02063  *
02064  * DESCRIPTION
02065  *
02066  * Escapes URL strings (converts all letters consider illegal in URLs to their
02067  * %XX versions). This function returns a new allocated string or NULL if an
02068  * error occurred.
02069  */
02070 CURL_EXTERN char *curl_easy_escape(CURL *handle,
02071                                    const char *string,
02072                                    int length);
02073 
02074 /* the previous version: */
02075 CURL_EXTERN char *curl_escape(const char *string,
02076                               int length);
02077 
02078 
02079 /*
02080  * NAME curl_easy_unescape()
02081  *
02082  * DESCRIPTION
02083  *
02084  * Unescapes URL encoding in strings (converts all %XX codes to their 8bit
02085  * versions). This function returns a new allocated string or NULL if an error
02086  * occurred.
02087  * Conversion Note: On non-ASCII platforms the ASCII %XX codes are
02088  * converted into the host encoding.
02089  */
02090 CURL_EXTERN char *curl_easy_unescape(CURL *handle,
02091                                      const char *string,
02092                                      int length,
02093                                      int *outlength);
02094 
02095 /* the previous version */
02096 CURL_EXTERN char *curl_unescape(const char *string,
02097                                 int length);
02098 
02099 /*
02100  * NAME curl_free()
02101  *
02102  * DESCRIPTION
02103  *
02104  * Provided for de-allocation in the same translation unit that did the
02105  * allocation. Added in libcurl 7.10
02106  */
02107 CURL_EXTERN void curl_free(void *p);
02108 
02109 /*
02110  * NAME curl_global_init()
02111  *
02112  * DESCRIPTION
02113  *
02114  * curl_global_init() should be invoked exactly once for each application that
02115  * uses libcurl and before any call of other libcurl functions.
02116  *
02117  * This function is not thread-safe!
02118  */
02119 CURL_EXTERN CURLcode curl_global_init(long flags);
02120 
02121 /*
02122  * NAME curl_global_init_mem()
02123  *
02124  * DESCRIPTION
02125  *
02126  * curl_global_init() or curl_global_init_mem() should be invoked exactly once
02127  * for each application that uses libcurl.  This function can be used to
02128  * initialize libcurl and set user defined memory management callback
02129  * functions.  Users can implement memory management routines to check for
02130  * memory leaks, check for mis-use of the curl library etc.  User registered
02131  * callback routines with be invoked by this library instead of the system
02132  * memory management routines like malloc, free etc.
02133  */
02134 CURL_EXTERN CURLcode curl_global_init_mem(long flags,
02135                                           curl_malloc_callback m,
02136                                           curl_free_callback f,
02137                                           curl_realloc_callback r,
02138                                           curl_strdup_callback s,
02139                                           curl_calloc_callback c);
02140 
02141 /*
02142  * NAME curl_global_cleanup()
02143  *
02144  * DESCRIPTION
02145  *
02146  * curl_global_cleanup() should be invoked exactly once for each application
02147  * that uses libcurl
02148  */
02149 CURL_EXTERN void curl_global_cleanup(void);
02150 
02151 /* linked-list structure for the CURLOPT_QUOTE option (and other) */
02152 struct curl_slist {
02153   char *data;
02154   struct curl_slist *next;
02155 };
02156 
02157 /*
02158  * NAME curl_slist_append()
02159  *
02160  * DESCRIPTION
02161  *
02162  * Appends a string to a linked list. If no list exists, it will be created
02163  * first. Returns the new list, after appending.
02164  */
02165 CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *,
02166                                                  const char *);
02167 
02168 /*
02169  * NAME curl_slist_free_all()
02170  *
02171  * DESCRIPTION
02172  *
02173  * free a previously built curl_slist.
02174  */
02175 CURL_EXTERN void curl_slist_free_all(struct curl_slist *);
02176 
02177 /*
02178  * NAME curl_getdate()
02179  *
02180  * DESCRIPTION
02181  *
02182  * Returns the time, in seconds since 1 Jan 1970 of the time string given in
02183  * the first argument. The time argument in the second parameter is unused
02184  * and should be set to NULL.
02185  */
02186 CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused);
02187 
02188 /* info about the certificate chain, only for OpenSSL builds. Asked
02189    for with CURLOPT_CERTINFO / CURLINFO_CERTINFO */
02190 struct curl_certinfo {
02191   int num_of_certs;             /* number of certificates with information */
02192   struct curl_slist **certinfo; /* for each index in this array, there's a
02193                                    linked list with textual information in the
02194                                    format "name: value" */
02195 };
02196 
02197 /* enum for the different supported SSL backends */
02198 typedef enum {
02199   CURLSSLBACKEND_NONE = 0,
02200   CURLSSLBACKEND_OPENSSL = 1,
02201   CURLSSLBACKEND_GNUTLS = 2,
02202   CURLSSLBACKEND_NSS = 3,
02203   CURLSSLBACKEND_OBSOLETE4 = 4,  /* Was QSOSSL. */
02204   CURLSSLBACKEND_GSKIT = 5,
02205   CURLSSLBACKEND_POLARSSL = 6,
02206   CURLSSLBACKEND_CYASSL = 7,
02207   CURLSSLBACKEND_SCHANNEL = 8,
02208   CURLSSLBACKEND_DARWINSSL = 9,
02209   CURLSSLBACKEND_AXTLS = 10,
02210   CURLSSLBACKEND_MBEDTLS = 11
02211 } curl_sslbackend;
02212 
02213 /* aliases for library clones and renames */
02214 #define CURLSSLBACKEND_LIBRESSL 1
02215 #define CURLSSLBACKEND_BORINGSSL 1
02216 #define CURLSSLBACKEND_WOLFSSL 6
02217 
02218 /* Information about the SSL library used and the respective internal SSL
02219    handle, which can be used to obtain further information regarding the
02220    connection. Asked for with CURLINFO_TLS_SSL_PTR or CURLINFO_TLS_SESSION. */
02221 struct curl_tlssessioninfo {
02222   curl_sslbackend backend;
02223   void *internals;
02224 };
02225 
02226 #define CURLINFO_STRING   0x100000
02227 #define CURLINFO_LONG     0x200000
02228 #define CURLINFO_DOUBLE   0x300000
02229 #define CURLINFO_SLIST    0x400000
02230 #define CURLINFO_SOCKET   0x500000
02231 #define CURLINFO_MASK     0x0fffff
02232 #define CURLINFO_TYPEMASK 0xf00000
02233 
02234 typedef enum {
02235   CURLINFO_NONE, /* first, never use this */
02236   CURLINFO_EFFECTIVE_URL    = CURLINFO_STRING + 1,
02237   CURLINFO_RESPONSE_CODE    = CURLINFO_LONG   + 2,
02238   CURLINFO_TOTAL_TIME       = CURLINFO_DOUBLE + 3,
02239   CURLINFO_NAMELOOKUP_TIME  = CURLINFO_DOUBLE + 4,
02240   CURLINFO_CONNECT_TIME     = CURLINFO_DOUBLE + 5,
02241   CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6,
02242   CURLINFO_SIZE_UPLOAD      = CURLINFO_DOUBLE + 7,
02243   CURLINFO_SIZE_DOWNLOAD    = CURLINFO_DOUBLE + 8,
02244   CURLINFO_SPEED_DOWNLOAD   = CURLINFO_DOUBLE + 9,
02245   CURLINFO_SPEED_UPLOAD     = CURLINFO_DOUBLE + 10,
02246   CURLINFO_HEADER_SIZE      = CURLINFO_LONG   + 11,
02247   CURLINFO_REQUEST_SIZE     = CURLINFO_LONG   + 12,
02248   CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG   + 13,
02249   CURLINFO_FILETIME         = CURLINFO_LONG   + 14,
02250   CURLINFO_CONTENT_LENGTH_DOWNLOAD   = CURLINFO_DOUBLE + 15,
02251   CURLINFO_CONTENT_LENGTH_UPLOAD     = CURLINFO_DOUBLE + 16,
02252   CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17,
02253   CURLINFO_CONTENT_TYPE     = CURLINFO_STRING + 18,
02254   CURLINFO_REDIRECT_TIME    = CURLINFO_DOUBLE + 19,
02255   CURLINFO_REDIRECT_COUNT   = CURLINFO_LONG   + 20,
02256   CURLINFO_PRIVATE          = CURLINFO_STRING + 21,
02257   CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG   + 22,
02258   CURLINFO_HTTPAUTH_AVAIL   = CURLINFO_LONG   + 23,
02259   CURLINFO_PROXYAUTH_AVAIL  = CURLINFO_LONG   + 24,
02260   CURLINFO_OS_ERRNO         = CURLINFO_LONG   + 25,
02261   CURLINFO_NUM_CONNECTS     = CURLINFO_LONG   + 26,
02262   CURLINFO_SSL_ENGINES      = CURLINFO_SLIST  + 27,
02263   CURLINFO_COOKIELIST       = CURLINFO_SLIST  + 28,
02264   CURLINFO_LASTSOCKET       = CURLINFO_LONG   + 29,
02265   CURLINFO_FTP_ENTRY_PATH   = CURLINFO_STRING + 30,
02266   CURLINFO_REDIRECT_URL     = CURLINFO_STRING + 31,
02267   CURLINFO_PRIMARY_IP       = CURLINFO_STRING + 32,
02268   CURLINFO_APPCONNECT_TIME  = CURLINFO_DOUBLE + 33,
02269   CURLINFO_CERTINFO         = CURLINFO_SLIST  + 34,
02270   CURLINFO_CONDITION_UNMET  = CURLINFO_LONG   + 35,
02271   CURLINFO_RTSP_SESSION_ID  = CURLINFO_STRING + 36,
02272   CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG   + 37,
02273   CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG   + 38,
02274   CURLINFO_RTSP_CSEQ_RECV   = CURLINFO_LONG   + 39,
02275   CURLINFO_PRIMARY_PORT     = CURLINFO_LONG   + 40,
02276   CURLINFO_LOCAL_IP         = CURLINFO_STRING + 41,
02277   CURLINFO_LOCAL_PORT       = CURLINFO_LONG   + 42,
02278   CURLINFO_TLS_SESSION      = CURLINFO_SLIST  + 43,
02279   CURLINFO_ACTIVESOCKET     = CURLINFO_SOCKET + 44,
02280   CURLINFO_TLS_SSL_PTR      = CURLINFO_SLIST  + 45,
02281   CURLINFO_HTTP_VERSION     = CURLINFO_LONG   + 46,
02282   CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47,
02283   CURLINFO_PROTOCOL         = CURLINFO_LONG   + 48,
02284   CURLINFO_SCHEME           = CURLINFO_STRING + 49,
02285   /* Fill in new entries below here! */
02286 
02287   CURLINFO_LASTONE          = 49
02288 } CURLINFO;
02289 
02290 /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
02291    CURLINFO_HTTP_CODE */
02292 #define CURLINFO_HTTP_CODE CURLINFO_RESPONSE_CODE
02293 
02294 typedef enum {
02295   CURLCLOSEPOLICY_NONE, /* first, never use this */
02296 
02297   CURLCLOSEPOLICY_OLDEST,
02298   CURLCLOSEPOLICY_LEAST_RECENTLY_USED,
02299   CURLCLOSEPOLICY_LEAST_TRAFFIC,
02300   CURLCLOSEPOLICY_SLOWEST,
02301   CURLCLOSEPOLICY_CALLBACK,
02302 
02303   CURLCLOSEPOLICY_LAST /* last, never use this */
02304 } curl_closepolicy;
02305 
02306 #define CURL_GLOBAL_SSL (1<<0)
02307 #define CURL_GLOBAL_WIN32 (1<<1)
02308 #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32)
02309 #define CURL_GLOBAL_NOTHING 0
02310 #define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
02311 #define CURL_GLOBAL_ACK_EINTR (1<<2)
02312 
02313 
02314 /*****************************************************************************
02315  * Setup defines, protos etc for the sharing stuff.
02316  */
02317 
02318 /* Different data locks for a single share */
02319 typedef enum {
02320   CURL_LOCK_DATA_NONE = 0,
02321   /*  CURL_LOCK_DATA_SHARE is used internally to say that
02322    *  the locking is just made to change the internal state of the share
02323    *  itself.
02324    */
02325   CURL_LOCK_DATA_SHARE,
02326   CURL_LOCK_DATA_COOKIE,
02327   CURL_LOCK_DATA_DNS,
02328   CURL_LOCK_DATA_SSL_SESSION,
02329   CURL_LOCK_DATA_CONNECT,
02330   CURL_LOCK_DATA_LAST
02331 } curl_lock_data;
02332 
02333 /* Different lock access types */
02334 typedef enum {
02335   CURL_LOCK_ACCESS_NONE = 0,   /* unspecified action */
02336   CURL_LOCK_ACCESS_SHARED = 1, /* for read perhaps */
02337   CURL_LOCK_ACCESS_SINGLE = 2, /* for write perhaps */
02338   CURL_LOCK_ACCESS_LAST        /* never use */
02339 } curl_lock_access;
02340 
02341 typedef void (*curl_lock_function)(CURL *handle,
02342                                    curl_lock_data data,
02343                                    curl_lock_access locktype,
02344                                    void *userptr);
02345 typedef void (*curl_unlock_function)(CURL *handle,
02346                                      curl_lock_data data,
02347                                      void *userptr);
02348 
02349 
02350 typedef enum {
02351   CURLSHE_OK,  /* all is fine */
02352   CURLSHE_BAD_OPTION, /* 1 */
02353   CURLSHE_IN_USE,     /* 2 */
02354   CURLSHE_INVALID,    /* 3 */
02355   CURLSHE_NOMEM,      /* 4 out of memory */
02356   CURLSHE_NOT_BUILT_IN, /* 5 feature not present in lib */
02357   CURLSHE_LAST        /* never use */
02358 } CURLSHcode;
02359 
02360 typedef enum {
02361   CURLSHOPT_NONE,  /* don't use */
02362   CURLSHOPT_SHARE,   /* specify a data type to share */
02363   CURLSHOPT_UNSHARE, /* specify which data type to stop sharing */
02364   CURLSHOPT_LOCKFUNC,   /* pass in a 'curl_lock_function' pointer */
02365   CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */
02366   CURLSHOPT_USERDATA,   /* pass in a user data pointer used in the lock/unlock
02367                            callback functions */
02368   CURLSHOPT_LAST  /* never use */
02369 } CURLSHoption;
02370 
02371 CURL_EXTERN CURLSH *curl_share_init(void);
02372 CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...);
02373 CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *);
02374 
02375 /****************************************************************************
02376  * Structures for querying information about the curl library at runtime.
02377  */
02378 
02379 typedef enum {
02380   CURLVERSION_FIRST,
02381   CURLVERSION_SECOND,
02382   CURLVERSION_THIRD,
02383   CURLVERSION_FOURTH,
02384   CURLVERSION_LAST /* never actually use this */
02385 } CURLversion;
02386 
02387 /* The 'CURLVERSION_NOW' is the symbolic name meant to be used by
02388    basically all programs ever that want to get version information. It is
02389    meant to be a built-in version number for what kind of struct the caller
02390    expects. If the struct ever changes, we redefine the NOW to another enum
02391    from above. */
02392 #define CURLVERSION_NOW CURLVERSION_FOURTH
02393 
02394 typedef struct {
02395   CURLversion age;          /* age of the returned struct */
02396   const char *version;      /* LIBCURL_VERSION */
02397   unsigned int version_num; /* LIBCURL_VERSION_NUM */
02398   const char *host;         /* OS/host/cpu/machine when configured */
02399   int features;             /* bitmask, see defines below */
02400   const char *ssl_version;  /* human readable string */
02401   long ssl_version_num;     /* not used anymore, always 0 */
02402   const char *libz_version; /* human readable string */
02403   /* protocols is terminated by an entry with a NULL protoname */
02404   const char * const *protocols;
02405 
02406   /* The fields below this were added in CURLVERSION_SECOND */
02407   const char *ares;
02408   int ares_num;
02409 
02410   /* This field was added in CURLVERSION_THIRD */
02411   const char *libidn;
02412 
02413   /* These field were added in CURLVERSION_FOURTH */
02414 
02415   /* Same as '_libiconv_version' if built with HAVE_ICONV */
02416   int iconv_ver_num;
02417 
02418   const char *libssh_version; /* human readable string */
02419 
02420 } curl_version_info_data;
02421 
02422 #define CURL_VERSION_IPV6         (1<<0)  /* IPv6-enabled */
02423 #define CURL_VERSION_KERBEROS4    (1<<1)  /* Kerberos V4 auth is supported
02424                                              (deprecated) */
02425 #define CURL_VERSION_SSL          (1<<2)  /* SSL options are present */
02426 #define CURL_VERSION_LIBZ         (1<<3)  /* libz features are present */
02427 #define CURL_VERSION_NTLM         (1<<4)  /* NTLM auth is supported */
02428 #define CURL_VERSION_GSSNEGOTIATE (1<<5)  /* Negotiate auth is supported
02429                                              (deprecated) */
02430 #define CURL_VERSION_DEBUG        (1<<6)  /* Built with debug capabilities */
02431 #define CURL_VERSION_ASYNCHDNS    (1<<7)  /* Asynchronous DNS resolves */
02432 #define CURL_VERSION_SPNEGO       (1<<8)  /* SPNEGO auth is supported */
02433 #define CURL_VERSION_LARGEFILE    (1<<9)  /* Supports files larger than 2GB */
02434 #define CURL_VERSION_IDN          (1<<10) /* Internationized Domain Names are
02435                                              supported */
02436 #define CURL_VERSION_SSPI         (1<<11) /* Built against Windows SSPI */
02437 #define CURL_VERSION_CONV         (1<<12) /* Character conversions supported */
02438 #define CURL_VERSION_CURLDEBUG    (1<<13) /* Debug memory tracking supported */
02439 #define CURL_VERSION_TLSAUTH_SRP  (1<<14) /* TLS-SRP auth is supported */
02440 #define CURL_VERSION_NTLM_WB      (1<<15) /* NTLM delegation to winbind helper
02441                                              is suported */
02442 #define CURL_VERSION_HTTP2        (1<<16) /* HTTP2 support built-in */
02443 #define CURL_VERSION_GSSAPI       (1<<17) /* Built against a GSS-API library */
02444 #define CURL_VERSION_KERBEROS5    (1<<18) /* Kerberos V5 auth is supported */
02445 #define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */
02446 #define CURL_VERSION_PSL          (1<<20) /* Mozilla's Public Suffix List, used
02447                                              for cookie domain verification */
02448 #define CURL_VERSION_HTTPS_PROXY  (1<<21) /* HTTPS-proxy support built-in */
02449 
02450  /*
02451  * NAME curl_version_info()
02452  *
02453  * DESCRIPTION
02454  *
02455  * This function returns a pointer to a static copy of the version info
02456  * struct. See above.
02457  */
02458 CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion);
02459 
02460 /*
02461  * NAME curl_easy_strerror()
02462  *
02463  * DESCRIPTION
02464  *
02465  * The curl_easy_strerror function may be used to turn a CURLcode value
02466  * into the equivalent human readable error string.  This is useful
02467  * for printing meaningful error messages.
02468  */
02469 CURL_EXTERN const char *curl_easy_strerror(CURLcode);
02470 
02471 /*
02472  * NAME curl_share_strerror()
02473  *
02474  * DESCRIPTION
02475  *
02476  * The curl_share_strerror function may be used to turn a CURLSHcode value
02477  * into the equivalent human readable error string.  This is useful
02478  * for printing meaningful error messages.
02479  */
02480 CURL_EXTERN const char *curl_share_strerror(CURLSHcode);
02481 
02482 /*
02483  * NAME curl_easy_pause()
02484  *
02485  * DESCRIPTION
02486  *
02487  * The curl_easy_pause function pauses or unpauses transfers. Select the new
02488  * state by setting the bitmask, use the convenience defines below.
02489  *
02490  */
02491 CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
02492 
02493 #define CURLPAUSE_RECV      (1<<0)
02494 #define CURLPAUSE_RECV_CONT (0)
02495 
02496 #define CURLPAUSE_SEND      (1<<2)
02497 #define CURLPAUSE_SEND_CONT (0)
02498 
02499 #define CURLPAUSE_ALL       (CURLPAUSE_RECV|CURLPAUSE_SEND)
02500 #define CURLPAUSE_CONT      (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT)
02501 
02502 #ifdef  __cplusplus
02503 }
02504 #endif
02505 
02506 /* unfortunately, the easy.h and multi.h include files need options and info
02507   stuff before they can be included! */
02508 #include "easy.h" /* nothing in curl is fun without the easy stuff */
02509 #include "multi.h"
02510 
02511 /* the typechecker doesn't work in C++ (yet) */
02512 #if defined(__GNUC__) && defined(__GNUC_MINOR__) && \
02513     ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \
02514     !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK)
02515 #include "typecheck-gcc.h"
02516 #else
02517 #if defined(__STDC__) && (__STDC__ >= 1)
02518 /* This preprocessor magic that replaces a call with the exact same call is
02519    only done to make sure application authors pass exactly three arguments
02520    to these functions. */
02521 #define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param)
02522 #define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg)
02523 #define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)
02524 #define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param)
02525 #endif /* __STDC__ >= 1 */
02526 #endif /* gcc >= 4.3 && !__cplusplus */
02527 
02528 #endif /* __CURL_CURL_H */


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:02