AMXX-BG.INFO curl_consts.inc Raw include

curl_consts.inc

Original include source with line numbers.

Back Download .inc
1 #if defined _curlconst_included
2 #endinput
3 #endif
4 #define _curlconst_included
5
6 #define CURL_ERROR_SIZE 256
7
8 /*#if defined(WIN32)
9 #define CURL_SOCKET_BAD (~0)
10 #else
11 #define CURL_SOCKET_BAD -1
12 #endif*/
13
14 #define CURLPAUSE_RECV (1<<0)
15 #define CURLPAUSE_RECV_CONT (0)
16
17 #define CURLPAUSE_SEND (1<<2)
18 #define CURLPAUSE_SEND_CONT (0)
19
20 #define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND)
21 #define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT)
22
23 /* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */
24 #define CURLPROTO_HTTP (1<<0)
25 #define CURLPROTO_HTTPS (1<<1)
26 #define CURLPROTO_FTP (1<<2)
27 #define CURLPROTO_FTPS (1<<3)
28 #define CURLPROTO_SCP (1<<4)
29 #define CURLPROTO_SFTP (1<<5)
30 #define CURLPROTO_TELNET (1<<6)
31 #define CURLPROTO_LDAP (1<<7)
32 #define CURLPROTO_LDAPS (1<<8)
33 #define CURLPROTO_DICT (1<<9)
34 #define CURLPROTO_FILE (1<<10)
35 #define CURLPROTO_TFTP (1<<11)
36 #define CURLPROTO_IMAP (1<<12)
37 #define CURLPROTO_IMAPS (1<<13)
38 #define CURLPROTO_POP3 (1<<14)
39 #define CURLPROTO_POP3S (1<<15)
40 #define CURLPROTO_SMTP (1<<16)
41 #define CURLPROTO_SMTPS (1<<17)
42 #define CURLPROTO_RTSP (1<<18)
43 #define CURLPROTO_RTMP (1<<19)
44 #define CURLPROTO_RTMPT (1<<20)
45 #define CURLPROTO_RTMPE (1<<21)
46 #define CURLPROTO_RTMPTE (1<<22)
47 #define CURLPROTO_RTMPS (1<<23)
48 #define CURLPROTO_RTMPTS (1<<24)
49 #define CURLPROTO_GOPHER (1<<25)
50 #define CURLPROTO_ALL (~0) /* enable everything */
51
52 /*
53 * Bitmasks for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH options:
54 *
55 * CURLAUTH_NONE - No HTTP authentication
56 * CURLAUTH_BASIC - HTTP Basic authentication (default)
57 * CURLAUTH_DIGEST - HTTP Digest authentication
58 * CURLAUTH_GSSNEGOTIATE - HTTP GSS-Negotiate authentication
59 * CURLAUTH_NTLM - HTTP NTLM authentication
60 * CURLAUTH_DIGEST_IE - HTTP Digest authentication with IE flavour
61 * CURLAUTH_NTLM_WB - HTTP NTLM authentication delegated to winbind helper
62 * CURLAUTH_ONLY - Use together with a single other type to force no
63 * authentication or just that single type
64 * CURLAUTH_ANY - All fine types set
65 * CURLAUTH_ANYSAFE - All fine types except Basic
66 */
67
68 #define CURLAUTH_NONE 0
69 #define CURLAUTH_BASIC (1<<0)
70 #define CURLAUTH_DIGEST (1<<1)
71 #define CURLAUTH_GSSNEGOTIATE (1<<2)
72 #define CURLAUTH_NTLM (1<<3)
73 #define CURLAUTH_DIGEST_IE (1<<4)
74 #define CURLAUTH_NTLM_WB (1<<5)
75 #define CURLAUTH_ONLY (1<<31)
76 #define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE)
77 #define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
78
79 #define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */
80 #define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */
81 #define CURLSSH_AUTH_PUBLICKEY (1<<0) /* public/private key files */
82 #define CURLSSH_AUTH_PASSWORD (1<<1) /* password */
83 #define CURLSSH_AUTH_HOST (1<<2) /* host key files */
84 #define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */
85 #define CURLSSH_AUTH_AGENT (1<<4) /* agent (ssh-agent, pageant...) */
86 #define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY
87
88 #define CURLGSSAPI_DELEGATION_NONE 0 /* no delegation (default) */
89 #define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */
90 #define CURLGSSAPI_DELEGATION_FLAG (1<<1) /* delegate always */
91
92 /* symbols to use with CURLOPT_POSTREDIR.
93 CURL_REDIR_POST_301, CURL_REDIR_POST_302 and CURL_REDIR_POST_303
94 can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302
95 | CURL_REDIR_POST_303 == CURL_REDIR_POST_ALL */
96
97 #define CURL_REDIR_GET_ALL 0
98 #define CURL_REDIR_POST_301 1
99 #define CURL_REDIR_POST_302 2
100 #define CURL_REDIR_POST_303 4
101 #define CURL_REDIR_POST_ALL \
102 (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303)
103
104 /* bitmask defines for CURLOPT_HEADEROPT */
105 #define CURLHEADER_UNIFIED 0
106 #define CURLHEADER_SEPARATE (1<<0)
107
108 /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host
109 name resolves addresses using more than one IP protocol version, this
110 option might be handy to force libcurl to use a specific IP version. */
111 #define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP
112 versions that your system allows */
113 #define CURL_IPRESOLVE_V4 1 /* resolve to ipv4 addresses */
114 #define CURL_IPRESOLVE_V6 2 /* resolve to ipv6 addresses */
115
116 /* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */
117
118 /* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the
119 name of improving interoperability with older servers. Some SSL libraries
120 have introduced work-arounds for this flaw but those work-arounds sometimes
121 make the SSL communication fail. To regain functionality with those broken
122 servers, a user can this way allow the vulnerability back. */
123 #define CURLSSLOPT_ALLOW_BEAST (1<<0)
124
125 /* This is a magic return code for the write callback that, when returned,
126 will signal libcurl to pause receiving on the current transfer. */
127 #define CURL_WRITEFUNC_PAUSE 0x10000001
128
129 /* This is a return code for the read callback that, when returned, will
130 signal libcurl to immediately abort the current transfer. */
131 #define CURL_READFUNC_ABORT 0x10000000
132 /* This is a return code for the read callback that, when returned, will
133 signal libcurl to pause sending data on the current transfer. */
134 #define CURL_READFUNC_PAUSE 0x10000001
135
136 enum curlioerr {
137 CURLIOE_OK, /* I/O operation successful */
138 CURLIOE_UNKNOWNCMD, /* command was unknown to callback */
139 CURLIOE_FAILRESTART, /* failed to restart the read */
140 CURLIOE_LAST /* never use */
141 }
142
143 enum curliocmd {
144 CURLIOCMD_NOP, /* no operation */
145 CURLIOCMD_RESTARTREAD, /* restart the read stream from start */
146 CURLIOCMD_LAST /* never use */
147 }
148
149 enum curlsocktype {
150 CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */
151 CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */
152 CURLSOCKTYPE_LAST /* never use */
153 }
154
155 /* The return code from the sockopt_callback can signal information back
156 to libcurl: */
157 #define CURL_SOCKOPT_OK 0
158 #define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return
159 CURLE_ABORTED_BY_CALLBACK */
160 #define CURL_SOCKOPT_ALREADY_CONNECTED 2
161
162
163 /*
164 * Public API enums for RTSP requests
165 */
166 enum {
167 CURL_RTSPREQ_NONE, /* first in list */
168 CURL_RTSPREQ_OPTIONS,
169 CURL_RTSPREQ_DESCRIBE,
170 CURL_RTSPREQ_ANNOUNCE,
171 CURL_RTSPREQ_SETUP,
172 CURL_RTSPREQ_PLAY,
173 CURL_RTSPREQ_PAUSE,
174 CURL_RTSPREQ_TEARDOWN,
175 CURL_RTSPREQ_GET_PARAMETER,
176 CURL_RTSPREQ_SET_PARAMETER,
177 CURL_RTSPREQ_RECORD,
178 CURL_RTSPREQ_RECEIVE,
179 CURL_RTSPREQ_LAST /* last in list */
180 }
181
182 enum {
183 CURL_SSLVERSION_DEFAULT,
184 CURL_SSLVERSION_TLSv1, /* TLS 1.x */
185 CURL_SSLVERSION_SSLv2,
186 CURL_SSLVERSION_SSLv3,
187 CURL_SSLVERSION_TLSv1_0,
188 CURL_SSLVERSION_TLSv1_1,
189 CURL_SSLVERSION_TLSv1_2,
190
191 CURL_SSLVERSION_LAST /* never use, keep last */
192 }
193
194 /* These enums are for use with the CURLOPT_HTTP_VERSION option. */
195 enum {
196 CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd
197 like the library to choose the best possible
198 for us! */
199 CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */
200 CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */
201 CURL_HTTP_VERSION_2_0, /* please use HTTP 2.0 in the request */
202
203 CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */
204 }
205
206 /* These enums are for use with the CURLOPT_NETRC option. */
207 enum CURL_NETRC_OPTION {
208 CURL_NETRC_IGNORED, /* The .netrc will never be read.
209 * This is the default. */
210 CURL_NETRC_OPTIONAL, /* A user:password in the URL will be preferred
211 * to one in the .netrc. */
212 CURL_NETRC_REQUIRED, /* A user:password in the URL will be ignored.
213 * Unless one is set programmatically, the .netrc
214 * will be queried. */
215 CURL_NETRC_LAST
216 }
217
218 enum curl_proxytype {
219 CURLPROXY_HTTP = 0, /* added in 7.10, new in 7.19.4 default is to use
220 CONNECT HTTP/1.1 */
221 CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT
222 HTTP/1.0 */
223 CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already
224 in 7.10 */
225 CURLPROXY_SOCKS5 = 5, /* added in 7.10 */
226 CURLPROXY_SOCKS4A = 6, /* added in 7.18.0 */
227 CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the
228 host name rather than the IP address. added
229 in 7.18.0 */
230 } /* this enum was added in 7.10 */
231
232 enum curl_infotype {
233 CURLINFO_TEXT = 0,
234 CURLINFO_HEADER_IN, /* 1 */
235 CURLINFO_HEADER_OUT, /* 2 */
236 CURLINFO_DATA_IN, /* 3 */
237 CURLINFO_DATA_OUT, /* 4 */
238 CURLINFO_SSL_DATA_IN, /* 5 */
239 CURLINFO_SSL_DATA_OUT, /* 6 */
240 CURLINFO_END
241 }
242
243 /* use this for multipart formpost building */
244 /* Returns code for curl_formadd()
245 *
246 * Returns:
247 * CURL_FORMADD_OK on success
248 * CURL_FORMADD_MEMORY if the FormInfo allocation fails
249 * CURL_FORMADD_OPTION_TWICE if one option is given twice for one Form
250 * CURL_FORMADD_NULL if a null pointer was given for a char
251 * CURL_FORMADD_MEMORY if the allocation of a FormInfo struct failed
252 * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used
253 * CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or error)
254 * CURL_FORMADD_MEMORY if a curl_httppost struct cannot be allocated
255 * CURL_FORMADD_MEMORY if some allocation for string copying failed.
256 * CURL_FORMADD_ILLEGAL_ARRAY if an illegal option is used in an array
257 *
258 ***************************************************************************/
259 enum CURLFORMcode {
260 CURL_FORMADD_OK, /* first, no error */
261
262 CURL_FORMADD_MEMORY,
263 CURL_FORMADD_OPTION_TWICE,
264 CURL_FORMADD_NULL,
265 CURL_FORMADD_UNKNOWN_OPTION,
266 CURL_FORMADD_INCOMPLETE,
267 CURL_FORMADD_ILLEGAL_ARRAY,
268 CURL_FORMADD_DISABLED, /* libcurl was built with this disabled */
269
270 CURL_FORMADD_LAST /* last */
271 }
272
273 /* parameter for the CURLOPT_FTP_FILEMETHOD option */
274 enum curl_ftpmethod {
275 CURLFTPMETHOD_DEFAULT, /* let libcurl pick */
276 CURLFTPMETHOD_MULTICWD, /* single CWD operation for each path part */
277 CURLFTPMETHOD_NOCWD, /* no CWD at all */
278 CURLFTPMETHOD_SINGLECWD, /* one CWD to full dir, then work on file */
279 CURLFTPMETHOD_LAST /* not an option, never use */
280 }
281
282 /* parameter for the CURLOPT_FTP_SSL_CCC option */
283 enum curl_ftpccc {
284 CURLFTPSSL_CCC_NONE, /* do not send CCC */
285 CURLFTPSSL_CCC_PASSIVE, /* Let the server initiate the shutdown */
286 CURLFTPSSL_CCC_ACTIVE, /* Initiate the shutdown */
287 CURLFTPSSL_CCC_LAST /* not an option, never use */
288 }
289
290 /* parameter for the CURLOPT_FTPSSLAUTH option */
291 enum curl_ftpauth {
292 CURLFTPAUTH_DEFAULT, /* let libcurl decide */
293 CURLFTPAUTH_SSL, /* use "AUTH SSL" */
294 CURLFTPAUTH_TLS, /* use "AUTH TLS" */
295 CURLFTPAUTH_LAST /* not an option, never use */
296 }
297
298 /* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */
299 enum curl_ftpcreatedir {
300 CURLFTP_CREATE_DIR_NONE, /* do NOT create missing dirs! */
301 CURLFTP_CREATE_DIR, /* (FTP/SFTP) if CWD fails, try MKD and then CWD
302 again if MKD succeeded, for SFTP this does
303 similar magic */
304 CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD
305 again even if MKD failed! */
306 CURLFTP_CREATE_DIR_LAST /* not an option, never use */
307 }
308
309 /* parameter for the CURLOPT_USE_SSL option */
310 enum curl_usessl {
311 CURLUSESSL_NONE, /* do not attempt to use SSL */
312 CURLUSESSL_TRY, /* try using SSL, proceed anyway otherwise */
313 CURLUSESSL_CONTROL, /* SSL for the control connection or fail */
314 CURLUSESSL_ALL, /* SSL for all communication or fail */
315 CURLUSESSL_LAST /* not an option, never use */
316 }
317
318 #define CFINIT(%0) CURLFORM_%0
319 enum CURLformoption {
320 CFINIT(NOTHING), /********* the first one is unused ************/
321
322 /* */
323 CFINIT(COPYNAME),
324 CFINIT(PTRNAME),
325 CFINIT(NAMELENGTH),
326 CFINIT(COPYCONTENTS),
327 CFINIT(PTRCONTENTS),
328 CFINIT(CONTENTSLENGTH),
329 CFINIT(FILECONTENT),
330 CFINIT(ARRAY),
331 CFINIT(OBSOLETE),
332 CFINIT(FILE),
333
334 CFINIT(BUFFER),
335 CFINIT(BUFFERPTR),
336 CFINIT(BUFFERLENGTH),
337
338 CFINIT(CONTENTTYPE),
339 CFINIT(CONTENTHEADER),
340 CFINIT(FILENAME),
341 CFINIT(END),
342 CFINIT(OBSOLETE2),
343
344 CFINIT(STREAM),
345
346 CURLFORM_LASTENTRY /* the last unused */
347 }
348
349 #undef CFINIT /* done */
350
351 enum CURLcode {
352 CURLE_OK = 0,
353 CURLE_UNSUPPORTED_PROTOCOL, /* 1 */
354 CURLE_FAILED_INIT, /* 2 */
355 CURLE_URL_MALFORMAT, /* 3 */
356 CURLE_NOT_BUILT_IN, /* 4 - [was obsoleted in August 2007 for
357 7.17.0, reused in April 2011 for 7.21.5] */
358 CURLE_COULDNT_RESOLVE_PROXY, /* 5 */
359 CURLE_COULDNT_RESOLVE_HOST, /* 6 */
360 CURLE_COULDNT_CONNECT, /* 7 */
361 CURLE_FTP_WEIRD_SERVER_REPLY, /* 8 */
362 CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server
363 due to lack of access - when login fails
364 this is not returned. */
365 CURLE_FTP_ACCEPT_FAILED, /* 10 - [was obsoleted in April 2006 for
366 7.15.4, reused in Dec 2011 for 7.24.0]*/
367 CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */
368 CURLE_FTP_ACCEPT_TIMEOUT, /* 12 - timeout occurred accepting server
369 [was obsoleted in August 2007 for 7.17.0,
370 reused in Dec 2011 for 7.24.0]*/
371 CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */
372 CURLE_FTP_WEIRD_227_FORMAT, /* 14 */
373 CURLE_FTP_CANT_GET_HOST, /* 15 */
374 CURLE_OBSOLETE16, /* 16 - NOT USED */
375 CURLE_FTP_COULDNT_SET_TYPE, /* 17 */
376 CURLE_PARTIAL_FILE, /* 18 */
377 CURLE_FTP_COULDNT_RETR_FILE, /* 19 */
378 CURLE_OBSOLETE20, /* 20 - NOT USED */
379 CURLE_QUOTE_ERROR, /* 21 - quote command failure */
380 CURLE_HTTP_RETURNED_ERROR, /* 22 */
381 CURLE_WRITE_ERROR, /* 23 */
382 CURLE_OBSOLETE24, /* 24 - NOT USED */
383 CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */
384 CURLE_READ_ERROR, /* 26 - couldn't open/read from file */
385 CURLE_OUT_OF_MEMORY, /* 27 */
386 /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error
387 instead of a memory allocation error if CURL_DOES_CONVERSIONS
388 is defined
389 */
390 CURLE_OPERATION_TIMEDOUT, /* 28 - the timeout time was reached */
391 CURLE_OBSOLETE29, /* 29 - NOT USED */
392 CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */
393 CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */
394 CURLE_OBSOLETE32, /* 32 - NOT USED */
395 CURLE_RANGE_ERROR, /* 33 - RANGE "command" didn't work */
396 CURLE_HTTP_POST_ERROR, /* 34 */
397 CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */
398 CURLE_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */
399 CURLE_FILE_COULDNT_READ_FILE, /* 37 */
400 CURLE_LDAP_CANNOT_BIND, /* 38 */
401 CURLE_LDAP_SEARCH_FAILED, /* 39 */
402 CURLE_OBSOLETE40, /* 40 - NOT USED */
403 CURLE_FUNCTION_NOT_FOUND, /* 41 */
404 CURLE_ABORTED_BY_CALLBACK, /* 42 */
405 CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */
406 CURLE_OBSOLETE44, /* 44 - NOT USED */
407 CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */
408 CURLE_OBSOLETE46, /* 46 - NOT USED */
409 CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */
410 CURLE_UNKNOWN_OPTION, /* 48 - User specified an unknown option */
411 CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */
412 CURLE_OBSOLETE50, /* 50 - NOT USED */
413 CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint
414 wasn't verified fine */
415 CURLE_GOT_NOTHING, /* 52 - when this is a specific error */
416 CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */
417 CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as
418 default */
419 CURLE_SEND_ERROR, /* 55 - failed sending network data */
420 CURLE_RECV_ERROR, /* 56 - failure in receiving network data */
421 CURLE_OBSOLETE57, /* 57 - NOT IN USE */
422 CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */
423 CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */
424 CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */
425 CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized/bad encoding */
426 CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */
427 CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */
428 CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */
429 CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind
430 that failed */
431 CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */
432 CURLE_LOGIN_DENIED, /* 67 - user, password or similar was not
433 accepted and we failed to login */
434 CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */
435 CURLE_TFTP_PERM, /* 69 - permission problem on server */
436 CURLE_REMOTE_DISK_FULL, /* 70 - out of disk space on server */
437 CURLE_TFTP_ILLEGAL, /* 71 - Illegal TFTP operation */
438 CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */
439 CURLE_REMOTE_FILE_EXISTS, /* 73 - File already exists */
440 CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */
441 CURLE_CONV_FAILED, /* 75 - conversion failed */
442 CURLE_CONV_REQD, /* 76 - caller must register conversion
443 callbacks using curl_easy_setopt options
444 CURLOPT_CONV_FROM_NETWORK_FUNCTION,
445 CURLOPT_CONV_TO_NETWORK_FUNCTION, and
446 CURLOPT_CONV_FROM_UTF8_FUNCTION */
447 CURLE_SSL_CACERT_BADFILE, /* 77 - could not load CACERT file, missing
448 or wrong format */
449 CURLE_REMOTE_FILE_NOT_FOUND, /* 78 - remote file not found */
450 CURLE_SSH, /* 79 - error from the SSH layer, somewhat
451 generic so the error message will be of
452 interest when this has happened */
453
454 CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL
455 connection */
456 CURLE_AGAIN, /* 81 - socket is not ready for send/recv,
457 wait till it's ready and try again (Added
458 in 7.18.2) */
459 CURLE_SSL_CRL_BADFILE, /* 82 - could not load CRL file, missing or
460 wrong format (Added in 7.19.0) */
461 CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in
462 7.19.0) */
463 CURLE_FTP_PRET_FAILED, /* 84 - a PRET command failed */
464 CURLE_RTSP_CSEQ_ERROR, /* 85 - mismatch of RTSP CSeq numbers */
465 CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Ids */
466 CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */
467 CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */
468 CURLE_NO_CONNECTION_AVAILABLE, /* 89 - No connection available, the
469 session will be queued */
470 CURL_LAST /* never use! */
471 }
472
473
474 #define CURLINFO_STRING 0x100000
475 #define CURLINFO_LONG 0x200000
476 #define CURLINFO_DOUBLE 0x300000
477 #define CURLINFO_SLIST 0x400000
478 #define CURLINFO_MASK 0x0fffff
479 #define CURLINFO_TYPEMASK 0xf00000
480
481 enum CURLINFO {
482 CURLINFO_NONE, /* first, never use this */
483 CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1,
484 CURLINFO_RESPONSE_CODE = CURLINFO_LONG + 2,
485 CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3,
486 CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4,
487 CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5,
488 CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6,
489 CURLINFO_SIZE_UPLOAD = CURLINFO_DOUBLE + 7,
490 CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE + 8,
491 CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE + 9,
492 CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10,
493 CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11,
494 CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12,
495 CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13,
496 CURLINFO_FILETIME = CURLINFO_LONG + 14,
497 CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15,
498 CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16,
499 CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17,
500 CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18,
501 CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19,
502 CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20,
503 CURLINFO_PRIVATE = CURLINFO_STRING + 21,
504 CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22,
505 CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23,
506 CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24,
507 CURLINFO_OS_ERRNO = CURLINFO_LONG + 25,
508 CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26,
509 CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27,
510 CURLINFO_COOKIELIST = CURLINFO_SLIST + 28,
511 CURLINFO_LASTSOCKET = CURLINFO_LONG + 29,
512 CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30,
513 CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31,
514 CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32,
515 CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33,
516 CURLINFO_CERTINFO = CURLINFO_SLIST + 34,
517 CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35,
518 CURLINFO_RTSP_SESSION_ID = CURLINFO_STRING + 36,
519 CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG + 37,
520 CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG + 38,
521 CURLINFO_RTSP_CSEQ_RECV = CURLINFO_LONG + 39,
522 CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40,
523 CURLINFO_LOCAL_IP = CURLINFO_STRING + 41,
524 CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42,
525 CURLINFO_TLS_SESSION = CURLINFO_SLIST + 43,
526 /* Fill in new entries below here! */
527
528 CURLINFO_LASTONE = 43
529 }
530
531 #define CURLOPTTYPE_LONG 0
532 #define CURLOPTTYPE_OBJECTPOINT 10000
533 #define CURLOPTTYPE_FUNCTIONPOINT 20000
534 #define CURLOPTTYPE_OFF_T 30000
535
536 #define LONG CURLOPTTYPE_LONG
537 #define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT
538 #define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT
539 #define OFF_T CURLOPTTYPE_OFF_T
540
541 #define CINIT(%0,%1,%2) CURLOPT_%0 = %1 + %2
542
543 enum CURLoption {
544 /* This is the FILE * or void * the regular output should be written to. */
545 CINIT(WRITEDATA, OBJECTPOINT, 1),
546
547 /* The full URL to get/put */
548 CINIT(URL, OBJECTPOINT, 2),
549
550 /* Port number to connect to, if other than default. */
551 CINIT(PORT, LONG, 3),
552
553 /* Name of proxy to use. */
554 CINIT(PROXY, OBJECTPOINT, 4),
555
556 /* "user:password;options" to use when fetching. */
557 CINIT(USERPWD, OBJECTPOINT, 5),
558
559 /* "user:password" to use with proxy. */
560 CINIT(PROXYUSERPWD, OBJECTPOINT, 6),
561
562 /* Range to get, specified as an ASCII string. */
563 CINIT(RANGE, OBJECTPOINT, 7),
564
565 /* not used */
566
567 /* Specified file stream to upload from (use as input): */
568 CINIT(READDATA, OBJECTPOINT, 9),
569
570 /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE
571 * bytes big. If this is not used, error messages go to stderr instead: */
572 CINIT(ERRORBUFFER, OBJECTPOINT, 10),
573
574 /* Function that will be called to store the output (instead of fwrite). The
575 * parameters will use fwrite() syntax, make sure to follow them. */
576 CINIT(WRITEFUNCTION, FUNCTIONPOINT, 11),
577
578 /* Function that will be called to read the input (instead of fread). The
579 * parameters will use fread() syntax, make sure to follow them. */
580 CINIT(READFUNCTION, FUNCTIONPOINT, 12),
581
582 /* Time-out the read operation after this amount of seconds */
583 CINIT(TIMEOUT, LONG, 13),
584
585 /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about
586 * how large the file being sent really is. That allows better error
587 * checking and better verifies that the upload was successful. -1 means
588 * unknown size.
589 *
590 * For large file support, there is also a _LARGE version of the key
591 * which takes an off_t type, allowing platforms with larger off_t
592 * sizes to handle larger files. See below for INFILESIZE_LARGE.
593 */
594 CINIT(INFILESIZE, LONG, 14),
595
596 /* POST static input fields. */
597 CINIT(POSTFIELDS, OBJECTPOINT, 15),
598
599 /* Set the referrer page (needed by some CGIs) */
600 CINIT(REFERER, OBJECTPOINT, 16),
601
602 /* Set the FTP PORT string (interface name, named or numerical IP address)
603 Use i.e '-' to use default address. */
604 CINIT(FTPPORT, OBJECTPOINT, 17),
605
606 /* Set the User-Agent string (examined by some CGIs) */
607 CINIT(USERAGENT, OBJECTPOINT, 18),
608
609 /* If the download receives less than "low speed limit" bytes/second
610 * during "low speed time" seconds, the operations is aborted.
611 * You could i.e if you have a pretty high speed connection, abort if
612 * it is less than 2000 bytes/sec during 20 seconds.
613 */
614
615 /* Set the "low speed limit" */
616 CINIT(LOW_SPEED_LIMIT, LONG, 19),
617
618 /* Set the "low speed time" */
619 CINIT(LOW_SPEED_TIME, LONG, 20),
620
621 /* Set the continuation offset.
622 *
623 * Note there is also a _LARGE version of this key which uses
624 * off_t types, allowing for large file offsets on platforms which
625 * use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE.
626 */
627 CINIT(RESUME_FROM, LONG, 21),
628
629 /* Set cookie in request: */
630 CINIT(COOKIE, OBJECTPOINT, 22),
631
632 /* This points to a linked list of headers, struct curl_slist kind. This
633 list is also used for RTSP (in spite of its name) */
634 CINIT(HTTPHEADER, OBJECTPOINT, 23),
635
636 /* This points to a linked list of post entries, struct curl_httppost */
637 CINIT(HTTPPOST, OBJECTPOINT, 24),
638
639 /* name of the file keeping your private SSL-certificate */
640 CINIT(SSLCERT, OBJECTPOINT, 25),
641
642 /* password for the SSL or SSH private key */
643 CINIT(KEYPASSWD, OBJECTPOINT, 26),
644
645 /* send TYPE parameter? */
646 CINIT(CRLF, LONG, 27),
647
648 /* send linked-list of QUOTE commands */
649 CINIT(QUOTE, OBJECTPOINT, 28),
650
651 /* send FILE * or void * to store headers to, if you use a callback it
652 is simply passed to the callback unmodified */
653 CINIT(HEADERDATA, OBJECTPOINT, 29),
654
655 /* point to a file to read the initial cookies from, also enables
656 "cookie awareness" */
657 CINIT(COOKIEFILE, OBJECTPOINT, 31),
658
659 /* What version to specifically try to use.
660 See CURL_SSLVERSION defines below. */
661 CINIT(SSLVERSION, LONG, 32),
662
663 /* What kind of HTTP time condition to use, see defines */
664 CINIT(TIMECONDITION, LONG, 33),
665
666 /* Time to use with the above condition. Specified in number of seconds
667 since 1 Jan 1970 */
668 CINIT(TIMEVALUE, LONG, 34),
669
670 /* 35 = OBSOLETE */
671
672 /* Custom request, for customizing the get command like
673 HTTP: DELETE, TRACE and others
674 FTP: to use a different list command
675 */
676 CINIT(CUSTOMREQUEST, OBJECTPOINT, 36),
677
678 /* HTTP request, for odd commands like DELETE, TRACE and others */
679 CINIT(STDERR, OBJECTPOINT, 37),
680
681 /* 38 is not used */
682
683 /* send linked-list of post-transfer QUOTE commands */
684 CINIT(POSTQUOTE, OBJECTPOINT, 39),
685
686 CINIT(OBSOLETE40, OBJECTPOINT, 40), /* OBSOLETE, do not use! */
687
688 CINIT(VERBOSE, LONG, 41), /* talk a lot */
689 CINIT(HEADER, LONG, 42), /* throw the header out too */
690 CINIT(NOPROGRESS, LONG, 43), /* shut off the progress meter */
691 CINIT(NOBODY, LONG, 44), /* use HEAD to get http document */
692 CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 300 */
693 CINIT(UPLOAD, LONG, 46), /* this is an upload */
694 CINIT(POST, LONG, 47), /* HTTP POST method */
695 CINIT(DIRLISTONLY, LONG, 48), /* bare names when listing directories */
696
697 CINIT(APPEND, LONG, 50), /* Append instead of overwrite on upload! */
698
699 /* Specify whether to read the user+password from the .netrc or the URL.
700 * This must be one of the CURL_NETRC_* enums below. */
701 CINIT(NETRC, LONG, 51),
702
703 CINIT(FOLLOWLOCATION, LONG, 52), /* use Location: Luke! */
704
705 CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */
706 CINIT(PUT, LONG, 54), /* HTTP PUT */
707
708 /* 55 = OBSOLETE */
709
710 /* DEPRECATED
711 * Function that will be called instead of the internal progress display
712 * function. This function should be defined as the curl_progress_callback
713 * prototype defines. */
714 CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56),
715
716 /* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION
717 callbacks */
718 CINIT(PROGRESSDATA, OBJECTPOINT, 57),
719 #define CURLOPT_XFERINFODATA CURLOPT_PROGRESSDATA
720
721 /* We want the referrer field set automatically when following locations */
722 CINIT(AUTOREFERER, LONG, 58),
723
724 /* Port of the proxy, can be set in the proxy string as well with:
725 "[host]:[port]" */
726 CINIT(PROXYPORT, LONG, 59),
727
728 /* size of the POST input data, if strlen() is not good to use */
729 CINIT(POSTFIELDSIZE, LONG, 60),
730
731 /* tunnel non-http operations through a HTTP proxy */
732 CINIT(HTTPPROXYTUNNEL, LONG, 61),
733
734 /* Set the interface string to use as outgoing network interface */
735 CINIT(INTERFACE, OBJECTPOINT, 62),
736
737 /* Set the krb4/5 security level, this also enables krb4/5 awareness. This
738 * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string
739 * is set but doesn't match one of these, 'private' will be used. */
740 CINIT(KRBLEVEL, OBJECTPOINT, 63),
741
742 /* Set if we should verify the peer in ssl handshake, set 1 to verify. */
743 CINIT(SSL_VERIFYPEER, LONG, 64),
744
745 /* The CApath or CAfile used to validate the peer certificate
746 this option is used only if SSL_VERIFYPEER is true */
747 CINIT(CAINFO, OBJECTPOINT, 65),
748
749 /* 66 = OBSOLETE */
750 /* 67 = OBSOLETE */
751
752 /* Maximum number of http redirects to follow */
753 CINIT(MAXREDIRS, LONG, 68),
754
755 /* Pass a long set to 1 to get the date of the requested document (if
756 possible)! Pass a zero to shut it off. */
757 CINIT(FILETIME, LONG, 69),
758
759 /* This points to a linked list of telnet options */
760 CINIT(TELNETOPTIONS, OBJECTPOINT, 70),
761
762 /* Max amount of cached alive connections */
763 CINIT(MAXCONNECTS, LONG, 71),
764
765 CINIT(OBSOLETE72, LONG, 72), /* OBSOLETE, do not use! */
766
767 /* 73 = OBSOLETE */
768
769 /* Set to explicitly use a new connection for the upcoming transfer.
770 Do not use this unless you're absolutely sure of this, as it makes the
771 operation slower and is less friendly for the network. */
772 CINIT(FRESH_CONNECT, LONG, 74),
773
774 /* Set to explicitly forbid the upcoming transfer's connection to be re-used
775 when done. Do not use this unless you're absolutely sure of this, as it
776 makes the operation slower and is less friendly for the network. */
777 CINIT(FORBID_REUSE, LONG, 75),
778
779 /* Set to a file name that contains random data for libcurl to use to
780 seed the random engine when doing SSL connects. */
781 CINIT(RANDOM_FILE, OBJECTPOINT, 76),
782
783 /* Set to the Entropy Gathering Daemon socket pathname */
784 CINIT(EGDSOCKET, OBJECTPOINT, 77),
785
786 /* Time-out connect operations after this amount of seconds, if connects are
787 OK within this time, then fine... This only aborts the connect phase. */
788 CINIT(CONNECTTIMEOUT, LONG, 78),
789
790 /* Function that will be called to store headers (instead of fwrite). The
791 * parameters will use fwrite() syntax, make sure to follow them. */
792 CINIT(HEADERFUNCTION, FUNCTIONPOINT, 79),
793
794 /* Set this to force the HTTP request to get back to GET. Only really usable
795 if POST, PUT or a custom request have been used first.
796 */
797 CINIT(HTTPGET, LONG, 80),
798
799 /* Set if we should verify the Common name from the peer certificate in ssl
800 * handshake, set 1 to check existence, 2 to ensure that it matches the
801 * provided hostname. */
802 CINIT(SSL_VERIFYHOST, LONG, 81),
803
804 /* Specify which file name to write all known cookies in after completed
805 operation. Set file name to "-" (dash) to make it go to stdout. */
806 CINIT(COOKIEJAR, OBJECTPOINT, 82),
807
808 /* Specify which SSL ciphers to use */
809 CINIT(SSL_CIPHER_LIST, OBJECTPOINT, 83),
810
811 /* Specify which HTTP version to use! This must be set to one of the
812 CURL_HTTP_VERSION* enums set below. */
813 CINIT(HTTP_VERSION, LONG, 84),
814
815 /* Specifically switch on or off the FTP engine's use of the EPSV command. By
816 default, that one will always be attempted before the more traditional
817 PASV command. */
818 CINIT(FTP_USE_EPSV, LONG, 85),
819
820 /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */
821 CINIT(SSLCERTTYPE, OBJECTPOINT, 86),
822
823 /* name of the file keeping your private SSL-key */
824 CINIT(SSLKEY, OBJECTPOINT, 87),
825
826 /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */
827 CINIT(SSLKEYTYPE, OBJECTPOINT, 88),
828
829 /* crypto engine for the SSL-sub system */
830 CINIT(SSLENGINE, OBJECTPOINT, 89),
831
832 /* set the crypto engine for the SSL-sub system as default
833 the param has no meaning...
834 */
835 CINIT(SSLENGINE_DEFAULT, LONG, 90),
836
837 /* Non-zero value means to use the global dns cache */
838 CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* DEPRECATED, do not use! */
839
840 /* DNS cache timeout */
841 CINIT(DNS_CACHE_TIMEOUT, LONG, 92),
842
843 /* send linked-list of pre-transfer QUOTE commands */
844 CINIT(PREQUOTE, OBJECTPOINT, 93),
845
846 /* set the debug function */
847 CINIT(DEBUGFUNCTION, FUNCTIONPOINT, 94),
848
849 /* set the data for the debug function */
850 CINIT(DEBUGDATA, OBJECTPOINT, 95),
851
852 /* mark this as start of a cookie session */
853 CINIT(COOKIESESSION, LONG, 96),
854
855 /* The CApath directory used to validate the peer certificate
856 this option is used only if SSL_VERIFYPEER is true */
857 CINIT(CAPATH, OBJECTPOINT, 97),
858
859 /* Instruct libcurl to use a smaller receive buffer */
860 CINIT(BUFFERSIZE, LONG, 98),
861
862 /* Instruct libcurl to not use any signal/alarm handlers, even when using
863 timeouts. This option is useful for multi-threaded applications.
864 See libcurl-the-guide for more background information. */
865 CINIT(NOSIGNAL, LONG, 99),
866
867 /* Provide a CURLShare for mutexing non-ts data */
868 CINIT(SHARE, OBJECTPOINT, 100),
869
870 /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default),
871 CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5. */
872 CINIT(PROXYTYPE, LONG, 101),
873
874 /* Set the Accept-Encoding string. Use this to tell a server you would like
875 the response to be compressed. Before 7.21.6, this was known as
876 CURLOPT_ENCODING */
877 CINIT(ACCEPT_ENCODING, OBJECTPOINT, 102),
878
879 /* Set pointer to private data */
880 CINIT(PRIVATE, OBJECTPOINT, 103),
881
882 /* Set aliases for HTTP 200 in the HTTP Response header */
883 CINIT(HTTP200ALIASES, OBJECTPOINT, 104),
884
885 /* Continue to send authentication (user+password) when following locations,
886 even when hostname changed. This can potentially send off the name
887 and password to whatever host the server decides. */
888 CINIT(UNRESTRICTED_AUTH, LONG, 105),
889
890 /* Specifically switch on or off the FTP engine's use of the EPRT command (
891 it also disables the LPRT attempt). By default, those ones will always be
892 attempted before the good old traditional PORT command. */
893 CINIT(FTP_USE_EPRT, LONG, 106),
894
895 /* Set this to a bitmask value to enable the particular authentications
896 methods you like. Use this in combination with CURLOPT_USERPWD.
897 Note that setting multiple bits may cause extra network round-trips. */
898 CINIT(HTTPAUTH, LONG, 107),
899
900 /* Set the ssl context callback function, currently only for OpenSSL ssl_ctx
901 in second argument. The function must be matching the
902 curl_ssl_ctx_callback proto. */
903 CINIT(SSL_CTX_FUNCTION, FUNCTIONPOINT, 108),
904
905 /* Set the userdata for the ssl context callback function's third
906 argument */
907 CINIT(SSL_CTX_DATA, OBJECTPOINT, 109),
908
909 /* FTP Option that causes missing dirs to be created on the remote server.
910 In 7.19.4 we introduced the convenience enums for this option using the
911 CURLFTP_CREATE_DIR prefix.
912 */
913 CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110),
914
915 /* Set this to a bitmask value to enable the particular authentications
916 methods you like. Use this in combination with CURLOPT_PROXYUSERPWD.
917 Note that setting multiple bits may cause extra network round-trips. */
918 CINIT(PROXYAUTH, LONG, 111),
919
920 /* FTP option that changes the timeout, in seconds, associated with
921 getting a response. This is different from transfer timeout time and
922 essentially places a demand on the FTP server to acknowledge commands
923 in a timely manner. */
924 CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112),
925 #define CURLOPT_SERVER_RESPONSE_TIMEOUT CURLOPT_FTP_RESPONSE_TIMEOUT
926
927 /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to
928 tell libcurl to resolve names to those IP versions only. This only has
929 affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */
930 CINIT(IPRESOLVE, LONG, 113),
931
932 /* Set this option to limit the size of a file that will be downloaded from
933 an HTTP or FTP server.
934
935 Note there is also _LARGE version which adds large file support for
936 platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below. */
937 CINIT(MAXFILESIZE, LONG, 114),
938
939 /* See the comment for INFILESIZE above, but in short, specifies
940 * the size of the file being uploaded. -1 means unknown.
941 */
942 CINIT(INFILESIZE_LARGE, OFF_T, 115),
943
944 /* Sets the continuation offset. There is also a LONG version of this;
945 * look above for RESUME_FROM.
946 */
947 CINIT(RESUME_FROM_LARGE, OFF_T, 116),
948
949 /* Sets the maximum size of data that will be downloaded from
950 * an HTTP or FTP server. See MAXFILESIZE above for the LONG version.
951 */
952 CINIT(MAXFILESIZE_LARGE, OFF_T, 117),
953
954 /* Set this option to the file name of your .netrc file you want libcurl
955 to parse (using the CURLOPT_NETRC option). If not set, libcurl will do
956 a poor attempt to find the user's home directory and check for a .netrc
957 file in there. */
958 CINIT(NETRC_FILE, OBJECTPOINT, 118),
959
960 /* Enable SSL/TLS for FTP, pick one of:
961 CURLUSESSL_TRY - try using SSL, proceed anyway otherwise
962 CURLUSESSL_CONTROL - SSL for the control connection or fail
963 CURLUSESSL_ALL - SSL for all communication or fail
964 */
965 CINIT(USE_SSL, LONG, 119),
966
967 /* The _LARGE version of the standard POSTFIELDSIZE option */
968 CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120),
969
970 /* Enable/disable the TCP Nagle algorithm */
971 CINIT(TCP_NODELAY, LONG, 121),
972
973 /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
974 /* 123 OBSOLETE. Gone in 7.16.0 */
975 /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
976 /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
977 /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
978 /* 127 OBSOLETE. Gone in 7.16.0 */
979 /* 128 OBSOLETE. Gone in 7.16.0 */
980
981 /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option
982 can be used to change libcurl's default action which is to first try
983 "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK
984 response has been received.
985
986 Available parameters are:
987 CURLFTPAUTH_DEFAULT - let libcurl decide
988 CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS
989 CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL
990 */
991 CINIT(FTPSSLAUTH, LONG, 129),
992
993 CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130),
994 CINIT(IOCTLDATA, OBJECTPOINT, 131),
995
996 /* 132 OBSOLETE. Gone in 7.16.0 */
997 /* 133 OBSOLETE. Gone in 7.16.0 */
998
999 /* zero terminated string for pass on to the FTP server when asked for
1000 "account" info */
1001 CINIT(FTP_ACCOUNT, OBJECTPOINT, 134),
1002
1003 /* feed cookies into cookie engine */
1004 CINIT(COOKIELIST, OBJECTPOINT, 135),
1005
1006 /* ignore Content-Length */
1007 CINIT(IGNORE_CONTENT_LENGTH, LONG, 136),
1008
1009 /* Set to non-zero to skip the IP address received in a 227 PASV FTP server
1010 response. Typically used for FTP-SSL purposes but is not restricted to
1011 that. libcurl will then instead use the same IP address it used for the
1012 control connection. */
1013 CINIT(FTP_SKIP_PASV_IP, LONG, 137),
1014
1015 /* Select "file method" to use when doing FTP, see the curl_ftpmethod
1016 above. */
1017 CINIT(FTP_FILEMETHOD, LONG, 138),
1018
1019 /* Local port number to bind the socket to */
1020 CINIT(LOCALPORT, LONG, 139),
1021
1022 /* Number of ports to try, including the first one set with LOCALPORT.
1023 Thus, setting it to 1 will make no additional attempts but the first.
1024 */
1025 CINIT(LOCALPORTRANGE, LONG, 140),
1026
1027 /* no transfer, set up connection and let application use the socket by
1028 extracting it with CURLINFO_LASTSOCKET */
1029 CINIT(CONNECT_ONLY, LONG, 141),
1030
1031 /* Function that will be called to convert from the
1032 network encoding (instead of using the iconv calls in libcurl) */
1033 CINIT(CONV_FROM_NETWORK_FUNCTION, FUNCTIONPOINT, 142),
1034
1035 /* Function that will be called to convert to the
1036 network encoding (instead of using the iconv calls in libcurl) */
1037 CINIT(CONV_TO_NETWORK_FUNCTION, FUNCTIONPOINT, 143),
1038
1039 /* Function that will be called to convert from UTF8
1040 (instead of using the iconv calls in libcurl)
1041 Note that this is used only for SSL certificate processing */
1042 CINIT(CONV_FROM_UTF8_FUNCTION, FUNCTIONPOINT, 144),
1043
1044 /* if the connection proceeds too quickly then need to slow it down */
1045 /* limit-rate: maximum number of bytes per second to send or receive */
1046 CINIT(MAX_SEND_SPEED_LARGE, OFF_T, 145),
1047 CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146),
1048
1049 /* Pointer to command string to send if USER/PASS fails. */
1050 CINIT(FTP_ALTERNATIVE_TO_USER, OBJECTPOINT, 147),
1051
1052 /* callback function for setting socket options */
1053 CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148),
1054 CINIT(SOCKOPTDATA, OBJECTPOINT, 149),
1055
1056 /* set to 0 to disable session ID re-use for this transfer, default is
1057 enabled (== 1) */
1058 CINIT(SSL_SESSIONID_CACHE, LONG, 150),
1059
1060 /* allowed SSH authentication methods */
1061 CINIT(SSH_AUTH_TYPES, LONG, 151),
1062
1063 /* Used by scp/sftp to do public/private key authentication */
1064 CINIT(SSH_PUBLIC_KEYFILE, OBJECTPOINT, 152),
1065 CINIT(SSH_PRIVATE_KEYFILE, OBJECTPOINT, 153),
1066
1067 /* Send CCC (Clear Command Channel) after authentication */
1068 CINIT(FTP_SSL_CCC, LONG, 154),
1069
1070 /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */
1071 CINIT(TIMEOUT_MS, LONG, 155),
1072 CINIT(CONNECTTIMEOUT_MS, LONG, 156),
1073
1074 /* set to zero to disable the libcurl's decoding and thus pass the raw body
1075 data to the application even when it is encoded/compressed */
1076 CINIT(HTTP_TRANSFER_DECODING, LONG, 157),
1077 CINIT(HTTP_CONTENT_DECODING, LONG, 158),
1078
1079 /* Permission used when creating new files and directories on the remote
1080 server for protocols that support it, SFTP/SCP/FILE */
1081 CINIT(NEW_FILE_PERMS, LONG, 159),
1082 CINIT(NEW_DIRECTORY_PERMS, LONG, 160),
1083
1084 /* Set the behaviour of POST when redirecting. Values must be set to one
1085 of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */
1086 CINIT(POSTREDIR, LONG, 161),
1087
1088 /* used by scp/sftp to verify the host's public key */
1089 CINIT(SSH_HOST_PUBLIC_KEY_MD5, OBJECTPOINT, 162),
1090
1091 /* Callback function for opening socket (instead of socket(2)). Optionally,
1092 callback is able change the address or refuse to connect returning
1093 CURL_SOCKET_BAD. The callback should have type
1094 curl_opensocket_callback */
1095 CINIT(OPENSOCKETFUNCTION, FUNCTIONPOINT, 163),
1096 CINIT(OPENSOCKETDATA, OBJECTPOINT, 164),
1097
1098 /* POST volatile input fields. */
1099 CINIT(COPYPOSTFIELDS, OBJECTPOINT, 165),
1100
1101 /* set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy */
1102 CINIT(PROXY_TRANSFER_MODE, LONG, 166),
1103
1104 /* Callback function for seeking in the input stream */
1105 CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167),
1106 CINIT(SEEKDATA, OBJECTPOINT, 168),
1107
1108 /* CRL file */
1109 CINIT(CRLFILE, OBJECTPOINT, 169),
1110
1111 /* Issuer certificate */
1112 CINIT(ISSUERCERT, OBJECTPOINT, 170),
1113
1114 /* (IPv6) Address scope */
1115 CINIT(ADDRESS_SCOPE, LONG, 171),
1116
1117 /* Collect certificate chain info and allow it to get retrievable with
1118 CURLINFO_CERTINFO after the transfer is complete. */
1119 CINIT(CERTINFO, LONG, 172),
1120
1121 /* "name" and "pwd" to use when fetching. */
1122 CINIT(USERNAME, OBJECTPOINT, 173),
1123 CINIT(PASSWORD, OBJECTPOINT, 174),
1124
1125 /* "name" and "pwd" to use with Proxy when fetching. */
1126 CINIT(PROXYUSERNAME, OBJECTPOINT, 175),
1127 CINIT(PROXYPASSWORD, OBJECTPOINT, 176),
1128
1129 /* Comma separated list of hostnames defining no-proxy zones. These should
1130 match both hostnames directly, and hostnames within a domain. For
1131 example, local.com will match local.com and www.local.com, but NOT
1132 notlocal.com or www.notlocal.com. For compatibility with other
1133 implementations of this, .local.com will be considered to be the same as
1134 local.com. A single * is the only valid wildcard, and effectively
1135 disables the use of proxy. */
1136 CINIT(NOPROXY, OBJECTPOINT, 177),
1137
1138 /* block size for TFTP transfers */
1139 CINIT(TFTP_BLKSIZE, LONG, 178),
1140
1141 /* Socks Service */
1142 CINIT(SOCKS5_GSSAPI_SERVICE, OBJECTPOINT, 179),
1143
1144 /* Socks Service */
1145 CINIT(SOCKS5_GSSAPI_NEC, LONG, 180),
1146
1147 /* set the bitmask for the protocols that are allowed to be used for the
1148 transfer, which thus helps the app which takes URLs from users or other
1149 external inputs and want to restrict what protocol(s) to deal
1150 with. Defaults to CURLPROTO_ALL. */
1151 CINIT(PROTOCOLS, LONG, 181),
1152
1153 /* set the bitmask for the protocols that libcurl is allowed to follow to,
1154 as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs
1155 to be set in both bitmasks to be allowed to get redirected to. Defaults
1156 to all protocols except FILE and SCP. */
1157 CINIT(REDIR_PROTOCOLS, LONG, 182),
1158
1159 /* set the SSH knownhost file name to use */
1160 CINIT(SSH_KNOWNHOSTS, OBJECTPOINT, 183),
1161
1162 /* set the SSH host key callback, must point to a curl_sshkeycallback
1163 function */
1164 CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184),
1165
1166 /* set the SSH host key callback custom pointer */
1167 CINIT(SSH_KEYDATA, OBJECTPOINT, 185),
1168
1169 /* set the SMTP mail originator */
1170 CINIT(MAIL_FROM, OBJECTPOINT, 186),
1171
1172 /* set the SMTP mail receiver(s) */
1173 CINIT(MAIL_RCPT, OBJECTPOINT, 187),
1174
1175 /* FTP: send PRET before PASV */
1176 CINIT(FTP_USE_PRET, LONG, 188),
1177
1178 /* RTSP request method (OPTIONS, SETUP, PLAY, etc...) */
1179 CINIT(RTSP_REQUEST, LONG, 189),
1180
1181 /* The RTSP session identifier */
1182 CINIT(RTSP_SESSION_ID, OBJECTPOINT, 190),
1183
1184 /* The RTSP stream URI */
1185 CINIT(RTSP_STREAM_URI, OBJECTPOINT, 191),
1186
1187 /* The Transport: header to use in RTSP requests */
1188 CINIT(RTSP_TRANSPORT, OBJECTPOINT, 192),
1189
1190 /* Manually initialize the client RTSP CSeq for this handle */
1191 CINIT(RTSP_CLIENT_CSEQ, LONG, 193),
1192
1193 /* Manually initialize the server RTSP CSeq for this handle */
1194 CINIT(RTSP_SERVER_CSEQ, LONG, 194),
1195
1196 /* The stream to pass to INTERLEAVEFUNCTION. */
1197 CINIT(INTERLEAVEDATA, OBJECTPOINT, 195),
1198
1199 /* Let the application define a custom write method for RTP data */
1200 CINIT(INTERLEAVEFUNCTION, FUNCTIONPOINT, 196),
1201
1202 /* Turn on wildcard matching */
1203 CINIT(WILDCARDMATCH, LONG, 197),
1204
1205 /* Directory matching callback called before downloading of an
1206 individual file (chunk) started */
1207 CINIT(CHUNK_BGN_FUNCTION, FUNCTIONPOINT, 198),
1208
1209 /* Directory matching callback called after the file (chunk)
1210 was downloaded, or skipped */
1211 CINIT(CHUNK_END_FUNCTION, FUNCTIONPOINT, 199),
1212
1213 /* Change match (fnmatch-like) callback for wildcard matching */
1214 CINIT(FNMATCH_FUNCTION, FUNCTIONPOINT, 200),
1215
1216 /* Let the application define custom chunk data pointer */
1217 CINIT(CHUNK_DATA, OBJECTPOINT, 201),
1218
1219 /* FNMATCH_FUNCTION user pointer */
1220 CINIT(FNMATCH_DATA, OBJECTPOINT, 202),
1221
1222 /* send linked-list of name:port:address sets */
1223 CINIT(RESOLVE, OBJECTPOINT, 203),
1224
1225 /* Set a username for authenticated TLS */
1226 CINIT(TLSAUTH_USERNAME, OBJECTPOINT, 204),
1227
1228 /* Set a password for authenticated TLS */
1229 CINIT(TLSAUTH_PASSWORD, OBJECTPOINT, 205),
1230
1231 /* Set authentication type for authenticated TLS */
1232 CINIT(TLSAUTH_TYPE, OBJECTPOINT, 206),
1233
1234 /* Set to 1 to enable the "TE:" header in HTTP requests to ask for
1235 compressed transfer-encoded responses. Set to 0 to disable the use of TE:
1236 in outgoing requests. The current default is 0, but it might change in a
1237 future libcurl release.
1238
1239 libcurl will ask for the compressed methods it knows of, and if that
1240 isn't any, it will not ask for transfer-encoding at all even if this
1241 option is set to 1.
1242
1243 */
1244 CINIT(TRANSFER_ENCODING, LONG, 207),
1245
1246 /* Callback function for closing socket (instead of close(2)). The callback
1247 should have type curl_closesocket_callback */
1248 CINIT(CLOSESOCKETFUNCTION, FUNCTIONPOINT, 208),
1249 CINIT(CLOSESOCKETDATA, OBJECTPOINT, 209),
1250
1251 /* allow GSSAPI credential delegation */
1252 CINIT(GSSAPI_DELEGATION, LONG, 210),
1253
1254 /* Set the name servers to use for DNS resolution */
1255 CINIT(DNS_SERVERS, OBJECTPOINT, 211),
1256
1257 /* Time-out accept operations (currently for FTP only) after this amount
1258 of miliseconds. */
1259 CINIT(ACCEPTTIMEOUT_MS, LONG, 212),
1260
1261 /* Set TCP keepalive */
1262 CINIT(TCP_KEEPALIVE, LONG, 213),
1263
1264 /* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */
1265 CINIT(TCP_KEEPIDLE, LONG, 214),
1266 CINIT(TCP_KEEPINTVL, LONG, 215),
1267
1268 /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */
1269 CINIT(SSL_OPTIONS, LONG, 216),
1270
1271 /* Set the SMTP auth originator */
1272 CINIT(MAIL_AUTH, OBJECTPOINT, 217),
1273
1274 /* Enable/disable SASL initial response */
1275 CINIT(SASL_IR, LONG, 218),
1276
1277 /* Function that will be called instead of the internal progress display
1278 * function. This function should be defined as the curl_xferinfo_callback
1279 * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */
1280 CINIT(XFERINFOFUNCTION, FUNCTIONPOINT, 219),
1281
1282 /* The XOAUTH2 bearer token */
1283 CINIT(XOAUTH2_BEARER, OBJECTPOINT, 220),
1284
1285 /* Set the interface string to use as outgoing network
1286 * interface for DNS requests.
1287 * Only supported by the c-ares DNS backend */
1288 CINIT(DNS_INTERFACE, OBJECTPOINT, 221),
1289
1290 /* Set the local IPv4 address to use for outgoing DNS requests.
1291 * Only supported by the c-ares DNS backend */
1292 CINIT(DNS_LOCAL_IP4, OBJECTPOINT, 222),
1293
1294 /* Set the local IPv4 address to use for outgoing DNS requests.
1295 * Only supported by the c-ares DNS backend */
1296 CINIT(DNS_LOCAL_IP6, OBJECTPOINT, 223),
1297
1298 /* Set authentication options directly */
1299 CINIT(LOGIN_OPTIONS, OBJECTPOINT, 224),
1300
1301 /* Enable/disable TLS NPN extension (http2 over ssl might fail without) */
1302 CINIT(SSL_ENABLE_NPN, LONG, 225),
1303
1304 /* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */
1305 CINIT(SSL_ENABLE_ALPN, LONG, 226),
1306
1307 /* Time to wait for a response to a HTTP request containing an
1308 * Expect: 100-continue header before sending the data anyway. */
1309 CINIT(EXPECT_100_TIMEOUT_MS, LONG, 227),
1310
1311 /* This points to a linked list of headers used for proxy requests only,
1312 struct curl_slist kind */
1313 CINIT(PROXYHEADER, OBJECTPOINT, 228),
1314
1315 /* Pass in a bitmask of "header options" */
1316 CINIT(HEADEROPT, LONG, 229),
1317
1318 CURLOPT_LASTENTRY /* the last unused */
1319 }
1320
1321 #undef LONG
1322 #undef OBJECTPOINT
1323 #undef FUNCTIONPOINT
1324 #undef OFF_T
1325 #undef CINIT