1#![allow(non_snake_case)]
4#![allow(non_camel_case_types)]
5#![allow(non_upper_case_globals)]
6#![allow(clippy::unreadable_literal)]
7#![allow(clippy::upper_case_acronyms)]
8
9pub const SSH_CRYPT: u32 = 2;
10pub const SSH_MAC: u32 = 3;
11pub const SSH_COMP: u32 = 4;
12pub const SSH_LANG: u32 = 5;
13pub const SSH_AUTH_METHOD_UNKNOWN: u32 = 0;
14pub const SSH_AUTH_METHOD_NONE: u32 = 1;
15pub const SSH_AUTH_METHOD_PASSWORD: u32 = 2;
16pub const SSH_AUTH_METHOD_PUBLICKEY: u32 = 4;
17pub const SSH_AUTH_METHOD_HOSTBASED: u32 = 8;
18pub const SSH_AUTH_METHOD_INTERACTIVE: u32 = 16;
19pub const SSH_AUTH_METHOD_GSSAPI_MIC: u32 = 32;
20pub const SSH_CLOSED: u32 = 1;
21pub const SSH_READ_PENDING: u32 = 2;
22pub const SSH_CLOSED_ERROR: u32 = 4;
23pub const SSH_WRITE_PENDING: u32 = 8;
24pub const SSH_ADDRSTRLEN: u32 = 46;
25pub const SSH_OK: u32 = 0;
26pub const SSH_ERROR: i32 = -1;
27pub const SSH_AGAIN: i32 = -2;
28pub const SSH_EOF: i32 = -127;
29pub const SSH_LOG_NONE: u32 = 0;
30pub const SSH_LOG_WARN: u32 = 1;
31pub const SSH_LOG_INFO: u32 = 2;
32pub const SSH_LOG_DEBUG: u32 = 3;
33pub const SSH_LOG_TRACE: u32 = 4;
34pub const SSH_SOCKET_FLOW_WRITEWILLBLOCK: u32 = 1;
35pub const SSH_SOCKET_FLOW_WRITEWONTBLOCK: u32 = 2;
36pub const SSH_SOCKET_EXCEPTION_EOF: u32 = 1;
37pub const SSH_SOCKET_EXCEPTION_ERROR: u32 = 2;
38pub const SSH_SOCKET_CONNECTED_OK: u32 = 1;
39pub const SSH_SOCKET_CONNECTED_ERROR: u32 = 2;
40pub const SSH_SOCKET_CONNECTED_TIMEOUT: u32 = 3;
41pub const SSH_PACKET_USED: u32 = 1;
42pub const SSH_PACKET_NOT_USED: u32 = 2;
43pub const SSH_FXP_INIT: u32 = 1;
44pub const SSH_FXP_VERSION: u32 = 2;
45pub const SSH_FXP_OPEN: u32 = 3;
46pub const SSH_FXP_CLOSE: u32 = 4;
47pub const SSH_FXP_READ: u32 = 5;
48pub const SSH_FXP_WRITE: u32 = 6;
49pub const SSH_FXP_LSTAT: u32 = 7;
50pub const SSH_FXP_FSTAT: u32 = 8;
51pub const SSH_FXP_SETSTAT: u32 = 9;
52pub const SSH_FXP_FSETSTAT: u32 = 10;
53pub const SSH_FXP_OPENDIR: u32 = 11;
54pub const SSH_FXP_READDIR: u32 = 12;
55pub const SSH_FXP_REMOVE: u32 = 13;
56pub const SSH_FXP_MKDIR: u32 = 14;
57pub const SSH_FXP_RMDIR: u32 = 15;
58pub const SSH_FXP_REALPATH: u32 = 16;
59pub const SSH_FXP_STAT: u32 = 17;
60pub const SSH_FXP_RENAME: u32 = 18;
61pub const SSH_FXP_READLINK: u32 = 19;
62pub const SSH_FXP_SYMLINK: u32 = 20;
63pub const SSH_FXP_STATUS: u32 = 101;
64pub const SSH_FXP_HANDLE: u32 = 102;
65pub const SSH_FXP_DATA: u32 = 103;
66pub const SSH_FXP_NAME: u32 = 104;
67pub const SSH_FXP_ATTRS: u32 = 105;
68pub const SSH_FXP_EXTENDED: u32 = 200;
69pub const SSH_FXP_EXTENDED_REPLY: u32 = 201;
70pub const SSH_FILEXFER_ATTR_SIZE: u32 = 1;
71pub const SSH_FILEXFER_ATTR_PERMISSIONS: u32 = 4;
72pub const SSH_FILEXFER_ATTR_ACCESSTIME: u32 = 8;
73pub const SSH_FILEXFER_ATTR_ACMODTIME: u32 = 8;
74pub const SSH_FILEXFER_ATTR_CREATETIME: u32 = 16;
75pub const SSH_FILEXFER_ATTR_MODIFYTIME: u32 = 32;
76pub const SSH_FILEXFER_ATTR_ACL: u32 = 64;
77pub const SSH_FILEXFER_ATTR_OWNERGROUP: u32 = 128;
78pub const SSH_FILEXFER_ATTR_SUBSECOND_TIMES: u32 = 256;
79pub const SSH_FILEXFER_ATTR_EXTENDED: u32 = 2147483648;
80pub const SSH_FILEXFER_ATTR_UIDGID: u32 = 2;
81pub const SSH_FILEXFER_TYPE_REGULAR: u32 = 1;
82pub const SSH_FILEXFER_TYPE_DIRECTORY: u32 = 2;
83pub const SSH_FILEXFER_TYPE_SYMLINK: u32 = 3;
84pub const SSH_FILEXFER_TYPE_SPECIAL: u32 = 4;
85pub const SSH_FILEXFER_TYPE_UNKNOWN: u32 = 5;
86pub const SSH_FX_OK: u32 = 0;
87pub const SSH_FX_EOF: u32 = 1;
88pub const SSH_FX_NO_SUCH_FILE: u32 = 2;
89pub const SSH_FX_PERMISSION_DENIED: u32 = 3;
90pub const SSH_FX_FAILURE: u32 = 4;
91pub const SSH_FX_BAD_MESSAGE: u32 = 5;
92pub const SSH_FX_NO_CONNECTION: u32 = 6;
93pub const SSH_FX_CONNECTION_LOST: u32 = 7;
94pub const SSH_FX_OP_UNSUPPORTED: u32 = 8;
95pub const SSH_FX_INVALID_HANDLE: u32 = 9;
96pub const SSH_FX_NO_SUCH_PATH: u32 = 10;
97pub const SSH_FX_FILE_ALREADY_EXISTS: u32 = 11;
98pub const SSH_FX_WRITE_PROTECT: u32 = 12;
99pub const SSH_FX_NO_MEDIA: u32 = 13;
100pub const SSH_FXF_READ: u32 = 1;
101pub const SSH_FXF_WRITE: u32 = 2;
102pub const SSH_FXF_APPEND: u32 = 4;
103pub const SSH_FXF_CREAT: u32 = 8;
104pub const SSH_FXF_TRUNC: u32 = 16;
105pub const SSH_FXF_EXCL: u32 = 32;
106pub const SSH_FXF_TEXT: u32 = 64;
107pub const SSH_S_IFMT: u32 = 61440;
108pub const SSH_S_IFSOCK: u32 = 49152;
109pub const SSH_S_IFLNK: u32 = 40960;
110pub const SSH_S_IFREG: u32 = 32768;
111pub const SSH_S_IFBLK: u32 = 24576;
112pub const SSH_S_IFDIR: u32 = 16384;
113pub const SSH_S_IFCHR: u32 = 8192;
114pub const SSH_S_IFIFO: u32 = 4096;
115pub const SSH_FXF_RENAME_OVERWRITE: u32 = 1;
116pub const SSH_FXF_RENAME_ATOMIC: u32 = 2;
117pub const SSH_FXF_RENAME_NATIVE: u32 = 4;
118pub const SSH_FXE_STATVFS_ST_RDONLY: u32 = 1;
119pub const SSH_FXE_STATVFS_ST_NOSUID: u32 = 2;
120pub const SSH2_MSG_DISCONNECT: u32 = 1;
121pub const SSH2_MSG_IGNORE: u32 = 2;
122pub const SSH2_MSG_UNIMPLEMENTED: u32 = 3;
123pub const SSH2_MSG_DEBUG: u32 = 4;
124pub const SSH2_MSG_SERVICE_REQUEST: u32 = 5;
125pub const SSH2_MSG_SERVICE_ACCEPT: u32 = 6;
126pub const SSH2_MSG_EXT_INFO: u32 = 7;
127pub const SSH2_MSG_KEXINIT: u32 = 20;
128pub const SSH2_MSG_NEWKEYS: u32 = 21;
129pub const SSH2_MSG_KEXDH_INIT: u32 = 30;
130pub const SSH2_MSG_KEXDH_REPLY: u32 = 31;
131pub const SSH2_MSG_KEX_ECDH_INIT: u32 = 30;
132pub const SSH2_MSG_KEX_ECDH_REPLY: u32 = 31;
133pub const SSH2_MSG_ECMQV_INIT: u32 = 30;
134pub const SSH2_MSG_ECMQV_REPLY: u32 = 31;
135pub const SSH2_MSG_KEX_DH_GEX_REQUEST_OLD: u32 = 30;
136pub const SSH2_MSG_KEX_DH_GEX_GROUP: u32 = 31;
137pub const SSH2_MSG_KEX_DH_GEX_INIT: u32 = 32;
138pub const SSH2_MSG_KEX_DH_GEX_REPLY: u32 = 33;
139pub const SSH2_MSG_KEX_DH_GEX_REQUEST: u32 = 34;
140pub const SSH2_MSG_USERAUTH_REQUEST: u32 = 50;
141pub const SSH2_MSG_USERAUTH_FAILURE: u32 = 51;
142pub const SSH2_MSG_USERAUTH_SUCCESS: u32 = 52;
143pub const SSH2_MSG_USERAUTH_BANNER: u32 = 53;
144pub const SSH2_MSG_USERAUTH_PK_OK: u32 = 60;
145pub const SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ: u32 = 60;
146pub const SSH2_MSG_USERAUTH_INFO_REQUEST: u32 = 60;
147pub const SSH2_MSG_USERAUTH_GSSAPI_RESPONSE: u32 = 60;
148pub const SSH2_MSG_USERAUTH_INFO_RESPONSE: u32 = 61;
149pub const SSH2_MSG_USERAUTH_GSSAPI_TOKEN: u32 = 61;
150pub const SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE: u32 = 63;
151pub const SSH2_MSG_USERAUTH_GSSAPI_ERROR: u32 = 64;
152pub const SSH2_MSG_USERAUTH_GSSAPI_ERRTOK: u32 = 65;
153pub const SSH2_MSG_USERAUTH_GSSAPI_MIC: u32 = 66;
154pub const SSH2_MSG_GLOBAL_REQUEST: u32 = 80;
155pub const SSH2_MSG_REQUEST_SUCCESS: u32 = 81;
156pub const SSH2_MSG_REQUEST_FAILURE: u32 = 82;
157pub const SSH2_MSG_CHANNEL_OPEN: u32 = 90;
158pub const SSH2_MSG_CHANNEL_OPEN_CONFIRMATION: u32 = 91;
159pub const SSH2_MSG_CHANNEL_OPEN_FAILURE: u32 = 92;
160pub const SSH2_MSG_CHANNEL_WINDOW_ADJUST: u32 = 93;
161pub const SSH2_MSG_CHANNEL_DATA: u32 = 94;
162pub const SSH2_MSG_CHANNEL_EXTENDED_DATA: u32 = 95;
163pub const SSH2_MSG_CHANNEL_EOF: u32 = 96;
164pub const SSH2_MSG_CHANNEL_CLOSE: u32 = 97;
165pub const SSH2_MSG_CHANNEL_REQUEST: u32 = 98;
166pub const SSH2_MSG_CHANNEL_SUCCESS: u32 = 99;
167pub const SSH2_MSG_CHANNEL_FAILURE: u32 = 100;
168pub const SSH2_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT: u32 = 1;
169pub const SSH2_DISCONNECT_PROTOCOL_ERROR: u32 = 2;
170pub const SSH2_DISCONNECT_KEY_EXCHANGE_FAILED: u32 = 3;
171pub const SSH2_DISCONNECT_HOST_AUTHENTICATION_FAILED: u32 = 4;
172pub const SSH2_DISCONNECT_RESERVED: u32 = 4;
173pub const SSH2_DISCONNECT_MAC_ERROR: u32 = 5;
174pub const SSH2_DISCONNECT_COMPRESSION_ERROR: u32 = 6;
175pub const SSH2_DISCONNECT_SERVICE_NOT_AVAILABLE: u32 = 7;
176pub const SSH2_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED: u32 = 8;
177pub const SSH2_DISCONNECT_HOST_KEY_NOT_VERIFIABLE: u32 = 9;
178pub const SSH2_DISCONNECT_CONNECTION_LOST: u32 = 10;
179pub const SSH2_DISCONNECT_BY_APPLICATION: u32 = 11;
180pub const SSH2_DISCONNECT_TOO_MANY_CONNECTIONS: u32 = 12;
181pub const SSH2_DISCONNECT_AUTH_CANCELLED_BY_USER: u32 = 13;
182pub const SSH2_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE: u32 = 14;
183pub const SSH2_DISCONNECT_ILLEGAL_USER_NAME: u32 = 15;
184pub const SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED: u32 = 1;
185pub const SSH2_OPEN_CONNECT_FAILED: u32 = 2;
186pub const SSH2_OPEN_UNKNOWN_CHANNEL_TYPE: u32 = 3;
187pub const SSH2_OPEN_RESOURCE_SHORTAGE: u32 = 4;
188pub const SSH2_EXTENDED_DATA_STDERR: u32 = 1;
189pub type va_list = __builtin_va_list;
190pub type __uid_t = ::std::os::raw::c_uint;
191pub type __gid_t = ::std::os::raw::c_uint;
192pub type __mode_t = ::std::os::raw::c_uint;
193pub type __time_t = ::std::os::raw::c_long;
194pub type __suseconds_t = ::std::os::raw::c_long;
195pub type gid_t = __gid_t;
196pub type uid_t = __uid_t;
197pub type mode_t = __mode_t;
198#[repr(C)]
199#[derive(Debug, Copy, Clone)]
200pub struct timeval {
201 pub tv_sec: __time_t,
202 pub tv_usec: __suseconds_t,
203}
204pub type __fd_mask = ::std::os::raw::c_long;
205#[repr(C)]
206#[derive(Debug, Copy, Clone)]
207pub struct fd_set {
208 pub __fds_bits: [__fd_mask; 16usize],
209}
210#[repr(C)]
211#[derive(Debug, Copy, Clone)]
212pub struct ssh_counter_struct {
213 pub in_bytes: u64,
214 pub out_bytes: u64,
215 pub in_packets: u64,
216 pub out_packets: u64,
217}
218pub type ssh_counter = *mut ssh_counter_struct;
219#[repr(C)]
220#[derive(Debug, Copy, Clone)]
221pub struct ssh_agent_struct {
222 _unused: [u8; 0],
223}
224pub type ssh_agent = *mut ssh_agent_struct;
225#[repr(C)]
226#[derive(Debug, Copy, Clone)]
227pub struct ssh_buffer_struct {
228 _unused: [u8; 0],
229}
230pub type ssh_buffer = *mut ssh_buffer_struct;
231#[repr(C)]
232#[derive(Debug, Copy, Clone)]
233pub struct ssh_channel_struct {
234 _unused: [u8; 0],
235}
236pub type ssh_channel = *mut ssh_channel_struct;
237#[repr(C)]
238#[derive(Debug, Copy, Clone)]
239pub struct ssh_message_struct {
240 _unused: [u8; 0],
241}
242pub type ssh_message = *mut ssh_message_struct;
243#[repr(C)]
244#[derive(Debug, Copy, Clone)]
245pub struct ssh_pcap_file_struct {
246 _unused: [u8; 0],
247}
248pub type ssh_pcap_file = *mut ssh_pcap_file_struct;
249#[repr(C)]
250#[derive(Debug, Copy, Clone)]
251pub struct ssh_key_struct {
252 _unused: [u8; 0],
253}
254pub type ssh_key = *mut ssh_key_struct;
255#[repr(C)]
256#[derive(Debug, Copy, Clone)]
257pub struct ssh_scp_struct {
258 _unused: [u8; 0],
259}
260pub type ssh_scp = *mut ssh_scp_struct;
261#[repr(C)]
262#[derive(Debug, Copy, Clone)]
263pub struct ssh_session_struct {
264 _unused: [u8; 0],
265}
266pub type ssh_session = *mut ssh_session_struct;
267#[repr(C)]
268#[derive(Debug, Copy, Clone)]
269pub struct ssh_string_struct {
270 _unused: [u8; 0],
271}
272pub type ssh_string = *mut ssh_string_struct;
273#[repr(C)]
274#[derive(Debug, Copy, Clone)]
275pub struct ssh_event_struct {
276 _unused: [u8; 0],
277}
278pub type ssh_event = *mut ssh_event_struct;
279#[repr(C)]
280#[derive(Debug, Copy, Clone)]
281pub struct ssh_connector_struct {
282 _unused: [u8; 0],
283}
284pub type ssh_connector = *mut ssh_connector_struct;
285pub type ssh_gssapi_creds = *mut ::std::os::raw::c_void;
286pub type socket_t = ::std::os::raw::c_int;
287#[repr(u32)]
288#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
289pub enum ssh_kex_types_e {
290 SSH_KEX = 0,
291 SSH_HOSTKEYS = 1,
292 SSH_CRYPT_C_S = 2,
293 SSH_CRYPT_S_C = 3,
294 SSH_MAC_C_S = 4,
295 SSH_MAC_S_C = 5,
296 SSH_COMP_C_S = 6,
297 SSH_COMP_S_C = 7,
298 SSH_LANG_C_S = 8,
299 SSH_LANG_S_C = 9,
300}
301pub const ssh_auth_e_SSH_AUTH_SUCCESS: ssh_auth_e = 0;
302pub const ssh_auth_e_SSH_AUTH_DENIED: ssh_auth_e = 1;
303pub const ssh_auth_e_SSH_AUTH_PARTIAL: ssh_auth_e = 2;
304pub const ssh_auth_e_SSH_AUTH_INFO: ssh_auth_e = 3;
305pub const ssh_auth_e_SSH_AUTH_AGAIN: ssh_auth_e = 4;
306pub const ssh_auth_e_SSH_AUTH_ERROR: ssh_auth_e = -1;
307pub type ssh_auth_e = ::std::os::raw::c_int;
308#[repr(u32)]
309#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
310pub enum ssh_requests_e {
311 SSH_REQUEST_AUTH = 1,
312 SSH_REQUEST_CHANNEL_OPEN = 2,
313 SSH_REQUEST_CHANNEL = 3,
314 SSH_REQUEST_SERVICE = 4,
315 SSH_REQUEST_GLOBAL = 5,
316}
317#[repr(u32)]
318#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
319pub enum ssh_channel_type_e {
320 SSH_CHANNEL_UNKNOWN = 0,
321 SSH_CHANNEL_SESSION = 1,
322 SSH_CHANNEL_DIRECT_TCPIP = 2,
323 SSH_CHANNEL_FORWARDED_TCPIP = 3,
324 SSH_CHANNEL_X11 = 4,
325 SSH_CHANNEL_AUTH_AGENT = 5,
326}
327#[repr(u32)]
328#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
329pub enum ssh_channel_requests_e {
330 SSH_CHANNEL_REQUEST_UNKNOWN = 0,
331 SSH_CHANNEL_REQUEST_PTY = 1,
332 SSH_CHANNEL_REQUEST_EXEC = 2,
333 SSH_CHANNEL_REQUEST_SHELL = 3,
334 SSH_CHANNEL_REQUEST_ENV = 4,
335 SSH_CHANNEL_REQUEST_SUBSYSTEM = 5,
336 SSH_CHANNEL_REQUEST_WINDOW_CHANGE = 6,
337 SSH_CHANNEL_REQUEST_X11 = 7,
338}
339#[repr(u32)]
340#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
341pub enum ssh_global_requests_e {
342 SSH_GLOBAL_REQUEST_UNKNOWN = 0,
343 SSH_GLOBAL_REQUEST_TCPIP_FORWARD = 1,
344 SSH_GLOBAL_REQUEST_CANCEL_TCPIP_FORWARD = 2,
345 SSH_GLOBAL_REQUEST_KEEPALIVE = 3,
346 SSH_GLOBAL_REQUEST_NO_MORE_SESSIONS = 4,
347}
348#[repr(i32)]
349#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
350pub enum ssh_publickey_state_e {
351 SSH_PUBLICKEY_STATE_ERROR = -1,
352 SSH_PUBLICKEY_STATE_NONE = 0,
353 SSH_PUBLICKEY_STATE_VALID = 1,
354 SSH_PUBLICKEY_STATE_WRONG = 2,
355}
356#[repr(i32)]
357#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
358pub enum ssh_server_known_e {
359 SSH_SERVER_ERROR = -1,
360 SSH_SERVER_NOT_KNOWN = 0,
361 SSH_SERVER_KNOWN_OK = 1,
362 SSH_SERVER_KNOWN_CHANGED = 2,
363 SSH_SERVER_FOUND_OTHER = 3,
364 SSH_SERVER_FILE_NOT_FOUND = 4,
365}
366pub const ssh_known_hosts_e_SSH_KNOWN_HOSTS_ERROR: ssh_known_hosts_e = -2;
367pub const ssh_known_hosts_e_SSH_KNOWN_HOSTS_NOT_FOUND: ssh_known_hosts_e = -1;
368pub const ssh_known_hosts_e_SSH_KNOWN_HOSTS_UNKNOWN: ssh_known_hosts_e = 0;
369pub const ssh_known_hosts_e_SSH_KNOWN_HOSTS_OK: ssh_known_hosts_e = 1;
370pub const ssh_known_hosts_e_SSH_KNOWN_HOSTS_CHANGED: ssh_known_hosts_e = 2;
371pub const ssh_known_hosts_e_SSH_KNOWN_HOSTS_OTHER: ssh_known_hosts_e = 3;
372pub type ssh_known_hosts_e = ::std::os::raw::c_int;
373pub const ssh_error_types_e_SSH_NO_ERROR: ssh_error_types_e = 0;
374pub const ssh_error_types_e_SSH_REQUEST_DENIED: ssh_error_types_e = 1;
375pub const ssh_error_types_e_SSH_FATAL: ssh_error_types_e = 2;
376pub const ssh_error_types_e_SSH_EINTR: ssh_error_types_e = 3;
377pub type ssh_error_types_e = ::std::os::raw::c_uint;
378pub const ssh_keytypes_e_SSH_KEYTYPE_UNKNOWN: ssh_keytypes_e = 0;
379pub const ssh_keytypes_e_SSH_KEYTYPE_DSS: ssh_keytypes_e = 1;
380pub const ssh_keytypes_e_SSH_KEYTYPE_RSA: ssh_keytypes_e = 2;
381pub const ssh_keytypes_e_SSH_KEYTYPE_RSA1: ssh_keytypes_e = 3;
382pub const ssh_keytypes_e_SSH_KEYTYPE_ECDSA: ssh_keytypes_e = 4;
383pub const ssh_keytypes_e_SSH_KEYTYPE_ED25519: ssh_keytypes_e = 5;
384pub const ssh_keytypes_e_SSH_KEYTYPE_DSS_CERT01: ssh_keytypes_e = 6;
385pub const ssh_keytypes_e_SSH_KEYTYPE_RSA_CERT01: ssh_keytypes_e = 7;
386pub const ssh_keytypes_e_SSH_KEYTYPE_ECDSA_P256: ssh_keytypes_e = 8;
387pub const ssh_keytypes_e_SSH_KEYTYPE_ECDSA_P384: ssh_keytypes_e = 9;
388pub const ssh_keytypes_e_SSH_KEYTYPE_ECDSA_P521: ssh_keytypes_e = 10;
389pub const ssh_keytypes_e_SSH_KEYTYPE_ECDSA_P256_CERT01: ssh_keytypes_e = 11;
390pub const ssh_keytypes_e_SSH_KEYTYPE_ECDSA_P384_CERT01: ssh_keytypes_e = 12;
391pub const ssh_keytypes_e_SSH_KEYTYPE_ECDSA_P521_CERT01: ssh_keytypes_e = 13;
392pub const ssh_keytypes_e_SSH_KEYTYPE_ED25519_CERT01: ssh_keytypes_e = 14;
393pub const ssh_keytypes_e_SSH_KEYTYPE_SK_ECDSA: ssh_keytypes_e = 15;
394pub const ssh_keytypes_e_SSH_KEYTYPE_SK_ECDSA_CERT01: ssh_keytypes_e = 16;
395pub const ssh_keytypes_e_SSH_KEYTYPE_SK_ED25519: ssh_keytypes_e = 17;
396pub const ssh_keytypes_e_SSH_KEYTYPE_SK_ED25519_CERT01: ssh_keytypes_e = 18;
397pub type ssh_keytypes_e = ::std::os::raw::c_uint;
398#[repr(u32)]
399#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
400pub enum ssh_keycmp_e {
401 SSH_KEY_CMP_PUBLIC = 0,
402 SSH_KEY_CMP_PRIVATE = 1,
403 SSH_KEY_CMP_CERTIFICATE = 2,
404}
405#[repr(C)]
406#[derive(Debug, Copy, Clone)]
407pub struct ssh_knownhosts_entry {
408 pub hostname: *mut ::std::os::raw::c_char,
409 pub unparsed: *mut ::std::os::raw::c_char,
410 pub publickey: ssh_key,
411 pub comment: *mut ::std::os::raw::c_char,
412}
413pub const SSH_LOG_NOLOG: _bindgen_ty_10 = _bindgen_ty_10::SSH_LOG_NOLOG;
414pub const SSH_LOG_WARNING: _bindgen_ty_10 = _bindgen_ty_10::SSH_LOG_WARNING;
415pub const SSH_LOG_PROTOCOL: _bindgen_ty_10 = _bindgen_ty_10::SSH_LOG_PROTOCOL;
416pub const SSH_LOG_PACKET: _bindgen_ty_10 = _bindgen_ty_10::SSH_LOG_PACKET;
417pub const SSH_LOG_FUNCTIONS: _bindgen_ty_10 = _bindgen_ty_10::SSH_LOG_FUNCTIONS;
418#[repr(u32)]
419#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
420pub enum _bindgen_ty_10 {
421 SSH_LOG_NOLOG = 0,
422 SSH_LOG_WARNING = 1,
423 SSH_LOG_PROTOCOL = 2,
424 SSH_LOG_PACKET = 3,
425 SSH_LOG_FUNCTIONS = 4,
426}
427#[repr(u32)]
428#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
429pub enum ssh_control_master_options_e {
430 SSH_CONTROL_MASTER_NO = 0,
431 SSH_CONTROL_MASTER_AUTO = 1,
432 SSH_CONTROL_MASTER_YES = 2,
433 SSH_CONTROL_MASTER_ASK = 3,
434 SSH_CONTROL_MASTER_AUTOASK = 4,
435}
436#[repr(u32)]
437#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
438pub enum ssh_options_e {
439 SSH_OPTIONS_HOST = 0,
440 SSH_OPTIONS_PORT = 1,
441 SSH_OPTIONS_PORT_STR = 2,
442 SSH_OPTIONS_FD = 3,
443 SSH_OPTIONS_USER = 4,
444 SSH_OPTIONS_SSH_DIR = 5,
445 SSH_OPTIONS_IDENTITY = 6,
446 SSH_OPTIONS_ADD_IDENTITY = 7,
447 SSH_OPTIONS_KNOWNHOSTS = 8,
448 SSH_OPTIONS_TIMEOUT = 9,
449 SSH_OPTIONS_TIMEOUT_USEC = 10,
450 SSH_OPTIONS_SSH1 = 11,
451 SSH_OPTIONS_SSH2 = 12,
452 SSH_OPTIONS_LOG_VERBOSITY = 13,
453 SSH_OPTIONS_LOG_VERBOSITY_STR = 14,
454 SSH_OPTIONS_CIPHERS_C_S = 15,
455 SSH_OPTIONS_CIPHERS_S_C = 16,
456 SSH_OPTIONS_COMPRESSION_C_S = 17,
457 SSH_OPTIONS_COMPRESSION_S_C = 18,
458 SSH_OPTIONS_PROXYCOMMAND = 19,
459 SSH_OPTIONS_BINDADDR = 20,
460 SSH_OPTIONS_STRICTHOSTKEYCHECK = 21,
461 SSH_OPTIONS_COMPRESSION = 22,
462 SSH_OPTIONS_COMPRESSION_LEVEL = 23,
463 SSH_OPTIONS_KEY_EXCHANGE = 24,
464 SSH_OPTIONS_HOSTKEYS = 25,
465 SSH_OPTIONS_GSSAPI_SERVER_IDENTITY = 26,
466 SSH_OPTIONS_GSSAPI_CLIENT_IDENTITY = 27,
467 SSH_OPTIONS_GSSAPI_DELEGATE_CREDENTIALS = 28,
468 SSH_OPTIONS_HMAC_C_S = 29,
469 SSH_OPTIONS_HMAC_S_C = 30,
470 SSH_OPTIONS_PASSWORD_AUTH = 31,
471 SSH_OPTIONS_PUBKEY_AUTH = 32,
472 SSH_OPTIONS_KBDINT_AUTH = 33,
473 SSH_OPTIONS_GSSAPI_AUTH = 34,
474 SSH_OPTIONS_GLOBAL_KNOWNHOSTS = 35,
475 SSH_OPTIONS_NODELAY = 36,
476 SSH_OPTIONS_PUBLICKEY_ACCEPTED_TYPES = 37,
477 SSH_OPTIONS_PROCESS_CONFIG = 38,
478 SSH_OPTIONS_REKEY_DATA = 39,
479 SSH_OPTIONS_REKEY_TIME = 40,
480 SSH_OPTIONS_RSA_MIN_SIZE = 41,
481 SSH_OPTIONS_IDENTITY_AGENT = 42,
482 SSH_OPTIONS_IDENTITIES_ONLY = 43,
483 SSH_OPTIONS_CONTROL_MASTER = 44,
484 SSH_OPTIONS_CONTROL_PATH = 45,
485 SSH_OPTIONS_CERTIFICATE = 46,
486 SSH_OPTIONS_PROXYJUMP = 47,
487 SSH_OPTIONS_PROXYJUMP_CB_LIST_APPEND = 48,
488}
489pub const SSH_SCP_WRITE: _bindgen_ty_11 = _bindgen_ty_11::SSH_SCP_WRITE;
490pub const SSH_SCP_READ: _bindgen_ty_11 = _bindgen_ty_11::SSH_SCP_READ;
491pub const SSH_SCP_RECURSIVE: _bindgen_ty_11 = _bindgen_ty_11::SSH_SCP_RECURSIVE;
492#[repr(u32)]
493#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
494pub enum _bindgen_ty_11 {
495 SSH_SCP_WRITE = 0,
496 SSH_SCP_READ = 1,
497 SSH_SCP_RECURSIVE = 16,
498}
499#[repr(u32)]
500#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
501pub enum ssh_scp_request_types {
502 SSH_SCP_REQUEST_NEWDIR = 1,
503 SSH_SCP_REQUEST_NEWFILE = 2,
504 SSH_SCP_REQUEST_EOF = 3,
505 SSH_SCP_REQUEST_ENDDIR = 4,
506 SSH_SCP_REQUEST_WARNING = 5,
507}
508impl ssh_connector_flags_e {
509 pub const SSH_CONNECTOR_STDINOUT: ssh_connector_flags_e =
510 ssh_connector_flags_e::SSH_CONNECTOR_STDOUT;
511}
512#[repr(u32)]
513#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
514pub enum ssh_connector_flags_e {
515 SSH_CONNECTOR_STDOUT = 1,
516 SSH_CONNECTOR_STDERR = 2,
517 SSH_CONNECTOR_BOTH = 3,
518}
519extern "C" {
520 pub fn ssh_blocking_flush(
521 session: ssh_session,
522 timeout: ::std::os::raw::c_int,
523 ) -> ::std::os::raw::c_int;
524}
525extern "C" {
526 pub fn ssh_channel_accept_x11(
527 channel: ssh_channel,
528 timeout_ms: ::std::os::raw::c_int,
529 ) -> ssh_channel;
530}
531extern "C" {
532 pub fn ssh_channel_change_pty_size(
533 channel: ssh_channel,
534 cols: ::std::os::raw::c_int,
535 rows: ::std::os::raw::c_int,
536 ) -> ::std::os::raw::c_int;
537}
538extern "C" {
539 pub fn ssh_channel_close(channel: ssh_channel) -> ::std::os::raw::c_int;
540}
541extern "C" {
542 pub fn ssh_channel_free(channel: ssh_channel);
543}
544extern "C" {
545 pub fn ssh_channel_get_exit_state(
546 channel: ssh_channel,
547 pexit_code: *mut u32,
548 pexit_signal: *mut *mut ::std::os::raw::c_char,
549 pcore_dumped: *mut ::std::os::raw::c_int,
550 ) -> ::std::os::raw::c_int;
551}
552extern "C" {
553 pub fn ssh_channel_get_exit_status(channel: ssh_channel) -> ::std::os::raw::c_int;
554}
555extern "C" {
556 pub fn ssh_channel_get_session(channel: ssh_channel) -> ssh_session;
557}
558extern "C" {
559 pub fn ssh_channel_is_closed(channel: ssh_channel) -> ::std::os::raw::c_int;
560}
561extern "C" {
562 pub fn ssh_channel_is_eof(channel: ssh_channel) -> ::std::os::raw::c_int;
563}
564extern "C" {
565 pub fn ssh_channel_is_open(channel: ssh_channel) -> ::std::os::raw::c_int;
566}
567extern "C" {
568 pub fn ssh_channel_new(session: ssh_session) -> ssh_channel;
569}
570extern "C" {
571 pub fn ssh_channel_open_auth_agent(channel: ssh_channel) -> ::std::os::raw::c_int;
572}
573extern "C" {
574 pub fn ssh_channel_open_forward(
575 channel: ssh_channel,
576 remotehost: *const ::std::os::raw::c_char,
577 remoteport: ::std::os::raw::c_int,
578 sourcehost: *const ::std::os::raw::c_char,
579 localport: ::std::os::raw::c_int,
580 ) -> ::std::os::raw::c_int;
581}
582extern "C" {
583 pub fn ssh_channel_open_forward_unix(
584 channel: ssh_channel,
585 remotepath: *const ::std::os::raw::c_char,
586 sourcehost: *const ::std::os::raw::c_char,
587 localport: ::std::os::raw::c_int,
588 ) -> ::std::os::raw::c_int;
589}
590extern "C" {
591 pub fn ssh_channel_open_session(channel: ssh_channel) -> ::std::os::raw::c_int;
592}
593extern "C" {
594 pub fn ssh_channel_open_x11(
595 channel: ssh_channel,
596 orig_addr: *const ::std::os::raw::c_char,
597 orig_port: ::std::os::raw::c_int,
598 ) -> ::std::os::raw::c_int;
599}
600extern "C" {
601 pub fn ssh_channel_poll(
602 channel: ssh_channel,
603 is_stderr: ::std::os::raw::c_int,
604 ) -> ::std::os::raw::c_int;
605}
606extern "C" {
607 pub fn ssh_channel_poll_timeout(
608 channel: ssh_channel,
609 timeout: ::std::os::raw::c_int,
610 is_stderr: ::std::os::raw::c_int,
611 ) -> ::std::os::raw::c_int;
612}
613extern "C" {
614 pub fn ssh_channel_read(
615 channel: ssh_channel,
616 dest: *mut ::std::os::raw::c_void,
617 count: u32,
618 is_stderr: ::std::os::raw::c_int,
619 ) -> ::std::os::raw::c_int;
620}
621extern "C" {
622 pub fn ssh_channel_read_timeout(
623 channel: ssh_channel,
624 dest: *mut ::std::os::raw::c_void,
625 count: u32,
626 is_stderr: ::std::os::raw::c_int,
627 timeout_ms: ::std::os::raw::c_int,
628 ) -> ::std::os::raw::c_int;
629}
630extern "C" {
631 pub fn ssh_channel_read_nonblocking(
632 channel: ssh_channel,
633 dest: *mut ::std::os::raw::c_void,
634 count: u32,
635 is_stderr: ::std::os::raw::c_int,
636 ) -> ::std::os::raw::c_int;
637}
638extern "C" {
639 pub fn ssh_channel_request_env(
640 channel: ssh_channel,
641 name: *const ::std::os::raw::c_char,
642 value: *const ::std::os::raw::c_char,
643 ) -> ::std::os::raw::c_int;
644}
645extern "C" {
646 pub fn ssh_channel_request_exec(
647 channel: ssh_channel,
648 cmd: *const ::std::os::raw::c_char,
649 ) -> ::std::os::raw::c_int;
650}
651extern "C" {
652 pub fn ssh_channel_request_pty(channel: ssh_channel) -> ::std::os::raw::c_int;
653}
654extern "C" {
655 pub fn ssh_channel_request_pty_size(
656 channel: ssh_channel,
657 term: *const ::std::os::raw::c_char,
658 cols: ::std::os::raw::c_int,
659 rows: ::std::os::raw::c_int,
660 ) -> ::std::os::raw::c_int;
661}
662extern "C" {
663 pub fn ssh_channel_request_pty_size_modes(
664 channel: ssh_channel,
665 term: *const ::std::os::raw::c_char,
666 cols: ::std::os::raw::c_int,
667 rows: ::std::os::raw::c_int,
668 modes: *const ::std::os::raw::c_uchar,
669 modes_len: usize,
670 ) -> ::std::os::raw::c_int;
671}
672extern "C" {
673 pub fn ssh_channel_request_shell(channel: ssh_channel) -> ::std::os::raw::c_int;
674}
675extern "C" {
676 pub fn ssh_channel_request_send_signal(
677 channel: ssh_channel,
678 signum: *const ::std::os::raw::c_char,
679 ) -> ::std::os::raw::c_int;
680}
681extern "C" {
682 pub fn ssh_channel_request_send_break(
683 channel: ssh_channel,
684 length: u32,
685 ) -> ::std::os::raw::c_int;
686}
687extern "C" {
688 pub fn ssh_channel_request_sftp(channel: ssh_channel) -> ::std::os::raw::c_int;
689}
690extern "C" {
691 pub fn ssh_channel_request_subsystem(
692 channel: ssh_channel,
693 subsystem: *const ::std::os::raw::c_char,
694 ) -> ::std::os::raw::c_int;
695}
696extern "C" {
697 pub fn ssh_channel_request_x11(
698 channel: ssh_channel,
699 single_connection: ::std::os::raw::c_int,
700 protocol: *const ::std::os::raw::c_char,
701 cookie: *const ::std::os::raw::c_char,
702 screen_number: ::std::os::raw::c_int,
703 ) -> ::std::os::raw::c_int;
704}
705extern "C" {
706 pub fn ssh_channel_request_auth_agent(channel: ssh_channel) -> ::std::os::raw::c_int;
707}
708extern "C" {
709 pub fn ssh_channel_send_eof(channel: ssh_channel) -> ::std::os::raw::c_int;
710}
711extern "C" {
712 pub fn ssh_channel_set_blocking(channel: ssh_channel, blocking: ::std::os::raw::c_int);
713}
714extern "C" {
715 pub fn ssh_channel_set_counter(channel: ssh_channel, counter: ssh_counter);
716}
717extern "C" {
718 pub fn ssh_channel_write(
719 channel: ssh_channel,
720 data: *const ::std::os::raw::c_void,
721 len: u32,
722 ) -> ::std::os::raw::c_int;
723}
724extern "C" {
725 pub fn ssh_channel_write_stderr(
726 channel: ssh_channel,
727 data: *const ::std::os::raw::c_void,
728 len: u32,
729 ) -> ::std::os::raw::c_int;
730}
731extern "C" {
732 pub fn ssh_channel_window_size(channel: ssh_channel) -> u32;
733}
734extern "C" {
735 pub fn ssh_basename(path: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
736}
737extern "C" {
738 pub fn ssh_clean_pubkey_hash(hash: *mut *mut ::std::os::raw::c_uchar);
739}
740extern "C" {
741 pub fn ssh_connect(session: ssh_session) -> ::std::os::raw::c_int;
742}
743extern "C" {
744 pub fn ssh_connector_new(session: ssh_session) -> ssh_connector;
745}
746extern "C" {
747 pub fn ssh_connector_free(connector: ssh_connector);
748}
749extern "C" {
750 pub fn ssh_connector_set_in_channel(
751 connector: ssh_connector,
752 channel: ssh_channel,
753 flags: ssh_connector_flags_e,
754 ) -> ::std::os::raw::c_int;
755}
756extern "C" {
757 pub fn ssh_connector_set_out_channel(
758 connector: ssh_connector,
759 channel: ssh_channel,
760 flags: ssh_connector_flags_e,
761 ) -> ::std::os::raw::c_int;
762}
763extern "C" {
764 pub fn ssh_connector_set_in_fd(connector: ssh_connector, fd: socket_t);
765}
766extern "C" {
767 pub fn ssh_connector_set_out_fd(connector: ssh_connector, fd: socket_t);
768}
769extern "C" {
770 pub fn ssh_copyright() -> *const ::std::os::raw::c_char;
771}
772extern "C" {
773 pub fn ssh_disconnect(session: ssh_session);
774}
775extern "C" {
776 pub fn ssh_dirname(path: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
777}
778extern "C" {
779 pub fn ssh_finalize() -> ::std::os::raw::c_int;
780}
781extern "C" {
782 pub fn ssh_channel_open_forward_port(
783 session: ssh_session,
784 timeout_ms: ::std::os::raw::c_int,
785 destination_port: *mut ::std::os::raw::c_int,
786 originator: *mut *mut ::std::os::raw::c_char,
787 originator_port: *mut ::std::os::raw::c_int,
788 ) -> ssh_channel;
789}
790extern "C" {
791 pub fn ssh_channel_accept_forward(
792 session: ssh_session,
793 timeout_ms: ::std::os::raw::c_int,
794 destination_port: *mut ::std::os::raw::c_int,
795 ) -> ssh_channel;
796}
797extern "C" {
798 pub fn ssh_channel_cancel_forward(
799 session: ssh_session,
800 address: *const ::std::os::raw::c_char,
801 port: ::std::os::raw::c_int,
802 ) -> ::std::os::raw::c_int;
803}
804extern "C" {
805 pub fn ssh_channel_listen_forward(
806 session: ssh_session,
807 address: *const ::std::os::raw::c_char,
808 port: ::std::os::raw::c_int,
809 bound_port: *mut ::std::os::raw::c_int,
810 ) -> ::std::os::raw::c_int;
811}
812extern "C" {
813 pub fn ssh_free(session: ssh_session);
814}
815extern "C" {
816 pub fn ssh_get_disconnect_message(session: ssh_session) -> *const ::std::os::raw::c_char;
817}
818extern "C" {
819 pub fn ssh_get_error(error: *mut ::std::os::raw::c_void) -> *const ::std::os::raw::c_char;
820}
821extern "C" {
822 pub fn ssh_get_error_code(error: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int;
823}
824extern "C" {
825 pub fn ssh_get_fd(session: ssh_session) -> socket_t;
826}
827extern "C" {
828 pub fn ssh_get_hexa(
829 what: *const ::std::os::raw::c_uchar,
830 len: usize,
831 ) -> *mut ::std::os::raw::c_char;
832}
833extern "C" {
834 pub fn ssh_get_issue_banner(session: ssh_session) -> *mut ::std::os::raw::c_char;
835}
836extern "C" {
837 pub fn ssh_get_openssh_version(session: ssh_session) -> ::std::os::raw::c_int;
838}
839extern "C" {
840 pub fn ssh_request_no_more_sessions(session: ssh_session) -> ::std::os::raw::c_int;
841}
842extern "C" {
843 pub fn ssh_get_server_publickey(
844 session: ssh_session,
845 key: *mut ssh_key,
846 ) -> ::std::os::raw::c_int;
847}
848#[repr(u32)]
849#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
850pub enum ssh_publickey_hash_type {
851 SSH_PUBLICKEY_HASH_SHA1 = 0,
852 SSH_PUBLICKEY_HASH_MD5 = 1,
853 SSH_PUBLICKEY_HASH_SHA256 = 2,
854}
855extern "C" {
856 pub fn ssh_get_publickey_hash(
857 key: ssh_key,
858 type_: ssh_publickey_hash_type,
859 hash: *mut *mut ::std::os::raw::c_uchar,
860 hlen: *mut usize,
861 ) -> ::std::os::raw::c_int;
862}
863extern "C" {
864 pub fn ssh_get_pubkey_hash(
865 session: ssh_session,
866 hash: *mut *mut ::std::os::raw::c_uchar,
867 ) -> ::std::os::raw::c_int;
868}
869extern "C" {
870 pub fn ssh_forward_accept(
871 session: ssh_session,
872 timeout_ms: ::std::os::raw::c_int,
873 ) -> ssh_channel;
874}
875extern "C" {
876 pub fn ssh_forward_cancel(
877 session: ssh_session,
878 address: *const ::std::os::raw::c_char,
879 port: ::std::os::raw::c_int,
880 ) -> ::std::os::raw::c_int;
881}
882extern "C" {
883 pub fn ssh_forward_listen(
884 session: ssh_session,
885 address: *const ::std::os::raw::c_char,
886 port: ::std::os::raw::c_int,
887 bound_port: *mut ::std::os::raw::c_int,
888 ) -> ::std::os::raw::c_int;
889}
890extern "C" {
891 pub fn ssh_get_publickey(session: ssh_session, key: *mut ssh_key) -> ::std::os::raw::c_int;
892}
893extern "C" {
894 pub fn ssh_write_knownhost(session: ssh_session) -> ::std::os::raw::c_int;
895}
896extern "C" {
897 pub fn ssh_dump_knownhost(session: ssh_session) -> *mut ::std::os::raw::c_char;
898}
899extern "C" {
900 pub fn ssh_is_server_known(session: ssh_session) -> ::std::os::raw::c_int;
901}
902extern "C" {
903 pub fn ssh_print_hexa(
904 descr: *const ::std::os::raw::c_char,
905 what: *const ::std::os::raw::c_uchar,
906 len: usize,
907 );
908}
909extern "C" {
910 pub fn ssh_channel_select(
911 readchans: *mut ssh_channel,
912 writechans: *mut ssh_channel,
913 exceptchans: *mut ssh_channel,
914 timeout: *mut timeval,
915 ) -> ::std::os::raw::c_int;
916}
917extern "C" {
918 pub fn ssh_scp_accept_request(scp: ssh_scp) -> ::std::os::raw::c_int;
919}
920extern "C" {
921 pub fn ssh_scp_close(scp: ssh_scp) -> ::std::os::raw::c_int;
922}
923extern "C" {
924 pub fn ssh_scp_deny_request(
925 scp: ssh_scp,
926 reason: *const ::std::os::raw::c_char,
927 ) -> ::std::os::raw::c_int;
928}
929extern "C" {
930 pub fn ssh_scp_free(scp: ssh_scp);
931}
932extern "C" {
933 pub fn ssh_scp_init(scp: ssh_scp) -> ::std::os::raw::c_int;
934}
935extern "C" {
936 pub fn ssh_scp_leave_directory(scp: ssh_scp) -> ::std::os::raw::c_int;
937}
938extern "C" {
939 pub fn ssh_scp_new(
940 session: ssh_session,
941 mode: ::std::os::raw::c_int,
942 location: *const ::std::os::raw::c_char,
943 ) -> ssh_scp;
944}
945extern "C" {
946 pub fn ssh_scp_pull_request(scp: ssh_scp) -> ::std::os::raw::c_int;
947}
948extern "C" {
949 pub fn ssh_scp_push_directory(
950 scp: ssh_scp,
951 dirname: *const ::std::os::raw::c_char,
952 mode: ::std::os::raw::c_int,
953 ) -> ::std::os::raw::c_int;
954}
955extern "C" {
956 pub fn ssh_scp_push_file(
957 scp: ssh_scp,
958 filename: *const ::std::os::raw::c_char,
959 size: usize,
960 perms: ::std::os::raw::c_int,
961 ) -> ::std::os::raw::c_int;
962}
963extern "C" {
964 pub fn ssh_scp_push_file64(
965 scp: ssh_scp,
966 filename: *const ::std::os::raw::c_char,
967 size: u64,
968 perms: ::std::os::raw::c_int,
969 ) -> ::std::os::raw::c_int;
970}
971extern "C" {
972 pub fn ssh_scp_read(
973 scp: ssh_scp,
974 buffer: *mut ::std::os::raw::c_void,
975 size: usize,
976 ) -> ::std::os::raw::c_int;
977}
978extern "C" {
979 pub fn ssh_scp_request_get_filename(scp: ssh_scp) -> *const ::std::os::raw::c_char;
980}
981extern "C" {
982 pub fn ssh_scp_request_get_permissions(scp: ssh_scp) -> ::std::os::raw::c_int;
983}
984extern "C" {
985 pub fn ssh_scp_request_get_size(scp: ssh_scp) -> usize;
986}
987extern "C" {
988 pub fn ssh_scp_request_get_size64(scp: ssh_scp) -> u64;
989}
990extern "C" {
991 pub fn ssh_scp_request_get_warning(scp: ssh_scp) -> *const ::std::os::raw::c_char;
992}
993extern "C" {
994 pub fn ssh_scp_write(
995 scp: ssh_scp,
996 buffer: *const ::std::os::raw::c_void,
997 len: usize,
998 ) -> ::std::os::raw::c_int;
999}
1000extern "C" {
1001 pub fn ssh_get_random(
1002 where_: *mut ::std::os::raw::c_void,
1003 len: ::std::os::raw::c_int,
1004 strong: ::std::os::raw::c_int,
1005 ) -> ::std::os::raw::c_int;
1006}
1007extern "C" {
1008 pub fn ssh_get_version(session: ssh_session) -> ::std::os::raw::c_int;
1009}
1010extern "C" {
1011 pub fn ssh_get_status(session: ssh_session) -> ::std::os::raw::c_int;
1012}
1013extern "C" {
1014 pub fn ssh_get_poll_flags(session: ssh_session) -> ::std::os::raw::c_int;
1015}
1016extern "C" {
1017 pub fn ssh_init() -> ::std::os::raw::c_int;
1018}
1019extern "C" {
1020 pub fn ssh_is_blocking(session: ssh_session) -> ::std::os::raw::c_int;
1021}
1022extern "C" {
1023 pub fn ssh_is_connected(session: ssh_session) -> ::std::os::raw::c_int;
1024}
1025extern "C" {
1026 pub fn ssh_knownhosts_entry_free(entry: *mut ssh_knownhosts_entry);
1027}
1028extern "C" {
1029 pub fn ssh_known_hosts_parse_line(
1030 host: *const ::std::os::raw::c_char,
1031 line: *const ::std::os::raw::c_char,
1032 entry: *mut *mut ssh_knownhosts_entry,
1033 ) -> ::std::os::raw::c_int;
1034}
1035extern "C" {
1036 pub fn ssh_session_has_known_hosts_entry(session: ssh_session) -> ssh_known_hosts_e;
1037}
1038extern "C" {
1039 pub fn ssh_session_export_known_hosts_entry(
1040 session: ssh_session,
1041 pentry_string: *mut *mut ::std::os::raw::c_char,
1042 ) -> ::std::os::raw::c_int;
1043}
1044extern "C" {
1045 pub fn ssh_session_update_known_hosts(session: ssh_session) -> ::std::os::raw::c_int;
1046}
1047extern "C" {
1048 pub fn ssh_session_get_known_hosts_entry(
1049 session: ssh_session,
1050 pentry: *mut *mut ssh_knownhosts_entry,
1051 ) -> ssh_known_hosts_e;
1052}
1053extern "C" {
1054 pub fn ssh_session_is_known_server(session: ssh_session) -> ssh_known_hosts_e;
1055}
1056extern "C" {
1057 pub fn ssh_set_log_level(level: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
1058}
1059extern "C" {
1060 pub fn ssh_get_log_level() -> ::std::os::raw::c_int;
1061}
1062extern "C" {
1063 pub fn ssh_get_log_userdata() -> *mut ::std::os::raw::c_void;
1064}
1065extern "C" {
1066 pub fn ssh_set_log_userdata(data: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int;
1067}
1068extern "C" {
1069 pub fn ssh_vlog(
1070 verbosity: ::std::os::raw::c_int,
1071 function: *const ::std::os::raw::c_char,
1072 format: *const ::std::os::raw::c_char,
1073 va: *mut va_list,
1074 );
1075}
1076extern "C" {
1077 pub fn ssh_log(
1078 session: ssh_session,
1079 prioriry: ::std::os::raw::c_int,
1080 format: *const ::std::os::raw::c_char,
1081 ...
1082 );
1083}
1084extern "C" {
1085 pub fn ssh_message_channel_request_open_reply_accept(msg: ssh_message) -> ssh_channel;
1086}
1087extern "C" {
1088 pub fn ssh_message_channel_request_open_reply_accept_channel(
1089 msg: ssh_message,
1090 chan: ssh_channel,
1091 ) -> ::std::os::raw::c_int;
1092}
1093extern "C" {
1094 pub fn ssh_message_channel_request_reply_success(msg: ssh_message) -> ::std::os::raw::c_int;
1095}
1096extern "C" {
1097 pub fn ssh_message_free(msg: ssh_message);
1098}
1099extern "C" {
1100 pub fn ssh_message_get(session: ssh_session) -> ssh_message;
1101}
1102extern "C" {
1103 pub fn ssh_message_subtype(msg: ssh_message) -> ::std::os::raw::c_int;
1104}
1105extern "C" {
1106 pub fn ssh_message_type(msg: ssh_message) -> ::std::os::raw::c_int;
1107}
1108extern "C" {
1109 pub fn ssh_mkdir(
1110 pathname: *const ::std::os::raw::c_char,
1111 mode: mode_t,
1112 ) -> ::std::os::raw::c_int;
1113}
1114extern "C" {
1115 pub fn ssh_new() -> ssh_session;
1116}
1117extern "C" {
1118 pub fn ssh_options_copy(src: ssh_session, dest: *mut ssh_session) -> ::std::os::raw::c_int;
1119}
1120extern "C" {
1121 pub fn ssh_options_getopt(
1122 session: ssh_session,
1123 argcptr: *mut ::std::os::raw::c_int,
1124 argv: *mut *mut ::std::os::raw::c_char,
1125 ) -> ::std::os::raw::c_int;
1126}
1127extern "C" {
1128 pub fn ssh_options_parse_config(
1129 session: ssh_session,
1130 filename: *const ::std::os::raw::c_char,
1131 ) -> ::std::os::raw::c_int;
1132}
1133extern "C" {
1134 pub fn ssh_options_set(
1135 session: ssh_session,
1136 type_: ssh_options_e,
1137 value: *const ::std::os::raw::c_void,
1138 ) -> ::std::os::raw::c_int;
1139}
1140extern "C" {
1141 pub fn ssh_options_get(
1142 session: ssh_session,
1143 type_: ssh_options_e,
1144 value: *mut *mut ::std::os::raw::c_char,
1145 ) -> ::std::os::raw::c_int;
1146}
1147extern "C" {
1148 pub fn ssh_options_get_port(
1149 session: ssh_session,
1150 port_target: *mut ::std::os::raw::c_uint,
1151 ) -> ::std::os::raw::c_int;
1152}
1153extern "C" {
1154 pub fn ssh_pcap_file_close(pcap: ssh_pcap_file) -> ::std::os::raw::c_int;
1155}
1156extern "C" {
1157 pub fn ssh_pcap_file_free(pcap: ssh_pcap_file);
1158}
1159extern "C" {
1160 pub fn ssh_pcap_file_new() -> ssh_pcap_file;
1161}
1162extern "C" {
1163 pub fn ssh_pcap_file_open(
1164 pcap: ssh_pcap_file,
1165 filename: *const ::std::os::raw::c_char,
1166 ) -> ::std::os::raw::c_int;
1167}
1168pub type ssh_auth_callback = ::std::option::Option<
1169 unsafe extern "C" fn(
1170 prompt: *const ::std::os::raw::c_char,
1171 buf: *mut ::std::os::raw::c_char,
1172 len: usize,
1173 echo: ::std::os::raw::c_int,
1174 verify: ::std::os::raw::c_int,
1175 userdata: *mut ::std::os::raw::c_void,
1176 ) -> ::std::os::raw::c_int,
1177>;
1178#[repr(u32)]
1179#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1180pub enum ssh_file_format_e {
1181 SSH_FILE_FORMAT_DEFAULT = 0,
1182 SSH_FILE_FORMAT_OPENSSH = 1,
1183 SSH_FILE_FORMAT_PEM = 2,
1184}
1185extern "C" {
1186 pub fn ssh_key_new() -> ssh_key;
1187}
1188extern "C" {
1189 pub fn ssh_key_free(key: ssh_key);
1190}
1191extern "C" {
1192 pub fn ssh_key_type(key: ssh_key) -> ssh_keytypes_e;
1193}
1194extern "C" {
1195 pub fn ssh_key_type_to_char(type_: ssh_keytypes_e) -> *const ::std::os::raw::c_char;
1196}
1197extern "C" {
1198 pub fn ssh_key_type_from_name(name: *const ::std::os::raw::c_char) -> ssh_keytypes_e;
1199}
1200extern "C" {
1201 pub fn ssh_key_is_public(k: ssh_key) -> ::std::os::raw::c_int;
1202}
1203extern "C" {
1204 pub fn ssh_key_is_private(k: ssh_key) -> ::std::os::raw::c_int;
1205}
1206extern "C" {
1207 pub fn ssh_key_cmp(k1: ssh_key, k2: ssh_key, what: ssh_keycmp_e) -> ::std::os::raw::c_int;
1208}
1209extern "C" {
1210 pub fn ssh_key_dup(key: ssh_key) -> ssh_key;
1211}
1212extern "C" {
1213 pub fn ssh_pki_generate(
1214 type_: ssh_keytypes_e,
1215 parameter: ::std::os::raw::c_int,
1216 pkey: *mut ssh_key,
1217 ) -> ::std::os::raw::c_int;
1218}
1219extern "C" {
1220 pub fn ssh_pki_import_privkey_base64(
1221 b64_key: *const ::std::os::raw::c_char,
1222 passphrase: *const ::std::os::raw::c_char,
1223 auth_fn: ssh_auth_callback,
1224 auth_data: *mut ::std::os::raw::c_void,
1225 pkey: *mut ssh_key,
1226 ) -> ::std::os::raw::c_int;
1227}
1228extern "C" {
1229 pub fn ssh_pki_export_privkey_base64(
1230 privkey: ssh_key,
1231 passphrase: *const ::std::os::raw::c_char,
1232 auth_fn: ssh_auth_callback,
1233 auth_data: *mut ::std::os::raw::c_void,
1234 b64_key: *mut *mut ::std::os::raw::c_char,
1235 ) -> ::std::os::raw::c_int;
1236}
1237extern "C" {
1238 pub fn ssh_pki_export_privkey_base64_format(
1239 privkey: ssh_key,
1240 passphrase: *const ::std::os::raw::c_char,
1241 auth_fn: ssh_auth_callback,
1242 auth_data: *mut ::std::os::raw::c_void,
1243 b64_key: *mut *mut ::std::os::raw::c_char,
1244 format: ssh_file_format_e,
1245 ) -> ::std::os::raw::c_int;
1246}
1247extern "C" {
1248 pub fn ssh_pki_import_privkey_file(
1249 filename: *const ::std::os::raw::c_char,
1250 passphrase: *const ::std::os::raw::c_char,
1251 auth_fn: ssh_auth_callback,
1252 auth_data: *mut ::std::os::raw::c_void,
1253 pkey: *mut ssh_key,
1254 ) -> ::std::os::raw::c_int;
1255}
1256extern "C" {
1257 pub fn ssh_pki_export_privkey_file(
1258 privkey: ssh_key,
1259 passphrase: *const ::std::os::raw::c_char,
1260 auth_fn: ssh_auth_callback,
1261 auth_data: *mut ::std::os::raw::c_void,
1262 filename: *const ::std::os::raw::c_char,
1263 ) -> ::std::os::raw::c_int;
1264}
1265extern "C" {
1266 pub fn ssh_pki_export_privkey_file_format(
1267 privkey: ssh_key,
1268 passphrase: *const ::std::os::raw::c_char,
1269 auth_fn: ssh_auth_callback,
1270 auth_data: *mut ::std::os::raw::c_void,
1271 filename: *const ::std::os::raw::c_char,
1272 format: ssh_file_format_e,
1273 ) -> ::std::os::raw::c_int;
1274}
1275extern "C" {
1276 pub fn ssh_pki_copy_cert_to_privkey(
1277 cert_key: ssh_key,
1278 privkey: ssh_key,
1279 ) -> ::std::os::raw::c_int;
1280}
1281extern "C" {
1282 pub fn ssh_pki_import_pubkey_base64(
1283 b64_key: *const ::std::os::raw::c_char,
1284 type_: ssh_keytypes_e,
1285 pkey: *mut ssh_key,
1286 ) -> ::std::os::raw::c_int;
1287}
1288extern "C" {
1289 pub fn ssh_pki_import_pubkey_file(
1290 filename: *const ::std::os::raw::c_char,
1291 pkey: *mut ssh_key,
1292 ) -> ::std::os::raw::c_int;
1293}
1294extern "C" {
1295 pub fn ssh_pki_import_cert_base64(
1296 b64_cert: *const ::std::os::raw::c_char,
1297 type_: ssh_keytypes_e,
1298 pkey: *mut ssh_key,
1299 ) -> ::std::os::raw::c_int;
1300}
1301extern "C" {
1302 pub fn ssh_pki_import_cert_file(
1303 filename: *const ::std::os::raw::c_char,
1304 pkey: *mut ssh_key,
1305 ) -> ::std::os::raw::c_int;
1306}
1307extern "C" {
1308 pub fn ssh_pki_export_privkey_to_pubkey(
1309 privkey: ssh_key,
1310 pkey: *mut ssh_key,
1311 ) -> ::std::os::raw::c_int;
1312}
1313extern "C" {
1314 pub fn ssh_pki_export_pubkey_base64(
1315 key: ssh_key,
1316 b64_key: *mut *mut ::std::os::raw::c_char,
1317 ) -> ::std::os::raw::c_int;
1318}
1319extern "C" {
1320 pub fn ssh_pki_export_pubkey_file(
1321 key: ssh_key,
1322 filename: *const ::std::os::raw::c_char,
1323 ) -> ::std::os::raw::c_int;
1324}
1325extern "C" {
1326 pub fn ssh_pki_key_ecdsa_name(key: ssh_key) -> *const ::std::os::raw::c_char;
1327}
1328extern "C" {
1329 pub fn ssh_get_fingerprint_hash(
1330 type_: ssh_publickey_hash_type,
1331 hash: *mut ::std::os::raw::c_uchar,
1332 len: usize,
1333 ) -> *mut ::std::os::raw::c_char;
1334}
1335extern "C" {
1336 pub fn ssh_print_hash(
1337 type_: ssh_publickey_hash_type,
1338 hash: *mut ::std::os::raw::c_uchar,
1339 len: usize,
1340 );
1341}
1342extern "C" {
1343 pub fn ssh_send_ignore(
1344 session: ssh_session,
1345 data: *const ::std::os::raw::c_char,
1346 ) -> ::std::os::raw::c_int;
1347}
1348extern "C" {
1349 pub fn ssh_send_debug(
1350 session: ssh_session,
1351 message: *const ::std::os::raw::c_char,
1352 always_display: ::std::os::raw::c_int,
1353 ) -> ::std::os::raw::c_int;
1354}
1355extern "C" {
1356 pub fn ssh_gssapi_set_creds(session: ssh_session, creds: ssh_gssapi_creds);
1357}
1358extern "C" {
1359 pub fn ssh_select(
1360 channels: *mut ssh_channel,
1361 outchannels: *mut ssh_channel,
1362 maxfd: socket_t,
1363 readfds: *mut fd_set,
1364 timeout: *mut timeval,
1365 ) -> ::std::os::raw::c_int;
1366}
1367extern "C" {
1368 pub fn ssh_service_request(
1369 session: ssh_session,
1370 service: *const ::std::os::raw::c_char,
1371 ) -> ::std::os::raw::c_int;
1372}
1373extern "C" {
1374 pub fn ssh_set_agent_channel(
1375 session: ssh_session,
1376 channel: ssh_channel,
1377 ) -> ::std::os::raw::c_int;
1378}
1379extern "C" {
1380 pub fn ssh_set_agent_socket(session: ssh_session, fd: socket_t) -> ::std::os::raw::c_int;
1381}
1382extern "C" {
1383 pub fn ssh_set_blocking(session: ssh_session, blocking: ::std::os::raw::c_int);
1384}
1385extern "C" {
1386 pub fn ssh_set_counters(session: ssh_session, scounter: ssh_counter, rcounter: ssh_counter);
1387}
1388extern "C" {
1389 pub fn ssh_set_fd_except(session: ssh_session);
1390}
1391extern "C" {
1392 pub fn ssh_set_fd_toread(session: ssh_session);
1393}
1394extern "C" {
1395 pub fn ssh_set_fd_towrite(session: ssh_session);
1396}
1397extern "C" {
1398 pub fn ssh_silent_disconnect(session: ssh_session);
1399}
1400extern "C" {
1401 pub fn ssh_set_pcap_file(
1402 session: ssh_session,
1403 pcapfile: ssh_pcap_file,
1404 ) -> ::std::os::raw::c_int;
1405}
1406extern "C" {
1407 pub fn ssh_userauth_none(
1408 session: ssh_session,
1409 username: *const ::std::os::raw::c_char,
1410 ) -> ::std::os::raw::c_int;
1411}
1412extern "C" {
1413 pub fn ssh_userauth_list(
1414 session: ssh_session,
1415 username: *const ::std::os::raw::c_char,
1416 ) -> ::std::os::raw::c_int;
1417}
1418extern "C" {
1419 pub fn ssh_userauth_try_publickey(
1420 session: ssh_session,
1421 username: *const ::std::os::raw::c_char,
1422 pubkey: ssh_key,
1423 ) -> ::std::os::raw::c_int;
1424}
1425extern "C" {
1426 pub fn ssh_userauth_publickey(
1427 session: ssh_session,
1428 username: *const ::std::os::raw::c_char,
1429 privkey: ssh_key,
1430 ) -> ::std::os::raw::c_int;
1431}
1432extern "C" {
1433 pub fn ssh_userauth_agent(
1434 session: ssh_session,
1435 username: *const ::std::os::raw::c_char,
1436 ) -> ::std::os::raw::c_int;
1437}
1438extern "C" {
1439 pub fn ssh_userauth_publickey_auto_get_current_identity(
1440 session: ssh_session,
1441 value: *mut *mut ::std::os::raw::c_char,
1442 ) -> ::std::os::raw::c_int;
1443}
1444extern "C" {
1445 pub fn ssh_userauth_publickey_auto(
1446 session: ssh_session,
1447 username: *const ::std::os::raw::c_char,
1448 passphrase: *const ::std::os::raw::c_char,
1449 ) -> ::std::os::raw::c_int;
1450}
1451extern "C" {
1452 pub fn ssh_userauth_password(
1453 session: ssh_session,
1454 username: *const ::std::os::raw::c_char,
1455 password: *const ::std::os::raw::c_char,
1456 ) -> ::std::os::raw::c_int;
1457}
1458extern "C" {
1459 pub fn ssh_userauth_kbdint(
1460 session: ssh_session,
1461 user: *const ::std::os::raw::c_char,
1462 submethods: *const ::std::os::raw::c_char,
1463 ) -> ::std::os::raw::c_int;
1464}
1465extern "C" {
1466 pub fn ssh_userauth_kbdint_getinstruction(
1467 session: ssh_session,
1468 ) -> *const ::std::os::raw::c_char;
1469}
1470extern "C" {
1471 pub fn ssh_userauth_kbdint_getname(session: ssh_session) -> *const ::std::os::raw::c_char;
1472}
1473extern "C" {
1474 pub fn ssh_userauth_kbdint_getnprompts(session: ssh_session) -> ::std::os::raw::c_int;
1475}
1476extern "C" {
1477 pub fn ssh_userauth_kbdint_getprompt(
1478 session: ssh_session,
1479 i: ::std::os::raw::c_uint,
1480 echo: *mut ::std::os::raw::c_char,
1481 ) -> *const ::std::os::raw::c_char;
1482}
1483extern "C" {
1484 pub fn ssh_userauth_kbdint_getnanswers(session: ssh_session) -> ::std::os::raw::c_int;
1485}
1486extern "C" {
1487 pub fn ssh_userauth_kbdint_getanswer(
1488 session: ssh_session,
1489 i: ::std::os::raw::c_uint,
1490 ) -> *const ::std::os::raw::c_char;
1491}
1492extern "C" {
1493 pub fn ssh_userauth_kbdint_setanswer(
1494 session: ssh_session,
1495 i: ::std::os::raw::c_uint,
1496 answer: *const ::std::os::raw::c_char,
1497 ) -> ::std::os::raw::c_int;
1498}
1499extern "C" {
1500 pub fn ssh_userauth_gssapi(session: ssh_session) -> ::std::os::raw::c_int;
1501}
1502extern "C" {
1503 pub fn ssh_version(req_version: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
1504}
1505extern "C" {
1506 pub fn ssh_string_burn(str_: ssh_string);
1507}
1508extern "C" {
1509 pub fn ssh_string_copy(str_: ssh_string) -> ssh_string;
1510}
1511extern "C" {
1512 pub fn ssh_string_data(str_: ssh_string) -> *mut ::std::os::raw::c_void;
1513}
1514extern "C" {
1515 pub fn ssh_string_fill(
1516 str_: ssh_string,
1517 data: *const ::std::os::raw::c_void,
1518 len: usize,
1519 ) -> ::std::os::raw::c_int;
1520}
1521extern "C" {
1522 pub fn ssh_string_free(str_: ssh_string);
1523}
1524extern "C" {
1525 pub fn ssh_string_from_char(what: *const ::std::os::raw::c_char) -> ssh_string;
1526}
1527extern "C" {
1528 pub fn ssh_string_len(str_: ssh_string) -> usize;
1529}
1530extern "C" {
1531 pub fn ssh_string_new(size: usize) -> ssh_string;
1532}
1533extern "C" {
1534 pub fn ssh_string_get_char(str_: ssh_string) -> *const ::std::os::raw::c_char;
1535}
1536extern "C" {
1537 pub fn ssh_string_to_char(str_: ssh_string) -> *mut ::std::os::raw::c_char;
1538}
1539extern "C" {
1540 pub fn ssh_string_free_char(s: *mut ::std::os::raw::c_char);
1541}
1542extern "C" {
1543 pub fn ssh_getpass(
1544 prompt: *const ::std::os::raw::c_char,
1545 buf: *mut ::std::os::raw::c_char,
1546 len: usize,
1547 echo: ::std::os::raw::c_int,
1548 verify: ::std::os::raw::c_int,
1549 ) -> ::std::os::raw::c_int;
1550}
1551pub type ssh_event_callback = ::std::option::Option<
1552 unsafe extern "C" fn(
1553 fd: socket_t,
1554 revents: ::std::os::raw::c_int,
1555 userdata: *mut ::std::os::raw::c_void,
1556 ) -> ::std::os::raw::c_int,
1557>;
1558extern "C" {
1559 pub fn ssh_event_new() -> ssh_event;
1560}
1561extern "C" {
1562 pub fn ssh_event_add_fd(
1563 event: ssh_event,
1564 fd: socket_t,
1565 events: ::std::os::raw::c_short,
1566 cb: ssh_event_callback,
1567 userdata: *mut ::std::os::raw::c_void,
1568 ) -> ::std::os::raw::c_int;
1569}
1570extern "C" {
1571 pub fn ssh_event_add_session(event: ssh_event, session: ssh_session) -> ::std::os::raw::c_int;
1572}
1573extern "C" {
1574 pub fn ssh_event_add_connector(
1575 event: ssh_event,
1576 connector: ssh_connector,
1577 ) -> ::std::os::raw::c_int;
1578}
1579extern "C" {
1580 pub fn ssh_event_dopoll(
1581 event: ssh_event,
1582 timeout: ::std::os::raw::c_int,
1583 ) -> ::std::os::raw::c_int;
1584}
1585extern "C" {
1586 pub fn ssh_event_remove_fd(event: ssh_event, fd: socket_t) -> ::std::os::raw::c_int;
1587}
1588extern "C" {
1589 pub fn ssh_event_remove_session(
1590 event: ssh_event,
1591 session: ssh_session,
1592 ) -> ::std::os::raw::c_int;
1593}
1594extern "C" {
1595 pub fn ssh_event_remove_connector(
1596 event: ssh_event,
1597 connector: ssh_connector,
1598 ) -> ::std::os::raw::c_int;
1599}
1600extern "C" {
1601 pub fn ssh_event_free(event: ssh_event);
1602}
1603extern "C" {
1604 pub fn ssh_get_clientbanner(session: ssh_session) -> *const ::std::os::raw::c_char;
1605}
1606extern "C" {
1607 pub fn ssh_get_serverbanner(session: ssh_session) -> *const ::std::os::raw::c_char;
1608}
1609extern "C" {
1610 pub fn ssh_get_kex_algo(session: ssh_session) -> *const ::std::os::raw::c_char;
1611}
1612extern "C" {
1613 pub fn ssh_get_cipher_in(session: ssh_session) -> *const ::std::os::raw::c_char;
1614}
1615extern "C" {
1616 pub fn ssh_get_cipher_out(session: ssh_session) -> *const ::std::os::raw::c_char;
1617}
1618extern "C" {
1619 pub fn ssh_get_hmac_in(session: ssh_session) -> *const ::std::os::raw::c_char;
1620}
1621extern "C" {
1622 pub fn ssh_get_hmac_out(session: ssh_session) -> *const ::std::os::raw::c_char;
1623}
1624extern "C" {
1625 pub fn ssh_buffer_new() -> ssh_buffer;
1626}
1627extern "C" {
1628 pub fn ssh_buffer_free(buffer: ssh_buffer);
1629}
1630extern "C" {
1631 pub fn ssh_buffer_reinit(buffer: ssh_buffer) -> ::std::os::raw::c_int;
1632}
1633extern "C" {
1634 pub fn ssh_buffer_add_data(
1635 buffer: ssh_buffer,
1636 data: *const ::std::os::raw::c_void,
1637 len: u32,
1638 ) -> ::std::os::raw::c_int;
1639}
1640extern "C" {
1641 pub fn ssh_buffer_get_data(
1642 buffer: ssh_buffer,
1643 data: *mut ::std::os::raw::c_void,
1644 requestedlen: u32,
1645 ) -> u32;
1646}
1647extern "C" {
1648 pub fn ssh_buffer_get(buffer: ssh_buffer) -> *mut ::std::os::raw::c_void;
1649}
1650extern "C" {
1651 pub fn ssh_buffer_get_len(buffer: ssh_buffer) -> u32;
1652}
1653extern "C" {
1654 pub fn ssh_session_set_disconnect_message(
1655 session: ssh_session,
1656 message: *const ::std::os::raw::c_char,
1657 ) -> ::std::os::raw::c_int;
1658}
1659#[repr(C)]
1660#[derive(Debug, Copy, Clone)]
1661pub struct ssh_private_key_struct {
1662 _unused: [u8; 0],
1663}
1664pub type ssh_private_key = *mut ssh_private_key_struct;
1665#[repr(C)]
1666#[derive(Debug, Copy, Clone)]
1667pub struct ssh_public_key_struct {
1668 _unused: [u8; 0],
1669}
1670pub type ssh_public_key = *mut ssh_public_key_struct;
1671extern "C" {
1672 pub fn ssh_auth_list(session: ssh_session) -> ::std::os::raw::c_int;
1673}
1674extern "C" {
1675 pub fn ssh_userauth_offer_pubkey(
1676 session: ssh_session,
1677 username: *const ::std::os::raw::c_char,
1678 type_: ::std::os::raw::c_int,
1679 publickey: ssh_string,
1680 ) -> ::std::os::raw::c_int;
1681}
1682extern "C" {
1683 pub fn ssh_userauth_pubkey(
1684 session: ssh_session,
1685 username: *const ::std::os::raw::c_char,
1686 publickey: ssh_string,
1687 privatekey: ssh_private_key,
1688 ) -> ::std::os::raw::c_int;
1689}
1690extern "C" {
1691 pub fn ssh_userauth_agent_pubkey(
1692 session: ssh_session,
1693 username: *const ::std::os::raw::c_char,
1694 publickey: ssh_public_key,
1695 ) -> ::std::os::raw::c_int;
1696}
1697extern "C" {
1698 pub fn ssh_userauth_autopubkey(
1699 session: ssh_session,
1700 passphrase: *const ::std::os::raw::c_char,
1701 ) -> ::std::os::raw::c_int;
1702}
1703extern "C" {
1704 pub fn ssh_userauth_privatekey_file(
1705 session: ssh_session,
1706 username: *const ::std::os::raw::c_char,
1707 filename: *const ::std::os::raw::c_char,
1708 passphrase: *const ::std::os::raw::c_char,
1709 ) -> ::std::os::raw::c_int;
1710}
1711extern "C" {
1712 pub fn ssh_publickey_to_file(
1713 session: ssh_session,
1714 file: *const ::std::os::raw::c_char,
1715 pubkey: ssh_string,
1716 type_: ::std::os::raw::c_int,
1717 ) -> ::std::os::raw::c_int;
1718}
1719extern "C" {
1720 pub fn ssh_try_publickey_from_file(
1721 session: ssh_session,
1722 keyfile: *const ::std::os::raw::c_char,
1723 publickey: *mut ssh_string,
1724 type_: *mut ::std::os::raw::c_int,
1725 ) -> ::std::os::raw::c_int;
1726}
1727extern "C" {
1728 pub fn ssh_privatekey_type(privatekey: ssh_private_key) -> ssh_keytypes_e;
1729}
1730extern "C" {
1731 pub fn ssh_get_pubkey(session: ssh_session) -> ssh_string;
1732}
1733extern "C" {
1734 pub fn ssh_message_retrieve(session: ssh_session, packettype: u32) -> ssh_message;
1735}
1736extern "C" {
1737 pub fn ssh_message_auth_publickey(msg: ssh_message) -> ssh_public_key;
1738}
1739pub type ssh_callback_int = ::std::option::Option<
1740 unsafe extern "C" fn(code: ::std::os::raw::c_int, user: *mut ::std::os::raw::c_void),
1741>;
1742pub type ssh_callback_data = ::std::option::Option<
1743 unsafe extern "C" fn(
1744 data: *const ::std::os::raw::c_void,
1745 len: usize,
1746 user: *mut ::std::os::raw::c_void,
1747 ) -> usize,
1748>;
1749pub type ssh_callback_int_int = ::std::option::Option<
1750 unsafe extern "C" fn(
1751 code: ::std::os::raw::c_int,
1752 errno_code: ::std::os::raw::c_int,
1753 user: *mut ::std::os::raw::c_void,
1754 ),
1755>;
1756pub type ssh_message_callback = ::std::option::Option<
1757 unsafe extern "C" fn(
1758 arg1: ssh_session,
1759 message: ssh_message,
1760 user: *mut ::std::os::raw::c_void,
1761 ) -> ::std::os::raw::c_int,
1762>;
1763pub type ssh_channel_callback_int = ::std::option::Option<
1764 unsafe extern "C" fn(
1765 channel: ssh_channel,
1766 code: ::std::os::raw::c_int,
1767 user: *mut ::std::os::raw::c_void,
1768 ) -> ::std::os::raw::c_int,
1769>;
1770pub type ssh_channel_callback_data = ::std::option::Option<
1771 unsafe extern "C" fn(
1772 channel: ssh_channel,
1773 code: ::std::os::raw::c_int,
1774 data: *mut ::std::os::raw::c_void,
1775 len: usize,
1776 user: *mut ::std::os::raw::c_void,
1777 ) -> ::std::os::raw::c_int,
1778>;
1779pub type ssh_log_callback = ::std::option::Option<
1780 unsafe extern "C" fn(
1781 session: ssh_session,
1782 priority: ::std::os::raw::c_int,
1783 message: *const ::std::os::raw::c_char,
1784 userdata: *mut ::std::os::raw::c_void,
1785 ),
1786>;
1787pub type ssh_logging_callback = ::std::option::Option<
1788 unsafe extern "C" fn(
1789 priority: ::std::os::raw::c_int,
1790 function: *const ::std::os::raw::c_char,
1791 buffer: *const ::std::os::raw::c_char,
1792 userdata: *mut ::std::os::raw::c_void,
1793 ),
1794>;
1795pub type ssh_status_callback = ::std::option::Option<
1796 unsafe extern "C" fn(session: ssh_session, status: f32, userdata: *mut ::std::os::raw::c_void),
1797>;
1798pub type ssh_global_request_callback = ::std::option::Option<
1799 unsafe extern "C" fn(
1800 session: ssh_session,
1801 message: ssh_message,
1802 userdata: *mut ::std::os::raw::c_void,
1803 ),
1804>;
1805pub type ssh_channel_open_request_x11_callback = ::std::option::Option<
1806 unsafe extern "C" fn(
1807 session: ssh_session,
1808 originator_address: *const ::std::os::raw::c_char,
1809 originator_port: ::std::os::raw::c_int,
1810 userdata: *mut ::std::os::raw::c_void,
1811 ) -> ssh_channel,
1812>;
1813pub type ssh_channel_open_request_auth_agent_callback = ::std::option::Option<
1814 unsafe extern "C" fn(
1815 session: ssh_session,
1816 userdata: *mut ::std::os::raw::c_void,
1817 ) -> ssh_channel,
1818>;
1819pub type ssh_channel_open_request_forwarded_tcpip_callback = ::std::option::Option<
1820 unsafe extern "C" fn(
1821 session: ssh_session,
1822 destination_address: *const ::std::os::raw::c_char,
1823 destination_port: ::std::os::raw::c_int,
1824 originator_address: *const ::std::os::raw::c_char,
1825 originator_port: ::std::os::raw::c_int,
1826 userdata: *mut ::std::os::raw::c_void,
1827 ) -> ssh_channel,
1828>;
1829#[repr(C)]
1830#[derive(Debug, Copy, Clone)]
1831pub struct ssh_callbacks_struct {
1832 pub size: usize,
1833 pub userdata: *mut ::std::os::raw::c_void,
1834 pub auth_function: ssh_auth_callback,
1835 pub log_function: ssh_log_callback,
1836 pub connect_status_function: ::std::option::Option<
1837 unsafe extern "C" fn(userdata: *mut ::std::os::raw::c_void, status: f32),
1838 >,
1839 pub global_request_function: ssh_global_request_callback,
1840 pub channel_open_request_x11_function: ssh_channel_open_request_x11_callback,
1841 pub channel_open_request_auth_agent_function: ssh_channel_open_request_auth_agent_callback,
1842 pub channel_open_request_forwarded_tcpip_function:
1843 ssh_channel_open_request_forwarded_tcpip_callback,
1844}
1845pub type ssh_callbacks = *mut ssh_callbacks_struct;
1846pub type ssh_auth_password_callback = ::std::option::Option<
1847 unsafe extern "C" fn(
1848 session: ssh_session,
1849 user: *const ::std::os::raw::c_char,
1850 password: *const ::std::os::raw::c_char,
1851 userdata: *mut ::std::os::raw::c_void,
1852 ) -> ::std::os::raw::c_int,
1853>;
1854pub type ssh_auth_none_callback = ::std::option::Option<
1855 unsafe extern "C" fn(
1856 session: ssh_session,
1857 user: *const ::std::os::raw::c_char,
1858 userdata: *mut ::std::os::raw::c_void,
1859 ) -> ::std::os::raw::c_int,
1860>;
1861pub type ssh_auth_gssapi_mic_callback = ::std::option::Option<
1862 unsafe extern "C" fn(
1863 session: ssh_session,
1864 user: *const ::std::os::raw::c_char,
1865 principal: *const ::std::os::raw::c_char,
1866 userdata: *mut ::std::os::raw::c_void,
1867 ) -> ::std::os::raw::c_int,
1868>;
1869pub type ssh_auth_pubkey_callback = ::std::option::Option<
1870 unsafe extern "C" fn(
1871 session: ssh_session,
1872 user: *const ::std::os::raw::c_char,
1873 pubkey: *mut ssh_key_struct,
1874 signature_state: ::std::os::raw::c_char,
1875 userdata: *mut ::std::os::raw::c_void,
1876 ) -> ::std::os::raw::c_int,
1877>;
1878pub type ssh_service_request_callback = ::std::option::Option<
1879 unsafe extern "C" fn(
1880 session: ssh_session,
1881 service: *const ::std::os::raw::c_char,
1882 userdata: *mut ::std::os::raw::c_void,
1883 ) -> ::std::os::raw::c_int,
1884>;
1885pub type ssh_channel_open_request_session_callback = ::std::option::Option<
1886 unsafe extern "C" fn(
1887 session: ssh_session,
1888 userdata: *mut ::std::os::raw::c_void,
1889 ) -> ssh_channel,
1890>;
1891pub type ssh_gssapi_select_oid_callback = ::std::option::Option<
1892 unsafe extern "C" fn(
1893 session: ssh_session,
1894 user: *const ::std::os::raw::c_char,
1895 n_oid: ::std::os::raw::c_int,
1896 oids: *mut ssh_string,
1897 userdata: *mut ::std::os::raw::c_void,
1898 ) -> ssh_string,
1899>;
1900pub type ssh_gssapi_accept_sec_ctx_callback = ::std::option::Option<
1901 unsafe extern "C" fn(
1902 session: ssh_session,
1903 input_token: ssh_string,
1904 output_token: *mut ssh_string,
1905 userdata: *mut ::std::os::raw::c_void,
1906 ) -> ::std::os::raw::c_int,
1907>;
1908pub type ssh_gssapi_verify_mic_callback = ::std::option::Option<
1909 unsafe extern "C" fn(
1910 session: ssh_session,
1911 mic: ssh_string,
1912 mic_buffer: *mut ::std::os::raw::c_void,
1913 mic_buffer_size: usize,
1914 userdata: *mut ::std::os::raw::c_void,
1915 ) -> ::std::os::raw::c_int,
1916>;
1917#[repr(C)]
1918#[derive(Debug, Copy, Clone)]
1919pub struct ssh_server_callbacks_struct {
1920 pub size: usize,
1921 pub userdata: *mut ::std::os::raw::c_void,
1922 pub auth_password_function: ssh_auth_password_callback,
1923 pub auth_none_function: ssh_auth_none_callback,
1924 pub auth_gssapi_mic_function: ssh_auth_gssapi_mic_callback,
1925 pub auth_pubkey_function: ssh_auth_pubkey_callback,
1926 pub service_request_function: ssh_service_request_callback,
1927 pub channel_open_request_session_function: ssh_channel_open_request_session_callback,
1928 pub gssapi_select_oid_function: ssh_gssapi_select_oid_callback,
1929 pub gssapi_accept_sec_ctx_function: ssh_gssapi_accept_sec_ctx_callback,
1930 pub gssapi_verify_mic_function: ssh_gssapi_verify_mic_callback,
1931}
1932pub type ssh_server_callbacks = *mut ssh_server_callbacks_struct;
1933extern "C" {
1934 pub fn ssh_set_server_callbacks(
1935 session: ssh_session,
1936 cb: ssh_server_callbacks,
1937 ) -> ::std::os::raw::c_int;
1938}
1939#[repr(C)]
1940#[derive(Debug, Copy, Clone)]
1941pub struct ssh_socket_callbacks_struct {
1942 pub userdata: *mut ::std::os::raw::c_void,
1943 pub data: ssh_callback_data,
1944 pub controlflow: ssh_callback_int,
1945 pub exception: ssh_callback_int_int,
1946 pub connected: ssh_callback_int_int,
1947}
1948pub type ssh_socket_callbacks = *mut ssh_socket_callbacks_struct;
1949pub type ssh_packet_callback = ::std::option::Option<
1950 unsafe extern "C" fn(
1951 session: ssh_session,
1952 type_: u8,
1953 packet: ssh_buffer,
1954 user: *mut ::std::os::raw::c_void,
1955 ) -> ::std::os::raw::c_int,
1956>;
1957#[repr(C)]
1958#[derive(Debug, Copy, Clone)]
1959pub struct ssh_packet_callbacks_struct {
1960 pub start: u8,
1961 pub n_callbacks: u8,
1962 pub callbacks: *mut ssh_packet_callback,
1963 pub user: *mut ::std::os::raw::c_void,
1964}
1965pub type ssh_packet_callbacks = *mut ssh_packet_callbacks_struct;
1966extern "C" {
1967 pub fn ssh_set_callbacks(session: ssh_session, cb: ssh_callbacks) -> ::std::os::raw::c_int;
1968}
1969pub type ssh_channel_data_callback = ::std::option::Option<
1970 unsafe extern "C" fn(
1971 session: ssh_session,
1972 channel: ssh_channel,
1973 data: *mut ::std::os::raw::c_void,
1974 len: u32,
1975 is_stderr: ::std::os::raw::c_int,
1976 userdata: *mut ::std::os::raw::c_void,
1977 ) -> ::std::os::raw::c_int,
1978>;
1979pub type ssh_channel_eof_callback = ::std::option::Option<
1980 unsafe extern "C" fn(
1981 session: ssh_session,
1982 channel: ssh_channel,
1983 userdata: *mut ::std::os::raw::c_void,
1984 ),
1985>;
1986pub type ssh_channel_close_callback = ::std::option::Option<
1987 unsafe extern "C" fn(
1988 session: ssh_session,
1989 channel: ssh_channel,
1990 userdata: *mut ::std::os::raw::c_void,
1991 ),
1992>;
1993pub type ssh_channel_signal_callback = ::std::option::Option<
1994 unsafe extern "C" fn(
1995 session: ssh_session,
1996 channel: ssh_channel,
1997 signal: *const ::std::os::raw::c_char,
1998 userdata: *mut ::std::os::raw::c_void,
1999 ),
2000>;
2001pub type ssh_channel_exit_status_callback = ::std::option::Option<
2002 unsafe extern "C" fn(
2003 session: ssh_session,
2004 channel: ssh_channel,
2005 exit_status: ::std::os::raw::c_int,
2006 userdata: *mut ::std::os::raw::c_void,
2007 ),
2008>;
2009pub type ssh_channel_exit_signal_callback = ::std::option::Option<
2010 unsafe extern "C" fn(
2011 session: ssh_session,
2012 channel: ssh_channel,
2013 signal: *const ::std::os::raw::c_char,
2014 core: ::std::os::raw::c_int,
2015 errmsg: *const ::std::os::raw::c_char,
2016 lang: *const ::std::os::raw::c_char,
2017 userdata: *mut ::std::os::raw::c_void,
2018 ),
2019>;
2020pub type ssh_channel_pty_request_callback = ::std::option::Option<
2021 unsafe extern "C" fn(
2022 session: ssh_session,
2023 channel: ssh_channel,
2024 term: *const ::std::os::raw::c_char,
2025 width: ::std::os::raw::c_int,
2026 height: ::std::os::raw::c_int,
2027 pxwidth: ::std::os::raw::c_int,
2028 pwheight: ::std::os::raw::c_int,
2029 userdata: *mut ::std::os::raw::c_void,
2030 ) -> ::std::os::raw::c_int,
2031>;
2032pub type ssh_channel_shell_request_callback = ::std::option::Option<
2033 unsafe extern "C" fn(
2034 session: ssh_session,
2035 channel: ssh_channel,
2036 userdata: *mut ::std::os::raw::c_void,
2037 ) -> ::std::os::raw::c_int,
2038>;
2039pub type ssh_channel_auth_agent_req_callback = ::std::option::Option<
2040 unsafe extern "C" fn(
2041 session: ssh_session,
2042 channel: ssh_channel,
2043 userdata: *mut ::std::os::raw::c_void,
2044 ),
2045>;
2046pub type ssh_channel_x11_req_callback = ::std::option::Option<
2047 unsafe extern "C" fn(
2048 session: ssh_session,
2049 channel: ssh_channel,
2050 single_connection: ::std::os::raw::c_int,
2051 auth_protocol: *const ::std::os::raw::c_char,
2052 auth_cookie: *const ::std::os::raw::c_char,
2053 screen_number: u32,
2054 userdata: *mut ::std::os::raw::c_void,
2055 ),
2056>;
2057pub type ssh_channel_pty_window_change_callback = ::std::option::Option<
2058 unsafe extern "C" fn(
2059 session: ssh_session,
2060 channel: ssh_channel,
2061 width: ::std::os::raw::c_int,
2062 height: ::std::os::raw::c_int,
2063 pxwidth: ::std::os::raw::c_int,
2064 pwheight: ::std::os::raw::c_int,
2065 userdata: *mut ::std::os::raw::c_void,
2066 ) -> ::std::os::raw::c_int,
2067>;
2068pub type ssh_channel_exec_request_callback = ::std::option::Option<
2069 unsafe extern "C" fn(
2070 session: ssh_session,
2071 channel: ssh_channel,
2072 command: *const ::std::os::raw::c_char,
2073 userdata: *mut ::std::os::raw::c_void,
2074 ) -> ::std::os::raw::c_int,
2075>;
2076pub type ssh_channel_env_request_callback = ::std::option::Option<
2077 unsafe extern "C" fn(
2078 session: ssh_session,
2079 channel: ssh_channel,
2080 env_name: *const ::std::os::raw::c_char,
2081 env_value: *const ::std::os::raw::c_char,
2082 userdata: *mut ::std::os::raw::c_void,
2083 ) -> ::std::os::raw::c_int,
2084>;
2085pub type ssh_channel_subsystem_request_callback = ::std::option::Option<
2086 unsafe extern "C" fn(
2087 session: ssh_session,
2088 channel: ssh_channel,
2089 subsystem: *const ::std::os::raw::c_char,
2090 userdata: *mut ::std::os::raw::c_void,
2091 ) -> ::std::os::raw::c_int,
2092>;
2093pub type ssh_channel_write_wontblock_callback = ::std::option::Option<
2094 unsafe extern "C" fn(
2095 session: ssh_session,
2096 channel: ssh_channel,
2097 bytes: u32,
2098 userdata: *mut ::std::os::raw::c_void,
2099 ) -> ::std::os::raw::c_int,
2100>;
2101pub type ssh_channel_open_resp_callback = ::std::option::Option<
2102 unsafe extern "C" fn(
2103 session: ssh_session,
2104 channel: ssh_channel,
2105 is_success: bool,
2106 userdata: *mut ::std::os::raw::c_void,
2107 ),
2108>;
2109pub type ssh_channel_request_resp_callback = ::std::option::Option<
2110 unsafe extern "C" fn(
2111 session: ssh_session,
2112 channel: ssh_channel,
2113 userdata: *mut ::std::os::raw::c_void,
2114 ),
2115>;
2116#[repr(C)]
2117#[derive(Debug, Copy, Clone)]
2118pub struct ssh_channel_callbacks_struct {
2119 pub size: usize,
2120 pub userdata: *mut ::std::os::raw::c_void,
2121 pub channel_data_function: ssh_channel_data_callback,
2122 pub channel_eof_function: ssh_channel_eof_callback,
2123 pub channel_close_function: ssh_channel_close_callback,
2124 pub channel_signal_function: ssh_channel_signal_callback,
2125 pub channel_exit_status_function: ssh_channel_exit_status_callback,
2126 pub channel_exit_signal_function: ssh_channel_exit_signal_callback,
2127 pub channel_pty_request_function: ssh_channel_pty_request_callback,
2128 pub channel_shell_request_function: ssh_channel_shell_request_callback,
2129 pub channel_auth_agent_req_function: ssh_channel_auth_agent_req_callback,
2130 pub channel_x11_req_function: ssh_channel_x11_req_callback,
2131 pub channel_pty_window_change_function: ssh_channel_pty_window_change_callback,
2132 pub channel_exec_request_function: ssh_channel_exec_request_callback,
2133 pub channel_env_request_function: ssh_channel_env_request_callback,
2134 pub channel_subsystem_request_function: ssh_channel_subsystem_request_callback,
2135 pub channel_write_wontblock_function: ssh_channel_write_wontblock_callback,
2136 pub channel_open_response_function: ssh_channel_open_resp_callback,
2137 pub channel_request_response_function: ssh_channel_request_resp_callback,
2138}
2139pub type ssh_channel_callbacks = *mut ssh_channel_callbacks_struct;
2140extern "C" {
2141 pub fn ssh_set_channel_callbacks(
2142 channel: ssh_channel,
2143 cb: ssh_channel_callbacks,
2144 ) -> ::std::os::raw::c_int;
2145}
2146extern "C" {
2147 pub fn ssh_add_channel_callbacks(
2148 channel: ssh_channel,
2149 cb: ssh_channel_callbacks,
2150 ) -> ::std::os::raw::c_int;
2151}
2152extern "C" {
2153 pub fn ssh_remove_channel_callbacks(
2154 channel: ssh_channel,
2155 cb: ssh_channel_callbacks,
2156 ) -> ::std::os::raw::c_int;
2157}
2158pub type ssh_thread_callback = ::std::option::Option<
2159 unsafe extern "C" fn(lock: *mut *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
2160>;
2161pub type ssh_thread_id_callback =
2162 ::std::option::Option<unsafe extern "C" fn() -> ::std::os::raw::c_ulong>;
2163#[repr(C)]
2164#[derive(Debug, Copy, Clone)]
2165pub struct ssh_threads_callbacks_struct {
2166 pub type_: *const ::std::os::raw::c_char,
2167 pub mutex_init: ssh_thread_callback,
2168 pub mutex_destroy: ssh_thread_callback,
2169 pub mutex_lock: ssh_thread_callback,
2170 pub mutex_unlock: ssh_thread_callback,
2171 pub thread_id: ssh_thread_id_callback,
2172}
2173extern "C" {
2174 pub fn ssh_threads_set_callbacks(
2175 cb: *mut ssh_threads_callbacks_struct,
2176 ) -> ::std::os::raw::c_int;
2177}
2178extern "C" {
2179 pub fn ssh_threads_get_default() -> *mut ssh_threads_callbacks_struct;
2180}
2181extern "C" {
2182 pub fn ssh_threads_get_pthread() -> *mut ssh_threads_callbacks_struct;
2183}
2184extern "C" {
2185 pub fn ssh_threads_get_noop() -> *mut ssh_threads_callbacks_struct;
2186}
2187extern "C" {
2188 pub fn ssh_set_log_callback(cb: ssh_logging_callback) -> ::std::os::raw::c_int;
2189}
2190extern "C" {
2191 pub fn ssh_get_log_callback() -> ssh_logging_callback;
2192}
2193pub type ssh_jump_before_connection_callback = ::std::option::Option<
2194 unsafe extern "C" fn(
2195 session: ssh_session,
2196 userdata: *mut ::std::os::raw::c_void,
2197 ) -> ::std::os::raw::c_int,
2198>;
2199pub type ssh_jump_verify_knownhost_callback = ::std::option::Option<
2200 unsafe extern "C" fn(
2201 session: ssh_session,
2202 userdata: *mut ::std::os::raw::c_void,
2203 ) -> ::std::os::raw::c_int,
2204>;
2205pub type ssh_jump_authenticate_callback = ::std::option::Option<
2206 unsafe extern "C" fn(
2207 session: ssh_session,
2208 userdata: *mut ::std::os::raw::c_void,
2209 ) -> ::std::os::raw::c_int,
2210>;
2211#[repr(C)]
2212#[derive(Debug, Copy, Clone)]
2213pub struct ssh_jump_callbacks_struct {
2214 pub userdata: *mut ::std::os::raw::c_void,
2215 pub before_connection: ssh_jump_before_connection_callback,
2216 pub verify_knownhost: ssh_jump_verify_knownhost_callback,
2217 pub authenticate: ssh_jump_authenticate_callback,
2218}
2219#[repr(u32)]
2220#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2221pub enum ssh_bind_options_e {
2222 SSH_BIND_OPTIONS_BINDADDR = 0,
2223 SSH_BIND_OPTIONS_BINDPORT = 1,
2224 SSH_BIND_OPTIONS_BINDPORT_STR = 2,
2225 SSH_BIND_OPTIONS_HOSTKEY = 3,
2226 SSH_BIND_OPTIONS_DSAKEY = 4,
2227 SSH_BIND_OPTIONS_RSAKEY = 5,
2228 SSH_BIND_OPTIONS_BANNER = 6,
2229 SSH_BIND_OPTIONS_LOG_VERBOSITY = 7,
2230 SSH_BIND_OPTIONS_LOG_VERBOSITY_STR = 8,
2231 SSH_BIND_OPTIONS_ECDSAKEY = 9,
2232 SSH_BIND_OPTIONS_IMPORT_KEY = 10,
2233 SSH_BIND_OPTIONS_KEY_EXCHANGE = 11,
2234 SSH_BIND_OPTIONS_CIPHERS_C_S = 12,
2235 SSH_BIND_OPTIONS_CIPHERS_S_C = 13,
2236 SSH_BIND_OPTIONS_HMAC_C_S = 14,
2237 SSH_BIND_OPTIONS_HMAC_S_C = 15,
2238 SSH_BIND_OPTIONS_CONFIG_DIR = 16,
2239 SSH_BIND_OPTIONS_PUBKEY_ACCEPTED_KEY_TYPES = 17,
2240 SSH_BIND_OPTIONS_HOSTKEY_ALGORITHMS = 18,
2241 SSH_BIND_OPTIONS_PROCESS_CONFIG = 19,
2242 SSH_BIND_OPTIONS_MODULI = 20,
2243 SSH_BIND_OPTIONS_RSA_MIN_SIZE = 21,
2244 SSH_BIND_OPTIONS_IMPORT_KEY_STR = 22,
2245}
2246#[repr(C)]
2247#[derive(Debug, Copy, Clone)]
2248pub struct ssh_bind_struct {
2249 _unused: [u8; 0],
2250}
2251pub type ssh_bind = *mut ssh_bind_struct;
2252pub type ssh_bind_incoming_connection_callback = ::std::option::Option<
2253 unsafe extern "C" fn(sshbind: ssh_bind, userdata: *mut ::std::os::raw::c_void),
2254>;
2255#[repr(C)]
2256#[derive(Debug, Copy, Clone)]
2257pub struct ssh_bind_callbacks_struct {
2258 pub size: usize,
2259 pub incoming_connection: ssh_bind_incoming_connection_callback,
2260}
2261pub type ssh_bind_callbacks = *mut ssh_bind_callbacks_struct;
2262extern "C" {
2263 pub fn ssh_bind_new() -> ssh_bind;
2264}
2265extern "C" {
2266 pub fn ssh_bind_options_set(
2267 sshbind: ssh_bind,
2268 type_: ssh_bind_options_e,
2269 value: *const ::std::os::raw::c_void,
2270 ) -> ::std::os::raw::c_int;
2271}
2272extern "C" {
2273 pub fn ssh_bind_options_parse_config(
2274 sshbind: ssh_bind,
2275 filename: *const ::std::os::raw::c_char,
2276 ) -> ::std::os::raw::c_int;
2277}
2278extern "C" {
2279 pub fn ssh_bind_listen(ssh_bind_o: ssh_bind) -> ::std::os::raw::c_int;
2280}
2281extern "C" {
2282 pub fn ssh_bind_set_callbacks(
2283 sshbind: ssh_bind,
2284 callbacks: ssh_bind_callbacks,
2285 userdata: *mut ::std::os::raw::c_void,
2286 ) -> ::std::os::raw::c_int;
2287}
2288extern "C" {
2289 pub fn ssh_bind_set_blocking(ssh_bind_o: ssh_bind, blocking: ::std::os::raw::c_int);
2290}
2291extern "C" {
2292 pub fn ssh_bind_get_fd(ssh_bind_o: ssh_bind) -> socket_t;
2293}
2294extern "C" {
2295 pub fn ssh_bind_set_fd(ssh_bind_o: ssh_bind, fd: socket_t);
2296}
2297extern "C" {
2298 pub fn ssh_bind_fd_toaccept(ssh_bind_o: ssh_bind);
2299}
2300extern "C" {
2301 pub fn ssh_bind_accept(ssh_bind_o: ssh_bind, session: ssh_session) -> ::std::os::raw::c_int;
2302}
2303extern "C" {
2304 pub fn ssh_bind_accept_fd(
2305 ssh_bind_o: ssh_bind,
2306 session: ssh_session,
2307 fd: socket_t,
2308 ) -> ::std::os::raw::c_int;
2309}
2310extern "C" {
2311 pub fn ssh_gssapi_get_creds(session: ssh_session) -> ssh_gssapi_creds;
2312}
2313extern "C" {
2314 pub fn ssh_handle_key_exchange(session: ssh_session) -> ::std::os::raw::c_int;
2315}
2316extern "C" {
2317 pub fn ssh_server_init_kex(session: ssh_session) -> ::std::os::raw::c_int;
2318}
2319extern "C" {
2320 pub fn ssh_bind_free(ssh_bind_o: ssh_bind);
2321}
2322extern "C" {
2323 pub fn ssh_set_auth_methods(session: ssh_session, auth_methods: ::std::os::raw::c_int);
2324}
2325extern "C" {
2326 pub fn ssh_send_issue_banner(session: ssh_session, banner: ssh_string)
2327 -> ::std::os::raw::c_int;
2328}
2329extern "C" {
2330 pub fn ssh_message_reply_default(msg: ssh_message) -> ::std::os::raw::c_int;
2331}
2332extern "C" {
2333 pub fn ssh_message_auth_user(msg: ssh_message) -> *const ::std::os::raw::c_char;
2334}
2335extern "C" {
2336 pub fn ssh_message_auth_password(msg: ssh_message) -> *const ::std::os::raw::c_char;
2337}
2338extern "C" {
2339 pub fn ssh_message_auth_pubkey(msg: ssh_message) -> ssh_key;
2340}
2341extern "C" {
2342 pub fn ssh_message_auth_kbdint_is_response(msg: ssh_message) -> ::std::os::raw::c_int;
2343}
2344extern "C" {
2345 pub fn ssh_message_auth_publickey_state(msg: ssh_message) -> ssh_publickey_state_e;
2346}
2347extern "C" {
2348 pub fn ssh_message_auth_reply_success(
2349 msg: ssh_message,
2350 partial: ::std::os::raw::c_int,
2351 ) -> ::std::os::raw::c_int;
2352}
2353extern "C" {
2354 pub fn ssh_message_auth_reply_pk_ok(
2355 msg: ssh_message,
2356 algo: ssh_string,
2357 pubkey: ssh_string,
2358 ) -> ::std::os::raw::c_int;
2359}
2360extern "C" {
2361 pub fn ssh_message_auth_reply_pk_ok_simple(msg: ssh_message) -> ::std::os::raw::c_int;
2362}
2363extern "C" {
2364 pub fn ssh_message_auth_set_methods(
2365 msg: ssh_message,
2366 methods: ::std::os::raw::c_int,
2367 ) -> ::std::os::raw::c_int;
2368}
2369extern "C" {
2370 pub fn ssh_message_auth_interactive_request(
2371 msg: ssh_message,
2372 name: *const ::std::os::raw::c_char,
2373 instruction: *const ::std::os::raw::c_char,
2374 num_prompts: ::std::os::raw::c_uint,
2375 prompts: *mut *const ::std::os::raw::c_char,
2376 echo: *mut ::std::os::raw::c_char,
2377 ) -> ::std::os::raw::c_int;
2378}
2379extern "C" {
2380 pub fn ssh_message_service_reply_success(msg: ssh_message) -> ::std::os::raw::c_int;
2381}
2382extern "C" {
2383 pub fn ssh_message_service_service(msg: ssh_message) -> *const ::std::os::raw::c_char;
2384}
2385extern "C" {
2386 pub fn ssh_message_global_request_reply_success(
2387 msg: ssh_message,
2388 bound_port: u16,
2389 ) -> ::std::os::raw::c_int;
2390}
2391extern "C" {
2392 pub fn ssh_set_message_callback(
2393 session: ssh_session,
2394 ssh_bind_message_callback: ::std::option::Option<
2395 unsafe extern "C" fn(
2396 session: ssh_session,
2397 msg: ssh_message,
2398 data: *mut ::std::os::raw::c_void,
2399 ) -> ::std::os::raw::c_int,
2400 >,
2401 data: *mut ::std::os::raw::c_void,
2402 );
2403}
2404extern "C" {
2405 pub fn ssh_execute_message_callbacks(session: ssh_session) -> ::std::os::raw::c_int;
2406}
2407extern "C" {
2408 pub fn ssh_message_channel_request_open_originator(
2409 msg: ssh_message,
2410 ) -> *const ::std::os::raw::c_char;
2411}
2412extern "C" {
2413 pub fn ssh_message_channel_request_open_originator_port(
2414 msg: ssh_message,
2415 ) -> ::std::os::raw::c_int;
2416}
2417extern "C" {
2418 pub fn ssh_message_channel_request_open_destination(
2419 msg: ssh_message,
2420 ) -> *const ::std::os::raw::c_char;
2421}
2422extern "C" {
2423 pub fn ssh_message_channel_request_open_destination_port(
2424 msg: ssh_message,
2425 ) -> ::std::os::raw::c_int;
2426}
2427extern "C" {
2428 pub fn ssh_message_channel_request_channel(msg: ssh_message) -> ssh_channel;
2429}
2430extern "C" {
2431 pub fn ssh_message_channel_request_pty_term(msg: ssh_message) -> *const ::std::os::raw::c_char;
2432}
2433extern "C" {
2434 pub fn ssh_message_channel_request_pty_width(msg: ssh_message) -> ::std::os::raw::c_int;
2435}
2436extern "C" {
2437 pub fn ssh_message_channel_request_pty_height(msg: ssh_message) -> ::std::os::raw::c_int;
2438}
2439extern "C" {
2440 pub fn ssh_message_channel_request_pty_pxwidth(msg: ssh_message) -> ::std::os::raw::c_int;
2441}
2442extern "C" {
2443 pub fn ssh_message_channel_request_pty_pxheight(msg: ssh_message) -> ::std::os::raw::c_int;
2444}
2445extern "C" {
2446 pub fn ssh_message_channel_request_env_name(msg: ssh_message) -> *const ::std::os::raw::c_char;
2447}
2448extern "C" {
2449 pub fn ssh_message_channel_request_env_value(msg: ssh_message)
2450 -> *const ::std::os::raw::c_char;
2451}
2452extern "C" {
2453 pub fn ssh_message_channel_request_command(msg: ssh_message) -> *const ::std::os::raw::c_char;
2454}
2455extern "C" {
2456 pub fn ssh_message_channel_request_subsystem(msg: ssh_message)
2457 -> *const ::std::os::raw::c_char;
2458}
2459extern "C" {
2460 pub fn ssh_message_channel_request_x11_single_connection(
2461 msg: ssh_message,
2462 ) -> ::std::os::raw::c_int;
2463}
2464extern "C" {
2465 pub fn ssh_message_channel_request_x11_auth_protocol(
2466 msg: ssh_message,
2467 ) -> *const ::std::os::raw::c_char;
2468}
2469extern "C" {
2470 pub fn ssh_message_channel_request_x11_auth_cookie(
2471 msg: ssh_message,
2472 ) -> *const ::std::os::raw::c_char;
2473}
2474extern "C" {
2475 pub fn ssh_message_channel_request_x11_screen_number(msg: ssh_message)
2476 -> ::std::os::raw::c_int;
2477}
2478extern "C" {
2479 pub fn ssh_message_global_request_address(msg: ssh_message) -> *const ::std::os::raw::c_char;
2480}
2481extern "C" {
2482 pub fn ssh_message_global_request_port(msg: ssh_message) -> ::std::os::raw::c_int;
2483}
2484extern "C" {
2485 pub fn ssh_channel_open_reverse_forward(
2486 channel: ssh_channel,
2487 remotehost: *const ::std::os::raw::c_char,
2488 remoteport: ::std::os::raw::c_int,
2489 sourcehost: *const ::std::os::raw::c_char,
2490 localport: ::std::os::raw::c_int,
2491 ) -> ::std::os::raw::c_int;
2492}
2493extern "C" {
2494 pub fn ssh_channel_request_send_exit_status(
2495 channel: ssh_channel,
2496 exit_status: ::std::os::raw::c_int,
2497 ) -> ::std::os::raw::c_int;
2498}
2499extern "C" {
2500 pub fn ssh_channel_request_send_exit_signal(
2501 channel: ssh_channel,
2502 signum: *const ::std::os::raw::c_char,
2503 core: ::std::os::raw::c_int,
2504 errmsg: *const ::std::os::raw::c_char,
2505 lang: *const ::std::os::raw::c_char,
2506 ) -> ::std::os::raw::c_int;
2507}
2508extern "C" {
2509 pub fn ssh_send_keepalive(session: ssh_session) -> ::std::os::raw::c_int;
2510}
2511extern "C" {
2512 pub fn ssh_accept(session: ssh_session) -> ::std::os::raw::c_int;
2513}
2514pub type sftp_attributes = *mut sftp_attributes_struct;
2515pub type sftp_client_message = *mut sftp_client_message_struct;
2516pub type sftp_dir = *mut sftp_dir_struct;
2517#[repr(C)]
2518#[derive(Debug, Copy, Clone)]
2519pub struct sftp_ext_struct {
2520 _unused: [u8; 0],
2521}
2522pub type sftp_ext = *mut sftp_ext_struct;
2523pub type sftp_file = *mut sftp_file_struct;
2524pub type sftp_message = *mut sftp_message_struct;
2525pub type sftp_packet = *mut sftp_packet_struct;
2526pub type sftp_request_queue = *mut sftp_request_queue_struct;
2527pub type sftp_session = *mut sftp_session_struct;
2528pub type sftp_status_message = *mut sftp_status_message_struct;
2529pub type sftp_statvfs_t = *mut sftp_statvfs_struct;
2530pub type sftp_limits_t = *mut sftp_limits_struct;
2531#[repr(C)]
2532#[derive(Debug, Copy, Clone)]
2533pub struct sftp_aio_struct {
2534 _unused: [u8; 0],
2535}
2536pub type sftp_aio = *mut sftp_aio_struct;
2537#[repr(C)]
2538#[derive(Debug, Copy, Clone)]
2539pub struct sftp_session_struct {
2540 pub session: ssh_session,
2541 pub channel: ssh_channel,
2542 pub server_version: ::std::os::raw::c_int,
2543 pub client_version: ::std::os::raw::c_int,
2544 pub version: ::std::os::raw::c_int,
2545 pub queue: sftp_request_queue,
2546 pub id_counter: u32,
2547 pub errnum: ::std::os::raw::c_int,
2548 pub handles: *mut *mut ::std::os::raw::c_void,
2549 pub ext: sftp_ext,
2550 pub read_packet: sftp_packet,
2551 pub limits: sftp_limits_t,
2552}
2553#[repr(C)]
2554#[derive(Debug, Copy, Clone)]
2555pub struct sftp_packet_struct {
2556 pub sftp: sftp_session,
2557 pub type_: u8,
2558 pub payload: ssh_buffer,
2559}
2560#[repr(C)]
2561#[derive(Debug, Copy, Clone)]
2562pub struct sftp_file_struct {
2563 pub sftp: sftp_session,
2564 pub name: *mut ::std::os::raw::c_char,
2565 pub offset: u64,
2566 pub handle: ssh_string,
2567 pub eof: ::std::os::raw::c_int,
2568 pub nonblocking: ::std::os::raw::c_int,
2569}
2570#[repr(C)]
2571#[derive(Debug, Copy, Clone)]
2572pub struct sftp_dir_struct {
2573 pub sftp: sftp_session,
2574 pub name: *mut ::std::os::raw::c_char,
2575 pub handle: ssh_string,
2576 pub buffer: ssh_buffer,
2577 pub count: u32,
2578 pub eof: ::std::os::raw::c_int,
2579}
2580#[repr(C)]
2581#[derive(Debug, Copy, Clone)]
2582pub struct sftp_message_struct {
2583 pub sftp: sftp_session,
2584 pub packet_type: u8,
2585 pub payload: ssh_buffer,
2586 pub id: u32,
2587}
2588#[repr(C)]
2589#[derive(Debug, Copy, Clone)]
2590pub struct sftp_client_message_struct {
2591 pub sftp: sftp_session,
2592 pub type_: u8,
2593 pub id: u32,
2594 pub filename: *mut ::std::os::raw::c_char,
2595 pub flags: u32,
2596 pub attr: sftp_attributes,
2597 pub handle: ssh_string,
2598 pub offset: u64,
2599 pub len: u32,
2600 pub attr_num: ::std::os::raw::c_int,
2601 pub attrbuf: ssh_buffer,
2602 pub data: ssh_string,
2603 pub complete_message: ssh_buffer,
2604 pub str_data: *mut ::std::os::raw::c_char,
2605 pub submessage: *mut ::std::os::raw::c_char,
2606}
2607#[repr(C)]
2608#[derive(Debug, Copy, Clone)]
2609pub struct sftp_request_queue_struct {
2610 pub next: sftp_request_queue,
2611 pub message: sftp_message,
2612}
2613#[repr(C)]
2614#[derive(Debug, Copy, Clone)]
2615pub struct sftp_status_message_struct {
2616 pub id: u32,
2617 pub status: u32,
2618 pub error_unused: ssh_string,
2619 pub lang_unused: ssh_string,
2620 pub errormsg: *mut ::std::os::raw::c_char,
2621 pub langmsg: *mut ::std::os::raw::c_char,
2622}
2623#[repr(C)]
2624#[derive(Debug, Copy, Clone)]
2625pub struct sftp_attributes_struct {
2626 pub name: *mut ::std::os::raw::c_char,
2627 pub longname: *mut ::std::os::raw::c_char,
2628 pub flags: u32,
2629 pub type_: u8,
2630 pub size: u64,
2631 pub uid: u32,
2632 pub gid: u32,
2633 pub owner: *mut ::std::os::raw::c_char,
2634 pub group: *mut ::std::os::raw::c_char,
2635 pub permissions: u32,
2636 pub atime64: u64,
2637 pub atime: u32,
2638 pub atime_nseconds: u32,
2639 pub createtime: u64,
2640 pub createtime_nseconds: u32,
2641 pub mtime64: u64,
2642 pub mtime: u32,
2643 pub mtime_nseconds: u32,
2644 pub acl: ssh_string,
2645 pub extended_count: u32,
2646 pub extended_type: ssh_string,
2647 pub extended_data: ssh_string,
2648}
2649#[repr(C)]
2650#[derive(Debug, Copy, Clone)]
2651pub struct sftp_statvfs_struct {
2652 pub f_bsize: u64,
2653 pub f_frsize: u64,
2654 pub f_blocks: u64,
2655 pub f_bfree: u64,
2656 pub f_bavail: u64,
2657 pub f_files: u64,
2658 pub f_ffree: u64,
2659 pub f_favail: u64,
2660 pub f_fsid: u64,
2661 pub f_flag: u64,
2662 pub f_namemax: u64,
2663}
2664#[repr(C)]
2665#[derive(Debug, Copy, Clone)]
2666pub struct sftp_limits_struct {
2667 pub max_packet_length: u64,
2668 pub max_read_length: u64,
2669 pub max_write_length: u64,
2670 pub max_open_handles: u64,
2671}
2672extern "C" {
2673 pub fn sftp_new(session: ssh_session) -> sftp_session;
2674}
2675extern "C" {
2676 pub fn sftp_new_channel(session: ssh_session, channel: ssh_channel) -> sftp_session;
2677}
2678extern "C" {
2679 pub fn sftp_free(sftp: sftp_session);
2680}
2681extern "C" {
2682 pub fn sftp_init(sftp: sftp_session) -> ::std::os::raw::c_int;
2683}
2684extern "C" {
2685 pub fn sftp_get_error(sftp: sftp_session) -> ::std::os::raw::c_int;
2686}
2687extern "C" {
2688 pub fn sftp_extensions_get_count(sftp: sftp_session) -> ::std::os::raw::c_uint;
2689}
2690extern "C" {
2691 pub fn sftp_extensions_get_name(
2692 sftp: sftp_session,
2693 indexn: ::std::os::raw::c_uint,
2694 ) -> *const ::std::os::raw::c_char;
2695}
2696extern "C" {
2697 pub fn sftp_extensions_get_data(
2698 sftp: sftp_session,
2699 indexn: ::std::os::raw::c_uint,
2700 ) -> *const ::std::os::raw::c_char;
2701}
2702extern "C" {
2703 pub fn sftp_extension_supported(
2704 sftp: sftp_session,
2705 name: *const ::std::os::raw::c_char,
2706 data: *const ::std::os::raw::c_char,
2707 ) -> ::std::os::raw::c_int;
2708}
2709extern "C" {
2710 pub fn sftp_opendir(session: sftp_session, path: *const ::std::os::raw::c_char) -> sftp_dir;
2711}
2712extern "C" {
2713 pub fn sftp_readdir(session: sftp_session, dir: sftp_dir) -> sftp_attributes;
2714}
2715extern "C" {
2716 pub fn sftp_dir_eof(dir: sftp_dir) -> ::std::os::raw::c_int;
2717}
2718extern "C" {
2719 pub fn sftp_stat(session: sftp_session, path: *const ::std::os::raw::c_char)
2720 -> sftp_attributes;
2721}
2722extern "C" {
2723 pub fn sftp_lstat(
2724 session: sftp_session,
2725 path: *const ::std::os::raw::c_char,
2726 ) -> sftp_attributes;
2727}
2728extern "C" {
2729 pub fn sftp_fstat(file: sftp_file) -> sftp_attributes;
2730}
2731extern "C" {
2732 pub fn sftp_attributes_free(file: sftp_attributes);
2733}
2734extern "C" {
2735 pub fn sftp_closedir(dir: sftp_dir) -> ::std::os::raw::c_int;
2736}
2737extern "C" {
2738 pub fn sftp_close(file: sftp_file) -> ::std::os::raw::c_int;
2739}
2740extern "C" {
2741 pub fn sftp_open(
2742 session: sftp_session,
2743 file: *const ::std::os::raw::c_char,
2744 accesstype: ::std::os::raw::c_int,
2745 mode: mode_t,
2746 ) -> sftp_file;
2747}
2748extern "C" {
2749 pub fn sftp_file_set_nonblocking(handle: sftp_file);
2750}
2751extern "C" {
2752 pub fn sftp_file_set_blocking(handle: sftp_file);
2753}
2754extern "C" {
2755 pub fn sftp_read(file: sftp_file, buf: *mut ::std::os::raw::c_void, count: usize) -> isize;
2756}
2757extern "C" {
2758 pub fn sftp_async_read_begin(file: sftp_file, len: u32) -> ::std::os::raw::c_int;
2759}
2760extern "C" {
2761 pub fn sftp_async_read(
2762 file: sftp_file,
2763 data: *mut ::std::os::raw::c_void,
2764 len: u32,
2765 id: u32,
2766 ) -> ::std::os::raw::c_int;
2767}
2768extern "C" {
2769 pub fn sftp_write(file: sftp_file, buf: *const ::std::os::raw::c_void, count: usize) -> isize;
2770}
2771extern "C" {
2772 pub fn sftp_aio_free(aio: sftp_aio);
2773}
2774extern "C" {
2775 pub fn sftp_aio_begin_read(file: sftp_file, len: usize, aio: *mut sftp_aio) -> isize;
2776}
2777extern "C" {
2778 pub fn sftp_aio_wait_read(
2779 aio: *mut sftp_aio,
2780 buf: *mut ::std::os::raw::c_void,
2781 buf_size: usize,
2782 ) -> isize;
2783}
2784extern "C" {
2785 pub fn sftp_aio_begin_write(
2786 file: sftp_file,
2787 buf: *const ::std::os::raw::c_void,
2788 len: usize,
2789 aio: *mut sftp_aio,
2790 ) -> isize;
2791}
2792extern "C" {
2793 pub fn sftp_aio_wait_write(aio: *mut sftp_aio) -> isize;
2794}
2795extern "C" {
2796 pub fn sftp_seek(file: sftp_file, new_offset: u32) -> ::std::os::raw::c_int;
2797}
2798extern "C" {
2799 pub fn sftp_seek64(file: sftp_file, new_offset: u64) -> ::std::os::raw::c_int;
2800}
2801extern "C" {
2802 pub fn sftp_tell(file: sftp_file) -> ::std::os::raw::c_ulong;
2803}
2804extern "C" {
2805 pub fn sftp_tell64(file: sftp_file) -> u64;
2806}
2807extern "C" {
2808 pub fn sftp_rewind(file: sftp_file);
2809}
2810extern "C" {
2811 pub fn sftp_unlink(
2812 sftp: sftp_session,
2813 file: *const ::std::os::raw::c_char,
2814 ) -> ::std::os::raw::c_int;
2815}
2816extern "C" {
2817 pub fn sftp_rmdir(
2818 sftp: sftp_session,
2819 directory: *const ::std::os::raw::c_char,
2820 ) -> ::std::os::raw::c_int;
2821}
2822extern "C" {
2823 pub fn sftp_mkdir(
2824 sftp: sftp_session,
2825 directory: *const ::std::os::raw::c_char,
2826 mode: mode_t,
2827 ) -> ::std::os::raw::c_int;
2828}
2829extern "C" {
2830 pub fn sftp_rename(
2831 sftp: sftp_session,
2832 original: *const ::std::os::raw::c_char,
2833 newname: *const ::std::os::raw::c_char,
2834 ) -> ::std::os::raw::c_int;
2835}
2836extern "C" {
2837 pub fn sftp_setstat(
2838 sftp: sftp_session,
2839 file: *const ::std::os::raw::c_char,
2840 attr: sftp_attributes,
2841 ) -> ::std::os::raw::c_int;
2842}
2843extern "C" {
2844 pub fn sftp_lsetstat(
2845 sftp: sftp_session,
2846 file: *const ::std::os::raw::c_char,
2847 attr: sftp_attributes,
2848 ) -> ::std::os::raw::c_int;
2849}
2850extern "C" {
2851 pub fn sftp_chown(
2852 sftp: sftp_session,
2853 file: *const ::std::os::raw::c_char,
2854 owner: uid_t,
2855 group: gid_t,
2856 ) -> ::std::os::raw::c_int;
2857}
2858extern "C" {
2859 pub fn sftp_chmod(
2860 sftp: sftp_session,
2861 file: *const ::std::os::raw::c_char,
2862 mode: mode_t,
2863 ) -> ::std::os::raw::c_int;
2864}
2865extern "C" {
2866 pub fn sftp_utimes(
2867 sftp: sftp_session,
2868 file: *const ::std::os::raw::c_char,
2869 times: *const timeval,
2870 ) -> ::std::os::raw::c_int;
2871}
2872extern "C" {
2873 pub fn sftp_symlink(
2874 sftp: sftp_session,
2875 target: *const ::std::os::raw::c_char,
2876 dest: *const ::std::os::raw::c_char,
2877 ) -> ::std::os::raw::c_int;
2878}
2879extern "C" {
2880 pub fn sftp_readlink(
2881 sftp: sftp_session,
2882 path: *const ::std::os::raw::c_char,
2883 ) -> *mut ::std::os::raw::c_char;
2884}
2885extern "C" {
2886 pub fn sftp_hardlink(
2887 sftp: sftp_session,
2888 oldpath: *const ::std::os::raw::c_char,
2889 newpath: *const ::std::os::raw::c_char,
2890 ) -> ::std::os::raw::c_int;
2891}
2892extern "C" {
2893 pub fn sftp_statvfs(sftp: sftp_session, path: *const ::std::os::raw::c_char) -> sftp_statvfs_t;
2894}
2895extern "C" {
2896 pub fn sftp_fstatvfs(file: sftp_file) -> sftp_statvfs_t;
2897}
2898extern "C" {
2899 pub fn sftp_statvfs_free(statvfs_o: sftp_statvfs_t);
2900}
2901extern "C" {
2902 pub fn sftp_fsync(file: sftp_file) -> ::std::os::raw::c_int;
2903}
2904extern "C" {
2905 pub fn sftp_limits(sftp: sftp_session) -> sftp_limits_t;
2906}
2907extern "C" {
2908 pub fn sftp_limits_free(limits: sftp_limits_t);
2909}
2910extern "C" {
2911 pub fn sftp_canonicalize_path(
2912 sftp: sftp_session,
2913 path: *const ::std::os::raw::c_char,
2914 ) -> *mut ::std::os::raw::c_char;
2915}
2916extern "C" {
2917 pub fn sftp_server_version(sftp: sftp_session) -> ::std::os::raw::c_int;
2918}
2919extern "C" {
2920 pub fn sftp_expand_path(
2921 sftp: sftp_session,
2922 path: *const ::std::os::raw::c_char,
2923 ) -> *mut ::std::os::raw::c_char;
2924}
2925extern "C" {
2926 pub fn sftp_home_directory(
2927 sftp: sftp_session,
2928 username: *const ::std::os::raw::c_char,
2929 ) -> *mut ::std::os::raw::c_char;
2930}
2931extern "C" {
2932 pub fn sftp_get_client_message(sftp: sftp_session) -> sftp_client_message;
2933}
2934extern "C" {
2935 pub fn sftp_client_message_free(msg: sftp_client_message);
2936}
2937extern "C" {
2938 pub fn sftp_client_message_get_type(msg: sftp_client_message) -> u8;
2939}
2940extern "C" {
2941 pub fn sftp_client_message_get_filename(
2942 msg: sftp_client_message,
2943 ) -> *const ::std::os::raw::c_char;
2944}
2945extern "C" {
2946 pub fn sftp_client_message_set_filename(
2947 msg: sftp_client_message,
2948 newname: *const ::std::os::raw::c_char,
2949 );
2950}
2951extern "C" {
2952 pub fn sftp_client_message_get_data(msg: sftp_client_message) -> *const ::std::os::raw::c_char;
2953}
2954extern "C" {
2955 pub fn sftp_client_message_get_flags(msg: sftp_client_message) -> u32;
2956}
2957extern "C" {
2958 pub fn sftp_client_message_get_submessage(
2959 msg: sftp_client_message,
2960 ) -> *const ::std::os::raw::c_char;
2961}
2962extern "C" {
2963 pub fn sftp_send_client_message(
2964 sftp: sftp_session,
2965 msg: sftp_client_message,
2966 ) -> ::std::os::raw::c_int;
2967}
2968extern "C" {
2969 pub fn sftp_reply_name(
2970 msg: sftp_client_message,
2971 name: *const ::std::os::raw::c_char,
2972 attr: sftp_attributes,
2973 ) -> ::std::os::raw::c_int;
2974}
2975extern "C" {
2976 pub fn sftp_reply_handle(msg: sftp_client_message, handle: ssh_string)
2977 -> ::std::os::raw::c_int;
2978}
2979extern "C" {
2980 pub fn sftp_handle_alloc(sftp: sftp_session, info: *mut ::std::os::raw::c_void) -> ssh_string;
2981}
2982extern "C" {
2983 pub fn sftp_reply_attr(
2984 msg: sftp_client_message,
2985 attr: sftp_attributes,
2986 ) -> ::std::os::raw::c_int;
2987}
2988extern "C" {
2989 pub fn sftp_handle(sftp: sftp_session, handle: ssh_string) -> *mut ::std::os::raw::c_void;
2990}
2991extern "C" {
2992 pub fn sftp_reply_status(
2993 msg: sftp_client_message,
2994 status: u32,
2995 message: *const ::std::os::raw::c_char,
2996 ) -> ::std::os::raw::c_int;
2997}
2998extern "C" {
2999 pub fn sftp_reply_names_add(
3000 msg: sftp_client_message,
3001 file: *const ::std::os::raw::c_char,
3002 longname: *const ::std::os::raw::c_char,
3003 attr: sftp_attributes,
3004 ) -> ::std::os::raw::c_int;
3005}
3006extern "C" {
3007 pub fn sftp_reply_names(msg: sftp_client_message) -> ::std::os::raw::c_int;
3008}
3009extern "C" {
3010 pub fn sftp_reply_data(
3011 msg: sftp_client_message,
3012 data: *const ::std::os::raw::c_void,
3013 len: ::std::os::raw::c_int,
3014 ) -> ::std::os::raw::c_int;
3015}
3016extern "C" {
3017 pub fn sftp_handle_remove(sftp: sftp_session, handle: *mut ::std::os::raw::c_void);
3018}
3019pub type __builtin_va_list = [__va_list_tag; 1usize];
3020#[repr(C)]
3021#[derive(Debug, Copy, Clone)]
3022pub struct __va_list_tag {
3023 pub gp_offset: ::std::os::raw::c_uint,
3024 pub fp_offset: ::std::os::raw::c_uint,
3025 pub overflow_arg_area: *mut ::std::os::raw::c_void,
3026 pub reg_save_area: *mut ::std::os::raw::c_void,
3027}