codepage.h   codepage.h 
/* /*
* Codepage definitions for libewf * Codepage definitions for libewf
* *
* Copyright (c) 2008-2009, Joachim Metz <forensics@hoffmannbv.nl>, * Copyright (c) 2006-2011, Joachim Metz <jbmetz@users.sourceforge.net>
* Hoffmann Investigations.
* *
* Refer to AUTHORS for acknowledgements. * Refer to AUTHORS for acknowledgements.
* *
* This software is free software: you can redistribute it and/or modify * This software is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by * it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This software is distributed in the hope that it will be useful, * This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
skipping to change at line 28 skipping to change at line 27
* *
* You should have received a copy of the GNU Lesser General Public License * You should have received a copy of the GNU Lesser General Public License
* along with this software. If not, see <http://www.gnu.org/licenses/>. * along with this software. If not, see <http://www.gnu.org/licenses/>.
*/ */
#if !defined( _LIBEWF_CODEPAGE_H ) #if !defined( _LIBEWF_CODEPAGE_H )
#define _LIBEWF_CODEPAGE_H #define _LIBEWF_CODEPAGE_H
#include <libewf/types.h> #include <libewf/types.h>
#if defined( __cplusplus )
extern "C" {
#endif
/* The codepage definitions /* The codepage definitions
*/ */
enum LIBEWF_CODEPAGE enum LIBEWF_CODEPAGE
{ {
LIBEWF_CODEPAGE_ASCII = 20127, LIBEWF_CODEPAGE_ASCII = 20127,
LIBEWF_CODEPAGE_ISO_8859_1 = 28591, LIBEWF_CODEPAGE_ISO_8859_1 = 28591,
LIBEWF_CODEPAGE_ISO_8859_2 = 28592, LIBEWF_CODEPAGE_ISO_8859_2 = 28592,
LIBEWF_CODEPAGE_ISO_8859_3 = 28593, LIBEWF_CODEPAGE_ISO_8859_3 = 28593,
LIBEWF_CODEPAGE_ISO_8859_4 = 28594, LIBEWF_CODEPAGE_ISO_8859_4 = 28594,
skipping to change at line 50 skipping to change at line 53
LIBEWF_CODEPAGE_ISO_8859_7 = 28597, LIBEWF_CODEPAGE_ISO_8859_7 = 28597,
LIBEWF_CODEPAGE_ISO_8859_8 = 28598, LIBEWF_CODEPAGE_ISO_8859_8 = 28598,
LIBEWF_CODEPAGE_ISO_8859_9 = 28599, LIBEWF_CODEPAGE_ISO_8859_9 = 28599,
LIBEWF_CODEPAGE_ISO_8859_10 = 28600, LIBEWF_CODEPAGE_ISO_8859_10 = 28600,
LIBEWF_CODEPAGE_ISO_8859_11 = 28601, LIBEWF_CODEPAGE_ISO_8859_11 = 28601,
LIBEWF_CODEPAGE_ISO_8859_13 = 28603, LIBEWF_CODEPAGE_ISO_8859_13 = 28603,
LIBEWF_CODEPAGE_ISO_8859_14 = 28604, LIBEWF_CODEPAGE_ISO_8859_14 = 28604,
LIBEWF_CODEPAGE_ISO_8859_15 = 28605, LIBEWF_CODEPAGE_ISO_8859_15 = 28605,
LIBEWF_CODEPAGE_ISO_8859_16 = 28606, LIBEWF_CODEPAGE_ISO_8859_16 = 28606,
LIBEWF_CODEPAGE_KOI8_R = 20866,
LIBEWF_CODEPAGE_KOI8_U = 21866,
LIBEWF_CODEPAGE_WINDOWS_874 = 874, LIBEWF_CODEPAGE_WINDOWS_874 = 874,
LIBEWF_CODEPAGE_WINDOWS_932 = 932,
LIBEWF_CODEPAGE_WINDOWS_936 = 936,
LIBEWF_CODEPAGE_WINDOWS_949 = 949,
LIBEWF_CODEPAGE_WINDOWS_950 = 950,
LIBEWF_CODEPAGE_WINDOWS_1250 = 1250, LIBEWF_CODEPAGE_WINDOWS_1250 = 1250,
LIBEWF_CODEPAGE_WINDOWS_1251 = 1251, LIBEWF_CODEPAGE_WINDOWS_1251 = 1251,
LIBEWF_CODEPAGE_WINDOWS_1252 = 1252, LIBEWF_CODEPAGE_WINDOWS_1252 = 1252,
LIBEWF_CODEPAGE_WINDOWS_1253 = 1253, LIBEWF_CODEPAGE_WINDOWS_1253 = 1253,
LIBEWF_CODEPAGE_WINDOWS_1254 = 1254, LIBEWF_CODEPAGE_WINDOWS_1254 = 1254,
LIBEWF_CODEPAGE_WINDOWS_1255 = 1255, LIBEWF_CODEPAGE_WINDOWS_1255 = 1255,
LIBEWF_CODEPAGE_WINDOWS_1256 = 1256, LIBEWF_CODEPAGE_WINDOWS_1256 = 1256,
LIBEWF_CODEPAGE_WINDOWS_1257 = 1257, LIBEWF_CODEPAGE_WINDOWS_1257 = 1257,
LIBEWF_CODEPAGE_WINDOWS_1258 = 1258 LIBEWF_CODEPAGE_WINDOWS_1258 = 1258
}; };
skipping to change at line 89 skipping to change at line 99
#define LIBEWF_CODEPAGE_ISO_LATIN_2 LIBEWF_CODEPAGE_ISO_ 8859_2 #define LIBEWF_CODEPAGE_ISO_LATIN_2 LIBEWF_CODEPAGE_ISO_ 8859_2
#define LIBEWF_CODEPAGE_ISO_LATIN_3 LIBEWF_CODEPAGE_ISO_ 8859_3 #define LIBEWF_CODEPAGE_ISO_LATIN_3 LIBEWF_CODEPAGE_ISO_ 8859_3
#define LIBEWF_CODEPAGE_ISO_LATIN_4 LIBEWF_CODEPAGE_ISO_ 8859_4 #define LIBEWF_CODEPAGE_ISO_LATIN_4 LIBEWF_CODEPAGE_ISO_ 8859_4
#define LIBEWF_CODEPAGE_ISO_LATIN_5 LIBEWF_CODEPAGE_ISO_ 8859_9 #define LIBEWF_CODEPAGE_ISO_LATIN_5 LIBEWF_CODEPAGE_ISO_ 8859_9
#define LIBEWF_CODEPAGE_ISO_LATIN_6 LIBEWF_CODEPAGE_ISO_ 8859_10 #define LIBEWF_CODEPAGE_ISO_LATIN_6 LIBEWF_CODEPAGE_ISO_ 8859_10
#define LIBEWF_CODEPAGE_ISO_LATIN_7 LIBEWF_CODEPAGE_ISO_ 8859_13 #define LIBEWF_CODEPAGE_ISO_LATIN_7 LIBEWF_CODEPAGE_ISO_ 8859_13
#define LIBEWF_CODEPAGE_ISO_LATIN_8 LIBEWF_CODEPAGE_ISO_ 8859_14 #define LIBEWF_CODEPAGE_ISO_LATIN_8 LIBEWF_CODEPAGE_ISO_ 8859_14
#define LIBEWF_CODEPAGE_ISO_LATIN_9 LIBEWF_CODEPAGE_ISO_ 8859_15 #define LIBEWF_CODEPAGE_ISO_LATIN_9 LIBEWF_CODEPAGE_ISO_ 8859_15
#define LIBEWF_CODEPAGE_ISO_LATIN_10 LIBEWF_CODEPAGE_ISO_ 8859_16 #define LIBEWF_CODEPAGE_ISO_LATIN_10 LIBEWF_CODEPAGE_ISO_ 8859_16
#define LIBEWF_CODEPAGE_KOI8_RUSSIAN LIBEWF_CODEPAGE_KOI8
_R
#define LIBEWF_CODEPAGE_KOI8_UKRAINIAN LIBEWF_CODEPAGE_KOI8
_U
#define LIBEWF_CODEPAGE_WINDOWS_THAI LIBEWF_CODEPAGE_WIND OWS_874 #define LIBEWF_CODEPAGE_WINDOWS_THAI LIBEWF_CODEPAGE_WIND OWS_874
#define LIBEWF_CODEPAGE_WINDOWS_JAPANESE LIBEWF_CODEPAGE_WIND
OWS_932
#define LIBEWF_CODEPAGE_WINDOWS_CHINESE_SIMPLIFIED LIBEWF_CODEPAGE_WIND
OWS_936
#define LIBEWF_CODEPAGE_WINDOWS_KOREAN LIBEWF_CODEPAGE_WIND
OWS_949
#define LIBEWF_CODEPAGE_WINDOWS_CHINESE_TRADITIONAL LIBEWF_CODEPAGE_WIND
OWS_950
#define LIBEWF_CODEPAGE_WINDOWS_CENTRAL_EUROPEAN LIBEWF_CODEPAGE_WIND OWS_1250 #define LIBEWF_CODEPAGE_WINDOWS_CENTRAL_EUROPEAN LIBEWF_CODEPAGE_WIND OWS_1250
#define LIBEWF_CODEPAGE_WINDOWS_CYRILLIC LIBEWF_CODEPAGE_WIND OWS_1251 #define LIBEWF_CODEPAGE_WINDOWS_CYRILLIC LIBEWF_CODEPAGE_WIND OWS_1251
#define LIBEWF_CODEPAGE_WINDOWS_WESTERN_EUROPEAN LIBEWF_CODEPAGE_WIND OWS_1252 #define LIBEWF_CODEPAGE_WINDOWS_WESTERN_EUROPEAN LIBEWF_CODEPAGE_WIND OWS_1252
#define LIBEWF_CODEPAGE_WINDOWS_GREEK LIBEWF_CODEPAGE_WIND OWS_1253 #define LIBEWF_CODEPAGE_WINDOWS_GREEK LIBEWF_CODEPAGE_WIND OWS_1253
#define LIBEWF_CODEPAGE_WINDOWS_TURKISH LIBEWF_CODEP AGE_WINDOWS_1254 #define LIBEWF_CODEPAGE_WINDOWS_TURKISH LIBEWF_CODEP AGE_WINDOWS_1254
#define LIBEWF_CODEPAGE_WINDOWS_HEBREW LIBEWF_CODEPAGE_WIND OWS_1255 #define LIBEWF_CODEPAGE_WINDOWS_HEBREW LIBEWF_CODEPAGE_WIND OWS_1255
#define LIBEWF_CODEPAGE_WINDOWS_ARABIC LIBEWF_CODEPAGE_WIND OWS_1256 #define LIBEWF_CODEPAGE_WINDOWS_ARABIC LIBEWF_CODEPAGE_WIND OWS_1256
#define LIBEWF_CODEPAGE_WINDOWS_BALTIC LIBEWF_CODEPAGE_WIND OWS_1257 #define LIBEWF_CODEPAGE_WINDOWS_BALTIC LIBEWF_CODEPAGE_WIND OWS_1257
#define LIBEWF_CODEPAGE_WINDOWS_VIETNAMESE LIBEWF_CODEPAGE_WIND OWS_1258 #define LIBEWF_CODEPAGE_WINDOWS_VIETNAMESE LIBEWF_CODEPAGE_WIND OWS_1258
#if defined( __cplusplus )
}
#endif
#endif #endif
 End of changes. 7 change blocks. 
2 lines changed or deleted 29 lines changed or added


 definitions.h   definitions.h 
/* /*
* Definitions for libewf * Definitions for libewf
* *
* Copyright (c) 2006-2009, Joachim Metz <forensics@hoffmannbv.nl>, * Copyright (c) 2006-2011, Joachim Metz <jbmetz@users.sourceforge.net>
* Hoffmann Investigations.
* *
* Refer to AUTHORS for acknowledgements. * Refer to AUTHORS for acknowledgements.
* *
* This software is free software: you can redistribute it and/or modify * This software is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by * it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This software is distributed in the hope that it will be useful, * This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
skipping to change at line 28 skipping to change at line 27
* *
* You should have received a copy of the GNU Lesser General Public License * You should have received a copy of the GNU Lesser General Public License
* along with this software. If not, see <http://www.gnu.org/licenses/>. * along with this software. If not, see <http://www.gnu.org/licenses/>.
*/ */
#if !defined( _LIBEWF_DEFINITIONS_H ) #if !defined( _LIBEWF_DEFINITIONS_H )
#define _LIBEWF_DEFINITIONS_H #define _LIBEWF_DEFINITIONS_H
#include <libewf/types.h> #include <libewf/types.h>
#define LIBEWF_VERSION 20100226 #define LIBEWF_VERSION 20110504
/* The libewf version string /* The version string
*/ */
#define LIBEWF_VERSION_STRING "20100226" #define LIBEWF_VERSION_STRING "20110504"
/* The libewf file access /* The access flags definitions
* bit 1 set to 1 for read access * bit 1 set to 1 for read access
* bit 2 set to 1 for write access * bit 2 set to 1 for write access
* bit 3-4 not used * bit 3-4 not used
* bit 5 set to 1 to resume write * bit 5 set to 1 to resume write
* bit 6-8 not used * bit 6-8 not used
*/ */
#define LIBEWF_FLAG_READ (uint8_t) 0x01 enum LIBEWF_ACCESS_FLAGS
#define LIBEWF_FLAG_WRITE (uint8_t) 0x02 {
#define LIBEWF_FLAG_RESUME (uint8_t) 0x10 LIBEWF_ACCESS_FLAG_READ = 0x01,
LIBEWF_ACCESS_FLAG_WRITE = 0x02,
/* The libewf file access macros LIBEWF_ACCESS_FLAG_RESUME = 0x10
};
/* The file access macros
*/ */
#define LIBEWF_OPEN_READ ( LIBEWF_FLAG_READ ) #define LIBEWF_OPEN_READ ( LIBEWF_ACCESS_FLAG
#define LIBEWF_OPEN_READ_WRITE ( LIBEWF_FLAG_READ | LIBEWF_ _READ )
FLAG_WRITE ) #define LIBEWF_OPEN_READ_WRITE ( LIBEWF_ACCESS_FLAG
#define LIBEWF_OPEN_WRITE ( LIBEWF_FLAG_WRITE ) _READ | LIBEWF_ACCESS_FLAG_WRITE )
#define LIBEWF_OPEN_WRITE_RESUME ( LIBEWF_FLAG_WRITE | LIBEWF #define LIBEWF_OPEN_WRITE ( LIBEWF_ACCESS_FLAG
_FLAG_RESUME ) _WRITE )
#define LIBEWF_OPEN_WRITE_RESUME ( LIBEWF_ACCESS_FLAG
_WRITE | LIBEWF_ACCESS_FLAG_RESUME )
/* TODO deprecated remove after a while */
#define LIBEWF_FLAG_READ LIBEWF_ACCESS_FLAG_R
EAD
#define LIBEWF_FLAG_WRITE LIBEWF_ACCESS_FLAG_W
RITE
#define LIBEWF_FLAG_RESUME LIBEWF_ACCESS_FLAG_R
ESUME
/* The file formats /* The file formats
*/ */
enum LIBEWF_FORMAT enum LIBEWF_FORMAT
{ {
LIBEWF_FORMAT_UNKNOWN = 0x00, LIBEWF_FORMAT_UNKNOWN = 0x00,
LIBEWF_FORMAT_ENCASE1 = 0x01, LIBEWF_FORMAT_ENCASE1 = 0x01,
LIBEWF_FORMAT_ENCASE2 = 0x02, LIBEWF_FORMAT_ENCASE2 = 0x02,
LIBEWF_FORMAT_ENCASE3 = 0x03, LIBEWF_FORMAT_ENCASE3 = 0x03,
LIBEWF_FORMAT_ENCASE4 = 0x04, LIBEWF_FORMAT_ENCASE4 = 0x04,
LIBEWF_FORMAT_ENCASE5 = 0x05, LIBEWF_FORMAT_ENCASE5 = 0x05,
LIBEWF_FORMAT_ENCASE6 = 0x06, LIBEWF_FORMAT_ENCASE6 = 0x06,
LIBEWF_FORMAT_SMART = 0x0E, LIBEWF_FORMAT_SMART = 0x0e,
LIBEWF_FORMAT_FTK = 0x0F, LIBEWF_FORMAT_FTK = 0x0f,
LIBEWF_FORMAT_LVF = 0x10, LIBEWF_FORMAT_LVF = 0x10,
LIBEWF_FORMAT_LINEN5 = 0x25, LIBEWF_FORMAT_LINEN5 = 0x25,
LIBEWF_FORMAT_LINEN6 = 0x26, LIBEWF_FORMAT_LINEN6 = 0x26,
/* The format as specified by Andrew Rosen /* The format as specified by Andrew Rosen
*/ */
LIBEWF_FORMAT_EWF = 0x70, LIBEWF_FORMAT_EWF = 0x70,
/* Libewf eXtended EWF format /* Libewf eXtended EWF format
*/ */
LIBEWF_FORMAT_EWFX = 0x71 LIBEWF_FORMAT_EWFX = 0x71
}; };
/* The default segment file size /* The default segment file size
*/ */
#define LIBEWF_DEFAULT_SEGMENT_FILE_SIZE ( 1500 * 1024 * 1024 ) #define LIBEWF_DEFAULT_SEGMENT_FILE_SIZE ( 1500 * 1024 * 1024 )
/* The compression level definitions /* The compression level definitions
*/ */
enum LIBEWF_COMPRESSION_LEVELS enum LIBEWF_COMPRESSION_LEVELS
{ {
LIBEWF_COMPRESSION_NONE = 0, LIBEWF_COMPRESSION_NONE = 0,
LIBEWF_COMPRESSION_FAST = 1, LIBEWF_COMPRESSION_FAST = 1,
LIBEWF_COMPRESSION_BEST = 2, LIBEWF_COMPRESSION_BEST = 2,
}; };
/* The libewf compression flags /* The compression flags
* bit 1 set to 1 for emtpy block compression * bit 1 set to 1 for emtpy block compression
* bit 2-8 not used * bit 2-8 not used
*/ */
#define LIBEWF_FLAG_COMPRESS_EMPTY_BLOCK (uint8_t) 0x01 #define LIBEWF_FLAG_COMPRESS_EMPTY_BLOCK (uint8_t) 0x01
/* The media type definitions /* The media type definitions
*/ */
enum LIBEWF_MEDIA_TYPES enum LIBEWF_MEDIA_TYPES
{ {
LIBEWF_MEDIA_TYPE_REMOVABLE = 0x00, LIBEWF_MEDIA_TYPE_REMOVABLE = 0x00,
LIBEWF_MEDIA_TYPE_FIXED = 0x01, LIBEWF_MEDIA_TYPE_FIXED = 0x01,
LIBEWF_MEDIA_TYPE_OPTICAL = 0x03, LIBEWF_MEDIA_TYPE_OPTICAL = 0x03,
LIBEWF_MEDIA_TYPE_MEMORY = 0x10 LIBEWF_MEDIA_TYPE_SINGLE_FILES = 0x0e,
LIBEWF_MEDIA_TYPE_MEMORY = 0x10
}; };
/* The media flags definitions /* The media flags definitions
*/ */
enum LIBEWF_MEDIA_FLAGS enum LIBEWF_MEDIA_FLAGS
{ {
LIBEWF_MEDIA_FLAG_PHYSICAL = 0x02, LIBEWF_MEDIA_FLAG_PHYSICAL = 0x02,
LIBEWF_MEDIA_FLAG_FASTBLOC = 0x04, LIBEWF_MEDIA_FLAG_FASTBLOC = 0x04,
LIBEWF_MEDIA_FLAG_TABLEAU = 0x08 LIBEWF_MEDIA_FLAG_TABLEAU = 0x08
}; };
#if 1 #if 1
/* The volume type definitions /* The volume type definitions
*/ */
enum LIBEWF_VOLUME_TYPES enum LIBEWF_VOLUME_TYPES
{ {
LIBEWF_VOLUME_TYPE_LOGICAL = 0x00, LIBEWF_VOLUME_TYPE_LOGICAL = 0x00,
LIBEWF_VOLUME_TYPE_PHYSICAL = 0x01 LIBEWF_VOLUME_TYPE_PHYSICAL = 0x01
}; };
#endif #endif
/* The date representation formats /* The date representation formats
*/ */
enum LIBEWF_DATE_FORMATS enum LIBEWF_DATE_FORMATS
{ {
LIBEWF_DATE_FORMAT_DAYMONTH = 0x01, LIBEWF_DATE_FORMAT_DAYMONTH = 0x01,
LIBEWF_DATE_FORMAT_MONTHDAY = 0x02, LIBEWF_DATE_FORMAT_MONTHDAY = 0x02,
LIBEWF_DATE_FORMAT_ISO8601 = 0x03, LIBEWF_DATE_FORMAT_ISO8601 = 0x03,
LIBEWF_DATE_FORMAT_CTIME = 0x04 LIBEWF_DATE_FORMAT_CTIME = 0x04
}; };
/* The compression levels
*/
#define LIBEWF_COMPRESSION_LEVEL_NONE "n"
#define LIBEWF_COMPRESSION_LEVEL_FAST "f"
#define LIBEWF_COMPRESSION_LEVEL_BEST "b"
/* TODO deprecated remove after a while */
/* The compression types /* The compression types
*/ */
#define LIBEWF_COMPRESSION_TYPE_NONE "n" #define LIBEWF_COMPRESSION_TYPE_NONE "n"
#define LIBEWF_COMPRESSION_TYPE_FAST "f" #define LIBEWF_COMPRESSION_TYPE_FAST "f"
#define LIBEWF_COMPRESSION_TYPE_BEST "b" #define LIBEWF_COMPRESSION_TYPE_BEST "b"
/* The segment file type definitions /* The segment file type definitions
*/ */
enum LIBEWF_SEGMENT_FILE_TYPES enum LIBEWF_SEGMENT_FILE_TYPES
{ {
LIBEWF_SEGMENT_FILE_TYPE_DWF = (int) 'd', LIBEWF_SEGMENT_FILE_TYPE_DWF = (int) 'd',
LIBEWF_SEGMENT_FILE_TYPE_EWF = (int) 'E', LIBEWF_SEGMENT_FILE_TYPE_EWF = (int) 'E',
LIBEWF_SEGMENT_FILE_TYPE_LWF = (int) 'L' LIBEWF_SEGMENT_FILE_TYPE_LWF = (int) 'L'
};
/* The (single) file entry flags
*/
enum LIBEWF_FILE_ENTRY_FLAGS
{
LIBEWF_FILE_ENTRY_FLAG_IS_FILE = 0x08,
}; };
#endif #endif
 End of changes. 22 change blocks. 
55 lines changed or deleted 83 lines changed or added


 error.h   error.h 
/* /*
* The error code definitions for libewf * The error code definitions for libewf
* *
* Copyright (c) 2008-2009, Joachim Metz <forensics@hoffmannbv.nl>, * Copyright (c) 2006-2011, Joachim Metz <jbmetz@users.sourceforge.net>
* Hoffmann Investigations.
* *
* Refer to AUTHORS for acknowledgements. * Refer to AUTHORS for acknowledgements.
* *
* This software is free software: you can redistribute it and/or modify * This software is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by * it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This software is distributed in the hope that it will be useful, * This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public License * You should have received a copy of the GNU Lesser General Public License
* along with this software. If not, see <http://www.gnu.org/licenses/>. * along with this software. If not, see <http://www.gnu.org/licenses/>.
*/ */
#if !defined( _LIBEWF_ERROR_H ) #if !defined( _LIBEWF_ERROR_H )
#define _LIBEWF_ERROR_H #define _LIBEWF_ERROR_H
#include <libewf/types.h>
/* External error type definition hides internal structure /* External error type definition hides internal structure
*/ */
typedef intptr_t libewf_error_t; typedef intptr_t libewf_error_t;
/* The error domains /* The error domains
*/ */
enum LIBEWF_ERROR_DOMAINS enum LIBEWF_ERROR_DOMAINS
{ {
LIBEWF_ERROR_DOMAIN_ARGUMENTS = (int) 'a', LIBEWF_ERROR_DOMAIN_ARGUMENTS = (int) 'a',
LIBEWF_ERROR_DOMAIN_CONVERSION = (int) 'c', LIBEWF_ERROR_DOMAIN_CONVERSION = (int) 'c',
LIBEWF_ERROR_DOMAIN_COMPRESSION = (int) 'C', LIBEWF_ERROR_DOMAIN_COMPRESSION = (int) 'C',
LIBEWF_ERROR_DOMAIN_IO = (int) 'I', LIBEWF_ERROR_DOMAIN_IO = (int) 'I',
LIBEWF_ERROR_DOMAIN_INPUT = (int) 'i', LIBEWF_ERROR_DOMAIN_INPUT = (int) 'i',
LIBEWF_ERROR_DOMAIN_MEMORY = (int) 'm', LIBEWF_ERROR_DOMAIN_MEMORY = (int) 'm',
LIBEWF_ERROR_DOMAIN_OUTPUT = (int) 'o', LIBEWF_ERROR_DOMAIN_OUTPUT = (int) 'o',
LIBEWF_ERROR_DOMAIN_RUNTIME = (int) 'r', LIBEWF_ERROR_DOMAIN_RUNTIME = (int) 'r',
}; };
/* The argument error codes /* The argument error codes
* to signify errors regarding arguments passed to a function * to signify errors regarding arguments passed to a function
*/ */
enum LIBEWF_ARGUMENT_ERROR enum LIBEWF_ARGUMENT_ERROR
{ {
LIBEWF_ARGUMENT_ERROR_GENERIC = 0, LIBEWF_ARGUMENT_ERROR_GENERIC = 0,
/* The argument contains an invalid value /* The argument contains an invalid value
*/ */
LIBEWF_ARGUMENT_ERROR_INVALID_VALUE = 1, LIBEWF_ARGUMENT_ERROR_INVALID_VALUE = 1,
/* The argument contains a value less than zero /* The argument contains a value less than zero
*/ */
LIBEWF_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO = 2, LIBEWF_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO = 2,
/* The argument contains a value zero or less /* The argument contains a value zero or less
*/ */
LIBEWF_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS = 3, LIBEWF_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS = 3,
/* The argument contains a value that exceeds the maximum /* The argument contains a value that exceeds the maximum
* for the specific type * for the specific type
*/ */
LIBEWF_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM = 4, LIBEWF_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM = 4,
/* The argument contains a value that is too small /* The argument contains a value that is too small
*/ */
LIBEWF_ARGUMENT_ERROR_VALUE_TOO_SMALL = 5, LIBEWF_ARGUMENT_ERROR_VALUE_TOO_SMALL = 5,
/* The argument contains a value that is too large /* The argument contains a value that is too large
*/ */
LIBEWF_ARGUMENT_ERROR_VALUE_TOO_LARGE = 6, LIBEWF_ARGUMENT_ERROR_VALUE_TOO_LARGE = 6,
/* The argument contains a value that is out of range /* The argument contains a value that is out of bounds
*/ */
LIBEWF_ARGUMENT_ERROR_VALUE_OUT_OF_RANGE = 7, LIBEWF_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS = 7,
/* The argument contains a value that is not supported /* The argument contains a value that is not supported
*/ */
LIBEWF_ARGUMENT_ERROR_UNSUPPORTED_VALUE = 8, LIBEWF_ARGUMENT_ERROR_UNSUPPORTED_VALUE = 8,
/* The argument contains a value that conficts with another argument /* The argument contains a value that conficts with another argument
*/ */
LIBEWF_ARGUMENT_ERROR_CONFLICTING_VALUE = 9 LIBEWF_ARGUMENT_ERROR_CONFLICTING_VALUE = 9
}; };
/* TODO deprecated remove after a while */
#define LIBEWF_ARGUMENT_ERROR_VALUE_OUT_OF_RANGE LIBEWF_ARGUMENT_ERRO
R_VALUE_OUT_OF_BOUNDS
/* The conversion error codes /* The conversion error codes
* to signify errors regarding conversions * to signify errors regarding conversions
*/ */
enum LIBEWF_CONVERSION_ERROR enum LIBEWF_CONVERSION_ERROR
{ {
LIBEWF_CONVERSION_ERROR_GENERIC = 0, LIBEWF_CONVERSION_ERROR_GENERIC = 0,
/* The conversion failed on the input /* The conversion failed on the input
*/ */
LIBEWF_CONVERSION_ERROR_INPUT_FAILED = 1, LIBEWF_CONVERSION_ERROR_INPUT_FAILED = 1,
/* The conversion failed on the output /* The conversion failed on the output
*/ */
LIBEWF_CONVERSION_ERROR_OUTPUT_FAILED = 2 LIBEWF_CONVERSION_ERROR_OUTPUT_FAILED = 2
}; };
/* The compression error codes /* The compression error codes
* to signify errors regarding compression * to signify errors regarding compression
*/ */
enum LIBEWF_COMPRESSION_ERROR enum LIBEWF_COMPRESSION_ERROR
{ {
LIBEWF_COMPRESSION_ERROR_GENERIC = 0, LIBEWF_COMPRESSION_ERROR_GENERIC = 0,
/* The compression failed /* The compression failed
*/ */
LIBEWF_COMPRESSION_ERROR_COMPRESS_FAILED = 1, LIBEWF_COMPRESSION_ERROR_COMPRESS_FAILED = 1,
/* The de/uncompression failed /* The decompression failed
*/ */
LIBEWF_COMPRESSION_ERROR_UNCOMPRESS_FAILED = 2 LIBEWF_COMPRESSION_ERROR_DECOMPRESS_FAILED = 2
}; };
/* TODO deprecated remove after a while */
#define LIBERROR_COMPRESSION_ERROR_UNCOMPRESS_FAILED LIBERROR_COMPRESSION
_ERROR_DECOMPRESS_FAILED
/* The input/output error codes /* The input/output error codes
* to signify errors regarding input/output * to signify errors regarding input/output
*/ */
enum LIBEWF_IO_ERROR enum LIBEWF_IO_ERROR
{ {
LIBEWF_IO_ERROR_GENERIC = 0, LIBEWF_IO_ERROR_GENERIC = 0,
/* The open failed /* The open failed
*/ */
LIBEWF_IO_ERROR_OPEN_FAILED = 1, LIBEWF_IO_ERROR_OPEN_FAILED = 1,
/* The close failed /* The close failed
*/ */
LIBEWF_IO_ERROR_CLOSE_FAILED = 2, LIBEWF_IO_ERROR_CLOSE_FAILED = 2,
/* The seek failed /* The seek failed
*/ */
LIBEWF_IO_ERROR_SEEK_FAILED = 3, LIBEWF_IO_ERROR_SEEK_FAILED = 3,
/* The read failed /* The read failed
*/ */
LIBEWF_IO_ERROR_READ_FAILED = 4, LIBEWF_IO_ERROR_READ_FAILED = 4,
/* The write failed /* The write failed
*/ */
LIBEWF_IO_ERROR_WRITE_FAILED = 5, LIBEWF_IO_ERROR_WRITE_FAILED = 5,
/* Access denied /* Access denied
*/ */
LIBEWF_IO_ERROR_ACCESS_DENIED = 6, LIBEWF_IO_ERROR_ACCESS_DENIED = 6,
/* The resource is invalid i.e. a missing file /* The resource is invalid i.e. a missing file
*/ */
LIBEWF_IO_ERROR_INVALID_RESOURCE = 7, LIBEWF_IO_ERROR_INVALID_RESOURCE = 7,
/* The ioctl failed /* The ioctl failed
*/ */
LIBEWF_IO_ERROR_IOCTL_FAILED = 8, LIBEWF_IO_ERROR_IOCTL_FAILED = 8,
/* The unlink failed /* The unlink failed
*/ */
LIBEWF_IO_ERROR_UNLINK_FAILED = 9 LIBEWF_IO_ERROR_UNLINK_FAILED = 9
}; };
/* The input error codes /* The input error codes
* to signify errors regarding handing input data * to signify errors regarding handing input data
*/ */
enum LIBEWF_INPUT_ERROR enum LIBEWF_INPUT_ERROR
{ {
LIBEWF_INPUT_ERROR_GENERIC = 0, LIBEWF_INPUT_ERROR_GENERIC = 0,
/* The input contains invalid data /* The input contains invalid data
*/ */
LIBEWF_INPUT_ERROR_INVALID_DATA = 1, LIBEWF_INPUT_ERROR_INVALID_DATA = 1,
/* The input contains an unsupported signature /* The input contains an unsupported signature
*/ */
LIBEWF_INPUT_ERROR_SIGNATURE_MISMATCH = 2, LIBEWF_INPUT_ERROR_SIGNATURE_MISMATCH = 2,
/* A CRC in the input did not match /* A checksum in the input did not match
*/ */
LIBEWF_INPUT_ERROR_CRC_MISMATCH = 3, LIBEWF_INPUT_ERROR_CHECKSUM_MISMATCH = 3,
/* A value in the input did not match a previously /* A value in the input did not match a previously
* read value or calculated value * read value or calculated value
*/ */
LIBEWF_INPUT_ERROR_VALUE_MISMATCH = 4, LIBEWF_INPUT_ERROR_VALUE_MISMATCH = 4
/* The last segment file is missing from the input
*/
LIBEWF_INPUT_ERROR_MISSING_LAST_SEGMENT_FILE = 5,
/* The last section is missing from the input
*/
LIBEWF_INPUT_ERROR_MISSING_LAST_SECTION = 6
}; };
/* TODO deprecated remove after a while */
#define LIBEWF_INPUT_ERROR_CRC_MISMATCH LIBEWF_INPUT
_ERROR_CHECKSUM_MISMATCH
/* The memory error codes /* The memory error codes
* to signify errors regarding memory * to signify errors regarding memory
*/ */
enum LIBEWF_MEMORY_ERROR enum LIBEWF_MEMORY_ERROR
{ {
LIBEWF_MEMORY_ERROR_GENERIC = 0, LIBEWF_MEMORY_ERROR_GENERIC = 0,
/* There is insufficient memory available /* There is insufficient memory available
*/ */
LIBEWF_MEMORY_ERROR_INSUFFICIENT = 1, LIBEWF_MEMORY_ERROR_INSUFFICIENT = 1,
/* The memory failed to be copied /* The memory failed to be copied
*/ */
LIBEWF_MEMORY_ERROR_COPY_FAILED = 2, LIBEWF_MEMORY_ERROR_COPY_FAILED = 2,
/* The memory failed to be set /* The memory failed to be set
*/ */
LIBEWF_MEMORY_ERROR_SET_FAILED = 3 LIBEWF_MEMORY_ERROR_SET_FAILED = 3
}; };
/* The runtime error codes /* The runtime error codes
* to signify errors regarding runtime processing * to signify errors regarding runtime processing
*/ */
enum LIBEWF_RUNTIME_ERROR enum LIBEWF_RUNTIME_ERROR
{ {
LIBEWF_RUNTIME_ERROR_GENERIC = 0, LIBEWF_RUNTIME_ERROR_GENERIC = 0,
/* The value is missing /* The value is missing
*/ */
LIBEWF_RUNTIME_ERROR_VALUE_MISSING = 1, LIBEWF_RUNTIME_ERROR_VALUE_MISSING = 1,
/* The value was already set /* The value was already set
*/ */
LIBEWF_RUNTIME_ERROR_VALUE_ALREADY_SET = 2, LIBEWF_RUNTIME_ERROR_VALUE_ALREADY_SET = 2,
/* The creation and/or initialization of an internal structure faile d /* The creation and/or initialization of an internal structure faile d
*/ */
LIBEWF_RUNTIME_ERROR_INITIALIZE_FAILED = 3, LIBEWF_RUNTIME_ERROR_INITIALIZE_FAILED = 3,
/* The resize of an internal structure failed /* The resize of an internal structure failed
*/ */
LIBEWF_RUNTIME_ERROR_RESIZE_FAILED = 4, LIBEWF_RUNTIME_ERROR_RESIZE_FAILED = 4,
/* The free and/or finalization of an internal structure failed /* The free and/or finalization of an internal structure failed
*/ */
LIBEWF_RUNTIME_ERROR_FINALIZE_FAILED = 5, LIBEWF_RUNTIME_ERROR_FINALIZE_FAILED = 5,
/* The value could not be determined /* The value could not be determined
*/ */
LIBEWF_RUNTIME_ERROR_GET_FAILED = 6, LIBEWF_RUNTIME_ERROR_GET_FAILED = 6,
/* The value could not be set /* The value could not be set
*/ */
LIBEWF_RUNTIME_ERROR_SET_FAILED = 7, LIBEWF_RUNTIME_ERROR_SET_FAILED = 7,
/* The value could not be appended/prepended /* The value could not be appended/prepended
*/ */
LIBEWF_RUNTIME_ERROR_APPEND_FAILED = 8, LIBEWF_RUNTIME_ERROR_APPEND_FAILED = 8,
/* The value could not be copied /* The value could not be copied
*/ */
LIBEWF_RUNTIME_ERROR_COPY_FAILED = 9, LIBEWF_RUNTIME_ERROR_COPY_FAILED = 9,
/* The value could not be removed /* The value could not be removed
*/ */
LIBEWF_RUNTIME_ERROR_REMOVE_FAILED = 10, LIBEWF_RUNTIME_ERROR_REMOVE_FAILED = 10,
/* The value could not be printed /* The value could not be printed
*/ */
LIBEWF_RUNTIME_ERROR_PRINT_FAILED = 11, LIBEWF_RUNTIME_ERROR_PRINT_FAILED = 11,
/* The value was out of range /* The value was out of bounds
*/ */
LIBEWF_RUNTIME_ERROR_VALUE_OUT_OF_RANGE = 12, LIBEWF_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS = 12,
/* The value exceeds the maximum for its specific type /* The value exceeds the maximum for its specific type
*/ */
LIBEWF_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM = 13, LIBEWF_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM = 13,
/* The value is unsupported /* The value is unsupported
*/ */
LIBEWF_RUNTIME_ERROR_UNSUPPORTED_VALUE = 14 LIBEWF_RUNTIME_ERROR_UNSUPPORTED_VALUE = 14,
/* An abort was requested
*/
LIBEWF_RUNTIME_ERROR_ABORT_REQUESTED = 15
}; };
/* TODO deprecated remove after a while */
#define LIBEWF_RUNTIME_ERROR_VALUE_OUT_OF_RANGE LIBEWF_RUNTIME_ERROR
_VALUE_OUT_OF_BOUNDS
/* The output error codes /* The output error codes
*/ */
enum LIBEWF_OUTPUT_ERROR enum LIBEWF_OUTPUT_ERROR
{ {
LIBEWF_OUTPUT_ERROR_GENERIC = 0 LIBEWF_OUTPUT_ERROR_GENERIC = 0,
/* There is insuficient space to write the output
*/
LIBEWF_OUTPUT_ERROR_INSUFFICIENT_SPACE = 1
}; };
#endif #endif
 End of changes. 62 change blocks. 
73 lines changed or deleted 90 lines changed or added


 extern.h   extern.h 
/* /*
* The extern definition * The extern definition
* This header should be included in header files that export or import * This header should be included in header files that export or import
* library functions * library functions
* *
* Copyright (c) 2006-2009, Joachim Metz <forensics@hoffmannbv.nl>, * Copyright (c) 2006-2011, Joachim Metz <jbmetz@users.sourceforge.net>
* Hoffmann Investigations.
* *
* Refer to AUTHORS for acknowledgements. * Refer to AUTHORS for acknowledgements.
* *
* This software is free software: you can redistribute it and/or modify * This software is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by * it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This software is distributed in the hope that it will be useful, * This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
 End of changes. 1 change blocks. 
2 lines changed or deleted 1 lines changed or added


 features.h   features.h 
/* /*
* Features of libewf * Features of libewf
* *
* Copyright (c) 2006-2009, Joachim Metz <forensics@hoffmannbv.nl>, * Copyright (c) 2006-2011, Joachim Metz <jbmetz@users.sourceforge.net>
* Hoffmann Investigations.
* *
* Refer to AUTHORS for acknowledgements. * Refer to AUTHORS for acknowledgements.
* *
* This software is free software: you can redistribute it and/or modify * This software is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by * it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This software is distributed in the hope that it will be useful, * This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
skipping to change at line 38 skipping to change at line 37
/* Old definition kept for compatibility (for now) /* Old definition kept for compatibility (for now)
*/ */
#define LIBEWF_WIDE_CHARACTER_TYPE 1 #define LIBEWF_WIDE_CHARACTER_TYPE 1
#endif #endif
#if defined( HAVE_LIBBFIO ) || ( !defined( WINAPI ) && 0 ) #if defined( HAVE_LIBBFIO ) || ( !defined( WINAPI ) && 0 )
#define LIBEWF_HAVE_BFIO 1 #define LIBEWF_HAVE_BFIO 1
#endif #endif
#if !defined( LIBEWF_DEPRECATED )
#if defined( __GNUC__ ) && __GNUC__ >= 3
#define LIBEWF_DEPRECATED __attribute__ ((__deprecated__))
#elif defined( _MSC_VER )
#define LIBEWF_DEPRECATED __declspec(deprecated)
#else
#define LIBEWF_DEPRECATED
#endif
#endif
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 11 lines changed or added


 libewf.h   libewf.h 
/* /*
* Library for the Expert Witness Compression Format Support (EWF) * Library to support the Expert Witness Compression Format (EWF)
* *
* Copyright (c) 2006-2009, Joachim Metz <forensics@hoffmannbv.nl>, * Copyright (c) 2006-2011, Joachim Metz <jbmetz@users.sourceforge.net>
* Hoffmann Investigations.
* *
* Refer to AUTHORS for acknowledgements. * Refer to AUTHORS for acknowledgements.
* *
* This software is free software: you can redistribute it and/or modify * This software is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by * it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This software is distributed in the hope that it will be useful, * This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
skipping to change at line 33 skipping to change at line 32
#if !defined( _LIBEWF_H ) #if !defined( _LIBEWF_H )
#define _LIBEWF_H #define _LIBEWF_H
#include <libewf/codepage.h> #include <libewf/codepage.h>
#include <libewf/definitions.h> #include <libewf/definitions.h>
#include <libewf/error.h> #include <libewf/error.h>
#include <libewf/extern.h> #include <libewf/extern.h>
#include <libewf/features.h> #include <libewf/features.h>
#include <libewf/types.h> #include <libewf/types.h>
#if 1 || defined( HAVE_V1_API )
#include <libewf/handle.h>
#endif
#include <stdio.h> #include <stdio.h>
#if defined( LIBEWF_HAVE_BFIO ) #if defined( LIBEWF_HAVE_BFIO )
#include <libbfio.h> #include <libbfio.h>
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* ------------------------------------------------------------------------ - /* ------------------------------------------------------------------------ -
* Support functions * Support functions
* ------------------------------------------------------------------------ - */ * ------------------------------------------------------------------------ - */
/* Returns the library version /* Returns the library version
*/ */
LIBEWF_EXTERN const char *libewf_get_version( LIBEWF_EXTERN \
void ); const char *libewf_get_version(
void );
/* Returns the flags for reading /* Returns the access flags for reading
*/ */
LIBEWF_EXTERN uint8_t libewf_get_flags_read( LIBEWF_EXTERN \
void ); int libewf_get_access_flags_read(
void );
/* Returns the flags for reading and writing /* Returns the access flags for reading and writing
*/ */
LIBEWF_EXTERN uint8_t libewf_get_flags_read_write( LIBEWF_EXTERN \
void ); int libewf_get_access_flags_read_write(
void );
/* Returns the flags for writing /* Returns the access flags for writing
*/ */
LIBEWF_EXTERN uint8_t libewf_get_flags_write( LIBEWF_EXTERN \
void ); int libewf_get_access_flags_write(
void );
/* Returns the flags for resume writing /* Returns the access flags for resume writing
*/ */
LIBEWF_EXTERN uint8_t libewf_get_flags_write_resume( LIBEWF_EXTERN \
void ); int libewf_get_access_flags_write_resume(
void );
/* 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
*/
LIBEWF_EXTERN \
int libewf_get_codepage(
int *codepage,
libewf_error_t **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
*/
LIBEWF_EXTERN \
int libewf_set_codepage(
int codepage,
libewf_error_t **error );
/* Determines if a file is an EWF file (check for the EWF file signature) /* Determines if a file is an EWF file (check for the EWF file signature)
* Returns 1 if true, 0 if not or -1 on error * Returns 1 if true, 0 if not or -1 on error
*/ */
#if 0 || defined( HAVE_V2_API ) LIBEWF_EXTERN \
LIBEWF_EXTERN int libewf_check_file_signature( int libewf_check_file_signature(
const char *filename, const char *filename,
libewf_error_t **error ); libewf_error_t **error );
#else
LIBEWF_EXTERN int libewf_check_file_signature(
const char *filename );
#endif
#if defined( LIBEWF_HAVE_WIDE_CHARACTER_TYPE ) #if defined( LIBEWF_HAVE_WIDE_CHARACTER_TYPE )
/* Determines if a file is an EWF file (check for the EWF file signature) /* Determines if a file is an EWF file (check for the EWF file signature)
* Returns 1 if true, 0 if not or -1 on error * Returns 1 if true, 0 if not or -1 on error
*/ */
#if 0 || defined( HAVE_V2_API ) LIBEWF_EXTERN \
LIBEWF_EXTERN int libewf_check_file_signature_wide( int libewf_check_file_signature_wide(
const wchar_t *filename, const wchar_t *filename,
libewf_error_t **error ); libewf_error_t **error );
#else
LIBEWF_EXTERN int libewf_check_file_signature_wide(
const wchar_t *filename );
#endif
#endif #endif
#if 0 || defined( HAVE_V2_API )
#if defined( LIBEWF_HAVE_BFIO ) #if defined( LIBEWF_HAVE_BFIO )
/* Determines if a file is an EWF file (check for the EWF file signature) u sing a Basic File IO (bfio) handle /* Determines if a file is an EWF file (check for the EWF file signature) u sing a Basic File IO (bfio) handle
* Returns 1 if true, 0 if not or -1 on error * Returns 1 if true, 0 if not or -1 on error
*/ */
LIBEWF_EXTERN int libewf_check_file_signature_file_io_handle( LIBEWF_EXTERN \
libbfio_handle_t *file_io_handle, int libewf_check_file_signature_file_io_handle(
libewf_error_t **error ); libbfio_handle_t *file_io_handle,
#endif libewf_error_t **error );
#endif #endif
/* Globs the segment files according to the EWF naming schema /* Globs the segment files according to the EWF naming schema
* if the format is known the filename should contain the base of the filen ame * if the format is known the filename should contain the base of the filen ame
* otherwise the function will try to determine the format based on the ext ension * otherwise the function will try to determine the format based on the ext ension
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*/ */
#if 0 || defined( HAVE_V2_API ) LIBEWF_EXTERN \
LIBEWF_EXTERN int libewf_glob( int libewf_glob(
const char *filename, const char *filename,
size_t filename_length, size_t filename_length,
uint8_t format, uint8_t format,
char **filenames[], char **filenames[],
int *amount_of_filenames, int *number_of_filenames,
libewf_error_t **error ); libewf_error_t **error );
#else
/* Globs the segment files according to the EWF naming schema
* if the format is known the filename should contain the base of the filen
ame
* otherwise the function will try to determine the format based on the ext
ension
* Returns the amount of filenames if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_glob(
const char *filename,
size_t filename_length,
uint8_t format,
char **filenames[] );
#endif
#if 0 || defined( HAVE_V2_API )
/* Frees the globbed filenames /* Frees the globbed filenames
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*/ */
LIBEWF_EXTERN int libewf_glob_free( LIBEWF_EXTERN \
char *filenames[], int libewf_glob_free(
int amount_of_filenames, char *filenames[],
libewf_error_t **error ); int number_of_filenames,
#endif libewf_error_t **error );
#if defined( LIBEWF_HAVE_WIDE_CHARACTER_TYPE ) #if defined( LIBEWF_HAVE_WIDE_CHARACTER_TYPE )
/* Globs the segment files according to the EWF naming schema /* Globs the segment files according to the EWF naming schema
* if the format is known the filename should contain the base of the filen ame * if the format is known the filename should contain the base of the filen ame
* otherwise the function will try to determine the format based on the ext ension * otherwise the function will try to determine the format based on the ext ension
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*/ */
#if 0 || defined( HAVE_V2_API ) LIBEWF_EXTERN \
LIBEWF_EXTERN int libewf_glob_wide( int libewf_glob_wide(
const wchar_t *filename, const wchar_t *filename,
size_t filename_length, size_t filename_length,
uint8_t format, uint8_t format,
wchar_t **filenames[], wchar_t **filenames[],
int *amount_of_filenames, int *number_of_filenames,
libewf_error_t **error ); libewf_error_t **error );
#else
/* Globs the segment files according to the EWF naming schema
* if the format is known the filename should contain the base of the filen
ame
* otherwise the function will try to determine the format based on the ext
ension
* Returns the amount of filenames if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_glob_wide(
const wchar_t *filename,
size_t filename_length,
uint8_t format,
wchar_t **filenames[] );
#endif
#if 0 || defined( HAVE_V2_API ) /* Frees the globbed wide filenames
/* Frees the globbed filenames
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*/ */
LIBEWF_EXTERN int libewf_glob_free( LIBEWF_EXTERN \
char *filenames[], int libewf_glob_wide_free(
int amount_of_filenames, wchar_t *filenames[],
libewf_error_t **error ); int number_of_filenames,
#endif libewf_error_t **error );
#endif #endif
/* ------------------------------------------------------------------------ - /* ------------------------------------------------------------------------ -
* Notify functions (APIv1) * Support functions - deprecated
* ------------------------------------------------------------------------ - */ * ------------------------------------------------------------------------ - */
#if 1 || defined( HAVE_V1_API ) /* Returns the flags for reading
*
* This function deprecated use libewf_get_access_flags_read instead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
uint8_t libewf_get_flags_read(
void );
/* Set the notify values /* Returns the flags for reading and writing
*
* This function deprecated use libewf_get_access_flags_read_write instead
*/ */
LIBEWF_EXTERN void libewf_set_notify_values( LIBEWF_DEPRECATED \
FILE *stream, LIBEWF_EXTERN \
uint8_t verbose ); uint8_t libewf_get_flags_read_write(
void );
#endif /* Returns the flags for writing
*
* This function deprecated use libewf_get_access_flags_write instead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
uint8_t libewf_get_flags_write(
void );
/* Returns the flags for resume writing
*
* This function deprecated use libewf_get_access_flags_write_resume instea
d
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
uint8_t libewf_get_flags_write_resume(
void );
/* ------------------------------------------------------------------------ - /* ------------------------------------------------------------------------ -
* Notify functions (APIv2) * Notify functions
* ------------------------------------------------------------------------ - */ * ------------------------------------------------------------------------ - */
#if 0 || defined( HAVE_V2_API ) /* Sets the verbose notification
/* Set the verbose notification
*/ */
LIBEWF_EXTERN void libewf_notify_set_verbose( LIBEWF_EXTERN \
int verbose ); void libewf_notify_set_verbose(
int verbose );
/* Set the notification stream /* Sets the notification stream
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*/ */
LIBEWF_EXTERN int libewf_notify_set_stream( LIBEWF_EXTERN \
FILE *stream, int libewf_notify_set_stream(
libewf_error_t **error ); FILE *stream,
libewf_error_t **error );
/* Opens the notification stream using a filename /* Opens the notification stream using a filename
* The stream is opened in append mode * The stream is opened in append mode
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*/ */
LIBEWF_EXTERN int libewf_notify_stream_open( LIBEWF_EXTERN \
const char *filename, int libewf_notify_stream_open(
libewf_error_t **error ); const char *filename,
libewf_error_t **error );
/* Closes the notification stream if opened using a filename /* Closes the notification stream if opened using a filename
* Returns 0 if successful or -1 on error * Returns 0 if successful or -1 on error
*/ */
LIBEWF_EXTERN int libewf_notify_stream_close( LIBEWF_EXTERN \
libewf_error_t **error ); int libewf_notify_stream_close(
libewf_error_t **error );
#endif
/* ------------------------------------------------------------------------ - /* ------------------------------------------------------------------------ -
* Error functions (APIv2) * Error functions
* ------------------------------------------------------------------------ - */ * ------------------------------------------------------------------------ - */
#if 0 || defined( HAVE_V2_API )
/* Frees the error including elements /* Frees the error including elements
*/ */
LIBEWF_EXTERN void libewf_error_free( LIBEWF_EXTERN \
libewf_error_t **error ); void libewf_error_free(
libewf_error_t **error );
/* Prints a descriptive string of the error to the stream /* Prints a descriptive string of the error to the stream
* Returns the amount of printed characters if successful or -1 on error * Returns the number of printed characters if successful or -1 on error
*/ */
LIBEWF_EXTERN int libewf_error_fprint( LIBEWF_EXTERN \
libewf_error_t *error, int libewf_error_fprint(
FILE *stream ); libewf_error_t *error,
FILE *stream );
/* Prints a descriptive string of the error to the string /* Prints a descriptive string of the error to the string
* Returns the amount of printed characters if successful or -1 on error * The end-of-string character is not included in the return value
* Returns the number of printed characters if successful or -1 on error
*/ */
LIBEWF_EXTERN int libewf_error_sprint( LIBEWF_EXTERN \
libewf_error_t *error, int libewf_error_sprint(
char *string, libewf_error_t *error,
size_t size ); char *string,
size_t size );
/* Prints a backtrace of the error to the stream /* Prints a backtrace of the error to the stream
* Returns the amount of printed characters if successful or -1 on error * Returns the number of printed characters if successful or -1 on error
*/ */
LIBEWF_EXTERN int libewf_error_backtrace_fprint( LIBEWF_EXTERN \
libewf_error_t *error, int libewf_error_backtrace_fprint(
FILE *stream ); libewf_error_t *error,
FILE *stream );
/* Prints a backtrace of the error to the string /* Prints a backtrace of the error to the string
* Returns the amount of printed characters if successful or -1 on error * The end-of-string character is not included in the return value
* Returns the number of printed characters if successful or -1 on error
*/ */
LIBEWF_EXTERN int libewf_error_backtrace_sprint( LIBEWF_EXTERN \
libewf_error_t *error, int libewf_error_backtrace_sprint(
char *string, libewf_error_t *error,
size_t size ); char *string,
size_t size );
#endif
/* ------------------------------------------------------------------------ - /* ------------------------------------------------------------------------ -
* File/Handle functions (APIv1) * File/Handle functions
* ------------------------------------------------------------------------ - */ * ------------------------------------------------------------------------ - */
#if 1 || defined( HAVE_V1_API ) /* Initialize the handle
* The handle must point to a NULL pointer to be allocated
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_initialize(
libewf_handle_t **handle,
libewf_error_t **error );
/* Signals the libewf handle to abort its current activity /* Frees the handle including elements
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*/ */
LIBEWF_EXTERN int libewf_signal_abort( LIBEWF_EXTERN \
libewf_handle_t *handle ); int libewf_handle_free(
libewf_handle_t **handle,
libewf_error_t **error );
/* Clones the handle including elements
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_clone(
libewf_handle_t **destination_handle,
libewf_handle_t *source_handle,
libewf_error_t **error );
/* Signals the handle to abort its current activity
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_signal_abort(
libewf_handle_t *handle,
libewf_error_t **error );
/* Opens a set of EWF file(s) /* Opens a set of EWF file(s)
* For reading files should contain all filenames that make up an EWF image * For reading files should contain all filenames that make up an EWF image
* For writing files should contain the base of the filename, extentions li ke .e01 will be automatically added * For writing files should contain the base of the filename, extentions li ke .e01 will be automatically added
* Returns a pointer to the new instance of handle, NULL on error * Returns 1 if successful or -1 on error
*/ */
LIBEWF_EXTERN libewf_handle_t *libewf_open( LIBEWF_EXTERN \
char * const filenames[], int libewf_handle_open(
int amount_of_filenames, libewf_handle_t *handle,
uint8_t flags ); char * const filenames[],
int number_of_filenames,
int access_flags,
libewf_error_t **error );
#if defined( LIBEWF_HAVE_WIDE_CHARACTER_TYPE ) #if defined( LIBEWF_HAVE_WIDE_CHARACTER_TYPE )
/* Opens a set of EWF file(s) /* Opens a set of EWF file(s)
* For reading files should contain all filenames that make up an EWF image * For reading files should contain all filenames that make up an EWF image
* For writing files should contain the base of the filename, extentions li ke .e01 will be automatically added * For writing files should contain the base of the filename, extentions li ke .e01 will be automatically added
* Returns a pointer to the new instance of handle, NULL on error * Returns 1 if successful or -1 on error
*/ */
LIBEWF_EXTERN libewf_handle_t *libewf_open_wide( LIBEWF_EXTERN \
wchar_t * const filenames[], int libewf_handle_open_wide(
int amount_of_filenames, libewf_handle_t *handle,
uint8_t flags ); wchar_t * const filenames[],
int number_of_filenames,
int access_flags,
libewf_error_t **error );
#endif #endif
/* Closes the EWF handle and frees memory used within the handle #if defined( LIBEWF_HAVE_BFIO )
* Returns 0 if successful or -1 on error /* Opens a set of EWF file(s) using a Basic File IO (bfio) pool
*/ * Returns 1 if successful or -1 on error
LIBEWF_EXTERN int libewf_close(
libewf_handle_t *handle );
/* Seeks a certain offset of the media data within the EWF file(s)
* It will set the related file offset to the specific chunk offset
* Returns the offset if seek is successful or -1 on error
*/ */
LIBEWF_EXTERN off64_t libewf_seek_offset( LIBEWF_EXTERN \
libewf_handle_t *handle, int libewf_handle_open_file_io_pool(
off64_t offset ); libewf_handle_t *handle,
libbfio_pool_t *file_io_pool,
int access_flags,
libewf_error_t **error );
#endif
/* Retrieves the current offset of the media data within the EWF file(s) /* Closes the EWF handle
* Returns the offset if successful or -1 on error * Returns 0 if successful or -1 on error
*/ */
LIBEWF_EXTERN off64_t libewf_get_offset( LIBEWF_EXTERN \
libewf_handle_t *handle ); int libewf_handle_close(
libewf_handle_t *handle,
libewf_error_t **error );
/* Prepares a buffer with chunk data after reading it according to the hand /* Prepares chunk of (media) data after reading it according to the handle
le settings settings
* intended for raw read * It applies decompression if necessary and validates the chunk checksum
* The buffer size cannot be larger than the chunk size * This function should be used after libewf_handle_read_chunk
* The value chunk_buffer_size contains the size of the chunk
* Returns the resulting chunk size or -1 on error * Returns the resulting chunk size or -1 on error
*/ */
LIBEWF_EXTERN ssize_t libewf_raw_read_prepare_buffer( LIBEWF_EXTERN \
libewf_handle_t *handle, ssize_t libewf_handle_prepare_read_chunk(
void *buffer, libewf_handle_t *handle,
size_t buffer_size, void *chunk_buffer,
void *uncompressed_buffer, size_t chunk_buffer_size,
size_t *uncompressed_buffer_size, void *uncompressed_chunk_buffer,
int8_t is_compressed, size_t *uncompressed_chunk_buffer_size,
uint32_t chunk_crc, int8_t is_compressed,
int8_t read_crc ); uint32_t chunk_checksum,
int8_t read_checksum,
libewf_error_t **error );
/* Reads 'raw' data from the curent offset into a buffer /* Reads a chunk of (media) data from the current offset into a buffer
* size contains the size of the buffer * Will read until the requested size is filled or the entire chunk is read
* The function sets the chunk crc, is compressed and read crc values * The values read_checksum and chunk_checksum are used for uncompressed ch
* Returns the amount of bytes read or -1 on error unks only
* The value chunk_checksum is set to a runtime version of the value in the
checksum_buffer
* The value read_checksum is set if the checksum has been read into checks
um_buffer
* The value chunk_buffer_size contains the size of the chunk buffer
* Returns the number of bytes read or -1 on error
*/ */
LIBEWF_EXTERN ssize_t libewf_raw_read_buffer( LIBEWF_EXTERN \
libewf_handle_t *handle, ssize_t libewf_handle_read_chunk(
void *buffer, libewf_handle_t *handle,
size_t buffer_size, void *chunk_buffer,
int8_t *is_compressed, size_t chunk_buffer_size,
uint32_t *chunk_crc, int8_t *is_compressed,
int8_t *read_crc ); void *checksum_buffer,
uint32_t *chunk_checksum,
int8_t *read_checksum,
libewf_error_t **error );
/* Reads data from the curent offset into a buffer /* Reads (media) data at the current offset into a buffer
* Returns the amount of bytes read or -1 on error * Returns the number of bytes read or -1 on error
*/ */
LIBEWF_EXTERN ssize_t libewf_read_buffer( LIBEWF_EXTERN \
libewf_handle_t *handle, ssize_t libewf_handle_read_buffer(
void *buffer, libewf_handle_t *handle,
size_t buffer_size ); void *buffer,
size_t buffer_size,
libewf_error_t **error );
/* Reads media data from an offset into a buffer /* Reads (media) data at a specific offset
* Returns the amount of bytes read or -1 on error * Returns the number of bytes read or -1 on error
*/ */
LIBEWF_EXTERN ssize_t libewf_read_random( LIBEWF_EXTERN \
libewf_handle_t *handle, ssize_t libewf_handle_read_random(
void *buffer, libewf_handle_t *handle,
size_t buffer_size, void *buffer,
off64_t offset ); size_t buffer_size,
off64_t offset,
libewf_error_t **error );
/* Prepares a buffer with chunk data before writing according to the handle /* Prepares a chunk of (media) data before writing according to the handle
settings settings
* intended for raw write * This function should be used before libewf_handle_write_chunk
* The buffer size cannot be larger than the chunk size * The chunk_buffer_size should contain the actual chunk size
* The function sets the chunk crc, is compressed and write crc values * The function sets the chunk checksum, is compressed and write checksum v
alues
* Returns the resulting chunk size or -1 on error * Returns the resulting chunk size or -1 on error
*/ */
LIBEWF_EXTERN ssize_t libewf_raw_write_prepare_buffer( LIBEWF_EXTERN \
libewf_handle_t *handle, ssize_t libewf_handle_prepare_write_chunk(
void *buffer, libewf_handle_t *handle,
size_t buffer_size, void *buffer,
void *compressed_buffer, size_t buffer_size,
size_t *compressed_buffer_size, void *compressed_chunk_buffer,
int8_t *is_compressed, size_t *compressed_chunk_buffer_size,
uint32_t *chunk_crc, int8_t *is_compressed,
int8_t *write_crc ); uint32_t *chunk_checksum,
int8_t *write_checksum,
libewf_error_t **error );
/* Writes 'raw' data in EWF format from a buffer at the current offset /* Writes a chunk of (media) data in EWF format at the current offset
* the necessary settings of the write values must have been made * the necessary settings of the write values must have been made
* size contains the size of the data within the buffer while * chunk_buffer_size contains the size of the data within the buffer while
* data size contains the size of the actual input data * data_size contains the size of the actual input data
* Will initialize write if necessary * Will initialize write if necessary
* Returns the amount of input bytes written, 0 when no longer bytes can be written or -1 on error * Returns the number of input bytes written, 0 when no longer bytes can be written or -1 on error
*/ */
LIBEWF_EXTERN ssize_t libewf_raw_write_buffer( LIBEWF_EXTERN \
libewf_handle_t *handle, ssize_t libewf_handle_write_chunk(
void *buffer, libewf_handle_t *handle,
size_t buffer_size, const void *chunk_buffer,
size_t data_size, size_t chunk_buffer_size,
int8_t is_compressed, size_t data_size,
uint32_t chunk_crc, int8_t is_compressed,
int8_t write_crc ); void *checksum_buffer,
uint32_t chunk_checksum,
int8_t write_checksum,
libewf_error_t **error );
/* Writes data in EWF format from a buffer at the current offset /* Writes (media) data at the current offset
* the necessary settings of the write values must have been made * the necessary settings of the write values must have been made
* Will initialize write if necessary * Will initialize write if necessary
* Returns the amount of input bytes written, 0 when no longer bytes can be written or -1 on error * Returns the number of input bytes written, 0 when no longer bytes can be written or -1 on error
*/ */
LIBEWF_EXTERN ssize_t libewf_write_buffer( LIBEWF_EXTERN \
libewf_handle_t *handle, ssize_t libewf_handle_write_buffer(
void *buffer, libewf_handle_t *handle,
size_t buffer_size ); const void *buffer,
size_t buffer_size,
libewf_error_t **error );
/* Writes data in EWF format from a buffer at an specific offset, /* Writes (media) data at a specific offset,
* the necessary settings of the write values must have been made * the necessary settings of the write values must have been made
* Will initialize write if necessary * Will initialize write if necessary
* Returns the amount of input bytes written, 0 when no longer bytes can be written or -1 on error * Returns the number of input bytes written, 0 when no longer bytes can be written or -1 on error
*/ */
LIBEWF_EXTERN ssize_t libewf_write_random( LIBEWF_EXTERN \
libewf_handle_t *handle, ssize_t libewf_handle_write_random(
void *buffer, libewf_handle_t *handle,
size_t buffer_size, const void *buffer,
off64_t offset ); size_t buffer_size,
off64_t offset,
libewf_error_t **error );
/* Finalizes the write by correcting the EWF the meta data in the segment f iles /* Finalizes the write by correcting the EWF the meta data in the segment f iles
* This function is required after writing from stream * This function is required after writing from stream
* Returns the amount of input bytes written or -1 on error * Returns the number of input bytes written or -1 on error
*/ */
LIBEWF_EXTERN ssize_t libewf_write_finalize( LIBEWF_EXTERN \
libewf_handle_t *handle ); ssize_t libewf_handle_write_finalize(
libewf_handle_t *handle,
libewf_error_t **error );
/* Seeks a certain offset of the (media) data
* Returns the offset if seek is successful or -1 on error
*/
LIBEWF_EXTERN \
off64_t libewf_handle_seek_offset(
libewf_handle_t *handle,
off64_t offset,
int whence,
libewf_error_t **error );
/* Retrieves the current offset of the (media) data
* Returns the offset if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_offset(
libewf_handle_t *handle,
off64_t *offset,
libewf_error_t **error );
/* Sets the maximum number of (concurrent) open file handles
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_set_maximum_number_of_open_handles(
libewf_handle_t *handle,
int maximum_number_of_open_handles,
libewf_error_t **error );
/* Retrieves the segment filename size
* The filename size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_segment_filename_size(
libewf_handle_t *handle,
size_t *filename_size,
libewf_error_t **error );
/* Retrieves the segment filename /* Retrieves the segment filename
* The filename size should include the end of string character * The filename size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*/ */
LIBEWF_EXTERN int libewf_get_segment_filename( LIBEWF_EXTERN \
libewf_handle_t *handle, int libewf_handle_get_segment_filename(
char *filename, libewf_handle_t *handle,
size_t filename_size ); char *filename,
size_t filename_size,
libewf_error_t **error );
/* Sets the segment filename /* Sets the segment filename
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*/ */
LIBEWF_EXTERN int libewf_set_segment_filename( LIBEWF_EXTERN \
libewf_handle_t *handle, int libewf_handle_set_segment_filename(
const char *filename, libewf_handle_t *handle,
size_t filename_length ); const char *filename,
size_t filename_length,
libewf_error_t **error );
#if defined( LIBEWF_HAVE_WIDE_CHARACTER_TYPE ) #if defined( LIBEWF_HAVE_WIDE_CHARACTER_TYPE )
/* Retrieves the segment filename size
* The filename size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_segment_filename_size_wide(
libewf_handle_t *handle,
size_t *filename_size,
libewf_error_t **error );
/* Retrieves the segment filename /* Retrieves the segment filename
* The filename size should include the end of string character * The filename size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*/ */
LIBEWF_EXTERN int libewf_get_segment_filename_wide( LIBEWF_EXTERN \
libewf_handle_t *handle, int libewf_handle_get_segment_filename_wide(
wchar_t *filename, libewf_handle_t *handle,
size_t filename_size ); wchar_t *filename,
size_t filename_size,
libewf_error_t **error );
/* Sets the segment filename /* Sets the segment filename
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*/ */
LIBEWF_EXTERN int libewf_set_segment_filename_wide( LIBEWF_EXTERN \
libewf_handle_t *handle, int libewf_handle_set_segment_filename_wide(
const wchar_t *filename, libewf_handle_t *handle,
size_t filename_length ); const wchar_t *filename,
size_t filename_length,
libewf_error_t **error );
#endif #endif
/* Retrieves the segment file size /* Retrieves the maximum segment file size
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*/ */
LIBEWF_EXTERN int libewf_get_segment_file_size( LIBEWF_EXTERN \
libewf_handle_t *handle, int libewf_handle_get_maximum_segment_size(
size64_t *segment_file_size ); libewf_handle_t *handle,
size64_t *maximum_segment_size,
libewf_error_t **error );
/* Sets the segment file size /* Sets the maximum segment file size
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*/ */
LIBEWF_EXTERN int libewf_set_segment_file_size( LIBEWF_EXTERN \
libewf_handle_t *handle, int libewf_handle_set_maximum_segment_size(
size64_t segment_file_size ); libewf_handle_t *handle,
size64_t maximum_segment_size,
libewf_error_t **error );
/* Retrieves the delta segment filename size
* The filename size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_delta_segment_filename_size(
libewf_handle_t *handle,
size_t *filename_size,
libewf_error_t **error );
/* Retrieves the delta segment filename /* Retrieves the delta segment filename
* The filename size should include the end of string character * The filename size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*/ */
LIBEWF_EXTERN int libewf_get_delta_segment_filename( LIBEWF_EXTERN \
libewf_handle_t *handle, int libewf_handle_get_delta_segment_filename(
char *filename, libewf_handle_t *handle,
size_t filename_size ); char *filename,
size_t filename_size,
libewf_error_t **error );
/* Sets the delta segment filename /* Sets the delta segment filename
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*/ */
LIBEWF_EXTERN int libewf_set_delta_segment_filename( LIBEWF_EXTERN \
libewf_handle_t *handle, int libewf_handle_set_delta_segment_filename(
const char *filename, libewf_handle_t *handle,
size_t filename_length ); const char *filename,
size_t filename_length,
libewf_error_t **error );
#if defined( LIBEWF_HAVE_WIDE_CHARACTER_TYPE ) #if defined( LIBEWF_HAVE_WIDE_CHARACTER_TYPE )
/* Retrieves the delta segment filename size
* The filename size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_delta_segment_filename_size_wide(
libewf_handle_t *handle,
size_t *filename_size,
libewf_error_t **error );
/* Retrieves the delta segment filename /* Retrieves the delta segment filename
* The filename size should include the end of string character * The filename size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*/ */
LIBEWF_EXTERN int libewf_get_delta_segment_filename_wide( LIBEWF_EXTERN \
libewf_handle_t *handle, int libewf_handle_get_delta_segment_filename_wide(
wchar_t *filename, libewf_handle_t *handle,
size_t filename_size ); wchar_t *filename,
size_t filename_size,
libewf_error_t **error );
/* Sets the delta segment filename /* Sets the delta segment filename
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*/ */
LIBEWF_EXTERN int libewf_set_delta_segment_filename_wide( LIBEWF_EXTERN \
libewf_handle_t *handle, int libewf_handle_set_delta_segment_filename_wide(
const wchar_t *filename, libewf_handle_t *handle,
size_t filename_length ); const wchar_t *filename,
size_t filename_length,
libewf_error_t **error );
#endif
/* Retrieves the maximum delta segment file size
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_maximum_delta_segment_size(
libewf_handle_t *handle,
size64_t *maximum_delta_segment_size,
libewf_error_t **error );
/* Sets the maximum delta segment file size
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_set_maximum_delta_segment_size(
libewf_handle_t *handle,
size64_t maximum_delta_segment_size,
libewf_error_t **error );
/* Retrieves the filename size of the (delta) segment file of the current c
hunk
* The filename size includes the end of string character
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_filename_size(
libewf_handle_t *handle,
size_t *filename_size,
libewf_error_t **error );
/* Retrieves the filename of the (delta) segment file of the current chunk
* The filename size should include the end of string character
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_filename(
libewf_handle_t *handle,
char *filename,
size_t filename_size,
libewf_error_t **error );
#if defined( LIBEWF_HAVE_WIDE_CHARACTER_TYPE )
/* Retrieves the filename size of the (delta) segment file of the current c
hunk
* The filename size includes the end of string character
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_filename_size_wide(
libewf_handle_t *handle,
size_t *filename_size,
libewf_error_t **error );
/* Retrieves the filename of the (delta) segment file of the current chunk
* The filename size should include the end of string character
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_filename_wide(
libewf_handle_t *handle,
wchar_t *filename,
size_t filename_size,
libewf_error_t **error );
#endif #endif
#if defined( LIBEWF_HAVE_BFIO )
/* Retrieves the file io handle of the (delta) segment file of the current
chunk
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_file_io_handle(
libewf_handle_t *handle,
libbfio_handle_t **file_io_handle,
libewf_error_t **error );
#endif
/* ------------------------------------------------------------------------
-
* File/Handle functions - deprecated
* ------------------------------------------------------------------------
- */
/* Sets the maximum amount of (concurrent) open file handles
* Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_handle_set_maximum_number_of_open_ha
ndles instead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_handle_set_maximum_amount_of_open_handles(
libewf_handle_t *handle,
int maximum_amount_of_open_handles,
libewf_error_t **error );
/* Retrieves the amount of sectors
* Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_handle_get_number_of_sectors instead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_handle_get_amount_of_sectors(
libewf_handle_t *handle,
uint64_t *amount_of_sectors,
libewf_error_t **error );
/* Retrieves the amount of chunks written
* Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_handle_get_number_of_chunks_written
instead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_handle_get_write_amount_of_chunks(
libewf_handle_t *handle,
uint32_t *amount_of_chunks,
libewf_error_t **error );
/* Retrieves the segment file size
* Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_handle_get_maximum_segment_size inst
ead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_handle_get_segment_file_size(
libewf_handle_t *handle,
size64_t *segment_file_size,
libewf_error_t **error );
/* Sets the segment file size
* Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_handle_set_maximum_segment_size inst
ead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_handle_set_segment_file_size(
libewf_handle_t *handle,
size64_t segment_file_size,
libewf_error_t **error );
/* Retrieves the delta segment file size /* Retrieves the delta segment file size
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_handle_get_maximum_delta_segment_siz
e instead
*/ */
LIBEWF_EXTERN int libewf_get_delta_segment_file_size( LIBEWF_DEPRECATED \
libewf_handle_t *handle, LIBEWF_EXTERN \
size64_t *delta_segment_file_size ); int libewf_handle_get_delta_segment_file_size(
libewf_handle_t *handle,
size64_t *delta_segment_file_size,
libewf_error_t **error );
/* Sets the delta segment file size /* Sets the delta segment file size
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_handle_set_maximum_delta_segment_siz
e instead
*/ */
LIBEWF_EXTERN int libewf_set_delta_segment_file_size( LIBEWF_DEPRECATED \
libewf_handle_t *handle, LIBEWF_EXTERN \
size64_t delta_segment_file_size ); int libewf_handle_set_delta_segment_file_size(
libewf_handle_t *handle,
size64_t delta_segment_file_size,
libewf_error_t **error );
#endif /* ------------------------------------------------------------------------
-
* Meta data functions
* ------------------------------------------------------------------------
- */
/* Retrieves the number of sectors per chunk
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_sectors_per_chunk(
libewf_handle_t *handle,
uint32_t *sectors_per_chunk,
libewf_error_t **error );
/* Sets the number of sectors per chunk
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_set_sectors_per_chunk(
libewf_handle_t *handle,
uint32_t sectors_per_chunk,
libewf_error_t **error );
/* Retrieves the number of bytes per sector
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_bytes_per_sector(
libewf_handle_t *handle,
uint32_t *bytes_per_sector,
libewf_error_t **error );
/* Sets the number of bytes per sector
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_set_bytes_per_sector(
libewf_handle_t *handle,
uint32_t bytes_per_sector,
libewf_error_t **error );
/* Retrieves the number of sectors
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_number_of_sectors(
libewf_handle_t *handle,
uint64_t *number_of_sectors,
libewf_error_t **error );
/* Retrieves the chunk size
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_chunk_size(
libewf_handle_t *handle,
size32_t *chunk_size,
libewf_error_t **error );
/* Retrieves the error granularity
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_error_granularity(
libewf_handle_t *handle,
uint32_t *error_granularity,
libewf_error_t **error );
/* Sets the error granularity
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_set_error_granularity(
libewf_handle_t *handle,
uint32_t error_granularity,
libewf_error_t **error );
/* Retrieves the compression values
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_compression_values(
libewf_handle_t *handle,
int8_t *compression_level,
uint8_t *compression_flags,
libewf_error_t **error );
/* Sets the compression values
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_set_compression_values(
libewf_handle_t *handle,
int8_t compression_level,
uint8_t compression_flags,
libewf_error_t **error );
/* Retrieves the size of the contained (media) data
* This function will compensate for a media_size that is not a multitude o
f bytes_per_sector
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_media_size(
libewf_handle_t *handle,
size64_t *media_size,
libewf_error_t **error );
/* Sets the media size
* The media_size is stored as number_of_sectors x bytes_per_sector
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_set_media_size(
libewf_handle_t *handle,
size64_t media_size,
libewf_error_t **error );
/* Retrieves the media type value
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_media_type(
libewf_handle_t *handle,
uint8_t *media_type,
libewf_error_t **error );
/* Sets the media type
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_set_media_type(
libewf_handle_t *handle,
uint8_t media_type,
libewf_error_t **error );
/* Retrieves the media flags
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_media_flags(
libewf_handle_t *handle,
uint8_t *media_flags,
libewf_error_t **error );
/* Sets the media flags
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_set_media_flags(
libewf_handle_t *handle,
uint8_t media_flags,
libewf_error_t **error );
/* Retrieves the format type value
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_format(
libewf_handle_t *handle,
uint8_t *format,
libewf_error_t **error );
/* Sets the output format
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_set_format(
libewf_handle_t *handle,
uint8_t format,
libewf_error_t **error );
/* Retrieves the GUID
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_guid(
libewf_handle_t *handle,
uint8_t *guid,
size_t size,
libewf_error_t **error );
/* Sets the GUID
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_set_guid(
libewf_handle_t *handle,
uint8_t *guid,
size_t size,
libewf_error_t **error );
/* Retrieves the MD5 hash
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_md5_hash(
libewf_handle_t *handle,
uint8_t *md5_hash,
size_t size,
libewf_error_t **error );
/* Sets the MD5 hash
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_set_md5_hash(
libewf_handle_t *handle,
uint8_t *md5_hash,
size_t size,
libewf_error_t **error );
/* Retrieves the SHA1 hash
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_sha1_hash(
libewf_handle_t *handle,
uint8_t *sha1_hash,
size_t size,
libewf_error_t **error );
/* Sets the SHA1 hash
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_set_sha1_hash(
libewf_handle_t *handle,
uint8_t *sha1_hash,
size_t size,
libewf_error_t **error );
/* Retrieves the number of chunks written
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_number_of_chunks_written(
libewf_handle_t *handle,
uint32_t *number_of_chunks,
libewf_error_t **error );
/* Sets the read zero chunk on error
* The chunk is not zeroed if read raw is used
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_set_read_zero_chunk_on_error(
libewf_handle_t *handle,
uint8_t zero_on_error,
libewf_error_t **error );
/* Copies the media values from the source to the destination handle
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_copy_media_values(
libewf_handle_t *destination_handle,
libewf_handle_t *source_handle,
libewf_error_t **error );
/* Retrieves the number of acquiry errors
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_number_of_acquiry_errors(
libewf_handle_t *handle,
uint32_t *number_of_errors,
libewf_error_t **error );
/* Retrieves an acquiry error
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_acquiry_error(
libewf_handle_t *handle,
uint32_t index,
uint64_t *first_sector,
uint64_t *number_of_sectors,
libewf_error_t **error );
/* Appends an acquiry error
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_append_acquiry_error(
libewf_handle_t *handle,
uint64_t first_sector,
uint64_t number_of_sectors,
libewf_error_t **error );
/* Retrieves the number of checksum errors
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_number_of_checksum_errors(
libewf_handle_t *handle,
uint32_t *number_of_errors,
libewf_error_t **error );
/* Retrieves a checksum error
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_checksum_error(
libewf_handle_t *handle,
uint32_t index,
uint64_t *first_sector,
uint64_t *number_of_sectors,
libewf_error_t **error );
/* Appends a checksum error
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_append_checksum_error(
libewf_handle_t *handle,
uint64_t first_sector,
uint64_t number_of_sectors,
libewf_error_t **error );
/* Retrieves the number of sessions
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_number_of_sessions(
libewf_handle_t *handle,
uint32_t *number_of_sessions,
libewf_error_t **error );
/* Retrieves a session
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_session(
libewf_handle_t *handle,
uint32_t index,
uint64_t *first_sector,
uint64_t *number_of_sectors,
libewf_error_t **error );
/* Appends a session
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_append_session(
libewf_handle_t *handle,
uint64_t first_sector,
uint64_t number_of_sectors,
libewf_error_t **error );
/* Retrieves the number of tracks
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_number_of_tracks(
libewf_handle_t *handle,
uint32_t *number_of_tracks,
libewf_error_t **error );
/* Retrieves a track
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_track(
libewf_handle_t *handle,
uint32_t index,
uint64_t *first_sector,
uint64_t *number_of_sectors,
libewf_error_t **error );
/* Appends a track
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_append_track(
libewf_handle_t *handle,
uint64_t first_sector,
uint64_t number_of_sectors,
libewf_error_t **error );
/* Retrieves the header codepage
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_header_codepage(
libewf_handle_t *handle,
int *header_codepage,
libewf_error_t **error );
/* Sets the header codepage
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_set_header_codepage(
libewf_handle_t *handle,
int header_codepage,
libewf_error_t **error );
/* Retrieves the header values date format
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_header_values_date_format(
libewf_handle_t *handle,
int *date_format,
libewf_error_t **error );
/* Sets the header values date format
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_set_header_values_date_format(
libewf_handle_t *handle,
int date_format,
libewf_error_t **error );
/* Retrieves the number of header values
* Returns 1 if successful, 0 if no header values are present or -1 on erro
r
*/
LIBEWF_EXTERN \
int libewf_handle_get_number_of_header_values(
libewf_handle_t *handle,
uint32_t *number_of_values,
libewf_error_t **error );
/* Retrieves the size of the header value identifier of a specific index
* The identifier size includes the end of string character
* Returns 1 if successful, 0 if no header values are present or -1 on erro
r
*/
LIBEWF_EXTERN \
int libewf_handle_get_header_value_identifier_size(
libewf_handle_t *handle,
uint32_t index,
size_t *identifier_size,
libewf_error_t **error );
/* Retrieves the header value identifier of a specific index
* The identifier size should include the end of string character
* Returns 1 if successful, 0 if no header values are present or -1 on erro
r
*/
LIBEWF_EXTERN \
int libewf_handle_get_header_value_identifier(
libewf_handle_t *handle,
uint32_t index,
uint8_t *identifier,
size_t identifier_size,
libewf_error_t **error );
/* Retrieves the size of the UTF-8 encoded header value of an identifier
* The string size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_utf8_header_value_size(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
size_t *utf8_string_size,
libewf_error_t **error );
/* Retrieves the UTF-8 encoded header value of an identifier
* The string size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_utf8_header_value(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
uint8_t *utf8_string,
size_t utf8_string_size,
libewf_error_t **error );
/* Retrieves the header value case number
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_utf8_header_value_case_number( handle, value, val
ue_size, error ) \
libewf_handle_get_utf8_header_value( handle, (uint8_t *) "case_numb
er", 11, value, value_size, error )
/* Retrieves the header value description
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_utf8_header_value_description( handle, value, val
ue_size, error ) \
libewf_handle_get_utf8_header_value( handle, (uint8_t *) "descripti
on", 11, value, value_size, error )
/* Retrieves the header value examiner name
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_utf8_header_value_examiner_name( handle, value, v
alue_size, error ) \
libewf_handle_get_utf8_header_value( handle, (uint8_t *) "examiner_
name", 13, value, value_size, error )
/* Retrieves the header value evidence number
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_utf8_header_value_evidence_number( handle, value,
value_size, error ) \
libewf_handle_get_utf8_header_value( handle, (uint8_t *) "evidence_
number", 15, value, value_size, error )
/* Retrieves the header value notes
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_utf8_header_value_notes( handle, value, lengt, er
ror ) \
libewf_handle_get_utf8_header_value( handle, (uint8_t *) "notes", 5
, value, value_size, error )
/* Retrieves the header value acquiry date
* The string is encoded according to the date format
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_utf8_header_value_acquiry_date( handle, value, va
lue_size, error ) \
libewf_handle_get_utf8_header_value( handle, (uint8_t *) "acquiry_d
ate", 12, value, value_size, error )
/* Retrieves the header value system date
* The string is encoded according to the date format
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_utf8_header_value_system_date( handle, value, val
ue_size, error ) \
libewf_handle_get_utf8_header_value( handle, (uint8_t *) "system_da
te", 11, value, value_size, error )
/* Retrieves the header value acquiry operating system
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_utf8_header_value_acquiry_operating_system( handl
e, value, value_size, error ) \
libewf_handle_get_utf8_header_value( handle, (uint8_t *) "acquiry_o
perating_system", 24, value, value_size, error )
/* Retrieves the header value acquiry software version
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_utf8_header_value_acquiry_software_version( handl
e, value, value_size, error ) \
libewf_handle_get_utf8_header_value( handle, (uint8_t *) "acquiry_s
oftware_version", 24, value, value_size, error )
/* Retrieves the header value password
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_utf8_header_value_password( handle, value, value_
size, error ) \
libewf_handle_get_utf8_header_value( handle, (uint8_t *) "password"
, 8, value, value_size, error )
/* Retrieves the header value compression level
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_utf8_header_value_compression_level( handle, valu
e, value_size, error ) \
libewf_handle_get_utf8_header_value( handle, (uint8_t *) "compressi
on_level", 17, value, value_size, error )
/* Retrieves the header value model
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_utf8_header_value_model( handle, value, value_siz
e, error ) \
libewf_handle_get_utf8_header_value( handle, (uint8_t *) "model", 5
, value, value_size, error )
/* Retrieves the header value serial number
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_utf8_header_value_serial_number( handle, value, v
alue_size, error ) \
libewf_handle_get_utf8_header_value( handle, (uint8_t *) "serial_nu
mber", 13, value, value_size, error )
/* Sets the UTF-8 encoded header value specified by the identifier
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_set_utf8_header_value(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
const uint8_t *utf8_string,
size_t utf8_string_length,
libewf_error_t **error );
/* Sets the header value case number
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_utf8_header_value_case_number( handle, value, val
ue_length, error ) \
libewf_handle_set_utf8_header_value( handle, (uint8_t *) "case_numb
er", 11, value, value_length, error )
/* Sets the header value description
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_utf8_header_value_description( handle, value, val
ue_length, error ) \
libewf_handle_set_utf8_header_value( handle, (uint8_t *) "descripti
on", 11, value, value_length, error )
/* Sets the header value examiner name
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_utf8_header_value_examiner_name( handle, value, v
alue_length, error ) \
libewf_handle_set_utf8_header_value( handle, (uint8_t *) "examiner_
name", 13, value, value_length, error )
/* Sets the header value evidence number
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_utf8_header_value_evidence_number( handle, value,
value_length, error ) \
libewf_handle_set_utf8_header_value( handle, (uint8_t *) "evidence_
number", 15, value, value_length, error )
/* Sets the header value notes
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_utf8_header_value_notes( handle, value, value_len
gth, error ) \
libewf_handle_set_utf8_header_value( handle, (uint8_t *) "notes", 5
, value, value_length, error )
/* Sets the header value acquiry date
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_utf8_header_value_acquiry_date( handle, value, va
lue_length, error ) \
libewf_handle_set_utf8_header_value( handle, (uint8_t *) "acquiry_d
ate", 12, value, value_length, error )
/* Sets the header value system date
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_utf8_header_value_system_date( handle, value, val
ue_length, error ) \
libewf_handle_set_utf8_header_value( handle, (uint8_t *) "system_da
te", 11, value, value_length, error )
/* Sets the header value acquiry operating system
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_utf8_header_value_acquiry_operating_system( handl
e, value, value_length, error ) \
libewf_handle_set_utf8_header_value( handle, (uint8_t *) "acquiry_o
perating_system", 24, value, value_length, error )
/* Sets the header value acquiry software version
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_utf8_header_value_acquiry_software_version( handl
e, value, value_length, error ) \
libewf_handle_set_utf8_header_value( handle, (uint8_t *) "acquiry_s
oftware_version", 24, value, value_length, error )
/* Sets the header value password
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_utf8_header_value_password( handle, value, value_
length, error ) \
libewf_handle_set_utf8_header_value( handle, (uint8_t *) "password"
, 8, value, value_length, error )
/* Sets the header value compression level
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_utf8_header_value_compression_level( handle, valu
e, value_length, error ) \
libewf_handle_set_utf8_header_value( handle, (uint8_t *) "compressi
on_level", 17, value, value_length, error )
/* Sets the header value model
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_utf8_header_value_model( handle, value, value_len
gth, error ) \
libewf_handle_set_utf8_header_value( handle, (uint8_t *) "model", 5
, value, value_length, error )
/* Sets the header value serial number
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_utf8_header_value_serial_number( handle, value, v
alue_length, error ) \
libewf_handle_set_utf8_header_value( handle, (uint8_t *) "serial_nu
mber", 13, value, value_length, error )
/* Retrieves the size of the UTF-16 encoded header value of an identifier
* The string size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_utf16_header_value_size(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
size_t *utf16_string_size,
libewf_error_t **error );
/* Retrieves the UTF-16 encoded header value of an identifier
* The string size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_utf16_header_value(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
uint16_t *utf16_string,
size_t utf16_string_size,
libewf_error_t **error );
/* Sets the UTF-16 encoded header value specified by the identifier
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_set_utf16_header_value(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
const uint16_t *utf16_string,
size_t utf16_string_length,
libewf_error_t **error );
/* Copies the header values from the source to the destination handle
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_copy_header_values(
libewf_handle_t *destination_handle,
libewf_handle_t *source_handle,
libewf_error_t **error );
/* Retrieves the number of hash values
* Returns 1 if successful, 0 if no hash values are present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_number_of_hash_values(
libewf_handle_t *handle,
uint32_t *number_of_values,
libewf_error_t **error );
/* Retrieves the size of the hash value identifier of a specific index
* The identifier size includes the end of string character
* Returns 1 if successful, 0 if no hash values are present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_hash_value_identifier_size(
libewf_handle_t *handle,
uint32_t index,
size_t *identifier_size,
libewf_error_t **error );
/* Retrieves the hash value identifier of a specific index
* The identifier size should include the end of string character
* Returns 1 if successful, 0 if no hash values are present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_hash_value_identifier(
libewf_handle_t *handle,
uint32_t index,
uint8_t *identifier,
size_t identifier_size,
libewf_error_t **error );
/* Retrieves the size of the UTF-8 encoded hash value of an identifier
* The string size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_utf8_hash_value_size(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
size_t *utf8_string_size,
libewf_error_t **error );
/* Retrieves the UTF-8 encoded hash value of an identifier
* The string size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_utf8_hash_value(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
uint8_t *utf8_string,
size_t utf8_string_size,
libewf_error_t **error );
/* Retrieves the hash value MD5
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_utf8_hash_value_md5( handle, value, value_size, e
rror ) \
libewf_handle_get_utf8_hash_value( handle, (uint8_t *) "MD5", 3, va
lue, value_size, error )
/* Retrieves the hash value SHA1
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_utf8_hash_value_sha1( handle, value, value_size,
error ) \
libewf_handle_get_utf8_hash_value( handle, (uint8_t *) "SHA1", 4, v
alue, value_size, error )
/* Sets the UTF-8 hash value specified by the identifier
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_set_utf8_hash_value(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
const uint8_t *utf8_string,
size_t utf8_string_length,
libewf_error_t **error );
/* Sets the hash value MD5
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_utf8_hash_value_md5( handle, value, value_length,
error ) \
libewf_handle_set_utf8_hash_value( handle, (uint8_t *) "MD5", 3, va
lue, value_length, error )
/* Sets the hash value SHA1
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_utf8_hash_value_sha1( handle, value, value_length
, error ) \
libewf_handle_set_utf8_hash_value( handle, (uint8_t *) "SHA1", 4, v
alue, value_length, error )
/* Retrieves the size of the UTF-16 encoded hash value of an identifier
* The string size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_utf16_hash_value_size(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
size_t *utf16_string_size,
libewf_error_t **error );
/* Retrieves the UTF-16 encoded hash value of an identifier
* The string size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_utf16_hash_value(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
uint16_t *utf16_string,
size_t utf16_string_size,
libewf_error_t **error );
/* Sets the UTF-16 hash value specified by the identifier
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_set_utf16_hash_value(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
const uint16_t *utf16_string,
size_t utf16_string_length,
libewf_error_t **error );
/* Retrieves the root (single) file entry
* Returns 1 if successful, 0 if no file entries are present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_handle_get_root_file_entry(
libewf_handle_t *handle,
libewf_file_entry_t **root_file_entry,
libewf_error_t **error );
/* ------------------------------------------------------------------------ - /* ------------------------------------------------------------------------ -
* File/Handle functions (APIv2) * Meta data functions - deprecated
* ------------------------------------------------------------------------ - */ * ------------------------------------------------------------------------ - */
#if 0 || defined( HAVE_V2_API ) /* Sets the read wipe chunk on error
* The chunk is not wiped if read raw is used
* Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_read_zero_chunk_on_err
or instead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_handle_set_read_wipe_chunk_on_error(
libewf_handle_t *handle,
uint8_t wipe_on_error,
libewf_error_t **error );
/* Initialize the handle /* Retrieves the amount of acquiry errors
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_handle_get_number_of_acquiry_errors
instead
*/ */
LIBEWF_EXTERN int libewf_handle_initialize( LIBEWF_DEPRECATED \
libewf_handle_t **handle, LIBEWF_EXTERN \
libewf_error_t **error ); int libewf_handle_get_amount_of_acquiry_errors(
libewf_handle_t *handle,
uint32_t *amount_of_errors,
libewf_error_t **error );
/* Frees the handle including elements /* Add an acquiry error
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_handle_append_acquiry_error instead
*/ */
LIBEWF_EXTERN int libewf_handle_free( LIBEWF_DEPRECATED \
libewf_handle_t **handle, LIBEWF_EXTERN \
libewf_error_t **error ); int libewf_handle_add_acquiry_error(
libewf_handle_t *handle,
uint64_t first_sector,
uint64_t number_of_sectors,
libewf_error_t **error );
/* Retrieves the number of checksum errors
* Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_handle_get_number_of_checksum_errors
instead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_handle_get_number_of_crc_errors(
libewf_handle_t *handle,
uint32_t *number_of_errors,
libewf_error_t **error );
/* Retrieves the amount of checksum errors
* Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_handle_get_number_of_checksum_errors
instead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_handle_get_amount_of_crc_errors(
libewf_handle_t *handle,
uint32_t *amount_of_errors,
libewf_error_t **error );
/* Retrieves a checksum error
* Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_handle_get_checksum_error instead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_handle_get_crc_error(
libewf_handle_t *handle,
uint32_t index,
uint64_t *first_sector,
uint64_t *number_of_sectors,
libewf_error_t **error );
/* Add a checksum error
* Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_handle_append_checksum_error instead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_handle_add_crc_error(
libewf_handle_t *handle,
uint64_t first_sector,
uint64_t number_of_sectors,
libewf_error_t **error );
/* Retrieves the amount of sessions
* Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_handle_get_number_of_sessions instea
d
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_handle_get_amount_of_sessions(
libewf_handle_t *handle,
uint32_t *amount_of_sessions,
libewf_error_t **error );
/* Add a session
* Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_handle_append_session instead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_handle_add_session(
libewf_handle_t *handle,
uint64_t first_sector,
uint64_t number_of_sectors,
libewf_error_t **error );
/* Retrieves the amount of header values
* Returns 1 if successful, 0 if no header values are present or -1 on erro
r
*
* This function deprecated use libewf_handle_get_number_of_header_values i
nstead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_handle_get_amount_of_header_values(
libewf_handle_t *handle,
uint32_t *amount_of_values,
libewf_error_t **error );
/* Retrieves the size of the UTF-8 encoded header value of an identifier
* The value size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*
* This function deprecated use libewf_handle_get_utf8_header_value_size in
stead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_handle_get_header_value_size(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
size_t *value_size,
libewf_error_t **error );
/* Retrieves the UTF-8 encoded header value of an identifier
* The value size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*
* This function deprecated use libewf_handle_get_utf8_header_value instead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_handle_get_header_value(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
uint8_t *value,
size_t value_size,
libewf_error_t **error );
/* Retrieves the header value case number
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_case_number( handle, value, value_si
ze, error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "case_number",
11, value, value_size, error )
/* Retrieves the header value description
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_description( handle, value, value_si
ze, error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "description",
11, value, value_size, error )
/* Retrieves the header value examiner name
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_examiner_name( handle, value, value_
size, error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "examiner_name"
, 13, value, value_size, error )
/* Retrieves the header value evidence number
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_evidence_number( handle, value, valu
e_size, error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "evidence_numbe
r", 15, value, value_size, error )
/* Retrieves the header value notes
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_notes( handle, value, lengt, error )
\
libewf_handle_get_header_value( handle, (uint8_t *) "notes", 5, val
ue, value_size, error )
/* Retrieves the header value acquiry date
* The string is encoded according to the date format
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_acquiry_date( handle, value, value_s
ize, error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "acquiry_date",
12, value, value_size, error )
/* Retrieves the header value system date
* The string is encoded according to the date format
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_system_date( handle, value, value_si
ze, error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "system_date",
11, value, value_size, error )
/* Retrieves the header value acquiry operating system
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_acquiry_operating_system( handle, va
lue, value_size, error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "acquiry_operat
ing_system", 24, value, value_size, error )
/* Retrieves the header value acquiry software version
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_acquiry_software_version( handle, va
lue, value_size, error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "acquiry_softwa
re_version", 24, value, value_size, error )
/* Retrieves the header value password
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_password( handle, value, value_size,
error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "password", 8,
value, value_size, error )
/* Retrieves the header value compression type
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_compression_type( handle, value, val
ue_size, error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "compression_ty
pe", 16, value, value_size, error )
/* Retrieves the header value model
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_model( handle, value, value_size, er
ror ) \
libewf_handle_get_header_value( handle, (uint8_t *) "model", 5, val
ue, value_size, error )
/* Retrieves the header value serial number
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_serial_number( handle, value, value_
size, error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "serial_number"
, 13, value, value_size, error )
/* Retrieves the header value compression type
* Returns 1 if successful, 0 if value not present or -1 on error
*
* This function deprecated use libewf_handle_get_utf8_header_value_compres
sion_level instead
*/
#define libewf_handle_get_utf8_header_value_compression_type( handle, value
, value_size, error ) \
libewf_handle_get_utf8_header_value( handle, (uint8_t *) "compressi
on_type", 16, value, value_size, error )
/* Sets the UTF-8 encoded header value specified by the identifier
* Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_handle_set_utf8_header_value instead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_handle_set_header_value(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
const uint8_t *value,
size_t value_length,
libewf_error_t **error );
/* Sets the header value case number
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_case_number( handle, value, value_le
ngth, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "case_number",
11, value, value_length, error )
/* Sets the header value description
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_description( handle, value, value_le
ngth, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "description",
11, value, value_length, error )
/* Sets the header value examiner name
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_examiner_name( handle, value, value_
length, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "examiner_name"
, 13, value, value_length, error )
/* Sets the header value evidence number
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_evidence_number( handle, value, valu
e_length, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "evidence_numbe
r", 15, value, value_length, error )
/* Sets the header value notes
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_notes( handle, value, value_length,
error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "notes", 5, val
ue, value_length, error )
/* Sets the header value acquiry date
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_acquiry_date( handle, value, value_l
ength, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "acquiry_date",
12, value, value_length, error )
/* Sets the header value system date
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_system_date( handle, value, value_le
ngth, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "system_date",
11, value, value_length, error )
/* Sets the header value acquiry operating system
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_acquiry_operating_system( handle, va
lue, value_length, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "acquiry_operat
ing_system", 24, value, value_length, error )
/* Sets the header value acquiry software version
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_acquiry_software_version( handle, va
lue, value_length, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "acquiry_softwa
re_version", 24, value, value_length, error )
/* Sets the header value password
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_password( handle, value, value_lengt
h, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "password", 8,
value, value_length, error )
/* Sets the header value compression type
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_compression_type( handle, value, val
ue_length, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "compression_ty
pe", 16, value, value_length, error )
/* Sets the header value model
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_model( handle, value, value_length,
error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "model", 5, val
ue, value_length, error )
/* Sets the header value serial number
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_serial_number( handle, value, value_
length, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "serial_number"
, 13, value, value_length, error )
/* Sets the header value compression type
* Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_handle_set_utf8_header_value_compres
sion_level instead
*/
#define libewf_handle_set_utf8_header_value_compression_type( handle, value
, value_length, error ) \
libewf_handle_set_utf8_header_value( handle, (uint8_t *) "compressi
on_type", 16, value, value_length, error )
/* Retrieves the amount of hash values
* Returns 1 if successful, 0 if no hash values are present or -1 on error
*
* This function deprecated use libewf_handle_get_number_of_hash_values ins
tead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_handle_get_amount_of_hash_values(
libewf_handle_t *handle,
uint32_t *amount_of_values,
libewf_error_t **error );
/* Retrieves the size of the UTF-8 encoded hash value of an identifier
* The value size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*
* This function deprecated use libewf_handle_get_utf8_hash_value_size inst
ead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_handle_get_hash_value_size(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
size_t *value_size,
libewf_error_t **error );
/* Retrieves the UTF-8 encoded hash value of an identifier
* The value size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*
* This function deprecated use libewf_handle_get_utf8_hash_value instead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_handle_get_hash_value(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
uint8_t *value,
size_t value_size,
libewf_error_t **error );
/* Retrieves the hash value MD5
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_hash_value_md5( handle, value, value_size, error
) \
libewf_handle_get_hash_value( handle, "MD5", 3, value, value_size,
error )
/* Retrieves the hash value SHA1
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_hash_value_sha1( handle, value, value_size, error
) \
libewf_handle_get_hash_value( handle, "SHA1", 4, value, value_size,
error )
/* Sets the UTF-8 hash value specified by the identifier
* Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_handle_set_utf8_hash_value instead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_handle_set_hash_value(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
const uint8_t *value,
size_t value_length,
libewf_error_t **error );
/* Sets the hash value MD5
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_hash_value_md5( handle, value, value_length, erro
r ) \
libewf_handle_set_hash_value( handle, "MD5", 3, value, value_length
, error )
/* Sets the hash value SHA1
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_hash_value_sha1( handle, value, value_length, err
or ) \
libewf_handle_set_hash_value( handle, "SHA1", 4, value, value_lengt
h, error )
/* ------------------------------------------------------------------------
-
* Single file entry functions
* ------------------------------------------------------------------------
- */
/* Frees a file entry
* REturns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_file_entry_free(
libewf_file_entry_t **file_entry,
libewf_error_t **error );
/* Retrieves the flags
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_file_entry_get_flags(
libewf_file_entry_t *file_entry,
uint32_t *flags,
libewf_error_t **error );
/* Retrieves the size of the UTF-8 encoded name
* The returned size includes the end of string character
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_file_entry_get_utf8_name_size(
libewf_file_entry_t *file_entry,
size_t *utf8_string_size,
libewf_error_t **error );
/* Retrieves the UTF-8 encoded name value
* The size should include the end of string character
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_file_entry_get_utf8_name(
libewf_file_entry_t *file_entry,
uint8_t *utf8_string,
size_t utf8_string_size,
libewf_error_t **error );
/* Retrieves the size of the UTF-16 encoded name
* The returned size includes the end of string character
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_file_entry_get_utf16_name_size(
libewf_file_entry_t *file_entry,
size_t *utf16_string_size,
libewf_error_t **error );
/* Retrieves the UTF-16 encoded name value
* The size should include the end of string character
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_file_entry_get_utf16_name(
libewf_file_entry_t *file_entry,
uint16_t *utf16_string,
size_t utf16_string_size,
libewf_error_t **error );
/* Retrieves the size
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_file_entry_get_size(
libewf_file_entry_t *file_entry,
size64_t *size,
libewf_error_t **error );
/* Retrieves the creation date and time
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_file_entry_get_creation_time(
libewf_file_entry_t *file_entry,
uint64_t *creation_time,
libewf_error_t **error );
/* Retrieves the modification date and time
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_file_entry_get_modification_time(
libewf_file_entry_t *file_entry,
uint64_t *modification_time,
libewf_error_t **error );
/* Retrieves the access date and time
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_file_entry_get_access_time(
libewf_file_entry_t *file_entry,
uint64_t *access_time,
libewf_error_t **error );
/* Retrieves the entry modification date and time
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_file_entry_get_entry_modification_time(
libewf_file_entry_t *file_entry,
uint64_t *entry_modification_time,
libewf_error_t **error );
/* Retrieves the UTF-8 encoded MD5 hash value
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_file_entry_get_utf8_hash_value_md5(
libewf_file_entry_t *file_entry,
uint8_t *utf8_string,
size_t utf8_string_size,
libewf_error_t **error );
/* Retrieves the UTF-16 encoded MD5 hash value
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN \
int libewf_file_entry_get_utf16_hash_value_md5(
libewf_file_entry_t *file_entry,
uint16_t *utf16_string,
size_t utf16_string_size,
libewf_error_t **error );
/* Retrieves the number of sub file entries
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_file_entry_get_number_of_sub_file_entries(
libewf_file_entry_t *file_entry,
int *number_of_sub_file_entries,
libewf_error_t **error );
/* Retrieves the sub file entry for the specific index
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN \
int libewf_file_entry_get_sub_file_entry(
libewf_file_entry_t *file_entry,
int sub_file_entry_index,
libewf_file_entry_t **sub_file_entry,
libewf_error_t **error );
/* Reads data at the current offset
* Returns the number of bytes read or -1 on error
*/
LIBEWF_EXTERN \
ssize_t libewf_file_entry_read_buffer(
libewf_file_entry_t *file_entry,
void *buffer,
size_t buffer_size,
libewf_error_t **error );
/* Reads data at a specific offset
* Returns the number of bytes read or -1 on error
*/
LIBEWF_EXTERN \
ssize_t libewf_file_entry_read_random(
libewf_file_entry_t *file_entry,
void *buffer,
size_t buffer_size,
off64_t offset,
libewf_error_t **error );
/* Seeks a certain offset of the data
* Returns the offset if seek is successful or -1 on error
*/
LIBEWF_EXTERN \
off64_t libewf_file_entry_seek_offset(
libewf_file_entry_t *file_entry,
off64_t offset,
int whence,
libewf_error_t **error );
/* ------------------------------------------------------------------------
-
* Single file entry functions - deprecated
* ------------------------------------------------------------------------
- */
/* Retrieves the size of the UTF-8 encoded name
* The returned size includes the end of string character
* Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_file_entry_get_utf8_name_size instea
d
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_file_entry_get_name_size(
libewf_file_entry_t *file_entry,
size_t *name_size,
libewf_error_t **error );
/* Retrieves the UTF-8 encoded name value
* The size should include the end of string character
* Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_file_entry_get_utf8_name instead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_file_entry_get_name(
libewf_file_entry_t *file_entry,
uint8_t *name,
size_t name_size,
libewf_error_t **error );
/* Retrieves the amount of sub file entries
* Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_file_entry_get_number_of_sub_file_en
tries instead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN \
int libewf_file_entry_get_amount_of_sub_file_entries(
libewf_file_entry_t *file_entry,
int *amount_of_sub_file_entries,
libewf_error_t **error );
/* ------------------------------------------------------------------------
-
* APIv1 functions - deprecated
* ------------------------------------------------------------------------
- */
#if 1 || defined( HAVE_V1_API )
/* ------------------------------------------------------------------------
-
* Notify functions
* ------------------------------------------------------------------------
- */
/* Sets the notify values
*
* This function is deprecated use libewf_notify_set_value instead
*/
LIBEWF_DEPRECATED \
LIBEWF_EXTERN void libewf_set_notify_values(
FILE *stream,
uint8_t verbose );
/* ------------------------------------------------------------------------
-
* File/Handle functions
* ------------------------------------------------------------------------
- */
/* Signals the libewf handle to abort its current activity /* Signals the libewf handle to abort its current activity
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function deprecated use libewf_handle_signal_abort instead
*/ */
LIBEWF_EXTERN int libewf_handle_signal_abort( LIBEWF_DEPRECATED \
libewf_handle_t *handle, LIBEWF_EXTERN int libewf_signal_abort(
libewf_error_t **error ); libewf_handle_t *handle );
/* Opens a set of EWF file(s) /* Opens a set of EWF file(s)
* For reading files should contain all filenames that make up an EWF image * For reading files should contain all filenames that make up an EWF image
* For writing files should contain the base of the filename, extentions li ke .e01 will be automatically added * For writing files should contain the base of the filename, extentions li ke .e01 will be automatically added
* Returns a pointer to the new instance of handle, NULL on error * Returns a pointer to the new instance of handle, NULL on error
*
* This function deprecated use libewf_handle_open instead
*/ */
LIBEWF_EXTERN int libewf_handle_open( LIBEWF_DEPRECATED \
libewf_handle_t *handle, LIBEWF_EXTERN libewf_handle_t *libewf_open(
char * const filenames[], char * const filenames[],
int amount_of_filenames, int amount_of_filenames,
uint8_t flags, uint8_t flags );
libewf_error_t **error );
#if defined( LIBEWF_HAVE_WIDE_CHARACTER_TYPE ) #if defined( LIBEWF_HAVE_WIDE_CHARACTER_TYPE )
/* Opens a set of EWF file(s) /* Opens a set of EWF file(s)
* For reading files should contain all filenames that make up an EWF image * For reading files should contain all filenames that make up an EWF image
* For writing files should contain the base of the filename, extentions li ke .e01 will be automatically added * For writing files should contain the base of the filename, extentions li ke .e01 will be automatically added
* Returns a pointer to the new instance of handle, NULL on error * Returns a pointer to the new instance of handle, NULL on error
*
* This function deprecated use libewf_handle_open_wide instead
*/ */
LIBEWF_EXTERN int libewf_handle_open_wide( LIBEWF_DEPRECATED \
libewf_handle_t *handle, LIBEWF_EXTERN libewf_handle_t *libewf_open_wide(
wchar_t * const filenames[], wchar_t * const filenames[],
int amount_of_filenames, int amount_of_filenames,
uint8_t flags, uint8_t flags );
libewf_error_t **error );
#endif
#if defined( LIBEWF_HAVE_BFIO )
/* Opens a set of EWF file(s) using a Basic File IO (bfio) pool
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_open_file_io_pool(
libewf_handle_t *handle,
libbfio_pool_t *file_io_pool,
uint8_t flags,
libewf_error_t **error );
#endif #endif
/* Closes the EWF handle and frees memory used within the handle /* Closes the EWF handle and frees memory used within the handle
* Returns 0 if successful or -1 on error * Returns 0 if successful or -1 on error
*
* This function deprecated use libewf_handle_close instead
*/ */
LIBEWF_EXTERN int libewf_handle_close( LIBEWF_DEPRECATED \
libewf_handle_t *handle, LIBEWF_EXTERN int libewf_close(
libewf_error_t **error ); libewf_handle_t *handle );
/* Seeks a certain offset of the media data within the EWF file(s) /* Seeks a certain offset of the (media) data
* It will set the related file offset to the specific chunk offset
* Returns the offset if seek is successful or -1 on error * Returns the offset if seek is successful or -1 on error
*
* This function is deprecated use libewf_handle_seek_offset instead
*/ */
LIBEWF_EXTERN off64_t libewf_handle_seek_offset( LIBEWF_DEPRECATED \
LIBEWF_EXTERN off64_t libewf_seek_offset(
libewf_handle_t *handle, libewf_handle_t *handle,
off64_t offset, off64_t offset );
int whence,
libewf_error_t **error );
/* Retrieves the current offset of the media data within the EWF file(s) /* Retrieves the current offset of the (media) data
* Returns the offset if successful or -1 on error * Returns the offset if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_offset instead
*/ */
LIBEWF_EXTERN int libewf_handle_get_offset( LIBEWF_DEPRECATED \
libewf_handle_t *handle, LIBEWF_EXTERN off64_t libewf_get_offset(
off64_t *offset, libewf_handle_t *handle );
libewf_error_t **error );
/* Prepares chunk data after reading it according to the handle settings /* Prepares a buffer with chunk data after reading it according to the hand
* This function should be used after libewf_handle_read_chunk le settings
* The chunk buffer size should contain the actual chunk size * intended for raw read
* The buffer size cannot be larger than the chunk size
* Returns the resulting chunk size or -1 on error * Returns the resulting chunk size or -1 on error
*
* This function is deprecated use libewf_handle_prepare_read_chunk instead
*/ */
LIBEWF_EXTERN ssize_t libewf_handle_prepare_read_chunk( LIBEWF_DEPRECATED \
LIBEWF_EXTERN ssize_t libewf_raw_read_prepare_buffer(
libewf_handle_t *handle, libewf_handle_t *handle,
void *chunk_buffer, void *buffer,
size_t chunk_buffer_size, size_t buffer_size,
void *uncompressed_buffer, void *uncompressed_buffer,
size_t *uncompressed_buffer_size, size_t *uncompressed_buffer_size,
int8_t is_compressed, int8_t is_compressed,
uint32_t chunk_crc, uint32_t chunk_checksum,
int8_t read_crc, int8_t read_checksum );
libewf_error_t **error );
/* Reads a chunk from the curent offset into a buffer /* Reads 'raw' data from the current offset into a buffer
* size contains the size of the chunk buffer * size contains the size of the buffer
* The function sets the chunk crc, is compressed and read crc values * The function sets the chunk checksum, is compressed and read checksum va
lues
* Returns the amount of bytes read or -1 on error * Returns the amount of bytes read or -1 on error
*
* This function is deprecated use libewf_handle_read_chunk instead
*/ */
LIBEWF_EXTERN ssize_t libewf_handle_read_chunk( LIBEWF_DEPRECATED \
LIBEWF_EXTERN ssize_t libewf_raw_read_buffer(
libewf_handle_t *handle, libewf_handle_t *handle,
void *chunk_buffer, void *buffer,
size_t chunk_buffer_size, size_t buffer_size,
int8_t *is_compressed, int8_t *is_compressed,
void *crc_buffer, uint32_t *chunk_checksum,
uint32_t *chunk_crc, int8_t *read_checksum );
int8_t *read_crc,
libewf_error_t **error );
/* Reads data from the curent offset into a buffer /* Reads data from the current offset into a buffer
* Returns the amount of bytes read or -1 on error * Returns the amount of bytes read or -1 on error
*
* This function is deprecated use libewf_handle_read_buffer instead
*/ */
LIBEWF_EXTERN ssize_t libewf_handle_read_buffer( LIBEWF_DEPRECATED \
LIBEWF_EXTERN ssize_t libewf_read_buffer(
libewf_handle_t *handle, libewf_handle_t *handle,
void *buffer, void *buffer,
size_t buffer_size, size_t buffer_size );
libewf_error_t **error );
/* Reads media data from an offset into a buffer /* Reads (media) data at a specific offset
* Returns the amount of bytes read or -1 on error * Returns the amount of bytes read or -1 on error
*
* This function is deprecated use libewf_handle_read_random instead
*/ */
LIBEWF_EXTERN ssize_t libewf_handle_read_random( LIBEWF_DEPRECATED \
LIBEWF_EXTERN ssize_t libewf_read_random(
libewf_handle_t *handle, libewf_handle_t *handle,
void *buffer, void *buffer,
size_t buffer_size, size_t buffer_size,
off64_t offset, off64_t offset );
libewf_error_t **error );
/* Prepares a buffer with chunk data before writing according to the handle settings /* Prepares a buffer with chunk data before writing according to the handle settings
* This function should be used before libewf_handle_write_chunk * intended for raw write
* The chunk buffer size should contain the actual chunk size * The buffer size cannot be larger than the chunk size
* The function sets the chunk crc, is compressed and write crc values * The function sets the chunk checksum, is compressed and write checksum v
alues
* Returns the resulting chunk size or -1 on error * Returns the resulting chunk size or -1 on error
*
* This function is deprecated use libewf_handle_prepare_write_chunk instea
d
*/ */
LIBEWF_EXTERN ssize_t libewf_handle_prepare_write_chunk( LIBEWF_DEPRECATED \
LIBEWF_EXTERN ssize_t libewf_raw_write_prepare_buffer(
libewf_handle_t *handle, libewf_handle_t *handle,
void *buffer, void *buffer,
size_t buffer_size, size_t buffer_size,
void *compressed_buffer, void *compressed_buffer,
size_t *compressed_buffer_size, size_t *compressed_buffer_size,
int8_t *is_compressed, int8_t *is_compressed,
uint32_t *chunk_crc, uint32_t *chunk_checksum,
int8_t *write_crc, int8_t *write_checksum );
libewf_error_t **error );
/* Writes a chunk in EWF format from a buffer at the current offset /* Writes 'raw' data in EWF format at the current offset
* the necessary settings of the write values must have been made * the necessary settings of the write values must have been made
* size contains the size of the data within the buffer while * size contains the size of the data within the buffer while
* data size contains the size of the actual input data * data size contains the size of the actual input data
* Will initialize write if necessary * Will initialize write if necessary
* Returns the amount of input bytes written, 0 when no longer bytes can be written or -1 on error * Returns the amount of input bytes written, 0 when no longer bytes can be written or -1 on error
*
* This function is deprecated use libewf_handle_write_chunk instead
*/ */
LIBEWF_EXTERN ssize_t libewf_handle_write_chunk( LIBEWF_DEPRECATED \
LIBEWF_EXTERN ssize_t libewf_raw_write_buffer(
libewf_handle_t *handle, libewf_handle_t *handle,
void *chunk_buffer, void *buffer,
size_t chunk_buffer_size, size_t buffer_size,
size_t data_size, size_t data_size,
int8_t is_compressed, int8_t is_compressed,
void *crc_buffer, uint32_t chunk_checksum,
uint32_t chunk_crc, int8_t write_checksum );
int8_t write_crc,
libewf_error_t **error );
/* Writes data in EWF format from a buffer at the current offset /* Writes data in EWF format at the current offset
* the necessary settings of the write values must have been made * the necessary settings of the write values must have been made
* Will initialize write if necessary * Will initialize write if necessary
* Returns the amount of input bytes written, 0 when no longer bytes can be written or -1 on error * Returns the amount of input bytes written, 0 when no longer bytes can be written or -1 on error
*
* This function is deprecated use libewf_handle_write_buffer instead
*/ */
LIBEWF_EXTERN ssize_t libewf_handle_write_buffer( LIBEWF_DEPRECATED \
LIBEWF_EXTERN ssize_t libewf_write_buffer(
libewf_handle_t *handle, libewf_handle_t *handle,
void *buffer, void *buffer,
size_t buffer_size, size_t buffer_size );
libewf_error_t **error );
/* Writes data in EWF format from a buffer at an specific offset, /* Writes data in EWF format at a specific offset,
* the necessary settings of the write values must have been made * the necessary settings of the write values must have been made
* Will initialize write if necessary * Will initialize write if necessary
* Returns the amount of input bytes written, 0 when no longer bytes can be written or -1 on error * Returns the amount of input bytes written, 0 when no longer bytes can be written or -1 on error
*
* This function is deprecated use libewf_handle_write_random instead
*/ */
LIBEWF_EXTERN ssize_t libewf_handle_write_random( LIBEWF_DEPRECATED \
LIBEWF_EXTERN ssize_t libewf_write_random(
libewf_handle_t *handle, libewf_handle_t *handle,
void *buffer, void *buffer,
size_t buffer_size, size_t buffer_size,
off64_t offset, off64_t offset );
libewf_error_t **error );
/* Finalizes the write by correcting the EWF the meta data in the segment f iles /* Finalizes the write by correcting the EWF the meta data in the segment f iles
* This function is required after writing from stream * This function is required after writing from stream
* Returns the amount of input bytes written or -1 on error * Returns the amount of input bytes written or -1 on error
*
* This function is deprecated use libewf_handle_write_finalize instead
*/ */
LIBEWF_EXTERN ssize_t libewf_handle_write_finalize( LIBEWF_DEPRECATED \
libewf_handle_t *handle, LIBEWF_EXTERN ssize_t libewf_write_finalize(
libewf_error_t **error ); libewf_handle_t *handle );
/* Retrieves the segment filename size
* The filename size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_segment_filename_size(
libewf_handle_t *handle,
size_t *filename_size,
libewf_error_t **error );
/* Retrieves the segment filename /* Retrieves the segment filename
* The filename size should include the end of string character * The filename size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*
* This function is deprecated use libewf_handle_get_segment_filename inste
ad
*/ */
LIBEWF_EXTERN int libewf_handle_get_segment_filename( LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_segment_filename(
libewf_handle_t *handle, libewf_handle_t *handle,
char *filename, char *filename,
size_t filename_size, size_t filename_size );
libewf_error_t **error );
/* Sets the segment filename /* Sets the segment filename
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_segment_filename inste
ad
*/ */
LIBEWF_EXTERN int libewf_handle_set_segment_filename( LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_set_segment_filename(
libewf_handle_t *handle, libewf_handle_t *handle,
const char *filename, const char *filename,
size_t filename_length, size_t filename_length );
libewf_error_t **error );
#if defined( LIBEWF_HAVE_WIDE_CHARACTER_TYPE ) #if defined( LIBEWF_HAVE_WIDE_CHARACTER_TYPE )
/* Retrieves the segment filename size
* The filename size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_segment_filename_size_wide(
libewf_handle_t *handle,
size_t *filename_size,
libewf_error_t **error );
/* Retrieves the segment filename /* Retrieves the segment filename
* The filename size should include the end of string character * The filename size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*
* This function is deprecated use libewf_handle_get_segment_filename_wide
instead
*/ */
LIBEWF_EXTERN int libewf_handle_get_segment_filename_wide( LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_segment_filename_wide(
libewf_handle_t *handle, libewf_handle_t *handle,
wchar_t *filename, wchar_t *filename,
size_t filename_size, size_t filename_size );
libewf_error_t **error );
/* Sets the segment filename /* Sets the segment filename
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_segment_filename_wide
instead
*/ */
LIBEWF_EXTERN int libewf_handle_set_segment_filename_wide( LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_set_segment_filename_wide(
libewf_handle_t *handle, libewf_handle_t *handle,
const wchar_t *filename, const wchar_t *filename,
size_t filename_length, size_t filename_length );
libewf_error_t **error );
#endif #endif
/* Retrieves the segment file size /* Retrieves the segment file size
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_maximum_segment_size i
nstead
*/ */
LIBEWF_EXTERN int libewf_handle_get_segment_file_size( LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_segment_file_size(
libewf_handle_t *handle, libewf_handle_t *handle,
size64_t *segment_file_size, size64_t *segment_file_size );
libewf_error_t **error );
/* Sets the segment file size /* Sets the segment file size
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_maximum_segment_size i
nstead
*/ */
LIBEWF_EXTERN int libewf_handle_set_segment_file_size( LIBEWF_DEPRECATED \
libewf_handle_t *handle, LIBEWF_EXTERN int libewf_set_segment_file_size(
size64_t segment_file_size,
libewf_error_t **error );
/* Retrieves the delta segment filename size
* The filename size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_delta_segment_filename_size(
libewf_handle_t *handle, libewf_handle_t *handle,
size_t *filename_size, size64_t segment_file_size );
libewf_error_t **error );
/* Retrieves the delta segment filename /* Retrieves the delta segment filename
* The filename size should include the end of string character * The filename size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*
* This function is deprecated use libewf_handle_get_delta_segment_filename
instead
*/ */
LIBEWF_EXTERN int libewf_handle_get_delta_segment_filename( LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_delta_segment_filename(
libewf_handle_t *handle, libewf_handle_t *handle,
char *filename, char *filename,
size_t filename_size, size_t filename_size );
libewf_error_t **error );
/* Sets the delta segment filename /* Sets the delta segment filename
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_delta_segment_filename
instead
*/ */
LIBEWF_EXTERN int libewf_handle_set_delta_segment_filename( LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_set_delta_segment_filename(
libewf_handle_t *handle, libewf_handle_t *handle,
const char *filename, const char *filename,
size_t filename_length, size_t filename_length );
libewf_error_t **error );
#if defined( LIBEWF_HAVE_WIDE_CHARACTER_TYPE ) #if defined( LIBEWF_HAVE_WIDE_CHARACTER_TYPE )
/* Retrieves the delta segment filename size
* The filename size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_delta_segment_filename_size_wide(
libewf_handle_t *handle,
size_t *filename_size,
libewf_error_t **error );
/* Retrieves the delta segment filename /* Retrieves the delta segment filename
* The filename size should include the end of string character * The filename size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*
* This function is deprecated use libewf_handle_get_delta_segment_filename
_wide instead
*/ */
LIBEWF_EXTERN int libewf_handle_get_delta_segment_filename_wide( LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_delta_segment_filename_wide(
libewf_handle_t *handle, libewf_handle_t *handle,
wchar_t *filename, wchar_t *filename,
size_t filename_size, size_t filename_size );
libewf_error_t **error );
/* Sets the delta segment filename /* Sets the delta segment filename
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_delta_segment_filename
_wide instead
*/ */
LIBEWF_EXTERN int libewf_handle_set_delta_segment_filename_wide( LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_set_delta_segment_filename_wide(
libewf_handle_t *handle, libewf_handle_t *handle,
const wchar_t *filename, const wchar_t *filename,
size_t filename_length, size_t filename_length );
libewf_error_t **error );
#endif #endif
/* Retrieves the delta segment file size /* Retrieves the delta segment file size
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_maximum_delta_segment_
size instead
*/ */
LIBEWF_EXTERN int libewf_handle_get_delta_segment_file_size( LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_delta_segment_file_size(
libewf_handle_t *handle, libewf_handle_t *handle,
size64_t *delta_segment_file_size, size64_t *delta_segment_file_size );
libewf_error_t **error );
/* Sets the delta segment file size /* Sets the delta segment file size
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_maximum_delta_segment_
size instead
*/ */
LIBEWF_EXTERN int libewf_handle_set_delta_segment_file_size( LIBEWF_DEPRECATED \
libewf_handle_t *handle, LIBEWF_EXTERN int libewf_set_delta_segment_file_size(
size64_t delta_segment_file_size,
libewf_error_t **error );
/* Retrieves the filename size of the (delta) segment file of the current c
hunk
* The filename size includes the end of string character
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_filename_size(
libewf_handle_t *handle,
size_t *filename_size,
libewf_error_t **error );
/* Retrieves the filename of the (delta) segment file of the current chunk
* The filename size should include the end of string character
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_filename(
libewf_handle_t *handle,
char *filename,
size_t filename_size,
libewf_error_t **error );
#if defined( LIBEWF_HAVE_WIDE_CHARACTER_TYPE )
/* Retrieves the filename size of the (delta) segment file of the current c
hunk
* The filename size includes the end of string character
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_filename_size_wide(
libewf_handle_t *handle,
size_t *filename_size,
libewf_error_t **error );
/* Retrieves the filename of the (delta) segment file of the current chunk
* The filename size should include the end of string character
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_filename_wide(
libewf_handle_t *handle,
wchar_t *filename,
size_t filename_size,
libewf_error_t **error );
#endif
#if defined( LIBEWF_HAVE_BFIO )
/* Retrieves the file io handle of the (delta) segment file of the current
chunk
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_file_io_handle(
libewf_handle_t *handle, libewf_handle_t *handle,
libbfio_handle_t **file_io_handle, size64_t delta_segment_file_size );
libewf_error_t **error );
#endif
#endif
/* ------------------------------------------------------------------------ - /* ------------------------------------------------------------------------ -
* Meta data functions (APIv1) * Meta data functions
* ------------------------------------------------------------------------ - */ * ------------------------------------------------------------------------ - */
#if 1 || defined( HAVE_V1_API ) /* Retrieves the amount of sectors per chunk
/* Retrieves the amount of sectors per chunk from the media information
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_sectors_per_chunk inst
ead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_sectors_per_chunk( LIBEWF_EXTERN int libewf_get_sectors_per_chunk(
libewf_handle_t *handle, libewf_handle_t *handle,
uint32_t *sectors_per_chunk ); uint32_t *sectors_per_chunk );
/* Sets the amount of sectors per chunk in the media information /* Sets the amount of sectors per chunk
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_sectors_per_chunk inst
ead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_set_sectors_per_chunk( LIBEWF_EXTERN int libewf_set_sectors_per_chunk(
libewf_handle_t *handle, libewf_handle_t *handle,
uint32_t sectors_per_chunk ); uint32_t sectors_per_chunk );
/* Retrieves the amount of bytes per sector from the media information /* Retrieves the amount of bytes per sector
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_bytes_per_sector inste
ad
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_bytes_per_sector( LIBEWF_EXTERN int libewf_get_bytes_per_sector(
libewf_handle_t *handle, libewf_handle_t *handle,
uint32_t *bytes_per_sector ); uint32_t *bytes_per_sector );
/* Sets the amount of bytes per sector in the media information /* Sets the amount of bytes per sector
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_bytes_per_sector inste
ad
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_set_bytes_per_sector( LIBEWF_EXTERN int libewf_set_bytes_per_sector(
libewf_handle_t *handle, libewf_handle_t *handle,
uint32_t bytes_per_sector ); uint32_t bytes_per_sector );
/* Retrieves the amount of sectors from the media information /* Retrieves the amount of sectors
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_number_of_sectors inst
ead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_amount_of_sectors( LIBEWF_EXTERN int libewf_get_amount_of_sectors(
libewf_handle_t *handle, libewf_handle_t *handle,
uint32_t *amount_of_sectors ); uint32_t *amount_of_sectors );
/* Retrieves the chunk size from the media information /* Retrieves the chunk size
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_chunk_size instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_chunk_size( LIBEWF_EXTERN int libewf_get_chunk_size(
libewf_handle_t *handle, libewf_handle_t *handle,
size32_t *chunk_size ); size32_t *chunk_size );
/* Retrieves the error granularity from the media information /* Retrieves the error granularity
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_error_granularity inst
ead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_error_granularity( LIBEWF_EXTERN int libewf_get_error_granularity(
libewf_handle_t *handle, libewf_handle_t *handle,
uint32_t *error_granularity ); uint32_t *error_granularity );
/* Sets the error granularity /* Sets the error granularity
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_error_granularity inst
ead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_set_error_granularity( LIBEWF_EXTERN int libewf_set_error_granularity(
libewf_handle_t *handle, libewf_handle_t *handle,
uint32_t error_granularity ); uint32_t error_granularity );
/* Retrieves the compression values /* Retrieves the compression values
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_compression_values ins
tead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_compression_values( LIBEWF_EXTERN int libewf_get_compression_values(
libewf_handle_t *handle, libewf_handle_t *handle,
int8_t *compression_level, int8_t *compression_level,
uint8_t *compress_empty_block ); uint8_t *compress_empty_block );
/* Sets the compression values /* Sets the compression values
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_compression_values ins
tead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_set_compression_values( LIBEWF_EXTERN int libewf_set_compression_values(
libewf_handle_t *handle, libewf_handle_t *handle,
int8_t compression_level, int8_t compression_level,
uint8_t compress_empty_block ); uint8_t compress_empty_block );
/* Retrieves the size of the contained media data /* Retrieves the size of the contained (media) data
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_media_size instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_media_size( LIBEWF_EXTERN int libewf_get_media_size(
libewf_handle_t *handle, libewf_handle_t *handle,
size64_t *media_size ); size64_t *media_size );
/* Sets the media size /* Sets the media size
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_media_size instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_set_media_size( LIBEWF_EXTERN int libewf_set_media_size(
libewf_handle_t *handle, libewf_handle_t *handle,
size64_t media_size ); size64_t media_size );
/* Retrieves the media type value /* Retrieves the media type value
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_media_type instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_media_type( LIBEWF_EXTERN int libewf_get_media_type(
libewf_handle_t *handle, libewf_handle_t *handle,
uint8_t *media_type ); uint8_t *media_type );
/* Sets the media type /* Sets the media type
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_media_type instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_set_media_type( LIBEWF_EXTERN int libewf_set_media_type(
libewf_handle_t *handle, libewf_handle_t *handle,
uint8_t media_type ); uint8_t media_type );
/* Retrieves the media flags /* Retrieves the media flags
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_media_flags instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_media_flags( LIBEWF_EXTERN int libewf_get_media_flags(
libewf_handle_t *handle, libewf_handle_t *handle,
uint8_t *media_flags ); uint8_t *media_flags );
/* Sets the media flags /* Sets the media flags
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_media_flags instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_set_media_flags( LIBEWF_EXTERN int libewf_set_media_flags(
libewf_handle_t *handle, libewf_handle_t *handle,
uint8_t media_flags ); uint8_t media_flags );
/* Retrieves the volume type value /* Retrieves the volume type value
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_media_flags instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_volume_type( LIBEWF_EXTERN int libewf_get_volume_type(
libewf_handle_t *handle, libewf_handle_t *handle,
uint8_t *volume_type ); uint8_t *volume_type );
/* Sets the volume type /* Sets the volume type
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_media_flags instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_set_volume_type( LIBEWF_EXTERN int libewf_set_volume_type(
libewf_handle_t *handle, libewf_handle_t *handle,
uint8_t volume_type ); uint8_t volume_type );
/* Retrieves the format type value /* Retrieves the format type value
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_format instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_format( LIBEWF_EXTERN int libewf_get_format(
libewf_handle_t *handle, libewf_handle_t *handle,
uint8_t *format ); uint8_t *format );
/* Sets the output format /* Sets the output format
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_format instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_set_format( LIBEWF_EXTERN int libewf_set_format(
libewf_handle_t *handle, libewf_handle_t *handle,
uint8_t format ); uint8_t format );
/* Retrieves the GUID /* Retrieves the GUID
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_guid instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_guid( LIBEWF_EXTERN int libewf_get_guid(
libewf_handle_t *handle, libewf_handle_t *handle,
uint8_t *guid, uint8_t *guid,
size_t size ); size_t size );
/* Sets the GUID /* Sets the GUID
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_guid instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_set_guid( LIBEWF_EXTERN int libewf_set_guid(
libewf_handle_t *handle, libewf_handle_t *handle,
uint8_t *guid, uint8_t *guid,
size_t size ); size_t size );
/* Retrieves the MD5 hash /* Retrieves the MD5 hash
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*
* This function is deprecated use libewf_handle_get_md5_hash instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_md5_hash( LIBEWF_EXTERN int libewf_get_md5_hash(
libewf_handle_t *handle, libewf_handle_t *handle,
uint8_t *md5_hash, uint8_t *md5_hash,
size_t size ); size_t size );
/* Sets the MD5 hash /* Sets the MD5 hash
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*
* This function is deprecated use libewf_handle_set_md5_hash instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_set_md5_hash( LIBEWF_EXTERN int libewf_set_md5_hash(
libewf_handle_t *handle, libewf_handle_t *handle,
uint8_t *md5_hash, uint8_t *md5_hash,
size_t size ); size_t size );
/* Retrieves the SHA1 hash /* Retrieves the SHA1 hash
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*
* This function is deprecated use libewf_handle_get_sha1_hash instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_sha1_hash( LIBEWF_EXTERN int libewf_get_sha1_hash(
libewf_handle_t *handle, libewf_handle_t *handle,
uint8_t *sha1_hash, uint8_t *sha1_hash,
size_t size ); size_t size );
/* Sets the SHA1 hash /* Sets the SHA1 hash
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*
* This function is deprecated use libewf_handle_set_sha1_hash instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_set_sha1_hash( LIBEWF_EXTERN int libewf_set_sha1_hash(
libewf_handle_t *handle, libewf_handle_t *handle,
uint8_t *sha1_hash, uint8_t *sha1_hash,
size_t size ); size_t size );
/* Retrieves the amount of chunks written /* Retrieves the amount of chunks written
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_write_amount_of_chunks
instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_write_amount_of_chunks( LIBEWF_EXTERN int libewf_get_write_amount_of_chunks(
libewf_handle_t *handle, libewf_handle_t *handle,
uint32_t *amount_of_chunks ); uint32_t *amount_of_chunks );
/* Sets the read wipe chunk on error /* Sets the read wipe chunk on error
* The chunk is not wiped if read raw is used * The chunk is not wiped if read raw is used
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_read_zero_chunk_on_err
or instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_set_read_wipe_chunk_on_error( LIBEWF_EXTERN int libewf_set_read_wipe_chunk_on_error(
libewf_handle_t *handle, libewf_handle_t *handle,
uint8_t wipe_on_error ); uint8_t wipe_on_error );
/* Copies the media values from the source to the destination handle /* Copies the media values from the source to the destination handle
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_copy_media_values instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_copy_media_values( LIBEWF_EXTERN int libewf_copy_media_values(
libewf_handle_t *destination_handle, libewf_handle_t *destination_handle,
libewf_handle_t *source_handle ); libewf_handle_t *source_handle );
/* Retrieves the amount of acquiry errors /* Retrieves the amount of acquiry errors
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_number_of_acquiry_erro
rs instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_amount_of_acquiry_errors( LIBEWF_EXTERN int libewf_get_amount_of_acquiry_errors(
libewf_handle_t *handle, libewf_handle_t *handle,
uint32_t *amount_of_errors ); uint32_t *amount_of_errors );
/* Retrieves the information of an acquiry error /* Retrieves an acquiry error
* Returns 1 if successful, 0 if no acquiry error could be found or -1 on e * Returns 1 if successful or -1 on error
rror *
* This function is deprecated use libewf_handle_get_acquiry_error instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_acquiry_error( LIBEWF_EXTERN int libewf_get_acquiry_error(
libewf_handle_t *handle, libewf_handle_t *handle,
uint32_t index, uint32_t index,
off64_t *first_sector, off64_t *first_sector,
uint32_t *amount_of_sectors ); uint32_t *amount_of_sectors );
/* Add an acquiry error /* Add an acquiry error
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_append_acquiry_error inste
ad
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_add_acquiry_error( LIBEWF_EXTERN int libewf_add_acquiry_error(
libewf_handle_t *handle, libewf_handle_t *handle,
off64_t first_sector, off64_t first_sector,
uint32_t amount_of_sectors ); uint32_t amount_of_sectors );
/* Retrieves the amount of CRC errors /* Retrieves the amount of checksum errors
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_number_of_checksum_err
ors instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_amount_of_crc_errors( LIBEWF_EXTERN int libewf_get_amount_of_crc_errors(
libewf_handle_t *handle, libewf_handle_t *handle,
uint32_t *amount_of_errors ); uint32_t *amount_of_errors );
/* Retrieves the information of a CRC error /* Retrieves a checksum error
* Returns 1 if successful, 0 if no CRC error could be found or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_checksum_error instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_crc_error( LIBEWF_EXTERN int libewf_get_crc_error(
libewf_handle_t *handle, libewf_handle_t *handle,
uint32_t index, uint32_t index,
off64_t *first_sector, off64_t *first_sector,
uint32_t *amount_of_sectors ); uint32_t *amount_of_sectors );
/* Add a CRC error /* Add a checksum error
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_append_checksum_error inst
ead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_add_crc_error( LIBEWF_EXTERN int libewf_add_crc_error(
libewf_handle_t *handle, libewf_handle_t *handle,
off64_t first_sector, off64_t first_sector,
uint32_t amount_of_sectors ); uint32_t amount_of_sectors );
/* Retrieves the amount of sessions /* Retrieves the amount of sessions
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_number_of_sessions ins
tead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_amount_of_sessions( LIBEWF_EXTERN int libewf_get_amount_of_sessions(
libewf_handle_t *handle, libewf_handle_t *handle,
uint32_t *amount_of_sessions ); uint32_t *amount_of_sessions );
/* Retrieves the information of a session /* Retrieves a session
* Returns 1 if successful, 0 if no sessions could be found or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_session instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_session( LIBEWF_EXTERN int libewf_get_session(
libewf_handle_t *handle, libewf_handle_t *handle,
uint32_t index, uint32_t index,
off64_t *first_sector, off64_t *first_sector,
uint32_t *amount_of_sectors ); uint32_t *amount_of_sectors );
/* Add a session /* Add a session
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_append_session instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_add_session( LIBEWF_EXTERN int libewf_add_session(
libewf_handle_t *handle, libewf_handle_t *handle,
off64_t first_sector, off64_t first_sector,
uint32_t amount_of_sectors ); uint32_t amount_of_sectors );
/* Retrieves the header codepage /* Retrieves the header codepage
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_get_header_codepage instea
d
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_header_codepage( LIBEWF_EXTERN int libewf_get_header_codepage(
libewf_handle_t *handle, libewf_handle_t *handle,
int *header_codepage ); int *header_codepage );
/* Sets the header codepage /* Sets the header codepage
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_header_codepage instea
d
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_set_header_codepage( LIBEWF_EXTERN int libewf_set_header_codepage(
libewf_handle_t *handle, libewf_handle_t *handle,
int header_codepage ); int header_codepage );
/* Retrieves the amount of header values /* Retrieves the amount of header values
* Returns 1 if successful, 0 if no header values are present or -1 on erro r * Returns 1 if successful, 0 if no header values are present or -1 on erro r
*
* This function is deprecated use libewf_handle_get_number_of_header_value
s instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_amount_of_header_values( LIBEWF_EXTERN int libewf_get_amount_of_header_values(
libewf_handle_t *handle, libewf_handle_t *handle,
uint32_t *amount_of_values ); uint32_t *amount_of_values );
/* Retrieves the header value identifier size specified by its index /* Retrieves the header value identifier size specified by its index
* The identifier size includes the end of string character * The identifier size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*
* This function is deprecated use libewf_handle_get_header_value_identifie
r_size instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_header_value_identifier_size( LIBEWF_EXTERN int libewf_get_header_value_identifier_size(
libewf_handle_t *handle, libewf_handle_t *handle,
uint32_t index, uint32_t index,
size_t *identifier_size ); size_t *identifier_size );
/* Retrieves the header value identifier specified by its index /* Retrieves the header value identifier specified by its index
* The strings are encoded in UTF-8 * The strings are encoded in UTF-8
* The identifier size should include the end of string character * The identifier size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*
* This function is deprecated use libewf_handle_get_header_value_identifie
r instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_header_value_identifier( LIBEWF_EXTERN int libewf_get_header_value_identifier(
libewf_handle_t *handle, libewf_handle_t *handle,
uint32_t index, uint32_t index,
char *identifier, char *identifier,
size_t identifier_size ); size_t identifier_size );
/* Retrieves the header value size specified by the identifier /* Retrieves the header value size specified by the identifier
* The value size includes the end of string character * The value size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*
* This function is deprecated use libewf_handle_get_header_value_size inst
ead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_header_value_size( LIBEWF_EXTERN int libewf_get_header_value_size(
libewf_handle_t *handle, libewf_handle_t *handle,
const char *identifier, const char *identifier,
size_t *value_size ); size_t *value_size );
/* Retrieves the header value specified by the identifier /* Retrieves the header value specified by the identifier
* The strings are encoded in UTF-8 * The strings are encoded in UTF-8
* The value size should include the end of string character * The value size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*
* This function is deprecated use libewf_handle_get_header_value instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_header_value( LIBEWF_EXTERN int libewf_get_header_value(
libewf_handle_t *handle, libewf_handle_t *handle,
const char *identifier, const char *identifier,
char *value, char *value,
size_t value_size ); size_t value_size );
/* Retrieves the header value case number /* Retrieves the header value case number
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*/ */
#define libewf_get_header_value_case_number( handle, value, value_size ) \ #define libewf_get_header_value_case_number( handle, value, value_size ) \
skipping to change at line 1326 skipping to change at line 3190
#define libewf_get_header_value_evidence_number( handle, value, value_size ) \ #define libewf_get_header_value_evidence_number( handle, value, value_size ) \
libewf_get_header_value( handle, "evidence_number", value, value_si ze ) libewf_get_header_value( handle, "evidence_number", value, value_si ze )
/* Retrieves the header value notes /* Retrieves the header value notes
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*/ */
#define libewf_get_header_value_notes( handle, value, value_size ) \ #define libewf_get_header_value_notes( handle, value, value_size ) \
libewf_get_header_value( handle, "notes", value, value_size ) libewf_get_header_value( handle, "notes", value, value_size )
/* Retrieves the header value acquiry date /* Retrieves the header value acquiry date
* The string is formatted according to the date format * The string is encoded according to the date format
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*/ */
#define libewf_get_header_value_acquiry_date( handle, value, value_size ) \ #define libewf_get_header_value_acquiry_date( handle, value, value_size ) \
libewf_get_header_value( handle, "acquiry_date", value, value_size ) libewf_get_header_value( handle, "acquiry_date", value, value_size )
/* Retrieves the header value system date /* Retrieves the header value system date
* The string is formatted according to the date format * The string is encoded according to the date format
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*/ */
#define libewf_get_header_value_system_date( handle, value, value_size ) \ #define libewf_get_header_value_system_date( handle, value, value_size ) \
libewf_get_header_value( handle, "system_date", value, value_size ) libewf_get_header_value( handle, "system_date", value, value_size )
/* Retrieves the header value acquiry operating system /* Retrieves the header value acquiry operating system
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*/ */
#define libewf_get_header_value_acquiry_operating_system( handle, value, va lue_size ) \ #define libewf_get_header_value_acquiry_operating_system( handle, value, va lue_size ) \
libewf_get_header_value( handle, "acquiry_operating_system", value, value_size ) libewf_get_header_value( handle, "acquiry_operating_system", value, value_size )
skipping to change at line 1378 skipping to change at line 3242
/* Retrieves the header value serial number /* Retrieves the header value serial number
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*/ */
#define libewf_get_header_value_serial_number( handle, value, value_size ) \ #define libewf_get_header_value_serial_number( handle, value, value_size ) \
libewf_get_header_value( handle, "serial_number", value, value_size ) libewf_get_header_value( handle, "serial_number", value, value_size )
/* Sets the header value specified by the identifier /* Sets the header value specified by the identifier
* The strings are encoded in UTF-8 * The strings are encoded in UTF-8
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_header_value instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_set_header_value( LIBEWF_EXTERN int libewf_set_header_value(
libewf_handle_t *handle, libewf_handle_t *handle,
const char *identifier, const char *identifier,
const char *value, const char *value,
size_t value_length ); size_t value_length );
/* Sets the header value case number /* Sets the header value case number
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*/ */
#define libewf_set_header_value_case_number( handle, value, value_length ) \ #define libewf_set_header_value_case_number( handle, value, value_length ) \
skipping to change at line 1466 skipping to change at line 3333
/* Sets the header value serial number /* Sets the header value serial number
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*/ */
#define libewf_set_header_value_serial_number( handle, value, value_length ) \ #define libewf_set_header_value_serial_number( handle, value, value_length ) \
libewf_set_header_value( handle, "serial_number", value, value_leng th ) libewf_set_header_value( handle, "serial_number", value, value_leng th )
/* Parses the header values from the xheader, header2 or header section /* Parses the header values from the xheader, header2 or header section
* Will parse the first available header in order mentioned above * Will parse the first available header in order mentioned above
* Returns 1 if successful, 0 if already parsed or -1 on error * Returns 1 if successful, 0 if already parsed or -1 on error
*
* This function is deprecated and no longer required
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_parse_header_values( LIBEWF_EXTERN int libewf_parse_header_values(
libewf_handle_t *handle, libewf_handle_t *handle,
uint8_t date_format ); uint8_t date_format );
/* Copies the header values from the source to the destination handle /* Copies the header values from the source to the destination handle
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_copy_header_values instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_copy_header_values( LIBEWF_EXTERN int libewf_copy_header_values(
libewf_handle_t *destination_handle, libewf_handle_t *destination_handle,
libewf_handle_t *source_handle ); libewf_handle_t *source_handle );
/* Retrieves the amount of hash values /* Retrieves the amount of hash values
* Returns 1 if successful, 0 if no hash values are present or -1 on error * Returns 1 if successful, 0 if no hash values are present or -1 on error
*
* This function is deprecated use libewf_handle_get_number_of_hash_values
instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_amount_of_hash_values( LIBEWF_EXTERN int libewf_get_amount_of_hash_values(
libewf_handle_t *handle, libewf_handle_t *handle,
uint32_t *amount_of_values ); uint32_t *amount_of_values );
/* Retrieves the hash value identifier size specified by its index /* Retrieves the hash value identifier size specified by its index
* The identifier size includes the end of string character * The identifier size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*
* This function is deprecated use libewf_handle_get_hash_value_identifier_
size instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_hash_value_identifier_size( LIBEWF_EXTERN int libewf_get_hash_value_identifier_size(
libewf_handle_t *handle, libewf_handle_t *handle,
uint32_t index, uint32_t index,
size_t *identifier_size ); size_t *identifier_size );
/* Retrieves the hash value identifier specified by its index /* Retrieves the hash value identifier specified by its index
* The strings are encoded in UTF-8 * The strings are encoded in UTF-8
* The identifier size should include the end of string character * The identifier size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*
* This function is deprecated use libewf_handle_get_hash_value_identifier
instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_hash_value_identifier( LIBEWF_EXTERN int libewf_get_hash_value_identifier(
libewf_handle_t *handle, libewf_handle_t *handle,
uint32_t index, uint32_t index,
char *identifier, char *identifier,
size_t identifier_size ); size_t identifier_size );
/* Retrieves the hash value size specified by the identifier /* Retrieves the hash value size specified by the identifier
* The value size includes the end of string character * The value size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*
* This function is deprecated use libewf_handle_get_hash_value_size instea
d
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_hash_value_size( LIBEWF_EXTERN int libewf_get_hash_value_size(
libewf_handle_t *handle, libewf_handle_t *handle,
const char *identifier, const char *identifier,
size_t *value_size ); size_t *value_size );
/* Retrieves the hash value specified by the identifier /* Retrieves the hash value specified by the identifier
* The strings are encoded in UTF-8 * The strings are encoded in UTF-8
* The value size should include the end of string character * The value size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*
* This function is deprecated use libewf_handle_get_hash_value instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_get_hash_value( LIBEWF_EXTERN int libewf_get_hash_value(
libewf_handle_t *handle, libewf_handle_t *handle,
const char *identifier, const char *identifier,
char *value, char *value,
size_t value_size ); size_t value_size );
/* Retrieves the hash value MD5 /* Retrieves the hash value MD5
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*/ */
#define libewf_get_hash_value_md5( handle, value, value_size ) \ #define libewf_get_hash_value_md5( handle, value, value_size ) \
skipping to change at line 1540 skipping to change at line 3428
/* Retrieves the hash value SHA1 /* Retrieves the hash value SHA1
* Returns 1 if successful, 0 if value not present or -1 on error * Returns 1 if successful, 0 if value not present or -1 on error
*/ */
#define libewf_get_hash_value_sha1( handle, value, value_size ) \ #define libewf_get_hash_value_sha1( handle, value, value_size ) \
libewf_get_hash_value( handle, "SHA1", value, value_size ) libewf_get_hash_value( handle, "SHA1", value, value_size )
/* Sets the hash value specified by the identifier /* Sets the hash value specified by the identifier
* The strings are encoded in UTF-8 * The strings are encoded in UTF-8
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*
* This function is deprecated use libewf_handle_set_hash_value instead
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_set_hash_value( LIBEWF_EXTERN int libewf_set_hash_value(
libewf_handle_t *handle, libewf_handle_t *handle,
const char *identifier, const char *identifier,
const char *value, const char *value,
size_t value_length ); size_t value_length );
/* Sets the hash value MD5 /* Sets the hash value MD5
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*/ */
#define libewf_set_hash_value_md5( handle, value, value_length ) \ #define libewf_set_hash_value_md5( handle, value, value_length ) \
libewf_set_hash_value( handle, "MD5", value, value_length ) libewf_set_hash_value( handle, "MD5", value, value_length )
/* Sets the hash value SHA1 /* Sets the hash value SHA1
* Returns 1 if successful or -1 on error * Returns 1 if successful or -1 on error
*/ */
#define libewf_set_hash_value_sha1( handle, value, value_length ) \ #define libewf_set_hash_value_sha1( handle, value, value_length ) \
libewf_set_hash_value( handle, "SHA1", value, value_length ) libewf_set_hash_value( handle, "SHA1", value, value_length )
/* Parses the hash values from the xhash section /* Parses the hash values from the xhash section
* Returns 1 if successful, 0 if already parsed or -1 on error * Returns 1 if successful, 0 if already parsed or -1 on error
*
* This function is deprecated and no longer required
*/ */
LIBEWF_DEPRECATED \
LIBEWF_EXTERN int libewf_parse_hash_values( LIBEWF_EXTERN int libewf_parse_hash_values(
libewf_handle_t *handle ); libewf_handle_t *handle );
#endif #endif /* defined( HAVE_V1_API ) */
/* ------------------------------------------------------------------------
-
* Meta data functions (APIv2)
* ------------------------------------------------------------------------
- */
#if 0 || defined( HAVE_V2_API )
/* Retrieves the amount of sectors per chunk from the media information
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_sectors_per_chunk(
libewf_handle_t *handle,
uint32_t *sectors_per_chunk,
libewf_error_t **error );
/* Sets the amount of sectors per chunk in the media information
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_set_sectors_per_chunk(
libewf_handle_t *handle,
uint32_t sectors_per_chunk,
libewf_error_t **error );
/* Retrieves the amount of bytes per sector from the media information
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_bytes_per_sector(
libewf_handle_t *handle,
uint32_t *bytes_per_sector,
libewf_error_t **error );
/* Sets the amount of bytes per sector in the media information
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_set_bytes_per_sector(
libewf_handle_t *handle,
uint32_t bytes_per_sector,
libewf_error_t **error );
/* Retrieves the amount of sectors from the media information
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_amount_of_sectors(
libewf_handle_t *handle,
uint64_t *amount_of_sectors,
libewf_error_t **error );
/* Retrieves the chunk size from the media information
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_chunk_size(
libewf_handle_t *handle,
size32_t *chunk_size,
libewf_error_t **error );
/* Retrieves the error granularity from the media information
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_error_granularity(
libewf_handle_t *handle,
uint32_t *error_granularity,
libewf_error_t **error );
/* Sets the error granularity
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_set_error_granularity(
libewf_handle_t *handle,
uint32_t error_granularity,
libewf_error_t **error );
/* Retrieves the compression values
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_compression_values(
libewf_handle_t *handle,
int8_t *compression_level,
uint8_t *compression_flags,
libewf_error_t **error );
/* Sets the compression values
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_set_compression_values(
libewf_handle_t *handle,
int8_t compression_level,
uint8_t compression_flags,
libewf_error_t **error );
/* Retrieves the size of the contained media data
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_media_size(
libewf_handle_t *handle,
size64_t *media_size,
libewf_error_t **error );
/* Sets the media size
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_set_media_size(
libewf_handle_t *handle,
size64_t media_size,
libewf_error_t **error );
/* Retrieves the media type value
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_media_type(
libewf_handle_t *handle,
uint8_t *media_type,
libewf_error_t **error );
/* Sets the media type
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_set_media_type(
libewf_handle_t *handle,
uint8_t media_type,
libewf_error_t **error );
/* Retrieves the media flags
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_media_flags(
libewf_handle_t *handle,
uint8_t *media_flags,
libewf_error_t **error );
/* Sets the media flags
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_set_media_flags(
libewf_handle_t *handle,
uint8_t media_flags,
libewf_error_t **error );
/* Retrieves the format type value
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_format(
libewf_handle_t *handle,
uint8_t *format,
libewf_error_t **error );
/* Sets the output format
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_set_format(
libewf_handle_t *handle,
uint8_t format,
libewf_error_t **error );
/* Retrieves the GUID
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_guid(
libewf_handle_t *handle,
uint8_t *guid,
size_t size,
libewf_error_t **error );
/* Sets the GUID
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_set_guid(
libewf_handle_t *handle,
uint8_t *guid,
size_t size,
libewf_error_t **error );
/* Retrieves the MD5 hash
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_md5_hash(
libewf_handle_t *handle,
uint8_t *md5_hash,
size_t size,
libewf_error_t **error );
/* Sets the MD5 hash
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_set_md5_hash(
libewf_handle_t *handle,
uint8_t *md5_hash,
size_t size,
libewf_error_t **error );
/* Retrieves the SHA1 hash
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_sha1_hash(
libewf_handle_t *handle,
uint8_t *sha1_hash,
size_t size,
libewf_error_t **error );
/* Sets the SHA1 hash
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_set_sha1_hash(
libewf_handle_t *handle,
uint8_t *sha1_hash,
size_t size,
libewf_error_t **error );
/* Retrieves the amount of chunks written
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_write_amount_of_chunks(
libewf_handle_t *handle,
uint32_t *amount_of_chunks,
libewf_error_t **error );
/* Sets the read wipe chunk on error
* The chunk is not wiped if read raw is used
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_set_read_wipe_chunk_on_error(
libewf_handle_t *handle,
uint8_t wipe_on_error,
libewf_error_t **error );
/* Copies the media values from the source to the destination handle
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_copy_media_values(
libewf_handle_t *destination_handle,
libewf_handle_t *source_handle,
libewf_error_t **error );
/* Retrieves the amount of acquiry errors
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_amount_of_acquiry_errors(
libewf_handle_t *handle,
uint32_t *amount_of_errors,
libewf_error_t **error );
/* Retrieves the information of an acquiry error
* Returns 1 if successful, 0 if no acquiry error could be found or -1 on e
rror
*/
LIBEWF_EXTERN int libewf_handle_get_acquiry_error(
libewf_handle_t *handle,
uint32_t index,
uint64_t *first_sector,
uint64_t *amount_of_sectors,
libewf_error_t **error );
/* Add an acquiry error
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_add_acquiry_error(
libewf_handle_t *handle,
uint64_t first_sector,
uint64_t amount_of_sectors,
libewf_error_t **error );
/* Retrieves the amount of CRC errors
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_amount_of_crc_errors(
libewf_handle_t *handle,
uint32_t *amount_of_errors,
libewf_error_t **error );
/* Retrieves the information of a CRC error
* Returns 1 if successful, 0 if no CRC error could be found or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_crc_error(
libewf_handle_t *handle,
uint32_t index,
uint64_t *first_sector,
uint64_t *amount_of_sectors,
libewf_error_t **error );
/* Add a CRC error
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_add_crc_error(
libewf_handle_t *handle,
uint64_t first_sector,
uint64_t amount_of_sectors,
libewf_error_t **error );
/* Retrieves the amount of sessions
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_amount_of_sessions(
libewf_handle_t *handle,
uint32_t *amount_of_sessions,
libewf_error_t **error );
/* Retrieves the information of a session
* Returns 1 if successful, 0 if no sessions could be found or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_session(
libewf_handle_t *handle,
uint32_t index,
uint64_t *first_sector,
uint64_t *amount_of_sectors,
libewf_error_t **error );
/* Add a session
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_add_session(
libewf_handle_t *handle,
uint64_t first_sector,
uint64_t amount_of_sectors,
libewf_error_t **error );
/* Retrieves the header codepage
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_header_codepage(
libewf_handle_t *handle,
int *header_codepage,
libewf_error_t **error );
/* Sets the header codepage
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_set_header_codepage(
libewf_handle_t *handle,
int header_codepage,
libewf_error_t **error );
/* Retrieves the header values date format
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_header_values_date_format(
libewf_handle_t *handle,
int *date_format,
libewf_error_t **error );
/* Sets the header values date format
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_set_header_values_date_format(
libewf_handle_t *handle,
int date_format,
libewf_error_t **error );
/* Retrieves the amount of header values
* Returns 1 if successful, 0 if no header values are present or -1 on erro
r
*/
LIBEWF_EXTERN int libewf_handle_get_amount_of_header_values(
libewf_handle_t *handle,
uint32_t *amount_of_values,
libewf_error_t **error );
/* Retrieves the header value identifier size specified by its index
* The identifier size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_header_value_identifier_size(
libewf_handle_t *handle,
uint32_t index,
size_t *identifier_size,
libewf_error_t **error );
/* Retrieves the header value identifier specified by its index
* The strings are encoded in UTF-8
* The identifier size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_header_value_identifier(
libewf_handle_t *handle,
uint32_t index,
uint8_t *identifier,
size_t identifier_size,
libewf_error_t **error );
/* Retrieves the header value size specified by the identifier
* The value size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_header_value_size(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
size_t *value_size,
libewf_error_t **error );
/* Retrieves the header value specified by the identifier
* The strings are encoded in UTF-8
* The value size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_header_value(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
uint8_t *value,
size_t value_size,
libewf_error_t **error );
/* Retrieves the header value case number
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_case_number( handle, value, value_si
ze, error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "case_number",
11, value, value_size, error )
/* Retrieves the header value description
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_description( handle, value, value_si
ze, error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "description",
11, value, value_size, error )
/* Retrieves the header value examiner name
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_examiner_name( handle, value, value_
size, error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "examiner_name"
, 13, value, value_size, error )
/* Retrieves the header value evidence number
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_evidence_number( handle, value, valu
e_size, error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "evidence_numbe
r", 15, value, value_size, error )
/* Retrieves the header value notes
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_notes( handle, value, lengt, error )
\
libewf_handle_get_header_value( handle, (uint8_t *) "notes", 5, val
ue, value_size, error )
/* Retrieves the header value acquiry date
* The string is formatted according to the date format
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_acquiry_date( handle, value, value_s
ize, error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "acquiry_date",
12, value, value_size, error )
/* Retrieves the header value system date
* The string is formatted according to the date format
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_system_date( handle, value, value_si
ze, error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "system_date",
11, value, value_size, error )
/* Retrieves the header value acquiry operating system
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_acquiry_operating_system( handle, va
lue, value_size, error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "acquiry_operat
ing_system", 24, value, value_size, error )
/* Retrieves the header value acquiry software version
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_acquiry_software_version( handle, va
lue, value_size, error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "acquiry_softwa
re_version", 24, value, value_size, error )
/* Retrieves the header value password
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_password( handle, value, value_size,
error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "password", 8,
value, value_size, error )
/* Retrieves the header value compression type
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_compression_type( handle, value, val
ue_size, error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "compression_ty
pe", 16, value, value_size, error )
/* Retrieves the header value model
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_model( handle, value, value_size, er
ror ) \
libewf_handle_get_header_value( handle, (uint8_t *) "model", 5, val
ue, value_size, error )
/* Retrieves the header value serial number
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_header_value_serial_number( handle, value, value_
size, error ) \
libewf_handle_get_header_value( handle, (uint8_t *) "serial_number"
, 13, value, value_size, error )
/* Sets the header value specified by the identifier
* The strings are encoded in UTF-8
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_set_header_value(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
const uint8_t *value,
size_t value_length,
libewf_error_t **error );
/* Sets the header value case number
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_case_number( handle, value, value_le
ngth, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "case_number",
11, value, value_length, error )
/* Sets the header value description
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_description( handle, value, value_le
ngth, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "description",
11, value, value_length, error )
/* Sets the header value examiner name
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_examiner_name( handle, value, value_
length, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "examiner_name"
, 13, value, value_length, error )
/* Sets the header value evidence number
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_evidence_number( handle, value, valu
e_length, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "evidence_numbe
r", 15, value, value_length, error )
/* Sets the header value notes
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_notes( handle, value, value_length,
error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "notes", 5, val
ue, value_length, error )
/* Sets the header value acquiry date
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_acquiry_date( handle, value, value_l
ength, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "acquiry_date",
12, value, value_length, error )
/* Sets the header value system date
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_system_date( handle, value, value_le
ngth, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "system_date",
11, value, value_length, error )
/* Sets the header value acquiry operating system
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_acquiry_operating_system( handle, va
lue, value_length, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "acquiry_operat
ing_system", 24, value, value_length, error )
/* Sets the header value acquiry software version
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_acquiry_software_version( handle, va
lue, value_length, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "acquiry_softwa
re_version", 24, value, value_length, error )
/* Sets the header value password
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_password( handle, value, value_lengt
h, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "password", 8,
value, value_length, error )
/* Sets the header value compression type
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_compression_type( handle, value, val
ue_length, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "compression_ty
pe", 16, value, value_length, error )
/* Sets the header value model
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_model( handle, value, value_length,
error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "model", 5, val
ue, value_length, error )
/* Sets the header value serial number
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_header_value_serial_number( handle, value, value_
length, error ) \
libewf_handle_set_header_value( handle, (uint8_t *) "serial_number"
, 13, value, value_length, error )
/* Copies the header values from the source to the destination handle
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_copy_header_values(
libewf_handle_t *destination_handle,
libewf_handle_t *source_handle,
libewf_error_t **error );
/* Retrieves the amount of hash values
* Returns 1 if successful, 0 if no hash values are present or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_amount_of_hash_values(
libewf_handle_t *handle,
uint32_t *amount_of_values,
libewf_error_t **error );
/* Retrieves the hash value identifier size specified by its index
* The identifier size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_hash_value_identifier_size(
libewf_handle_t *handle,
uint32_t index,
size_t *identifier_size,
libewf_error_t **error );
/* Retrieves the hash value identifier specified by its index
* The strings are encoded in UTF-8
* The identifier size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_hash_value_identifier(
libewf_handle_t *handle,
uint32_t index,
uint8_t *identifier,
size_t identifier_size,
libewf_error_t **error );
/* Retrieves the hash value size specified by the identifier
* The value size includes the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_hash_value_size(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
size_t *value_size,
libewf_error_t **error );
/* Retrieves the hash value specified by the identifier
* The strings are encoded in UTF-8
* The value size should include the end of string character
* Returns 1 if successful, 0 if value not present or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_get_hash_value(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
uint8_t *value,
size_t value_size,
libewf_error_t **error );
/* Retrieves the hash value MD5
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_hash_value_md5( handle, value, value_size, error
) \
libewf_handle_get_hash_value( handle, "MD5", 3, value, value_size,
error )
/* Retrieves the hash value SHA1
* Returns 1 if successful, 0 if value not present or -1 on error
*/
#define libewf_handle_get_hash_value_sha1( handle, value, value_size, error
) \
libewf_handle_get_hash_value( handle, "SHA1", 4, value, value_size,
error )
/* Sets the hash value specified by the identifier
* The strings are encoded in UTF-8
* Returns 1 if successful or -1 on error
*/
LIBEWF_EXTERN int libewf_handle_set_hash_value(
libewf_handle_t *handle,
const uint8_t *identifier,
size_t identifier_length,
const uint8_t *value,
size_t value_length,
libewf_error_t **error );
/* Sets the hash value MD5
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_hash_value_md5( handle, value, value_length, erro
r ) \
libewf_handle_set_hash_value( handle, "MD5", 3, value, value_length
, error )
/* Sets the hash value SHA1
* Returns 1 if successful or -1 on error
*/
#define libewf_handle_set_hash_value_sha1( handle, value, value_length, err
or ) \
libewf_handle_set_hash_value( handle, "SHA1", 4, value, value_lengt
h, error )
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif /* !defined( _LIBEWF_H ) */
 End of changes. 322 change blocks. 
1290 lines changed or deleted 2656 lines changed or added


 types.h   types.h 
/* /*
* Type definitions for libewf * Type definitions for libewf
* *
* Copyright (c) 2006-2009, Joachim Metz <forensics@hoffmannbv.nl>, * Copyright (c) 2006-2011, Joachim Metz <jbmetz@users.sourceforge.net>
* Hoffmann Investigations.
* *
* Refer to AUTHORS for acknowledgements. * Refer to AUTHORS for acknowledgements.
* *
* This software is free software: you can redistribute it and/or modify * This software is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by * it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This software is distributed in the hope that it will be useful, * This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
skipping to change at line 28 skipping to change at line 27
* *
* You should have received a copy of the GNU Lesser General Public License * You should have received a copy of the GNU Lesser General Public License
* along with this software. If not, see <http://www.gnu.org/licenses/>. * along with this software. If not, see <http://www.gnu.org/licenses/>.
*/ */
#if !defined( _LIBEWF_TYPES_H ) #if !defined( _LIBEWF_TYPES_H )
#define _LIBEWF_TYPES_H #define _LIBEWF_TYPES_H
#include <libewf/features.h> #include <libewf/features.h>
#if 1 || defined( HAVE_SYS_TYPES_H ) /* Microsoft C/C++ compiler
#include <sys/types.h>
#else
#error Missing system type definitions (sys/types.h)
#endif
/* Type definitions for the Microsoft Visual Studio C++ compiler
*/ */
#if defined( _MSC_VER ) #if defined( _MSC_VER )
/* Define LIBEWF_DEFINITION_INTEGER_TYPES to avoid conflict /* Define _LIBEWF_TYPES_H_INTEGERS to avoid conflict
*/ */
#if !defined( LIBEWF_DEFINITION_INTEGER_TYPES ) #if !defined( _LIBEWF_TYPES_H_INTEGERS )
#define LIBEWF_DEFINITION_INTEGER_TYPES #define _LIBEWF_TYPES_H_INTEGERS
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* The Microsoft Visual Studio C++ compiler does not have <inttypes.h> or < stdint.h> /* The Microsoft Visual Studio C++ compiler does not have <inttypes.h> or < stdint.h>
* therefore it does not support the (u)int#_t type definitions * therefore it does not support the (u)int#_t type definitions
* it has __int# defintions instead * it has __int# defintions instead
*/ */
typedef __int8 int8_t; typedef __int8 int8_t;
skipping to change at line 71 skipping to change at line 63
#if defined( _WIN64 ) #if defined( _WIN64 )
typedef __int64 ssize_t; typedef __int64 ssize_t;
#else #else
typedef __int32 ssize_t; typedef __int32 ssize_t;
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif /* !defined( _LIBEWF_TYPES_H_INTEGERS ) */
/* Borland C/C++ compiler
*/
#elif defined( __BORLANDC__ ) #elif defined( __BORLANDC__ )
#if __BORLANDC__ <= 0x0560
#if __BORLANDC__ >= 0x0560 /* Define _LIBEWF_TYPES_H_INTEGERS to avoid conflict
#include <stdint.h>
#else
/* Define LIBEWF_DEFINITION_INTEGER_TYPES to avoid conflict
*/ */
#if !defined( LIBEWF_DEFINITION_INTEGER_TYPES ) #if !defined( _LIBEWF_TYPES_H_INTEGERS )
#define LIBEWF_DEFINITION_INTEGER_TYPES #define _LIBEWF_TYPES_H_INTEGERS
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* Earlier versions of the Borland/CodeGear C++ Builder compiler /* Earlier versions of the Borland C++ Builder compiler
* do not have the intptr_t * do not have <stdint.h> therefore they do not support
* the (u)int#_t type definitions they have __int# defintions instead
*/ */
typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#if defined( _WIN64 ) #if defined( _WIN64 )
typedef __int64 ssize_t;
typedef unsigned __int64 intptr_t; typedef unsigned __int64 intptr_t;
#else #else
typedef __int32 ssize_t;
typedef unsigned __int32 intptr_t; typedef unsigned __int32 intptr_t;
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* LIBEWF_DEFINITION_INTEGER_TYPES */ #endif /* !defined( _LIBEWF_TYPES_H_INTEGERS ) */
#endif /* __BORLANDC__ >= 0x0560 */ #else
#include <stdint.h>
#endif /* __BORLANDC__ <= 0x0560 */
/* Other compilers
*/
#else
#if 1 || defined( HAVE_SYS_TYPES_H )
#include <sys/types.h>
#else
#error Missing system type definitions (sys/types.h)
#endif
/* Type definitions for compilers that have access to /* Type definitions for compilers that have access to
* <inttypes.h> or <stdint.h> * <inttypes.h> or <stdint.h>
*/ */
#elif 1 || defined( HAVE_INTTYPES_H ) #if 1 || defined( HAVE_INTTYPES_H )
#include <inttypes.h> #include <inttypes.h>
#elif 1 || defined( HAVE_STDINT_H ) #elif 1 || defined( HAVE_STDINT_H )
#include <stdint.h> #include <stdint.h>
#else #else
#error Missing integer type definitions (inttypes.h, stdint.h) #error Missing integer type definitions (inttypes.h, stdint.h)
#endif #endif
#endif /* Compiler specific integer type definitions */
#if defined( LIBEWF_HAVE_WIDE_CHARACTER_TYPE ) #if defined( LIBEWF_HAVE_WIDE_CHARACTER_TYPE )
#if 0 || defined( HAVE_WCHAR_H ) #if defined( _MSC_VER ) || defined( __MINGW32_VERSION )
#include <wchar.h>
#elif defined( __BORLANDC__ )
#if __BORLANDC__ <= 0x0520
#include <string.h>
#else
#include <wchar.h>
#endif /* __BORLANDC__ <= 0x0520 */
#elif 0 || defined( HAVE_WCHAR_H )
/* __USE_UNIX98 is required to add swprintf definition /* __USE_UNIX98 is required to add swprintf definition
*/ */
#if !defined( __USE_UNIX98 ) #if !defined( __USE_UNIX98 )
#define __USE_UNIX98 #define __USE_UNIX98
#define LIBEWF_DEFINITION_UNIX98 #define LIBEWF_DEFINITION_UNIX98
#endif #endif
/* __USE_ISOC99 is required to add wcstoll and wcstuoll definition /* __USE_ISOC99 is required to add wcstoll and wcstuoll definition
*/ */
skipping to change at line 149 skipping to change at line 177
#if defined( LIBEWF_DEFINITION_UNIX98 ) #if defined( LIBEWF_DEFINITION_UNIX98 )
#undef __USE_UNIX98 #undef __USE_UNIX98
#undef LIBEWF_DEFINITION_UNIX98 #undef LIBEWF_DEFINITION_UNIX98
#endif #endif
#if defined( LIBEWF_DEFINITION_ISOC99 ) #if defined( LIBEWF_DEFINITION_ISOC99 )
#undef __USE_ISOC99 #undef __USE_ISOC99
#undef LIBEWF_DEFINITION_ISOC99 #undef LIBEWF_DEFINITION_ISOC99
#endif #endif
#else
#error Missing wide character type definition (wchar.h)
#endif #endif
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#if ! 0 || ! HAVE_SIZE32_T #if ! 0 || ! HAVE_SIZE32_T
typedef uint32_t size32_t; typedef uint32_t size32_t;
skipping to change at line 182 skipping to change at line 208
typedef int64_t ssize64_t; typedef int64_t ssize64_t;
#endif #endif
#if ! 0 || ! HAVE_OFF64_T #if ! 0 || ! HAVE_OFF64_T
typedef int64_t off64_t; typedef int64_t off64_t;
#endif #endif
/* The following type definitions hide internal data structures /* The following type definitions hide internal data structures
*/ */
typedef intptr_t libewf_handle_t; typedef intptr_t libewf_handle_t;
typedef intptr_t libewf_file_entry_t;
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 20 change blocks. 
30 lines changed or deleted 57 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/