1
- /* automatically generated by rust-bindgen 0.65.1 */
1
+ /* automatically generated by rust-bindgen 0.69.4 */
2
2
3
3
#![ allow( non_snake_case) ]
4
4
#![ allow( non_camel_case_types) ]
@@ -343,6 +343,7 @@ pub enum ssh_global_requests_e {
343
343
SSH_GLOBAL_REQUEST_TCPIP_FORWARD = 1 ,
344
344
SSH_GLOBAL_REQUEST_CANCEL_TCPIP_FORWARD = 2 ,
345
345
SSH_GLOBAL_REQUEST_KEEPALIVE = 3 ,
346
+ SSH_GLOBAL_REQUEST_NO_MORE_SESSIONS = 4 ,
346
347
}
347
348
#[ repr( i32 ) ]
348
349
#[ derive( Debug , Copy , Clone , Hash , PartialEq , Eq ) ]
@@ -399,6 +400,7 @@ pub type ssh_keytypes_e = ::std::os::raw::c_uint;
399
400
pub enum ssh_keycmp_e {
400
401
SSH_KEY_CMP_PUBLIC = 0 ,
401
402
SSH_KEY_CMP_PRIVATE = 1 ,
403
+ SSH_KEY_CMP_CERTIFICATE = 2 ,
402
404
}
403
405
#[ repr( C ) ]
404
406
#[ derive( Debug , Copy , Clone ) ]
@@ -424,6 +426,15 @@ pub enum _bindgen_ty_10 {
424
426
}
425
427
#[ repr( u32 ) ]
426
428
#[ 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 ) ]
427
438
pub enum ssh_options_e {
428
439
SSH_OPTIONS_HOST = 0 ,
429
440
SSH_OPTIONS_PORT = 1 ,
@@ -468,6 +479,12 @@ pub enum ssh_options_e {
468
479
SSH_OPTIONS_REKEY_TIME = 40 ,
469
480
SSH_OPTIONS_RSA_MIN_SIZE = 41 ,
470
481
SSH_OPTIONS_IDENTITY_AGENT = 42 ,
482
+ SSH_OPTIONS_IDENTITIES_ONLY = 43 ,
483
+ SSH_OPTIONS_CONTROL_MASTER = 44 ,
484
+ SSH_OPTIONS_CONTROL_PATH = 45 ,
485
+ SSH_OPTIONS_CERTIFICATE = 46 ,
486
+ SSH_OPTIONS_PROXYJUMP = 47 ,
487
+ SSH_OPTIONS_PROXYJUMP_CB_LIST_APPEND = 48 ,
471
488
}
472
489
pub const SSH_SCP_WRITE : _bindgen_ty_11 = _bindgen_ty_11:: SSH_SCP_WRITE ;
473
490
pub const SSH_SCP_READ : _bindgen_ty_11 = _bindgen_ty_11:: SSH_SCP_READ ;
@@ -524,6 +541,14 @@ extern "C" {
524
541
extern "C" {
525
542
pub fn ssh_channel_free ( channel : ssh_channel ) ;
526
543
}
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
+ }
527
552
extern "C" {
528
553
pub fn ssh_channel_get_exit_status ( channel : ssh_channel ) -> :: std:: os:: raw:: c_int ;
529
554
}
@@ -634,6 +659,16 @@ extern "C" {
634
659
rows : :: std:: os:: raw:: c_int ,
635
660
) -> :: std:: os:: raw:: c_int ;
636
661
}
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
+ }
637
672
extern "C" {
638
673
pub fn ssh_channel_request_shell ( channel : ssh_channel ) -> :: std:: os:: raw:: c_int ;
639
674
}
@@ -801,6 +836,9 @@ extern "C" {
801
836
extern "C" {
802
837
pub fn ssh_get_openssh_version ( session : ssh_session ) -> :: std:: os:: raw:: c_int ;
803
838
}
839
+ extern "C" {
840
+ pub fn ssh_request_no_more_sessions ( session : ssh_session ) -> :: std:: os:: raw:: c_int ;
841
+ }
804
842
extern "C" {
805
843
pub fn ssh_get_server_publickey (
806
844
session : ssh_session ,
@@ -1137,6 +1175,13 @@ pub type ssh_auth_callback = ::std::option::Option<
1137
1175
userdata : * mut :: std:: os:: raw:: c_void ,
1138
1176
) -> :: std:: os:: raw:: c_int ,
1139
1177
> ;
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
+ }
1140
1185
extern "C" {
1141
1186
pub fn ssh_key_new ( ) -> ssh_key ;
1142
1187
}
@@ -1189,6 +1234,16 @@ extern "C" {
1189
1234
b64_key : * mut * mut :: std:: os:: raw:: c_char ,
1190
1235
) -> :: std:: os:: raw:: c_int ;
1191
1236
}
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
+ }
1192
1247
extern "C" {
1193
1248
pub fn ssh_pki_import_privkey_file (
1194
1249
filename : * const :: std:: os:: raw:: c_char ,
@@ -1207,6 +1262,16 @@ extern "C" {
1207
1262
filename : * const :: std:: os:: raw:: c_char ,
1208
1263
) -> :: std:: os:: raw:: c_int ;
1209
1264
}
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
+ }
1210
1275
extern "C" {
1211
1276
pub fn ssh_pki_copy_cert_to_privkey (
1212
1277
cert_key : ssh_key ,
@@ -1751,6 +1816,16 @@ pub type ssh_channel_open_request_auth_agent_callback = ::std::option::Option<
1751
1816
userdata : * mut :: std:: os:: raw:: c_void ,
1752
1817
) -> ssh_channel ,
1753
1818
> ;
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
+ > ;
1754
1829
#[ repr( C ) ]
1755
1830
#[ derive( Debug , Copy , Clone ) ]
1756
1831
pub struct ssh_callbacks_struct {
@@ -1764,6 +1839,8 @@ pub struct ssh_callbacks_struct {
1764
1839
pub global_request_function : ssh_global_request_callback ,
1765
1840
pub channel_open_request_x11_function : ssh_channel_open_request_x11_callback ,
1766
1841
pub channel_open_request_auth_agent_function : ssh_channel_open_request_auth_agent_callback ,
1842
+ pub channel_open_request_forwarded_tcpip_function :
1843
+ ssh_channel_open_request_forwarded_tcpip_callback ,
1767
1844
}
1768
1845
pub type ssh_callbacks = * mut ssh_callbacks_struct ;
1769
1846
pub type ssh_auth_password_callback = :: std:: option:: Option <
@@ -2021,6 +2098,21 @@ pub type ssh_channel_write_wontblock_callback = ::std::option::Option<
2021
2098
userdata : * mut :: std:: os:: raw:: c_void ,
2022
2099
) -> :: std:: os:: raw:: c_int ,
2023
2100
> ;
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
+ > ;
2024
2116
#[ repr( C ) ]
2025
2117
#[ derive( Debug , Copy , Clone ) ]
2026
2118
pub struct ssh_channel_callbacks_struct {
@@ -2041,6 +2133,8 @@ pub struct ssh_channel_callbacks_struct {
2041
2133
pub channel_env_request_function : ssh_channel_env_request_callback ,
2042
2134
pub channel_subsystem_request_function : ssh_channel_subsystem_request_callback ,
2043
2135
pub channel_write_wontblock_function : ssh_channel_write_wontblock_callback ,
2136
+ pub channel_open_response_function : ssh_channel_open_resp_callback ,
2137
+ pub channel_request_response_function : ssh_channel_request_resp_callback ,
2044
2138
}
2045
2139
pub type ssh_channel_callbacks = * mut ssh_channel_callbacks_struct ;
2046
2140
extern "C" {
@@ -2096,6 +2190,32 @@ extern "C" {
2096
2190
extern "C" {
2097
2191
pub fn ssh_get_log_callback ( ) -> ssh_logging_callback ;
2098
2192
}
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
+ }
2099
2219
#[ repr( u32 ) ]
2100
2220
#[ derive( Debug , Copy , Clone , Hash , PartialEq , Eq ) ]
2101
2221
pub enum ssh_bind_options_e {
@@ -2121,6 +2241,7 @@ pub enum ssh_bind_options_e {
2121
2241
SSH_BIND_OPTIONS_PROCESS_CONFIG = 19 ,
2122
2242
SSH_BIND_OPTIONS_MODULI = 20 ,
2123
2243
SSH_BIND_OPTIONS_RSA_MIN_SIZE = 21 ,
2244
+ SSH_BIND_OPTIONS_IMPORT_KEY_STR = 22 ,
2124
2245
}
2125
2246
#[ repr( C ) ]
2126
2247
#[ derive( Debug , Copy , Clone ) ]
@@ -2406,6 +2527,13 @@ pub type sftp_request_queue = *mut sftp_request_queue_struct;
2406
2527
pub type sftp_session = * mut sftp_session_struct ;
2407
2528
pub type sftp_status_message = * mut sftp_status_message_struct ;
2408
2529
pub 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 ;
2409
2537
#[ repr( C ) ]
2410
2538
#[ derive( Debug , Copy , Clone ) ]
2411
2539
pub struct sftp_session_struct {
@@ -2420,6 +2548,7 @@ pub struct sftp_session_struct {
2420
2548
pub handles : * mut * mut :: std:: os:: raw:: c_void ,
2421
2549
pub ext : sftp_ext ,
2422
2550
pub read_packet : sftp_packet ,
2551
+ pub limits : sftp_limits_t ,
2423
2552
}
2424
2553
#[ repr( C ) ]
2425
2554
#[ derive( Debug , Copy , Clone ) ]
@@ -2532,6 +2661,14 @@ pub struct sftp_statvfs_struct {
2532
2661
pub f_flag : u64 ,
2533
2662
pub f_namemax : u64 ,
2534
2663
}
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
+ }
2535
2672
extern "C" {
2536
2673
pub fn sftp_new ( session : ssh_session ) -> sftp_session ;
2537
2674
}
@@ -2631,6 +2768,30 @@ extern "C" {
2631
2768
extern "C" {
2632
2769
pub fn sftp_write ( file : sftp_file , buf : * const :: std:: os:: raw:: c_void , count : usize ) -> isize ;
2633
2770
}
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
+ }
2634
2795
extern "C" {
2635
2796
pub fn sftp_seek ( file : sftp_file , new_offset : u32 ) -> :: std:: os:: raw:: c_int ;
2636
2797
}
@@ -2679,6 +2840,13 @@ extern "C" {
2679
2840
attr : sftp_attributes ,
2680
2841
) -> :: std:: os:: raw:: c_int ;
2681
2842
}
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
+ }
2682
2850
extern "C" {
2683
2851
pub fn sftp_chown (
2684
2852
sftp : sftp_session ,
@@ -2714,6 +2882,13 @@ extern "C" {
2714
2882
path : * const :: std:: os:: raw:: c_char ,
2715
2883
) -> * mut :: std:: os:: raw:: c_char ;
2716
2884
}
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
+ }
2717
2892
extern "C" {
2718
2893
pub fn sftp_statvfs ( sftp : sftp_session , path : * const :: std:: os:: raw:: c_char ) -> sftp_statvfs_t ;
2719
2894
}
@@ -2726,6 +2901,12 @@ extern "C" {
2726
2901
extern "C" {
2727
2902
pub fn sftp_fsync ( file : sftp_file ) -> :: std:: os:: raw:: c_int ;
2728
2903
}
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
+ }
2729
2910
extern "C" {
2730
2911
pub fn sftp_canonicalize_path (
2731
2912
sftp : sftp_session ,
@@ -2735,6 +2916,18 @@ extern "C" {
2735
2916
extern "C" {
2736
2917
pub fn sftp_server_version ( sftp : sftp_session ) -> :: std:: os:: raw:: c_int ;
2737
2918
}
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
+ }
2738
2931
extern "C" {
2739
2932
pub fn sftp_get_client_message ( sftp : sftp_session ) -> sftp_client_message ;
2740
2933
}
0 commit comments