/* automatically generated by rust-bindgen 0.68.1 */ #[repr(C)] #[derive(Default)] pub struct __IncompleteArrayField(::std::marker::PhantomData, [T; 0]); impl __IncompleteArrayField { #[inline] pub const fn new() -> Self { __IncompleteArrayField(::std::marker::PhantomData, []) } #[inline] pub fn as_ptr(&self) -> *const T { self as *const _ as *const T } #[inline] pub fn as_mut_ptr(&mut self) -> *mut T { self as *mut _ as *mut T } #[inline] pub unsafe fn as_slice(&self, len: usize) -> &[T] { ::std::slice::from_raw_parts(self.as_ptr(), len) } #[inline] pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len) } } impl ::std::fmt::Debug for __IncompleteArrayField { fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { fmt.write_str("__IncompleteArrayField") } } pub const RULE_FLAGS_NULL: u32 = 4; pub const STRING_FLAGS_LAST_IN_RULE: u32 = 4096; pub const META_TYPE_INTEGER: u32 = 1; pub const META_TYPE_STRING: u32 = 2; pub const META_TYPE_BOOLEAN: u32 = 3; pub const META_FLAGS_LAST_IN_RULE: u32 = 1; pub const YARA_ERROR_LEVEL_ERROR: u32 = 0; pub const YARA_ERROR_LEVEL_WARNING: u32 = 1; pub const ERROR_SUCCESS: u32 = 0; pub const ERROR_INSUFICIENT_MEMORY: u32 = 1; pub const ERROR_INSUFFICIENT_MEMORY: u32 = 1; pub const ERROR_COULD_NOT_ATTACH_TO_PROCESS: u32 = 2; pub const ERROR_COULD_NOT_OPEN_FILE: u32 = 3; pub const ERROR_COULD_NOT_MAP_FILE: u32 = 4; pub const ERROR_INVALID_FILE: u32 = 6; pub const ERROR_CORRUPT_FILE: u32 = 7; pub const ERROR_UNSUPPORTED_FILE_VERSION: u32 = 8; pub const ERROR_INVALID_REGULAR_EXPRESSION: u32 = 9; pub const ERROR_INVALID_HEX_STRING: u32 = 10; pub const ERROR_SYNTAX_ERROR: u32 = 11; pub const ERROR_LOOP_NESTING_LIMIT_EXCEEDED: u32 = 12; pub const ERROR_DUPLICATED_LOOP_IDENTIFIER: u32 = 13; pub const ERROR_DUPLICATED_IDENTIFIER: u32 = 14; pub const ERROR_DUPLICATED_TAG_IDENTIFIER: u32 = 15; pub const ERROR_DUPLICATED_META_IDENTIFIER: u32 = 16; pub const ERROR_DUPLICATED_STRING_IDENTIFIER: u32 = 17; pub const ERROR_UNREFERENCED_STRING: u32 = 18; pub const ERROR_UNDEFINED_STRING: u32 = 19; pub const ERROR_UNDEFINED_IDENTIFIER: u32 = 20; pub const ERROR_MISPLACED_ANONYMOUS_STRING: u32 = 21; pub const ERROR_INCLUDES_CIRCULAR_REFERENCE: u32 = 22; pub const ERROR_INCLUDE_DEPTH_EXCEEDED: u32 = 23; pub const ERROR_WRONG_TYPE: u32 = 24; pub const ERROR_EXEC_STACK_OVERFLOW: u32 = 25; pub const ERROR_SCAN_TIMEOUT: u32 = 26; pub const ERROR_TOO_MANY_SCAN_THREADS: u32 = 27; pub const ERROR_CALLBACK_ERROR: u32 = 28; pub const ERROR_INVALID_ARGUMENT: u32 = 29; pub const ERROR_TOO_MANY_MATCHES: u32 = 30; pub const ERROR_INTERNAL_FATAL_ERROR: u32 = 31; pub const ERROR_NESTED_FOR_OF_LOOP: u32 = 32; pub const ERROR_INVALID_FIELD_NAME: u32 = 33; pub const ERROR_UNKNOWN_MODULE: u32 = 34; pub const ERROR_NOT_A_STRUCTURE: u32 = 35; pub const ERROR_NOT_INDEXABLE: u32 = 36; pub const ERROR_NOT_A_FUNCTION: u32 = 37; pub const ERROR_INVALID_FORMAT: u32 = 38; pub const ERROR_TOO_MANY_ARGUMENTS: u32 = 39; pub const ERROR_WRONG_ARGUMENTS: u32 = 40; pub const ERROR_WRONG_RETURN_TYPE: u32 = 41; pub const ERROR_DUPLICATED_STRUCTURE_MEMBER: u32 = 42; pub const ERROR_EMPTY_STRING: u32 = 43; pub const ERROR_DIVISION_BY_ZERO: u32 = 44; pub const ERROR_REGULAR_EXPRESSION_TOO_LARGE: u32 = 45; pub const ERROR_TOO_MANY_RE_FIBERS: u32 = 46; pub const ERROR_COULD_NOT_READ_PROCESS_MEMORY: u32 = 47; pub const ERROR_INVALID_EXTERNAL_VARIABLE_TYPE: u32 = 48; pub const ERROR_REGULAR_EXPRESSION_TOO_COMPLEX: u32 = 49; pub const ERROR_INVALID_MODULE_NAME: u32 = 50; pub const ERROR_TOO_MANY_STRINGS: u32 = 51; pub const ERROR_INTEGER_OVERFLOW: u32 = 52; pub const ERROR_CALLBACK_REQUIRED: u32 = 53; pub const ERROR_INVALID_OPERAND: u32 = 54; pub const ERROR_COULD_NOT_READ_FILE: u32 = 55; pub const ERROR_DUPLICATED_EXTERNAL_VARIABLE: u32 = 56; pub const ERROR_INVALID_MODULE_DATA: u32 = 57; pub const ERROR_WRITING_FILE: u32 = 58; pub const ERROR_INVALID_MODIFIER: u32 = 59; pub const ERROR_DUPLICATED_MODIFIER: u32 = 60; pub const ERROR_BLOCK_NOT_READY: u32 = 61; pub const ERROR_INVALID_PERCENTAGE: u32 = 62; pub const ERROR_IDENTIFIER_MATCHES_WILDCARD: u32 = 63; pub const ERROR_INVALID_VALUE: u32 = 64; pub const ERROR_TOO_SLOW_SCANNING: u32 = 65; pub const ERROR_UNKNOWN_ESCAPE_SEQUENCE: u32 = 66; pub const CALLBACK_MSG_RULE_MATCHING: u32 = 1; pub const CALLBACK_MSG_RULE_NOT_MATCHING: u32 = 2; pub const CALLBACK_MSG_SCAN_FINISHED: u32 = 3; pub const CALLBACK_MSG_IMPORT_MODULE: u32 = 4; pub const CALLBACK_MSG_MODULE_IMPORTED: u32 = 5; pub const CALLBACK_MSG_TOO_MANY_MATCHES: u32 = 6; pub const CALLBACK_MSG_CONSOLE_LOG: u32 = 7; pub const CALLBACK_MSG_TOO_SLOW_SCANNING: u32 = 8; pub const CALLBACK_CONTINUE: u32 = 0; pub const CALLBACK_ABORT: u32 = 1; pub const CALLBACK_ERROR: u32 = 2; pub const SCAN_FLAGS_FAST_MODE: u32 = 1; pub const SCAN_FLAGS_PROCESS_MEMORY: u32 = 2; pub const SCAN_FLAGS_NO_TRYCATCH: u32 = 4; pub const SCAN_FLAGS_REPORT_RULES_MATCHING: u32 = 8; pub const SCAN_FLAGS_REPORT_RULES_NOT_MATCHING: u32 = 16; pub const YR_UNDEFINED: i64 = -1483400188077313; pub const OBJECT_TYPE_INTEGER: u32 = 1; pub const OBJECT_TYPE_STRING: u32 = 2; pub const OBJECT_TYPE_STRUCTURE: u32 = 3; pub const OBJECT_TYPE_ARRAY: u32 = 4; pub const OBJECT_TYPE_FUNCTION: u32 = 5; pub const OBJECT_TYPE_DICTIONARY: u32 = 6; pub const OBJECT_TYPE_FLOAT: u32 = 7; pub type jmp_buf = [::std::os::raw::c_int; 48usize]; pub type __int64_t = ::std::os::raw::c_longlong; pub type __darwin_size_t = ::std::os::raw::c_ulong; pub type __darwin_off_t = __int64_t; pub type size_t = __darwin_size_t; pub type fpos_t = __darwin_off_t; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sbuf { pub _base: *mut ::std::os::raw::c_uchar, pub _size: ::std::os::raw::c_int, } #[test] fn bindgen_test_layout___sbuf() { const UNINIT: ::std::mem::MaybeUninit<__sbuf> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__sbuf>(), 16usize, concat!("Size of: ", stringify!(__sbuf)) ); assert_eq!( ::std::mem::align_of::<__sbuf>(), 8usize, concat!("Alignment of ", stringify!(__sbuf)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._base) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(__sbuf), "::", stringify!(_base) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._size) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(__sbuf), "::", stringify!(_size) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sFILEX { _unused: [u8; 0], } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sFILE { pub _p: *mut ::std::os::raw::c_uchar, pub _r: ::std::os::raw::c_int, pub _w: ::std::os::raw::c_int, pub _flags: ::std::os::raw::c_short, pub _file: ::std::os::raw::c_short, pub _bf: __sbuf, pub _lbfsize: ::std::os::raw::c_int, pub _cookie: *mut ::std::os::raw::c_void, pub _close: ::std::option::Option< unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, >, pub _read: ::std::option::Option< unsafe extern "C" fn( arg1: *mut ::std::os::raw::c_void, arg2: *mut ::std::os::raw::c_char, arg3: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int, >, pub _seek: ::std::option::Option< unsafe extern "C" fn( arg1: *mut ::std::os::raw::c_void, arg2: fpos_t, arg3: ::std::os::raw::c_int, ) -> fpos_t, >, pub _write: ::std::option::Option< unsafe extern "C" fn( arg1: *mut ::std::os::raw::c_void, arg2: *const ::std::os::raw::c_char, arg3: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int, >, pub _ub: __sbuf, pub _extra: *mut __sFILEX, pub _ur: ::std::os::raw::c_int, pub _ubuf: [::std::os::raw::c_uchar; 3usize], pub _nbuf: [::std::os::raw::c_uchar; 1usize], pub _lb: __sbuf, pub _blksize: ::std::os::raw::c_int, pub _offset: fpos_t, } #[test] fn bindgen_test_layout___sFILE() { const UNINIT: ::std::mem::MaybeUninit<__sFILE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__sFILE>(), 152usize, concat!("Size of: ", stringify!(__sFILE)) ); assert_eq!( ::std::mem::align_of::<__sFILE>(), 8usize, concat!("Alignment of ", stringify!(__sFILE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._p) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(__sFILE), "::", stringify!(_p) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._r) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(__sFILE), "::", stringify!(_r) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._w) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(__sFILE), "::", stringify!(_w) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(__sFILE), "::", stringify!(_flags) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._file) as usize - ptr as usize }, 18usize, concat!( "Offset of field: ", stringify!(__sFILE), "::", stringify!(_file) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._bf) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(__sFILE), "::", stringify!(_bf) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._lbfsize) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(__sFILE), "::", stringify!(_lbfsize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._cookie) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(__sFILE), "::", stringify!(_cookie) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._close) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(__sFILE), "::", stringify!(_close) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._read) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(__sFILE), "::", stringify!(_read) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._seek) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", stringify!(__sFILE), "::", stringify!(_seek) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._write) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", stringify!(__sFILE), "::", stringify!(_write) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._ub) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", stringify!(__sFILE), "::", stringify!(_ub) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._extra) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", stringify!(__sFILE), "::", stringify!(_extra) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._ur) as usize - ptr as usize }, 112usize, concat!( "Offset of field: ", stringify!(__sFILE), "::", stringify!(_ur) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._ubuf) as usize - ptr as usize }, 116usize, concat!( "Offset of field: ", stringify!(__sFILE), "::", stringify!(_ubuf) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._nbuf) as usize - ptr as usize }, 119usize, concat!( "Offset of field: ", stringify!(__sFILE), "::", stringify!(_nbuf) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._lb) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", stringify!(__sFILE), "::", stringify!(_lb) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._blksize) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", stringify!(__sFILE), "::", stringify!(_blksize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._offset) as usize - ptr as usize }, 144usize, concat!( "Offset of field: ", stringify!(__sFILE), "::", stringify!(_offset) ) ); } pub type FILE = __sFILE; pub type YR_STREAM_READ_FUNC = ::std::option::Option< unsafe extern "C" fn( ptr: *mut ::std::os::raw::c_void, size: size_t, count: size_t, user_data: *mut ::std::os::raw::c_void, ) -> size_t, >; pub type YR_STREAM_WRITE_FUNC = ::std::option::Option< unsafe extern "C" fn( ptr: *const ::std::os::raw::c_void, size: size_t, count: size_t, user_data: *mut ::std::os::raw::c_void, ) -> size_t, >; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _YR_STREAM { pub user_data: *mut ::std::os::raw::c_void, pub read: YR_STREAM_READ_FUNC, pub write: YR_STREAM_WRITE_FUNC, } #[test] fn bindgen_test_layout__YR_STREAM() { const UNINIT: ::std::mem::MaybeUninit<_YR_STREAM> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_YR_STREAM>(), 24usize, concat!("Size of: ", stringify!(_YR_STREAM)) ); assert_eq!( ::std::mem::align_of::<_YR_STREAM>(), 8usize, concat!("Alignment of ", stringify!(_YR_STREAM)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).user_data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_YR_STREAM), "::", stringify!(user_data) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).read) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_YR_STREAM), "::", stringify!(read) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).write) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_YR_STREAM), "::", stringify!(write) ) ); } pub type YR_STREAM = _YR_STREAM; pub type yr_arena_off_t = u32; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_ARENA_REF { pub buffer_id: u32, pub offset: yr_arena_off_t, } #[test] fn bindgen_test_layout_YR_ARENA_REF() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_ARENA_REF)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(YR_ARENA_REF)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer_id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_ARENA_REF), "::", stringify!(buffer_id) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(YR_ARENA_REF), "::", stringify!(offset) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_ARENA_BUFFER { pub data: *mut u8, pub size: size_t, pub used: size_t, } #[test] fn bindgen_test_layout_YR_ARENA_BUFFER() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(YR_ARENA_BUFFER)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_ARENA_BUFFER)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_ARENA_BUFFER), "::", stringify!(data) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_ARENA_BUFFER), "::", stringify!(size) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).used) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(YR_ARENA_BUFFER), "::", stringify!(used) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_RELOC { pub buffer_id: u32, pub offset: yr_arena_off_t, pub next: *mut YR_RELOC, } #[test] fn bindgen_test_layout_YR_RELOC() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(YR_RELOC)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_RELOC)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer_id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RELOC), "::", stringify!(buffer_id) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(YR_RELOC), "::", stringify!(offset) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_RELOC), "::", stringify!(next) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_ARENA { pub xrefs: u32, pub num_buffers: u32, pub buffers: [YR_ARENA_BUFFER; 16usize], pub initial_buffer_size: size_t, pub reloc_list_head: *mut YR_RELOC, pub reloc_list_tail: *mut YR_RELOC, } #[test] fn bindgen_test_layout_YR_ARENA() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 416usize, concat!("Size of: ", stringify!(YR_ARENA)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_ARENA)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xrefs) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_ARENA), "::", stringify!(xrefs) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).num_buffers) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(YR_ARENA), "::", stringify!(num_buffers) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffers) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_ARENA), "::", stringify!(buffers) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).initial_buffer_size) as usize - ptr as usize }, 392usize, concat!( "Offset of field: ", stringify!(YR_ARENA), "::", stringify!(initial_buffer_size) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reloc_list_head) as usize - ptr as usize }, 400usize, concat!( "Offset of field: ", stringify!(YR_ARENA), "::", stringify!(reloc_list_head) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reloc_list_tail) as usize - ptr as usize }, 408usize, concat!( "Offset of field: ", stringify!(YR_ARENA), "::", stringify!(reloc_list_tail) ) ); } #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct _SIZED_STRING { pub length: u32, pub flags: u32, pub c_string: [::std::os::raw::c_char; 1usize], } #[test] fn bindgen_test_layout__SIZED_STRING() { const UNINIT: ::std::mem::MaybeUninit<_SIZED_STRING> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SIZED_STRING>(), 9usize, concat!("Size of: ", stringify!(_SIZED_STRING)) ); assert_eq!( ::std::mem::align_of::<_SIZED_STRING>(), 1usize, concat!("Alignment of ", stringify!(_SIZED_STRING)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SIZED_STRING), "::", stringify!(length) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_SIZED_STRING), "::", stringify!(flags) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).c_string) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SIZED_STRING), "::", stringify!(c_string) ) ); } pub type SIZED_STRING = _SIZED_STRING; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _YR_HASH_TABLE_ENTRY { pub key: *mut ::std::os::raw::c_void, pub key_length: size_t, pub ns: *mut ::std::os::raw::c_char, pub value: *mut ::std::os::raw::c_void, pub next: *mut _YR_HASH_TABLE_ENTRY, } #[test] fn bindgen_test_layout__YR_HASH_TABLE_ENTRY() { const UNINIT: ::std::mem::MaybeUninit<_YR_HASH_TABLE_ENTRY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_YR_HASH_TABLE_ENTRY>(), 40usize, concat!("Size of: ", stringify!(_YR_HASH_TABLE_ENTRY)) ); assert_eq!( ::std::mem::align_of::<_YR_HASH_TABLE_ENTRY>(), 8usize, concat!("Alignment of ", stringify!(_YR_HASH_TABLE_ENTRY)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_YR_HASH_TABLE_ENTRY), "::", stringify!(key) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).key_length) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_YR_HASH_TABLE_ENTRY), "::", stringify!(key_length) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ns) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_YR_HASH_TABLE_ENTRY), "::", stringify!(ns) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_YR_HASH_TABLE_ENTRY), "::", stringify!(value) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_YR_HASH_TABLE_ENTRY), "::", stringify!(next) ) ); } pub type YR_HASH_TABLE_ENTRY = _YR_HASH_TABLE_ENTRY; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _YR_HASH_TABLE { pub size: ::std::os::raw::c_int, pub buckets: [*mut YR_HASH_TABLE_ENTRY; 1usize], } #[test] fn bindgen_test_layout__YR_HASH_TABLE() { const UNINIT: ::std::mem::MaybeUninit<_YR_HASH_TABLE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_YR_HASH_TABLE>(), 16usize, concat!("Size of: ", stringify!(_YR_HASH_TABLE)) ); assert_eq!( ::std::mem::align_of::<_YR_HASH_TABLE>(), 8usize, concat!("Alignment of ", stringify!(_YR_HASH_TABLE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_YR_HASH_TABLE), "::", stringify!(size) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buckets) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_YR_HASH_TABLE), "::", stringify!(buckets) ) ); } pub type YR_HASH_TABLE = _YR_HASH_TABLE; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct mach_timebase_info { pub numer: u32, pub denom: u32, } #[test] fn bindgen_test_layout_mach_timebase_info() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(mach_timebase_info)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(mach_timebase_info)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).numer) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(mach_timebase_info), "::", stringify!(numer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).denom) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(mach_timebase_info), "::", stringify!(denom) ) ); } pub type mach_timebase_info_data_t = mach_timebase_info; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _YR_STOPWATCH { pub timebase: mach_timebase_info_data_t, pub start: u64, } #[test] fn bindgen_test_layout__YR_STOPWATCH() { const UNINIT: ::std::mem::MaybeUninit<_YR_STOPWATCH> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_YR_STOPWATCH>(), 16usize, concat!("Size of: ", stringify!(_YR_STOPWATCH)) ); assert_eq!( ::std::mem::align_of::<_YR_STOPWATCH>(), 8usize, concat!("Alignment of ", stringify!(_YR_STOPWATCH)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).timebase) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_YR_STOPWATCH), "::", stringify!(timebase) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_YR_STOPWATCH), "::", stringify!(start) ) ); } pub type YR_STOPWATCH = _YR_STOPWATCH; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_NOTEBOOK { _unused: [u8; 0], } pub type YR_AC_TRANSITION = u32; #[repr(C)] #[derive(Copy, Clone)] pub struct YR_NAMESPACE { pub __bindgen_anon_1: YR_NAMESPACE__bindgen_ty_1, pub idx: u32, } #[repr(C)] #[derive(Copy, Clone)] pub union YR_NAMESPACE__bindgen_ty_1 { pub name: *const ::std::os::raw::c_char, pub name_: YR_ARENA_REF, } #[test] fn bindgen_test_layout_YR_NAMESPACE__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_NAMESPACE__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_NAMESPACE__bindgen_ty_1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_NAMESPACE__bindgen_ty_1), "::", stringify!(name) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_NAMESPACE__bindgen_ty_1), "::", stringify!(name_) ) ); } #[test] fn bindgen_test_layout_YR_NAMESPACE() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(YR_NAMESPACE)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_NAMESPACE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).idx) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_NAMESPACE), "::", stringify!(idx) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub struct YR_META { pub __bindgen_anon_1: YR_META__bindgen_ty_1, pub __bindgen_anon_2: YR_META__bindgen_ty_2, pub integer: i64, pub type_: i32, pub flags: i32, } #[repr(C)] #[derive(Copy, Clone)] pub union YR_META__bindgen_ty_1 { pub identifier: *const ::std::os::raw::c_char, pub identifier_: YR_ARENA_REF, } #[test] fn bindgen_test_layout_YR_META__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_META__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_META__bindgen_ty_1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).identifier) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_META__bindgen_ty_1), "::", stringify!(identifier) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).identifier_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_META__bindgen_ty_1), "::", stringify!(identifier_) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub union YR_META__bindgen_ty_2 { pub string: *const ::std::os::raw::c_char, pub string_: YR_ARENA_REF, } #[test] fn bindgen_test_layout_YR_META__bindgen_ty_2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_META__bindgen_ty_2)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_META__bindgen_ty_2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).string) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_META__bindgen_ty_2), "::", stringify!(string) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).string_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_META__bindgen_ty_2), "::", stringify!(string_) ) ); } #[test] fn bindgen_test_layout_YR_META() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(YR_META)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_META)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).integer) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(YR_META), "::", stringify!(integer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(YR_META), "::", stringify!(type_) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", stringify!(YR_META), "::", stringify!(flags) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub struct YR_STRING { pub flags: u32, pub idx: u32, pub fixed_offset: i64, pub rule_idx: u32, pub length: i32, pub __bindgen_anon_1: YR_STRING__bindgen_ty_1, pub __bindgen_anon_2: YR_STRING__bindgen_ty_2, pub chain_gap_min: i32, pub chain_gap_max: i32, pub __bindgen_anon_3: YR_STRING__bindgen_ty_3, } #[repr(C)] #[derive(Copy, Clone)] pub union YR_STRING__bindgen_ty_1 { pub string: *mut u8, pub string_: YR_ARENA_REF, } #[test] fn bindgen_test_layout_YR_STRING__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_STRING__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_STRING__bindgen_ty_1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).string) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_STRING__bindgen_ty_1), "::", stringify!(string) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).string_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_STRING__bindgen_ty_1), "::", stringify!(string_) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub union YR_STRING__bindgen_ty_2 { pub chained_to: *mut YR_STRING, pub chained_to_: YR_ARENA_REF, } #[test] fn bindgen_test_layout_YR_STRING__bindgen_ty_2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_STRING__bindgen_ty_2)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_STRING__bindgen_ty_2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).chained_to) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_STRING__bindgen_ty_2), "::", stringify!(chained_to) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).chained_to_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_STRING__bindgen_ty_2), "::", stringify!(chained_to_) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub union YR_STRING__bindgen_ty_3 { pub identifier: *const ::std::os::raw::c_char, pub identifier_: YR_ARENA_REF, } #[test] fn bindgen_test_layout_YR_STRING__bindgen_ty_3() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_STRING__bindgen_ty_3)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_STRING__bindgen_ty_3)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).identifier) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_STRING__bindgen_ty_3), "::", stringify!(identifier) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).identifier_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_STRING__bindgen_ty_3), "::", stringify!(identifier_) ) ); } #[test] fn bindgen_test_layout_YR_STRING() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 56usize, concat!("Size of: ", stringify!(YR_STRING)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_STRING)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_STRING), "::", stringify!(flags) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).idx) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(YR_STRING), "::", stringify!(idx) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fixed_offset) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_STRING), "::", stringify!(fixed_offset) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rule_idx) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(YR_STRING), "::", stringify!(rule_idx) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", stringify!(YR_STRING), "::", stringify!(length) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).chain_gap_min) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(YR_STRING), "::", stringify!(chain_gap_min) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).chain_gap_max) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", stringify!(YR_STRING), "::", stringify!(chain_gap_max) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub struct YR_RULE { pub flags: i32, pub num_atoms: i32, pub required_strings: u32, pub unused: u32, pub __bindgen_anon_1: YR_RULE__bindgen_ty_1, pub __bindgen_anon_2: YR_RULE__bindgen_ty_2, pub __bindgen_anon_3: YR_RULE__bindgen_ty_3, pub __bindgen_anon_4: YR_RULE__bindgen_ty_4, pub __bindgen_anon_5: YR_RULE__bindgen_ty_5, } #[repr(C)] #[derive(Copy, Clone)] pub union YR_RULE__bindgen_ty_1 { pub identifier: *const ::std::os::raw::c_char, pub identifier_: YR_ARENA_REF, } #[test] fn bindgen_test_layout_YR_RULE__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_RULE__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_RULE__bindgen_ty_1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).identifier) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RULE__bindgen_ty_1), "::", stringify!(identifier) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).identifier_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RULE__bindgen_ty_1), "::", stringify!(identifier_) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub union YR_RULE__bindgen_ty_2 { pub tags: *const ::std::os::raw::c_char, pub tags_: YR_ARENA_REF, } #[test] fn bindgen_test_layout_YR_RULE__bindgen_ty_2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_RULE__bindgen_ty_2)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_RULE__bindgen_ty_2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tags) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RULE__bindgen_ty_2), "::", stringify!(tags) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tags_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RULE__bindgen_ty_2), "::", stringify!(tags_) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub union YR_RULE__bindgen_ty_3 { pub metas: *mut YR_META, pub metas_: YR_ARENA_REF, } #[test] fn bindgen_test_layout_YR_RULE__bindgen_ty_3() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_RULE__bindgen_ty_3)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_RULE__bindgen_ty_3)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).metas) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RULE__bindgen_ty_3), "::", stringify!(metas) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).metas_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RULE__bindgen_ty_3), "::", stringify!(metas_) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub union YR_RULE__bindgen_ty_4 { pub strings: *mut YR_STRING, pub strings_: YR_ARENA_REF, } #[test] fn bindgen_test_layout_YR_RULE__bindgen_ty_4() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_RULE__bindgen_ty_4)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_RULE__bindgen_ty_4)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).strings) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RULE__bindgen_ty_4), "::", stringify!(strings) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).strings_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RULE__bindgen_ty_4), "::", stringify!(strings_) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub union YR_RULE__bindgen_ty_5 { pub ns: *mut YR_NAMESPACE, pub ns_: YR_ARENA_REF, } #[test] fn bindgen_test_layout_YR_RULE__bindgen_ty_5() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_RULE__bindgen_ty_5)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_RULE__bindgen_ty_5)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ns) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RULE__bindgen_ty_5), "::", stringify!(ns) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ns_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RULE__bindgen_ty_5), "::", stringify!(ns_) ) ); } #[test] fn bindgen_test_layout_YR_RULE() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 56usize, concat!("Size of: ", stringify!(YR_RULE)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_RULE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RULE), "::", stringify!(flags) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).num_atoms) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(YR_RULE), "::", stringify!(num_atoms) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).required_strings) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_RULE), "::", stringify!(required_strings) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(YR_RULE), "::", stringify!(unused) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub struct YR_EXTERNAL_VARIABLE { pub type_: i32, pub value: YR_EXTERNAL_VARIABLE__bindgen_ty_1, pub __bindgen_anon_1: YR_EXTERNAL_VARIABLE__bindgen_ty_2, } #[repr(C)] #[derive(Copy, Clone)] pub union YR_EXTERNAL_VARIABLE__bindgen_ty_1 { pub i: i64, pub f: f64, pub s: *mut ::std::os::raw::c_char, } #[test] fn bindgen_test_layout_YR_EXTERNAL_VARIABLE__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_EXTERNAL_VARIABLE__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(YR_EXTERNAL_VARIABLE__bindgen_ty_1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_EXTERNAL_VARIABLE__bindgen_ty_1), "::", stringify!(i) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_EXTERNAL_VARIABLE__bindgen_ty_1), "::", stringify!(f) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).s) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_EXTERNAL_VARIABLE__bindgen_ty_1), "::", stringify!(s) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub union YR_EXTERNAL_VARIABLE__bindgen_ty_2 { pub identifier: *const ::std::os::raw::c_char, pub identifier_: YR_ARENA_REF, } #[test] fn bindgen_test_layout_YR_EXTERNAL_VARIABLE__bindgen_ty_2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_EXTERNAL_VARIABLE__bindgen_ty_2)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(YR_EXTERNAL_VARIABLE__bindgen_ty_2) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).identifier) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_EXTERNAL_VARIABLE__bindgen_ty_2), "::", stringify!(identifier) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).identifier_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_EXTERNAL_VARIABLE__bindgen_ty_2), "::", stringify!(identifier_) ) ); } #[test] fn bindgen_test_layout_YR_EXTERNAL_VARIABLE() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(YR_EXTERNAL_VARIABLE)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_EXTERNAL_VARIABLE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_EXTERNAL_VARIABLE), "::", stringify!(type_) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_EXTERNAL_VARIABLE), "::", stringify!(value) ) ); } #[repr(C)] #[repr(align(8))] #[derive(Debug, Copy, Clone)] pub struct YR_AC_MATCH { pub _bindgen_opaque_blob: [u64; 5usize], } #[repr(C)] #[repr(align(8))] #[derive(Copy, Clone)] pub union YR_AC_MATCH__bindgen_ty_1 { pub _bindgen_opaque_blob: u64, } #[test] fn bindgen_test_layout_YR_AC_MATCH__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_AC_MATCH__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_AC_MATCH__bindgen_ty_1)) ); } #[repr(C)] #[repr(align(8))] #[derive(Copy, Clone)] pub union YR_AC_MATCH__bindgen_ty_2 { pub _bindgen_opaque_blob: u64, } #[test] fn bindgen_test_layout_YR_AC_MATCH__bindgen_ty_2() { assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_AC_MATCH__bindgen_ty_2)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_AC_MATCH__bindgen_ty_2)) ); } #[repr(C)] #[repr(align(8))] #[derive(Copy, Clone)] pub union YR_AC_MATCH__bindgen_ty_3 { pub _bindgen_opaque_blob: u64, } #[test] fn bindgen_test_layout_YR_AC_MATCH__bindgen_ty_3() { assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_AC_MATCH__bindgen_ty_3)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_AC_MATCH__bindgen_ty_3)) ); } #[repr(C)] #[repr(align(8))] #[derive(Copy, Clone)] pub union YR_AC_MATCH__bindgen_ty_4 { pub _bindgen_opaque_blob: u64, } #[test] fn bindgen_test_layout_YR_AC_MATCH__bindgen_ty_4() { assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_AC_MATCH__bindgen_ty_4)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_AC_MATCH__bindgen_ty_4)) ); } #[test] fn bindgen_test_layout_YR_AC_MATCH() { assert_eq!( ::std::mem::size_of::(), 40usize, concat!("Size of: ", stringify!(YR_AC_MATCH)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_AC_MATCH)) ); } #[repr(C)] #[derive(Copy, Clone)] pub struct RE_NODE { pub type_: ::std::os::raw::c_int, pub __bindgen_anon_1: RE_NODE__bindgen_ty_1, pub __bindgen_anon_2: RE_NODE__bindgen_ty_2, pub greedy: ::std::os::raw::c_int, pub re_class: *mut RE_CLASS, pub children_head: *mut RE_NODE, pub children_tail: *mut RE_NODE, pub prev_sibling: *mut RE_NODE, pub next_sibling: *mut RE_NODE, pub forward_code_ref: YR_ARENA_REF, pub backward_code_ref: YR_ARENA_REF, } #[repr(C)] #[derive(Copy, Clone)] pub union RE_NODE__bindgen_ty_1 { pub value: ::std::os::raw::c_int, pub count: ::std::os::raw::c_int, pub start: ::std::os::raw::c_int, } #[test] fn bindgen_test_layout_RE_NODE__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, concat!("Size of: ", stringify!(RE_NODE__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(RE_NODE__bindgen_ty_1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(RE_NODE__bindgen_ty_1), "::", stringify!(value) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(RE_NODE__bindgen_ty_1), "::", stringify!(count) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(RE_NODE__bindgen_ty_1), "::", stringify!(start) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub union RE_NODE__bindgen_ty_2 { pub mask: ::std::os::raw::c_int, pub end: ::std::os::raw::c_int, } #[test] fn bindgen_test_layout_RE_NODE__bindgen_ty_2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, concat!("Size of: ", stringify!(RE_NODE__bindgen_ty_2)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(RE_NODE__bindgen_ty_2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mask) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(RE_NODE__bindgen_ty_2), "::", stringify!(mask) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).end) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(RE_NODE__bindgen_ty_2), "::", stringify!(end) ) ); } #[test] fn bindgen_test_layout_RE_NODE() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 72usize, concat!("Size of: ", stringify!(RE_NODE)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(RE_NODE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(RE_NODE), "::", stringify!(type_) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).greedy) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(RE_NODE), "::", stringify!(greedy) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).re_class) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(RE_NODE), "::", stringify!(re_class) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).children_head) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(RE_NODE), "::", stringify!(children_head) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).children_tail) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(RE_NODE), "::", stringify!(children_tail) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).prev_sibling) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(RE_NODE), "::", stringify!(prev_sibling) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).next_sibling) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(RE_NODE), "::", stringify!(next_sibling) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).forward_code_ref) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(RE_NODE), "::", stringify!(forward_code_ref) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).backward_code_ref) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(RE_NODE), "::", stringify!(backward_code_ref) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct RE_CLASS { pub negated: u8, pub bitmap: [u8; 32usize], } #[test] fn bindgen_test_layout_RE_CLASS() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 33usize, concat!("Size of: ", stringify!(RE_CLASS)) ); assert_eq!( ::std::mem::align_of::(), 1usize, concat!("Alignment of ", stringify!(RE_CLASS)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).negated) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(RE_CLASS), "::", stringify!(negated) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bitmap) as usize - ptr as usize }, 1usize, concat!( "Offset of field: ", stringify!(RE_CLASS), "::", stringify!(bitmap) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct RE_AST { pub flags: u32, pub root_node: *mut RE_NODE, } #[test] fn bindgen_test_layout_RE_AST() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(RE_AST)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(RE_AST)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(RE_AST), "::", stringify!(flags) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).root_node) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(RE_AST), "::", stringify!(root_node) ) ); } #[repr(C, packed)] pub struct RE { pub flags: u32, pub code: __IncompleteArrayField, } #[test] fn bindgen_test_layout_RE() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, concat!("Size of: ", stringify!(RE)) ); assert_eq!( ::std::mem::align_of::(), 1usize, concat!("Alignment of ", stringify!(RE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(RE), "::", stringify!(flags)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).code) as usize - ptr as usize }, 4usize, concat!("Offset of field: ", stringify!(RE), "::", stringify!(code)) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct RE_FIBER { pub ip: *const u8, pub sp: i32, pub rc: i32, pub prev: *mut RE_FIBER, pub next: *mut RE_FIBER, pub stack: [u16; 1024usize], } #[test] fn bindgen_test_layout_RE_FIBER() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 2080usize, concat!("Size of: ", stringify!(RE_FIBER)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(RE_FIBER)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ip) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(RE_FIBER), "::", stringify!(ip) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sp) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(RE_FIBER), "::", stringify!(sp) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rc) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(RE_FIBER), "::", stringify!(rc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(RE_FIBER), "::", stringify!(prev) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(RE_FIBER), "::", stringify!(next) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stack) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(RE_FIBER), "::", stringify!(stack) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct RE_FIBER_LIST { pub head: *mut RE_FIBER, pub tail: *mut RE_FIBER, } #[test] fn bindgen_test_layout_RE_FIBER_LIST() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(RE_FIBER_LIST)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(RE_FIBER_LIST)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(RE_FIBER_LIST), "::", stringify!(head) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tail) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(RE_FIBER_LIST), "::", stringify!(tail) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct RE_FIBER_POOL { pub fiber_count: ::std::os::raw::c_int, pub fibers: RE_FIBER_LIST, } #[test] fn bindgen_test_layout_RE_FIBER_POOL() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(RE_FIBER_POOL)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(RE_FIBER_POOL)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fiber_count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(RE_FIBER_POOL), "::", stringify!(fiber_count) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fibers) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(RE_FIBER_POOL), "::", stringify!(fibers) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct RE_FAST_EXEC_POSITION { pub round: ::std::os::raw::c_int, pub input: *const u8, pub prev: *mut RE_FAST_EXEC_POSITION, pub next: *mut RE_FAST_EXEC_POSITION, } #[test] fn bindgen_test_layout_RE_FAST_EXEC_POSITION() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(RE_FAST_EXEC_POSITION)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(RE_FAST_EXEC_POSITION)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).round) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(RE_FAST_EXEC_POSITION), "::", stringify!(round) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).input) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(RE_FAST_EXEC_POSITION), "::", stringify!(input) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(RE_FAST_EXEC_POSITION), "::", stringify!(prev) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(RE_FAST_EXEC_POSITION), "::", stringify!(next) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct RE_FAST_EXEC_POSITION_POOL { pub head: *mut RE_FAST_EXEC_POSITION, } #[test] fn bindgen_test_layout_RE_FAST_EXEC_POSITION_POOL() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(RE_FAST_EXEC_POSITION_POOL)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(RE_FAST_EXEC_POSITION_POOL)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(RE_FAST_EXEC_POSITION_POOL), "::", stringify!(head) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_MATCHES { pub head: *mut YR_MATCH, pub tail: *mut YR_MATCH, pub count: i32, } #[test] fn bindgen_test_layout_YR_MATCHES() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(YR_MATCHES)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_MATCHES)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_MATCHES), "::", stringify!(head) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tail) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_MATCHES), "::", stringify!(tail) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(YR_MATCHES), "::", stringify!(count) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_MATCH { pub base: i64, pub offset: i64, pub match_length: i32, pub data_length: i32, pub data: *const u8, pub prev: *mut YR_MATCH, pub next: *mut YR_MATCH, pub chain_length: i32, pub is_private: bool, pub xor_key: u8, } #[test] fn bindgen_test_layout_YR_MATCH() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 56usize, concat!("Size of: ", stringify!(YR_MATCH)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_MATCH)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_MATCH), "::", stringify!(base) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_MATCH), "::", stringify!(offset) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).match_length) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(YR_MATCH), "::", stringify!(match_length) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data_length) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", stringify!(YR_MATCH), "::", stringify!(data_length) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(YR_MATCH), "::", stringify!(data) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(YR_MATCH), "::", stringify!(prev) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(YR_MATCH), "::", stringify!(next) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).chain_length) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(YR_MATCH), "::", stringify!(chain_length) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).is_private) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", stringify!(YR_MATCH), "::", stringify!(is_private) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xor_key) as usize - ptr as usize }, 53usize, concat!( "Offset of field: ", stringify!(YR_MATCH), "::", stringify!(xor_key) ) ); } #[repr(C)] #[repr(align(8))] #[derive(Debug, Copy, Clone)] pub struct YR_AC_AUTOMATON { pub _bindgen_opaque_blob: [u64; 4usize], } #[test] fn bindgen_test_layout_YR_AC_AUTOMATON() { assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(YR_AC_AUTOMATON)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_AC_AUTOMATON)) ); } #[repr(C)] #[derive(Copy, Clone)] pub struct YR_RULES { pub arena: *mut YR_ARENA, pub __bindgen_anon_1: YR_RULES__bindgen_ty_1, pub __bindgen_anon_2: YR_RULES__bindgen_ty_2, pub __bindgen_anon_3: YR_RULES__bindgen_ty_3, pub ac_transition_table: *mut YR_AC_TRANSITION, pub ac_match_pool: *mut YR_AC_MATCH, pub ac_match_table: *mut u32, pub code_start: *const u8, pub no_required_strings: *mut ::std::os::raw::c_ulong, pub num_rules: u32, pub num_strings: u32, pub num_namespaces: u32, } #[repr(C)] #[derive(Copy, Clone)] pub union YR_RULES__bindgen_ty_1 { pub rules_table: *mut YR_RULE, pub rules_list_head: *mut YR_RULE, } #[test] fn bindgen_test_layout_YR_RULES__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_RULES__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_RULES__bindgen_ty_1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rules_table) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RULES__bindgen_ty_1), "::", stringify!(rules_table) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rules_list_head) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RULES__bindgen_ty_1), "::", stringify!(rules_list_head) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub union YR_RULES__bindgen_ty_2 { pub strings_table: *mut YR_STRING, pub strings_list_head: *mut YR_STRING, } #[test] fn bindgen_test_layout_YR_RULES__bindgen_ty_2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_RULES__bindgen_ty_2)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_RULES__bindgen_ty_2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).strings_table) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RULES__bindgen_ty_2), "::", stringify!(strings_table) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).strings_list_head) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RULES__bindgen_ty_2), "::", stringify!(strings_list_head) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub union YR_RULES__bindgen_ty_3 { pub ext_vars_table: *mut YR_EXTERNAL_VARIABLE, pub externals_list_head: *mut YR_EXTERNAL_VARIABLE, } #[test] fn bindgen_test_layout_YR_RULES__bindgen_ty_3() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_RULES__bindgen_ty_3)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_RULES__bindgen_ty_3)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ext_vars_table) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RULES__bindgen_ty_3), "::", stringify!(ext_vars_table) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).externals_list_head) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RULES__bindgen_ty_3), "::", stringify!(externals_list_head) ) ); } #[test] fn bindgen_test_layout_YR_RULES() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 88usize, concat!("Size of: ", stringify!(YR_RULES)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_RULES)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arena) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RULES), "::", stringify!(arena) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ac_transition_table) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(YR_RULES), "::", stringify!(ac_transition_table) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ac_match_pool) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(YR_RULES), "::", stringify!(ac_match_pool) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ac_match_table) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(YR_RULES), "::", stringify!(ac_match_table) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).code_start) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(YR_RULES), "::", stringify!(code_start) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).no_required_strings) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(YR_RULES), "::", stringify!(no_required_strings) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).num_rules) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", stringify!(YR_RULES), "::", stringify!(num_rules) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).num_strings) as usize - ptr as usize }, 76usize, concat!( "Offset of field: ", stringify!(YR_RULES), "::", stringify!(num_strings) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).num_namespaces) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", stringify!(YR_RULES), "::", stringify!(num_namespaces) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_RULES_STATS { pub num_rules: u32, pub num_strings: u32, pub ac_matches: u32, pub ac_root_match_list_length: u32, pub ac_average_match_list_length: f32, pub top_ac_match_list_lengths: [u32; 100usize], pub ac_match_list_length_pctls: [u32; 101usize], pub ac_tables_size: u32, } #[test] fn bindgen_test_layout_YR_RULES_STATS() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 828usize, concat!("Size of: ", stringify!(YR_RULES_STATS)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(YR_RULES_STATS)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).num_rules) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RULES_STATS), "::", stringify!(num_rules) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).num_strings) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(YR_RULES_STATS), "::", stringify!(num_strings) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ac_matches) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_RULES_STATS), "::", stringify!(ac_matches) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ac_root_match_list_length) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(YR_RULES_STATS), "::", stringify!(ac_root_match_list_length) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ac_average_match_list_length) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(YR_RULES_STATS), "::", stringify!(ac_average_match_list_length) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).top_ac_match_list_lengths) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", stringify!(YR_RULES_STATS), "::", stringify!(top_ac_match_list_lengths) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ac_match_list_length_pctls) as usize - ptr as usize }, 420usize, concat!( "Offset of field: ", stringify!(YR_RULES_STATS), "::", stringify!(ac_match_list_length_pctls) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ac_tables_size) as usize - ptr as usize }, 824usize, concat!( "Offset of field: ", stringify!(YR_RULES_STATS), "::", stringify!(ac_tables_size) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_PROFILING_INFO { pub atom_matches: u32, pub match_time: u64, pub exec_time: u64, } #[test] fn bindgen_test_layout_YR_PROFILING_INFO() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(YR_PROFILING_INFO)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_PROFILING_INFO)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).atom_matches) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_PROFILING_INFO), "::", stringify!(atom_matches) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).match_time) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_PROFILING_INFO), "::", stringify!(match_time) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exec_time) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(YR_PROFILING_INFO), "::", stringify!(exec_time) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_RULE_PROFILING_INFO { pub rule: *mut YR_RULE, pub cost: u64, } #[test] fn bindgen_test_layout_YR_RULE_PROFILING_INFO() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(YR_RULE_PROFILING_INFO)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_RULE_PROFILING_INFO)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rule) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_RULE_PROFILING_INFO), "::", stringify!(rule) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cost) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_RULE_PROFILING_INFO), "::", stringify!(cost) ) ); } pub type YR_MEMORY_BLOCK_FETCH_DATA_FUNC = ::std::option::Option *const u8>; pub type YR_MEMORY_BLOCK_ITERATOR_FUNC = ::std::option::Option< unsafe extern "C" fn(self_: *mut YR_MEMORY_BLOCK_ITERATOR) -> *mut YR_MEMORY_BLOCK, >; pub type YR_MEMORY_BLOCK_ITERATOR_SIZE_FUNC = ::std::option::Option u64>; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_MEMORY_BLOCK { pub size: size_t, pub base: u64, pub context: *mut ::std::os::raw::c_void, pub fetch_data: YR_MEMORY_BLOCK_FETCH_DATA_FUNC, } #[test] fn bindgen_test_layout_YR_MEMORY_BLOCK() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(YR_MEMORY_BLOCK)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_MEMORY_BLOCK)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_MEMORY_BLOCK), "::", stringify!(size) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_MEMORY_BLOCK), "::", stringify!(base) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(YR_MEMORY_BLOCK), "::", stringify!(context) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fetch_data) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(YR_MEMORY_BLOCK), "::", stringify!(fetch_data) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_MEMORY_BLOCK_ITERATOR { pub context: *mut ::std::os::raw::c_void, pub first: YR_MEMORY_BLOCK_ITERATOR_FUNC, pub next: YR_MEMORY_BLOCK_ITERATOR_FUNC, pub file_size: YR_MEMORY_BLOCK_ITERATOR_SIZE_FUNC, pub last_error: ::std::os::raw::c_int, } #[test] fn bindgen_test_layout_YR_MEMORY_BLOCK_ITERATOR() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, concat!("Size of: ", stringify!(YR_MEMORY_BLOCK_ITERATOR)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_MEMORY_BLOCK_ITERATOR)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_MEMORY_BLOCK_ITERATOR), "::", stringify!(context) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).first) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_MEMORY_BLOCK_ITERATOR), "::", stringify!(first) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(YR_MEMORY_BLOCK_ITERATOR), "::", stringify!(next) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).file_size) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(YR_MEMORY_BLOCK_ITERATOR), "::", stringify!(file_size) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).last_error) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(YR_MEMORY_BLOCK_ITERATOR), "::", stringify!(last_error) ) ); } pub type YR_CALLBACK_FUNC = ::std::option::Option< unsafe extern "C" fn( context: *mut YR_SCAN_CONTEXT, message: ::std::os::raw::c_int, message_data: *mut ::std::os::raw::c_void, user_data: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int, >; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_SCAN_CONTEXT { pub file_size: u64, pub entry_point: u64, pub flags: ::std::os::raw::c_int, pub canary: ::std::os::raw::c_int, pub timeout: u64, pub user_data: *mut ::std::os::raw::c_void, pub callback: YR_CALLBACK_FUNC, pub rules: *mut YR_RULES, pub last_error_string: *mut YR_STRING, pub iterator: *mut YR_MEMORY_BLOCK_ITERATOR, pub objects_table: *mut YR_HASH_TABLE, pub matches_notebook: *mut YR_NOTEBOOK, pub stopwatch: YR_STOPWATCH, pub re_fiber_pool: RE_FIBER_POOL, pub re_fast_exec_position_pool: RE_FAST_EXEC_POSITION_POOL, pub rule_matches_flags: *mut ::std::os::raw::c_ulong, pub ns_unsatisfied_flags: *mut ::std::os::raw::c_ulong, pub strings_temp_disabled: *mut ::std::os::raw::c_ulong, pub matches: *mut YR_MATCHES, pub unconfirmed_matches: *mut YR_MATCHES, pub required_eval: *mut ::std::os::raw::c_ulong, pub profiling_info: *mut YR_PROFILING_INFO, } #[test] fn bindgen_test_layout_YR_SCAN_CONTEXT() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 192usize, concat!("Size of: ", stringify!(YR_SCAN_CONTEXT)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_SCAN_CONTEXT)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).file_size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(file_size) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).entry_point) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(entry_point) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(flags) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).canary) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(canary) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).timeout) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(timeout) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).user_data) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(user_data) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).callback) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(callback) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rules) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(rules) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).last_error_string) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(last_error_string) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).iterator) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(iterator) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).objects_table) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(objects_table) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).matches_notebook) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(matches_notebook) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stopwatch) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(stopwatch) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).re_fiber_pool) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(re_fiber_pool) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).re_fast_exec_position_pool) as usize - ptr as usize }, 128usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(re_fast_exec_position_pool) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rule_matches_flags) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(rule_matches_flags) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ns_unsatisfied_flags) as usize - ptr as usize }, 144usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(ns_unsatisfied_flags) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).strings_temp_disabled) as usize - ptr as usize }, 152usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(strings_temp_disabled) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).matches) as usize - ptr as usize }, 160usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(matches) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).unconfirmed_matches) as usize - ptr as usize }, 168usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(unconfirmed_matches) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).required_eval) as usize - ptr as usize }, 176usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(required_eval) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).profiling_info) as usize - ptr as usize }, 184usize, concat!( "Offset of field: ", stringify!(YR_SCAN_CONTEXT), "::", stringify!(profiling_info) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub union YR_VALUE { pub i: i64, pub d: f64, pub p: *mut ::std::os::raw::c_void, pub o: *mut YR_OBJECT, pub s: *mut YR_STRING, pub it: *mut YR_ITERATOR, pub ss: *mut SIZED_STRING, pub re: *mut RE, } #[test] fn bindgen_test_layout_YR_VALUE() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(YR_VALUE)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_VALUE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_VALUE), "::", stringify!(i) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).d) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_VALUE), "::", stringify!(d) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_VALUE), "::", stringify!(p) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).o) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_VALUE), "::", stringify!(o) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).s) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_VALUE), "::", stringify!(s) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_VALUE), "::", stringify!(it) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ss) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_VALUE), "::", stringify!(ss) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).re) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_VALUE), "::", stringify!(re) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub struct YR_OBJECT { pub canary: ::std::os::raw::c_int, pub type_: i8, pub identifier: *const ::std::os::raw::c_char, pub parent: *mut YR_OBJECT, pub data: *mut ::std::os::raw::c_void, pub value: YR_VALUE, } #[test] fn bindgen_test_layout_YR_OBJECT() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, concat!("Size of: ", stringify!(YR_OBJECT)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_OBJECT)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).canary) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_OBJECT), "::", stringify!(canary) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(YR_OBJECT), "::", stringify!(type_) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).identifier) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_OBJECT), "::", stringify!(identifier) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parent) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(YR_OBJECT), "::", stringify!(parent) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(YR_OBJECT), "::", stringify!(data) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(YR_OBJECT), "::", stringify!(value) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_OBJECT_STRUCTURE { pub canary: ::std::os::raw::c_int, pub type_: i8, pub identifier: *const ::std::os::raw::c_char, pub parent: *mut YR_OBJECT, pub data: *mut ::std::os::raw::c_void, pub members: *mut YR_STRUCTURE_MEMBER, } #[test] fn bindgen_test_layout_YR_OBJECT_STRUCTURE() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, concat!("Size of: ", stringify!(YR_OBJECT_STRUCTURE)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_OBJECT_STRUCTURE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).canary) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_OBJECT_STRUCTURE), "::", stringify!(canary) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(YR_OBJECT_STRUCTURE), "::", stringify!(type_) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).identifier) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_OBJECT_STRUCTURE), "::", stringify!(identifier) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parent) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(YR_OBJECT_STRUCTURE), "::", stringify!(parent) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(YR_OBJECT_STRUCTURE), "::", stringify!(data) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).members) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(YR_OBJECT_STRUCTURE), "::", stringify!(members) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_OBJECT_ARRAY { pub canary: ::std::os::raw::c_int, pub type_: i8, pub identifier: *const ::std::os::raw::c_char, pub parent: *mut YR_OBJECT, pub data: *mut ::std::os::raw::c_void, pub prototype_item: *mut YR_OBJECT, pub items: *mut YR_ARRAY_ITEMS, } #[test] fn bindgen_test_layout_YR_OBJECT_ARRAY() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 48usize, concat!("Size of: ", stringify!(YR_OBJECT_ARRAY)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_OBJECT_ARRAY)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).canary) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_OBJECT_ARRAY), "::", stringify!(canary) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(YR_OBJECT_ARRAY), "::", stringify!(type_) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).identifier) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_OBJECT_ARRAY), "::", stringify!(identifier) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parent) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(YR_OBJECT_ARRAY), "::", stringify!(parent) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(YR_OBJECT_ARRAY), "::", stringify!(data) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).prototype_item) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(YR_OBJECT_ARRAY), "::", stringify!(prototype_item) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).items) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(YR_OBJECT_ARRAY), "::", stringify!(items) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_OBJECT_DICTIONARY { pub canary: ::std::os::raw::c_int, pub type_: i8, pub identifier: *const ::std::os::raw::c_char, pub parent: *mut YR_OBJECT, pub data: *mut ::std::os::raw::c_void, pub prototype_item: *mut YR_OBJECT, pub items: *mut YR_DICTIONARY_ITEMS, } #[test] fn bindgen_test_layout_YR_OBJECT_DICTIONARY() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 48usize, concat!("Size of: ", stringify!(YR_OBJECT_DICTIONARY)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_OBJECT_DICTIONARY)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).canary) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_OBJECT_DICTIONARY), "::", stringify!(canary) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(YR_OBJECT_DICTIONARY), "::", stringify!(type_) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).identifier) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_OBJECT_DICTIONARY), "::", stringify!(identifier) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parent) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(YR_OBJECT_DICTIONARY), "::", stringify!(parent) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(YR_OBJECT_DICTIONARY), "::", stringify!(data) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).prototype_item) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(YR_OBJECT_DICTIONARY), "::", stringify!(prototype_item) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).items) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(YR_OBJECT_DICTIONARY), "::", stringify!(items) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_STRUCTURE_MEMBER { pub object: *mut YR_OBJECT, pub next: *mut YR_STRUCTURE_MEMBER, } #[test] fn bindgen_test_layout_YR_STRUCTURE_MEMBER() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(YR_STRUCTURE_MEMBER)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_STRUCTURE_MEMBER)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).object) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_STRUCTURE_MEMBER), "::", stringify!(object) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_STRUCTURE_MEMBER), "::", stringify!(next) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_ARRAY_ITEMS { pub capacity: ::std::os::raw::c_int, pub length: ::std::os::raw::c_int, pub objects: [*mut YR_OBJECT; 1usize], } #[test] fn bindgen_test_layout_YR_ARRAY_ITEMS() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(YR_ARRAY_ITEMS)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_ARRAY_ITEMS)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).capacity) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_ARRAY_ITEMS), "::", stringify!(capacity) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(YR_ARRAY_ITEMS), "::", stringify!(length) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).objects) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_ARRAY_ITEMS), "::", stringify!(objects) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_DICTIONARY_ITEMS { pub used: ::std::os::raw::c_int, pub free: ::std::os::raw::c_int, pub objects: [YR_DICTIONARY_ITEMS__bindgen_ty_1; 1usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_DICTIONARY_ITEMS__bindgen_ty_1 { pub key: *mut SIZED_STRING, pub obj: *mut YR_OBJECT, } #[test] fn bindgen_test_layout_YR_DICTIONARY_ITEMS__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(YR_DICTIONARY_ITEMS__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(YR_DICTIONARY_ITEMS__bindgen_ty_1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_DICTIONARY_ITEMS__bindgen_ty_1), "::", stringify!(key) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).obj) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_DICTIONARY_ITEMS__bindgen_ty_1), "::", stringify!(obj) ) ); } #[test] fn bindgen_test_layout_YR_DICTIONARY_ITEMS() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(YR_DICTIONARY_ITEMS)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_DICTIONARY_ITEMS)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).used) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_DICTIONARY_ITEMS), "::", stringify!(used) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).free) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(YR_DICTIONARY_ITEMS), "::", stringify!(free) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).objects) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_DICTIONARY_ITEMS), "::", stringify!(objects) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_ARRAY_ITERATOR { pub array: *mut YR_OBJECT, pub index: ::std::os::raw::c_int, } #[test] fn bindgen_test_layout_YR_ARRAY_ITERATOR() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(YR_ARRAY_ITERATOR)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_ARRAY_ITERATOR)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).array) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_ARRAY_ITERATOR), "::", stringify!(array) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_ARRAY_ITERATOR), "::", stringify!(index) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_DICT_ITERATOR { pub dict: *mut YR_OBJECT, pub index: ::std::os::raw::c_int, } #[test] fn bindgen_test_layout_YR_DICT_ITERATOR() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(YR_DICT_ITERATOR)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_DICT_ITERATOR)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dict) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_DICT_ITERATOR), "::", stringify!(dict) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_DICT_ITERATOR), "::", stringify!(index) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_INT_RANGE_ITERATOR { pub next: i64, pub last: i64, } #[test] fn bindgen_test_layout_YR_INT_RANGE_ITERATOR() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(YR_INT_RANGE_ITERATOR)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_INT_RANGE_ITERATOR)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_INT_RANGE_ITERATOR), "::", stringify!(next) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).last) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_INT_RANGE_ITERATOR), "::", stringify!(last) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_INT_ENUM_ITERATOR { pub next: i64, pub count: i64, pub items: [i64; 1usize], } #[test] fn bindgen_test_layout_YR_INT_ENUM_ITERATOR() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(YR_INT_ENUM_ITERATOR)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_INT_ENUM_ITERATOR)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_INT_ENUM_ITERATOR), "::", stringify!(next) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_INT_ENUM_ITERATOR), "::", stringify!(count) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).items) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(YR_INT_ENUM_ITERATOR), "::", stringify!(items) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_STRING_SET_ITERATOR { pub count: i64, pub index: i64, pub strings: [*mut YR_STRING; 1usize], } #[test] fn bindgen_test_layout_YR_STRING_SET_ITERATOR() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(YR_STRING_SET_ITERATOR)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_STRING_SET_ITERATOR)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_STRING_SET_ITERATOR), "::", stringify!(count) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_STRING_SET_ITERATOR), "::", stringify!(index) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).strings) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(YR_STRING_SET_ITERATOR), "::", stringify!(strings) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_TEXT_STRING_SET_ITERATOR { pub count: i64, pub index: i64, pub strings: [*mut SIZED_STRING; 1usize], } #[test] fn bindgen_test_layout_YR_TEXT_STRING_SET_ITERATOR() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(YR_TEXT_STRING_SET_ITERATOR)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_TEXT_STRING_SET_ITERATOR)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_TEXT_STRING_SET_ITERATOR), "::", stringify!(count) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_TEXT_STRING_SET_ITERATOR), "::", stringify!(index) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).strings) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(YR_TEXT_STRING_SET_ITERATOR), "::", stringify!(strings) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub struct YR_ITERATOR { pub next_func_idx: u8, pub __bindgen_anon_1: YR_ITERATOR__bindgen_ty_1, } #[repr(C)] #[derive(Copy, Clone)] pub union YR_ITERATOR__bindgen_ty_1 { pub array_it: YR_ARRAY_ITERATOR, pub dict_it: YR_DICT_ITERATOR, pub int_range_it: YR_INT_RANGE_ITERATOR, pub int_enum_it: YR_INT_ENUM_ITERATOR, pub string_set_it: YR_STRING_SET_ITERATOR, pub text_string_set_it: YR_TEXT_STRING_SET_ITERATOR, } #[test] fn bindgen_test_layout_YR_ITERATOR__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(YR_ITERATOR__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_ITERATOR__bindgen_ty_1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).array_it) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_ITERATOR__bindgen_ty_1), "::", stringify!(array_it) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dict_it) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_ITERATOR__bindgen_ty_1), "::", stringify!(dict_it) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).int_range_it) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_ITERATOR__bindgen_ty_1), "::", stringify!(int_range_it) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).int_enum_it) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_ITERATOR__bindgen_ty_1), "::", stringify!(int_enum_it) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).string_set_it) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_ITERATOR__bindgen_ty_1), "::", stringify!(string_set_it) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).text_string_set_it) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_ITERATOR__bindgen_ty_1), "::", stringify!(text_string_set_it) ) ); } #[test] fn bindgen_test_layout_YR_ITERATOR() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(YR_ITERATOR)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_ITERATOR)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).next_func_idx) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_ITERATOR), "::", stringify!(next_func_idx) ) ); } #[repr(C)] #[repr(align(8))] #[derive(Debug, Copy, Clone)] pub struct YR_ATOMS_CONFIG { pub _bindgen_opaque_blob: [u64; 4usize], } #[test] fn bindgen_test_layout_YR_ATOMS_CONFIG() { assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(YR_ATOMS_CONFIG)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_ATOMS_CONFIG)) ); } pub type YR_COMPILER_CALLBACK_FUNC = ::std::option::Option< unsafe extern "C" fn( error_level: ::std::os::raw::c_int, file_name: *const ::std::os::raw::c_char, line_number: ::std::os::raw::c_int, rule: *const YR_RULE, message: *const ::std::os::raw::c_char, user_data: *mut ::std::os::raw::c_void, ), >; pub type YR_COMPILER_INCLUDE_CALLBACK_FUNC = ::std::option::Option< unsafe extern "C" fn( include_name: *const ::std::os::raw::c_char, calling_rule_filename: *const ::std::os::raw::c_char, calling_rule_namespace: *const ::std::os::raw::c_char, user_data: *mut ::std::os::raw::c_void, ) -> *const ::std::os::raw::c_char, >; pub type YR_COMPILER_INCLUDE_FREE_FUNC = ::std::option::Option< unsafe extern "C" fn( callback_result_ptr: *const ::std::os::raw::c_char, user_data: *mut ::std::os::raw::c_void, ), >; pub type YR_COMPILER_RE_AST_CALLBACK_FUNC = ::std::option::Option< unsafe extern "C" fn( rule: *const YR_RULE, string_identifier: *const ::std::os::raw::c_char, re_ast: *const RE_AST, user_data: *mut ::std::os::raw::c_void, ), >; pub type YR_FIXUP = [u64; 2usize]; pub type YR_LOOP_CONTEXT = [u64; 13usize]; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _YR_COMPILER { pub arena: *mut YR_ARENA, pub current_rule_idx: u32, pub next_rule_idx: u32, pub current_string_idx: u32, pub current_namespace_idx: u32, pub current_meta_idx: u32, pub rules: *mut YR_RULES, pub errors: ::std::os::raw::c_int, pub current_line: ::std::os::raw::c_int, pub last_error: ::std::os::raw::c_int, pub last_error_line: ::std::os::raw::c_int, pub strict_escape: bool, pub error_recovery: jmp_buf, pub automaton: *mut YR_AC_AUTOMATON, pub rules_table: *mut YR_HASH_TABLE, pub objects_table: *mut YR_HASH_TABLE, pub strings_table: *mut YR_HASH_TABLE, pub wildcard_identifiers_table: *mut YR_HASH_TABLE, pub sz_table: *mut YR_HASH_TABLE, pub fixup_stack_head: *mut YR_FIXUP, pub num_namespaces: ::std::os::raw::c_int, pub loop_: [YR_LOOP_CONTEXT; 4usize], pub loop_index: ::std::os::raw::c_int, pub loop_for_of_var_index: ::std::os::raw::c_int, pub file_name_stack: [*mut ::std::os::raw::c_char; 16usize], pub file_name_stack_ptr: ::std::os::raw::c_int, pub last_error_extra_info: [::std::os::raw::c_char; 256usize], pub lex_buf: [::std::os::raw::c_char; 8192usize], pub lex_buf_ptr: *mut ::std::os::raw::c_char, pub lex_buf_len: ::std::os::raw::c_ushort, pub include_base_dir: [::std::os::raw::c_char; 4096usize], pub user_data: *mut ::std::os::raw::c_void, pub incl_clbk_user_data: *mut ::std::os::raw::c_void, pub re_ast_clbk_user_data: *mut ::std::os::raw::c_void, pub callback: YR_COMPILER_CALLBACK_FUNC, pub include_callback: YR_COMPILER_INCLUDE_CALLBACK_FUNC, pub include_free: YR_COMPILER_INCLUDE_FREE_FUNC, pub re_ast_callback: YR_COMPILER_RE_AST_CALLBACK_FUNC, pub atoms_config: YR_ATOMS_CONFIG, } #[test] fn bindgen_test_layout__YR_COMPILER() { const UNINIT: ::std::mem::MaybeUninit<_YR_COMPILER> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_YR_COMPILER>(), 13528usize, concat!("Size of: ", stringify!(_YR_COMPILER)) ); assert_eq!( ::std::mem::align_of::<_YR_COMPILER>(), 8usize, concat!("Alignment of ", stringify!(_YR_COMPILER)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arena) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(arena) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).current_rule_idx) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(current_rule_idx) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).next_rule_idx) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(next_rule_idx) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).current_string_idx) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(current_string_idx) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).current_namespace_idx) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(current_namespace_idx) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).current_meta_idx) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(current_meta_idx) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rules) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(rules) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).errors) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(errors) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).current_line) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(current_line) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).last_error) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(last_error) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).last_error_line) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(last_error_line) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).strict_escape) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(strict_escape) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).error_recovery) as usize - ptr as usize }, 60usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(error_recovery) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).automaton) as usize - ptr as usize }, 256usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(automaton) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rules_table) as usize - ptr as usize }, 264usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(rules_table) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).objects_table) as usize - ptr as usize }, 272usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(objects_table) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).strings_table) as usize - ptr as usize }, 280usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(strings_table) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).wildcard_identifiers_table) as usize - ptr as usize }, 288usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(wildcard_identifiers_table) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sz_table) as usize - ptr as usize }, 296usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(sz_table) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fixup_stack_head) as usize - ptr as usize }, 304usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(fixup_stack_head) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).num_namespaces) as usize - ptr as usize }, 312usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(num_namespaces) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).loop_) as usize - ptr as usize }, 320usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(loop_) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).loop_index) as usize - ptr as usize }, 736usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(loop_index) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).loop_for_of_var_index) as usize - ptr as usize }, 740usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(loop_for_of_var_index) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).file_name_stack) as usize - ptr as usize }, 744usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(file_name_stack) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).file_name_stack_ptr) as usize - ptr as usize }, 872usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(file_name_stack_ptr) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).last_error_extra_info) as usize - ptr as usize }, 876usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(last_error_extra_info) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lex_buf) as usize - ptr as usize }, 1132usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(lex_buf) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lex_buf_ptr) as usize - ptr as usize }, 9328usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(lex_buf_ptr) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lex_buf_len) as usize - ptr as usize }, 9336usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(lex_buf_len) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).include_base_dir) as usize - ptr as usize }, 9338usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(include_base_dir) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).user_data) as usize - ptr as usize }, 13440usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(user_data) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).incl_clbk_user_data) as usize - ptr as usize }, 13448usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(incl_clbk_user_data) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).re_ast_clbk_user_data) as usize - ptr as usize }, 13456usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(re_ast_clbk_user_data) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).callback) as usize - ptr as usize }, 13464usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(callback) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).include_callback) as usize - ptr as usize }, 13472usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(include_callback) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).include_free) as usize - ptr as usize }, 13480usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(include_free) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).re_ast_callback) as usize - ptr as usize }, 13488usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(re_ast_callback) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).atoms_config) as usize - ptr as usize }, 13496usize, concat!( "Offset of field: ", stringify!(_YR_COMPILER), "::", stringify!(atoms_config) ) ); } pub type YR_COMPILER = _YR_COMPILER; extern "C" { pub fn yr_compiler_create(compiler: *mut *mut YR_COMPILER) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_compiler_destroy(compiler: *mut YR_COMPILER); } extern "C" { pub fn yr_compiler_set_callback( compiler: *mut YR_COMPILER, callback: YR_COMPILER_CALLBACK_FUNC, user_data: *mut ::std::os::raw::c_void, ); } extern "C" { pub fn yr_compiler_set_include_callback( compiler: *mut YR_COMPILER, include_callback: YR_COMPILER_INCLUDE_CALLBACK_FUNC, include_free: YR_COMPILER_INCLUDE_FREE_FUNC, user_data: *mut ::std::os::raw::c_void, ); } extern "C" { pub fn yr_compiler_set_re_ast_callback( compiler: *mut YR_COMPILER, re_ast_callback: YR_COMPILER_RE_AST_CALLBACK_FUNC, user_data: *mut ::std::os::raw::c_void, ); } extern "C" { pub fn yr_compiler_set_atom_quality_table( compiler: *mut YR_COMPILER, table: *const ::std::os::raw::c_void, entries: ::std::os::raw::c_int, warning_threshold: ::std::os::raw::c_uchar, ); } extern "C" { pub fn yr_compiler_load_atom_quality_table( compiler: *mut YR_COMPILER, filename: *const ::std::os::raw::c_char, warning_threshold: ::std::os::raw::c_uchar, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_compiler_add_file( compiler: *mut YR_COMPILER, rules_file: *mut FILE, namespace_: *const ::std::os::raw::c_char, file_name: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_compiler_add_fd( compiler: *mut YR_COMPILER, rules_fd: ::std::os::raw::c_int, namespace_: *const ::std::os::raw::c_char, file_name: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_compiler_add_bytes( compiler: *mut YR_COMPILER, rules_data: *const ::std::os::raw::c_void, rules_size: size_t, namespace_: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_compiler_add_string( compiler: *mut YR_COMPILER, rules_string: *const ::std::os::raw::c_char, namespace_: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_compiler_get_error_message( compiler: *mut YR_COMPILER, buffer: *mut ::std::os::raw::c_char, buffer_size: ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn yr_compiler_get_current_file_name( compiler: *mut YR_COMPILER, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn yr_compiler_define_integer_variable( compiler: *mut YR_COMPILER, identifier: *const ::std::os::raw::c_char, value: i64, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_compiler_define_boolean_variable( compiler: *mut YR_COMPILER, identifier: *const ::std::os::raw::c_char, value: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_compiler_define_float_variable( compiler: *mut YR_COMPILER, identifier: *const ::std::os::raw::c_char, value: f64, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_compiler_define_string_variable( compiler: *mut YR_COMPILER, identifier: *const ::std::os::raw::c_char, value: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_compiler_get_rules( compiler: *mut YR_COMPILER, rules: *mut *mut YR_RULES, ) -> ::std::os::raw::c_int; } pub const _YR_CONFIG_NAME_YR_CONFIG_STACK_SIZE: _YR_CONFIG_NAME = 0; pub const _YR_CONFIG_NAME_YR_CONFIG_MAX_STRINGS_PER_RULE: _YR_CONFIG_NAME = 1; pub const _YR_CONFIG_NAME_YR_CONFIG_MAX_MATCH_DATA: _YR_CONFIG_NAME = 2; pub const _YR_CONFIG_NAME_YR_CONFIG_MAX_PROCESS_MEMORY_CHUNK: _YR_CONFIG_NAME = 3; pub const _YR_CONFIG_NAME_YR_CONFIG_LAST: _YR_CONFIG_NAME = 4; pub type _YR_CONFIG_NAME = ::std::os::raw::c_uint; pub use self::_YR_CONFIG_NAME as YR_CONFIG_NAME; extern "C" { pub fn yr_initialize() -> ::std::os::raw::c_int; } extern "C" { pub fn yr_finalize() -> ::std::os::raw::c_int; } extern "C" { pub fn yr_set_configuration_uint32(arg1: YR_CONFIG_NAME, arg2: u32) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_set_configuration_uint64(arg1: YR_CONFIG_NAME, arg2: u64) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_get_configuration_uint32( arg1: YR_CONFIG_NAME, arg2: *mut u32, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_get_configuration_uint64( arg1: YR_CONFIG_NAME, arg2: *mut u64, ) -> ::std::os::raw::c_int; } pub type YR_SCANNER = YR_SCAN_CONTEXT; extern "C" { pub fn yr_scanner_create( rules: *mut YR_RULES, scanner: *mut *mut YR_SCANNER, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_scanner_destroy(scanner: *mut YR_SCANNER); } extern "C" { pub fn yr_scanner_set_callback( scanner: *mut YR_SCANNER, callback: YR_CALLBACK_FUNC, user_data: *mut ::std::os::raw::c_void, ); } extern "C" { pub fn yr_scanner_set_timeout(scanner: *mut YR_SCANNER, timeout: ::std::os::raw::c_int); } extern "C" { pub fn yr_scanner_set_flags(scanner: *mut YR_SCANNER, flags: ::std::os::raw::c_int); } extern "C" { pub fn yr_scanner_define_integer_variable( scanner: *mut YR_SCANNER, identifier: *const ::std::os::raw::c_char, value: i64, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_scanner_define_boolean_variable( scanner: *mut YR_SCANNER, identifier: *const ::std::os::raw::c_char, value: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_scanner_define_float_variable( scanner: *mut YR_SCANNER, identifier: *const ::std::os::raw::c_char, value: f64, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_scanner_define_string_variable( scanner: *mut YR_SCANNER, identifier: *const ::std::os::raw::c_char, value: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_scanner_scan_mem_blocks( scanner: *mut YR_SCANNER, iterator: *mut YR_MEMORY_BLOCK_ITERATOR, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_scanner_scan_mem( scanner: *mut YR_SCANNER, buffer: *const u8, buffer_size: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_scanner_scan_file( scanner: *mut YR_SCANNER, filename: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_scanner_scan_fd( scanner: *mut YR_SCANNER, fd: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_scanner_scan_proc( scanner: *mut YR_SCANNER, pid: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_scanner_last_error_rule(scanner: *mut YR_SCANNER) -> *mut YR_RULE; } extern "C" { pub fn yr_scanner_last_error_string(scanner: *mut YR_SCANNER) -> *mut YR_STRING; } extern "C" { pub fn yr_scanner_get_profiling_info(scanner: *mut YR_SCANNER) -> *mut YR_RULE_PROFILING_INFO; } extern "C" { pub fn yr_scanner_reset_profiling_info(scanner: *mut YR_SCANNER); } extern "C" { pub fn yr_scanner_print_profiling_info(scanner: *mut YR_SCANNER) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_rules_scan_mem_blocks( rules: *mut YR_RULES, iterator: *mut YR_MEMORY_BLOCK_ITERATOR, flags: ::std::os::raw::c_int, callback: YR_CALLBACK_FUNC, user_data: *mut ::std::os::raw::c_void, timeout: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_rules_scan_mem( rules: *mut YR_RULES, buffer: *const u8, buffer_size: size_t, flags: ::std::os::raw::c_int, callback: YR_CALLBACK_FUNC, user_data: *mut ::std::os::raw::c_void, timeout: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_rules_scan_file( rules: *mut YR_RULES, filename: *const ::std::os::raw::c_char, flags: ::std::os::raw::c_int, callback: YR_CALLBACK_FUNC, user_data: *mut ::std::os::raw::c_void, timeout: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_rules_scan_fd( rules: *mut YR_RULES, fd: ::std::os::raw::c_int, flags: ::std::os::raw::c_int, callback: YR_CALLBACK_FUNC, user_data: *mut ::std::os::raw::c_void, timeout: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_rules_scan_proc( rules: *mut YR_RULES, pid: ::std::os::raw::c_int, flags: ::std::os::raw::c_int, callback: YR_CALLBACK_FUNC, user_data: *mut ::std::os::raw::c_void, timeout: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_rules_save( rules: *mut YR_RULES, filename: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_rules_save_stream( rules: *mut YR_RULES, stream: *mut YR_STREAM, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_rules_load( filename: *const ::std::os::raw::c_char, rules: *mut *mut YR_RULES, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_rules_load_stream( stream: *mut YR_STREAM, rules: *mut *mut YR_RULES, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_rules_destroy(rules: *mut YR_RULES) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_rules_define_integer_variable( rules: *mut YR_RULES, identifier: *const ::std::os::raw::c_char, value: i64, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_rules_define_boolean_variable( rules: *mut YR_RULES, identifier: *const ::std::os::raw::c_char, value: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_rules_define_float_variable( rules: *mut YR_RULES, identifier: *const ::std::os::raw::c_char, value: f64, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_rules_define_string_variable( rules: *mut YR_RULES, identifier: *const ::std::os::raw::c_char, value: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_rules_get_stats( rules: *mut YR_RULES, stats: *mut YR_RULES_STATS, ) -> ::std::os::raw::c_int; } extern "C" { pub fn yr_rule_disable(rule: *mut YR_RULE); } extern "C" { pub fn yr_rule_enable(rule: *mut YR_RULE); } extern "C" { pub fn yr_rules_from_arena( arena: *mut YR_ARENA, rules: *mut *mut YR_RULES, ) -> ::std::os::raw::c_int; } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct YR_MODULE_IMPORT { pub module_name: *const ::std::os::raw::c_char, pub module_data: *mut ::std::os::raw::c_void, pub module_data_size: size_t, } #[test] fn bindgen_test_layout_YR_MODULE_IMPORT() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(YR_MODULE_IMPORT)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(YR_MODULE_IMPORT)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).module_name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(YR_MODULE_IMPORT), "::", stringify!(module_name) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).module_data) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(YR_MODULE_IMPORT), "::", stringify!(module_data) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).module_data_size) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(YR_MODULE_IMPORT), "::", stringify!(module_data_size) ) ); }