#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#![allow(clippy::unreadable_literal)]
#![allow(clippy::upper_case_acronyms)]
pub const SSH_CRYPT: u32 = 2;
pub const SSH_MAC: u32 = 3;
pub const SSH_COMP: u32 = 4;
pub const SSH_LANG: u32 = 5;
pub const SSH_AUTH_METHOD_UNKNOWN: u32 = 0;
pub const SSH_AUTH_METHOD_NONE: u32 = 1;
pub const SSH_AUTH_METHOD_PASSWORD: u32 = 2;
pub const SSH_AUTH_METHOD_PUBLICKEY: u32 = 4;
pub const SSH_AUTH_METHOD_HOSTBASED: u32 = 8;
pub const SSH_AUTH_METHOD_INTERACTIVE: u32 = 16;
pub const SSH_AUTH_METHOD_GSSAPI_MIC: u32 = 32;
pub const SSH_CLOSED: u32 = 1;
pub const SSH_READ_PENDING: u32 = 2;
pub const SSH_CLOSED_ERROR: u32 = 4;
pub const SSH_WRITE_PENDING: u32 = 8;
pub const SSH_ADDRSTRLEN: u32 = 46;
pub const SSH_OK: u32 = 0;
pub const SSH_ERROR: i32 = -1;
pub const SSH_AGAIN: i32 = -2;
pub const SSH_EOF: i32 = -127;
pub const SSH_LOG_NONE: u32 = 0;
pub const SSH_LOG_WARN: u32 = 1;
pub const SSH_LOG_INFO: u32 = 2;
pub const SSH_LOG_DEBUG: u32 = 3;
pub const SSH_LOG_TRACE: u32 = 4;
pub const SSH_SOCKET_FLOW_WRITEWILLBLOCK: u32 = 1;
pub const SSH_SOCKET_FLOW_WRITEWONTBLOCK: u32 = 2;
pub const SSH_SOCKET_EXCEPTION_EOF: u32 = 1;
pub const SSH_SOCKET_EXCEPTION_ERROR: u32 = 2;
pub const SSH_SOCKET_CONNECTED_OK: u32 = 1;
pub const SSH_SOCKET_CONNECTED_ERROR: u32 = 2;
pub const SSH_SOCKET_CONNECTED_TIMEOUT: u32 = 3;
pub const SSH_PACKET_USED: u32 = 1;
pub const SSH_PACKET_NOT_USED: u32 = 2;
pub const SSH_FXP_INIT: u32 = 1;
pub const SSH_FXP_VERSION: u32 = 2;
pub const SSH_FXP_OPEN: u32 = 3;
pub const SSH_FXP_CLOSE: u32 = 4;
pub const SSH_FXP_READ: u32 = 5;
pub const SSH_FXP_WRITE: u32 = 6;
pub const SSH_FXP_LSTAT: u32 = 7;
pub const SSH_FXP_FSTAT: u32 = 8;
pub const SSH_FXP_SETSTAT: u32 = 9;
pub const SSH_FXP_FSETSTAT: u32 = 10;
pub const SSH_FXP_OPENDIR: u32 = 11;
pub const SSH_FXP_READDIR: u32 = 12;
pub const SSH_FXP_REMOVE: u32 = 13;
pub const SSH_FXP_MKDIR: u32 = 14;
pub const SSH_FXP_RMDIR: u32 = 15;
pub const SSH_FXP_REALPATH: u32 = 16;
pub const SSH_FXP_STAT: u32 = 17;
pub const SSH_FXP_RENAME: u32 = 18;
pub const SSH_FXP_READLINK: u32 = 19;
pub const SSH_FXP_SYMLINK: u32 = 20;
pub const SSH_FXP_STATUS: u32 = 101;
pub const SSH_FXP_HANDLE: u32 = 102;
pub const SSH_FXP_DATA: u32 = 103;
pub const SSH_FXP_NAME: u32 = 104;
pub const SSH_FXP_ATTRS: u32 = 105;
pub const SSH_FXP_EXTENDED: u32 = 200;
pub const SSH_FXP_EXTENDED_REPLY: u32 = 201;
pub const SSH_FILEXFER_ATTR_SIZE: u32 = 1;
pub const SSH_FILEXFER_ATTR_PERMISSIONS: u32 = 4;
pub const SSH_FILEXFER_ATTR_ACCESSTIME: u32 = 8;
pub const SSH_FILEXFER_ATTR_ACMODTIME: u32 = 8;
pub const SSH_FILEXFER_ATTR_CREATETIME: u32 = 16;
pub const SSH_FILEXFER_ATTR_MODIFYTIME: u32 = 32;
pub const SSH_FILEXFER_ATTR_ACL: u32 = 64;
pub const SSH_FILEXFER_ATTR_OWNERGROUP: u32 = 128;
pub const SSH_FILEXFER_ATTR_SUBSECOND_TIMES: u32 = 256;
pub const SSH_FILEXFER_ATTR_EXTENDED: u32 = 2147483648;
pub const SSH_FILEXFER_ATTR_UIDGID: u32 = 2;
pub const SSH_FILEXFER_TYPE_REGULAR: u32 = 1;
pub const SSH_FILEXFER_TYPE_DIRECTORY: u32 = 2;
pub const SSH_FILEXFER_TYPE_SYMLINK: u32 = 3;
pub const SSH_FILEXFER_TYPE_SPECIAL: u32 = 4;
pub const SSH_FILEXFER_TYPE_UNKNOWN: u32 = 5;
pub const SSH_FX_OK: u32 = 0;
pub const SSH_FX_EOF: u32 = 1;
pub const SSH_FX_NO_SUCH_FILE: u32 = 2;
pub const SSH_FX_PERMISSION_DENIED: u32 = 3;
pub const SSH_FX_FAILURE: u32 = 4;
pub const SSH_FX_BAD_MESSAGE: u32 = 5;
pub const SSH_FX_NO_CONNECTION: u32 = 6;
pub const SSH_FX_CONNECTION_LOST: u32 = 7;
pub const SSH_FX_OP_UNSUPPORTED: u32 = 8;
pub const SSH_FX_INVALID_HANDLE: u32 = 9;
pub const SSH_FX_NO_SUCH_PATH: u32 = 10;
pub const SSH_FX_FILE_ALREADY_EXISTS: u32 = 11;
pub const SSH_FX_WRITE_PROTECT: u32 = 12;
pub const SSH_FX_NO_MEDIA: u32 = 13;
pub const SSH_FXF_READ: u32 = 1;
pub const SSH_FXF_WRITE: u32 = 2;
pub const SSH_FXF_APPEND: u32 = 4;
pub const SSH_FXF_CREAT: u32 = 8;
pub const SSH_FXF_TRUNC: u32 = 16;
pub const SSH_FXF_EXCL: u32 = 32;
pub const SSH_FXF_TEXT: u32 = 64;
pub const SSH_S_IFMT: u32 = 61440;
pub const SSH_S_IFSOCK: u32 = 49152;
pub const SSH_S_IFLNK: u32 = 40960;
pub const SSH_S_IFREG: u32 = 32768;
pub const SSH_S_IFBLK: u32 = 24576;
pub const SSH_S_IFDIR: u32 = 16384;
pub const SSH_S_IFCHR: u32 = 8192;
pub const SSH_S_IFIFO: u32 = 4096;
pub const SSH_FXF_RENAME_OVERWRITE: u32 = 1;
pub const SSH_FXF_RENAME_ATOMIC: u32 = 2;
pub const SSH_FXF_RENAME_NATIVE: u32 = 4;
pub const SSH_FXE_STATVFS_ST_RDONLY: u32 = 1;
pub const SSH_FXE_STATVFS_ST_NOSUID: u32 = 2;
pub const SSH2_MSG_DISCONNECT: u32 = 1;
pub const SSH2_MSG_IGNORE: u32 = 2;
pub const SSH2_MSG_UNIMPLEMENTED: u32 = 3;
pub const SSH2_MSG_DEBUG: u32 = 4;
pub const SSH2_MSG_SERVICE_REQUEST: u32 = 5;
pub const SSH2_MSG_SERVICE_ACCEPT: u32 = 6;
pub const SSH2_MSG_EXT_INFO: u32 = 7;
pub const SSH2_MSG_KEXINIT: u32 = 20;
pub const SSH2_MSG_NEWKEYS: u32 = 21;
pub const SSH2_MSG_KEXDH_INIT: u32 = 30;
pub const SSH2_MSG_KEXDH_REPLY: u32 = 31;
pub const SSH2_MSG_KEX_ECDH_INIT: u32 = 30;
pub const SSH2_MSG_KEX_ECDH_REPLY: u32 = 31;
pub const SSH2_MSG_ECMQV_INIT: u32 = 30;
pub const SSH2_MSG_ECMQV_REPLY: u32 = 31;
pub const SSH2_MSG_KEX_DH_GEX_REQUEST_OLD: u32 = 30;
pub const SSH2_MSG_KEX_DH_GEX_GROUP: u32 = 31;
pub const SSH2_MSG_KEX_DH_GEX_INIT: u32 = 32;
pub const SSH2_MSG_KEX_DH_GEX_REPLY: u32 = 33;
pub const SSH2_MSG_KEX_DH_GEX_REQUEST: u32 = 34;
pub const SSH2_MSG_USERAUTH_REQUEST: u32 = 50;
pub const SSH2_MSG_USERAUTH_FAILURE: u32 = 51;
pub const SSH2_MSG_USERAUTH_SUCCESS: u32 = 52;
pub const SSH2_MSG_USERAUTH_BANNER: u32 = 53;
pub const SSH2_MSG_USERAUTH_PK_OK: u32 = 60;
pub const SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ: u32 = 60;
pub const SSH2_MSG_USERAUTH_INFO_REQUEST: u32 = 60;
pub const SSH2_MSG_USERAUTH_GSSAPI_RESPONSE: u32 = 60;
pub const SSH2_MSG_USERAUTH_INFO_RESPONSE: u32 = 61;
pub const SSH2_MSG_USERAUTH_GSSAPI_TOKEN: u32 = 61;
pub const SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE: u32 = 63;
pub const SSH2_MSG_USERAUTH_GSSAPI_ERROR: u32 = 64;
pub const SSH2_MSG_USERAUTH_GSSAPI_ERRTOK: u32 = 65;
pub const SSH2_MSG_USERAUTH_GSSAPI_MIC: u32 = 66;
pub const SSH2_MSG_GLOBAL_REQUEST: u32 = 80;
pub const SSH2_MSG_REQUEST_SUCCESS: u32 = 81;
pub const SSH2_MSG_REQUEST_FAILURE: u32 = 82;
pub const SSH2_MSG_CHANNEL_OPEN: u32 = 90;
pub const SSH2_MSG_CHANNEL_OPEN_CONFIRMATION: u32 = 91;
pub const SSH2_MSG_CHANNEL_OPEN_FAILURE: u32 = 92;
pub const SSH2_MSG_CHANNEL_WINDOW_ADJUST: u32 = 93;
pub const SSH2_MSG_CHANNEL_DATA: u32 = 94;
pub const SSH2_MSG_CHANNEL_EXTENDED_DATA: u32 = 95;
pub const SSH2_MSG_CHANNEL_EOF: u32 = 96;
pub const SSH2_MSG_CHANNEL_CLOSE: u32 = 97;
pub const SSH2_MSG_CHANNEL_REQUEST: u32 = 98;
pub const SSH2_MSG_CHANNEL_SUCCESS: u32 = 99;
pub const SSH2_MSG_CHANNEL_FAILURE: u32 = 100;
pub const SSH2_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT: u32 = 1;
pub const SSH2_DISCONNECT_PROTOCOL_ERROR: u32 = 2;
pub const SSH2_DISCONNECT_KEY_EXCHANGE_FAILED: u32 = 3;
pub const SSH2_DISCONNECT_HOST_AUTHENTICATION_FAILED: u32 = 4;
pub const SSH2_DISCONNECT_RESERVED: u32 = 4;
pub const SSH2_DISCONNECT_MAC_ERROR: u32 = 5;
pub const SSH2_DISCONNECT_COMPRESSION_ERROR: u32 = 6;
pub const SSH2_DISCONNECT_SERVICE_NOT_AVAILABLE: u32 = 7;
pub const SSH2_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED: u32 = 8;
pub const SSH2_DISCONNECT_HOST_KEY_NOT_VERIFIABLE: u32 = 9;
pub const SSH2_DISCONNECT_CONNECTION_LOST: u32 = 10;
pub const SSH2_DISCONNECT_BY_APPLICATION: u32 = 11;
pub const SSH2_DISCONNECT_TOO_MANY_CONNECTIONS: u32 = 12;
pub const SSH2_DISCONNECT_AUTH_CANCELLED_BY_USER: u32 = 13;
pub const SSH2_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE: u32 = 14;
pub const SSH2_DISCONNECT_ILLEGAL_USER_NAME: u32 = 15;
pub const SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED: u32 = 1;
pub const SSH2_OPEN_CONNECT_FAILED: u32 = 2;
pub const SSH2_OPEN_UNKNOWN_CHANNEL_TYPE: u32 = 3;
pub const SSH2_OPEN_RESOURCE_SHORTAGE: u32 = 4;
pub const SSH2_EXTENDED_DATA_STDERR: u32 = 1;
pub type va_list = __builtin_va_list;
pub type __uid_t = ::std::os::raw::c_uint;
pub type __gid_t = ::std::os::raw::c_uint;
pub type __mode_t = ::std::os::raw::c_uint;
pub type __time_t = ::std::os::raw::c_long;
pub type __suseconds_t = ::std::os::raw::c_long;
pub type gid_t = __gid_t;
pub type uid_t = __uid_t;
pub type mode_t = __mode_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct timeval {
pub tv_sec: __time_t,
pub tv_usec: __suseconds_t,
}
pub type __fd_mask = ::std::os::raw::c_long;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fd_set {
pub __fds_bits: [__fd_mask; 16usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_counter_struct {
pub in_bytes: u64,
pub out_bytes: u64,
pub in_packets: u64,
pub out_packets: u64,
}
pub type ssh_counter = *mut ssh_counter_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_agent_struct {
_unused: [u8; 0],
}
pub type ssh_agent = *mut ssh_agent_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_buffer_struct {
_unused: [u8; 0],
}
pub type ssh_buffer = *mut ssh_buffer_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_channel_struct {
_unused: [u8; 0],
}
pub type ssh_channel = *mut ssh_channel_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_message_struct {
_unused: [u8; 0],
}
pub type ssh_message = *mut ssh_message_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_pcap_file_struct {
_unused: [u8; 0],
}
pub type ssh_pcap_file = *mut ssh_pcap_file_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_key_struct {
_unused: [u8; 0],
}
pub type ssh_key = *mut ssh_key_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_scp_struct {
_unused: [u8; 0],
}
pub type ssh_scp = *mut ssh_scp_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_session_struct {
_unused: [u8; 0],
}
pub type ssh_session = *mut ssh_session_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_string_struct {
_unused: [u8; 0],
}
pub type ssh_string = *mut ssh_string_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_event_struct {
_unused: [u8; 0],
}
pub type ssh_event = *mut ssh_event_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_connector_struct {
_unused: [u8; 0],
}
pub type ssh_connector = *mut ssh_connector_struct;
pub type ssh_gssapi_creds = *mut ::std::os::raw::c_void;
pub type socket_t = ::std::os::raw::c_int;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ssh_kex_types_e {
SSH_KEX = 0,
SSH_HOSTKEYS = 1,
SSH_CRYPT_C_S = 2,
SSH_CRYPT_S_C = 3,
SSH_MAC_C_S = 4,
SSH_MAC_S_C = 5,
SSH_COMP_C_S = 6,
SSH_COMP_S_C = 7,
SSH_LANG_C_S = 8,
SSH_LANG_S_C = 9,
}
pub const ssh_auth_e_SSH_AUTH_SUCCESS: ssh_auth_e = 0;
pub const ssh_auth_e_SSH_AUTH_DENIED: ssh_auth_e = 1;
pub const ssh_auth_e_SSH_AUTH_PARTIAL: ssh_auth_e = 2;
pub const ssh_auth_e_SSH_AUTH_INFO: ssh_auth_e = 3;
pub const ssh_auth_e_SSH_AUTH_AGAIN: ssh_auth_e = 4;
pub const ssh_auth_e_SSH_AUTH_ERROR: ssh_auth_e = -1;
pub type ssh_auth_e = ::std::os::raw::c_int;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ssh_requests_e {
SSH_REQUEST_AUTH = 1,
SSH_REQUEST_CHANNEL_OPEN = 2,
SSH_REQUEST_CHANNEL = 3,
SSH_REQUEST_SERVICE = 4,
SSH_REQUEST_GLOBAL = 5,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ssh_channel_type_e {
SSH_CHANNEL_UNKNOWN = 0,
SSH_CHANNEL_SESSION = 1,
SSH_CHANNEL_DIRECT_TCPIP = 2,
SSH_CHANNEL_FORWARDED_TCPIP = 3,
SSH_CHANNEL_X11 = 4,
SSH_CHANNEL_AUTH_AGENT = 5,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ssh_channel_requests_e {
SSH_CHANNEL_REQUEST_UNKNOWN = 0,
SSH_CHANNEL_REQUEST_PTY = 1,
SSH_CHANNEL_REQUEST_EXEC = 2,
SSH_CHANNEL_REQUEST_SHELL = 3,
SSH_CHANNEL_REQUEST_ENV = 4,
SSH_CHANNEL_REQUEST_SUBSYSTEM = 5,
SSH_CHANNEL_REQUEST_WINDOW_CHANGE = 6,
SSH_CHANNEL_REQUEST_X11 = 7,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ssh_global_requests_e {
SSH_GLOBAL_REQUEST_UNKNOWN = 0,
SSH_GLOBAL_REQUEST_TCPIP_FORWARD = 1,
SSH_GLOBAL_REQUEST_CANCEL_TCPIP_FORWARD = 2,
SSH_GLOBAL_REQUEST_KEEPALIVE = 3,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ssh_publickey_state_e {
SSH_PUBLICKEY_STATE_ERROR = -1,
SSH_PUBLICKEY_STATE_NONE = 0,
SSH_PUBLICKEY_STATE_VALID = 1,
SSH_PUBLICKEY_STATE_WRONG = 2,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ssh_server_known_e {
SSH_SERVER_ERROR = -1,
SSH_SERVER_NOT_KNOWN = 0,
SSH_SERVER_KNOWN_OK = 1,
SSH_SERVER_KNOWN_CHANGED = 2,
SSH_SERVER_FOUND_OTHER = 3,
SSH_SERVER_FILE_NOT_FOUND = 4,
}
pub const ssh_known_hosts_e_SSH_KNOWN_HOSTS_ERROR: ssh_known_hosts_e = -2;
pub const ssh_known_hosts_e_SSH_KNOWN_HOSTS_NOT_FOUND: ssh_known_hosts_e = -1;
pub const ssh_known_hosts_e_SSH_KNOWN_HOSTS_UNKNOWN: ssh_known_hosts_e = 0;
pub const ssh_known_hosts_e_SSH_KNOWN_HOSTS_OK: ssh_known_hosts_e = 1;
pub const ssh_known_hosts_e_SSH_KNOWN_HOSTS_CHANGED: ssh_known_hosts_e = 2;
pub const ssh_known_hosts_e_SSH_KNOWN_HOSTS_OTHER: ssh_known_hosts_e = 3;
pub type ssh_known_hosts_e = ::std::os::raw::c_int;
pub const ssh_error_types_e_SSH_NO_ERROR: ssh_error_types_e = 0;
pub const ssh_error_types_e_SSH_REQUEST_DENIED: ssh_error_types_e = 1;
pub const ssh_error_types_e_SSH_FATAL: ssh_error_types_e = 2;
pub const ssh_error_types_e_SSH_EINTR: ssh_error_types_e = 3;
pub type ssh_error_types_e = ::std::os::raw::c_uint;
pub const ssh_keytypes_e_SSH_KEYTYPE_UNKNOWN: ssh_keytypes_e = 0;
pub const ssh_keytypes_e_SSH_KEYTYPE_DSS: ssh_keytypes_e = 1;
pub const ssh_keytypes_e_SSH_KEYTYPE_RSA: ssh_keytypes_e = 2;
pub const ssh_keytypes_e_SSH_KEYTYPE_RSA1: ssh_keytypes_e = 3;
pub const ssh_keytypes_e_SSH_KEYTYPE_ECDSA: ssh_keytypes_e = 4;
pub const ssh_keytypes_e_SSH_KEYTYPE_ED25519: ssh_keytypes_e = 5;
pub const ssh_keytypes_e_SSH_KEYTYPE_DSS_CERT01: ssh_keytypes_e = 6;
pub const ssh_keytypes_e_SSH_KEYTYPE_RSA_CERT01: ssh_keytypes_e = 7;
pub const ssh_keytypes_e_SSH_KEYTYPE_ECDSA_P256: ssh_keytypes_e = 8;
pub const ssh_keytypes_e_SSH_KEYTYPE_ECDSA_P384: ssh_keytypes_e = 9;
pub const ssh_keytypes_e_SSH_KEYTYPE_ECDSA_P521: ssh_keytypes_e = 10;
pub const ssh_keytypes_e_SSH_KEYTYPE_ECDSA_P256_CERT01: ssh_keytypes_e = 11;
pub const ssh_keytypes_e_SSH_KEYTYPE_ECDSA_P384_CERT01: ssh_keytypes_e = 12;
pub const ssh_keytypes_e_SSH_KEYTYPE_ECDSA_P521_CERT01: ssh_keytypes_e = 13;
pub const ssh_keytypes_e_SSH_KEYTYPE_ED25519_CERT01: ssh_keytypes_e = 14;
pub const ssh_keytypes_e_SSH_KEYTYPE_SK_ECDSA: ssh_keytypes_e = 15;
pub const ssh_keytypes_e_SSH_KEYTYPE_SK_ECDSA_CERT01: ssh_keytypes_e = 16;
pub const ssh_keytypes_e_SSH_KEYTYPE_SK_ED25519: ssh_keytypes_e = 17;
pub const ssh_keytypes_e_SSH_KEYTYPE_SK_ED25519_CERT01: ssh_keytypes_e = 18;
pub type ssh_keytypes_e = ::std::os::raw::c_uint;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ssh_keycmp_e {
SSH_KEY_CMP_PUBLIC = 0,
SSH_KEY_CMP_PRIVATE = 1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_knownhosts_entry {
pub hostname: *mut ::std::os::raw::c_char,
pub unparsed: *mut ::std::os::raw::c_char,
pub publickey: ssh_key,
pub comment: *mut ::std::os::raw::c_char,
}
pub const SSH_LOG_NOLOG: _bindgen_ty_10 = _bindgen_ty_10::SSH_LOG_NOLOG;
pub const SSH_LOG_WARNING: _bindgen_ty_10 = _bindgen_ty_10::SSH_LOG_WARNING;
pub const SSH_LOG_PROTOCOL: _bindgen_ty_10 = _bindgen_ty_10::SSH_LOG_PROTOCOL;
pub const SSH_LOG_PACKET: _bindgen_ty_10 = _bindgen_ty_10::SSH_LOG_PACKET;
pub const SSH_LOG_FUNCTIONS: _bindgen_ty_10 = _bindgen_ty_10::SSH_LOG_FUNCTIONS;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_10 {
SSH_LOG_NOLOG = 0,
SSH_LOG_WARNING = 1,
SSH_LOG_PROTOCOL = 2,
SSH_LOG_PACKET = 3,
SSH_LOG_FUNCTIONS = 4,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ssh_options_e {
SSH_OPTIONS_HOST = 0,
SSH_OPTIONS_PORT = 1,
SSH_OPTIONS_PORT_STR = 2,
SSH_OPTIONS_FD = 3,
SSH_OPTIONS_USER = 4,
SSH_OPTIONS_SSH_DIR = 5,
SSH_OPTIONS_IDENTITY = 6,
SSH_OPTIONS_ADD_IDENTITY = 7,
SSH_OPTIONS_KNOWNHOSTS = 8,
SSH_OPTIONS_TIMEOUT = 9,
SSH_OPTIONS_TIMEOUT_USEC = 10,
SSH_OPTIONS_SSH1 = 11,
SSH_OPTIONS_SSH2 = 12,
SSH_OPTIONS_LOG_VERBOSITY = 13,
SSH_OPTIONS_LOG_VERBOSITY_STR = 14,
SSH_OPTIONS_CIPHERS_C_S = 15,
SSH_OPTIONS_CIPHERS_S_C = 16,
SSH_OPTIONS_COMPRESSION_C_S = 17,
SSH_OPTIONS_COMPRESSION_S_C = 18,
SSH_OPTIONS_PROXYCOMMAND = 19,
SSH_OPTIONS_BINDADDR = 20,
SSH_OPTIONS_STRICTHOSTKEYCHECK = 21,
SSH_OPTIONS_COMPRESSION = 22,
SSH_OPTIONS_COMPRESSION_LEVEL = 23,
SSH_OPTIONS_KEY_EXCHANGE = 24,
SSH_OPTIONS_HOSTKEYS = 25,
SSH_OPTIONS_GSSAPI_SERVER_IDENTITY = 26,
SSH_OPTIONS_GSSAPI_CLIENT_IDENTITY = 27,
SSH_OPTIONS_GSSAPI_DELEGATE_CREDENTIALS = 28,
SSH_OPTIONS_HMAC_C_S = 29,
SSH_OPTIONS_HMAC_S_C = 30,
SSH_OPTIONS_PASSWORD_AUTH = 31,
SSH_OPTIONS_PUBKEY_AUTH = 32,
SSH_OPTIONS_KBDINT_AUTH = 33,
SSH_OPTIONS_GSSAPI_AUTH = 34,
SSH_OPTIONS_GLOBAL_KNOWNHOSTS = 35,
SSH_OPTIONS_NODELAY = 36,
SSH_OPTIONS_PUBLICKEY_ACCEPTED_TYPES = 37,
SSH_OPTIONS_PROCESS_CONFIG = 38,
SSH_OPTIONS_REKEY_DATA = 39,
SSH_OPTIONS_REKEY_TIME = 40,
SSH_OPTIONS_RSA_MIN_SIZE = 41,
SSH_OPTIONS_IDENTITY_AGENT = 42,
}
pub const SSH_SCP_WRITE: _bindgen_ty_11 = _bindgen_ty_11::SSH_SCP_WRITE;
pub const SSH_SCP_READ: _bindgen_ty_11 = _bindgen_ty_11::SSH_SCP_READ;
pub const SSH_SCP_RECURSIVE: _bindgen_ty_11 = _bindgen_ty_11::SSH_SCP_RECURSIVE;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_11 {
SSH_SCP_WRITE = 0,
SSH_SCP_READ = 1,
SSH_SCP_RECURSIVE = 16,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ssh_scp_request_types {
SSH_SCP_REQUEST_NEWDIR = 1,
SSH_SCP_REQUEST_NEWFILE = 2,
SSH_SCP_REQUEST_EOF = 3,
SSH_SCP_REQUEST_ENDDIR = 4,
SSH_SCP_REQUEST_WARNING = 5,
}
impl ssh_connector_flags_e {
pub const SSH_CONNECTOR_STDINOUT: ssh_connector_flags_e =
ssh_connector_flags_e::SSH_CONNECTOR_STDOUT;
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ssh_connector_flags_e {
SSH_CONNECTOR_STDOUT = 1,
SSH_CONNECTOR_STDERR = 2,
SSH_CONNECTOR_BOTH = 3,
}
extern "C" {
pub fn ssh_blocking_flush(
session: ssh_session,
timeout: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_accept_x11(
channel: ssh_channel,
timeout_ms: ::std::os::raw::c_int,
) -> ssh_channel;
}
extern "C" {
pub fn ssh_channel_change_pty_size(
channel: ssh_channel,
cols: ::std::os::raw::c_int,
rows: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_close(channel: ssh_channel) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_free(channel: ssh_channel);
}
extern "C" {
pub fn ssh_channel_get_exit_status(channel: ssh_channel) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_get_session(channel: ssh_channel) -> ssh_session;
}
extern "C" {
pub fn ssh_channel_is_closed(channel: ssh_channel) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_is_eof(channel: ssh_channel) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_is_open(channel: ssh_channel) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_new(session: ssh_session) -> ssh_channel;
}
extern "C" {
pub fn ssh_channel_open_auth_agent(channel: ssh_channel) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_open_forward(
channel: ssh_channel,
remotehost: *const ::std::os::raw::c_char,
remoteport: ::std::os::raw::c_int,
sourcehost: *const ::std::os::raw::c_char,
localport: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_open_forward_unix(
channel: ssh_channel,
remotepath: *const ::std::os::raw::c_char,
sourcehost: *const ::std::os::raw::c_char,
localport: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_open_session(channel: ssh_channel) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_open_x11(
channel: ssh_channel,
orig_addr: *const ::std::os::raw::c_char,
orig_port: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_poll(
channel: ssh_channel,
is_stderr: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_poll_timeout(
channel: ssh_channel,
timeout: ::std::os::raw::c_int,
is_stderr: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_read(
channel: ssh_channel,
dest: *mut ::std::os::raw::c_void,
count: u32,
is_stderr: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_read_timeout(
channel: ssh_channel,
dest: *mut ::std::os::raw::c_void,
count: u32,
is_stderr: ::std::os::raw::c_int,
timeout_ms: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_read_nonblocking(
channel: ssh_channel,
dest: *mut ::std::os::raw::c_void,
count: u32,
is_stderr: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_request_env(
channel: ssh_channel,
name: *const ::std::os::raw::c_char,
value: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_request_exec(
channel: ssh_channel,
cmd: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_request_pty(channel: ssh_channel) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_request_pty_size(
channel: ssh_channel,
term: *const ::std::os::raw::c_char,
cols: ::std::os::raw::c_int,
rows: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_request_shell(channel: ssh_channel) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_request_send_signal(
channel: ssh_channel,
signum: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_request_send_break(
channel: ssh_channel,
length: u32,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_request_sftp(channel: ssh_channel) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_request_subsystem(
channel: ssh_channel,
subsystem: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_request_x11(
channel: ssh_channel,
single_connection: ::std::os::raw::c_int,
protocol: *const ::std::os::raw::c_char,
cookie: *const ::std::os::raw::c_char,
screen_number: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_request_auth_agent(channel: ssh_channel) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_send_eof(channel: ssh_channel) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_set_blocking(channel: ssh_channel, blocking: ::std::os::raw::c_int);
}
extern "C" {
pub fn ssh_channel_set_counter(channel: ssh_channel, counter: ssh_counter);
}
extern "C" {
pub fn ssh_channel_write(
channel: ssh_channel,
data: *const ::std::os::raw::c_void,
len: u32,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_write_stderr(
channel: ssh_channel,
data: *const ::std::os::raw::c_void,
len: u32,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_window_size(channel: ssh_channel) -> u32;
}
extern "C" {
pub fn ssh_basename(path: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_clean_pubkey_hash(hash: *mut *mut ::std::os::raw::c_uchar);
}
extern "C" {
pub fn ssh_connect(session: ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_connector_new(session: ssh_session) -> ssh_connector;
}
extern "C" {
pub fn ssh_connector_free(connector: ssh_connector);
}
extern "C" {
pub fn ssh_connector_set_in_channel(
connector: ssh_connector,
channel: ssh_channel,
flags: ssh_connector_flags_e,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_connector_set_out_channel(
connector: ssh_connector,
channel: ssh_channel,
flags: ssh_connector_flags_e,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_connector_set_in_fd(connector: ssh_connector, fd: socket_t);
}
extern "C" {
pub fn ssh_connector_set_out_fd(connector: ssh_connector, fd: socket_t);
}
extern "C" {
pub fn ssh_copyright() -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_disconnect(session: ssh_session);
}
extern "C" {
pub fn ssh_dirname(path: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_finalize() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_open_forward_port(
session: ssh_session,
timeout_ms: ::std::os::raw::c_int,
destination_port: *mut ::std::os::raw::c_int,
originator: *mut *mut ::std::os::raw::c_char,
originator_port: *mut ::std::os::raw::c_int,
) -> ssh_channel;
}
extern "C" {
pub fn ssh_channel_accept_forward(
session: ssh_session,
timeout_ms: ::std::os::raw::c_int,
destination_port: *mut ::std::os::raw::c_int,
) -> ssh_channel;
}
extern "C" {
pub fn ssh_channel_cancel_forward(
session: ssh_session,
address: *const ::std::os::raw::c_char,
port: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_listen_forward(
session: ssh_session,
address: *const ::std::os::raw::c_char,
port: ::std::os::raw::c_int,
bound_port: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_free(session: ssh_session);
}
extern "C" {
pub fn ssh_get_disconnect_message(session: ssh_session) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_get_error(error: *mut ::std::os::raw::c_void) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_get_error_code(error: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_get_fd(session: ssh_session) -> socket_t;
}
extern "C" {
pub fn ssh_get_hexa(
what: *const ::std::os::raw::c_uchar,
len: usize,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_get_issue_banner(session: ssh_session) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_get_openssh_version(session: ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_get_server_publickey(
session: ssh_session,
key: *mut ssh_key,
) -> ::std::os::raw::c_int;
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ssh_publickey_hash_type {
SSH_PUBLICKEY_HASH_SHA1 = 0,
SSH_PUBLICKEY_HASH_MD5 = 1,
SSH_PUBLICKEY_HASH_SHA256 = 2,
}
extern "C" {
pub fn ssh_get_publickey_hash(
key: ssh_key,
type_: ssh_publickey_hash_type,
hash: *mut *mut ::std::os::raw::c_uchar,
hlen: *mut usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_get_pubkey_hash(
session: ssh_session,
hash: *mut *mut ::std::os::raw::c_uchar,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_forward_accept(
session: ssh_session,
timeout_ms: ::std::os::raw::c_int,
) -> ssh_channel;
}
extern "C" {
pub fn ssh_forward_cancel(
session: ssh_session,
address: *const ::std::os::raw::c_char,
port: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_forward_listen(
session: ssh_session,
address: *const ::std::os::raw::c_char,
port: ::std::os::raw::c_int,
bound_port: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_get_publickey(session: ssh_session, key: *mut ssh_key) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_write_knownhost(session: ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_dump_knownhost(session: ssh_session) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_is_server_known(session: ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_print_hexa(
descr: *const ::std::os::raw::c_char,
what: *const ::std::os::raw::c_uchar,
len: usize,
);
}
extern "C" {
pub fn ssh_channel_select(
readchans: *mut ssh_channel,
writechans: *mut ssh_channel,
exceptchans: *mut ssh_channel,
timeout: *mut timeval,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_scp_accept_request(scp: ssh_scp) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_scp_close(scp: ssh_scp) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_scp_deny_request(
scp: ssh_scp,
reason: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_scp_free(scp: ssh_scp);
}
extern "C" {
pub fn ssh_scp_init(scp: ssh_scp) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_scp_leave_directory(scp: ssh_scp) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_scp_new(
session: ssh_session,
mode: ::std::os::raw::c_int,
location: *const ::std::os::raw::c_char,
) -> ssh_scp;
}
extern "C" {
pub fn ssh_scp_pull_request(scp: ssh_scp) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_scp_push_directory(
scp: ssh_scp,
dirname: *const ::std::os::raw::c_char,
mode: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_scp_push_file(
scp: ssh_scp,
filename: *const ::std::os::raw::c_char,
size: usize,
perms: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_scp_push_file64(
scp: ssh_scp,
filename: *const ::std::os::raw::c_char,
size: u64,
perms: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_scp_read(
scp: ssh_scp,
buffer: *mut ::std::os::raw::c_void,
size: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_scp_request_get_filename(scp: ssh_scp) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_scp_request_get_permissions(scp: ssh_scp) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_scp_request_get_size(scp: ssh_scp) -> usize;
}
extern "C" {
pub fn ssh_scp_request_get_size64(scp: ssh_scp) -> u64;
}
extern "C" {
pub fn ssh_scp_request_get_warning(scp: ssh_scp) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_scp_write(
scp: ssh_scp,
buffer: *const ::std::os::raw::c_void,
len: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_get_random(
where_: *mut ::std::os::raw::c_void,
len: ::std::os::raw::c_int,
strong: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_get_version(session: ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_get_status(session: ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_get_poll_flags(session: ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_init() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_is_blocking(session: ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_is_connected(session: ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_knownhosts_entry_free(entry: *mut ssh_knownhosts_entry);
}
extern "C" {
pub fn ssh_known_hosts_parse_line(
host: *const ::std::os::raw::c_char,
line: *const ::std::os::raw::c_char,
entry: *mut *mut ssh_knownhosts_entry,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_session_has_known_hosts_entry(session: ssh_session) -> ssh_known_hosts_e;
}
extern "C" {
pub fn ssh_session_export_known_hosts_entry(
session: ssh_session,
pentry_string: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_session_update_known_hosts(session: ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_session_get_known_hosts_entry(
session: ssh_session,
pentry: *mut *mut ssh_knownhosts_entry,
) -> ssh_known_hosts_e;
}
extern "C" {
pub fn ssh_session_is_known_server(session: ssh_session) -> ssh_known_hosts_e;
}
extern "C" {
pub fn ssh_set_log_level(level: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_get_log_level() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_get_log_userdata() -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn ssh_set_log_userdata(data: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_vlog(
verbosity: ::std::os::raw::c_int,
function: *const ::std::os::raw::c_char,
format: *const ::std::os::raw::c_char,
va: *mut va_list,
);
}
extern "C" {
pub fn ssh_log(
session: ssh_session,
prioriry: ::std::os::raw::c_int,
format: *const ::std::os::raw::c_char,
...
);
}
extern "C" {
pub fn ssh_message_channel_request_open_reply_accept(msg: ssh_message) -> ssh_channel;
}
extern "C" {
pub fn ssh_message_channel_request_open_reply_accept_channel(
msg: ssh_message,
chan: ssh_channel,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_channel_request_reply_success(msg: ssh_message) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_free(msg: ssh_message);
}
extern "C" {
pub fn ssh_message_get(session: ssh_session) -> ssh_message;
}
extern "C" {
pub fn ssh_message_subtype(msg: ssh_message) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_type(msg: ssh_message) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_mkdir(
pathname: *const ::std::os::raw::c_char,
mode: mode_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_new() -> ssh_session;
}
extern "C" {
pub fn ssh_options_copy(src: ssh_session, dest: *mut ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_options_getopt(
session: ssh_session,
argcptr: *mut ::std::os::raw::c_int,
argv: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_options_parse_config(
session: ssh_session,
filename: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_options_set(
session: ssh_session,
type_: ssh_options_e,
value: *const ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_options_get(
session: ssh_session,
type_: ssh_options_e,
value: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_options_get_port(
session: ssh_session,
port_target: *mut ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_pcap_file_close(pcap: ssh_pcap_file) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_pcap_file_free(pcap: ssh_pcap_file);
}
extern "C" {
pub fn ssh_pcap_file_new() -> ssh_pcap_file;
}
extern "C" {
pub fn ssh_pcap_file_open(
pcap: ssh_pcap_file,
filename: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
pub type ssh_auth_callback = ::std::option::Option<
unsafe extern "C" fn(
prompt: *const ::std::os::raw::c_char,
buf: *mut ::std::os::raw::c_char,
len: usize,
echo: ::std::os::raw::c_int,
verify: ::std::os::raw::c_int,
userdata: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
extern "C" {
pub fn ssh_key_new() -> ssh_key;
}
extern "C" {
pub fn ssh_key_free(key: ssh_key);
}
extern "C" {
pub fn ssh_key_type(key: ssh_key) -> ssh_keytypes_e;
}
extern "C" {
pub fn ssh_key_type_to_char(type_: ssh_keytypes_e) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_key_type_from_name(name: *const ::std::os::raw::c_char) -> ssh_keytypes_e;
}
extern "C" {
pub fn ssh_key_is_public(k: ssh_key) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_key_is_private(k: ssh_key) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_key_cmp(k1: ssh_key, k2: ssh_key, what: ssh_keycmp_e) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_key_dup(key: ssh_key) -> ssh_key;
}
extern "C" {
pub fn ssh_pki_generate(
type_: ssh_keytypes_e,
parameter: ::std::os::raw::c_int,
pkey: *mut ssh_key,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_pki_import_privkey_base64(
b64_key: *const ::std::os::raw::c_char,
passphrase: *const ::std::os::raw::c_char,
auth_fn: ssh_auth_callback,
auth_data: *mut ::std::os::raw::c_void,
pkey: *mut ssh_key,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_pki_export_privkey_base64(
privkey: ssh_key,
passphrase: *const ::std::os::raw::c_char,
auth_fn: ssh_auth_callback,
auth_data: *mut ::std::os::raw::c_void,
b64_key: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_pki_import_privkey_file(
filename: *const ::std::os::raw::c_char,
passphrase: *const ::std::os::raw::c_char,
auth_fn: ssh_auth_callback,
auth_data: *mut ::std::os::raw::c_void,
pkey: *mut ssh_key,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_pki_export_privkey_file(
privkey: ssh_key,
passphrase: *const ::std::os::raw::c_char,
auth_fn: ssh_auth_callback,
auth_data: *mut ::std::os::raw::c_void,
filename: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_pki_copy_cert_to_privkey(
cert_key: ssh_key,
privkey: ssh_key,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_pki_import_pubkey_base64(
b64_key: *const ::std::os::raw::c_char,
type_: ssh_keytypes_e,
pkey: *mut ssh_key,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_pki_import_pubkey_file(
filename: *const ::std::os::raw::c_char,
pkey: *mut ssh_key,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_pki_import_cert_base64(
b64_cert: *const ::std::os::raw::c_char,
type_: ssh_keytypes_e,
pkey: *mut ssh_key,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_pki_import_cert_file(
filename: *const ::std::os::raw::c_char,
pkey: *mut ssh_key,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_pki_export_privkey_to_pubkey(
privkey: ssh_key,
pkey: *mut ssh_key,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_pki_export_pubkey_base64(
key: ssh_key,
b64_key: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_pki_export_pubkey_file(
key: ssh_key,
filename: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_pki_key_ecdsa_name(key: ssh_key) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_get_fingerprint_hash(
type_: ssh_publickey_hash_type,
hash: *mut ::std::os::raw::c_uchar,
len: usize,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_print_hash(
type_: ssh_publickey_hash_type,
hash: *mut ::std::os::raw::c_uchar,
len: usize,
);
}
extern "C" {
pub fn ssh_send_ignore(
session: ssh_session,
data: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_send_debug(
session: ssh_session,
message: *const ::std::os::raw::c_char,
always_display: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_gssapi_set_creds(session: ssh_session, creds: ssh_gssapi_creds);
}
extern "C" {
pub fn ssh_select(
channels: *mut ssh_channel,
outchannels: *mut ssh_channel,
maxfd: socket_t,
readfds: *mut fd_set,
timeout: *mut timeval,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_service_request(
session: ssh_session,
service: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_set_agent_channel(
session: ssh_session,
channel: ssh_channel,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_set_agent_socket(session: ssh_session, fd: socket_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_set_blocking(session: ssh_session, blocking: ::std::os::raw::c_int);
}
extern "C" {
pub fn ssh_set_counters(session: ssh_session, scounter: ssh_counter, rcounter: ssh_counter);
}
extern "C" {
pub fn ssh_set_fd_except(session: ssh_session);
}
extern "C" {
pub fn ssh_set_fd_toread(session: ssh_session);
}
extern "C" {
pub fn ssh_set_fd_towrite(session: ssh_session);
}
extern "C" {
pub fn ssh_silent_disconnect(session: ssh_session);
}
extern "C" {
pub fn ssh_set_pcap_file(
session: ssh_session,
pcapfile: ssh_pcap_file,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_userauth_none(
session: ssh_session,
username: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_userauth_list(
session: ssh_session,
username: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_userauth_try_publickey(
session: ssh_session,
username: *const ::std::os::raw::c_char,
pubkey: ssh_key,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_userauth_publickey(
session: ssh_session,
username: *const ::std::os::raw::c_char,
privkey: ssh_key,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_userauth_agent(
session: ssh_session,
username: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_userauth_publickey_auto_get_current_identity(
session: ssh_session,
value: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_userauth_publickey_auto(
session: ssh_session,
username: *const ::std::os::raw::c_char,
passphrase: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_userauth_password(
session: ssh_session,
username: *const ::std::os::raw::c_char,
password: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_userauth_kbdint(
session: ssh_session,
user: *const ::std::os::raw::c_char,
submethods: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_userauth_kbdint_getinstruction(
session: ssh_session,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_userauth_kbdint_getname(session: ssh_session) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_userauth_kbdint_getnprompts(session: ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_userauth_kbdint_getprompt(
session: ssh_session,
i: ::std::os::raw::c_uint,
echo: *mut ::std::os::raw::c_char,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_userauth_kbdint_getnanswers(session: ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_userauth_kbdint_getanswer(
session: ssh_session,
i: ::std::os::raw::c_uint,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_userauth_kbdint_setanswer(
session: ssh_session,
i: ::std::os::raw::c_uint,
answer: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_userauth_gssapi(session: ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_version(req_version: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_string_burn(str_: ssh_string);
}
extern "C" {
pub fn ssh_string_copy(str_: ssh_string) -> ssh_string;
}
extern "C" {
pub fn ssh_string_data(str_: ssh_string) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn ssh_string_fill(
str_: ssh_string,
data: *const ::std::os::raw::c_void,
len: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_string_free(str_: ssh_string);
}
extern "C" {
pub fn ssh_string_from_char(what: *const ::std::os::raw::c_char) -> ssh_string;
}
extern "C" {
pub fn ssh_string_len(str_: ssh_string) -> usize;
}
extern "C" {
pub fn ssh_string_new(size: usize) -> ssh_string;
}
extern "C" {
pub fn ssh_string_get_char(str_: ssh_string) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_string_to_char(str_: ssh_string) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_string_free_char(s: *mut ::std::os::raw::c_char);
}
extern "C" {
pub fn ssh_getpass(
prompt: *const ::std::os::raw::c_char,
buf: *mut ::std::os::raw::c_char,
len: usize,
echo: ::std::os::raw::c_int,
verify: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
pub type ssh_event_callback = ::std::option::Option<
unsafe extern "C" fn(
fd: socket_t,
revents: ::std::os::raw::c_int,
userdata: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
extern "C" {
pub fn ssh_event_new() -> ssh_event;
}
extern "C" {
pub fn ssh_event_add_fd(
event: ssh_event,
fd: socket_t,
events: ::std::os::raw::c_short,
cb: ssh_event_callback,
userdata: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_event_add_session(event: ssh_event, session: ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_event_add_connector(
event: ssh_event,
connector: ssh_connector,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_event_dopoll(
event: ssh_event,
timeout: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_event_remove_fd(event: ssh_event, fd: socket_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_event_remove_session(
event: ssh_event,
session: ssh_session,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_event_remove_connector(
event: ssh_event,
connector: ssh_connector,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_event_free(event: ssh_event);
}
extern "C" {
pub fn ssh_get_clientbanner(session: ssh_session) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_get_serverbanner(session: ssh_session) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_get_kex_algo(session: ssh_session) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_get_cipher_in(session: ssh_session) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_get_cipher_out(session: ssh_session) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_get_hmac_in(session: ssh_session) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_get_hmac_out(session: ssh_session) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_buffer_new() -> ssh_buffer;
}
extern "C" {
pub fn ssh_buffer_free(buffer: ssh_buffer);
}
extern "C" {
pub fn ssh_buffer_reinit(buffer: ssh_buffer) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_buffer_add_data(
buffer: ssh_buffer,
data: *const ::std::os::raw::c_void,
len: u32,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_buffer_get_data(
buffer: ssh_buffer,
data: *mut ::std::os::raw::c_void,
requestedlen: u32,
) -> u32;
}
extern "C" {
pub fn ssh_buffer_get(buffer: ssh_buffer) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn ssh_buffer_get_len(buffer: ssh_buffer) -> u32;
}
extern "C" {
pub fn ssh_session_set_disconnect_message(
session: ssh_session,
message: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_private_key_struct {
_unused: [u8; 0],
}
pub type ssh_private_key = *mut ssh_private_key_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_public_key_struct {
_unused: [u8; 0],
}
pub type ssh_public_key = *mut ssh_public_key_struct;
extern "C" {
pub fn ssh_auth_list(session: ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_userauth_offer_pubkey(
session: ssh_session,
username: *const ::std::os::raw::c_char,
type_: ::std::os::raw::c_int,
publickey: ssh_string,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_userauth_pubkey(
session: ssh_session,
username: *const ::std::os::raw::c_char,
publickey: ssh_string,
privatekey: ssh_private_key,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_userauth_agent_pubkey(
session: ssh_session,
username: *const ::std::os::raw::c_char,
publickey: ssh_public_key,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_userauth_autopubkey(
session: ssh_session,
passphrase: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_userauth_privatekey_file(
session: ssh_session,
username: *const ::std::os::raw::c_char,
filename: *const ::std::os::raw::c_char,
passphrase: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_publickey_to_file(
session: ssh_session,
file: *const ::std::os::raw::c_char,
pubkey: ssh_string,
type_: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_try_publickey_from_file(
session: ssh_session,
keyfile: *const ::std::os::raw::c_char,
publickey: *mut ssh_string,
type_: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_privatekey_type(privatekey: ssh_private_key) -> ssh_keytypes_e;
}
extern "C" {
pub fn ssh_get_pubkey(session: ssh_session) -> ssh_string;
}
extern "C" {
pub fn ssh_message_retrieve(session: ssh_session, packettype: u32) -> ssh_message;
}
extern "C" {
pub fn ssh_message_auth_publickey(msg: ssh_message) -> ssh_public_key;
}
pub type ssh_callback_int = ::std::option::Option<
unsafe extern "C" fn(code: ::std::os::raw::c_int, user: *mut ::std::os::raw::c_void),
>;
pub type ssh_callback_data = ::std::option::Option<
unsafe extern "C" fn(
data: *const ::std::os::raw::c_void,
len: usize,
user: *mut ::std::os::raw::c_void,
) -> usize,
>;
pub type ssh_callback_int_int = ::std::option::Option<
unsafe extern "C" fn(
code: ::std::os::raw::c_int,
errno_code: ::std::os::raw::c_int,
user: *mut ::std::os::raw::c_void,
),
>;
pub type ssh_message_callback = ::std::option::Option<
unsafe extern "C" fn(
arg1: ssh_session,
message: ssh_message,
user: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type ssh_channel_callback_int = ::std::option::Option<
unsafe extern "C" fn(
channel: ssh_channel,
code: ::std::os::raw::c_int,
user: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type ssh_channel_callback_data = ::std::option::Option<
unsafe extern "C" fn(
channel: ssh_channel,
code: ::std::os::raw::c_int,
data: *mut ::std::os::raw::c_void,
len: usize,
user: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type ssh_log_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
priority: ::std::os::raw::c_int,
message: *const ::std::os::raw::c_char,
userdata: *mut ::std::os::raw::c_void,
),
>;
pub type ssh_logging_callback = ::std::option::Option<
unsafe extern "C" fn(
priority: ::std::os::raw::c_int,
function: *const ::std::os::raw::c_char,
buffer: *const ::std::os::raw::c_char,
userdata: *mut ::std::os::raw::c_void,
),
>;
pub type ssh_status_callback = ::std::option::Option<
unsafe extern "C" fn(session: ssh_session, status: f32, userdata: *mut ::std::os::raw::c_void),
>;
pub type ssh_global_request_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
message: ssh_message,
userdata: *mut ::std::os::raw::c_void,
),
>;
pub type ssh_channel_open_request_x11_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
originator_address: *const ::std::os::raw::c_char,
originator_port: ::std::os::raw::c_int,
userdata: *mut ::std::os::raw::c_void,
) -> ssh_channel,
>;
pub type ssh_channel_open_request_auth_agent_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
userdata: *mut ::std::os::raw::c_void,
) -> ssh_channel,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_callbacks_struct {
pub size: usize,
pub userdata: *mut ::std::os::raw::c_void,
pub auth_function: ssh_auth_callback,
pub log_function: ssh_log_callback,
pub connect_status_function: ::std::option::Option<
unsafe extern "C" fn(userdata: *mut ::std::os::raw::c_void, status: f32),
>,
pub global_request_function: ssh_global_request_callback,
pub channel_open_request_x11_function: ssh_channel_open_request_x11_callback,
pub channel_open_request_auth_agent_function: ssh_channel_open_request_auth_agent_callback,
}
pub type ssh_callbacks = *mut ssh_callbacks_struct;
pub type ssh_auth_password_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
user: *const ::std::os::raw::c_char,
password: *const ::std::os::raw::c_char,
userdata: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type ssh_auth_none_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
user: *const ::std::os::raw::c_char,
userdata: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type ssh_auth_gssapi_mic_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
user: *const ::std::os::raw::c_char,
principal: *const ::std::os::raw::c_char,
userdata: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type ssh_auth_pubkey_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
user: *const ::std::os::raw::c_char,
pubkey: *mut ssh_key_struct,
signature_state: ::std::os::raw::c_char,
userdata: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type ssh_service_request_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
service: *const ::std::os::raw::c_char,
userdata: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type ssh_channel_open_request_session_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
userdata: *mut ::std::os::raw::c_void,
) -> ssh_channel,
>;
pub type ssh_gssapi_select_oid_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
user: *const ::std::os::raw::c_char,
n_oid: ::std::os::raw::c_int,
oids: *mut ssh_string,
userdata: *mut ::std::os::raw::c_void,
) -> ssh_string,
>;
pub type ssh_gssapi_accept_sec_ctx_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
input_token: ssh_string,
output_token: *mut ssh_string,
userdata: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type ssh_gssapi_verify_mic_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
mic: ssh_string,
mic_buffer: *mut ::std::os::raw::c_void,
mic_buffer_size: usize,
userdata: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_server_callbacks_struct {
pub size: usize,
pub userdata: *mut ::std::os::raw::c_void,
pub auth_password_function: ssh_auth_password_callback,
pub auth_none_function: ssh_auth_none_callback,
pub auth_gssapi_mic_function: ssh_auth_gssapi_mic_callback,
pub auth_pubkey_function: ssh_auth_pubkey_callback,
pub service_request_function: ssh_service_request_callback,
pub channel_open_request_session_function: ssh_channel_open_request_session_callback,
pub gssapi_select_oid_function: ssh_gssapi_select_oid_callback,
pub gssapi_accept_sec_ctx_function: ssh_gssapi_accept_sec_ctx_callback,
pub gssapi_verify_mic_function: ssh_gssapi_verify_mic_callback,
}
pub type ssh_server_callbacks = *mut ssh_server_callbacks_struct;
extern "C" {
pub fn ssh_set_server_callbacks(
session: ssh_session,
cb: ssh_server_callbacks,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_socket_callbacks_struct {
pub userdata: *mut ::std::os::raw::c_void,
pub data: ssh_callback_data,
pub controlflow: ssh_callback_int,
pub exception: ssh_callback_int_int,
pub connected: ssh_callback_int_int,
}
pub type ssh_socket_callbacks = *mut ssh_socket_callbacks_struct;
pub type ssh_packet_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
type_: u8,
packet: ssh_buffer,
user: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_packet_callbacks_struct {
pub start: u8,
pub n_callbacks: u8,
pub callbacks: *mut ssh_packet_callback,
pub user: *mut ::std::os::raw::c_void,
}
pub type ssh_packet_callbacks = *mut ssh_packet_callbacks_struct;
extern "C" {
pub fn ssh_set_callbacks(session: ssh_session, cb: ssh_callbacks) -> ::std::os::raw::c_int;
}
pub type ssh_channel_data_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
channel: ssh_channel,
data: *mut ::std::os::raw::c_void,
len: u32,
is_stderr: ::std::os::raw::c_int,
userdata: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type ssh_channel_eof_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
channel: ssh_channel,
userdata: *mut ::std::os::raw::c_void,
),
>;
pub type ssh_channel_close_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
channel: ssh_channel,
userdata: *mut ::std::os::raw::c_void,
),
>;
pub type ssh_channel_signal_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
channel: ssh_channel,
signal: *const ::std::os::raw::c_char,
userdata: *mut ::std::os::raw::c_void,
),
>;
pub type ssh_channel_exit_status_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
channel: ssh_channel,
exit_status: ::std::os::raw::c_int,
userdata: *mut ::std::os::raw::c_void,
),
>;
pub type ssh_channel_exit_signal_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
channel: ssh_channel,
signal: *const ::std::os::raw::c_char,
core: ::std::os::raw::c_int,
errmsg: *const ::std::os::raw::c_char,
lang: *const ::std::os::raw::c_char,
userdata: *mut ::std::os::raw::c_void,
),
>;
pub type ssh_channel_pty_request_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
channel: ssh_channel,
term: *const ::std::os::raw::c_char,
width: ::std::os::raw::c_int,
height: ::std::os::raw::c_int,
pxwidth: ::std::os::raw::c_int,
pwheight: ::std::os::raw::c_int,
userdata: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type ssh_channel_shell_request_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
channel: ssh_channel,
userdata: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type ssh_channel_auth_agent_req_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
channel: ssh_channel,
userdata: *mut ::std::os::raw::c_void,
),
>;
pub type ssh_channel_x11_req_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
channel: ssh_channel,
single_connection: ::std::os::raw::c_int,
auth_protocol: *const ::std::os::raw::c_char,
auth_cookie: *const ::std::os::raw::c_char,
screen_number: u32,
userdata: *mut ::std::os::raw::c_void,
),
>;
pub type ssh_channel_pty_window_change_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
channel: ssh_channel,
width: ::std::os::raw::c_int,
height: ::std::os::raw::c_int,
pxwidth: ::std::os::raw::c_int,
pwheight: ::std::os::raw::c_int,
userdata: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type ssh_channel_exec_request_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
channel: ssh_channel,
command: *const ::std::os::raw::c_char,
userdata: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type ssh_channel_env_request_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
channel: ssh_channel,
env_name: *const ::std::os::raw::c_char,
env_value: *const ::std::os::raw::c_char,
userdata: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type ssh_channel_subsystem_request_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
channel: ssh_channel,
subsystem: *const ::std::os::raw::c_char,
userdata: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type ssh_channel_write_wontblock_callback = ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
channel: ssh_channel,
bytes: u32,
userdata: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_channel_callbacks_struct {
pub size: usize,
pub userdata: *mut ::std::os::raw::c_void,
pub channel_data_function: ssh_channel_data_callback,
pub channel_eof_function: ssh_channel_eof_callback,
pub channel_close_function: ssh_channel_close_callback,
pub channel_signal_function: ssh_channel_signal_callback,
pub channel_exit_status_function: ssh_channel_exit_status_callback,
pub channel_exit_signal_function: ssh_channel_exit_signal_callback,
pub channel_pty_request_function: ssh_channel_pty_request_callback,
pub channel_shell_request_function: ssh_channel_shell_request_callback,
pub channel_auth_agent_req_function: ssh_channel_auth_agent_req_callback,
pub channel_x11_req_function: ssh_channel_x11_req_callback,
pub channel_pty_window_change_function: ssh_channel_pty_window_change_callback,
pub channel_exec_request_function: ssh_channel_exec_request_callback,
pub channel_env_request_function: ssh_channel_env_request_callback,
pub channel_subsystem_request_function: ssh_channel_subsystem_request_callback,
pub channel_write_wontblock_function: ssh_channel_write_wontblock_callback,
}
pub type ssh_channel_callbacks = *mut ssh_channel_callbacks_struct;
extern "C" {
pub fn ssh_set_channel_callbacks(
channel: ssh_channel,
cb: ssh_channel_callbacks,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_add_channel_callbacks(
channel: ssh_channel,
cb: ssh_channel_callbacks,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_remove_channel_callbacks(
channel: ssh_channel,
cb: ssh_channel_callbacks,
) -> ::std::os::raw::c_int;
}
pub type ssh_thread_callback = ::std::option::Option<
unsafe extern "C" fn(lock: *mut *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
>;
pub type ssh_thread_id_callback =
::std::option::Option<unsafe extern "C" fn() -> ::std::os::raw::c_ulong>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_threads_callbacks_struct {
pub type_: *const ::std::os::raw::c_char,
pub mutex_init: ssh_thread_callback,
pub mutex_destroy: ssh_thread_callback,
pub mutex_lock: ssh_thread_callback,
pub mutex_unlock: ssh_thread_callback,
pub thread_id: ssh_thread_id_callback,
}
extern "C" {
pub fn ssh_threads_set_callbacks(
cb: *mut ssh_threads_callbacks_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_threads_get_default() -> *mut ssh_threads_callbacks_struct;
}
extern "C" {
pub fn ssh_threads_get_pthread() -> *mut ssh_threads_callbacks_struct;
}
extern "C" {
pub fn ssh_threads_get_noop() -> *mut ssh_threads_callbacks_struct;
}
extern "C" {
pub fn ssh_set_log_callback(cb: ssh_logging_callback) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_get_log_callback() -> ssh_logging_callback;
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ssh_bind_options_e {
SSH_BIND_OPTIONS_BINDADDR = 0,
SSH_BIND_OPTIONS_BINDPORT = 1,
SSH_BIND_OPTIONS_BINDPORT_STR = 2,
SSH_BIND_OPTIONS_HOSTKEY = 3,
SSH_BIND_OPTIONS_DSAKEY = 4,
SSH_BIND_OPTIONS_RSAKEY = 5,
SSH_BIND_OPTIONS_BANNER = 6,
SSH_BIND_OPTIONS_LOG_VERBOSITY = 7,
SSH_BIND_OPTIONS_LOG_VERBOSITY_STR = 8,
SSH_BIND_OPTIONS_ECDSAKEY = 9,
SSH_BIND_OPTIONS_IMPORT_KEY = 10,
SSH_BIND_OPTIONS_KEY_EXCHANGE = 11,
SSH_BIND_OPTIONS_CIPHERS_C_S = 12,
SSH_BIND_OPTIONS_CIPHERS_S_C = 13,
SSH_BIND_OPTIONS_HMAC_C_S = 14,
SSH_BIND_OPTIONS_HMAC_S_C = 15,
SSH_BIND_OPTIONS_CONFIG_DIR = 16,
SSH_BIND_OPTIONS_PUBKEY_ACCEPTED_KEY_TYPES = 17,
SSH_BIND_OPTIONS_HOSTKEY_ALGORITHMS = 18,
SSH_BIND_OPTIONS_PROCESS_CONFIG = 19,
SSH_BIND_OPTIONS_MODULI = 20,
SSH_BIND_OPTIONS_RSA_MIN_SIZE = 21,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_bind_struct {
_unused: [u8; 0],
}
pub type ssh_bind = *mut ssh_bind_struct;
pub type ssh_bind_incoming_connection_callback = ::std::option::Option<
unsafe extern "C" fn(sshbind: ssh_bind, userdata: *mut ::std::os::raw::c_void),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssh_bind_callbacks_struct {
pub size: usize,
pub incoming_connection: ssh_bind_incoming_connection_callback,
}
pub type ssh_bind_callbacks = *mut ssh_bind_callbacks_struct;
extern "C" {
pub fn ssh_bind_new() -> ssh_bind;
}
extern "C" {
pub fn ssh_bind_options_set(
sshbind: ssh_bind,
type_: ssh_bind_options_e,
value: *const ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_bind_options_parse_config(
sshbind: ssh_bind,
filename: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_bind_listen(ssh_bind_o: ssh_bind) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_bind_set_callbacks(
sshbind: ssh_bind,
callbacks: ssh_bind_callbacks,
userdata: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_bind_set_blocking(ssh_bind_o: ssh_bind, blocking: ::std::os::raw::c_int);
}
extern "C" {
pub fn ssh_bind_get_fd(ssh_bind_o: ssh_bind) -> socket_t;
}
extern "C" {
pub fn ssh_bind_set_fd(ssh_bind_o: ssh_bind, fd: socket_t);
}
extern "C" {
pub fn ssh_bind_fd_toaccept(ssh_bind_o: ssh_bind);
}
extern "C" {
pub fn ssh_bind_accept(ssh_bind_o: ssh_bind, session: ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_bind_accept_fd(
ssh_bind_o: ssh_bind,
session: ssh_session,
fd: socket_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_gssapi_get_creds(session: ssh_session) -> ssh_gssapi_creds;
}
extern "C" {
pub fn ssh_handle_key_exchange(session: ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_server_init_kex(session: ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_bind_free(ssh_bind_o: ssh_bind);
}
extern "C" {
pub fn ssh_set_auth_methods(session: ssh_session, auth_methods: ::std::os::raw::c_int);
}
extern "C" {
pub fn ssh_send_issue_banner(session: ssh_session, banner: ssh_string)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_reply_default(msg: ssh_message) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_auth_user(msg: ssh_message) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_message_auth_password(msg: ssh_message) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_message_auth_pubkey(msg: ssh_message) -> ssh_key;
}
extern "C" {
pub fn ssh_message_auth_kbdint_is_response(msg: ssh_message) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_auth_publickey_state(msg: ssh_message) -> ssh_publickey_state_e;
}
extern "C" {
pub fn ssh_message_auth_reply_success(
msg: ssh_message,
partial: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_auth_reply_pk_ok(
msg: ssh_message,
algo: ssh_string,
pubkey: ssh_string,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_auth_reply_pk_ok_simple(msg: ssh_message) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_auth_set_methods(
msg: ssh_message,
methods: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_auth_interactive_request(
msg: ssh_message,
name: *const ::std::os::raw::c_char,
instruction: *const ::std::os::raw::c_char,
num_prompts: ::std::os::raw::c_uint,
prompts: *mut *const ::std::os::raw::c_char,
echo: *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_service_reply_success(msg: ssh_message) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_service_service(msg: ssh_message) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_message_global_request_reply_success(
msg: ssh_message,
bound_port: u16,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_set_message_callback(
session: ssh_session,
ssh_bind_message_callback: ::std::option::Option<
unsafe extern "C" fn(
session: ssh_session,
msg: ssh_message,
data: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>,
data: *mut ::std::os::raw::c_void,
);
}
extern "C" {
pub fn ssh_execute_message_callbacks(session: ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_channel_request_open_originator(
msg: ssh_message,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_message_channel_request_open_originator_port(
msg: ssh_message,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_channel_request_open_destination(
msg: ssh_message,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_message_channel_request_open_destination_port(
msg: ssh_message,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_channel_request_channel(msg: ssh_message) -> ssh_channel;
}
extern "C" {
pub fn ssh_message_channel_request_pty_term(msg: ssh_message) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_message_channel_request_pty_width(msg: ssh_message) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_channel_request_pty_height(msg: ssh_message) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_channel_request_pty_pxwidth(msg: ssh_message) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_channel_request_pty_pxheight(msg: ssh_message) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_channel_request_env_name(msg: ssh_message) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_message_channel_request_env_value(msg: ssh_message)
-> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_message_channel_request_command(msg: ssh_message) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_message_channel_request_subsystem(msg: ssh_message)
-> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_message_channel_request_x11_single_connection(
msg: ssh_message,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_channel_request_x11_auth_protocol(
msg: ssh_message,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_message_channel_request_x11_auth_cookie(
msg: ssh_message,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_message_channel_request_x11_screen_number(msg: ssh_message)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_message_global_request_address(msg: ssh_message) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn ssh_message_global_request_port(msg: ssh_message) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_open_reverse_forward(
channel: ssh_channel,
remotehost: *const ::std::os::raw::c_char,
remoteport: ::std::os::raw::c_int,
sourcehost: *const ::std::os::raw::c_char,
localport: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_request_send_exit_status(
channel: ssh_channel,
exit_status: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_channel_request_send_exit_signal(
channel: ssh_channel,
signum: *const ::std::os::raw::c_char,
core: ::std::os::raw::c_int,
errmsg: *const ::std::os::raw::c_char,
lang: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_send_keepalive(session: ssh_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ssh_accept(session: ssh_session) -> ::std::os::raw::c_int;
}
pub type sftp_attributes = *mut sftp_attributes_struct;
pub type sftp_client_message = *mut sftp_client_message_struct;
pub type sftp_dir = *mut sftp_dir_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sftp_ext_struct {
_unused: [u8; 0],
}
pub type sftp_ext = *mut sftp_ext_struct;
pub type sftp_file = *mut sftp_file_struct;
pub type sftp_message = *mut sftp_message_struct;
pub type sftp_packet = *mut sftp_packet_struct;
pub type sftp_request_queue = *mut sftp_request_queue_struct;
pub type sftp_session = *mut sftp_session_struct;
pub type sftp_status_message = *mut sftp_status_message_struct;
pub type sftp_statvfs_t = *mut sftp_statvfs_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sftp_session_struct {
pub session: ssh_session,
pub channel: ssh_channel,
pub server_version: ::std::os::raw::c_int,
pub client_version: ::std::os::raw::c_int,
pub version: ::std::os::raw::c_int,
pub queue: sftp_request_queue,
pub id_counter: u32,
pub errnum: ::std::os::raw::c_int,
pub handles: *mut *mut ::std::os::raw::c_void,
pub ext: sftp_ext,
pub read_packet: sftp_packet,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sftp_packet_struct {
pub sftp: sftp_session,
pub type_: u8,
pub payload: ssh_buffer,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sftp_file_struct {
pub sftp: sftp_session,
pub name: *mut ::std::os::raw::c_char,
pub offset: u64,
pub handle: ssh_string,
pub eof: ::std::os::raw::c_int,
pub nonblocking: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sftp_dir_struct {
pub sftp: sftp_session,
pub name: *mut ::std::os::raw::c_char,
pub handle: ssh_string,
pub buffer: ssh_buffer,
pub count: u32,
pub eof: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sftp_message_struct {
pub sftp: sftp_session,
pub packet_type: u8,
pub payload: ssh_buffer,
pub id: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sftp_client_message_struct {
pub sftp: sftp_session,
pub type_: u8,
pub id: u32,
pub filename: *mut ::std::os::raw::c_char,
pub flags: u32,
pub attr: sftp_attributes,
pub handle: ssh_string,
pub offset: u64,
pub len: u32,
pub attr_num: ::std::os::raw::c_int,
pub attrbuf: ssh_buffer,
pub data: ssh_string,
pub complete_message: ssh_buffer,
pub str_data: *mut ::std::os::raw::c_char,
pub submessage: *mut ::std::os::raw::c_char,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sftp_request_queue_struct {
pub next: sftp_request_queue,
pub message: sftp_message,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sftp_status_message_struct {
pub id: u32,
pub status: u32,
pub error_unused: ssh_string,
pub lang_unused: ssh_string,
pub errormsg: *mut ::std::os::raw::c_char,
pub langmsg: *mut ::std::os::raw::c_char,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sftp_attributes_struct {
pub name: *mut ::std::os::raw::c_char,
pub longname: *mut ::std::os::raw::c_char,
pub flags: u32,
pub type_: u8,
pub size: u64,
pub uid: u32,
pub gid: u32,
pub owner: *mut ::std::os::raw::c_char,
pub group: *mut ::std::os::raw::c_char,
pub permissions: u32,
pub atime64: u64,
pub atime: u32,
pub atime_nseconds: u32,
pub createtime: u64,
pub createtime_nseconds: u32,
pub mtime64: u64,
pub mtime: u32,
pub mtime_nseconds: u32,
pub acl: ssh_string,
pub extended_count: u32,
pub extended_type: ssh_string,
pub extended_data: ssh_string,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sftp_statvfs_struct {
pub f_bsize: u64,
pub f_frsize: u64,
pub f_blocks: u64,
pub f_bfree: u64,
pub f_bavail: u64,
pub f_files: u64,
pub f_ffree: u64,
pub f_favail: u64,
pub f_fsid: u64,
pub f_flag: u64,
pub f_namemax: u64,
}
extern "C" {
pub fn sftp_new(session: ssh_session) -> sftp_session;
}
extern "C" {
pub fn sftp_new_channel(session: ssh_session, channel: ssh_channel) -> sftp_session;
}
extern "C" {
pub fn sftp_free(sftp: sftp_session);
}
extern "C" {
pub fn sftp_init(sftp: sftp_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_get_error(sftp: sftp_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_extensions_get_count(sftp: sftp_session) -> ::std::os::raw::c_uint;
}
extern "C" {
pub fn sftp_extensions_get_name(
sftp: sftp_session,
indexn: ::std::os::raw::c_uint,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn sftp_extensions_get_data(
sftp: sftp_session,
indexn: ::std::os::raw::c_uint,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn sftp_extension_supported(
sftp: sftp_session,
name: *const ::std::os::raw::c_char,
data: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_opendir(session: sftp_session, path: *const ::std::os::raw::c_char) -> sftp_dir;
}
extern "C" {
pub fn sftp_readdir(session: sftp_session, dir: sftp_dir) -> sftp_attributes;
}
extern "C" {
pub fn sftp_dir_eof(dir: sftp_dir) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_stat(session: sftp_session, path: *const ::std::os::raw::c_char)
-> sftp_attributes;
}
extern "C" {
pub fn sftp_lstat(
session: sftp_session,
path: *const ::std::os::raw::c_char,
) -> sftp_attributes;
}
extern "C" {
pub fn sftp_fstat(file: sftp_file) -> sftp_attributes;
}
extern "C" {
pub fn sftp_attributes_free(file: sftp_attributes);
}
extern "C" {
pub fn sftp_closedir(dir: sftp_dir) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_close(file: sftp_file) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_open(
session: sftp_session,
file: *const ::std::os::raw::c_char,
accesstype: ::std::os::raw::c_int,
mode: mode_t,
) -> sftp_file;
}
extern "C" {
pub fn sftp_file_set_nonblocking(handle: sftp_file);
}
extern "C" {
pub fn sftp_file_set_blocking(handle: sftp_file);
}
extern "C" {
pub fn sftp_read(file: sftp_file, buf: *mut ::std::os::raw::c_void, count: usize) -> isize;
}
extern "C" {
pub fn sftp_async_read_begin(file: sftp_file, len: u32) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_async_read(
file: sftp_file,
data: *mut ::std::os::raw::c_void,
len: u32,
id: u32,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_write(file: sftp_file, buf: *const ::std::os::raw::c_void, count: usize) -> isize;
}
extern "C" {
pub fn sftp_seek(file: sftp_file, new_offset: u32) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_seek64(file: sftp_file, new_offset: u64) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_tell(file: sftp_file) -> ::std::os::raw::c_ulong;
}
extern "C" {
pub fn sftp_tell64(file: sftp_file) -> u64;
}
extern "C" {
pub fn sftp_rewind(file: sftp_file);
}
extern "C" {
pub fn sftp_unlink(
sftp: sftp_session,
file: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_rmdir(
sftp: sftp_session,
directory: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_mkdir(
sftp: sftp_session,
directory: *const ::std::os::raw::c_char,
mode: mode_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_rename(
sftp: sftp_session,
original: *const ::std::os::raw::c_char,
newname: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_setstat(
sftp: sftp_session,
file: *const ::std::os::raw::c_char,
attr: sftp_attributes,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_chown(
sftp: sftp_session,
file: *const ::std::os::raw::c_char,
owner: uid_t,
group: gid_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_chmod(
sftp: sftp_session,
file: *const ::std::os::raw::c_char,
mode: mode_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_utimes(
sftp: sftp_session,
file: *const ::std::os::raw::c_char,
times: *const timeval,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_symlink(
sftp: sftp_session,
target: *const ::std::os::raw::c_char,
dest: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_readlink(
sftp: sftp_session,
path: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn sftp_statvfs(sftp: sftp_session, path: *const ::std::os::raw::c_char) -> sftp_statvfs_t;
}
extern "C" {
pub fn sftp_fstatvfs(file: sftp_file) -> sftp_statvfs_t;
}
extern "C" {
pub fn sftp_statvfs_free(statvfs_o: sftp_statvfs_t);
}
extern "C" {
pub fn sftp_fsync(file: sftp_file) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_canonicalize_path(
sftp: sftp_session,
path: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn sftp_server_version(sftp: sftp_session) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_get_client_message(sftp: sftp_session) -> sftp_client_message;
}
extern "C" {
pub fn sftp_client_message_free(msg: sftp_client_message);
}
extern "C" {
pub fn sftp_client_message_get_type(msg: sftp_client_message) -> u8;
}
extern "C" {
pub fn sftp_client_message_get_filename(
msg: sftp_client_message,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn sftp_client_message_set_filename(
msg: sftp_client_message,
newname: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn sftp_client_message_get_data(msg: sftp_client_message) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn sftp_client_message_get_flags(msg: sftp_client_message) -> u32;
}
extern "C" {
pub fn sftp_client_message_get_submessage(
msg: sftp_client_message,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn sftp_send_client_message(
sftp: sftp_session,
msg: sftp_client_message,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_reply_name(
msg: sftp_client_message,
name: *const ::std::os::raw::c_char,
attr: sftp_attributes,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_reply_handle(msg: sftp_client_message, handle: ssh_string)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_handle_alloc(sftp: sftp_session, info: *mut ::std::os::raw::c_void) -> ssh_string;
}
extern "C" {
pub fn sftp_reply_attr(
msg: sftp_client_message,
attr: sftp_attributes,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_handle(sftp: sftp_session, handle: ssh_string) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn sftp_reply_status(
msg: sftp_client_message,
status: u32,
message: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_reply_names_add(
msg: sftp_client_message,
file: *const ::std::os::raw::c_char,
longname: *const ::std::os::raw::c_char,
attr: sftp_attributes,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_reply_names(msg: sftp_client_message) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_reply_data(
msg: sftp_client_message,
data: *const ::std::os::raw::c_void,
len: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sftp_handle_remove(sftp: sftp_session, handle: *mut ::std::os::raw::c_void);
}
pub type __builtin_va_list = [__va_list_tag; 1usize];
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __va_list_tag {
pub gp_offset: ::std::os::raw::c_uint,
pub fp_offset: ::std::os::raw::c_uint,
pub overflow_arg_area: *mut ::std::os::raw::c_void,
pub reg_save_area: *mut ::std::os::raw::c_void,
}