1#![allow(bad_style)]
2#![doc(html_root_url = "https://docs.rs/curl-sys/0.4")]
3
4// These `extern crate` are required for conditional linkages of curl.
5#[cfg(link_libnghttp2)]
6extern crate libnghttp2_sys;
7#[cfg(link_libz)]
8extern crate libz_sys;
9#[cfg(link_openssl)]
10extern crate openssl_sys;
11#[cfg(feature = "rustls")]
12extern crate rustls_ffi;
13
14use libc::c_ulong;
15use libc::{c_char, c_double, c_int, c_long, c_short, c_uint, c_void, size_t, time_t};
16
17#[cfg(unix)]
18pub use libc::fd_set;
19#[cfg(windows)]
20use winapi::shared::ws2def::SOCKADDR;
21#[cfg(windows)]
22pub use winapi::um::winsock2::fd_set;
23
24#[cfg(target_env = "msvc")]
25#[doc(hidden)]
26pub type __enum_ty = libc::c_int;
27#[cfg(not(target_env = "msvc"))]
28#[doc(hidden)]
29pub type __enum_ty = libc::c_uint;
30
31pub type CURLINFO = __enum_ty;
32pub type CURLoption = __enum_ty;
33pub type CURLcode = __enum_ty;
34pub type CURLversion = __enum_ty;
35pub type curl_off_t = i64;
36
37pub enum CURL {}
38
39#[cfg(unix)]
40pub type curl_socket_t = libc::c_int;
41#[cfg(unix)]
42pub const CURL_SOCKET_BAD: curl_socket_t = -1;
43#[cfg(all(windows, target_pointer_width = "32"))]
44pub type curl_socket_t = libc::c_uint;
45#[cfg(all(windows, target_pointer_width = "64"))]
46pub type curl_socket_t = u64;
47#[cfg(windows)]
48pub const CURL_SOCKET_BAD: curl_socket_t = !0;
49
50pub enum curl_httppost {
51 // Note that this changed in some versions of libcurl, so we currently don't
52 // bind the fields as they're apparently not stable.
53 // pub next: *mut curl_httppost,
54 // pub name: *mut c_char,
55 // pub namelength: c_long,
56 // pub contents: *mut c_char,
57 // pub contentslength: c_long,
58 // pub buffer: *mut c_char,
59 // pub bufferlength: c_long,
60 // pub contenttype: *mut c_char,
61 // pub contentheader: *mut curl_slist,
62 // pub more: *mut curl_httppost,
63 // pub flags: c_long,
64 // pub showfilename: *mut c_char,
65 // pub userp: *mut c_void,
66}
67
68// pub const HTTPPOST_FILENAME: c_long = 1 << 0;
69// pub const HTTPPOST_READFILE: c_long = 1 << 1;
70// pub const HTTPPOST_PTRNAME: c_long = 1 << 2;
71// pub const HTTPPOST_PTRCONTENTS: c_long = 1 << 3;
72// pub const HTTPPOST_BUFFER: c_long = 1 << 4;
73// pub const HTTPPOST_PTRBUFFER: c_long = 1 << 5;
74// pub const HTTPPOST_CALLBACK: c_long = 1 << 6;
75
76pub type curl_progress_callback =
77 extern "C" fn(*mut c_void, c_double, c_double, c_double, c_double) -> c_int;
78// pub type curl_xferinfo_callback = extern fn(*mut c_void,
79// curl_off_t,
80// curl_off_t,
81// curl_off_t,
82// curl_off_t) -> c_int;
83
84pub const CURL_WRITEFUNC_PAUSE: size_t = 0x10000001;
85
86pub type curl_write_callback = extern "C" fn(*mut c_char, size_t, size_t, *mut c_void) -> size_t;
87
88pub type curlfiletype = __enum_ty;
89pub const CURLFILETYPE_FILE: curlfiletype = 0;
90pub const CURLFILETYPE_DIRECTORY: curlfiletype = 1;
91pub const CURLFILETYPE_SYMLINK: curlfiletype = 2;
92pub const CURLFILETYPE_DEVICE_BLOCK: curlfiletype = 3;
93pub const CURLFILETYPE_DEVICE_CHAR: curlfiletype = 4;
94pub const CURLFILETYPE_NAMEDPIPE: curlfiletype = 5;
95pub const CURLFILETYPE_SOCKET: curlfiletype = 6;
96pub const CURLFILETYPE_DOOR: curlfiletype = 7;
97pub const CURLFILETYPE_UNKNOWN: curlfiletype = 8;
98
99pub const CURLFINFOFLAG_KNOWN_FILENAME: c_uint = 1 << 0;
100pub const CURLFINFOFLAG_KNOWN_FILETYPE: c_uint = 1 << 1;
101pub const CURLFINFOFLAG_KNOWN_TIME: c_uint = 1 << 2;
102pub const CURLFINFOFLAG_KNOWN_PERM: c_uint = 1 << 3;
103pub const CURLFINFOFLAG_KNOWN_UID: c_uint = 1 << 4;
104pub const CURLFINFOFLAG_KNOWN_GID: c_uint = 1 << 5;
105pub const CURLFINFOFLAG_KNOWN_SIZE: c_uint = 1 << 6;
106pub const CURLFINFOFLAG_KNOWN_HLINKCOUNT: c_uint = 1 << 7;
107
108#[repr(C)]
109pub struct curl_fileinfo {
110 pub filename: *mut c_char,
111 pub filetype: curlfiletype,
112 pub time: time_t,
113 pub perm: c_uint,
114 pub uid: c_int,
115 pub gid: c_int,
116 pub size: curl_off_t,
117 pub hardlinks: c_long,
118
119 pub strings_time: *mut c_char,
120 pub strings_perm: *mut c_char,
121 pub strings_user: *mut c_char,
122 pub strings_group: *mut c_char,
123 pub strings_target: *mut c_char,
124
125 pub flags: c_uint,
126 pub b_data: *mut c_char,
127 pub b_size: size_t,
128 pub b_used: size_t,
129}
130
131pub const CURL_BLOB_NOCOPY: c_uint = 0;
132pub const CURL_BLOB_COPY: c_uint = 1;
133
134#[repr(C)]
135pub struct curl_blob {
136 pub data: *mut c_void,
137 pub len: size_t,
138 pub flags: c_uint,
139}
140
141pub const CURL_CHUNK_BGN_FUNC_OK: c_long = 0;
142pub const CURL_CHUNK_BGN_FUNC_FAIL: c_long = 1;
143pub const CURL_CHUNK_BGN_FUNC_SKIP: c_long = 2;
144pub type curl_chunk_bgn_callback = extern "C" fn(*const c_void, *mut c_void, c_int) -> c_long;
145
146pub const CURL_CHUNK_END_FUNC_OK: c_long = 0;
147pub const CURL_CHUNK_END_FUNC_FAIL: c_long = 1;
148pub type curl_chunk_end_callback = extern "C" fn(*mut c_void) -> c_long;
149
150pub const CURL_FNMATCHFUNC_MATCH: c_int = 0;
151pub const CURL_FNMATCHFUNC_NOMATCH: c_int = 1;
152pub const CURL_FNMATCHFUNC_FAIL: c_int = 2;
153pub type curl_fnmatch_callback = extern "C" fn(*mut c_void, *const c_char, *const c_char) -> c_int;
154
155pub const CURL_SEEKFUNC_OK: c_int = 0;
156pub const CURL_SEEKFUNC_FAIL: c_int = 1;
157pub const CURL_SEEKFUNC_CANTSEEK: c_int = 2;
158pub type curl_seek_callback = extern "C" fn(*mut c_void, curl_off_t, c_int) -> c_int;
159
160pub const CURL_READFUNC_ABORT: size_t = 0x10000000;
161pub const CURL_READFUNC_PAUSE: size_t = 0x10000001;
162pub type curl_read_callback = extern "C" fn(*mut c_char, size_t, size_t, *mut c_void) -> size_t;
163
164// pub const CURL_SOCKOPT_OK: c_int = 0;
165// pub const CURL_SOCKOPT_ERROR: c_int = 1;
166// pub const CURL_SOCKOPT_ALREADY_CONNECTED: c_int = 2;
167// pub type curl_sockopt_callback = extern fn(*mut c_void,
168// curl_socket_t,
169// curlsocktype) -> c_int;
170
171pub type curlioerr = __enum_ty;
172pub const CURLIOE_OK: curlioerr = 0;
173pub const CURLIOE_UNKNOWNCMD: curlioerr = 1;
174pub const CURLIOE_FAILRESTART: curlioerr = 2;
175
176pub type curliocmd = __enum_ty;
177pub const CURLIOCMD_NOP: curliocmd = 0;
178pub const CURLIOCMD_RESTARTREAD: curliocmd = 1;
179
180pub type curl_ioctl_callback = extern "C" fn(*mut CURL, c_int, *mut c_void) -> curlioerr;
181
182pub type curl_malloc_callback = extern "C" fn(size_t) -> *mut c_void;
183pub type curl_free_callback = extern "C" fn(*mut c_void);
184pub type curl_realloc_callback = extern "C" fn(*mut c_void, size_t) -> *mut c_void;
185pub type curl_strdup_callback = extern "C" fn(*const c_char) -> *mut c_char;
186pub type curl_calloc_callback = extern "C" fn(size_t, size_t) -> *mut c_void;
187
188pub type curl_infotype = __enum_ty;
189pub const CURLINFO_TEXT: curl_infotype = 0;
190pub const CURLINFO_HEADER_IN: curl_infotype = 1;
191pub const CURLINFO_HEADER_OUT: curl_infotype = 2;
192pub const CURLINFO_DATA_IN: curl_infotype = 3;
193pub const CURLINFO_DATA_OUT: curl_infotype = 4;
194pub const CURLINFO_SSL_DATA_IN: curl_infotype = 5;
195pub const CURLINFO_SSL_DATA_OUT: curl_infotype = 6;
196
197pub type curl_debug_callback =
198 extern "C" fn(*mut CURL, curl_infotype, *mut c_char, size_t, *mut c_void) -> c_int;
199
200pub const CURLE_OK: CURLcode = 0;
201pub const CURLE_UNSUPPORTED_PROTOCOL: CURLcode = 1;
202pub const CURLE_FAILED_INIT: CURLcode = 2;
203pub const CURLE_URL_MALFORMAT: CURLcode = 3;
204// pub const CURLE_NOT_BUILT_IN: CURLcode = 4;
205pub const CURLE_COULDNT_RESOLVE_PROXY: CURLcode = 5;
206pub const CURLE_COULDNT_RESOLVE_HOST: CURLcode = 6;
207pub const CURLE_COULDNT_CONNECT: CURLcode = 7;
208pub const CURLE_FTP_WEIRD_SERVER_REPLY: CURLcode = 8;
209pub const CURLE_REMOTE_ACCESS_DENIED: CURLcode = 9;
210// pub const CURLE_FTP_ACCEPT_FAILED: CURLcode = 10;
211pub const CURLE_FTP_WEIRD_PASS_REPLY: CURLcode = 11;
212// pub const CURLE_FTP_ACCEPT_TIMEOUT: CURLcode = 12;
213pub const CURLE_FTP_WEIRD_PASV_REPLY: CURLcode = 13;
214pub const CURLE_FTP_WEIRD_227_FORMAT: CURLcode = 14;
215pub const CURLE_FTP_CANT_GET_HOST: CURLcode = 15;
216pub const CURLE_HTTP2: CURLcode = 16;
217pub const CURLE_FTP_COULDNT_SET_TYPE: CURLcode = 17;
218pub const CURLE_PARTIAL_FILE: CURLcode = 18;
219pub const CURLE_FTP_COULDNT_RETR_FILE: CURLcode = 19;
220pub const CURLE_OBSOLETE20: CURLcode = 20;
221pub const CURLE_QUOTE_ERROR: CURLcode = 21;
222pub const CURLE_HTTP_RETURNED_ERROR: CURLcode = 22;
223pub const CURLE_WRITE_ERROR: CURLcode = 23;
224pub const CURLE_OBSOLETE24: CURLcode = 24;
225pub const CURLE_UPLOAD_FAILED: CURLcode = 25;
226pub const CURLE_READ_ERROR: CURLcode = 26;
227pub const CURLE_OUT_OF_MEMORY: CURLcode = 27;
228pub const CURLE_OPERATION_TIMEDOUT: CURLcode = 28;
229pub const CURLE_OBSOLETE29: CURLcode = 29;
230pub const CURLE_FTP_PORT_FAILED: CURLcode = 30;
231pub const CURLE_FTP_COULDNT_USE_REST: CURLcode = 31;
232pub const CURLE_OBSOLETE32: CURLcode = 32;
233pub const CURLE_RANGE_ERROR: CURLcode = 33;
234pub const CURLE_HTTP_POST_ERROR: CURLcode = 34;
235pub const CURLE_SSL_CONNECT_ERROR: CURLcode = 35;
236pub const CURLE_BAD_DOWNLOAD_RESUME: CURLcode = 36;
237pub const CURLE_FILE_COULDNT_READ_FILE: CURLcode = 37;
238pub const CURLE_LDAP_CANNOT_BIND: CURLcode = 38;
239pub const CURLE_LDAP_SEARCH_FAILED: CURLcode = 39;
240pub const CURLE_OBSOLETE40: CURLcode = 40;
241pub const CURLE_FUNCTION_NOT_FOUND: CURLcode = 41;
242pub const CURLE_ABORTED_BY_CALLBACK: CURLcode = 42;
243pub const CURLE_BAD_FUNCTION_ARGUMENT: CURLcode = 43;
244pub const CURLE_OBSOLETE44: CURLcode = 44;
245pub const CURLE_INTERFACE_FAILED: CURLcode = 45;
246pub const CURLE_OBSOLETE46: CURLcode = 46;
247pub const CURLE_TOO_MANY_REDIRECTS: CURLcode = 47;
248pub const CURLE_UNKNOWN_OPTION: CURLcode = 48;
249pub const CURLE_TELNET_OPTION_SYNTAX: CURLcode = 49;
250pub const CURLE_OBSOLETE50: CURLcode = 50;
251pub const CURLE_PEER_FAILED_VERIFICATION: CURLcode = 60;
252pub const CURLE_GOT_NOTHING: CURLcode = 52;
253pub const CURLE_SSL_ENGINE_NOTFOUND: CURLcode = 53;
254pub const CURLE_SSL_ENGINE_SETFAILED: CURLcode = 54;
255pub const CURLE_SEND_ERROR: CURLcode = 55;
256pub const CURLE_RECV_ERROR: CURLcode = 56;
257pub const CURLE_OBSOLETE57: CURLcode = 57;
258pub const CURLE_SSL_CERTPROBLEM: CURLcode = 58;
259pub const CURLE_SSL_CIPHER: CURLcode = 59;
260pub const CURLE_SSL_CACERT: CURLcode = 60;
261pub const CURLE_BAD_CONTENT_ENCODING: CURLcode = 61;
262pub const CURLE_LDAP_INVALID_URL: CURLcode = 62;
263pub const CURLE_FILESIZE_EXCEEDED: CURLcode = 63;
264pub const CURLE_USE_SSL_FAILED: CURLcode = 64;
265pub const CURLE_SEND_FAIL_REWIND: CURLcode = 65;
266pub const CURLE_SSL_ENGINE_INITFAILED: CURLcode = 66;
267pub const CURLE_LOGIN_DENIED: CURLcode = 67;
268pub const CURLE_TFTP_NOTFOUND: CURLcode = 68;
269pub const CURLE_TFTP_PERM: CURLcode = 69;
270pub const CURLE_REMOTE_DISK_FULL: CURLcode = 70;
271pub const CURLE_TFTP_ILLEGAL: CURLcode = 71;
272pub const CURLE_TFTP_UNKNOWNID: CURLcode = 72;
273pub const CURLE_REMOTE_FILE_EXISTS: CURLcode = 73;
274pub const CURLE_TFTP_NOSUCHUSER: CURLcode = 74;
275pub const CURLE_CONV_FAILED: CURLcode = 75;
276pub const CURLE_CONV_REQD: CURLcode = 76;
277pub const CURLE_SSL_CACERT_BADFILE: CURLcode = 77;
278pub const CURLE_REMOTE_FILE_NOT_FOUND: CURLcode = 78;
279pub const CURLE_SSH: CURLcode = 79;
280pub const CURLE_SSL_SHUTDOWN_FAILED: CURLcode = 80;
281pub const CURLE_AGAIN: CURLcode = 81;
282pub const CURLE_SSL_CRL_BADFILE: CURLcode = 82;
283pub const CURLE_SSL_ISSUER_ERROR: CURLcode = 83;
284pub const CURLE_FTP_PRET_FAILED: CURLcode = 84;
285pub const CURLE_RTSP_CSEQ_ERROR: CURLcode = 85;
286pub const CURLE_RTSP_SESSION_ERROR: CURLcode = 86;
287pub const CURLE_FTP_BAD_FILE_LIST: CURLcode = 87;
288pub const CURLE_CHUNK_FAILED: CURLcode = 88;
289pub const CURLE_NO_CONNECTION_AVAILABLE: CURLcode = 89;
290pub const CURLE_SSL_PINNEDPUBKEYNOTMATCH: CURLcode = 90;
291pub const CURLE_SSL_INVALIDCERTSTATUS: CURLcode = 91;
292pub const CURLE_HTTP2_STREAM: CURLcode = 92;
293pub const CURLE_RECURSIVE_API_CALL: CURLcode = 93;
294
295pub type curl_conv_callback = extern "C" fn(*mut c_char, size_t) -> CURLcode;
296pub type curl_ssl_ctx_callback = extern "C" fn(*mut CURL, *mut c_void, *mut c_void) -> CURLcode;
297
298pub type curl_proxytype = __enum_ty;
299pub const CURLPROXY_HTTP: curl_proxytype = 0;
300pub const CURLPROXY_HTTP_1_0: curl_proxytype = 1;
301pub const CURLPROXY_SOCKS4: curl_proxytype = 4;
302pub const CURLPROXY_SOCKS5: curl_proxytype = 5;
303pub const CURLPROXY_SOCKS4A: curl_proxytype = 6;
304pub const CURLPROXY_SOCKS5_HOSTNAME: curl_proxytype = 7;
305
306pub const CURLAUTH_NONE: c_ulong = 0;
307pub const CURLAUTH_BASIC: c_ulong = 1 << 0;
308pub const CURLAUTH_DIGEST: c_ulong = 1 << 1;
309pub const CURLAUTH_GSSNEGOTIATE: c_ulong = 1 << 2;
310pub const CURLAUTH_NTLM: c_ulong = 1 << 3;
311pub const CURLAUTH_DIGEST_IE: c_ulong = 1 << 4;
312pub const CURLAUTH_NTLM_WB: c_ulong = 1 << 5;
313pub const CURLAUTH_AWS_SIGV4: c_ulong = 1 << 7;
314// pub const CURLAUTH_ONLY: c_ulong = 1 << 31;
315pub const CURLAUTH_ANY: c_ulong = !CURLAUTH_DIGEST_IE;
316pub const CURLAUTH_ANYSAFE: c_ulong = !(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE);
317
318// pub const CURLSSH_AUTH_ANY: c_ulong = !0;
319// pub const CURLSSH_AUTH_NONE: c_ulong = 0;
320// pub const CURLSSH_AUTH_PUBLICKEY: c_ulong = 1 << 0;
321// pub const CURLSSH_AUTH_PASSWORD: c_ulong = 1 << 1;
322// pub const CURLSSH_AUTH_HOST: c_ulong = 1 << 2;
323// pub const CURLSSH_AUTH_KEYBOARD: c_ulong = 1 << 3;
324// pub const CURLSSH_AUTH_AGENT: c_ulong = 1 << 4;
325// pub const CURLSSH_AUTH_DEFAULT: c_ulong = CURLSSH_AUTH_ANY;
326
327pub const CURLGSSAPI_DELEGATION_NONE: c_ulong = 0;
328pub const CURLGSSAPI_DELEGATION_POLICY_FLAG: c_ulong = 1 << 0;
329pub const CURLGSSAPI_DELEGATION_FLAG: c_ulong = 1 << 1;
330
331// pub type curl_khtype = __enum_ty;
332// pub const CURLKHTYPE_UNKNOWN: curl_khtype = 0;
333// pub const CURLKHTYPE_RSA1: curl_khtype = 1;
334// pub const CURLKHTYPE_RSA: curl_khtype = 2;
335// pub const CURLKHTYPE_DSS: curl_khtype = 3;
336
337// #[repr(C)]
338// pub struct curl_khkey {
339// pub key: *const c_char,
340// pub len: size_t,
341// pub keytype: curl_khtype,
342// }
343
344// pub type curl_khstat = __enum_ty;
345// pub const CURLKHSTAT_FINE_ADD_TO_FILE: curl_khstat = 0;
346// pub const CURLKHSTAT_FINE: curl_khstat = 1;
347// pub const CURLKHSTAT_REJECT: curl_khstat = 2;
348// pub const CURLKHSTAT_DEFER: curl_khstat = 3;
349//
350// pub type curl_khmatch = __enum_ty;
351// pub const CURLKHMATCH_OK: curl_khmatch = 0;
352// pub const CURLKHMATCH_MISMATCH: curl_khmatch = 1;
353// pub const CURLKHMATCH_MISSING: curl_khmatch = 2;
354
355// pub type curl_sshkeycallback = extern fn(*mut CURL,
356// *const curl_khkey,
357// *const curl_khkey,
358// curl_khmatch,
359// *mut c_void) -> c_int;
360
361pub const CURL_NETRC_IGNORED: c_ulong = 0;
362pub const CURL_NETRC_OPTIONAL: c_ulong = 1;
363pub const CURL_NETRC_REQUIRED: c_ulong = 2;
364
365pub type curl_usessl = __enum_ty;
366pub const CURLUSESSL_NONE: curl_usessl = 0;
367pub const CURLUSESSL_TRY: curl_usessl = 1;
368pub const CURLUSESSL_CONTROL: curl_usessl = 2;
369pub const CURLUSESSL_ALL: curl_usessl = 3;
370
371pub const CURLPROTO_HTTP: c_int = 1 << 0;
372pub const CURLPROTO_HTTPS: c_int = 1 << 1;
373pub const CURLPROTO_FILE: c_int = 1 << 10;
374
375pub const CURLOPTTYPE_LONG: CURLoption = 0;
376pub const CURLOPTTYPE_OBJECTPOINT: CURLoption = 10_000;
377pub const CURLOPTTYPE_FUNCTIONPOINT: CURLoption = 20_000;
378pub const CURLOPTTYPE_OFF_T: CURLoption = 30_000;
379pub const CURLOPTTYPE_BLOB: CURLoption = 40_000;
380const CURLOPTTYPE_VALUES: CURLoption = CURLOPTTYPE_LONG;
381
382pub const CURLOPT_FILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 1;
383pub const CURLOPT_URL: CURLoption = CURLOPTTYPE_OBJECTPOINT + 2;
384pub const CURLOPT_PORT: CURLoption = CURLOPTTYPE_LONG + 3;
385pub const CURLOPT_PROXY: CURLoption = CURLOPTTYPE_OBJECTPOINT + 4;
386pub const CURLOPT_USERPWD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 5;
387pub const CURLOPT_PROXYUSERPWD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 6;
388pub const CURLOPT_RANGE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 7;
389pub const CURLOPT_INFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 9;
390pub const CURLOPT_ERRORBUFFER: CURLoption = CURLOPTTYPE_OBJECTPOINT + 10;
391pub const CURLOPT_WRITEFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 11;
392pub const CURLOPT_READFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 12;
393pub const CURLOPT_TIMEOUT: CURLoption = CURLOPTTYPE_LONG + 13;
394pub const CURLOPT_INFILESIZE: CURLoption = CURLOPTTYPE_LONG + 14;
395pub const CURLOPT_POSTFIELDS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 15;
396pub const CURLOPT_REFERER: CURLoption = CURLOPTTYPE_OBJECTPOINT + 16;
397pub const CURLOPT_FTPPORT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 17;
398pub const CURLOPT_USERAGENT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 18;
399pub const CURLOPT_LOW_SPEED_LIMIT: CURLoption = CURLOPTTYPE_LONG + 19;
400pub const CURLOPT_LOW_SPEED_TIME: CURLoption = CURLOPTTYPE_LONG + 20;
401pub const CURLOPT_RESUME_FROM: CURLoption = CURLOPTTYPE_LONG + 21;
402pub const CURLOPT_COOKIE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 22;
403pub const CURLOPT_HTTPHEADER: CURLoption = CURLOPTTYPE_OBJECTPOINT + 23;
404pub const CURLOPT_HTTPPOST: CURLoption = CURLOPTTYPE_OBJECTPOINT + 24;
405pub const CURLOPT_SSLCERT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 25;
406pub const CURLOPT_KEYPASSWD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 26;
407pub const CURLOPT_CRLF: CURLoption = CURLOPTTYPE_LONG + 27;
408pub const CURLOPT_QUOTE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 28;
409pub const CURLOPT_WRITEHEADER: CURLoption = CURLOPTTYPE_OBJECTPOINT + 29;
410pub const CURLOPT_COOKIEFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 31;
411pub const CURLOPT_SSLVERSION: CURLoption = CURLOPTTYPE_LONG + 32;
412pub const CURLOPT_TIMECONDITION: CURLoption = CURLOPTTYPE_LONG + 33;
413pub const CURLOPT_TIMEVALUE: CURLoption = CURLOPTTYPE_LONG + 34;
414pub const CURLOPT_CUSTOMREQUEST: CURLoption = CURLOPTTYPE_OBJECTPOINT + 36;
415pub const CURLOPT_STDERR: CURLoption = CURLOPTTYPE_OBJECTPOINT + 37;
416pub const CURLOPT_POSTQUOTE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 39;
417pub const CURLOPT_WRITEINFO: CURLoption = CURLOPTTYPE_OBJECTPOINT + 40;
418pub const CURLOPT_VERBOSE: CURLoption = CURLOPTTYPE_LONG + 41;
419pub const CURLOPT_HEADER: CURLoption = CURLOPTTYPE_LONG + 42;
420pub const CURLOPT_NOPROGRESS: CURLoption = CURLOPTTYPE_LONG + 43;
421pub const CURLOPT_NOBODY: CURLoption = CURLOPTTYPE_LONG + 44;
422pub const CURLOPT_FAILONERROR: CURLoption = CURLOPTTYPE_LONG + 45;
423pub const CURLOPT_UPLOAD: CURLoption = CURLOPTTYPE_LONG + 46;
424pub const CURLOPT_POST: CURLoption = CURLOPTTYPE_LONG + 47;
425pub const CURLOPT_DIRLISTONLY: CURLoption = CURLOPTTYPE_LONG + 48;
426pub const CURLOPT_APPEND: CURLoption = CURLOPTTYPE_LONG + 50;
427pub const CURLOPT_NETRC: CURLoption = CURLOPTTYPE_LONG + 51;
428pub const CURLOPT_FOLLOWLOCATION: CURLoption = CURLOPTTYPE_LONG + 52;
429pub const CURLOPT_TRANSFERTEXT: CURLoption = CURLOPTTYPE_LONG + 53;
430pub const CURLOPT_PUT: CURLoption = CURLOPTTYPE_LONG + 54;
431pub const CURLOPT_PROGRESSFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 56;
432pub const CURLOPT_PROGRESSDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 57;
433pub const CURLOPT_AUTOREFERER: CURLoption = CURLOPTTYPE_LONG + 58;
434pub const CURLOPT_PROXYPORT: CURLoption = CURLOPTTYPE_LONG + 59;
435pub const CURLOPT_POSTFIELDSIZE: CURLoption = CURLOPTTYPE_LONG + 60;
436pub const CURLOPT_HTTPPROXYTUNNEL: CURLoption = CURLOPTTYPE_LONG + 61;
437pub const CURLOPT_INTERFACE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 62;
438pub const CURLOPT_KRBLEVEL: CURLoption = CURLOPTTYPE_OBJECTPOINT + 63;
439pub const CURLOPT_SSL_VERIFYPEER: CURLoption = CURLOPTTYPE_LONG + 64;
440pub const CURLOPT_CAINFO: CURLoption = CURLOPTTYPE_OBJECTPOINT + 65;
441pub const CURLOPT_MAXREDIRS: CURLoption = CURLOPTTYPE_LONG + 68;
442pub const CURLOPT_FILETIME: CURLoption = CURLOPTTYPE_LONG + 69;
443pub const CURLOPT_TELNETOPTIONS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 70;
444pub const CURLOPT_MAXCONNECTS: CURLoption = CURLOPTTYPE_LONG + 71;
445pub const CURLOPT_CLOSEPOLICY: CURLoption = CURLOPTTYPE_LONG + 72;
446pub const CURLOPT_FRESH_CONNECT: CURLoption = CURLOPTTYPE_LONG + 74;
447pub const CURLOPT_FORBID_REUSE: CURLoption = CURLOPTTYPE_LONG + 75;
448pub const CURLOPT_RANDOM_FILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 76;
449pub const CURLOPT_EGDSOCKET: CURLoption = CURLOPTTYPE_OBJECTPOINT + 77;
450pub const CURLOPT_CONNECTTIMEOUT: CURLoption = CURLOPTTYPE_LONG + 78;
451pub const CURLOPT_HEADERFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 79;
452pub const CURLOPT_HTTPGET: CURLoption = CURLOPTTYPE_LONG + 80;
453pub const CURLOPT_SSL_VERIFYHOST: CURLoption = CURLOPTTYPE_LONG + 81;
454pub const CURLOPT_COOKIEJAR: CURLoption = CURLOPTTYPE_OBJECTPOINT + 82;
455pub const CURLOPT_SSL_CIPHER_LIST: CURLoption = CURLOPTTYPE_OBJECTPOINT + 83;
456pub const CURLOPT_HTTP_VERSION: CURLoption = CURLOPTTYPE_LONG + 84;
457pub const CURLOPT_FTP_USE_EPSV: CURLoption = CURLOPTTYPE_LONG + 85;
458pub const CURLOPT_SSLCERTTYPE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 86;
459pub const CURLOPT_SSLKEY: CURLoption = CURLOPTTYPE_OBJECTPOINT + 87;
460pub const CURLOPT_SSLKEYTYPE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 88;
461pub const CURLOPT_SSLENGINE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 89;
462pub const CURLOPT_SSLENGINE_DEFAULT: CURLoption = CURLOPTTYPE_LONG + 90;
463pub const CURLOPT_DNS_USE_GLOBAL_CACHE: CURLoption = CURLOPTTYPE_LONG + 91;
464pub const CURLOPT_DNS_CACHE_TIMEOUT: CURLoption = CURLOPTTYPE_LONG + 92;
465pub const CURLOPT_PREQUOTE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 93;
466pub const CURLOPT_DEBUGFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 94;
467pub const CURLOPT_DEBUGDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 95;
468pub const CURLOPT_COOKIESESSION: CURLoption = CURLOPTTYPE_LONG + 96;
469pub const CURLOPT_CAPATH: CURLoption = CURLOPTTYPE_OBJECTPOINT + 97;
470pub const CURLOPT_BUFFERSIZE: CURLoption = CURLOPTTYPE_LONG + 98;
471pub const CURLOPT_NOSIGNAL: CURLoption = CURLOPTTYPE_LONG + 99;
472pub const CURLOPT_SHARE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 100;
473pub const CURLOPT_PROXYTYPE: CURLoption = CURLOPTTYPE_LONG + 101;
474pub const CURLOPT_ACCEPT_ENCODING: CURLoption = CURLOPTTYPE_OBJECTPOINT + 102;
475pub const CURLOPT_PRIVATE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 103;
476pub const CURLOPT_HTTP200ALIASES: CURLoption = CURLOPTTYPE_OBJECTPOINT + 104;
477pub const CURLOPT_UNRESTRICTED_AUTH: CURLoption = CURLOPTTYPE_LONG + 105;
478pub const CURLOPT_FTP_USE_EPRT: CURLoption = CURLOPTTYPE_LONG + 106;
479pub const CURLOPT_HTTPAUTH: CURLoption = CURLOPTTYPE_LONG + 107;
480pub const CURLOPT_SSL_CTX_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 108;
481pub const CURLOPT_SSL_CTX_DATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 109;
482pub const CURLOPT_FTP_CREATE_MISSING_DIRS: CURLoption = CURLOPTTYPE_LONG + 110;
483pub const CURLOPT_PROXYAUTH: CURLoption = CURLOPTTYPE_LONG + 111;
484pub const CURLOPT_FTP_RESPONSE_TIMEOUT: CURLoption = CURLOPTTYPE_LONG + 112;
485pub const CURLOPT_IPRESOLVE: CURLoption = CURLOPTTYPE_LONG + 113;
486pub const CURLOPT_MAXFILESIZE: CURLoption = CURLOPTTYPE_LONG + 114;
487pub const CURLOPT_INFILESIZE_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 115;
488pub const CURLOPT_RESUME_FROM_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 116;
489pub const CURLOPT_MAXFILESIZE_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 117;
490pub const CURLOPT_NETRC_FILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 118;
491pub const CURLOPT_USE_SSL: CURLoption = CURLOPTTYPE_LONG + 119;
492pub const CURLOPT_POSTFIELDSIZE_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 120;
493pub const CURLOPT_TCP_NODELAY: CURLoption = CURLOPTTYPE_LONG + 121;
494pub const CURLOPT_FTPSSLAUTH: CURLoption = CURLOPTTYPE_LONG + 129;
495pub const CURLOPT_IOCTLFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 130;
496pub const CURLOPT_IOCTLDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 131;
497pub const CURLOPT_FTP_ACCOUNT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 134;
498pub const CURLOPT_COOKIELIST: CURLoption = CURLOPTTYPE_OBJECTPOINT + 135;
499pub const CURLOPT_IGNORE_CONTENT_LENGTH: CURLoption = CURLOPTTYPE_LONG + 136;
500pub const CURLOPT_FTP_SKIP_PASV_IP: CURLoption = CURLOPTTYPE_LONG + 137;
501pub const CURLOPT_FTP_FILEMETHOD: CURLoption = CURLOPTTYPE_LONG + 138;
502pub const CURLOPT_LOCALPORT: CURLoption = CURLOPTTYPE_LONG + 139;
503pub const CURLOPT_LOCALPORTRANGE: CURLoption = CURLOPTTYPE_LONG + 140;
504pub const CURLOPT_CONNECT_ONLY: CURLoption = CURLOPTTYPE_LONG + 141;
505pub const CURLOPT_CONV_FROM_NETWORK_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 142;
506pub const CURLOPT_CONV_TO_NETWORK_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 143;
507pub const CURLOPT_CONV_FROM_UTF8_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 144;
508pub const CURLOPT_MAX_SEND_SPEED_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 145;
509pub const CURLOPT_MAX_RECV_SPEED_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 146;
510pub const CURLOPT_FTP_ALTERNATIVE_TO_USER: CURLoption = CURLOPTTYPE_OBJECTPOINT + 147;
511pub const CURLOPT_SOCKOPTFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 148;
512pub const CURLOPT_SOCKOPTDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 149;
513pub const CURLOPT_SSL_SESSIONID_CACHE: CURLoption = CURLOPTTYPE_LONG + 150;
514pub const CURLOPT_SSH_AUTH_TYPES: CURLoption = CURLOPTTYPE_LONG + 151;
515pub const CURLOPT_SSH_PUBLIC_KEYFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 152;
516pub const CURLOPT_SSH_PRIVATE_KEYFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 153;
517pub const CURLOPT_FTP_SSL_CCC: CURLoption = CURLOPTTYPE_LONG + 154;
518pub const CURLOPT_TIMEOUT_MS: CURLoption = CURLOPTTYPE_LONG + 155;
519pub const CURLOPT_CONNECTTIMEOUT_MS: CURLoption = CURLOPTTYPE_LONG + 156;
520pub const CURLOPT_HTTP_TRANSFER_DECODING: CURLoption = CURLOPTTYPE_LONG + 157;
521pub const CURLOPT_HTTP_CONTENT_DECODING: CURLoption = CURLOPTTYPE_LONG + 158;
522pub const CURLOPT_NEW_FILE_PERMS: CURLoption = CURLOPTTYPE_LONG + 159;
523pub const CURLOPT_NEW_DIRECTORY_PERMS: CURLoption = CURLOPTTYPE_LONG + 160;
524pub const CURLOPT_POSTREDIR: CURLoption = CURLOPTTYPE_LONG + 161;
525pub const CURLOPT_SSH_HOST_PUBLIC_KEY_MD5: CURLoption = CURLOPTTYPE_OBJECTPOINT + 162;
526pub const CURLOPT_OPENSOCKETFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 163;
527pub const CURLOPT_OPENSOCKETDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 164;
528pub const CURLOPT_COPYPOSTFIELDS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 165;
529pub const CURLOPT_PROXY_TRANSFER_MODE: CURLoption = CURLOPTTYPE_LONG + 166;
530pub const CURLOPT_SEEKFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 167;
531pub const CURLOPT_SEEKDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 168;
532pub const CURLOPT_CRLFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 169;
533pub const CURLOPT_ISSUERCERT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 170;
534pub const CURLOPT_ADDRESS_SCOPE: CURLoption = CURLOPTTYPE_LONG + 171;
535pub const CURLOPT_CERTINFO: CURLoption = CURLOPTTYPE_LONG + 172;
536pub const CURLOPT_USERNAME: CURLoption = CURLOPTTYPE_OBJECTPOINT + 173;
537pub const CURLOPT_PASSWORD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 174;
538pub const CURLOPT_PROXYUSERNAME: CURLoption = CURLOPTTYPE_OBJECTPOINT + 175;
539pub const CURLOPT_PROXYPASSWORD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 176;
540pub const CURLOPT_NOPROXY: CURLoption = CURLOPTTYPE_OBJECTPOINT + 177;
541pub const CURLOPT_TFTP_BLKSIZE: CURLoption = CURLOPTTYPE_LONG + 178;
542pub const CURLOPT_SOCKS5_GSSAPI_SERVICE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 179;
543pub const CURLOPT_SOCKS5_GSSAPI_NEC: CURLoption = CURLOPTTYPE_LONG + 180;
544pub const CURLOPT_PROTOCOLS: CURLoption = CURLOPTTYPE_LONG + 181;
545pub const CURLOPT_REDIR_PROTOCOLS: CURLoption = CURLOPTTYPE_LONG + 182;
546pub const CURLOPT_SSH_KNOWNHOSTS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 183;
547pub const CURLOPT_SSH_KEYFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 184;
548pub const CURLOPT_SSH_KEYDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 185;
549pub const CURLOPT_MAIL_FROM: CURLoption = CURLOPTTYPE_OBJECTPOINT + 186;
550pub const CURLOPT_MAIL_RCPT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 187;
551pub const CURLOPT_FTP_USE_PRET: CURLoption = CURLOPTTYPE_LONG + 188;
552pub const CURLOPT_RTSP_REQUEST: CURLoption = CURLOPTTYPE_LONG + 189;
553pub const CURLOPT_RTSP_SESSION_ID: CURLoption = CURLOPTTYPE_OBJECTPOINT + 190;
554pub const CURLOPT_RTSP_STREAM_URI: CURLoption = CURLOPTTYPE_OBJECTPOINT + 191;
555pub const CURLOPT_RTSP_TRANSPORT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 192;
556pub const CURLOPT_RTSP_CLIENT_CSEQ: CURLoption = CURLOPTTYPE_LONG + 193;
557pub const CURLOPT_RTSP_SERVER_CSEQ: CURLoption = CURLOPTTYPE_LONG + 194;
558pub const CURLOPT_INTERLEAVEDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 195;
559pub const CURLOPT_INTERLEAVEFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 196;
560pub const CURLOPT_WILDCARDMATCH: CURLoption = CURLOPTTYPE_LONG + 197;
561pub const CURLOPT_CHUNK_BGN_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 198;
562pub const CURLOPT_CHUNK_END_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 199;
563pub const CURLOPT_FNMATCH_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 200;
564pub const CURLOPT_CHUNK_DATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 201;
565pub const CURLOPT_FNMATCH_DATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 202;
566pub const CURLOPT_RESOLVE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 203;
567pub const CURLOPT_TLSAUTH_USERNAME: CURLoption = CURLOPTTYPE_OBJECTPOINT + 204;
568pub const CURLOPT_TLSAUTH_PASSWORD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 205;
569pub const CURLOPT_TLSAUTH_TYPE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 206;
570pub const CURLOPT_TRANSFER_ENCODING: CURLoption = CURLOPTTYPE_LONG + 207;
571pub const CURLOPT_CLOSESOCKETFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 208;
572pub const CURLOPT_CLOSESOCKETDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 209;
573pub const CURLOPT_GSSAPI_DELEGATION: CURLoption = CURLOPTTYPE_LONG + 210;
574pub const CURLOPT_DNS_SERVERS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 211;
575// pub const CURLOPT_ACCEPTTIMEOUT_MS: CURLoption = CURLOPTTYPE_LONG + 212;
576pub const CURLOPT_TCP_KEEPALIVE: CURLoption = CURLOPTTYPE_LONG + 213;
577pub const CURLOPT_TCP_KEEPIDLE: CURLoption = CURLOPTTYPE_LONG + 214;
578pub const CURLOPT_TCP_KEEPINTVL: CURLoption = CURLOPTTYPE_LONG + 215;
579pub const CURLOPT_SSL_OPTIONS: CURLoption = CURLOPTTYPE_LONG + 216;
580// pub const CURLOPT_MAIL_AUTH: CURLoption = CURLOPTTYPE_OBJECTPOINT + 217;
581// pub const CURLOPT_SASL_IR: CURLoption = CURLOPTTYPE_LONG + 218;
582// pub const CURLOPT_XFERINFOFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 219;
583// pub const CURLOPT_XOAUTH2_BEARER: CURLoption = CURLOPTTYPE_OBJECTPOINT + 220;
584// pub const CURLOPT_DNS_INTERFACE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 221;
585// pub const CURLOPT_DNS_LOCAL_IP4: CURLoption = CURLOPTTYPE_OBJECTPOINT + 222;
586// pub const CURLOPT_DNS_LOCAL_IP6: CURLoption = CURLOPTTYPE_OBJECTPOINT + 223;
587// pub const CURLOPT_LOGIN_OPTIONS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 224;
588pub const CURLOPT_EXPECT_100_TIMEOUT_MS: CURLoption = CURLOPTTYPE_LONG + 227;
589pub const CURLOPT_PINNEDPUBLICKEY: CURLoption = CURLOPTTYPE_OBJECTPOINT + 230;
590pub const CURLOPT_UNIX_SOCKET_PATH: CURLoption = CURLOPTTYPE_OBJECTPOINT + 231;
591pub const CURLOPT_PATH_AS_IS: CURLoption = CURLOPTTYPE_LONG + 234;
592pub const CURLOPT_PIPEWAIT: CURLoption = CURLOPTTYPE_LONG + 237;
593pub const CURLOPT_CONNECT_TO: CURLoption = CURLOPTTYPE_OBJECTPOINT + 243;
594pub const CURLOPT_PROXY_CAINFO: CURLoption = CURLOPTTYPE_OBJECTPOINT + 246;
595pub const CURLOPT_PROXY_CAPATH: CURLoption = CURLOPTTYPE_OBJECTPOINT + 247;
596pub const CURLOPT_PROXY_SSL_VERIFYPEER: CURLoption = CURLOPTTYPE_LONG + 248;
597pub const CURLOPT_PROXY_SSL_VERIFYHOST: CURLoption = CURLOPTTYPE_LONG + 249;
598pub const CURLOPT_PROXY_SSLVERSION: CURLoption = CURLOPTTYPE_VALUES + 250;
599pub const CURLOPT_PROXY_SSLCERT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 254;
600pub const CURLOPT_PROXY_SSLCERTTYPE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 255;
601pub const CURLOPT_PROXY_SSLKEY: CURLoption = CURLOPTTYPE_OBJECTPOINT + 256;
602pub const CURLOPT_PROXY_SSLKEYTYPE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 257;
603pub const CURLOPT_PROXY_KEYPASSWD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 258;
604pub const CURLOPT_PROXY_SSL_CIPHER_LIST: CURLoption = CURLOPTTYPE_OBJECTPOINT + 259;
605pub const CURLOPT_PROXY_CRLFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 260;
606pub const CURLOPT_PROXY_SSL_OPTIONS: CURLoption = CURLOPTTYPE_LONG + 261;
607
608pub const CURLOPT_ABSTRACT_UNIX_SOCKET: CURLoption = CURLOPTTYPE_OBJECTPOINT + 264;
609
610pub const CURLOPT_DOH_URL: CURLoption = CURLOPTTYPE_OBJECTPOINT + 279;
611pub const CURLOPT_UPLOAD_BUFFERSIZE: CURLoption = CURLOPTTYPE_LONG + 280;
612
613pub const CURLOPT_HTTP09_ALLOWED: CURLoption = CURLOPTTYPE_LONG + 285;
614
615pub const CURLOPT_MAXAGE_CONN: CURLoption = CURLOPTTYPE_LONG + 288;
616
617pub const CURLOPT_SSLCERT_BLOB: CURLoption = CURLOPTTYPE_BLOB + 291;
618pub const CURLOPT_SSLKEY_BLOB: CURLoption = CURLOPTTYPE_BLOB + 292;
619pub const CURLOPT_PROXY_SSLCERT_BLOB: CURLoption = CURLOPTTYPE_BLOB + 293;
620pub const CURLOPT_PROXY_SSLKEY_BLOB: CURLoption = CURLOPTTYPE_BLOB + 294;
621pub const CURLOPT_ISSUERCERT_BLOB: CURLoption = CURLOPTTYPE_BLOB + 295;
622
623pub const CURLOPT_PROXY_ISSUERCERT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 296;
624pub const CURLOPT_PROXY_ISSUERCERT_BLOB: CURLoption = CURLOPTTYPE_BLOB + 297;
625
626pub const CURLOPT_AWS_SIGV4: CURLoption = CURLOPTTYPE_OBJECTPOINT + 305;
627
628pub const CURLOPT_DOH_SSL_VERIFYPEER: CURLoption = CURLOPTTYPE_LONG + 306;
629pub const CURLOPT_DOH_SSL_VERIFYHOST: CURLoption = CURLOPTTYPE_LONG + 307;
630pub const CURLOPT_DOH_SSL_VERIFYSTATUS: CURLoption = CURLOPTTYPE_LONG + 308;
631pub const CURLOPT_CAINFO_BLOB: CURLoption = CURLOPTTYPE_BLOB + 309;
632pub const CURLOPT_PROXY_CAINFO_BLOB: CURLoption = CURLOPTTYPE_BLOB + 310;
633
634pub const CURL_IPRESOLVE_WHATEVER: c_int = 0;
635pub const CURL_IPRESOLVE_V4: c_int = 1;
636pub const CURL_IPRESOLVE_V6: c_int = 2;
637
638pub const CURLSSLOPT_ALLOW_BEAST: c_long = 1 << 0;
639pub const CURLSSLOPT_NO_REVOKE: c_long = 1 << 1;
640pub const CURLSSLOPT_NO_PARTIALCHAIN: c_long = 1 << 2;
641pub const CURLSSLOPT_REVOKE_BEST_EFFORT: c_long = 1 << 3;
642pub const CURLSSLOPT_NATIVE_CA: c_long = 1 << 4;
643pub const CURLSSLOPT_AUTO_CLIENT_CERT: c_long = 1 << 5;
644
645/// These enums are for use with the CURLOPT_HTTP_VERSION option.
646///
647/// Setting this means we don't care, and that we'd like the library to choose
648/// the best possible for us!
649pub const CURL_HTTP_VERSION_NONE: c_int = 0;
650/// Please use HTTP 1.0 in the request
651pub const CURL_HTTP_VERSION_1_0: c_int = 1;
652/// Please use HTTP 1.1 in the request
653pub const CURL_HTTP_VERSION_1_1: c_int = 2;
654/// Please use HTTP 2 in the request
655/// (Added in CURL 7.33.0)
656pub const CURL_HTTP_VERSION_2_0: c_int = 3;
657/// Use version 2 for HTTPS, version 1.1 for HTTP
658/// (Added in CURL 7.47.0)
659pub const CURL_HTTP_VERSION_2TLS: c_int = 4;
660/// Please use HTTP 2 without HTTP/1.1 Upgrade
661/// (Added in CURL 7.49.0)
662pub const CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE: c_int = 5;
663/// Makes use of explicit HTTP/3 without fallback.
664/// (Added in CURL 7.66.0)
665pub const CURL_HTTP_VERSION_3: c_int = 30;
666
667// Note that the type here is wrong, it's just intended to just be an enum.
668pub const CURL_SSLVERSION_DEFAULT: CURLoption = 0;
669pub const CURL_SSLVERSION_TLSv1: CURLoption = 1;
670pub const CURL_SSLVERSION_SSLv2: CURLoption = 2;
671pub const CURL_SSLVERSION_SSLv3: CURLoption = 3;
672pub const CURL_SSLVERSION_TLSv1_0: CURLoption = 4;
673pub const CURL_SSLVERSION_TLSv1_1: CURLoption = 5;
674pub const CURL_SSLVERSION_TLSv1_2: CURLoption = 6;
675pub const CURL_SSLVERSION_TLSv1_3: CURLoption = 7;
676
677pub const CURLOPT_READDATA: CURLoption = CURLOPT_INFILE;
678pub const CURLOPT_WRITEDATA: CURLoption = CURLOPT_FILE;
679pub const CURLOPT_HEADERDATA: CURLoption = CURLOPT_WRITEHEADER;
680
681pub type curl_TimeCond = __enum_ty;
682pub const CURL_TIMECOND_NONE: curl_TimeCond = 0;
683pub const CURL_TIMECOND_IFMODSINCE: curl_TimeCond = 1;
684pub const CURL_TIMECOND_IFUNMODSINCE: curl_TimeCond = 2;
685pub const CURL_TIMECOND_LASTMOD: curl_TimeCond = 3;
686
687pub type CURLformoption = __enum_ty;
688pub const CURLFORM_NOTHING: CURLformoption = 0;
689pub const CURLFORM_COPYNAME: CURLformoption = 1;
690pub const CURLFORM_PTRNAME: CURLformoption = 2;
691pub const CURLFORM_NAMELENGTH: CURLformoption = 3;
692pub const CURLFORM_COPYCONTENTS: CURLformoption = 4;
693pub const CURLFORM_PTRCONTENTS: CURLformoption = 5;
694pub const CURLFORM_CONTENTSLENGTH: CURLformoption = 6;
695pub const CURLFORM_FILECONTENT: CURLformoption = 7;
696pub const CURLFORM_ARRAY: CURLformoption = 8;
697pub const CURLFORM_OBSOLETE: CURLformoption = 9;
698pub const CURLFORM_FILE: CURLformoption = 10;
699pub const CURLFORM_BUFFER: CURLformoption = 11;
700pub const CURLFORM_BUFFERPTR: CURLformoption = 12;
701pub const CURLFORM_BUFFERLENGTH: CURLformoption = 13;
702pub const CURLFORM_CONTENTTYPE: CURLformoption = 14;
703pub const CURLFORM_CONTENTHEADER: CURLformoption = 15;
704pub const CURLFORM_FILENAME: CURLformoption = 16;
705pub const CURLFORM_END: CURLformoption = 17;
706pub const CURLFORM_STREAM: CURLformoption = 19;
707
708pub type CURLFORMcode = __enum_ty;
709pub const CURL_FORMADD_OK: CURLFORMcode = 0;
710pub const CURL_FORMADD_MEMORY: CURLFORMcode = 1;
711pub const CURL_FORMADD_OPTION_TWICE: CURLFORMcode = 2;
712pub const CURL_FORMADD_NULL: CURLFORMcode = 3;
713pub const CURL_FORMADD_UNKNOWN_OPTION: CURLFORMcode = 4;
714pub const CURL_FORMADD_INCOMPLETE: CURLFORMcode = 5;
715pub const CURL_FORMADD_ILLEGAL_ARRAY: CURLFORMcode = 6;
716pub const CURL_FORMADD_DISABLED: CURLFORMcode = 7;
717
718pub const CURL_REDIR_POST_301: c_ulong = 1;
719pub const CURL_REDIR_POST_302: c_ulong = 2;
720pub const CURL_REDIR_POST_303: c_ulong = 4;
721pub const CURL_REDIR_POST_ALL: c_ulong =
722 CURL_REDIR_POST_301 | CURL_REDIR_POST_302 | CURL_REDIR_POST_303;
723
724#[repr(C)]
725pub struct curl_forms {
726 pub option: CURLformoption,
727 pub value: *const c_char,
728}
729
730pub type curl_formget_callback = extern "C" fn(*mut c_void, *const c_char, size_t) -> size_t;
731
732#[repr(C)]
733pub struct curl_slist {
734 pub data: *mut c_char,
735 pub next: *mut curl_slist,
736}
737
738#[repr(C)]
739pub struct curl_certinfo {
740 pub num_of_certs: c_int,
741 pub certinfo: *mut *mut curl_slist,
742}
743
744// pub type curl_sslbackend = __enum_ty;
745// pub const CURLSSLBACKEND_NONE: curl_sslbackend = 0;
746// pub const CURLSSLBACKEND_OPENSSL: curl_sslbackend = 1;
747// pub const CURLSSLBACKEND_GNUTLS: curl_sslbackend = 2;
748// pub const CURLSSLBACKEND_NSS: curl_sslbackend = 3;
749// pub const CURLSSLBACKEND_QSOSSL: curl_sslbackend = 4;
750// pub const CURLSSLBACKEND_GSKIT: curl_sslbackend = 5;
751// pub const CURLSSLBACKEND_POLARSSL: curl_sslbackend = 6;
752// pub const CURLSSLBACKEND_CYASSL: curl_sslbackend = 7;
753// pub const CURLSSLBACKEND_SCHANNEL: curl_sslbackend = 8;
754// pub const CURLSSLBACKEND_DARWINSSL: curl_sslbackend = 9;
755
756// #[repr(C)]
757// pub struct curl_tlssessioninfo {
758// pub backend: curl_sslbackend,
759// pub internals: *mut c_void,
760// }
761
762pub const CURLINFO_STRING: CURLINFO = 0x100000;
763pub const CURLINFO_LONG: CURLINFO = 0x200000;
764pub const CURLINFO_DOUBLE: CURLINFO = 0x300000;
765pub const CURLINFO_SLIST: CURLINFO = 0x400000;
766pub const CURLINFO_MASK: CURLINFO = 0x0fffff;
767pub const CURLINFO_TYPEMASK: CURLINFO = 0xf00000;
768
769pub const CURLINFO_EFFECTIVE_URL: CURLINFO = CURLINFO_STRING + 1;
770pub const CURLINFO_RESPONSE_CODE: CURLINFO = CURLINFO_LONG + 2;
771pub const CURLINFO_TOTAL_TIME: CURLINFO = CURLINFO_DOUBLE + 3;
772pub const CURLINFO_NAMELOOKUP_TIME: CURLINFO = CURLINFO_DOUBLE + 4;
773pub const CURLINFO_CONNECT_TIME: CURLINFO = CURLINFO_DOUBLE + 5;
774pub const CURLINFO_PRETRANSFER_TIME: CURLINFO = CURLINFO_DOUBLE + 6;
775pub const CURLINFO_SIZE_UPLOAD: CURLINFO = CURLINFO_DOUBLE + 7;
776pub const CURLINFO_SIZE_DOWNLOAD: CURLINFO = CURLINFO_DOUBLE + 8;
777pub const CURLINFO_SPEED_DOWNLOAD: CURLINFO = CURLINFO_DOUBLE + 9;
778pub const CURLINFO_SPEED_UPLOAD: CURLINFO = CURLINFO_DOUBLE + 10;
779pub const CURLINFO_HEADER_SIZE: CURLINFO = CURLINFO_LONG + 11;
780pub const CURLINFO_REQUEST_SIZE: CURLINFO = CURLINFO_LONG + 12;
781pub const CURLINFO_SSL_VERIFYRESULT: CURLINFO = CURLINFO_LONG + 13;
782pub const CURLINFO_FILETIME: CURLINFO = CURLINFO_LONG + 14;
783pub const CURLINFO_CONTENT_LENGTH_DOWNLOAD: CURLINFO = CURLINFO_DOUBLE + 15;
784pub const CURLINFO_CONTENT_LENGTH_UPLOAD: CURLINFO = CURLINFO_DOUBLE + 16;
785pub const CURLINFO_STARTTRANSFER_TIME: CURLINFO = CURLINFO_DOUBLE + 17;
786pub const CURLINFO_CONTENT_TYPE: CURLINFO = CURLINFO_STRING + 18;
787pub const CURLINFO_REDIRECT_TIME: CURLINFO = CURLINFO_DOUBLE + 19;
788pub const CURLINFO_REDIRECT_COUNT: CURLINFO = CURLINFO_LONG + 20;
789pub const CURLINFO_PRIVATE: CURLINFO = CURLINFO_STRING + 21;
790pub const CURLINFO_HTTP_CONNECTCODE: CURLINFO = CURLINFO_LONG + 22;
791pub const CURLINFO_HTTPAUTH_AVAIL: CURLINFO = CURLINFO_LONG + 23;
792pub const CURLINFO_PROXYAUTH_AVAIL: CURLINFO = CURLINFO_LONG + 24;
793pub const CURLINFO_OS_ERRNO: CURLINFO = CURLINFO_LONG + 25;
794pub const CURLINFO_NUM_CONNECTS: CURLINFO = CURLINFO_LONG + 26;
795pub const CURLINFO_SSL_ENGINES: CURLINFO = CURLINFO_SLIST + 27;
796pub const CURLINFO_COOKIELIST: CURLINFO = CURLINFO_SLIST + 28;
797pub const CURLINFO_LASTSOCKET: CURLINFO = CURLINFO_LONG + 29;
798pub const CURLINFO_FTP_ENTRY_PATH: CURLINFO = CURLINFO_STRING + 30;
799pub const CURLINFO_REDIRECT_URL: CURLINFO = CURLINFO_STRING + 31;
800pub const CURLINFO_PRIMARY_IP: CURLINFO = CURLINFO_STRING + 32;
801pub const CURLINFO_APPCONNECT_TIME: CURLINFO = CURLINFO_DOUBLE + 33;
802pub const CURLINFO_CERTINFO: CURLINFO = CURLINFO_SLIST + 34;
803pub const CURLINFO_CONDITION_UNMET: CURLINFO = CURLINFO_LONG + 35;
804pub const CURLINFO_RTSP_SESSION_ID: CURLINFO = CURLINFO_STRING + 36;
805pub const CURLINFO_RTSP_CLIENT_CSEQ: CURLINFO = CURLINFO_LONG + 37;
806pub const CURLINFO_RTSP_SERVER_CSEQ: CURLINFO = CURLINFO_LONG + 38;
807pub const CURLINFO_RTSP_CSEQ_RECV: CURLINFO = CURLINFO_LONG + 39;
808pub const CURLINFO_PRIMARY_PORT: CURLINFO = CURLINFO_LONG + 40;
809pub const CURLINFO_LOCAL_IP: CURLINFO = CURLINFO_STRING + 41;
810pub const CURLINFO_LOCAL_PORT: CURLINFO = CURLINFO_LONG + 42;
811// pub const CURLINFO_TLS_SESSION: CURLINFO = CURLINFO_SLIST + 43;
812
813pub type curl_closepolicy = __enum_ty;
814pub const CURLCLOSEPOLICY_NONE: curl_closepolicy = 0;
815pub const CURLCLOSEPOLICY_OLDEST: curl_closepolicy = 1;
816pub const CURLCLOSEPOLICY_LEAST_RECENTLY_USED: curl_closepolicy = 2;
817pub const CURLCLOSEPOLICY_LEAST_TRAFFIC: curl_closepolicy = 3;
818pub const CURLCLOSEPOLICY_SLOWEST: curl_closepolicy = 4;
819pub const CURLCLOSEPOLICY_CALLBACK: curl_closepolicy = 5;
820
821pub const CURL_GLOBAL_SSL: c_long = 1 << 0;
822pub const CURL_GLOBAL_WIN32: c_long = 1 << 1;
823pub const CURL_GLOBAL_ALL: c_long = CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32;
824pub const CURL_GLOBAL_NOTHING: c_long = 0;
825pub const CURL_GLOBAL_DEFAULT: c_long = CURL_GLOBAL_ALL;
826// pub const CURL_GLOBAL_ACK_EINTR: c_long = 1 << 2;
827
828pub type curl_lock_data = __enum_ty;
829pub const CURL_LOCK_DATA_NONE: curl_lock_data = 0;
830pub const CURL_LOCK_DATA_SHARE: curl_lock_data = 1;
831pub const CURL_LOCK_DATA_COOKIE: curl_lock_data = 2;
832pub const CURL_LOCK_DATA_DNS: curl_lock_data = 3;
833pub const CURL_LOCK_DATA_SSL_SESSION: curl_lock_data = 4;
834pub const CURL_LOCK_DATA_CONNECT: curl_lock_data = 5;
835
836pub type curl_lock_access = __enum_ty;
837pub const CURL_LOCK_ACCESS_NONE: curl_lock_access = 0;
838pub const CURL_LOCK_ACCESS_SHARED: curl_lock_access = 1;
839pub const CURL_LOCK_ACCESS_SINGLE: curl_lock_access = 2;
840
841pub type curl_lock_function =
842 extern "C" fn(*mut CURL, curl_lock_data, curl_lock_access, *mut c_void);
843pub type curl_unlock_function = extern "C" fn(*mut CURL, curl_lock_data, *mut c_void);
844
845pub enum CURLSH {}
846
847pub type CURLSHcode = __enum_ty;
848pub const CURLSHE_OK: CURLSHcode = 0;
849pub const CURLSHE_BAD_OPTION: CURLSHcode = 1;
850pub const CURLSHE_IN_USE: CURLSHcode = 2;
851pub const CURLSHE_INVALID: CURLSHcode = 3;
852pub const CURLSHE_NOMEM: CURLSHcode = 4;
853// pub const CURLSHE_NOT_BUILT_IN: CURLSHcode = 5;
854
855pub type CURLSHoption = __enum_ty;
856pub const CURLSHOPT_NONE: CURLSHoption = 0;
857pub const CURLSHOPT_SHARE: CURLSHoption = 1;
858pub const CURLSHOPT_UNSHARE: CURLSHoption = 2;
859pub const CURLSHOPT_LOCKFUNC: CURLSHoption = 3;
860pub const CURLSHOPT_UNLOCKFUNC: CURLSHoption = 4;
861pub const CURLSHOPT_USERDATA: CURLSHoption = 5;
862
863pub const CURLVERSION_FIRST: CURLversion = 0;
864pub const CURLVERSION_SECOND: CURLversion = 1;
865pub const CURLVERSION_THIRD: CURLversion = 2;
866pub const CURLVERSION_FOURTH: CURLversion = 3;
867pub const CURLVERSION_FIFTH: CURLversion = 4;
868pub const CURLVERSION_SIXTH: CURLversion = 5;
869pub const CURLVERSION_SEVENTH: CURLversion = 6;
870pub const CURLVERSION_EIGHTH: CURLversion = 7;
871pub const CURLVERSION_NINTH: CURLversion = 8;
872pub const CURLVERSION_TENTH: CURLversion = 9;
873pub const CURLVERSION_ELEVENTH: CURLversion = 10;
874pub const CURLVERSION_NOW: CURLversion = CURLVERSION_ELEVENTH;
875
876#[repr(C)]
877pub struct curl_version_info_data {
878 pub age: CURLversion,
879 pub version: *const c_char,
880 pub version_num: c_uint,
881 pub host: *const c_char,
882 pub features: c_int,
883 pub ssl_version: *const c_char,
884 pub ssl_version_num: c_long,
885 pub libz_version: *const c_char,
886 pub protocols: *const *const c_char,
887 pub ares: *const c_char,
888 pub ares_num: c_int,
889 pub libidn: *const c_char,
890 pub iconv_ver_num: c_int,
891 pub libssh_version: *const c_char,
892 pub brotli_ver_num: c_uint,
893 pub brotli_version: *const c_char,
894 pub nghttp2_ver_num: c_uint,
895 pub nghttp2_version: *const c_char,
896 pub quic_version: *const c_char,
897 pub cainfo: *const c_char,
898 pub capath: *const c_char,
899 pub zstd_ver_num: c_uint,
900 pub zstd_version: *const c_char,
901 pub hyper_version: *const c_char,
902 pub gsasl_version: *const c_char,
903 pub feature_names: *const *const c_char,
904}
905
906pub const CURL_VERSION_IPV6: c_int = 1 << 0;
907pub const CURL_VERSION_KERBEROS4: c_int = 1 << 1;
908pub const CURL_VERSION_SSL: c_int = 1 << 2;
909pub const CURL_VERSION_LIBZ: c_int = 1 << 3;
910pub const CURL_VERSION_NTLM: c_int = 1 << 4;
911pub const CURL_VERSION_GSSNEGOTIATE: c_int = 1 << 5;
912pub const CURL_VERSION_DEBUG: c_int = 1 << 6;
913pub const CURL_VERSION_ASYNCHDNS: c_int = 1 << 7;
914pub const CURL_VERSION_SPNEGO: c_int = 1 << 8;
915pub const CURL_VERSION_LARGEFILE: c_int = 1 << 9;
916pub const CURL_VERSION_IDN: c_int = 1 << 10;
917pub const CURL_VERSION_SSPI: c_int = 1 << 11;
918pub const CURL_VERSION_CONV: c_int = 1 << 12;
919pub const CURL_VERSION_CURLDEBUG: c_int = 1 << 13;
920pub const CURL_VERSION_TLSAUTH_SRP: c_int = 1 << 14;
921pub const CURL_VERSION_NTLM_WB: c_int = 1 << 15;
922pub const CURL_VERSION_HTTP2: c_int = 1 << 16;
923pub const CURL_VERSION_UNIX_SOCKETS: c_int = 1 << 19;
924pub const CURL_VERSION_HTTPS_PROXY: c_int = 1 << 21;
925pub const CURL_VERSION_BROTLI: c_int = 1 << 23;
926pub const CURL_VERSION_ALTSVC: c_int = 1 << 24;
927pub const CURL_VERSION_HTTP3: c_int = 1 << 25;
928pub const CURL_VERSION_ZSTD: c_int = 1 << 26;
929pub const CURL_VERSION_UNICODE: c_int = 1 << 27;
930pub const CURL_VERSION_HSTS: c_int = 1 << 28;
931pub const CURL_VERSION_GSASL: c_int = 1 << 29;
932
933pub const CURLPAUSE_RECV: c_int = 1 << 0;
934pub const CURLPAUSE_RECV_CONT: c_int = 0;
935pub const CURLPAUSE_SEND: c_int = 1 << 2;
936pub const CURLPAUSE_SEND_CONT: c_int = 0;
937
938pub enum CURLM {}
939
940pub type CURLMcode = c_int;
941pub const CURLM_CALL_MULTI_PERFORM: CURLMcode = -1;
942pub const CURLM_OK: CURLMcode = 0;
943pub const CURLM_BAD_HANDLE: CURLMcode = 1;
944pub const CURLM_BAD_EASY_HANDLE: CURLMcode = 2;
945pub const CURLM_OUT_OF_MEMORY: CURLMcode = 3;
946pub const CURLM_INTERNAL_ERROR: CURLMcode = 4;
947pub const CURLM_BAD_SOCKET: CURLMcode = 5;
948pub const CURLM_UNKNOWN_OPTION: CURLMcode = 6;
949// pub const CURLM_ADDED_ALREADY: CURLMcode = 7;
950
951pub type CURLMSG = __enum_ty;
952pub const CURLMSG_NONE: CURLMSG = 0;
953pub const CURLMSG_DONE: CURLMSG = 1;
954
955#[repr(C)]
956pub struct CURLMsg {
957 pub msg: CURLMSG,
958 pub easy_handle: *mut CURL,
959 pub data: *mut c_void,
960}
961
962pub const CURL_WAIT_POLLIN: c_short = 0x1;
963pub const CURL_WAIT_POLLPRI: c_short = 0x2;
964pub const CURL_WAIT_POLLOUT: c_short = 0x4;
965
966#[repr(C)]
967pub struct curl_waitfd {
968 pub fd: curl_socket_t,
969 pub events: c_short,
970 pub revents: c_short,
971}
972
973pub const CURL_POLL_NONE: c_int = 0;
974pub const CURL_POLL_IN: c_int = 1;
975pub const CURL_POLL_OUT: c_int = 2;
976pub const CURL_POLL_INOUT: c_int = 3;
977pub const CURL_POLL_REMOVE: c_int = 4;
978pub const CURL_CSELECT_IN: c_int = 1;
979pub const CURL_CSELECT_OUT: c_int = 2;
980pub const CURL_CSELECT_ERR: c_int = 4;
981pub const CURL_SOCKET_TIMEOUT: curl_socket_t = CURL_SOCKET_BAD;
982
983pub type curl_socket_callback =
984 extern "C" fn(*mut CURL, curl_socket_t, c_int, *mut c_void, *mut c_void) -> c_int;
985pub type curl_multi_timer_callback = extern "C" fn(*mut CURLM, c_long, *mut c_void) -> c_int;
986
987pub type CURLMoption = __enum_ty;
988pub const CURLMOPT_SOCKETFUNCTION: CURLMoption = CURLOPTTYPE_FUNCTIONPOINT + 1;
989pub const CURLMOPT_SOCKETDATA: CURLMoption = CURLOPTTYPE_OBJECTPOINT + 2;
990pub const CURLMOPT_PIPELINING: CURLMoption = CURLOPTTYPE_LONG + 3;
991pub const CURLMOPT_TIMERFUNCTION: CURLMoption = CURLOPTTYPE_FUNCTIONPOINT + 4;
992pub const CURLMOPT_TIMERDATA: CURLMoption = CURLOPTTYPE_OBJECTPOINT + 5;
993pub const CURLMOPT_MAXCONNECTS: CURLMoption = CURLOPTTYPE_LONG + 6;
994pub const CURLMOPT_MAX_HOST_CONNECTIONS: CURLMoption = CURLOPTTYPE_LONG + 7;
995pub const CURLMOPT_MAX_PIPELINE_LENGTH: CURLMoption = CURLOPTTYPE_LONG + 8;
996pub const CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE: CURLMoption = CURLOPTTYPE_OFF_T + 9;
997pub const CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE: CURLMoption = CURLOPTTYPE_OFF_T + 10;
998pub const CURLMOPT_PIPELINING_SITE_BL: CURLMoption = CURLOPTTYPE_OBJECTPOINT + 11;
999pub const CURLMOPT_PIPELINING_SERVER_BL: CURLMoption = CURLOPTTYPE_OBJECTPOINT + 12;
1000pub const CURLMOPT_MAX_TOTAL_CONNECTIONS: CURLMoption = CURLOPTTYPE_LONG + 13;
1001
1002// These enums are for use with the CURLMOPT_PIPELINING option.
1003pub const CURLPIPE_NOTHING: c_long = 0;
1004pub const CURLPIPE_HTTP1: c_long = 1;
1005pub const CURLPIPE_MULTIPLEX: c_long = 2;
1006
1007pub const CURL_ERROR_SIZE: usize = 256;
1008
1009pub type curl_opensocket_callback =
1010 extern "C" fn(*mut c_void, curlsocktype, *mut curl_sockaddr) -> curl_socket_t;
1011pub type curlsocktype = __enum_ty;
1012pub const CURLSOCKTYPE_IPCXN: curlsocktype = 0;
1013pub const CURLSOCKTYPE_ACCEPT: curlsocktype = 1;
1014pub const CURLSOCKTYPE_LAST: curlsocktype = 2;
1015
1016#[repr(C)]
1017pub struct curl_sockaddr {
1018 pub family: c_int,
1019 pub socktype: c_int,
1020 pub protocol: c_int,
1021 pub addrlen: c_uint,
1022 #[cfg(unix)]
1023 pub addr: libc::sockaddr,
1024 #[cfg(windows)]
1025 pub addr: SOCKADDR,
1026}
1027
1028extern "C" {
1029 pub fn curl_formadd(
1030 httppost: *mut *mut curl_httppost,
1031 last_post: *mut *mut curl_httppost,
1032 ...
1033 ) -> CURLFORMcode;
1034 pub fn curl_formget(
1035 form: *mut curl_httppost,
1036 arg: *mut c_void,
1037 append: curl_formget_callback,
1038 ) -> c_int;
1039 pub fn curl_formfree(form: *mut curl_httppost);
1040
1041 pub fn curl_version() -> *mut c_char;
1042
1043 pub fn curl_easy_escape(handle: *mut CURL, string: *const c_char, length: c_int)
1044 -> *mut c_char;
1045 pub fn curl_easy_unescape(
1046 handle: *mut CURL,
1047 string: *const c_char,
1048 length: c_int,
1049 outlength: *mut c_int,
1050 ) -> *mut c_char;
1051 pub fn curl_free(p: *mut c_void);
1052
1053 pub fn curl_global_init(flags: c_long) -> CURLcode;
1054 pub fn curl_global_init_mem(
1055 flags: c_long,
1056 m: curl_malloc_callback,
1057 f: curl_free_callback,
1058 r: curl_realloc_callback,
1059 s: curl_strdup_callback,
1060 c: curl_calloc_callback,
1061 ) -> CURLcode;
1062 pub fn curl_global_cleanup();
1063
1064 pub fn curl_slist_append(list: *mut curl_slist, val: *const c_char) -> *mut curl_slist;
1065 pub fn curl_slist_free_all(list: *mut curl_slist);
1066
1067 pub fn curl_getdate(p: *const c_char, _: *const time_t) -> time_t;
1068
1069 pub fn curl_share_init() -> *mut CURLSH;
1070 pub fn curl_share_setopt(sh: *mut CURLSH, opt: CURLSHoption, ...) -> CURLSHcode;
1071 pub fn curl_share_cleanup(sh: *mut CURLSH) -> CURLSHcode;
1072
1073 pub fn curl_version_info(t: CURLversion) -> *mut curl_version_info_data;
1074
1075 pub fn curl_easy_strerror(code: CURLcode) -> *const c_char;
1076 pub fn curl_share_strerror(code: CURLSHcode) -> *const c_char;
1077 pub fn curl_easy_pause(handle: *mut CURL, bitmask: c_int) -> CURLcode;
1078
1079 pub fn curl_easy_init() -> *mut CURL;
1080 pub fn curl_easy_setopt(curl: *mut CURL, option: CURLoption, ...) -> CURLcode;
1081 pub fn curl_easy_perform(curl: *mut CURL) -> CURLcode;
1082 pub fn curl_easy_cleanup(curl: *mut CURL);
1083 pub fn curl_easy_getinfo(curl: *mut CURL, info: CURLINFO, ...) -> CURLcode;
1084 pub fn curl_easy_duphandle(curl: *mut CURL) -> *mut CURL;
1085 pub fn curl_easy_reset(curl: *mut CURL);
1086 pub fn curl_easy_recv(
1087 curl: *mut CURL,
1088 buffer: *mut c_void,
1089 buflen: size_t,
1090 n: *mut size_t,
1091 ) -> CURLcode;
1092 pub fn curl_easy_send(
1093 curl: *mut CURL,
1094 buffer: *const c_void,
1095 buflen: size_t,
1096 n: *mut size_t,
1097 ) -> CURLcode;
1098
1099 #[cfg(feature = "upkeep_7_62_0")]
1100 pub fn curl_easy_upkeep(curl: *mut CURL) -> CURLcode;
1101
1102 pub fn curl_multi_init() -> *mut CURLM;
1103 pub fn curl_multi_add_handle(multi_handle: *mut CURLM, curl_handle: *mut CURL) -> CURLMcode;
1104 pub fn curl_multi_remove_handle(multi_handle: *mut CURLM, curl_handle: *mut CURL) -> CURLMcode;
1105 pub fn curl_multi_fdset(
1106 multi_handle: *mut CURLM,
1107 read_fd_set: *mut fd_set,
1108 write_fd_set: *mut fd_set,
1109 exc_fd_set: *mut fd_set,
1110 max_fd: *mut c_int,
1111 ) -> CURLMcode;
1112 pub fn curl_multi_wait(
1113 multi_handle: *mut CURLM,
1114 extra_fds: *mut curl_waitfd,
1115 extra_nfds: c_uint,
1116 timeout_ms: c_int,
1117 ret: *mut c_int,
1118 ) -> CURLMcode;
1119
1120 #[cfg(feature = "poll_7_68_0")]
1121 pub fn curl_multi_poll(
1122 multi_handle: *mut CURLM,
1123 extra_fds: *mut curl_waitfd,
1124 extra_nfds: c_uint,
1125 timeout_ms: c_int,
1126 ret: *mut c_int,
1127 ) -> CURLMcode;
1128
1129 #[cfg(feature = "poll_7_68_0")]
1130 pub fn curl_multi_wakeup(multi_handle: *mut CURLM) -> CURLMcode;
1131
1132 pub fn curl_multi_perform(multi_handle: *mut CURLM, running_handles: *mut c_int) -> CURLMcode;
1133 pub fn curl_multi_cleanup(multi_handle: *mut CURLM) -> CURLMcode;
1134 pub fn curl_multi_info_read(
1135 multi_handle: *mut CURLM,
1136 msgs_in_queue: *mut c_int,
1137 ) -> *mut CURLMsg;
1138 pub fn curl_multi_strerror(code: CURLMcode) -> *const c_char;
1139 pub fn curl_multi_socket(
1140 multi_handle: *mut CURLM,
1141 s: curl_socket_t,
1142 running_handles: *mut c_int,
1143 ) -> CURLMcode;
1144 pub fn curl_multi_socket_action(
1145 multi_handle: *mut CURLM,
1146 s: curl_socket_t,
1147 ev_bitmask: c_int,
1148 running_handles: *mut c_int,
1149 ) -> CURLMcode;
1150 pub fn curl_multi_socket_all(
1151 multi_handle: *mut CURLM,
1152 running_handles: *mut c_int,
1153 ) -> CURLMcode;
1154 pub fn curl_multi_timeout(multi_handle: *mut CURLM, milliseconds: *mut c_long) -> CURLMcode;
1155 pub fn curl_multi_setopt(multi_handle: *mut CURLM, option: CURLMoption, ...) -> CURLMcode;
1156 pub fn curl_multi_assign(
1157 multi_handle: *mut CURLM,
1158 sockfd: curl_socket_t,
1159 sockp: *mut c_void,
1160 ) -> CURLMcode;
1161}
1162
1163pub fn rust_crate_version() -> &'static str {
1164 env!("CARGO_PKG_VERSION")
1165}
1166
1167#[doc(hidden)]
1168pub fn vendored() -> bool {
1169 cfg!(libcurl_vendored)
1170}
1171