[INFO] crate libcryptsetup-rs 0.1.0 is already in cache [INFO] checking libcryptsetup-rs-0.1.0 against try#f149601db42efe10ece8b284ab681fd4a6fcb89c for pr-68766 [INFO] extracting crate libcryptsetup-rs 0.1.0 into /workspace/builds/worker-6/source [INFO] validating manifest of crates.io crate libcryptsetup-rs 0.1.0 on toolchain f149601db42efe10ece8b284ab681fd4a6fcb89c [INFO] running `"/workspace/cargo-home/bin/cargo" "+f149601db42efe10ece8b284ab681fd4a6fcb89c" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started tweaking crates.io crate libcryptsetup-rs 0.1.0 [INFO] finished tweaking crates.io crate libcryptsetup-rs 0.1.0 [INFO] tweaked toml for crates.io crate libcryptsetup-rs 0.1.0 written to /workspace/builds/worker-6/source/Cargo.toml [INFO] crate crates.io crate libcryptsetup-rs 0.1.0 already has a lockfile, it will not be regenerated [INFO] running `"/workspace/cargo-home/bin/cargo" "+f149601db42efe10ece8b284ab681fd4a6fcb89c" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "MAP_USER_ID=0" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--network" "none" "rustops/crates-build-env" "/opt/rustwide/cargo-home/bin/cargo" "+f149601db42efe10ece8b284ab681fd4a6fcb89c" "check" "--frozen" "--all" "--all-targets"` [INFO] [stdout] a88047db4617977a61d4dc32f838cdd01a62d0cb3eeeed7f2e499bd65e914d6d [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `"docker" "start" "-a" "a88047db4617977a61d4dc32f838cdd01a62d0cb3eeeed7f2e499bd65e914d6d"` [INFO] [stderr] Compiling libc v0.2.62 [INFO] [stderr] Compiling proc-macro2 v1.0.4 [INFO] [stderr] Compiling unicode-width v0.1.6 [INFO] [stderr] Compiling serde v1.0.101 [INFO] [stderr] Compiling nix v0.15.0 [INFO] [stderr] Checking uuid v0.7.4 [INFO] [stderr] Compiling libloading v0.5.2 [INFO] [stderr] Compiling bitflags v1.2.0 [INFO] [stderr] Compiling cexpr v0.3.5 [INFO] [stderr] Compiling textwrap v0.11.0 [INFO] [stderr] Compiling quote v1.0.2 [INFO] [stderr] Checking getrandom v0.1.12 [INFO] [stderr] Checking errno v0.2.4 [INFO] [stderr] Compiling atty v0.2.13 [INFO] [stderr] Compiling which v3.0.0 [INFO] [stderr] Compiling clang-sys v0.28.1 [INFO] [stderr] Compiling env_logger v0.6.2 [INFO] [stderr] Compiling clap v2.33.0 [INFO] [stderr] Checking rand_core v0.5.1 [INFO] [stderr] Checking loopdev v0.2.1 [INFO] [stderr] Checking rand_chacha v0.2.1 [INFO] [stderr] Checking rand v0.7.2 [INFO] [stderr] Checking serde_json v1.0.40 [INFO] [stderr] Compiling bindgen v0.51.1 [INFO] [stderr] Compiling libcryptsetup-rs-sys v0.1.0 [INFO] [stderr] Checking libcryptsetup-rs v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] error[E0425]: cannot find value `CRYPT_ACTIVATE_CHECK_AT_MOST_ONCE` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/activate.rs:28:46 [INFO] [stderr] | [INFO] [stderr] 28 | CheckAtMostOnce => libcryptsetup_rs_sys::CRYPT_ACTIVATE_CHECK_AT_MOST_ONCE, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_ACTIVATE_ALLOW_UNBOUND_KEY` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/activate.rs:29:46 [INFO] [stderr] | [INFO] [stderr] 29 | AllowUnboundKey => libcryptsetup_rs_sys::CRYPT_ACTIVATE_ALLOW_UNBOUND_KEY, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `CRYPT_ACTIVATE_ALLOW_DISCARDS` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:6253 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | --------------------------------------------------- similarly named constant `CRYPT_ACTIVATE_ALLOW_DISCARDS` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_ACTIVATE_RECALCULATE` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/activate.rs:30:42 [INFO] [stderr] | [INFO] [stderr] 30 | Recalculate => libcryptsetup_rs_sys::CRYPT_ACTIVATE_RECALCULATE, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `CRYPT_ACTIVATE_READONLY` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:6118 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | --------------------------------------------- similarly named constant `CRYPT_ACTIVATE_READONLY` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_ACTIVATE_REFRESH` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/activate.rs:31:38 [INFO] [stderr] | [INFO] [stderr] 31 | Refresh => libcryptsetup_rs_sys::CRYPT_ACTIVATE_REFRESH, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `CRYPT_ACTIVATE_RECOVERY` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:6794 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ------------------------------------------------ similarly named constant `CRYPT_ACTIVATE_RECOVERY` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_ACTIVATE_SERIALIZE_MEMORY_HARD_PBKDF` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/activate.rs:32:55 [INFO] [stderr] | [INFO] [stderr] 32 | SerializeMemoryHardPbkdf => libcryptsetup_rs_sys::CRYPT_ACTIVATE_SERIALIZE_MEMORY_HARD_PBKDF, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_ACTIVATE_NO_JOURNAL_BITMAP` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/activate.rs:33:46 [INFO] [stderr] | [INFO] [stderr] 33 | NoJournalBitmap => libcryptsetup_rs_sys::CRYPT_ACTIVATE_NO_JOURNAL_BITMAP [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `CRYPT_ACTIVATE_NO_JOURNAL` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:6743 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | -------------------------------------------------- similarly named constant `CRYPT_ACTIVATE_NO_JOURNAL` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_DEBUG_JSON` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/debug.rs:11:35 [INFO] [stderr] | [INFO] [stderr] 11 | Json => libcryptsetup_rs_sys::CRYPT_DEBUG_JSON as c_int, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `CRYPT_DEBUG_NONE` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:7149 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | -------------------------------------- similarly named constant `CRYPT_DEBUG_NONE` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_init_data_device` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/device.rs:57:35 [INFO] [stderr] | [INFO] [stderr] 57 | libcryptsetup_rs_sys::crypt_init_data_device( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_set_data_device` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:13986 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ------------------------------------------------------------------------------------------------------------------------------------------- similarly named function `crypt_set_data_device` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_set_data_offset` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/device.rs:216:47 [INFO] [stderr] | [INFO] [stderr] 216 | errno!(unsafe { libcryptsetup_rs_sys::crypt_set_data_offset(self.ptr, offset * 8) }) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_get_data_offset` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:49126 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ----------------------------------------------------------------- similarly named function `crypt_get_data_offset` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_get_default_type` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/format.rs:363:67 [INFO] [stderr] | [INFO] [stderr] 363 | EncryptionFormat::from_ptr(unsafe { libcryptsetup_rs_sys::crypt_get_default_type() }) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_get_pbkdf_type` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:17287 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ------------------------------------------------------------------------------------- similarly named function `crypt_get_pbkdf_type` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_VOLUME_KEY_SET` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/keyslot.rs:21:34 [INFO] [stderr] | [INFO] [stderr] 21 | Set => libcryptsetup_rs_sys::CRYPT_VOLUME_KEY_SET, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_VOLUME_KEY_DIGEST_REUSE` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/keyslot.rs:22:42 [INFO] [stderr] | [INFO] [stderr] 22 | DigestReuse => libcryptsetup_rs_sys::CRYPT_VOLUME_KEY_DIGEST_REUSE [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `crypt_keyslot_info_CRYPT_SLOT_UNBOUND` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/keyslot.rs:40:38 [INFO] [stderr] | [INFO] [stderr] 40 | Unbound => libcryptsetup_rs_sys::crypt_keyslot_info_CRYPT_SLOT_UNBOUND [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `crypt_keyslot_info_CRYPT_SLOT_INVALID` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:50616 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | -------------------------------------------------------------------------- similarly named constant `crypt_keyslot_info_CRYPT_SLOT_INVALID` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_keyslot_get_key_size` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/keyslot.rs:221:35 [INFO] [stderr] | [INFO] [stderr] 221 | libcryptsetup_rs_sys::crypt_keyslot_get_key_size(self.reference.as_ptr(), self.keyslot) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_keyslot_get_priority` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:51511 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ---------------------------------------------------------------------------------------------------------------------------------- similarly named function `crypt_keyslot_get_priority` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_keyslot_get_encryption` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/keyslot.rs:229:35 [INFO] [stderr] | [INFO] [stderr] 229 | libcryptsetup_rs_sys::crypt_keyslot_get_encryption( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_keyslot_get_priority` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:51511 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ---------------------------------------------------------------------------------------------------------------------------------- similarly named function `crypt_keyslot_get_priority` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_keyslot_get_pbkdf` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/keyslot.rs:251:35 [INFO] [stderr] | [INFO] [stderr] 251 | libcryptsetup_rs_sys::crypt_keyslot_get_pbkdf( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_keyslot_get_priority` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:51511 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ---------------------------------------------------------------------------------------------------------------------------------- similarly named function `crypt_keyslot_get_priority` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_keyslot_set_encryption` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/keyslot.rs:268:35 [INFO] [stderr] | [INFO] [stderr] 268 | libcryptsetup_rs_sys::crypt_keyslot_set_encryption( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_keyslot_set_priority` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:51657 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- similarly named function `crypt_keyslot_set_priority` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_LOG_DEBUG_JSON` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/log.rs:26:39 [INFO] [stderr] | [INFO] [stderr] 26 | DebugJson = libcryptsetup_rs_sys::CRYPT_LOG_DEBUG_JSON as isize, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `CRYPT_LOG_DEBUG` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:4746 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | -------------------------------------- similarly named constant `CRYPT_LOG_DEBUG` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_REQUIREMENT_ONLINE_REENCRYPT` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_flags.rs:18:46 [INFO] [stderr] | [INFO] [stderr] 18 | OnlineReencrypt => libcryptsetup_rs_sys::CRYPT_REQUIREMENT_ONLINE_REENCRYPT, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `CRYPT_REQUIREMENT_OFFLINE_REENCRYPT` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:6902 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | --------------------------------------------------------- similarly named constant `CRYPT_REQUIREMENT_OFFLINE_REENCRYPT` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `crypt_reencrypt_info_CRYPT_REENCRYPT_NONE` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:24:35 [INFO] [stderr] | [INFO] [stderr] 24 | None => libcryptsetup_rs_sys::crypt_reencrypt_info_CRYPT_REENCRYPT_NONE, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `crypt_reencrypt_info_CRYPT_REENCRYPT_CLEAN` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:25:36 [INFO] [stderr] | [INFO] [stderr] 25 | Clean => libcryptsetup_rs_sys::crypt_reencrypt_info_CRYPT_REENCRYPT_CLEAN, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `crypt_reencrypt_info_CRYPT_REENCRYPT_CRASH` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:26:36 [INFO] [stderr] | [INFO] [stderr] 26 | Crash => libcryptsetup_rs_sys::crypt_reencrypt_info_CRYPT_REENCRYPT_CRASH, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `crypt_reencrypt_info_CRYPT_REENCRYPT_INVALID` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:27:38 [INFO] [stderr] | [INFO] [stderr] 27 | Invalid => libcryptsetup_rs_sys::crypt_reencrypt_info_CRYPT_REENCRYPT_INVALID [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `crypt_reencrypt_mode_info_CRYPT_REENCRYPT_REENCRYPT` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:34:40 [INFO] [stderr] | [INFO] [stderr] 34 | Reencrypt => libcryptsetup_rs_sys::crypt_reencrypt_mode_info_CRYPT_REENCRYPT_REENCRYPT, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `crypt_reencrypt_mode_info_CRYPT_REENCRYPT_ENCRYPT` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:35:38 [INFO] [stderr] | [INFO] [stderr] 35 | Encrypt => libcryptsetup_rs_sys::crypt_reencrypt_mode_info_CRYPT_REENCRYPT_ENCRYPT, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `crypt_reencrypt_mode_info_CRYPT_REENCRYPT_DECRYPT` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:36:38 [INFO] [stderr] | [INFO] [stderr] 36 | Decrypt => libcryptsetup_rs_sys::crypt_reencrypt_mode_info_CRYPT_REENCRYPT_DECRYPT [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `crypt_reencrypt_direction_info_CRYPT_REENCRYPT_FORWARD` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:43:38 [INFO] [stderr] | [INFO] [stderr] 43 | Forward => libcryptsetup_rs_sys::crypt_reencrypt_direction_info_CRYPT_REENCRYPT_FORWARD, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `crypt_reencrypt_direction_info_CRYPT_REENCRYPT_BACKWARD` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:44:39 [INFO] [stderr] | [INFO] [stderr] 44 | Backward => libcryptsetup_rs_sys::crypt_reencrypt_direction_info_CRYPT_REENCRYPT_BACKWARD [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_REENCRYPT_INITIALIZE_ONLY` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:51:45 [INFO] [stderr] | [INFO] [stderr] 51 | InitializeOnly => libcryptsetup_rs_sys::CRYPT_REENCRYPT_INITIALIZE_ONLY, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_REENCRYPT_MOVE_FIRST_SEGMENT` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:52:47 [INFO] [stderr] | [INFO] [stderr] 52 | MoveFirstSegment => libcryptsetup_rs_sys::CRYPT_REENCRYPT_MOVE_FIRST_SEGMENT, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_REENCRYPT_RESUME_ONLY` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:53:41 [INFO] [stderr] | [INFO] [stderr] 53 | ResumeOnly => libcryptsetup_rs_sys::CRYPT_REENCRYPT_RESUME_ONLY, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_REENCRYPT_RECOVERY` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:54:39 [INFO] [stderr] | [INFO] [stderr] 54 | Recovery => libcryptsetup_rs_sys::CRYPT_REENCRYPT_RECOVERY [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0412]: cannot find type `crypt_params_reencrypt` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:70:38 [INFO] [stderr] | [INFO] [stderr] 70 | pub inner: libcryptsetup_rs_sys::crypt_params_reencrypt, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: a struct with a similar name exists: `crypt_params_tcrypt` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:26710 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ------------------------------ similarly named struct `crypt_params_tcrypt` defined here [INFO] [stderr] [INFO] [stderr] error[E0422]: cannot find struct, variant or union type `crypt_params_reencrypt` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:112:43 [INFO] [stderr] | [INFO] [stderr] 112 | let inner = libcryptsetup_rs_sys::crypt_params_reencrypt { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: a struct with a similar name exists: `crypt_params_tcrypt` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:26710 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ------------------------------ similarly named struct `crypt_params_tcrypt` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_reencrypt_init_by_passphrase` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:163:35 [INFO] [stderr] | [INFO] [stderr] 163 | libcryptsetup_rs_sys::crypt_reencrypt_init_by_passphrase( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_activate_by_passphrase` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:45592 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- similarly named function `crypt_activate_by_passphrase` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_reencrypt_init_by_keyring` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:198:35 [INFO] [stderr] | [INFO] [stderr] 198 | libcryptsetup_rs_sys::crypt_reencrypt_init_by_keyring( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_reencrypt` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:213:47 [INFO] [stderr] | [INFO] [stderr] 213 | errno!(unsafe { libcryptsetup_rs_sys::crypt_reencrypt(self.reference.as_ptr(), progress) }) [INFO] [stderr] | ^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_reencrypt_status` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:224:39 [INFO] [stderr] | [INFO] [stderr] 224 | libcryptsetup_rs_sys::crypt_reencrypt_status( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_keyslot_status` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:50969 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ------------------------------------------------------------------------------------------------------------------------ similarly named function `crypt_keyslot_status` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_get_active_integrity_failures` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/runtime.rs:68:35 [INFO] [stderr] | [INFO] [stderr] 68 | libcryptsetup_rs_sys::crypt_get_active_integrity_failures( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_get_pbkdf_type_params` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/settings.rs:326:35 [INFO] [stderr] | [INFO] [stderr] 326 | libcryptsetup_rs_sys::crypt_get_pbkdf_type_params(pbkdf_type.as_ptr()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_get_pbkdf_type` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:17287 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ------------------------------------------------------------------------------------- similarly named function `crypt_get_pbkdf_type` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_get_pbkdf_default` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/settings.rs:334:35 [INFO] [stderr] | [INFO] [stderr] 334 | libcryptsetup_rs_sys::crypt_get_pbkdf_default(luks_type.as_ptr()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_get_pbkdf_type` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:17287 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ------------------------------------------------------------------------------------- similarly named function `crypt_get_pbkdf_type` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_set_metadata_size` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/settings.rs:381:35 [INFO] [stderr] | [INFO] [stderr] 381 | libcryptsetup_rs_sys::crypt_set_metadata_size( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_ACTIVATE_CHECK_AT_MOST_ONCE` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/activate.rs:28:46 [INFO] [stderr] | [INFO] [stderr] 28 | CheckAtMostOnce => libcryptsetup_rs_sys::CRYPT_ACTIVATE_CHECK_AT_MOST_ONCE, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_get_metadata_size` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/settings.rs:394:35 [INFO] [stderr] | [INFO] [stderr] 394 | libcryptsetup_rs_sys::crypt_get_metadata_size( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_get_sector_size` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:49396 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ------------------------------------------------------------------------------------------ similarly named function `crypt_get_sector_size` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_ACTIVATE_ALLOW_UNBOUND_KEY` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/activate.rs:29:46 [INFO] [stderr] | [INFO] [stderr] 29 | AllowUnboundKey => libcryptsetup_rs_sys::CRYPT_ACTIVATE_ALLOW_UNBOUND_KEY, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `CRYPT_ACTIVATE_ALLOW_DISCARDS` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:6253 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | --------------------------------------------------- similarly named constant `CRYPT_ACTIVATE_ALLOW_DISCARDS` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_get_metadata_device_name` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/status.rs:83:35 [INFO] [stderr] | [INFO] [stderr] 83 | libcryptsetup_rs_sys::crypt_get_metadata_device_name(self.reference.as_ptr()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_get_device_name` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:49011 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | --------------------------------------------------------------------------------------------------- similarly named function `crypt_get_device_name` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_ACTIVATE_RECALCULATE` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/activate.rs:30:42 [INFO] [stderr] | [INFO] [stderr] 30 | Recalculate => libcryptsetup_rs_sys::CRYPT_ACTIVATE_RECALCULATE, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `CRYPT_ACTIVATE_READONLY` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:6118 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | --------------------------------------------- similarly named constant `CRYPT_ACTIVATE_READONLY` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_ACTIVATE_REFRESH` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/activate.rs:31:38 [INFO] [stderr] | [INFO] [stderr] 31 | Refresh => libcryptsetup_rs_sys::CRYPT_ACTIVATE_REFRESH, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `CRYPT_ACTIVATE_RECOVERY` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:6794 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ------------------------------------------------ similarly named constant `CRYPT_ACTIVATE_RECOVERY` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_ACTIVATE_SERIALIZE_MEMORY_HARD_PBKDF` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/activate.rs:32:55 [INFO] [stderr] | [INFO] [stderr] 32 | SerializeMemoryHardPbkdf => libcryptsetup_rs_sys::CRYPT_ACTIVATE_SERIALIZE_MEMORY_HARD_PBKDF, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_ACTIVATE_NO_JOURNAL_BITMAP` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/activate.rs:33:46 [INFO] [stderr] | [INFO] [stderr] 33 | NoJournalBitmap => libcryptsetup_rs_sys::CRYPT_ACTIVATE_NO_JOURNAL_BITMAP [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `CRYPT_ACTIVATE_NO_JOURNAL` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:6743 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | -------------------------------------------------- similarly named constant `CRYPT_ACTIVATE_NO_JOURNAL` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_DEBUG_JSON` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/debug.rs:11:35 [INFO] [stderr] | [INFO] [stderr] 11 | Json => libcryptsetup_rs_sys::CRYPT_DEBUG_JSON as c_int, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `CRYPT_DEBUG_NONE` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:7149 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | -------------------------------------- similarly named constant `CRYPT_DEBUG_NONE` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_init_data_device` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/device.rs:57:35 [INFO] [stderr] | [INFO] [stderr] 57 | libcryptsetup_rs_sys::crypt_init_data_device( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_set_data_device` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:13986 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ------------------------------------------------------------------------------------------------------------------------------------------- similarly named function `crypt_set_data_device` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_set_data_offset` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/device.rs:216:47 [INFO] [stderr] | [INFO] [stderr] 216 | errno!(unsafe { libcryptsetup_rs_sys::crypt_set_data_offset(self.ptr, offset * 8) }) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_get_data_offset` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:49126 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ----------------------------------------------------------------- similarly named function `crypt_get_data_offset` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_get_default_type` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/format.rs:363:67 [INFO] [stderr] | [INFO] [stderr] 363 | EncryptionFormat::from_ptr(unsafe { libcryptsetup_rs_sys::crypt_get_default_type() }) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_get_pbkdf_type` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:17287 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ------------------------------------------------------------------------------------- similarly named function `crypt_get_pbkdf_type` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_VOLUME_KEY_SET` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/keyslot.rs:21:34 [INFO] [stderr] | [INFO] [stderr] 21 | Set => libcryptsetup_rs_sys::CRYPT_VOLUME_KEY_SET, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_VOLUME_KEY_DIGEST_REUSE` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/keyslot.rs:22:42 [INFO] [stderr] | [INFO] [stderr] 22 | DigestReuse => libcryptsetup_rs_sys::CRYPT_VOLUME_KEY_DIGEST_REUSE [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `crypt_keyslot_info_CRYPT_SLOT_UNBOUND` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/keyslot.rs:40:38 [INFO] [stderr] | [INFO] [stderr] 40 | Unbound => libcryptsetup_rs_sys::crypt_keyslot_info_CRYPT_SLOT_UNBOUND [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `crypt_keyslot_info_CRYPT_SLOT_INVALID` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:50616 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | -------------------------------------------------------------------------- similarly named constant `crypt_keyslot_info_CRYPT_SLOT_INVALID` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_keyslot_get_key_size` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/keyslot.rs:221:35 [INFO] [stderr] | [INFO] [stderr] 221 | libcryptsetup_rs_sys::crypt_keyslot_get_key_size(self.reference.as_ptr(), self.keyslot) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_keyslot_get_priority` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:51511 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ---------------------------------------------------------------------------------------------------------------------------------- similarly named function `crypt_keyslot_get_priority` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_keyslot_get_encryption` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/keyslot.rs:229:35 [INFO] [stderr] | [INFO] [stderr] 229 | libcryptsetup_rs_sys::crypt_keyslot_get_encryption( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_keyslot_get_priority` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:51511 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ---------------------------------------------------------------------------------------------------------------------------------- similarly named function `crypt_keyslot_get_priority` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_keyslot_get_pbkdf` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/keyslot.rs:251:35 [INFO] [stderr] | [INFO] [stderr] 251 | libcryptsetup_rs_sys::crypt_keyslot_get_pbkdf( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_keyslot_get_priority` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:51511 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ---------------------------------------------------------------------------------------------------------------------------------- similarly named function `crypt_keyslot_get_priority` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_keyslot_set_encryption` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/keyslot.rs:268:35 [INFO] [stderr] | [INFO] [stderr] 268 | libcryptsetup_rs_sys::crypt_keyslot_set_encryption( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_keyslot_set_priority` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:51657 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- similarly named function `crypt_keyslot_set_priority` defined here [INFO] [stderr] [INFO] [stderr] error[E0081]: discriminant value `0` already exists [INFO] [stderr] --> src/log.rs:26:17 [INFO] [stderr] | [INFO] [stderr] 18 | Normal = libcryptsetup_rs_sys::CRYPT_LOG_NORMAL as isize, [INFO] [stderr] | ----------------------------------------------- first use of `0` [INFO] [stderr] ... [INFO] [stderr] 26 | DebugJson = libcryptsetup_rs_sys::CRYPT_LOG_DEBUG_JSON as isize, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ enum already has `0` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_LOG_DEBUG_JSON` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/log.rs:26:39 [INFO] [stderr] | [INFO] [stderr] 26 | DebugJson = libcryptsetup_rs_sys::CRYPT_LOG_DEBUG_JSON as isize, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `CRYPT_LOG_DEBUG` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:4746 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | -------------------------------------- similarly named constant `CRYPT_LOG_DEBUG` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_REQUIREMENT_ONLINE_REENCRYPT` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_flags.rs:18:46 [INFO] [stderr] | [INFO] [stderr] 18 | OnlineReencrypt => libcryptsetup_rs_sys::CRYPT_REQUIREMENT_ONLINE_REENCRYPT, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `CRYPT_REQUIREMENT_OFFLINE_REENCRYPT` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:6902 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | --------------------------------------------------------- similarly named constant `CRYPT_REQUIREMENT_OFFLINE_REENCRYPT` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `crypt_reencrypt_info_CRYPT_REENCRYPT_NONE` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:24:35 [INFO] [stderr] | [INFO] [stderr] 24 | None => libcryptsetup_rs_sys::crypt_reencrypt_info_CRYPT_REENCRYPT_NONE, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `crypt_reencrypt_info_CRYPT_REENCRYPT_CLEAN` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:25:36 [INFO] [stderr] | [INFO] [stderr] 25 | Clean => libcryptsetup_rs_sys::crypt_reencrypt_info_CRYPT_REENCRYPT_CLEAN, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `crypt_reencrypt_info_CRYPT_REENCRYPT_CRASH` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:26:36 [INFO] [stderr] | [INFO] [stderr] 26 | Crash => libcryptsetup_rs_sys::crypt_reencrypt_info_CRYPT_REENCRYPT_CRASH, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `crypt_reencrypt_info_CRYPT_REENCRYPT_INVALID` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:27:38 [INFO] [stderr] | [INFO] [stderr] 27 | Invalid => libcryptsetup_rs_sys::crypt_reencrypt_info_CRYPT_REENCRYPT_INVALID [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `crypt_reencrypt_mode_info_CRYPT_REENCRYPT_REENCRYPT` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:34:40 [INFO] [stderr] | [INFO] [stderr] 34 | Reencrypt => libcryptsetup_rs_sys::crypt_reencrypt_mode_info_CRYPT_REENCRYPT_REENCRYPT, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `crypt_reencrypt_mode_info_CRYPT_REENCRYPT_ENCRYPT` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:35:38 [INFO] [stderr] | [INFO] [stderr] 35 | Encrypt => libcryptsetup_rs_sys::crypt_reencrypt_mode_info_CRYPT_REENCRYPT_ENCRYPT, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `crypt_reencrypt_mode_info_CRYPT_REENCRYPT_DECRYPT` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:36:38 [INFO] [stderr] | [INFO] [stderr] 36 | Decrypt => libcryptsetup_rs_sys::crypt_reencrypt_mode_info_CRYPT_REENCRYPT_DECRYPT [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `crypt_reencrypt_direction_info_CRYPT_REENCRYPT_FORWARD` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:43:38 [INFO] [stderr] | [INFO] [stderr] 43 | Forward => libcryptsetup_rs_sys::crypt_reencrypt_direction_info_CRYPT_REENCRYPT_FORWARD, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `crypt_reencrypt_direction_info_CRYPT_REENCRYPT_BACKWARD` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:44:39 [INFO] [stderr] | [INFO] [stderr] 44 | Backward => libcryptsetup_rs_sys::crypt_reencrypt_direction_info_CRYPT_REENCRYPT_BACKWARD [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_REENCRYPT_INITIALIZE_ONLY` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:51:45 [INFO] [stderr] | [INFO] [stderr] 51 | InitializeOnly => libcryptsetup_rs_sys::CRYPT_REENCRYPT_INITIALIZE_ONLY, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_REENCRYPT_MOVE_FIRST_SEGMENT` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:52:47 [INFO] [stderr] | [INFO] [stderr] 52 | MoveFirstSegment => libcryptsetup_rs_sys::CRYPT_REENCRYPT_MOVE_FIRST_SEGMENT, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_REENCRYPT_RESUME_ONLY` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:53:41 [INFO] [stderr] | [INFO] [stderr] 53 | ResumeOnly => libcryptsetup_rs_sys::CRYPT_REENCRYPT_RESUME_ONLY, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `CRYPT_REENCRYPT_RECOVERY` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:54:39 [INFO] [stderr] | [INFO] [stderr] 54 | Recovery => libcryptsetup_rs_sys::CRYPT_REENCRYPT_RECOVERY [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0412]: cannot find type `crypt_params_reencrypt` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:70:38 [INFO] [stderr] | [INFO] [stderr] 70 | pub inner: libcryptsetup_rs_sys::crypt_params_reencrypt, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: a struct with a similar name exists: `crypt_params_tcrypt` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:26710 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ------------------------------ similarly named struct `crypt_params_tcrypt` defined here [INFO] [stderr] [INFO] [stderr] error[E0422]: cannot find struct, variant or union type `crypt_params_reencrypt` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:112:43 [INFO] [stderr] | [INFO] [stderr] 112 | let inner = libcryptsetup_rs_sys::crypt_params_reencrypt { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: a struct with a similar name exists: `crypt_params_tcrypt` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:26710 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ------------------------------ similarly named struct `crypt_params_tcrypt` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_reencrypt_init_by_passphrase` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:163:35 [INFO] [stderr] | [INFO] [stderr] 163 | libcryptsetup_rs_sys::crypt_reencrypt_init_by_passphrase( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_activate_by_passphrase` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:45592 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- similarly named function `crypt_activate_by_passphrase` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_reencrypt_init_by_keyring` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:198:35 [INFO] [stderr] | [INFO] [stderr] 198 | libcryptsetup_rs_sys::crypt_reencrypt_init_by_keyring( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_reencrypt` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:213:47 [INFO] [stderr] | [INFO] [stderr] 213 | errno!(unsafe { libcryptsetup_rs_sys::crypt_reencrypt(self.reference.as_ptr(), progress) }) [INFO] [stderr] | ^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_reencrypt_status` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/luks2_reencrypt.rs:224:39 [INFO] [stderr] | [INFO] [stderr] 224 | libcryptsetup_rs_sys::crypt_reencrypt_status( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_keyslot_status` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:50969 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ------------------------------------------------------------------------------------------------------------------------ similarly named function `crypt_keyslot_status` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_get_active_integrity_failures` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/runtime.rs:68:35 [INFO] [stderr] | [INFO] [stderr] 68 | libcryptsetup_rs_sys::crypt_get_active_integrity_failures( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_get_pbkdf_type_params` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/settings.rs:326:35 [INFO] [stderr] | [INFO] [stderr] 326 | libcryptsetup_rs_sys::crypt_get_pbkdf_type_params(pbkdf_type.as_ptr()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_get_pbkdf_type` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:17287 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ------------------------------------------------------------------------------------- similarly named function `crypt_get_pbkdf_type` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_get_pbkdf_default` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/settings.rs:334:35 [INFO] [stderr] | [INFO] [stderr] 334 | libcryptsetup_rs_sys::crypt_get_pbkdf_default(luks_type.as_ptr()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_get_pbkdf_type` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:17287 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ------------------------------------------------------------------------------------- similarly named function `crypt_get_pbkdf_type` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_set_metadata_size` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/settings.rs:381:35 [INFO] [stderr] | [INFO] [stderr] 381 | libcryptsetup_rs_sys::crypt_set_metadata_size( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ not found in `libcryptsetup_rs_sys` [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_get_metadata_size` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/settings.rs:394:35 [INFO] [stderr] | [INFO] [stderr] 394 | libcryptsetup_rs_sys::crypt_get_metadata_size( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_get_sector_size` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:49396 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | ------------------------------------------------------------------------------------------ similarly named function `crypt_get_sector_size` defined here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find function `crypt_get_metadata_device_name` in crate `libcryptsetup_rs_sys` [INFO] [stderr] --> src/status.rs:83:35 [INFO] [stderr] | [INFO] [stderr] 83 | libcryptsetup_rs_sys::crypt_get_metadata_device_name(self.reference.as_ptr()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `crypt_get_device_name` [INFO] [stderr] | [INFO] [stderr] ::: /opt/rustwide/target/debug/build/libcryptsetup-rs-sys-b18c55e0c3fd682b/out/bindings.rs:3:49011 [INFO] [stderr] | [INFO] [stderr] 3 | # [ 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 unsafe fn as_ptr ( & self ) -> * const T { :: std :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: std :: mem :: transmute ( self ) } # [ 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" ) } } impl < T > :: std :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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_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_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_REQUIREMENT_OFFLINE_REENCRYPT : u32 = 1 ; 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_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 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 __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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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_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_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 ( 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_get_type ( cd : * mut crypt_device ) -> * 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 ; } 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_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 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_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 , keyfile_size_max : 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 , keyfile_size_max : 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 ; } # [ 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 ) ; } [INFO] [stderr] | --------------------------------------------------------------------------------------------------- similarly named function `crypt_get_device_name` defined here [INFO] [stderr] [INFO] [stderr] error: aborting due to 45 previous errors [INFO] [stderr] [INFO] [stderr] Some errors have detailed explanations: E0081, E0412, E0422, E0425. [INFO] [stderr] For more information about an error, try `rustc --explain E0081`. [INFO] [stderr] error: could not compile `libcryptsetup-rs`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error[E0081]: discriminant value `0` already exists [INFO] [stderr] --> src/log.rs:26:17 [INFO] [stderr] | [INFO] [stderr] 18 | Normal = libcryptsetup_rs_sys::CRYPT_LOG_NORMAL as isize, [INFO] [stderr] | ----------------------------------------------- first use of `0` [INFO] [stderr] ... [INFO] [stderr] 26 | DebugJson = libcryptsetup_rs_sys::CRYPT_LOG_DEBUG_JSON as isize, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ enum already has `0` [INFO] [stderr] [INFO] [stderr] error: aborting due to 45 previous errors [INFO] [stderr] [INFO] [stderr] Some errors have detailed explanations: E0081, E0412, E0422, E0425. [INFO] [stderr] For more information about an error, try `rustc --explain E0081`. [INFO] [stderr] error: could not compile `libcryptsetup-rs`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "a88047db4617977a61d4dc32f838cdd01a62d0cb3eeeed7f2e499bd65e914d6d"` [INFO] running `"docker" "rm" "-f" "a88047db4617977a61d4dc32f838cdd01a62d0cb3eeeed7f2e499bd65e914d6d"` [INFO] [stdout] a88047db4617977a61d4dc32f838cdd01a62d0cb3eeeed7f2e499bd65e914d6d