Annotation of parser3/src/lib/curl/curl.h, revision 1.6

1.2       moko        1: #ifndef __CURL_CURL_H
                      2: #define __CURL_CURL_H
                      3: /***************************************************************************
                      4:  *                                  _   _ ____  _
                      5:  *  Project                     ___| | | |  _ \| |
                      6:  *                             / __| | | | |_) | |
                      7:  *                            | (__| |_| |  _ <| |___
                      8:  *                             \___|\___/|_| \_\_____|
                      9:  *
                     10:  * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
                     11:  *
                     12:  * This software is licensed as described in the file COPYING, which
                     13:  * you should have received as part of this distribution. The terms
                     14:  * are also available at http://curl.haxx.se/docs/copyright.html.
                     15:  *
                     16:  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
                     17:  * copies of the Software, and permit persons to whom the Software is
                     18:  * furnished to do so, under the terms of the COPYING file.
                     19:  *
                     20:  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
                     21:  * KIND, either express or implied.
                     22:  *
1.6     ! moko       23:  * $Id: curl.h,v 1.5 2017/11/26 21:24:07 moko Exp $
1.2       moko       24:  ***************************************************************************/
                     25: 
                     26: /*
                     27:  * If you have libcurl problems, all docs and details are found here:
                     28:  *   http://curl.haxx.se/libcurl/
                     29:  *
                     30:  * curl-library mailing list subscription and unsubscription web interface:
                     31:  *   http://cool.haxx.se/mailman/listinfo/curl-library/
                     32:  */
                     33: 
                     34: 
                     35: typedef struct CURL CURL;
                     36: 
                     37: typedef enum {
                     38:   CURLE_OK = 0,
                     39:   CURLE_UNSUPPORTED_PROTOCOL,    /* 1 */
                     40:   CURLE_FAILED_INIT,             /* 2 */
                     41:   CURLE_URL_MALFORMAT,           /* 3 */
                     42:   CURLE_OBSOLETE4,               /* 4 - NOT USED */
                     43:   CURLE_COULDNT_RESOLVE_PROXY,   /* 5 */
                     44:   CURLE_COULDNT_RESOLVE_HOST,    /* 6 */
                     45:   CURLE_COULDNT_CONNECT,         /* 7 */
                     46:   CURLE_FTP_WEIRD_SERVER_REPLY,  /* 8 */
                     47:   CURLE_REMOTE_ACCESS_DENIED,    /* 9 a service was denied by the server
                     48:                                     due to lack of access - when login fails
                     49:                                     this is not returned. */
                     50:   CURLE_OBSOLETE10,              /* 10 - NOT USED */
                     51:   CURLE_FTP_WEIRD_PASS_REPLY,    /* 11 */
                     52:   CURLE_OBSOLETE12,              /* 12 - NOT USED */
                     53:   CURLE_FTP_WEIRD_PASV_REPLY,    /* 13 */
                     54:   CURLE_FTP_WEIRD_227_FORMAT,    /* 14 */
                     55:   CURLE_FTP_CANT_GET_HOST,       /* 15 */
                     56:   CURLE_OBSOLETE16,              /* 16 - NOT USED */
                     57:   CURLE_FTP_COULDNT_SET_TYPE,    /* 17 */
                     58:   CURLE_PARTIAL_FILE,            /* 18 */
                     59:   CURLE_FTP_COULDNT_RETR_FILE,   /* 19 */
                     60:   CURLE_OBSOLETE20,              /* 20 - NOT USED */
                     61:   CURLE_QUOTE_ERROR,             /* 21 - quote command failure */
                     62:   CURLE_HTTP_RETURNED_ERROR,     /* 22 */
                     63:   CURLE_WRITE_ERROR,             /* 23 */
                     64:   CURLE_OBSOLETE24,              /* 24 - NOT USED */
                     65:   CURLE_UPLOAD_FAILED,           /* 25 - failed upload "command" */
                     66:   CURLE_READ_ERROR,              /* 26 - couldn't open/read from file */
                     67:   CURLE_OUT_OF_MEMORY,           /* 27 */
                     68:   /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error
                     69:            instead of a memory allocation error if CURL_DOES_CONVERSIONS
                     70:            is defined
                     71:   */
                     72:   CURLE_OPERATION_TIMEDOUT,      /* 28 - the timeout time was reached */
                     73:   CURLE_OBSOLETE29,              /* 29 - NOT USED */
                     74:   CURLE_FTP_PORT_FAILED,         /* 30 - FTP PORT operation failed */
                     75:   CURLE_FTP_COULDNT_USE_REST,    /* 31 - the REST command failed */
                     76:   CURLE_OBSOLETE32,              /* 32 - NOT USED */
                     77:   CURLE_RANGE_ERROR,             /* 33 - RANGE "command" didn't work */
                     78:   CURLE_HTTP_POST_ERROR,         /* 34 */
                     79:   CURLE_SSL_CONNECT_ERROR,       /* 35 - wrong when connecting with SSL */
                     80:   CURLE_BAD_DOWNLOAD_RESUME,     /* 36 - couldn't resume download */
                     81:   CURLE_FILE_COULDNT_READ_FILE,  /* 37 */
                     82:   CURLE_LDAP_CANNOT_BIND,        /* 38 */
                     83:   CURLE_LDAP_SEARCH_FAILED,      /* 39 */
                     84:   CURLE_OBSOLETE40,              /* 40 - NOT USED */
                     85:   CURLE_FUNCTION_NOT_FOUND,      /* 41 */
                     86:   CURLE_ABORTED_BY_CALLBACK,     /* 42 */
                     87:   CURLE_BAD_FUNCTION_ARGUMENT,   /* 43 */
                     88:   CURLE_OBSOLETE44,              /* 44 - NOT USED */
                     89:   CURLE_INTERFACE_FAILED,        /* 45 - CURLOPT_INTERFACE failed */
                     90:   CURLE_OBSOLETE46,              /* 46 - NOT USED */
                     91:   CURLE_TOO_MANY_REDIRECTS ,     /* 47 - catch endless re-direct loops */
                     92:   CURLE_UNKNOWN_TELNET_OPTION,   /* 48 - User specified an unknown option */
                     93:   CURLE_TELNET_OPTION_SYNTAX ,   /* 49 - Malformed telnet option */
                     94:   CURLE_OBSOLETE50,              /* 50 - NOT USED */
                     95:   CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint
                     96:                                      wasn't verified fine */
                     97:   CURLE_GOT_NOTHING,             /* 52 - when this is a specific error */
                     98:   CURLE_SSL_ENGINE_NOTFOUND,     /* 53 - SSL crypto engine not found */
                     99:   CURLE_SSL_ENGINE_SETFAILED,    /* 54 - can not set SSL crypto engine as
                    100:                                     default */
                    101:   CURLE_SEND_ERROR,              /* 55 - failed sending network data */
                    102:   CURLE_RECV_ERROR,              /* 56 - failure in receiving network data */
                    103:   CURLE_OBSOLETE57,              /* 57 - NOT IN USE */
                    104:   CURLE_SSL_CERTPROBLEM,         /* 58 - problem with the local certificate */
                    105:   CURLE_SSL_CIPHER,              /* 59 - couldn't use specified cipher */
                    106:   CURLE_SSL_CACERT,              /* 60 - problem with the CA cert (path?) */
                    107:   CURLE_BAD_CONTENT_ENCODING,    /* 61 - Unrecognized transfer encoding */
                    108:   CURLE_LDAP_INVALID_URL,        /* 62 - Invalid LDAP URL */
                    109:   CURLE_FILESIZE_EXCEEDED,       /* 63 - Maximum file size exceeded */
                    110:   CURLE_USE_SSL_FAILED,          /* 64 - Requested FTP SSL level failed */
                    111:   CURLE_SEND_FAIL_REWIND,        /* 65 - Sending the data requires a rewind
                    112:                                     that failed */
                    113:   CURLE_SSL_ENGINE_INITFAILED,   /* 66 - failed to initialise ENGINE */
                    114:   CURLE_LOGIN_DENIED,            /* 67 - user, password or similar was not
                    115:                                     accepted and we failed to login */
                    116:   CURLE_TFTP_NOTFOUND,           /* 68 - file not found on server */
                    117:   CURLE_TFTP_PERM,               /* 69 - permission problem on server */
                    118:   CURLE_REMOTE_DISK_FULL,        /* 70 - out of disk space on server */
                    119:   CURLE_TFTP_ILLEGAL,            /* 71 - Illegal TFTP operation */
                    120:   CURLE_TFTP_UNKNOWNID,          /* 72 - Unknown transfer ID */
                    121:   CURLE_REMOTE_FILE_EXISTS,      /* 73 - File already exists */
                    122:   CURLE_TFTP_NOSUCHUSER,         /* 74 - No such user */
                    123:   CURLE_CONV_FAILED,             /* 75 - conversion failed */
                    124:   CURLE_CONV_REQD,               /* 76 - caller must register conversion
                    125:                                     callbacks using curl_easy_setopt options
                    126:                                     CURLOPT_CONV_FROM_NETWORK_FUNCTION,
                    127:                                     CURLOPT_CONV_TO_NETWORK_FUNCTION, and
                    128:                                     CURLOPT_CONV_FROM_UTF8_FUNCTION */
                    129:   CURLE_SSL_CACERT_BADFILE,      /* 77 - could not load CACERT file, missing
                    130:                                     or wrong format */
                    131:   CURLE_REMOTE_FILE_NOT_FOUND,   /* 78 - remote file not found */
                    132:   CURLE_SSH,                     /* 79 - error from the SSH layer, somewhat
                    133:                                     generic so the error message will be of
                    134:                                     interest when this has happened */
                    135: 
                    136:   CURLE_SSL_SHUTDOWN_FAILED,     /* 80 - Failed to shut down the SSL
                    137:                                     connection */
                    138:   CURLE_AGAIN,                   /* 81 - socket is not ready for send/recv,
                    139:                                     wait till it's ready and try again (Added
                    140:                                     in 7.18.2) */
                    141:   CURLE_SSL_CRL_BADFILE,         /* 82 - could not load CRL file, missing or
                    142:                                     wrong format (Added in 7.19.0) */
                    143:   CURLE_SSL_ISSUER_ERROR,        /* 83 - Issuer check failed.  (Added in
                    144:                                     7.19.0) */
                    145:   CURL_LAST /* never use! */
                    146: } CURLcode;
                    147: 
1.6     ! moko      148: /* the minimum CURLOPT_ERRORBUFFER size, error messages are truncated to fit */
        !           149: #define CURL_ERROR_SIZE 256
        !           150: 
1.2       moko      151: 
                    152: /* long may be 32 or 64 bits, but we should never depend on anything else
                    153:    but 32 */
                    154: #define CURLOPTTYPE_LONG          0
                    155: #define CURLOPTTYPE_OBJECTPOINT   10000
                    156: #define CURLOPTTYPE_FUNCTIONPOINT 20000
                    157: #define CURLOPTTYPE_OFF_T         30000
                    158: 
                    159: /* name is uppercase CURLOPT_<name>,
                    160:    type is one of the defined CURLOPTTYPE_<type>
                    161:    number is unique identifier */
                    162: 
                    163: #define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number
                    164: 
                    165: /*
                    166:  * This macro-mania below setups the CURLOPT_[what] enum, to be used with
                    167:  * curl_easy_setopt(). The first argument in the CINIT() macro is the [what]
                    168:  * word.
                    169:  */
                    170: 
                    171: typedef enum {
                    172:   /* This is the FILE * or void * the regular output should be written to. */
                    173:   CINIT(FILE, OBJECTPOINT, 1),
                    174: 
                    175:   /* The full URL to get/put */
                    176:   CINIT(URL,  OBJECTPOINT, 2),
                    177: 
                    178:   /* Port number to connect to, if other than default. */
                    179:   CINIT(PORT, LONG, 3),
                    180: 
                    181:   /* Name of proxy to use. */
                    182:   CINIT(PROXY, OBJECTPOINT, 4),
                    183: 
                    184:   /* "name:password" to use when fetching. */
                    185:   CINIT(USERPWD, OBJECTPOINT, 5),
                    186: 
                    187:   /* "name:password" to use with proxy. */
                    188:   CINIT(PROXYUSERPWD, OBJECTPOINT, 6),
                    189: 
                    190:   /* Range to get, specified as an ASCII string. */
                    191:   CINIT(RANGE, OBJECTPOINT, 7),
                    192: 
                    193:   /* not used */
                    194: 
                    195:   /* Specified file stream to upload from (use as input): */
                    196:   CINIT(INFILE, OBJECTPOINT, 9),
                    197: 
                    198:   /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE
                    199:    * bytes big. If this is not used, error messages go to stderr instead: */
                    200:   CINIT(ERRORBUFFER, OBJECTPOINT, 10),
                    201: 
                    202:   /* Function that will be called to store the output (instead of fwrite). The
                    203:    * parameters will use fwrite() syntax, make sure to follow them. */
                    204:   CINIT(WRITEFUNCTION, FUNCTIONPOINT, 11),
                    205: 
                    206:   /* Function that will be called to read the input (instead of fread). The
                    207:    * parameters will use fread() syntax, make sure to follow them. */
                    208:   CINIT(READFUNCTION, FUNCTIONPOINT, 12),
                    209: 
                    210:   /* Time-out the read operation after this amount of seconds */
                    211:   CINIT(TIMEOUT, LONG, 13),
                    212: 
                    213:   /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about
                    214:    * how large the file being sent really is. That allows better error
                    215:    * checking and better verifies that the upload was successful. -1 means
                    216:    * unknown size.
                    217:    *
                    218:    * For large file support, there is also a _LARGE version of the key
                    219:    * which takes an off_t type, allowing platforms with larger off_t
                    220:    * sizes to handle larger files.  See below for INFILESIZE_LARGE.
                    221:    */
                    222:   CINIT(INFILESIZE, LONG, 14),
                    223: 
                    224:   /* POST static input fields. */
                    225:   CINIT(POSTFIELDS, OBJECTPOINT, 15),
                    226: 
                    227:   /* Set the referrer page (needed by some CGIs) */
                    228:   CINIT(REFERER, OBJECTPOINT, 16),
                    229: 
                    230:   /* Set the FTP PORT string (interface name, named or numerical IP address)
                    231:      Use i.e '-' to use default address. */
                    232:   CINIT(FTPPORT, OBJECTPOINT, 17),
                    233: 
                    234:   /* Set the User-Agent string (examined by some CGIs) */
                    235:   CINIT(USERAGENT, OBJECTPOINT, 18),
                    236: 
                    237:   /* If the download receives less than "low speed limit" bytes/second
                    238:    * during "low speed time" seconds, the operations is aborted.
                    239:    * You could i.e if you have a pretty high speed connection, abort if
                    240:    * it is less than 2000 bytes/sec during 20 seconds.
                    241:    */
                    242: 
                    243:   /* Set the "low speed limit" */
                    244:   CINIT(LOW_SPEED_LIMIT, LONG, 19),
                    245: 
                    246:   /* Set the "low speed time" */
                    247:   CINIT(LOW_SPEED_TIME, LONG, 20),
                    248: 
                    249:   /* Set the continuation offset.
                    250:    *
                    251:    * Note there is also a _LARGE version of this key which uses
                    252:    * off_t types, allowing for large file offsets on platforms which
                    253:    * use larger-than-32-bit off_t's.  Look below for RESUME_FROM_LARGE.
                    254:    */
                    255:   CINIT(RESUME_FROM, LONG, 21),
                    256: 
                    257:   /* Set cookie in request: */
                    258:   CINIT(COOKIE, OBJECTPOINT, 22),
                    259: 
                    260:   /* This points to a linked list of headers, struct curl_slist kind */
                    261:   CINIT(HTTPHEADER, OBJECTPOINT, 23),
                    262: 
                    263:   /* This points to a linked list of post entries, struct curl_httppost */
                    264:   CINIT(HTTPPOST, OBJECTPOINT, 24),
                    265: 
                    266:   /* name of the file keeping your private SSL-certificate */
                    267:   CINIT(SSLCERT, OBJECTPOINT, 25),
                    268: 
                    269:   /* password for the SSL or SSH private key */
                    270:   CINIT(KEYPASSWD, OBJECTPOINT, 26),
                    271: 
                    272:   /* send TYPE parameter? */
                    273:   CINIT(CRLF, LONG, 27),
                    274: 
                    275:   /* send linked-list of QUOTE commands */
                    276:   CINIT(QUOTE, OBJECTPOINT, 28),
                    277: 
                    278:   /* send FILE * or void * to store headers to, if you use a callback it
                    279:      is simply passed to the callback unmodified */
                    280:   CINIT(WRITEHEADER, OBJECTPOINT, 29),
                    281: 
                    282:   /* point to a file to read the initial cookies from, also enables
                    283:      "cookie awareness" */
                    284:   CINIT(COOKIEFILE, OBJECTPOINT, 31),
                    285: 
                    286:   /* What version to specifically try to use.
                    287:      See CURL_SSLVERSION defines below. */
                    288:   CINIT(SSLVERSION, LONG, 32),
                    289: 
                    290:   /* What kind of HTTP time condition to use, see defines */
                    291:   CINIT(TIMECONDITION, LONG, 33),
                    292: 
                    293:   /* Time to use with the above condition. Specified in number of seconds
                    294:      since 1 Jan 1970 */
                    295:   CINIT(TIMEVALUE, LONG, 34),
                    296: 
                    297:   /* 35 = OBSOLETE */
                    298: 
                    299:   /* Custom request, for customizing the get command like
                    300:      HTTP: DELETE, TRACE and others
                    301:      FTP: to use a different list command
                    302:      */
                    303:   CINIT(CUSTOMREQUEST, OBJECTPOINT, 36),
                    304: 
                    305:   /* HTTP request, for odd commands like DELETE, TRACE and others */
                    306:   CINIT(STDERR, OBJECTPOINT, 37),
                    307: 
                    308:   /* 38 is not used */
                    309: 
                    310:   /* send linked-list of post-transfer QUOTE commands */
                    311:   CINIT(POSTQUOTE, OBJECTPOINT, 39),
                    312: 
                    313:   /* Pass a pointer to string of the output using full variable-replacement
                    314:      as described elsewhere. */
                    315:   CINIT(WRITEINFO, OBJECTPOINT, 40),
                    316: 
                    317:   CINIT(VERBOSE, LONG, 41),      /* talk a lot */
                    318:   CINIT(HEADER, LONG, 42),       /* throw the header out too */
                    319:   CINIT(NOPROGRESS, LONG, 43),   /* shut off the progress meter */
                    320:   CINIT(NOBODY, LONG, 44),       /* use HEAD to get http document */
                    321:   CINIT(FAILONERROR, LONG, 45),  /* no output on http error codes >= 300 */
                    322:   CINIT(UPLOAD, LONG, 46),       /* this is an upload */
                    323:   CINIT(POST, LONG, 47),         /* HTTP POST method */
                    324:   CINIT(DIRLISTONLY, LONG, 48),  /* return bare names when listing directories */
                    325: 
                    326:   CINIT(APPEND, LONG, 50),       /* Append instead of overwrite on upload! */
                    327: 
                    328:   /* Specify whether to read the user+password from the .netrc or the URL.
                    329:    * This must be one of the CURL_NETRC_* enums below. */
                    330:   CINIT(NETRC, LONG, 51),
                    331: 
                    332:   CINIT(FOLLOWLOCATION, LONG, 52),  /* use Location: Luke! */
                    333: 
                    334:   CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */
                    335:   CINIT(PUT, LONG, 54),          /* HTTP PUT */
                    336: 
                    337:   /* 55 = OBSOLETE */
                    338: 
                    339:   /* Function that will be called instead of the internal progress display
                    340:    * function. This function should be defined as the curl_progress_callback
                    341:    * prototype defines. */
                    342:   CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56),
                    343: 
                    344:   /* Data passed to the progress callback */
                    345:   CINIT(PROGRESSDATA, OBJECTPOINT, 57),
                    346: 
                    347:   /* We want the referrer field set automatically when following locations */
                    348:   CINIT(AUTOREFERER, LONG, 58),
                    349: 
                    350:   /* Port of the proxy, can be set in the proxy string as well with:
                    351:      "[host]:[port]" */
                    352:   CINIT(PROXYPORT, LONG, 59),
                    353: 
                    354:   /* size of the POST input data, if strlen() is not good to use */
                    355:   CINIT(POSTFIELDSIZE, LONG, 60),
                    356: 
                    357:   /* tunnel non-http operations through a HTTP proxy */
                    358:   CINIT(HTTPPROXYTUNNEL, LONG, 61),
                    359: 
                    360:   /* Set the interface string to use as outgoing network interface */
                    361:   CINIT(INTERFACE, OBJECTPOINT, 62),
                    362: 
                    363:   /* Set the krb4/5 security level, this also enables krb4/5 awareness.  This
                    364:    * is a string, 'clear', 'safe', 'confidential' or 'private'.  If the string
                    365:    * is set but doesn't match one of these, 'private' will be used.  */
                    366:   CINIT(KRBLEVEL, OBJECTPOINT, 63),
                    367: 
                    368:   /* Set if we should verify the peer in ssl handshake, set 1 to verify. */
                    369:   CINIT(SSL_VERIFYPEER, LONG, 64),
                    370: 
                    371:   /* The CApath or CAfile used to validate the peer certificate
                    372:      this option is used only if SSL_VERIFYPEER is true */
                    373:   CINIT(CAINFO, OBJECTPOINT, 65),
                    374: 
                    375:   /* 66 = OBSOLETE */
                    376:   /* 67 = OBSOLETE */
                    377: 
                    378:   /* Maximum number of http redirects to follow */
                    379:   CINIT(MAXREDIRS, LONG, 68),
                    380: 
                    381:   /* Pass a long set to 1 to get the date of the requested document (if
                    382:      possible)! Pass a zero to shut it off. */
                    383:   CINIT(FILETIME, LONG, 69),
                    384: 
                    385:   /* This points to a linked list of telnet options */
                    386:   CINIT(TELNETOPTIONS, OBJECTPOINT, 70),
                    387: 
                    388:   /* Max amount of cached alive connections */
                    389:   CINIT(MAXCONNECTS, LONG, 71),
                    390: 
                    391:   /* What policy to use when closing connections when the cache is filled
                    392:      up */
                    393:   CINIT(CLOSEPOLICY, LONG, 72),
                    394: 
                    395:   /* 73 = OBSOLETE */
                    396: 
                    397:   /* Set to explicitly use a new connection for the upcoming transfer.
                    398:      Do not use this unless you're absolutely sure of this, as it makes the
                    399:      operation slower and is less friendly for the network. */
                    400:   CINIT(FRESH_CONNECT, LONG, 74),
                    401: 
                    402:   /* Set to explicitly forbid the upcoming transfer's connection to be re-used
                    403:      when done. Do not use this unless you're absolutely sure of this, as it
                    404:      makes the operation slower and is less friendly for the network. */
                    405:   CINIT(FORBID_REUSE, LONG, 75),
                    406: 
                    407:   /* Set to a file name that contains random data for libcurl to use to
                    408:      seed the random engine when doing SSL connects. */
                    409:   CINIT(RANDOM_FILE, OBJECTPOINT, 76),
                    410: 
                    411:   /* Set to the Entropy Gathering Daemon socket pathname */
                    412:   CINIT(EGDSOCKET, OBJECTPOINT, 77),
                    413: 
                    414:   /* Time-out connect operations after this amount of seconds, if connects
                    415:      are OK within this time, then fine... This only aborts the connect
                    416:      phase. [Only works on unix-style/SIGALRM operating systems] */
                    417:   CINIT(CONNECTTIMEOUT, LONG, 78),
                    418: 
                    419:   /* Function that will be called to store headers (instead of fwrite). The
                    420:    * parameters will use fwrite() syntax, make sure to follow them. */
                    421:   CINIT(HEADERFUNCTION, FUNCTIONPOINT, 79),
                    422: 
                    423:   /* Set this to force the HTTP request to get back to GET. Only really usable
                    424:      if POST, PUT or a custom request have been used first.
                    425:    */
                    426:   CINIT(HTTPGET, LONG, 80),
                    427: 
                    428:   /* Set if we should verify the Common name from the peer certificate in ssl
                    429:    * handshake, set 1 to check existence, 2 to ensure that it matches the
                    430:    * provided hostname. */
                    431:   CINIT(SSL_VERIFYHOST, LONG, 81),
                    432: 
                    433:   /* Specify which file name to write all known cookies in after completed
                    434:      operation. Set file name to "-" (dash) to make it go to stdout. */
                    435:   CINIT(COOKIEJAR, OBJECTPOINT, 82),
                    436: 
                    437:   /* Specify which SSL ciphers to use */
                    438:   CINIT(SSL_CIPHER_LIST, OBJECTPOINT, 83),
                    439: 
                    440:   /* Specify which HTTP version to use! This must be set to one of the
                    441:      CURL_HTTP_VERSION* enums set below. */
                    442:   CINIT(HTTP_VERSION, LONG, 84),
                    443: 
                    444:   /* Specifically switch on or off the FTP engine's use of the EPSV command. By
                    445:      default, that one will always be attempted before the more traditional
                    446:      PASV command. */
                    447:   CINIT(FTP_USE_EPSV, LONG, 85),
                    448: 
                    449:   /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */
                    450:   CINIT(SSLCERTTYPE, OBJECTPOINT, 86),
                    451: 
                    452:   /* name of the file keeping your private SSL-key */
                    453:   CINIT(SSLKEY, OBJECTPOINT, 87),
                    454: 
                    455:   /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */
                    456:   CINIT(SSLKEYTYPE, OBJECTPOINT, 88),
                    457: 
                    458:   /* crypto engine for the SSL-sub system */
                    459:   CINIT(SSLENGINE, OBJECTPOINT, 89),
                    460: 
                    461:   /* set the crypto engine for the SSL-sub system as default
                    462:      the param has no meaning...
                    463:    */
                    464:   CINIT(SSLENGINE_DEFAULT, LONG, 90),
                    465: 
                    466:   /* Non-zero value means to use the global dns cache */
                    467:   CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* To become OBSOLETE soon */
                    468: 
                    469:   /* DNS cache timeout */
                    470:   CINIT(DNS_CACHE_TIMEOUT, LONG, 92),
                    471: 
                    472:   /* send linked-list of pre-transfer QUOTE commands */
                    473:   CINIT(PREQUOTE, OBJECTPOINT, 93),
                    474: 
                    475:   /* set the debug function */
                    476:   CINIT(DEBUGFUNCTION, FUNCTIONPOINT, 94),
                    477: 
                    478:   /* set the data for the debug function */
                    479:   CINIT(DEBUGDATA, OBJECTPOINT, 95),
                    480: 
                    481:   /* mark this as start of a cookie session */
                    482:   CINIT(COOKIESESSION, LONG, 96),
                    483: 
                    484:   /* The CApath directory used to validate the peer certificate
                    485:      this option is used only if SSL_VERIFYPEER is true */
                    486:   CINIT(CAPATH, OBJECTPOINT, 97),
                    487: 
                    488:   /* Instruct libcurl to use a smaller receive buffer */
                    489:   CINIT(BUFFERSIZE, LONG, 98),
                    490: 
                    491:   /* Instruct libcurl to not use any signal/alarm handlers, even when using
                    492:      timeouts. This option is useful for multi-threaded applications.
                    493:      See libcurl-the-guide for more background information. */
                    494:   CINIT(NOSIGNAL, LONG, 99),
                    495: 
                    496:   /* Provide a CURLShare for mutexing non-ts data */
                    497:   CINIT(SHARE, OBJECTPOINT, 100),
                    498: 
                    499:   /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default),
                    500:      CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5. */
                    501:   CINIT(PROXYTYPE, LONG, 101),
                    502: 
                    503:   /* Set the Accept-Encoding string. Use this to tell a server you would like
                    504:      the response to be compressed. */
1.3       moko      505:   CINIT(ACCEPT_ENCODING, OBJECTPOINT, 102),
1.2       moko      506: 
                    507:   /* Set pointer to private data */
                    508:   CINIT(PRIVATE, OBJECTPOINT, 103),
                    509: 
                    510:   /* Set aliases for HTTP 200 in the HTTP Response header */
                    511:   CINIT(HTTP200ALIASES, OBJECTPOINT, 104),
                    512: 
                    513:   /* Continue to send authentication (user+password) when following locations,
                    514:      even when hostname changed. This can potentially send off the name
                    515:      and password to whatever host the server decides. */
                    516:   CINIT(UNRESTRICTED_AUTH, LONG, 105),
                    517: 
                    518:   /* Specifically switch on or off the FTP engine's use of the EPRT command ( it
                    519:      also disables the LPRT attempt). By default, those ones will always be
                    520:      attempted before the good old traditional PORT command. */
                    521:   CINIT(FTP_USE_EPRT, LONG, 106),
                    522: 
                    523:   /* Set this to a bitmask value to enable the particular authentications
                    524:      methods you like. Use this in combination with CURLOPT_USERPWD.
                    525:      Note that setting multiple bits may cause extra network round-trips. */
                    526:   CINIT(HTTPAUTH, LONG, 107),
                    527: 
                    528:   /* Set the ssl context callback function, currently only for OpenSSL ssl_ctx
                    529:      in second argument. The function must be matching the
                    530:      curl_ssl_ctx_callback proto. */
                    531:   CINIT(SSL_CTX_FUNCTION, FUNCTIONPOINT, 108),
                    532: 
                    533:   /* Set the userdata for the ssl context callback function's third
                    534:      argument */
                    535:   CINIT(SSL_CTX_DATA, OBJECTPOINT, 109),
                    536: 
                    537:   /* FTP Option that causes missing dirs to be created on the remote server.
                    538:      In 7.19.4 we introduced the convenience enums for this option using the
                    539:      CURLFTP_CREATE_DIR prefix.
                    540:   */
                    541:   CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110),
                    542: 
                    543:   /* Set this to a bitmask value to enable the particular authentications
                    544:      methods you like. Use this in combination with CURLOPT_PROXYUSERPWD.
                    545:      Note that setting multiple bits may cause extra network round-trips. */
                    546:   CINIT(PROXYAUTH, LONG, 111),
                    547: 
                    548:   /* FTP option that changes the timeout, in seconds, associated with
                    549:      getting a response.  This is different from transfer timeout time and
                    550:      essentially places a demand on the FTP server to acknowledge commands
                    551:      in a timely manner. */
                    552:   CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112),
                    553: 
                    554:   /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to
                    555:      tell libcurl to resolve names to those IP versions only. This only has
                    556:      affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */
                    557:   CINIT(IPRESOLVE, LONG, 113),
                    558: 
                    559:   /* Set this option to limit the size of a file that will be downloaded from
                    560:      an HTTP or FTP server.
                    561: 
                    562:      Note there is also _LARGE version which adds large file support for
                    563:      platforms which have larger off_t sizes.  See MAXFILESIZE_LARGE below. */
                    564:   CINIT(MAXFILESIZE, LONG, 114),
                    565: 
                    566:   /* See the comment for INFILESIZE above, but in short, specifies
                    567:    * the size of the file being uploaded.  -1 means unknown.
                    568:    */
                    569:   CINIT(INFILESIZE_LARGE, OFF_T, 115),
                    570: 
                    571:   /* Sets the continuation offset.  There is also a LONG version of this;
                    572:    * look above for RESUME_FROM.
                    573:    */
                    574:   CINIT(RESUME_FROM_LARGE, OFF_T, 116),
                    575: 
                    576:   /* Sets the maximum size of data that will be downloaded from
                    577:    * an HTTP or FTP server.  See MAXFILESIZE above for the LONG version.
                    578:    */
                    579:   CINIT(MAXFILESIZE_LARGE, OFF_T, 117),
                    580: 
                    581:   /* Set this option to the file name of your .netrc file you want libcurl
                    582:      to parse (using the CURLOPT_NETRC option). If not set, libcurl will do
                    583:      a poor attempt to find the user's home directory and check for a .netrc
                    584:      file in there. */
                    585:   CINIT(NETRC_FILE, OBJECTPOINT, 118),
                    586: 
                    587:   /* Enable SSL/TLS for FTP, pick one of:
                    588:      CURLFTPSSL_TRY     - try using SSL, proceed anyway otherwise
                    589:      CURLFTPSSL_CONTROL - SSL for the control connection or fail
                    590:      CURLFTPSSL_ALL     - SSL for all communication or fail
                    591:   */
                    592:   CINIT(USE_SSL, LONG, 119),
                    593: 
                    594:   /* The _LARGE version of the standard POSTFIELDSIZE option */
                    595:   CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120),
                    596: 
                    597:   /* Enable/disable the TCP Nagle algorithm */
                    598:   CINIT(TCP_NODELAY, LONG, 121),
                    599: 
                    600:   /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
                    601:   /* 123 OBSOLETE. Gone in 7.16.0 */
                    602:   /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
                    603:   /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
                    604:   /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
                    605:   /* 127 OBSOLETE. Gone in 7.16.0 */
                    606:   /* 128 OBSOLETE. Gone in 7.16.0 */
                    607: 
                    608:   /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option
                    609:      can be used to change libcurl's default action which is to first try
                    610:      "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK
                    611:      response has been received.
                    612: 
                    613:      Available parameters are:
                    614:      CURLFTPAUTH_DEFAULT - let libcurl decide
                    615:      CURLFTPAUTH_SSL     - try "AUTH SSL" first, then TLS
                    616:      CURLFTPAUTH_TLS     - try "AUTH TLS" first, then SSL
                    617:   */
                    618:   CINIT(FTPSSLAUTH, LONG, 129),
                    619: 
                    620:   CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130),
                    621:   CINIT(IOCTLDATA, OBJECTPOINT, 131),
                    622: 
                    623:   /* 132 OBSOLETE. Gone in 7.16.0 */
                    624:   /* 133 OBSOLETE. Gone in 7.16.0 */
                    625: 
                    626:   /* zero terminated string for pass on to the FTP server when asked for
                    627:      "account" info */
                    628:   CINIT(FTP_ACCOUNT, OBJECTPOINT, 134),
                    629: 
                    630:   /* feed cookies into cookie engine */
                    631:   CINIT(COOKIELIST, OBJECTPOINT, 135),
                    632: 
                    633:   /* ignore Content-Length */
                    634:   CINIT(IGNORE_CONTENT_LENGTH, LONG, 136),
                    635: 
                    636:   /* Set to non-zero to skip the IP address received in a 227 PASV FTP server
                    637:      response. Typically used for FTP-SSL purposes but is not restricted to
                    638:      that. libcurl will then instead use the same IP address it used for the
                    639:      control connection. */
                    640:   CINIT(FTP_SKIP_PASV_IP, LONG, 137),
                    641: 
                    642:   /* Select "file method" to use when doing FTP, see the curl_ftpmethod
                    643:      above. */
                    644:   CINIT(FTP_FILEMETHOD, LONG, 138),
                    645: 
                    646:   /* Local port number to bind the socket to */
                    647:   CINIT(LOCALPORT, LONG, 139),
                    648: 
                    649:   /* Number of ports to try, including the first one set with LOCALPORT.
                    650:      Thus, setting it to 1 will make no additional attempts but the first.
                    651:   */
                    652:   CINIT(LOCALPORTRANGE, LONG, 140),
                    653: 
                    654:   /* no transfer, set up connection and let application use the socket by
                    655:      extracting it with CURLINFO_LASTSOCKET */
                    656:   CINIT(CONNECT_ONLY, LONG, 141),
                    657: 
                    658:   /* Function that will be called to convert from the
                    659:      network encoding (instead of using the iconv calls in libcurl) */
                    660:   CINIT(CONV_FROM_NETWORK_FUNCTION, FUNCTIONPOINT, 142),
                    661: 
                    662:   /* Function that will be called to convert to the
                    663:      network encoding (instead of using the iconv calls in libcurl) */
                    664:   CINIT(CONV_TO_NETWORK_FUNCTION, FUNCTIONPOINT, 143),
                    665: 
                    666:   /* Function that will be called to convert from UTF8
                    667:      (instead of using the iconv calls in libcurl)
                    668:      Note that this is used only for SSL certificate processing */
                    669:   CINIT(CONV_FROM_UTF8_FUNCTION, FUNCTIONPOINT, 144),
                    670: 
                    671:   /* if the connection proceeds too quickly then need to slow it down */
                    672:   /* limit-rate: maximum number of bytes per second to send or receive */
                    673:   CINIT(MAX_SEND_SPEED_LARGE, OFF_T, 145),
                    674:   CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146),
                    675: 
                    676:   /* Pointer to command string to send if USER/PASS fails. */
                    677:   CINIT(FTP_ALTERNATIVE_TO_USER, OBJECTPOINT, 147),
                    678: 
                    679:   /* callback function for setting socket options */
                    680:   CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148),
                    681:   CINIT(SOCKOPTDATA, OBJECTPOINT, 149),
                    682: 
                    683:   /* set to 0 to disable session ID re-use for this transfer, default is
                    684:      enabled (== 1) */
                    685:   CINIT(SSL_SESSIONID_CACHE, LONG, 150),
                    686: 
                    687:   /* allowed SSH authentication methods */
                    688:   CINIT(SSH_AUTH_TYPES, LONG, 151),
                    689: 
                    690:   /* Used by scp/sftp to do public/private key authentication */
                    691:   CINIT(SSH_PUBLIC_KEYFILE, OBJECTPOINT, 152),
                    692:   CINIT(SSH_PRIVATE_KEYFILE, OBJECTPOINT, 153),
                    693: 
                    694:   /* Send CCC (Clear Command Channel) after authentication */
                    695:   CINIT(FTP_SSL_CCC, LONG, 154),
                    696: 
                    697:   /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */
                    698:   CINIT(TIMEOUT_MS, LONG, 155),
                    699:   CINIT(CONNECTTIMEOUT_MS, LONG, 156),
                    700: 
                    701:   /* set to zero to disable the libcurl's decoding and thus pass the raw body
                    702:      data to the application even when it is encoded/compressed */
                    703:   CINIT(HTTP_TRANSFER_DECODING, LONG, 157),
                    704:   CINIT(HTTP_CONTENT_DECODING, LONG, 158),
                    705: 
                    706:   /* Permission used when creating new files and directories on the remote
                    707:      server for protocols that support it, SFTP/SCP/FILE */
                    708:   CINIT(NEW_FILE_PERMS, LONG, 159),
                    709:   CINIT(NEW_DIRECTORY_PERMS, LONG, 160),
                    710: 
                    711:   /* Set the behaviour of POST when redirecting. Values must be set to one
                    712:      of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */
                    713:   CINIT(POSTREDIR, LONG, 161),
                    714: 
                    715:   /* used by scp/sftp to verify the host's public key */
                    716:   CINIT(SSH_HOST_PUBLIC_KEY_MD5, OBJECTPOINT, 162),
                    717: 
                    718:   /* Callback function for opening socket (instead of socket(2)). Optionally,
                    719:      callback is able change the address or refuse to connect returning
                    720:      CURL_SOCKET_BAD.  The callback should have type
                    721:      curl_opensocket_callback */
                    722:   CINIT(OPENSOCKETFUNCTION, FUNCTIONPOINT, 163),
                    723:   CINIT(OPENSOCKETDATA, OBJECTPOINT, 164),
                    724: 
                    725:   /* POST volatile input fields. */
                    726:   CINIT(COPYPOSTFIELDS, OBJECTPOINT, 165),
                    727: 
                    728:   /* set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy */
                    729:   CINIT(PROXY_TRANSFER_MODE, LONG, 166),
                    730: 
                    731:   /* Callback function for seeking in the input stream */
                    732:   CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167),
                    733:   CINIT(SEEKDATA, OBJECTPOINT, 168),
                    734: 
                    735:   /* CRL file */
                    736:   CINIT(CRLFILE, OBJECTPOINT, 169),
                    737: 
                    738:   /* Issuer certificate */
                    739:   CINIT(ISSUERCERT, OBJECTPOINT, 170),
                    740: 
                    741:   /* (IPv6) Address scope */
                    742:   CINIT(ADDRESS_SCOPE, LONG, 171),
                    743: 
                    744:   /* Collect certificate chain info and allow it to get retrievable with
                    745:      CURLINFO_CERTINFO after the transfer is complete. (Unfortunately) only
                    746:      working with OpenSSL-powered builds. */
                    747:   CINIT(CERTINFO, LONG, 172),
                    748: 
                    749:   /* "name" and "pwd" to use when fetching. */
                    750:   CINIT(USERNAME, OBJECTPOINT, 173),
                    751:   CINIT(PASSWORD, OBJECTPOINT, 174),
                    752: 
                    753:     /* "name" and "pwd" to use with Proxy when fetching. */
                    754:   CINIT(PROXYUSERNAME, OBJECTPOINT, 175),
                    755:   CINIT(PROXYPASSWORD, OBJECTPOINT, 176),
                    756: 
                    757:   /* Comma separated list of hostnames defining no-proxy zones. These should
                    758:      match both hostnames directly, and hostnames within a domain. For
                    759:      example, local.com will match local.com and www.local.com, but NOT
                    760:      notlocal.com or www.notlocal.com. For compatibility with other
                    761:      implementations of this, .local.com will be considered to be the same as
                    762:      local.com. A single * is the only valid wildcard, and effectively
                    763:      disables the use of proxy. */
                    764:   CINIT(NOPROXY, OBJECTPOINT, 177),
                    765: 
                    766:   /* block size for TFTP transfers */
                    767:   CINIT(TFTP_BLKSIZE, LONG, 178),
                    768: 
                    769:   /* Socks Service */
                    770:   CINIT(SOCKS5_GSSAPI_SERVICE, OBJECTPOINT, 179),
                    771: 
                    772:   /* Socks Service */
                    773:   CINIT(SOCKS5_GSSAPI_NEC, LONG, 180),
                    774: 
                    775:   /* set the bitmask for the protocols that are allowed to be used for the
                    776:      transfer, which thus helps the app which takes URLs from users or other
                    777:      external inputs and want to restrict what protocol(s) to deal
                    778:      with. Defaults to CURLPROTO_ALL. */
                    779:   CINIT(PROTOCOLS, LONG, 181),
                    780: 
                    781:   /* set the bitmask for the protocols that libcurl is allowed to follow to,
                    782:      as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs
                    783:      to be set in both bitmasks to be allowed to get redirected to. Defaults
                    784:      to all protocols except FILE and SCP. */
                    785:   CINIT(REDIR_PROTOCOLS, LONG, 182),
                    786: 
                    787:   /* set the SSH knownhost file name to use */
                    788:   CINIT(SSH_KNOWNHOSTS, OBJECTPOINT, 183),
                    789: 
                    790:   /* set the SSH host key callback, must point to a curl_sshkeycallback
                    791:      function */
                    792:   CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184),
                    793: 
                    794:   /* set the SSH host key callback custom pointer */
                    795:   CINIT(SSH_KEYDATA, OBJECTPOINT, 185),
                    796: 
                    797:   CURLOPT_LASTENTRY /* the last unused */
                    798: } CURLoption;
                    799: 
1.3       moko      800: /* compatibility with older names */
                    801: #define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING
                    802: 
                    803: /* three convenient "aliases" that follow the name scheme better */
1.2       moko      804: #define CURLOPT_WRITEDATA CURLOPT_FILE
                    805: #define CURLOPT_READDATA  CURLOPT_INFILE
                    806: #define CURLOPT_HEADERDATA CURLOPT_WRITEHEADER
                    807: 
                    808: #define CFINIT(name) CURLFORM_ ## name
                    809: 
                    810: typedef enum {
                    811:   CFINIT(NOTHING),        /********* the first one is unused ************/
                    812: 
                    813:   /*  */
                    814:   CFINIT(COPYNAME),
                    815:   CFINIT(PTRNAME),
                    816:   CFINIT(NAMELENGTH),
                    817:   CFINIT(COPYCONTENTS),
                    818:   CFINIT(PTRCONTENTS),
                    819:   CFINIT(CONTENTSLENGTH),
                    820:   CFINIT(FILECONTENT),
                    821:   CFINIT(ARRAY),
                    822:   CFINIT(OBSOLETE),
                    823:   CFINIT(FILE),
                    824: 
                    825:   CFINIT(BUFFER),
                    826:   CFINIT(BUFFERPTR),
                    827:   CFINIT(BUFFERLENGTH),
                    828: 
                    829:   CFINIT(CONTENTTYPE),
                    830:   CFINIT(CONTENTHEADER),
                    831:   CFINIT(FILENAME),
                    832:   CFINIT(END),
                    833:   CFINIT(OBSOLETE2),
                    834: 
                    835:   CFINIT(STREAM),
                    836: 
                    837:   CURLFORM_LASTENTRY /* the last unused */
                    838: } CURLformoption;
                    839: 
                    840: #define CURLINFO_STRING   0x100000
                    841: #define CURLINFO_LONG     0x200000
                    842: #define CURLINFO_DOUBLE   0x300000
                    843: #define CURLINFO_SLIST    0x400000
1.5       moko      844: #define CURLINFO_PTR      0x400000 /* same as SLIST */
                    845: #define CURLINFO_SOCKET   0x500000
                    846: #define CURLINFO_OFF_T    0x600000
1.2       moko      847: #define CURLINFO_MASK     0x0fffff
                    848: #define CURLINFO_TYPEMASK 0xf00000
                    849: 
                    850: typedef enum {
1.5       moko      851:   CURLINFO_NONE,                  /* first, never use this */
                    852:   CURLINFO_EFFECTIVE_URL           = CURLINFO_STRING + 1,
                    853:   CURLINFO_RESPONSE_CODE           = CURLINFO_LONG   + 2,
                    854:   CURLINFO_TOTAL_TIME              = CURLINFO_DOUBLE + 3,
                    855:   CURLINFO_NAMELOOKUP_TIME         = CURLINFO_DOUBLE + 4,
                    856:   CURLINFO_CONNECT_TIME            = CURLINFO_DOUBLE + 5,
                    857:   CURLINFO_PRETRANSFER_TIME        = CURLINFO_DOUBLE + 6,
                    858:   CURLINFO_SIZE_UPLOAD             = CURLINFO_DOUBLE + 7,
                    859:   CURLINFO_SIZE_DOWNLOAD           = CURLINFO_DOUBLE + 8,
                    860:   CURLINFO_SPEED_DOWNLOAD          = CURLINFO_DOUBLE + 9,
                    861:   CURLINFO_SPEED_UPLOAD            = CURLINFO_DOUBLE + 10,
                    862:   CURLINFO_HEADER_SIZE             = CURLINFO_LONG   + 11,
                    863:   CURLINFO_REQUEST_SIZE            = CURLINFO_LONG   + 12,
                    864:   CURLINFO_SSL_VERIFYRESULT        = CURLINFO_LONG   + 13,
                    865:   CURLINFO_FILETIME                = CURLINFO_LONG   + 14,
                    866:   CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15,
                    867:   CURLINFO_CONTENT_LENGTH_UPLOAD   = CURLINFO_DOUBLE + 16,
                    868:   CURLINFO_STARTTRANSFER_TIME      = CURLINFO_DOUBLE + 17,
                    869:   CURLINFO_CONTENT_TYPE            = CURLINFO_STRING + 18,
                    870:   CURLINFO_REDIRECT_TIME           = CURLINFO_DOUBLE + 19,
                    871:   CURLINFO_REDIRECT_COUNT          = CURLINFO_LONG   + 20,
                    872:   CURLINFO_PRIVATE                 = CURLINFO_STRING + 21,
                    873:   CURLINFO_HTTP_CONNECTCODE        = CURLINFO_LONG   + 22,
                    874:   CURLINFO_HTTPAUTH_AVAIL          = CURLINFO_LONG   + 23,
                    875:   CURLINFO_PROXYAUTH_AVAIL         = CURLINFO_LONG   + 24,
                    876:   CURLINFO_OS_ERRNO                = CURLINFO_LONG   + 25,
                    877:   CURLINFO_NUM_CONNECTS            = CURLINFO_LONG   + 26,
                    878:   CURLINFO_SSL_ENGINES             = CURLINFO_SLIST  + 27,
                    879:   CURLINFO_COOKIELIST              = CURLINFO_SLIST  + 28,
                    880:   CURLINFO_LASTSOCKET              = CURLINFO_LONG   + 29,
                    881:   CURLINFO_FTP_ENTRY_PATH          = CURLINFO_STRING + 30,
                    882:   CURLINFO_REDIRECT_URL            = CURLINFO_STRING + 31,
                    883:   CURLINFO_PRIMARY_IP              = CURLINFO_STRING + 32,
                    884:   CURLINFO_APPCONNECT_TIME         = CURLINFO_DOUBLE + 33,
                    885:   CURLINFO_CERTINFO                = CURLINFO_SLIST  + 34,
                    886:   CURLINFO_CONDITION_UNMET         = CURLINFO_LONG   + 35,
                    887:   CURLINFO_RTSP_SESSION_ID         = CURLINFO_STRING + 36,
                    888:   CURLINFO_RTSP_CLIENT_CSEQ        = CURLINFO_LONG   + 37,
                    889:   CURLINFO_RTSP_SERVER_CSEQ        = CURLINFO_LONG   + 38,
                    890:   CURLINFO_RTSP_CSEQ_RECV          = CURLINFO_LONG   + 39,
                    891:   CURLINFO_PRIMARY_PORT            = CURLINFO_LONG   + 40,
                    892:   CURLINFO_LOCAL_IP                = CURLINFO_STRING + 41,
                    893:   CURLINFO_LOCAL_PORT              = CURLINFO_LONG   + 42,
                    894:   CURLINFO_TLS_SESSION             = CURLINFO_PTR    + 43,
                    895:   CURLINFO_ACTIVESOCKET            = CURLINFO_SOCKET + 44,
                    896:   CURLINFO_TLS_SSL_PTR             = CURLINFO_PTR    + 45,
                    897:   CURLINFO_HTTP_VERSION            = CURLINFO_LONG   + 46,
                    898:   CURLINFO_PROXY_SSL_VERIFYRESULT  = CURLINFO_LONG   + 47,
                    899:   CURLINFO_PROTOCOL                = CURLINFO_LONG   + 48,
                    900:   CURLINFO_SCHEME                  = CURLINFO_STRING + 49,
1.2       moko      901:   /* Fill in new entries below here! */
                    902: 
1.5       moko      903:   CURLINFO_LASTONE                 = 49
1.2       moko      904: } CURLINFO;
                    905: 
1.4       moko      906: #define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP versions that your system allows */
                    907: #define CURL_IPRESOLVE_V4       1 /* resolve to ipv4 addresses */
                    908: #define CURL_IPRESOLVE_V6       2 /* resolve to ipv6 addresses */
                    909: 
1.2       moko      910: 
                    911: typedef enum {
                    912:   CURL_FORMADD_OK, /* first, no error */
                    913: 
                    914:   CURL_FORMADD_MEMORY,
                    915:   CURL_FORMADD_OPTION_TWICE,
                    916:   CURL_FORMADD_NULL,
                    917:   CURL_FORMADD_UNKNOWN_OPTION,
                    918:   CURL_FORMADD_INCOMPLETE,
                    919:   CURL_FORMADD_ILLEGAL_ARRAY,
                    920:   CURL_FORMADD_DISABLED, /* libcurl was built with this disabled */
                    921: 
                    922:   CURL_FORMADD_LAST /* last */
                    923: } CURLFORMcode;
                    924: 
1.5       moko      925: 
                    926: enum {
                    927:   CURL_HTTP_VERSION_NONE,               /* setting this means we don't care, and that we'd
                    928:                                            like the library to choose the best possible for us! */
                    929:   CURL_HTTP_VERSION_1_0,                /* please use HTTP 1.0 in the request */
                    930:   CURL_HTTP_VERSION_1_1,                /* please use HTTP 1.1 in the request */
                    931:   CURL_HTTP_VERSION_2_0,                /* please use HTTP 2 in the request */
                    932:   CURL_HTTP_VERSION_2TLS,               /* use version 2 for HTTPS, version 1.1 for HTTP */
                    933:   CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE,  /* please use HTTP 2 without HTTP/1.1 Upgrade */
                    934: 
                    935:   CURL_HTTP_VERSION_LAST                /* *ILLEGAL* http version */
                    936: };
                    937: 
                    938: /* Convenience definition simple because the name of the version is HTTP/2 and
                    939: not 2.0. The 2_0 version of the enum name was set while the version was
                    940: still planned to be 2.0 and we stick to it for compatibility. */
                    941: #define CURL_HTTP_VERSION_2 CURL_HTTP_VERSION_2_0
                    942: 
1.2       moko      943: #endif /* __CURL_CURL_H */

E-mail: