1- /* automatically generated by rust-bindgen 0.65.1 */
1+ /* automatically generated by rust-bindgen 0.69.4 */
22
33#![ allow( non_snake_case) ]
44#![ allow( non_camel_case_types) ]
@@ -343,6 +343,7 @@ pub enum ssh_global_requests_e {
343343 SSH_GLOBAL_REQUEST_TCPIP_FORWARD = 1 ,
344344 SSH_GLOBAL_REQUEST_CANCEL_TCPIP_FORWARD = 2 ,
345345 SSH_GLOBAL_REQUEST_KEEPALIVE = 3 ,
346+ SSH_GLOBAL_REQUEST_NO_MORE_SESSIONS = 4 ,
346347}
347348#[ repr( i32 ) ]
348349#[ derive( Debug , Copy , Clone , Hash , PartialEq , Eq ) ]
@@ -399,6 +400,7 @@ pub type ssh_keytypes_e = ::std::os::raw::c_uint;
399400pub enum ssh_keycmp_e {
400401 SSH_KEY_CMP_PUBLIC = 0 ,
401402 SSH_KEY_CMP_PRIVATE = 1 ,
403+ SSH_KEY_CMP_CERTIFICATE = 2 ,
402404}
403405#[ repr( C ) ]
404406#[ derive( Debug , Copy , Clone ) ]
@@ -424,6 +426,15 @@ pub enum _bindgen_ty_10 {
424426}
425427#[ repr( u32 ) ]
426428#[ derive( Debug , Copy , Clone , Hash , PartialEq , Eq ) ]
429+ pub 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 ) ]
427438pub enum ssh_options_e {
428439 SSH_OPTIONS_HOST = 0 ,
429440 SSH_OPTIONS_PORT = 1 ,
@@ -468,6 +479,12 @@ pub enum ssh_options_e {
468479 SSH_OPTIONS_REKEY_TIME = 40 ,
469480 SSH_OPTIONS_RSA_MIN_SIZE = 41 ,
470481 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 ,
471488}
472489pub const SSH_SCP_WRITE : _bindgen_ty_11 = _bindgen_ty_11:: SSH_SCP_WRITE ;
473490pub const SSH_SCP_READ : _bindgen_ty_11 = _bindgen_ty_11:: SSH_SCP_READ ;
@@ -524,6 +541,14 @@ extern "C" {
524541extern "C" {
525542 pub fn ssh_channel_free ( channel : ssh_channel ) ;
526543}
544+ extern "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+ }
527552extern "C" {
528553 pub fn ssh_channel_get_exit_status ( channel : ssh_channel ) -> :: std:: os:: raw:: c_int ;
529554}
@@ -634,6 +659,16 @@ extern "C" {
634659 rows : :: std:: os:: raw:: c_int ,
635660 ) -> :: std:: os:: raw:: c_int ;
636661}
662+ extern "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+ }
637672extern "C" {
638673 pub fn ssh_channel_request_shell ( channel : ssh_channel ) -> :: std:: os:: raw:: c_int ;
639674}
@@ -801,6 +836,9 @@ extern "C" {
801836extern "C" {
802837 pub fn ssh_get_openssh_version ( session : ssh_session ) -> :: std:: os:: raw:: c_int ;
803838}
839+ extern "C" {
840+ pub fn ssh_request_no_more_sessions ( session : ssh_session ) -> :: std:: os:: raw:: c_int ;
841+ }
804842extern "C" {
805843 pub fn ssh_get_server_publickey (
806844 session : ssh_session ,
@@ -1137,6 +1175,13 @@ pub type ssh_auth_callback = ::std::option::Option<
11371175 userdata : * mut :: std:: os:: raw:: c_void ,
11381176 ) -> :: std:: os:: raw:: c_int ,
11391177> ;
1178+ #[ repr( u32 ) ]
1179+ #[ derive( Debug , Copy , Clone , Hash , PartialEq , Eq ) ]
1180+ pub enum ssh_file_format_e {
1181+ SSH_FILE_FORMAT_DEFAULT = 0 ,
1182+ SSH_FILE_FORMAT_OPENSSH = 1 ,
1183+ SSH_FILE_FORMAT_PEM = 2 ,
1184+ }
11401185extern "C" {
11411186 pub fn ssh_key_new ( ) -> ssh_key ;
11421187}
@@ -1189,6 +1234,16 @@ extern "C" {
11891234 b64_key : * mut * mut :: std:: os:: raw:: c_char ,
11901235 ) -> :: std:: os:: raw:: c_int ;
11911236}
1237+ extern "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+ }
11921247extern "C" {
11931248 pub fn ssh_pki_import_privkey_file (
11941249 filename : * const :: std:: os:: raw:: c_char ,
@@ -1207,6 +1262,16 @@ extern "C" {
12071262 filename : * const :: std:: os:: raw:: c_char ,
12081263 ) -> :: std:: os:: raw:: c_int ;
12091264}
1265+ extern "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+ }
12101275extern "C" {
12111276 pub fn ssh_pki_copy_cert_to_privkey (
12121277 cert_key : ssh_key ,
@@ -1751,6 +1816,16 @@ pub type ssh_channel_open_request_auth_agent_callback = ::std::option::Option<
17511816 userdata : * mut :: std:: os:: raw:: c_void ,
17521817 ) -> ssh_channel ,
17531818> ;
1819+ pub 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+ > ;
17541829#[ repr( C ) ]
17551830#[ derive( Debug , Copy , Clone ) ]
17561831pub struct ssh_callbacks_struct {
@@ -1764,6 +1839,8 @@ pub struct ssh_callbacks_struct {
17641839 pub global_request_function : ssh_global_request_callback ,
17651840 pub channel_open_request_x11_function : ssh_channel_open_request_x11_callback ,
17661841 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 ,
17671844}
17681845pub type ssh_callbacks = * mut ssh_callbacks_struct ;
17691846pub type ssh_auth_password_callback = :: std:: option:: Option <
@@ -2021,6 +2098,21 @@ pub type ssh_channel_write_wontblock_callback = ::std::option::Option<
20212098 userdata : * mut :: std:: os:: raw:: c_void ,
20222099 ) -> :: std:: os:: raw:: c_int ,
20232100> ;
2101+ pub 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+ > ;
2109+ pub 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+ > ;
20242116#[ repr( C ) ]
20252117#[ derive( Debug , Copy , Clone ) ]
20262118pub struct ssh_channel_callbacks_struct {
@@ -2041,6 +2133,8 @@ pub struct ssh_channel_callbacks_struct {
20412133 pub channel_env_request_function : ssh_channel_env_request_callback ,
20422134 pub channel_subsystem_request_function : ssh_channel_subsystem_request_callback ,
20432135 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 ,
20442138}
20452139pub type ssh_channel_callbacks = * mut ssh_channel_callbacks_struct ;
20462140extern "C" {
@@ -2096,6 +2190,32 @@ extern "C" {
20962190extern "C" {
20972191 pub fn ssh_get_log_callback ( ) -> ssh_logging_callback ;
20982192}
2193+ pub 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+ > ;
2199+ pub 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+ > ;
2205+ pub 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 ) ]
2213+ pub 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+ }
20992219#[ repr( u32 ) ]
21002220#[ derive( Debug , Copy , Clone , Hash , PartialEq , Eq ) ]
21012221pub enum ssh_bind_options_e {
@@ -2121,6 +2241,7 @@ pub enum ssh_bind_options_e {
21212241 SSH_BIND_OPTIONS_PROCESS_CONFIG = 19 ,
21222242 SSH_BIND_OPTIONS_MODULI = 20 ,
21232243 SSH_BIND_OPTIONS_RSA_MIN_SIZE = 21 ,
2244+ SSH_BIND_OPTIONS_IMPORT_KEY_STR = 22 ,
21242245}
21252246#[ repr( C ) ]
21262247#[ derive( Debug , Copy , Clone ) ]
@@ -2406,6 +2527,13 @@ pub type sftp_request_queue = *mut sftp_request_queue_struct;
24062527pub type sftp_session = * mut sftp_session_struct ;
24072528pub type sftp_status_message = * mut sftp_status_message_struct ;
24082529pub type sftp_statvfs_t = * mut sftp_statvfs_struct ;
2530+ pub type sftp_limits_t = * mut sftp_limits_struct ;
2531+ #[ repr( C ) ]
2532+ #[ derive( Debug , Copy , Clone ) ]
2533+ pub struct sftp_aio_struct {
2534+ _unused : [ u8 ; 0 ] ,
2535+ }
2536+ pub type sftp_aio = * mut sftp_aio_struct ;
24092537#[ repr( C ) ]
24102538#[ derive( Debug , Copy , Clone ) ]
24112539pub struct sftp_session_struct {
@@ -2420,6 +2548,7 @@ pub struct sftp_session_struct {
24202548 pub handles : * mut * mut :: std:: os:: raw:: c_void ,
24212549 pub ext : sftp_ext ,
24222550 pub read_packet : sftp_packet ,
2551+ pub limits : sftp_limits_t ,
24232552}
24242553#[ repr( C ) ]
24252554#[ derive( Debug , Copy , Clone ) ]
@@ -2532,6 +2661,14 @@ pub struct sftp_statvfs_struct {
25322661 pub f_flag : u64 ,
25332662 pub f_namemax : u64 ,
25342663}
2664+ #[ repr( C ) ]
2665+ #[ derive( Debug , Copy , Clone ) ]
2666+ pub 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+ }
25352672extern "C" {
25362673 pub fn sftp_new ( session : ssh_session ) -> sftp_session ;
25372674}
@@ -2631,6 +2768,30 @@ extern "C" {
26312768extern "C" {
26322769 pub fn sftp_write ( file : sftp_file , buf : * const :: std:: os:: raw:: c_void , count : usize ) -> isize ;
26332770}
2771+ extern "C" {
2772+ pub fn sftp_aio_free ( aio : sftp_aio ) ;
2773+ }
2774+ extern "C" {
2775+ pub fn sftp_aio_begin_read ( file : sftp_file , len : usize , aio : * mut sftp_aio ) -> isize ;
2776+ }
2777+ extern "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+ }
2784+ extern "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+ }
2792+ extern "C" {
2793+ pub fn sftp_aio_wait_write ( aio : * mut sftp_aio ) -> isize ;
2794+ }
26342795extern "C" {
26352796 pub fn sftp_seek ( file : sftp_file , new_offset : u32 ) -> :: std:: os:: raw:: c_int ;
26362797}
@@ -2679,6 +2840,13 @@ extern "C" {
26792840 attr : sftp_attributes ,
26802841 ) -> :: std:: os:: raw:: c_int ;
26812842}
2843+ extern "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+ }
26822850extern "C" {
26832851 pub fn sftp_chown (
26842852 sftp : sftp_session ,
@@ -2714,6 +2882,13 @@ extern "C" {
27142882 path : * const :: std:: os:: raw:: c_char ,
27152883 ) -> * mut :: std:: os:: raw:: c_char ;
27162884}
2885+ extern "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+ }
27172892extern "C" {
27182893 pub fn sftp_statvfs ( sftp : sftp_session , path : * const :: std:: os:: raw:: c_char ) -> sftp_statvfs_t ;
27192894}
@@ -2726,6 +2901,12 @@ extern "C" {
27262901extern "C" {
27272902 pub fn sftp_fsync ( file : sftp_file ) -> :: std:: os:: raw:: c_int ;
27282903}
2904+ extern "C" {
2905+ pub fn sftp_limits ( sftp : sftp_session ) -> sftp_limits_t ;
2906+ }
2907+ extern "C" {
2908+ pub fn sftp_limits_free ( limits : sftp_limits_t ) ;
2909+ }
27292910extern "C" {
27302911 pub fn sftp_canonicalize_path (
27312912 sftp : sftp_session ,
@@ -2735,6 +2916,18 @@ extern "C" {
27352916extern "C" {
27362917 pub fn sftp_server_version ( sftp : sftp_session ) -> :: std:: os:: raw:: c_int ;
27372918}
2919+ extern "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+ }
2925+ extern "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+ }
27382931extern "C" {
27392932 pub fn sftp_get_client_message ( sftp : sftp_session ) -> sftp_client_message ;
27402933}
0 commit comments