1
2
3
/* automatically generated by rust-bindgen */

# [ repr ( C ) ] # [ derive ( Default ) ] pub struct __IncompleteArrayField < T > ( :: std :: marker :: PhantomData < T > , [ T ; 0 ] ) ; impl < T > __IncompleteArrayField < T > { # [ inline ] pub const fn new ( ) -> Self { __IncompleteArrayField ( :: std :: marker :: PhantomData , [ ] ) } # [ inline ] pub fn as_ptr ( & self ) -> * const T { self as * const _ as * const T } # [ inline ] pub fn as_mut_ptr ( & mut self ) -> * mut T { self as * mut _ as * mut T } # [ inline ] pub unsafe fn as_slice ( & self , len : usize ) -> & [ T ] { :: std :: slice :: from_raw_parts ( self . as_ptr ( ) , len ) } # [ inline ] pub unsafe fn as_mut_slice ( & mut self , len : usize ) -> & mut [ T ] { :: std :: slice :: from_raw_parts_mut ( self . as_mut_ptr ( ) , len ) } } impl < T > :: std :: fmt :: Debug for __IncompleteArrayField < T > { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . write_str ( "__IncompleteArrayField" ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; pub const __GLIBC_USE_ISOC2X : u32 = 0 ; pub const __USE_ISOC11 : u32 = 1 ; pub const __USE_ISOC99 : u32 = 1 ; pub const __USE_ISOC95 : u32 = 1 ; pub const __USE_POSIX_IMPLICITLY : u32 = 1 ; pub const _POSIX_SOURCE : u32 = 1 ; pub const _POSIX_C_SOURCE : u32 = 200809 ; pub const __USE_POSIX : u32 = 1 ; pub const __USE_POSIX2 : u32 = 1 ; pub const __USE_POSIX199309 : u32 = 1 ; pub const __USE_POSIX199506 : u32 = 1 ; pub const __USE_XOPEN2K : u32 = 1 ; pub const __USE_XOPEN2K8 : u32 = 1 ; pub const _ATFILE_SOURCE : u32 = 1 ; pub const __USE_MISC : u32 = 1 ; pub const __USE_ATFILE : u32 = 1 ; pub const __USE_FORTIFY_LEVEL : u32 = 0 ; pub const __GLIBC_USE_DEPRECATED_GETS : u32 = 0 ; pub const __GLIBC_USE_DEPRECATED_SCANF : u32 = 0 ; pub const _STDC_PREDEF_H : u32 = 1 ; pub const __STDC_IEC_559__ : u32 = 1 ; pub const __STDC_IEC_559_COMPLEX__ : u32 = 1 ; pub const __STDC_ISO_10646__ : u32 = 201706 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 31 ; pub const _SYS_CDEFS_H : u32 = 1 ; pub const __glibc_c99_flexarr_available : u32 = 1 ; pub const __WORDSIZE : u32 = 64 ; pub const __WORDSIZE_TIME64_COMPAT32 : u32 = 1 ; pub const __SYSCALL_WORDSIZE : u32 = 64 ; pub const __LONG_DOUBLE_USES_FLOAT128 : u32 = 0 ; pub const __HAVE_GENERIC_SELECTION : u32 = 1 ; pub const __GLIBC_USE_LIB_EXT2 : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_BFP_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; pub const __TIMESIZE : u32 = 64 ; pub const _BITS_TYPESIZES_H : u32 = 1 ; pub const __OFF_T_MATCHES_OFF64_T : u32 = 1 ; pub const __INO_T_MATCHES_INO64_T : u32 = 1 ; pub const __RLIM_T_MATCHES_RLIM64_T : u32 = 1 ; pub const __STATFS_MATCHES_STATFS64 : u32 = 1 ; pub const __FD_SETSIZE : u32 = 1024 ; pub const _BITS_TIME64_H : u32 = 1 ; pub const _BITS_WCHAR_H : u32 = 1 ; pub const _BITS_STDINT_INTN_H : u32 = 1 ; pub const _BITS_STDINT_UINTN_H : u32 = 1 ; pub const INT8_MIN : i32 = - 128 ; pub const INT16_MIN : i32 = - 32768 ; pub const INT32_MIN : i32 = - 2147483648 ; pub const INT8_MAX : u32 = 127 ; pub const INT16_MAX : u32 = 32767 ; pub const INT32_MAX : u32 = 2147483647 ; pub const UINT8_MAX : u32 = 255 ; pub const UINT16_MAX : u32 = 65535 ; pub const UINT32_MAX : u32 = 4294967295 ; pub const INT_LEAST8_MIN : i32 = - 128 ; pub const INT_LEAST16_MIN : i32 = - 32768 ; pub const INT_LEAST32_MIN : i32 = - 2147483648 ; pub const INT_LEAST8_MAX : u32 = 127 ; pub const INT_LEAST16_MAX : u32 = 32767 ; pub const INT_LEAST32_MAX : u32 = 2147483647 ; pub const UINT_LEAST8_MAX : u32 = 255 ; pub const UINT_LEAST16_MAX : u32 = 65535 ; pub const UINT_LEAST32_MAX : u32 = 4294967295 ; pub const INT_FAST8_MIN : i32 = - 128 ; pub const INT_FAST16_MIN : i64 = - 9223372036854775808 ; pub const INT_FAST32_MIN : i64 = - 9223372036854775808 ; pub const INT_FAST8_MAX : u32 = 127 ; pub const INT_FAST16_MAX : u64 = 9223372036854775807 ; pub const INT_FAST32_MAX : u64 = 9223372036854775807 ; pub const UINT_FAST8_MAX : u32 = 255 ; pub const UINT_FAST16_MAX : i32 = - 1 ; pub const UINT_FAST32_MAX : i32 = - 1 ; pub const INTPTR_MIN : i64 = - 9223372036854775808 ; pub const INTPTR_MAX : u64 = 9223372036854775807 ; pub const UINTPTR_MAX : i32 = - 1 ; pub const PTRDIFF_MIN : i64 = - 9223372036854775808 ; pub const PTRDIFF_MAX : u64 = 9223372036854775807 ; pub const SIG_ATOMIC_MIN : i32 = - 2147483648 ; pub const SIG_ATOMIC_MAX : u32 = 2147483647 ; pub const SIZE_MAX : i32 = - 1 ; pub const WINT_MIN : u32 = 0 ; pub const WINT_MAX : u32 = 4294967295 ; pub const CRYPT_LOG_NORMAL : u32 = 0 ; pub const CRYPT_LOG_ERROR : u32 = 1 ; pub const CRYPT_LOG_VERBOSE : u32 = 2 ; pub const CRYPT_LOG_DEBUG : i32 = - 1 ; pub const CRYPT_LOG_DEBUG_JSON : i32 = - 2 ; pub const CRYPT_RNG_URANDOM : u32 = 0 ; pub const CRYPT_RNG_RANDOM : u32 = 1 ; pub const CRYPT_PBKDF_ITER_TIME_SET : u32 = 1 ; pub const CRYPT_PBKDF_NO_BENCHMARK : u32 = 2 ; pub const CRYPT_KDF_PBKDF2 : & 'static [ u8 ; 7usize ] = b"pbkdf2\0" ; pub const CRYPT_KDF_ARGON2I : & 'static [ u8 ; 8usize ] = b"argon2i\0" ; pub const CRYPT_KDF_ARGON2ID : & 'static [ u8 ; 9usize ] = b"argon2id\0" ; pub const CRYPT_PLAIN : & 'static [ u8 ; 6usize ] = b"PLAIN\0" ; pub const CRYPT_LUKS1 : & 'static [ u8 ; 6usize ] = b"LUKS1\0" ; pub const CRYPT_LUKS2 : & 'static [ u8 ; 6usize ] = b"LUKS2\0" ; pub const CRYPT_LOOPAES : & 'static [ u8 ; 8usize ] = b"LOOPAES\0" ; pub const CRYPT_VERITY : & 'static [ u8 ; 7usize ] = b"VERITY\0" ; pub const CRYPT_TCRYPT : & 'static [ u8 ; 7usize ] = b"TCRYPT\0" ; pub const CRYPT_INTEGRITY : & 'static [ u8 ; 10usize ] = b"INTEGRITY\0" ; pub const CRYPT_VERITY_NO_HEADER : u32 = 1 ; pub const CRYPT_VERITY_CHECK_HASH : u32 = 2 ; pub const CRYPT_VERITY_CREATE_HASH : u32 = 4 ; pub const CRYPT_TCRYPT_LEGACY_MODES : u32 = 1 ; pub const CRYPT_TCRYPT_HIDDEN_HEADER : u32 = 2 ; pub const CRYPT_TCRYPT_BACKUP_HEADER : u32 = 4 ; pub const CRYPT_TCRYPT_SYSTEM_HEADER : u32 = 8 ; pub const CRYPT_TCRYPT_VERA_MODES : u32 = 16 ; pub const CRYPT_ANY_SLOT : i32 = - 1 ; pub const CRYPT_VOLUME_KEY_NO_SEGMENT : u32 = 1 ; pub const CRYPT_VOLUME_KEY_SET : u32 = 2 ; pub const CRYPT_VOLUME_KEY_DIGEST_REUSE : u32 = 4 ; pub const CRYPT_ACTIVATE_READONLY : u32 = 1 ; pub const CRYPT_ACTIVATE_NO_UUID : u32 = 2 ; pub const CRYPT_ACTIVATE_SHARED : u32 = 4 ; pub const CRYPT_ACTIVATE_ALLOW_DISCARDS : u32 = 8 ; pub const CRYPT_ACTIVATE_PRIVATE : u32 = 16 ; pub const CRYPT_ACTIVATE_CORRUPTED : u32 = 32 ; pub const CRYPT_ACTIVATE_SAME_CPU_CRYPT : u32 = 64 ; pub const CRYPT_ACTIVATE_SUBMIT_FROM_CRYPT_CPUS : u32 = 128 ; pub const CRYPT_ACTIVATE_IGNORE_CORRUPTION : u32 = 256 ; pub const CRYPT_ACTIVATE_RESTART_ON_CORRUPTION : u32 = 512 ; pub const CRYPT_ACTIVATE_IGNORE_ZERO_BLOCKS : u32 = 1024 ; pub const CRYPT_ACTIVATE_KEYRING_KEY : u32 = 2048 ; pub const CRYPT_ACTIVATE_NO_JOURNAL : u32 = 4096 ; pub const CRYPT_ACTIVATE_RECOVERY : u32 = 8192 ; pub const CRYPT_ACTIVATE_IGNORE_PERSISTENT : u32 = 16384 ; pub const CRYPT_ACTIVATE_CHECK_AT_MOST_ONCE : u32 = 32768 ; pub const CRYPT_ACTIVATE_ALLOW_UNBOUND_KEY : u32 = 65536 ; pub const CRYPT_ACTIVATE_RECALCULATE : u32 = 131072 ; pub const CRYPT_ACTIVATE_REFRESH : u32 = 262144 ; pub const CRYPT_ACTIVATE_SERIALIZE_MEMORY_HARD_PBKDF : u32 = 524288 ; pub const CRYPT_ACTIVATE_NO_JOURNAL_BITMAP : u32 = 1048576 ; pub const CRYPT_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; pub const CRYPT_REQUIREMENT_ONLINE_REENCRYPT : u32 = 2 ; pub const CRYPT_REQUIREMENT_UNKNOWN : u32 = 2147483648 ; pub const CRYPT_DEACTIVATE_DEFERRED : u32 = 1 ; pub const CRYPT_DEACTIVATE_FORCE : u32 = 2 ; pub const CRYPT_DEBUG_ALL : i32 = - 1 ; pub const CRYPT_DEBUG_JSON : i32 = - 2 ; pub const CRYPT_DEBUG_NONE : u32 = 0 ; pub const CRYPT_KEYFILE_STOP_EOL : u32 = 1 ; pub const CRYPT_WIPE_NO_DIRECT_IO : u32 = 1 ; pub const CRYPT_ANY_TOKEN : i32 = - 1 ; pub const CRYPT_REENCRYPT_INITIALIZE_ONLY : u32 = 1 ; pub const CRYPT_REENCRYPT_MOVE_FIRST_SEGMENT : u32 = 2 ; pub const CRYPT_REENCRYPT_RESUME_ONLY : u32 = 4 ; pub const CRYPT_REENCRYPT_RECOVERY : u32 = 8 ; pub type wchar_t = :: std :: os :: raw :: c_int ; # [ repr ( C ) ] # [ repr ( align ( 16 ) ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct max_align_t { pub __clang_max_align_nonce1 : :: std :: os :: raw :: c_longlong , pub __bindgen_padding_0 : u64 , pub __clang_max_align_nonce2 : u128 , } # [ test ] fn bindgen_test_layout_max_align_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < max_align_t > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( max_align_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < max_align_t > ( ) , 16usize , concat ! ( "Alignment of " , stringify ! ( max_align_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < max_align_t > ( ) ) ) . __clang_max_align_nonce1 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( max_align_t ) , "::" , stringify ! ( __clang_max_align_nonce1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < max_align_t > ( ) ) ) . __clang_max_align_nonce2 as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( max_align_t ) , "::" , stringify ! ( __clang_max_align_nonce2 ) ) ) ; } pub type __u_char = :: std :: os :: raw :: c_uchar ; pub type __u_short = :: std :: os :: raw :: c_ushort ; pub type __u_int = :: std :: os :: raw :: c_uint ; pub type __u_long = :: std :: os :: raw :: c_ulong ; pub type __int8_t = :: std :: os :: raw :: c_schar ; pub type __uint8_t = :: std :: os :: raw :: c_uchar ; pub type __int16_t = :: std :: os :: raw :: c_short ; pub type __uint16_t = :: std :: os :: raw :: c_ushort ; pub type __int32_t = :: std :: os :: raw :: c_int ; pub type __uint32_t = :: std :: os :: raw :: c_uint ; pub type __int64_t = :: std :: os :: raw :: c_long ; pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __int_least8_t = __int8_t ; pub type __uint_least8_t = __uint8_t ; pub type __int_least16_t = __int16_t ; pub type __uint_least16_t = __uint16_t ; pub type __int_least32_t = __int32_t ; pub type __uint_least32_t = __uint32_t ; pub type __int_least64_t = __int64_t ; pub type __uint_least64_t = __uint64_t ; pub type __quad_t = :: std :: os :: raw :: c_long ; pub type __u_quad_t = :: std :: os :: raw :: c_ulong ; pub type __intmax_t = :: std :: os :: raw :: c_long ; pub type __uintmax_t = :: std :: os :: raw :: c_ulong ; pub type __dev_t = :: std :: os :: raw :: c_ulong ; pub type __uid_t = :: std :: os :: raw :: c_uint ; pub type __gid_t = :: std :: os :: raw :: c_uint ; pub type __ino_t = :: std :: os :: raw :: c_ulong ; pub type __ino64_t = :: std :: os :: raw :: c_ulong ; pub type __mode_t = :: std :: os :: raw :: c_uint ; pub type __nlink_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __pid_t = :: std :: os :: raw :: c_int ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __fsid_t { pub __val : [ :: std :: os :: raw :: c_int ; 2usize ] , } # [ test ] fn bindgen_test_layout___fsid_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < __fsid_t > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( __fsid_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < __fsid_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( __fsid_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __fsid_t > ( ) ) ) . __val as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __fsid_t ) , "::" , stringify ! ( __val ) ) ) ; } pub type __clock_t = :: std :: os :: raw :: c_long ; pub type __rlim_t = :: std :: os :: raw :: c_ulong ; pub type __rlim64_t = :: std :: os :: raw :: c_ulong ; pub type __id_t = :: std :: os :: raw :: c_uint ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type __useconds_t = :: std :: os :: raw :: c_uint ; pub type __suseconds_t = :: std :: os :: raw :: c_long ; pub type __daddr_t = :: std :: os :: raw :: c_int ; pub type __key_t = :: std :: os :: raw :: c_int ; pub type __clockid_t = :: std :: os :: raw :: c_int ; pub type __timer_t = * mut :: std :: os :: raw :: c_void ; pub type __blksize_t = :: std :: os :: raw :: c_long ; pub type __blkcnt_t = :: std :: os :: raw :: c_long ; pub type __blkcnt64_t = :: std :: os :: raw :: c_long ; pub type __fsblkcnt_t = :: std :: os :: raw :: c_ulong ; pub type __fsblkcnt64_t = :: std :: os :: raw :: c_ulong ; pub type __fsfilcnt_t = :: std :: os :: raw :: c_ulong ; pub type __fsfilcnt64_t = :: std :: os :: raw :: c_ulong ; pub type __fsword_t = :: std :: os :: raw :: c_long ; pub type __ssize_t = :: std :: os :: raw :: c_long ; pub type __syscall_slong_t = :: std :: os :: raw :: c_long ; pub type __syscall_ulong_t = :: std :: os :: raw :: c_ulong ; pub type __loff_t = __off64_t ; pub type __caddr_t = * mut :: std :: os :: raw :: c_char ; pub type __intptr_t = :: std :: os :: raw :: c_long ; pub type __socklen_t = :: std :: os :: raw :: c_uint ; pub type __sig_atomic_t = :: std :: os :: raw :: c_int ; pub type int_least8_t = __int_least8_t ; pub type int_least16_t = __int_least16_t ; pub type int_least32_t = __int_least32_t ; pub type int_least64_t = __int_least64_t ; pub type uint_least8_t = __uint_least8_t ; pub type uint_least16_t = __uint_least16_t ; pub type uint_least32_t = __uint_least32_t ; pub type uint_least64_t = __uint_least64_t ; pub type int_fast8_t = :: std :: os :: raw :: c_schar ; pub type int_fast16_t = :: std :: os :: raw :: c_long ; pub type int_fast32_t = :: std :: os :: raw :: c_long ; pub type int_fast64_t = :: std :: os :: raw :: c_long ; pub type uint_fast8_t = :: std :: os :: raw :: c_uchar ; pub type uint_fast16_t = :: std :: os :: raw :: c_ulong ; pub type uint_fast32_t = :: std :: os :: raw :: c_ulong ; pub type uint_fast64_t = :: std :: os :: raw :: c_ulong ; pub type intmax_t = __intmax_t ; pub type uintmax_t = __uintmax_t ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct crypt_device { _unused : [ u8 ; 0 ] , } extern "C" { pub fn crypt_init ( cd : * mut * mut crypt_device , device : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_init_data_device ( cd : * mut * mut crypt_device , device : * const :: std :: os :: raw :: c_char , data_device : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_init_by_name_and_header ( cd : * mut * mut crypt_device , name : * const :: std :: os :: raw :: c_char , header_device : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_init_by_name ( cd : * mut * mut crypt_device , name : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_free ( cd : * mut crypt_device ) ; } extern "C" { pub fn crypt_set_confirm_callback ( cd : * mut crypt_device , confirm : :: std :: option :: Option < unsafe extern "C" fn ( msg : * const :: std :: os :: raw :: c_char , usrptr : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > , usrptr : * mut :: std :: os :: raw :: c_void ) ; } extern "C" { pub fn crypt_set_data_device ( cd : * mut crypt_device , device : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_set_data_offset ( cd : * mut crypt_device , data_offset : u64 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_set_log_callback ( cd : * mut crypt_device , log : :: std :: option :: Option < unsafe extern "C" fn ( level : :: std :: os :: raw :: c_int , msg : * const :: std :: os :: raw :: c_char , usrptr : * mut :: std :: os :: raw :: c_void ) > , usrptr : * mut :: std :: os :: raw :: c_void ) ; } extern "C" { pub fn crypt_log ( cd : * mut crypt_device , level : :: std :: os :: raw :: c_int , msg : * const :: std :: os :: raw :: c_char ) ; } extern "C" { pub fn crypt_set_rng_type ( cd : * mut crypt_device , rng_type : :: std :: os :: raw :: c_int ) ; } extern "C" { pub fn crypt_get_rng_type ( cd : * mut crypt_device ) -> :: std :: os :: raw :: c_int ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct crypt_pbkdf_type { pub type_ : * const :: std :: os :: raw :: c_char , pub hash : * const :: std :: os :: raw :: c_char , pub time_ms : u32 , pub iterations : u32 , pub max_memory_kb : u32 , pub parallel_threads : u32 , pub flags : u32 , } # [ test ] fn bindgen_test_layout_crypt_pbkdf_type ( ) { assert_eq ! ( :: std :: mem :: size_of :: < crypt_pbkdf_type > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( crypt_pbkdf_type ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < crypt_pbkdf_type > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( crypt_pbkdf_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_pbkdf_type > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( crypt_pbkdf_type ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_pbkdf_type > ( ) ) ) . hash as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( crypt_pbkdf_type ) , "::" , stringify ! ( hash ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_pbkdf_type > ( ) ) ) . time_ms as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( crypt_pbkdf_type ) , "::" , stringify ! ( time_ms ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_pbkdf_type > ( ) ) ) . iterations as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( crypt_pbkdf_type ) , "::" , stringify ! ( iterations ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_pbkdf_type > ( ) ) ) . max_memory_kb as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( crypt_pbkdf_type ) , "::" , stringify ! ( max_memory_kb ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_pbkdf_type > ( ) ) ) . parallel_threads as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( crypt_pbkdf_type ) , "::" , stringify ! ( parallel_threads ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_pbkdf_type > ( ) ) ) . flags as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( crypt_pbkdf_type ) , "::" , stringify ! ( flags ) ) ) ; } extern "C" { pub fn crypt_set_pbkdf_type ( cd : * mut crypt_device , pbkdf : * const crypt_pbkdf_type ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_get_pbkdf_type_params ( pbkdf_type : * const :: std :: os :: raw :: c_char ) -> * const crypt_pbkdf_type ; } extern "C" { pub fn crypt_get_pbkdf_default ( type_ : * const :: std :: os :: raw :: c_char ) -> * const crypt_pbkdf_type ; } extern "C" { pub fn crypt_get_pbkdf_type ( cd : * mut crypt_device ) -> * const crypt_pbkdf_type ; } extern "C" { pub fn crypt_set_iteration_time ( cd : * mut crypt_device , iteration_time_ms : u64 ) ; } extern "C" { pub fn crypt_memory_lock ( cd : * mut crypt_device , lock : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_metadata_locking ( cd : * mut crypt_device , enable : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_set_metadata_size ( cd : * mut crypt_device , metadata_size : u64 , keyslots_size : u64 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_get_metadata_size ( cd : * mut crypt_device , metadata_size : * mut u64 , keyslots_size : * mut u64 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_get_type ( cd : * mut crypt_device ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn crypt_get_default_type ( ) -> * const :: std :: os :: raw :: c_char ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct crypt_params_plain { pub hash : * const :: std :: os :: raw :: c_char , pub offset : u64 , pub skip : u64 , pub size : u64 , pub sector_size : u32 , } # [ test ] fn bindgen_test_layout_crypt_params_plain ( ) { assert_eq ! ( :: std :: mem :: size_of :: < crypt_params_plain > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( crypt_params_plain ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < crypt_params_plain > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( crypt_params_plain ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_plain > ( ) ) ) . hash as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_plain ) , "::" , stringify ! ( hash ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_plain > ( ) ) ) . offset as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_plain ) , "::" , stringify ! ( offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_plain > ( ) ) ) . skip as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_plain ) , "::" , stringify ! ( skip ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_plain > ( ) ) ) . size as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_plain ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_plain > ( ) ) ) . sector_size as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_plain ) , "::" , stringify ! ( sector_size ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct crypt_params_luks1 { pub hash : * const :: std :: os :: raw :: c_char , pub data_alignment : usize , pub data_device : * const :: std :: os :: raw :: c_char , } # [ test ] fn bindgen_test_layout_crypt_params_luks1 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < crypt_params_luks1 > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( crypt_params_luks1 ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < crypt_params_luks1 > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( crypt_params_luks1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_luks1 > ( ) ) ) . hash as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_luks1 ) , "::" , stringify ! ( hash ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_luks1 > ( ) ) ) . data_alignment as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_luks1 ) , "::" , stringify ! ( data_alignment ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_luks1 > ( ) ) ) . data_device as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_luks1 ) , "::" , stringify ! ( data_device ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct crypt_params_loopaes { pub hash : * const :: std :: os :: raw :: c_char , pub offset : u64 , pub skip : u64 , } # [ test ] fn bindgen_test_layout_crypt_params_loopaes ( ) { assert_eq ! ( :: std :: mem :: size_of :: < crypt_params_loopaes > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( crypt_params_loopaes ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < crypt_params_loopaes > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( crypt_params_loopaes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_loopaes > ( ) ) ) . hash as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_loopaes ) , "::" , stringify ! ( hash ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_loopaes > ( ) ) ) . offset as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_loopaes ) , "::" , stringify ! ( offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_loopaes > ( ) ) ) . skip as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_loopaes ) , "::" , stringify ! ( skip ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct crypt_params_verity { pub hash_name : * const :: std :: os :: raw :: c_char , pub data_device : * const :: std :: os :: raw :: c_char , pub hash_device : * const :: std :: os :: raw :: c_char , pub fec_device : * const :: std :: os :: raw :: c_char , pub salt : * const :: std :: os :: raw :: c_char , pub salt_size : u32 , pub hash_type : u32 , pub data_block_size : u32 , pub hash_block_size : u32 , pub data_size : u64 , pub hash_area_offset : u64 , pub fec_area_offset : u64 , pub fec_roots : u32 , pub flags : u32 , } # [ test ] fn bindgen_test_layout_crypt_params_verity ( ) { assert_eq ! ( :: std :: mem :: size_of :: < crypt_params_verity > ( ) , 88usize , concat ! ( "Size of: " , stringify ! ( crypt_params_verity ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < crypt_params_verity > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( crypt_params_verity ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_verity > ( ) ) ) . hash_name as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_verity ) , "::" , stringify ! ( hash_name ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_verity > ( ) ) ) . data_device as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_verity ) , "::" , stringify ! ( data_device ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_verity > ( ) ) ) . hash_device as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_verity ) , "::" , stringify ! ( hash_device ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_verity > ( ) ) ) . fec_device as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_verity ) , "::" , stringify ! ( fec_device ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_verity > ( ) ) ) . salt as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_verity ) , "::" , stringify ! ( salt ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_verity > ( ) ) ) . salt_size as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_verity ) , "::" , stringify ! ( salt_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_verity > ( ) ) ) . hash_type as * const _ as usize } , 44usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_verity ) , "::" , stringify ! ( hash_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_verity > ( ) ) ) . data_block_size as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_verity ) , "::" , stringify ! ( data_block_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_verity > ( ) ) ) . hash_block_size as * const _ as usize } , 52usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_verity ) , "::" , stringify ! ( hash_block_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_verity > ( ) ) ) . data_size as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_verity ) , "::" , stringify ! ( data_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_verity > ( ) ) ) . hash_area_offset as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_verity ) , "::" , stringify ! ( hash_area_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_verity > ( ) ) ) . fec_area_offset as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_verity ) , "::" , stringify ! ( fec_area_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_verity > ( ) ) ) . fec_roots as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_verity ) , "::" , stringify ! ( fec_roots ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_verity > ( ) ) ) . flags as * const _ as usize } , 84usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_verity ) , "::" , stringify ! ( flags ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct crypt_params_tcrypt { pub passphrase : * const :: std :: os :: raw :: c_char , pub passphrase_size : usize , pub keyfiles : * mut * const :: std :: os :: raw :: c_char , pub keyfiles_count : :: std :: os :: raw :: c_uint , pub hash_name : * const :: std :: os :: raw :: c_char , pub cipher : * const :: std :: os :: raw :: c_char , pub mode : * const :: std :: os :: raw :: c_char , pub key_size : usize , pub flags : u32 , pub veracrypt_pim : u32 , } # [ test ] fn bindgen_test_layout_crypt_params_tcrypt ( ) { assert_eq ! ( :: std :: mem :: size_of :: < crypt_params_tcrypt > ( ) , 72usize , concat ! ( "Size of: " , stringify ! ( crypt_params_tcrypt ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < crypt_params_tcrypt > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( crypt_params_tcrypt ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_tcrypt > ( ) ) ) . passphrase as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_tcrypt ) , "::" , stringify ! ( passphrase ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_tcrypt > ( ) ) ) . passphrase_size as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_tcrypt ) , "::" , stringify ! ( passphrase_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_tcrypt > ( ) ) ) . keyfiles as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_tcrypt ) , "::" , stringify ! ( keyfiles ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_tcrypt > ( ) ) ) . keyfiles_count as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_tcrypt ) , "::" , stringify ! ( keyfiles_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_tcrypt > ( ) ) ) . hash_name as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_tcrypt ) , "::" , stringify ! ( hash_name ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_tcrypt > ( ) ) ) . cipher as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_tcrypt ) , "::" , stringify ! ( cipher ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_tcrypt > ( ) ) ) . mode as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_tcrypt ) , "::" , stringify ! ( mode ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_tcrypt > ( ) ) ) . key_size as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_tcrypt ) , "::" , stringify ! ( key_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_tcrypt > ( ) ) ) . flags as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_tcrypt ) , "::" , stringify ! ( flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_tcrypt > ( ) ) ) . veracrypt_pim as * const _ as usize } , 68usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_tcrypt ) , "::" , stringify ! ( veracrypt_pim ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct crypt_params_integrity { pub journal_size : u64 , pub journal_watermark : :: std :: os :: raw :: c_uint , pub journal_commit_time : :: std :: os :: raw :: c_uint , pub interleave_sectors : u32 , pub tag_size : u32 , pub sector_size : u32 , pub buffer_sectors : u32 , pub integrity : * const :: std :: os :: raw :: c_char , pub integrity_key_size : u32 , pub journal_integrity : * const :: std :: os :: raw :: c_char , pub journal_integrity_key : * const :: std :: os :: raw :: c_char , pub journal_integrity_key_size : u32 , pub journal_crypt : * const :: std :: os :: raw :: c_char , pub journal_crypt_key : * const :: std :: os :: raw :: c_char , pub journal_crypt_key_size : u32 , } # [ test ] fn bindgen_test_layout_crypt_params_integrity ( ) { assert_eq ! ( :: std :: mem :: size_of :: < crypt_params_integrity > ( ) , 96usize , concat ! ( "Size of: " , stringify ! ( crypt_params_integrity ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < crypt_params_integrity > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( crypt_params_integrity ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_integrity > ( ) ) ) . journal_size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_integrity ) , "::" , stringify ! ( journal_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_integrity > ( ) ) ) . journal_watermark as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_integrity ) , "::" , stringify ! ( journal_watermark ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_integrity > ( ) ) ) . journal_commit_time as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_integrity ) , "::" , stringify ! ( journal_commit_time ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_integrity > ( ) ) ) . interleave_sectors as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_integrity ) , "::" , stringify ! ( interleave_sectors ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_integrity > ( ) ) ) . tag_size as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_integrity ) , "::" , stringify ! ( tag_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_integrity > ( ) ) ) . sector_size as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_integrity ) , "::" , stringify ! ( sector_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_integrity > ( ) ) ) . buffer_sectors as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_integrity ) , "::" , stringify ! ( buffer_sectors ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_integrity > ( ) ) ) . integrity as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_integrity ) , "::" , stringify ! ( integrity ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_integrity > ( ) ) ) . integrity_key_size as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_integrity ) , "::" , stringify ! ( integrity_key_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_integrity > ( ) ) ) . journal_integrity as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_integrity ) , "::" , stringify ! ( journal_integrity ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_integrity > ( ) ) ) . journal_integrity_key as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_integrity ) , "::" , stringify ! ( journal_integrity_key ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_integrity > ( ) ) ) . journal_integrity_key_size as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_integrity ) , "::" , stringify ! ( journal_integrity_key_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_integrity > ( ) ) ) . journal_crypt as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_integrity ) , "::" , stringify ! ( journal_crypt ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_integrity > ( ) ) ) . journal_crypt_key as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_integrity ) , "::" , stringify ! ( journal_crypt_key ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_integrity > ( ) ) ) . journal_crypt_key_size as * const _ as usize } , 88usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_integrity ) , "::" , stringify ! ( journal_crypt_key_size ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct crypt_params_luks2 { pub pbkdf : * const crypt_pbkdf_type , pub integrity : * const :: std :: os :: raw :: c_char , pub integrity_params : * const crypt_params_integrity , pub data_alignment : usize , pub data_device : * const :: std :: os :: raw :: c_char , pub sector_size : u32 , pub label : * const :: std :: os :: raw :: c_char , pub subsystem : * const :: std :: os :: raw :: c_char , } # [ test ] fn bindgen_test_layout_crypt_params_luks2 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < crypt_params_luks2 > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( crypt_params_luks2 ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < crypt_params_luks2 > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( crypt_params_luks2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_luks2 > ( ) ) ) . pbkdf as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_luks2 ) , "::" , stringify ! ( pbkdf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_luks2 > ( ) ) ) . integrity as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_luks2 ) , "::" , stringify ! ( integrity ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_luks2 > ( ) ) ) . integrity_params as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_luks2 ) , "::" , stringify ! ( integrity_params ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_luks2 > ( ) ) ) . data_alignment as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_luks2 ) , "::" , stringify ! ( data_alignment ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_luks2 > ( ) ) ) . data_device as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_luks2 ) , "::" , stringify ! ( data_device ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_luks2 > ( ) ) ) . sector_size as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_luks2 ) , "::" , stringify ! ( sector_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_luks2 > ( ) ) ) . label as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_luks2 ) , "::" , stringify ! ( label ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_luks2 > ( ) ) ) . subsystem as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_luks2 ) , "::" , stringify ! ( subsystem ) ) ) ; } extern "C" { pub fn crypt_format ( cd : * mut crypt_device , type_ : * const :: std :: os :: raw :: c_char , cipher : * const :: std :: os :: raw :: c_char , cipher_mode : * const :: std :: os :: raw :: c_char , uuid : * const :: std :: os :: raw :: c_char , volume_key : * const :: std :: os :: raw :: c_char , volume_key_size : usize , params : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_convert ( cd : * mut crypt_device , type_ : * const :: std :: os :: raw :: c_char , params : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_set_uuid ( cd : * mut crypt_device , uuid : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_set_label ( cd : * mut crypt_device , label : * const :: std :: os :: raw :: c_char , subsystem : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_volume_key_keyring ( cd : * mut crypt_device , enable : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_load ( cd : * mut crypt_device , requested_type : * const :: std :: os :: raw :: c_char , params : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_repair ( cd : * mut crypt_device , requested_type : * const :: std :: os :: raw :: c_char , params : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_resize ( cd : * mut crypt_device , name : * const :: std :: os :: raw :: c_char , new_size : u64 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_suspend ( cd : * mut crypt_device , name : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_resume_by_passphrase ( cd : * mut crypt_device , name : * const :: std :: os :: raw :: c_char , keyslot : :: std :: os :: raw :: c_int , passphrase : * const :: std :: os :: raw :: c_char , passphrase_size : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_resume_by_keyfile_device_offset ( cd : * mut crypt_device , name : * const :: std :: os :: raw :: c_char , keyslot : :: std :: os :: raw :: c_int , keyfile : * const :: std :: os :: raw :: c_char , keyfile_size : usize , keyfile_offset : u64 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_resume_by_keyfile_offset ( cd : * mut crypt_device , name : * const :: std :: os :: raw :: c_char , keyslot : :: std :: os :: raw :: c_int , keyfile : * const :: std :: os :: raw :: c_char , keyfile_size : usize , keyfile_offset : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_resume_by_keyfile ( cd : * mut crypt_device , name : * const :: std :: os :: raw :: c_char , keyslot : :: std :: os :: raw :: c_int , keyfile : * const :: std :: os :: raw :: c_char , keyfile_size : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_keyslot_add_by_passphrase ( cd : * mut crypt_device , keyslot : :: std :: os :: raw :: c_int , passphrase : * const :: std :: os :: raw :: c_char , passphrase_size : usize , new_passphrase : * const :: std :: os :: raw :: c_char , new_passphrase_size : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_keyslot_change_by_passphrase ( cd : * mut crypt_device , keyslot_old : :: std :: os :: raw :: c_int , keyslot_new : :: std :: os :: raw :: c_int , passphrase : * const :: std :: os :: raw :: c_char , passphrase_size : usize , new_passphrase : * const :: std :: os :: raw :: c_char , new_passphrase_size : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_keyslot_add_by_keyfile_device_offset ( cd : * mut crypt_device , keyslot : :: std :: os :: raw :: c_int , keyfile : * const :: std :: os :: raw :: c_char , keyfile_size : usize , keyfile_offset : u64 , new_keyfile : * const :: std :: os :: raw :: c_char , new_keyfile_size : usize , new_keyfile_offset : u64 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_keyslot_add_by_keyfile_offset ( cd : * mut crypt_device , keyslot : :: std :: os :: raw :: c_int , keyfile : * const :: std :: os :: raw :: c_char , keyfile_size : usize , keyfile_offset : usize , new_keyfile : * const :: std :: os :: raw :: c_char , new_keyfile_size : usize , new_keyfile_offset : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_keyslot_add_by_keyfile ( cd : * mut crypt_device , keyslot : :: std :: os :: raw :: c_int , keyfile : * const :: std :: os :: raw :: c_char , keyfile_size : usize , new_keyfile : * const :: std :: os :: raw :: c_char , new_keyfile_size : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_keyslot_add_by_volume_key ( cd : * mut crypt_device , keyslot : :: std :: os :: raw :: c_int , volume_key : * const :: std :: os :: raw :: c_char , volume_key_size : usize , passphrase : * const :: std :: os :: raw :: c_char , passphrase_size : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_keyslot_add_by_key ( cd : * mut crypt_device , keyslot : :: std :: os :: raw :: c_int , volume_key : * const :: std :: os :: raw :: c_char , volume_key_size : usize , passphrase : * const :: std :: os :: raw :: c_char , passphrase_size : usize , flags : u32 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_keyslot_destroy ( cd : * mut crypt_device , keyslot : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct crypt_active_device { pub offset : u64 , pub iv_offset : u64 , pub size : u64 , pub flags : u32 , } # [ test ] fn bindgen_test_layout_crypt_active_device ( ) { assert_eq ! ( :: std :: mem :: size_of :: < crypt_active_device > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( crypt_active_device ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < crypt_active_device > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( crypt_active_device ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_active_device > ( ) ) ) . offset as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( crypt_active_device ) , "::" , stringify ! ( offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_active_device > ( ) ) ) . iv_offset as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( crypt_active_device ) , "::" , stringify ! ( iv_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_active_device > ( ) ) ) . size as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( crypt_active_device ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_active_device > ( ) ) ) . flags as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( crypt_active_device ) , "::" , stringify ! ( flags ) ) ) ; } extern "C" { pub fn crypt_get_active_device ( cd : * mut crypt_device , name : * const :: std :: os :: raw :: c_char , cad : * mut crypt_active_device ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_get_active_integrity_failures ( cd : * mut crypt_device , name : * const :: std :: os :: raw :: c_char ) -> u64 ; } pub const crypt_flags_type_CRYPT_FLAGS_ACTIVATION : crypt_flags_type = 0 ; pub const crypt_flags_type_CRYPT_FLAGS_REQUIREMENTS : crypt_flags_type = 1 ; pub type crypt_flags_type = u32 ; extern "C" { pub fn crypt_persistent_flags_set ( cd : * mut crypt_device , type_ : crypt_flags_type , flags : u32 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_persistent_flags_get ( cd : * mut crypt_device , type_ : crypt_flags_type , flags : * mut u32 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_activate_by_passphrase ( cd : * mut crypt_device , name : * const :: std :: os :: raw :: c_char , keyslot : :: std :: os :: raw :: c_int , passphrase : * const :: std :: os :: raw :: c_char , passphrase_size : usize , flags : u32 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_activate_by_keyfile_device_offset ( cd : * mut crypt_device , name : * const :: std :: os :: raw :: c_char , keyslot : :: std :: os :: raw :: c_int , keyfile : * const :: std :: os :: raw :: c_char , keyfile_size : usize , keyfile_offset : u64 , flags : u32 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_activate_by_keyfile_offset ( cd : * mut crypt_device , name : * const :: std :: os :: raw :: c_char , keyslot : :: std :: os :: raw :: c_int , keyfile : * const :: std :: os :: raw :: c_char , keyfile_size : usize , keyfile_offset : usize , flags : u32 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_activate_by_keyfile ( cd : * mut crypt_device , name : * const :: std :: os :: raw :: c_char , keyslot : :: std :: os :: raw :: c_int , keyfile : * const :: std :: os :: raw :: c_char , keyfile_size : usize , flags : u32 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_activate_by_volume_key ( cd : * mut crypt_device , name : * const :: std :: os :: raw :: c_char , volume_key : * const :: std :: os :: raw :: c_char , volume_key_size : usize , flags : u32 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_activate_by_keyring ( cd : * mut crypt_device , name : * const :: std :: os :: raw :: c_char , key_description : * const :: std :: os :: raw :: c_char , keyslot : :: std :: os :: raw :: c_int , flags : u32 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_deactivate_by_name ( cd : * mut crypt_device , name : * const :: std :: os :: raw :: c_char , flags : u32 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_deactivate ( cd : * mut crypt_device , name : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_volume_key_get ( cd : * mut crypt_device , keyslot : :: std :: os :: raw :: c_int , volume_key : * mut :: std :: os :: raw :: c_char , volume_key_size : * mut usize , passphrase : * const :: std :: os :: raw :: c_char , passphrase_size : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_volume_key_verify ( cd : * mut crypt_device , volume_key : * const :: std :: os :: raw :: c_char , volume_key_size : usize ) -> :: std :: os :: raw :: c_int ; } pub const crypt_status_info_CRYPT_INVALID : crypt_status_info = 0 ; pub const crypt_status_info_CRYPT_INACTIVE : crypt_status_info = 1 ; pub const crypt_status_info_CRYPT_ACTIVE : crypt_status_info = 2 ; pub const crypt_status_info_CRYPT_BUSY : crypt_status_info = 3 ; pub type crypt_status_info = u32 ; extern "C" { pub fn crypt_status ( cd : * mut crypt_device , name : * const :: std :: os :: raw :: c_char ) -> crypt_status_info ; } extern "C" { pub fn crypt_dump ( cd : * mut crypt_device ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_get_cipher ( cd : * mut crypt_device ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn crypt_get_cipher_mode ( cd : * mut crypt_device ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn crypt_get_uuid ( cd : * mut crypt_device ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn crypt_get_device_name ( cd : * mut crypt_device ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn crypt_get_metadata_device_name ( cd : * mut crypt_device ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn crypt_get_data_offset ( cd : * mut crypt_device ) -> u64 ; } extern "C" { pub fn crypt_get_iv_offset ( cd : * mut crypt_device ) -> u64 ; } extern "C" { pub fn crypt_get_volume_key_size ( cd : * mut crypt_device ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_get_sector_size ( cd : * mut crypt_device ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_get_verity_info ( cd : * mut crypt_device , vp : * mut crypt_params_verity ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_get_integrity_info ( cd : * mut crypt_device , ip : * mut crypt_params_integrity ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_benchmark ( cd : * mut crypt_device , cipher : * const :: std :: os :: raw :: c_char , cipher_mode : * const :: std :: os :: raw :: c_char , volume_key_size : usize , iv_size : usize , buffer_size : usize , encryption_mbs : * mut f64 , decryption_mbs : * mut f64 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_benchmark_pbkdf ( cd : * mut crypt_device , pbkdf : * mut crypt_pbkdf_type , password : * const :: std :: os :: raw :: c_char , password_size : usize , salt : * const :: std :: os :: raw :: c_char , salt_size : usize , volume_key_size : usize , progress : :: std :: option :: Option < unsafe extern "C" fn ( time_ms : u32 , usrptr : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > , usrptr : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } pub const crypt_keyslot_info_CRYPT_SLOT_INVALID : crypt_keyslot_info = 0 ; pub const crypt_keyslot_info_CRYPT_SLOT_INACTIVE : crypt_keyslot_info = 1 ; pub const crypt_keyslot_info_CRYPT_SLOT_ACTIVE : crypt_keyslot_info = 2 ; pub const crypt_keyslot_info_CRYPT_SLOT_ACTIVE_LAST : crypt_keyslot_info = 3 ; pub const crypt_keyslot_info_CRYPT_SLOT_UNBOUND : crypt_keyslot_info = 4 ; pub type crypt_keyslot_info = u32 ; extern "C" { pub fn crypt_keyslot_status ( cd : * mut crypt_device , keyslot : :: std :: os :: raw :: c_int ) -> crypt_keyslot_info ; } pub const crypt_keyslot_priority_CRYPT_SLOT_PRIORITY_INVALID : crypt_keyslot_priority = - 1 ; pub const crypt_keyslot_priority_CRYPT_SLOT_PRIORITY_IGNORE : crypt_keyslot_priority = 0 ; pub const crypt_keyslot_priority_CRYPT_SLOT_PRIORITY_NORMAL : crypt_keyslot_priority = 1 ; pub const crypt_keyslot_priority_CRYPT_SLOT_PRIORITY_PREFER : crypt_keyslot_priority = 2 ; pub type crypt_keyslot_priority = i32 ; extern "C" { pub fn crypt_keyslot_get_priority ( cd : * mut crypt_device , keyslot : :: std :: os :: raw :: c_int ) -> crypt_keyslot_priority ; } extern "C" { pub fn crypt_keyslot_set_priority ( cd : * mut crypt_device , keyslot : :: std :: os :: raw :: c_int , priority : crypt_keyslot_priority ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_keyslot_max ( type_ : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_keyslot_area ( cd : * mut crypt_device , keyslot : :: std :: os :: raw :: c_int , offset : * mut u64 , length : * mut u64 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_keyslot_get_key_size ( cd : * mut crypt_device , keyslot : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_keyslot_get_encryption ( cd : * mut crypt_device , keyslot : :: std :: os :: raw :: c_int , key_size : * mut usize ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn crypt_keyslot_get_pbkdf ( cd : * mut crypt_device , keyslot : :: std :: os :: raw :: c_int , pbkdf : * mut crypt_pbkdf_type ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_keyslot_set_encryption ( cd : * mut crypt_device , cipher : * const :: std :: os :: raw :: c_char , key_size : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_get_dir ( ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn crypt_header_backup ( cd : * mut crypt_device , requested_type : * const :: std :: os :: raw :: c_char , backup_file : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_header_restore ( cd : * mut crypt_device , requested_type : * const :: std :: os :: raw :: c_char , backup_file : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_set_debug_level ( level : :: std :: os :: raw :: c_int ) ; } extern "C" { pub fn crypt_keyfile_device_read ( cd : * mut crypt_device , keyfile : * const :: std :: os :: raw :: c_char , key : * mut * mut :: std :: os :: raw :: c_char , key_size_read : * mut usize , keyfile_offset : u64 , key_size : usize , flags : u32 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_keyfile_read ( cd : * mut crypt_device , keyfile : * const :: std :: os :: raw :: c_char , key : * mut * mut :: std :: os :: raw :: c_char , key_size_read : * mut usize , keyfile_offset : usize , key_size : usize , flags : u32 ) -> :: std :: os :: raw :: c_int ; } pub const crypt_wipe_pattern_CRYPT_WIPE_ZERO : crypt_wipe_pattern = 0 ; pub const crypt_wipe_pattern_CRYPT_WIPE_RANDOM : crypt_wipe_pattern = 1 ; pub const crypt_wipe_pattern_CRYPT_WIPE_ENCRYPTED_ZERO : crypt_wipe_pattern = 2 ; pub const crypt_wipe_pattern_CRYPT_WIPE_SPECIAL : crypt_wipe_pattern = 3 ; pub type crypt_wipe_pattern = u32 ; extern "C" { pub fn crypt_wipe ( cd : * mut crypt_device , dev_path : * const :: std :: os :: raw :: c_char , pattern : crypt_wipe_pattern , offset : u64 , length : u64 , wipe_block_size : usize , flags : u32 , progress : :: std :: option :: Option < unsafe extern "C" fn ( size : u64 , offset : u64 , usrptr : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > , usrptr : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_token_json_get ( cd : * mut crypt_device , token : :: std :: os :: raw :: c_int , json : * mut * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_token_json_set ( cd : * mut crypt_device , token : :: std :: os :: raw :: c_int , json : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } pub const crypt_token_info_CRYPT_TOKEN_INVALID : crypt_token_info = 0 ; pub const crypt_token_info_CRYPT_TOKEN_INACTIVE : crypt_token_info = 1 ; pub const crypt_token_info_CRYPT_TOKEN_INTERNAL : crypt_token_info = 2 ; pub const crypt_token_info_CRYPT_TOKEN_INTERNAL_UNKNOWN : crypt_token_info = 3 ; pub const crypt_token_info_CRYPT_TOKEN_EXTERNAL : crypt_token_info = 4 ; pub const crypt_token_info_CRYPT_TOKEN_EXTERNAL_UNKNOWN : crypt_token_info = 5 ; pub type crypt_token_info = u32 ; extern "C" { pub fn crypt_token_status ( cd : * mut crypt_device , token : :: std :: os :: raw :: c_int , type_ : * mut * const :: std :: os :: raw :: c_char ) -> crypt_token_info ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct crypt_token_params_luks2_keyring { pub key_description : * const :: std :: os :: raw :: c_char , } # [ test ] fn bindgen_test_layout_crypt_token_params_luks2_keyring ( ) { assert_eq ! ( :: std :: mem :: size_of :: < crypt_token_params_luks2_keyring > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( crypt_token_params_luks2_keyring ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < crypt_token_params_luks2_keyring > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( crypt_token_params_luks2_keyring ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_token_params_luks2_keyring > ( ) ) ) . key_description as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( crypt_token_params_luks2_keyring ) , "::" , stringify ! ( key_description ) ) ) ; } extern "C" { pub fn crypt_token_luks2_keyring_set ( cd : * mut crypt_device , token : :: std :: os :: raw :: c_int , params : * const crypt_token_params_luks2_keyring ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_token_luks2_keyring_get ( cd : * mut crypt_device , token : :: std :: os :: raw :: c_int , params : * mut crypt_token_params_luks2_keyring ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_token_assign_keyslot ( cd : * mut crypt_device , token : :: std :: os :: raw :: c_int , keyslot : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_token_unassign_keyslot ( cd : * mut crypt_device , token : :: std :: os :: raw :: c_int , keyslot : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_token_is_assigned ( cd : * mut crypt_device , token : :: std :: os :: raw :: c_int , keyslot : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } pub type crypt_token_open_func = :: std :: option :: Option < unsafe extern "C" fn ( cd : * mut crypt_device , token : :: std :: os :: raw :: c_int , buffer : * mut * mut :: std :: os :: raw :: c_char , buffer_len : * mut usize , usrptr : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; pub type crypt_token_buffer_free_func = :: std :: option :: Option < unsafe extern "C" fn ( buffer : * mut :: std :: os :: raw :: c_void , buffer_len : usize ) > ; pub type crypt_token_validate_func = :: std :: option :: Option < unsafe extern "C" fn ( cd : * mut crypt_device , json : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int > ; pub type crypt_token_dump_func = :: std :: option :: Option < unsafe extern "C" fn ( cd : * mut crypt_device , json : * const :: std :: os :: raw :: c_char ) > ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct crypt_token_handler { pub name : * const :: std :: os :: raw :: c_char , pub open : crypt_token_open_func , pub buffer_free : crypt_token_buffer_free_func , pub validate : crypt_token_validate_func , pub dump : crypt_token_dump_func , } # [ test ] fn bindgen_test_layout_crypt_token_handler ( ) { assert_eq ! ( :: std :: mem :: size_of :: < crypt_token_handler > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( crypt_token_handler ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < crypt_token_handler > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( crypt_token_handler ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_token_handler > ( ) ) ) . name as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( crypt_token_handler ) , "::" , stringify ! ( name ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_token_handler > ( ) ) ) . open as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( crypt_token_handler ) , "::" , stringify ! ( open ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_token_handler > ( ) ) ) . buffer_free as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( crypt_token_handler ) , "::" , stringify ! ( buffer_free ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_token_handler > ( ) ) ) . validate as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( crypt_token_handler ) , "::" , stringify ! ( validate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_token_handler > ( ) ) ) . dump as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( crypt_token_handler ) , "::" , stringify ! ( dump ) ) ) ; } extern "C" { pub fn crypt_token_register ( handler : * const crypt_token_handler ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_activate_by_token ( cd : * mut crypt_device , name : * const :: std :: os :: raw :: c_char , token : :: std :: os :: raw :: c_int , usrptr : * mut :: std :: os :: raw :: c_void , flags : u32 ) -> :: std :: os :: raw :: c_int ; } pub const crypt_reencrypt_direction_info_CRYPT_REENCRYPT_FORWARD : crypt_reencrypt_direction_info = 0 ; pub const crypt_reencrypt_direction_info_CRYPT_REENCRYPT_BACKWARD : crypt_reencrypt_direction_info = 1 ; pub type crypt_reencrypt_direction_info = u32 ; pub const crypt_reencrypt_mode_info_CRYPT_REENCRYPT_REENCRYPT : crypt_reencrypt_mode_info = 0 ; pub const crypt_reencrypt_mode_info_CRYPT_REENCRYPT_ENCRYPT : crypt_reencrypt_mode_info = 1 ; pub const crypt_reencrypt_mode_info_CRYPT_REENCRYPT_DECRYPT : crypt_reencrypt_mode_info = 2 ; pub type crypt_reencrypt_mode_info = u32 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct crypt_params_reencrypt { pub mode : crypt_reencrypt_mode_info , pub direction : crypt_reencrypt_direction_info , pub resilience : * const :: std :: os :: raw :: c_char , pub hash : * const :: std :: os :: raw :: c_char , pub data_shift : u64 , pub max_hotzone_size : u64 , pub device_size : u64 , pub luks2 : * const crypt_params_luks2 , pub flags : u32 , } # [ test ] fn bindgen_test_layout_crypt_params_reencrypt ( ) { assert_eq ! ( :: std :: mem :: size_of :: < crypt_params_reencrypt > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( crypt_params_reencrypt ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < crypt_params_reencrypt > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( crypt_params_reencrypt ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_reencrypt > ( ) ) ) . mode as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_reencrypt ) , "::" , stringify ! ( mode ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_reencrypt > ( ) ) ) . direction as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_reencrypt ) , "::" , stringify ! ( direction ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_reencrypt > ( ) ) ) . resilience as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_reencrypt ) , "::" , stringify ! ( resilience ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_reencrypt > ( ) ) ) . hash as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_reencrypt ) , "::" , stringify ! ( hash ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_reencrypt > ( ) ) ) . data_shift as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_reencrypt ) , "::" , stringify ! ( data_shift ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_reencrypt > ( ) ) ) . max_hotzone_size as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_reencrypt ) , "::" , stringify ! ( max_hotzone_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_reencrypt > ( ) ) ) . device_size as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_reencrypt ) , "::" , stringify ! ( device_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_reencrypt > ( ) ) ) . luks2 as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_reencrypt ) , "::" , stringify ! ( luks2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < crypt_params_reencrypt > ( ) ) ) . flags as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( crypt_params_reencrypt ) , "::" , stringify ! ( flags ) ) ) ; } extern "C" { pub fn crypt_reencrypt_init_by_passphrase ( cd : * mut crypt_device , name : * const :: std :: os :: raw :: c_char , passphrase : * const :: std :: os :: raw :: c_char , passphrase_size : usize , keyslot_old : :: std :: os :: raw :: c_int , keyslot_new : :: std :: os :: raw :: c_int , cipher : * const :: std :: os :: raw :: c_char , cipher_mode : * const :: std :: os :: raw :: c_char , params : * const crypt_params_reencrypt ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_reencrypt_init_by_keyring ( cd : * mut crypt_device , name : * const :: std :: os :: raw :: c_char , key_description : * const :: std :: os :: raw :: c_char , keyslot_old : :: std :: os :: raw :: c_int , keyslot_new : :: std :: os :: raw :: c_int , cipher : * const :: std :: os :: raw :: c_char , cipher_mode : * const :: std :: os :: raw :: c_char , params : * const crypt_params_reencrypt ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn crypt_reencrypt ( cd : * mut crypt_device , progress : :: std :: option :: Option < unsafe extern "C" fn ( size : u64 , offset : u64 , usrptr : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ) -> :: std :: os :: raw :: c_int ; } pub const crypt_reencrypt_info_CRYPT_REENCRYPT_NONE : crypt_reencrypt_info = 0 ; pub const crypt_reencrypt_info_CRYPT_REENCRYPT_CLEAN : crypt_reencrypt_info = 1 ; pub const crypt_reencrypt_info_CRYPT_REENCRYPT_CRASH : crypt_reencrypt_info = 2 ; pub const crypt_reencrypt_info_CRYPT_REENCRYPT_INVALID : crypt_reencrypt_info = 3 ; pub type crypt_reencrypt_info = u32 ; extern "C" { pub fn crypt_reencrypt_status ( cd : * mut crypt_device , params : * mut crypt_params_reencrypt ) -> crypt_reencrypt_info ; } # [ repr ( C ) ] # [ derive ( Debug ) ] pub struct safe_allocation { pub size : usize , pub data : __IncompleteArrayField < :: std :: os :: raw :: c_char > , } # [ test ] fn bindgen_test_layout_safe_allocation ( ) { assert_eq ! ( :: std :: mem :: size_of :: < safe_allocation > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( safe_allocation ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < safe_allocation > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( safe_allocation ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < safe_allocation > ( ) ) ) . size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( safe_allocation ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < safe_allocation > ( ) ) ) . data as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( safe_allocation ) , "::" , stringify ! ( data ) ) ) ; } extern "C" { pub fn crypt_safe_free ( data : * mut :: std :: os :: raw :: c_void ) ; }