table of contents
libphdi(3) | Library Functions Manual | libphdi(3) |
NAME¶
libphdi.h
—
Library to access the Parallels Hard Disk image (PHDI)
format
SYNOPSIS¶
#include
<libphdi.h>
Support functions
const char *
libphdi_get_version
(void);
int
libphdi_get_access_flags_read
(void);
int
libphdi_get_access_flags_read_write
(void);
int
libphdi_get_access_flags_write
(void);
int
libphdi_get_codepage
(int
*codepage,
libphdi_error_t
**error);
int
libphdi_set_codepage
(int
codepage, libphdi_error_t
**error);
int
libphdi_check_file_signature
(const
char *filename,
libphdi_error_t
**error);
Available when compiled with wide character string support:
int
libphdi_check_file_signature_wide
(const
wchar_t *filename,
libphdi_error_t
**error);
Available when compiled with libbfio support:
int
libphdi_check_file_signature_file_io_handle
(libbfio_handle_t
*file_io_handle,
libphdi_error_t
**error);
Notify functions
void
libphdi_notify_set_verbose
(int
verbose);
int
libphdi_notify_set_stream
(FILE
*stream, libphdi_error_t
**error);
int
libphdi_notify_stream_open
(const
char *filename,
libphdi_error_t
**error);
int
libphdi_notify_stream_close
(libphdi_error_t
**error);
Error functions
void
libphdi_error_free
(libphdi_error_t
**error);
int
libphdi_error_fprint
(libphdi_error_t
*error, FILE
*stream);
int
libphdi_error_sprint
(libphdi_error_t
*error, char
*string, size_t
size);
int
libphdi_error_backtrace_fprint
(libphdi_error_t
*error, FILE
*stream);
int
libphdi_error_backtrace_sprint
(libphdi_error_t
*error, char
*string, size_t
size);
Handle functions
int
libphdi_handle_initialize
(libphdi_handle_t
**handle, libphdi_error_t
**error);
int
libphdi_handle_free
(libphdi_handle_t
**handle, libphdi_error_t
**error);
int
libphdi_handle_signal_abort
(libphdi_handle_t
*handle, libphdi_error_t
**error);
int
libphdi_handle_open
(libphdi_handle_t
*handle, const char
*filename, int
access_flags,
libphdi_error_t
**error);
int
libphdi_handle_open_extent_data_files
(libphdi_handle_t
*handle, libphdi_error_t
**error);
int
libphdi_handle_close
(libphdi_handle_t
*handle, libphdi_error_t
**error);
ssize_t
libphdi_handle_read_buffer
(libphdi_handle_t
*handle, void
*buffer, size_t
buffer_size,
libphdi_error_t
**error);
ssize_t
libphdi_handle_read_buffer_at_offset
(libphdi_handle_t
*handle, void
*buffer, size_t
buffer_size, off64_t
offset, libphdi_error_t
**error);
off64_t
libphdi_handle_seek_offset
(libphdi_handle_t
*handle, off64_t
offset, int whence,
libphdi_error_t
**error);
int
libphdi_handle_get_offset
(libphdi_handle_t
*handle, off64_t
*offset, libphdi_error_t
**error);
int
libphdi_handle_set_maximum_number_of_open_handles
(libphdi_handle_t
*handle, int
maximum_number_of_open_handles,
libphdi_error_t
**error);
int
libphdi_handle_set_extent_data_files_path
(libphdi_handle_t
*handle, const char
*path, size_t
path_length,
libphdi_error_t
**error);
int
libphdi_handle_get_media_size
(libphdi_handle_t
*handle, size64_t
*media_size,
libphdi_error_t
**error);
int
libphdi_handle_get_utf8_name_size
(libphdi_handle_t
*handle, size_t
*utf8_string_size,
libphdi_error_t
**error);
int
libphdi_handle_get_utf8_name
(libphdi_handle_t
*handle, uint8_t
*utf8_string, size_t
utf8_string_size,
libphdi_error_t
**error);
int
libphdi_handle_get_utf16_name_size
(libphdi_handle_t
*handle, size_t
*utf16_string_size,
libphdi_error_t
**error);
int
libphdi_handle_get_utf16_name
(libphdi_handle_t
*handle, uint16_t
*utf16_string, size_t
utf16_string_size,
libphdi_error_t
**error);
int
libphdi_handle_get_number_of_extents
(libphdi_handle_t
*handle, int
*number_of_extents,
libphdi_error_t
**error);
int
libphdi_handle_get_extent_descriptor_by_index
(libphdi_handle_t
*handle, int
extent_index,
libphdi_extent_descriptor_t
**extent_descriptor,
libphdi_error_t
**error);
int
libphdi_handle_get_number_of_snapshots
(libphdi_handle_t
*handle, int
*number_of_snapshots,
libphdi_error_t
**error);
int
libphdi_handle_get_snapshot_by_index
(libphdi_handle_t
*handle, int
snapshot_index,
libphdi_snapshot_t
**snapshot,
libphdi_error_t
**error);
Available when compiled with wide character string support:
int
libphdi_handle_open_wide
(libphdi_handle_t
*handle, const wchar_t
*filename, int
access_flags,
libphdi_error_t
**error);
int
libphdi_handle_set_extent_data_files_path_wide
(libphdi_handle_t
*handle, const wchar_t
*path, size_t
path_length,
libphdi_error_t
**error);
Available when compiled with libbfio support:
int
libphdi_handle_open_file_io_handle
(libphdi_handle_t
*handle, libbfio_handle_t
*file_io_handle, int
access_flags,
libphdi_error_t
**error);
int
libphdi_handle_open_extent_data_files_file_io_pool
(libphdi_handle_t
*handle, libbfio_pool_t
*file_io_pool,
libphdi_error_t
**error);
Extent descriptor functions
int
libphdi_extent_descriptor_free
(libphdi_extent_descriptor_t
**extent_descriptor,
libphdi_error_t
**error);
int
libphdi_extent_descriptor_get_range
(libphdi_extent_descriptor_t
*extent_descriptor,
off64_t *offset,
size64_t *size,
libphdi_error_t
**error);
int
libphdi_extent_descriptor_get_number_of_images
(libphdi_extent_descriptor_t
*extent_descriptor, int
*number_of_images,
libphdi_error_t
**error);
int
libphdi_extent_descriptor_get_image_descriptor_by_index
(libphdi_extent_descriptor_t
*extent_descriptor, int
image_index,
libphdi_image_descriptor_t
**image_descriptor,
libphdi_error_t
**error);
Image descriptor functions
int
libphdi_image_descriptor_free
(libphdi_image_descriptor_t
**image_descriptor,
libphdi_error_t
**error);
int
libphdi_image_descriptor_get_type
(libphdi_image_descriptor_t
*image_descriptor, int
*type, libphdi_error_t
**error);
int
libphdi_image_descriptor_get_utf8_filename_size
(libphdi_image_descriptor_t
*image_descriptor, size_t
*utf8_string_size,
libphdi_error_t
**error);
int
libphdi_image_descriptor_get_utf8_filename
(libphdi_image_descriptor_t
*image_descriptor,
uint8_t *utf8_string,
size_t utf8_string_size,
libphdi_error_t
**error);
int
libphdi_image_descriptor_get_utf16_filename_size
(libphdi_image_descriptor_t
*image_descriptor, size_t
*utf16_string_size,
libphdi_error_t
**error);
int
libphdi_image_descriptor_get_utf16_filename
(libphdi_image_descriptor_t
*image_descriptor,
uint16_t *utf16_string,
size_t utf16_string_size,
libphdi_error_t
**error);
Snapshot functions
int
libphdi_snapshot_free
(libphdi_snapshot_t
**snapshot,
libphdi_error_t
**error);
int
libphdi_snapshot_get_identifier
(libphdi_snapshot_t
*snapshot, uint8_t
*guid_data, size_t
guid_data_size,
libphdi_error_t
**error);
int
libphdi_snapshot_get_parent_identifier
(libphdi_snapshot_t
*snapshot, uint8_t
*guid_data, size_t
guid_data_size,
libphdi_error_t
**error);
DESCRIPTION¶
The
libphdi_get_version
()
function is used to retrieve the library version.
RETURN VALUES¶
Most of the functions return NULL or -1 on error, dependent on the return type. For the actual return values see "libphdi.h".
ENVIRONMENT¶
None
FILES¶
None
NOTES¶
libphdi can be compiled with wide character support (wchar_t).
To compile libphdi with wide character support use:
./configure --enable-wide-character-type=yes
or define: _UNICODE
or UNICODE
during compilation.
LIBPHDI_WIDE_CHARACTER_TYPE
in libphdi/features.h can be used to determine if libphdi was compiled with
wide character support.
BUGS¶
Please report bugs of any kind on the project issue tracker: https://github.com/libyal/libphdi/issues
AUTHOR¶
These man pages are generated from "libphdi.h".
COPYRIGHT¶
Copyright (C) 2015-2024, Joachim Metz <joachim.metz@gmail.com>.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
SEE ALSO¶
the libphdi.h include file
July 8, 2022 | libphdi |