Crate libesedb_sys
source ·Expand description
libesedb-sys
Rust -sys
bindings to libyal/libesedb
.
Building
- Have a compiler installed (if you’re using Rust, you have one).
- (Optionally) LLVM for
bindgen
to regenerate the bindings. - Should use
cargo build -vv
for very verbose output to verifycc
compiling.
Rebuilding Bindings
bindgen libesedb-20230824/include/libesedb.h -o src/bindings.rs -- -Ilibesedb-20210424/include -fparse-all-comments
Configuring Max Leaf-Pages
Note: the original value of 16 * 1024
has been increased to 32 * 1024
in order for a FileHistory Catalog*.edb
of at least 330MB to load.
Via the command-line:
LIBESEDB_MAXIMUM_NUMBER_OF_LEAF_PAGES="32 * 1024" cargo build -vv
In your Cargo.toml:
[env]
LIBESEDB_MAXIMUM_NUMBER_OF_LEAF_PAGES = "32 * 1024"
Updating Bundled libesedb
- Download/Clone head of the
main
branchgit clone --branch main --depth 1 https://github.com/libyal/libesedb
- https://github.com/libyal/libesedb/archive/refs/heads/main.zip
- Follow Build Instructions https://github.com/libyal/libesedb/wiki/Building
- Run the following
./synclibs.sh
./autogen.sh
./configure
make dist
- Output should include a
.tar.gz
containing the source distribution version - Note: I used Cygwin on Windows, you will need the packages mentioned here: https://github.com/libyal/libesedb/wiki/Building#cygwin
- Run the following
Authors
libesedb
Copyright (C) 2009-2021, Joachim Metz <joachim.metz@gmail.com>
libesedb-sys
Copyright (C) 2022-2023, Oliver Lenehan ~sunsetkookaburra
License
libyal/libesedb
is the hard work ofJoachim Metz (~joachimmetz)
, available under the LGPL-3.0-or-later. A distribution version of the library is bundled here.- This
-sys
binding is also made available under the LGPL-3.0-or-later.
Structs
Constants
- Reserved: not supported yet
- The argument contains a value that conficts with another argument
- The argument contains an invalid value
- The argument contains a value that is not supported
- The argument contains a value that exceeds the maximum for the specific type
- The argument contains a value less than zero
- The argument contains a value that is out of bounds
- The argument contains a value that is too large
- The argument contains a value that is too small
- The argument contains a value zero or less
- The compression failed
- The decompression failed
- The conversion failed on the input
- The conversion failed on the output
- A checksum in the input did not match
- The input contains invalid data
- The input contains an unsupported signature
- A value in the input did not match a previously read value or calculated value
- Access denied
- The close failed
- The resource is invalid i.e. a missing file
- The ioctl failed
- The open failed
- The read failed
- The seek failed
- The unlink failed
- The write failed
- The memory failed to be copied
- There is insufficient memory available
- The memory failed to be set
- There is insuficient space to write the output
- An abort was requested
- The value could not be appended/prepended
- The value could not be copied
- The free and/or finalization of an internal structure failed
- The value could not be determined
- The creation and/or initialization of an internal structure failed
- The value could not be printed
- The value could not be removed
- The resize of an internal structure failed
- The value could not be set
- The value is unsupported
- The value was already set
- The value exceeds the maximum for its specific type
- The value is missing
- The value was out of bounds
Statics
Functions
- feof⚠
- getc⚠
- getw⚠
- Determines if a file contains an ESEDB file signature Returns 1 if true, 0 if not or -1 on error
- Frees a column Returns 1 if successful or -1 on error
- Retrieves the column identifier Returns 1 if successful or -1 on error
- Retrieves the column type Returns 1 if successful or -1 on error
- Retrieves the UTF-8 encoded string of the column name The size should include the end of string character Returns 1 if successful or -1 on error
- Retrieves the size of the UTF-8 encoded string of the column name The returned size includes the end of string character Returns 1 if successful or -1 on error
- Retrieves the UTF-16 encoded string of the column name The size should include the end of string character Returns 1 if successful or -1 on error
- Retrieves the size of the UTF-16 encoded string of the column name The returned size includes the end of string character Returns 1 if successful or -1 on error
- Prints a backtrace of the error to the stream Returns the number of printed characters if successful or -1 on error
- Prints a backtrace of the error to the string The end-of-string character is not included in the return value Returns the number of printed characters if successful or -1 on error
- Prints a descriptive string of the error to the stream Returns the number of printed characters if successful or -1 on error
- Frees an error
- Prints a descriptive string of the error to the string The end-of-string character is not included in the return value Returns the number of printed characters if successful or -1 on error
- Closes a file Returns 0 if successful or -1 on error
- Frees a file Returns 1 if successful or -1 on error
- Retrieves the file creation version Returns 1 if successful or -1 on error
- Retrieves the file (current) format version Returns 1 if successful or -1 on error
- Retrieves the number of tables Returns 1 if successful or -1 on error
- Retrieves the file page size Returns 1 if successful or -1 on error
- Retrieves the table for the specific entry Returns 1 if successful or -1 on error
- Retrieves the table for the UTF-8 encoded name Returns 1 if successful, 0 if no table could be found or -1 on error
- Retrieves the table for the UTF-16 encoded name Returns 1 if successful, 0 if no table could be found or -1 on error
- Retrieves the file type Returns 1 if successful or -1 on error
- Creates a file Make sure the value file is referencing, is set to NULL Returns 1 if successful or -1 on error
- Opens a file Returns 1 if successful or -1 on error
- Signals a file to abort its current activity Returns 1 if successful or -1 on error
- Returns the access flags for reading
- Retrieves the narrow system string codepage A value of 0 represents no codepage, UTF-8 encoding is used instead Returns 1 if successful or -1 on error
- Returns the library version
- Frees a index Returns 1 if successful or -1 on error
- Retrieves the index identifier or Father Data Page (FDP) object identifier Returns 1 if successful or -1 on error
- Retrieves the number of records in the index Returns 1 if successful or -1 on error
- Retrieves the record for the specific entry Returns 1 if successful or -1 on error
- Retrieves the UTF-8 encoded string of the index name The size should include the end of string character Returns 1 if successful or -1 on error
- Retrieves the size of the UTF-8 encoded string of the index name The returned size includes the end of string character Returns 1 if successful or -1 on error
- Retrieves the UTF-16 encoded string of the index name The size should include the end of string character Returns 1 if successful or -1 on error
- Retrieves the size of the UTF-16 encoded string of the index name The returned size includes the end of string character Returns 1 if successful or -1 on error
- Frees a long value Returns 1 if successful or -1 on error
- Retrieve the data Returns 1 if successful or -1 on error
- Retrieve the data segment Returns 1 if successful or -1 on error
- Retrieve the data segment size Returns 1 if successful or -1 on error
- Retrieve the data size Returns 1 if successful or -1 on error
- Retrieve the number of data segments Returns 1 if successful or -1 on error
- Retrieves the data as an UTF-8 encoded string The function uses the codepage in the column definition if necessary The size should include the end of string character Returns 1 if successful, 0 if value is NULL or -1 on error
- Retrieves the size of the data as an UTF-8 encoded string The returned size includes the end of string character Returns 1 if successful, 0 if value is NULL or -1 on error
- Retrieves the data as an UTF-16 encoded string The function uses the codepage in the column definition if necessary The size should include the end of string character Returns 1 if successful, 0 if value is NULL or -1 on error
- Retrieves the size of the data as an UTF-16 encoded string The returned size includes the end of string character Returns 1 if successful, 0 if value is NULL or -1 on error
- Frees a multi value Returns 1 if successful or -1 on error
- Retrieves the column type Returns 1 if successful or -1 on error
- Retrieves the number of values in a multi value Returns 1 if successful or -1 on error
- Retrieves a specific value of the multi value Returns 1 if successful or -1 on error
- Retrieves the 8-bit value of a specific value of the multi value Returns 1 if successful or -1 on error
- Retrieves the 16-bit value of a specific value of the multi value Returns 1 if successful or -1 on error
- Retrieves the 32-bit value of a specific value of the multi value Returns 1 if successful or -1 on error
- Retrieves the 64-bit value of a specific value of the multi value Returns 1 if successful or -1 on error
- Retrieves the binary data value of a specific value of the multi value Returns 1 if successful or -1 on error
- Retrieves the size of a binary data value of a specific value of the multi value Returns 1 if successful or -1 on error
- Retrieves the value data of the specific value Returns 1 if successful or -1 on error
- Retrieves the value data size of the specific value Returns 1 if successful or -1 on error
- Retrieves the 64-bit filetime value of a specific value of the multi value Returns 1 if successful or -1 on error
- Retrieves the 32-bit floating point value of a specific value of the multi value Returns 1 if successful or -1 on error
- Retrieves the 64-bit floating point value of a specific value of the multi value Returns 1 if successful or -1 on error
- Retrieves the UTF-8 encoded string value of a specific value of the multi value The size should include the end of string character Returns 1 if successful or -1 on error
- Retrieves the size of the UTF-8 encoded string of a specific value of the multi value The returned size includes the end of string character Returns 1 if successful or -1 on error
- Retrieves the UTF-16 encoded string value of a specific value of the multi value The size should include the end of string character Returns 1 if successful or -1 on error
- Retrieves the size of the UTF-16 encoded string of a specific value of the multi value The returned size includes the end of string character Returns 1 if successful or -1 on error
- Sets the notification stream Returns 1 if successful or -1 on error
- Sets the verbose notification
- Closes the notification stream if opened using a filename Returns 0 if successful or -1 on error
- Opens the notification stream using a filename The stream is opened in append mode Returns 1 if successful or -1 on error
- Frees a record Returns 1 if successful or -1 on error
- Retrieves the column identifier of the specific entry Returns 1 if successful or -1 on error
- Retrieves the column type of the specific entry Returns 1 if successful or -1 on error
- Retrieves the long value of a specific entry Creates a new long value Returns 1 if successful, 0 if the item does not contain such value or -1 on error
- Retrieves the multi value of a specific entry Creates a new multi value Returns 1 if successful, 0 if the item does not contain such value or -1 on error
- Retrieves the number of values in the record Returns 1 if successful or -1 on error
- Retrieves the UTF-8 encoded string of the column name of the specific entry The size should include the end of string character Returns 1 if successful or -1 on error
- Retrieves the size of the UTF-8 encoded string of the column name of the specific entry The returned size includes the end of string character Returns 1 if successful or -1 on error
- Retrieves the UTF-16 encoded string of the column name of the specific entry The size should include the end of string character Returns 1 if successful or -1 on error
- Retrieves the size of the UTF-16 encoded string of the column name of the specific entry The returned size includes the end of string character Returns 1 if successful or -1 on error
- Retrieves the value of the specific entry Returns 1 if successful or -1 on error
- Retrieves the 8-bit value of a specific entry Returns 1 if successful, 0 if value is NULL or -1 on error
- Retrieves the 16-bit value of a specific entry Returns 1 if successful, 0 if value is NULL or -1 on error
- Retrieves the 32-bit value of a specific entry Returns 1 if successful, 0 if value is NULL or -1 on error
- Retrieves the 64-bit value of a specific entry Returns 1 if successful, 0 if value is NULL or -1 on error
- Retrieves the binary data value of a specific entry Returns 1 if successful, 0 if value is NULL or -1 on error
- Retrieves the binary data size of a specific entry Returns 1 if successful, 0 if value is NULL or -1 on error
- Retrieves the boolean value of a specific entry Returns 1 if successful, 0 if value is NULL or -1 on error
- Retrieves the value data of the specific entry Returns 1 if successful or -1 on error
- Retrieves the value data flags of the specific entry Returns 1 if successful or -1 on error
- Retrieves the value data size of the specific entry Returns 1 if successful or -1 on error
- Retrieves the 64-bit filetime value of a specific entry Returns 1 if successful, 0 if value is NULL or -1 on error
- Retrieves the single precision floating point value of a specific entry Returns 1 if successful, 0 if value is NULL or -1 on error
- Retrieves the double precision floating point value of a specific entry Returns 1 if successful, 0 if value is NULL or -1 on error
- Retrieves the UTF-8 encoded string of a specific entry The function uses the codepage in the column definition if necessary The size should include the end of string character Returns 1 if successful, 0 if value is NULL or -1 on error
- Retrieves the size of an UTF-8 encoded string a specific entry The returned size includes the end of string character Returns 1 if successful, 0 if value is NULL or -1 on error
- Retrieves the UTF-16 encoded string of a specific entry The function uses the codepage in the column definition if necessary The size should include the end of string character Returns 1 if successful, 0 if value is NULL or -1 on error
- Retrieves the size of an UTF-16 encoded string a specific entry The returned size includes the end of string character Returns 1 if successful, 0 if value is NULL or -1 on error
- Determines if a specific entry is a long value Returns 1 if true, 0 if not or -1 on error
- Determines if a specific entry is a multi value Returns 1 if true, 0 if not or -1 on error
- Sets the narrow system string codepage A value of 0 represents no codepage, UTF-8 encoding is used instead Returns 1 if successful or -1 on error
- Frees a table Returns 1 if successful or -1 on error
- Retrieves the column for the specific entry
- Retrieves the table identifier or Father Data Page (FDP) object identifier Returns 1 if successful or -1 on error
- Retrieves the index for the specific entry Returns 1 if successful or -1 on error
- Retrieves the number of columns in the table
- Retrieves the number of indexes Returns 1 if successful or -1 on error
- Retrieves the number of records in the table Returns 1 if successful or -1 on error
- Retrieves the record for the specific entry Returns 1 if successful or -1 on error
- Retrieves the UTF-8 encoded string of the table name The size should include the end of string character Returns 1 if successful or -1 on error
- Retrieves the size of the UTF-8 encoded string of the table name The returned size includes the end of string character Returns 1 if successful or -1 on error
- Retrieves the UTF-8 encoded string of the template name The size should include the end of string character Returns 1 if successful or -1 on error
- Retrieves the size of the UTF-8 encoded string of the template name The returned size includes the end of string character Returns 1 if successful or -1 on error
- Retrieves the UTF-16 encoded string of the table name The size should include the end of string character Returns 1 if successful or -1 on error
- Retrieves the size of the UTF-16 encoded string of the table name The returned size includes the end of string character Returns 1 if successful or -1 on error
- Retrieves the UTF-16 encoded string of the template name The size should include the end of string character Returns 1 if successful or -1 on error
- Retrieves the size of the UTF-16 encoded string of the template name The returned size includes the end of string character Returns 1 if successful or -1 on error
- putc⚠
- puts⚠
- putw⚠
Type Aliases
- The access flags definitions bit 1 set to 1 for read access bit 2 set to 1 for write access bit 3-8 not used
- The argument error codes to signify errors regarding arguments passed to a function
- The codepage definitions
- The column types
- The compression error codes to signify errors regarding compression
- The conversion error codes to signify errors regarding conversions
- The error domains
- The file types
- The get columns flags
- The input error codes to signify errors regarding handing input data
- The input/output error codes to signify errors regarding input/output
- The memory error codes to signify errors regarding memory
- The output error codes
- The runtime error codes to signify errors regarding runtime processing
- The value flags
- The following type definitions hide internal data structures
- External error type definition hides internal structure