1libewf(3) BSD Library Functions Manual libewf(3)
2
4 libewf.h — Library to access the Expert Witness Compression Format (EWF)
5 file format
6
8 library “libewf”
9
11 #include <libewf.h>
12
13 Support functions
14
15 const char *
16 libewf_get_version(void);
17
18 int
19 libewf_get_access_flags_read();
20
21 int
22 libewf_get_access_flags_read_write();
23
24 int
25 libewf_get_access_flags_write();
26
27 int
28 libewf_get_access_flags_write_resume();
29
30 int
31 libewf_get_codepage(int *codepage, libewf_error_t **error);
32
33 int
34 libewf_set_codepage(int codepage, libewf_error_t **error);
35
36 int
37 libewf_check_file_signature(const char *filename, libewf_error_t **error);
38
39 int
40 libewf_glob(const char *filename, size_t filename_length, uint8_t format, char **filenames[], int *number_of_filenames, libewf_error_t **error);
41
42 int
43 libewf_glob_free(char *filenames[], int number_of_filenames, libewf_error_t **error);
44
45 Available when compiled with wide character string support:
46
47 int
48 libewf_check_file_signature_wide(const wchar_t *filename, libewf_error_t **error);
49
50 int
51 libewf_glob_wide(const wchar_t *filename, size_t filename_length, uint8_t format, wchar_t **filenames[], int *number_of_filenames, libewf_error_t **error);
52
53 int
54 libewf_glob_wide_free(wchar_t *filenames[], int number_of_filenames, libewf_error_t **error);
55
56 Available when compiled with libbfio support:
57
58 int
59 libewf_check_file_signature_file_io_handle(libbfio_handle_t *file_io_handle, libewf_error_t **error);
60
61 Notify functions
62
63 void
64 libewf_notify_set_verbose(int verbose);
65
66 int
67 libewf_notify_set_stream(FILE *stream, libewf_error_t **error);
68
69 int
70 libewf_notify_stream_open(const char *filename, libewf_error_t **error);
71
72 int
73 libewf_notify_stream_close(libewf_error_t **error);
74
75 Error functions
76
77 void
78 libewf_error_free(libewf_error_t **error);
79
80 int
81 libewf_error_fprint(libewf_error_t *error, FILE *stream);
82
83 int
84 libewf_error_sprint(libewf_error_t *error, char *string, size_t size);
85
86 int
87 libewf_error_backtrace_fprint(libewf_error_t *error, FILE *stream);
88
89 int
90 libewf_error_backtrace_sprint(libewf_error_t *error, char *string, size_t size);
91
92 File/Handle functions
93
94 int
95 libewf_handle_initialize(libewf_handle_t **handle, libewf_error_t **error);
96
97 int
98 libewf_handle_free(libewf_handle_t **handle, libewf_error_t **error);
99
100 int
101 libewf_handle_signal_abort(libewf_handle_t *handle, libewf_error_t **error);
102
103 int
104 libewf_handle_clone(libewf_handle_t **destination_handle, libewf_handle_t *source_handle, libewf_error_t **error);
105
106 int
107 libewf_handle_open(libewf_handle_t *handle, char * const filenames[], int number_of_filenames, int access_flags, libewf_error_t **error);
108
109 int
110 libewf_handle_close(libewf_handle_t *handle, libewf_error_t **error);
111
112 ssize_t
113 libewf_handle_prepare_read_chunk(libewf_handle_t *handle, void *chunk_buffer, size_t chunk_buffer_size, void *uncompressed_chunk_buffer, size_t *uncompressed_chunk_buffer_size, int8_t is_compressed, uint32_t chunk_checksum, int8_t chunk_io_flags, libewf_error_t **error);
114
115 ssize_t
116 libewf_handle_read_chunk(libewf_handle_t *handle, void *chunk_buffer, size_t chunk_buffer_size, int8_t *is_compressed, void *checksum_buffer, uint32_t *chunk_checksum, int8_t *chunk_io_flags, libewf_error_t **error);
117
118 ssize_t
119 libewf_handle_read_buffer(libewf_handle_t *handle, void *buffer, size_t buffer_size, libewf_error_t **error);
120
121 ssize_t
122 libewf_handle_read_random(libewf_handle_t *handle, void *buffer, size_t buffer_size, off64_t offset, libewf_error_t **error);
123
124 ssize_t
125 libewf_handle_prepare_write_chunk(libewf_handle_t *handle, void *chunk_buffer, size_t chunk_buffer_size, void *compressed_chunk_buffer, size_t *compressed_chunk_buffer_size, int8_t *is_compressed, uint32_t *chunk_checksum, int8_t *chunk_io_flags, libewf_error_t **error);
126
127 ssize_t
128 libewf_handle_write_chunk(libewf_handle_t *handle, void *chunk_buffer, size_t chunk_buffer_size, size_t data_size, int8_t is_compressed, const void *checksum_buffer, uint32_t chunk_checksum, int8_t chunk_io_flags, libewf_error_t **error);
129
130 ssize_t
131 libewf_handle_write_buffer(libewf_handle_t *handle, const void *buffer, size_t buffer_size, libewf_error_t **error);
132
133 ssize_t
134 libewf_handle_write_random(libewf_handle_t *handle, const void *buffer, size_t buffer_size, off64_t offset, libewf_error_t **error);
135
136 ssize_t
137 libewf_handle_write_finalize(libewf_handle_t *handle, libewf_error_t **error);
138
139 off64_t
140 libewf_handle_seek_offset(libewf_handle_t *handle, off64_t offset, int whence, libewf_error_t **error);
141
142 off64_t
143 libewf_handle_get_offset(libewf_handle_t *handle, libewf_error_t **error);
144
145 int
146 libewf_handle_set_maximum_number_of_open_handles(libewf_handle_t *handle, int maximum_number_of_open_handles, libewf_error_t **error);
147
148 int
149 libewf_handle_get_segment_filename_size(libewf_handle_t *handle, size_t *filename_size, libewf_error_t **error);
150
151 int
152 libewf_handle_get_segment_filename(libewf_handle_t *handle, char *filename, size_t filename_size, libewf_error_t **error);
153
154 int
155 libewf_handle_set_segment_filename(libewf_handle_t *handle, const char *filename, size_t filename_length, libewf_error_t **error);
156
157 int
158 libewf_handle_set_maximum_segment_size(libewf_handle_t *handle, size64_t *maximum_segment_size, libewf_error_t **error);
159
160 int
161 libewf_handle_set_maximum_segment_size(libewf_handle_t *handle, size64_t maximum_segment_size, libewf_error_t **error);
162
163 int
164 libewf_handle_get_delta_segment_filename_size(libewf_handle_t *handle, size_t *filename_size, libewf_error_t **error);
165
166 int
167 libewf_handle_get_delta_segment_filename(libewf_handle_t *handle, char *filename, size_t filename_size, libewf_error_t **error);
168
169 int
170 libewf_handle_set_delta_segment_filename(libewf_handle_t *handle, const char *filename, size_t filename_length, libewf_error_t **error);
171
172 int
173 libewf_handle_get_maximum_delta_segment_size(libewf_handle_t *handle, size64_t *maximum_delta_segment_size, libewf_error_t **error);
174
175 int
176 libewf_handle_set_maximum_delta_segment_size(libewf_handle_t *handle, size64_t maximum_delta_segment_size, libewf_error_t **error);
177
178 int
179 libewf_handle_segment_files_corrupted(libewf_handle_t *handle, libewf_error_t **error);
180
181 int
182 libewf_handle_segment_files_encrypted(libewf_handle_t *handle, libewf_error_t **error);
183
184 int
185 libewf_handle_get_filename_size(libewf_handle_t *handle, size_t *filename_size, libewf_error_t **error);
186
187 int
188 libewf_handle_get_filename(libewf_handle_t *handle, char *filename, size_t filename_size, libewf_error_t **error);
189
190 Available when compiled with wide character string support:
191
192 int
193 libewf_handle_open_wide(libewf_handle_t *handle, wchar_t * const filenames[], int number_of_filenames, int access_flags, libewf_error_t **error);
194
195 int
196 libewf_handle_get_segment_filename_size_wide(libewf_handle_t *handle, size_t *filename_size, libewf_error_t **error);
197
198 int
199 libewf_handle_get_segment_filename_wide(libewf_handle_t *handle, wchar_t *filename, size_t filename_size, libewf_error_t **error);
200
201 int
202 libewf_handle_set_segment_filename_wide(libewf_handle_t *handle, const wchar_t *filename, size_t filename_length, libewf_error_t **error);
203
204 int
205 libewf_handle_get_delta_segment_filename_size_wide(libewf_handle_t *handle, size_t *filename_size, libewf_error_t **error);
206
207 int
208 libewf_handle_get_delta_segment_filename_wide(libewf_handle_t *handle, wchar_t *filename, size_t filename_size, libewf_error_t **error);
209
210 int
211 libewf_handle_set_delta_segment_filename_wide(libewf_handle_t *handle, const wchar_t *filename, size_t filename_length, libewf_error_t **error);
212
213 int
214 libewf_handle_get_filename_size_wide(libewf_handle_t *handle, size_t *filename_size, libewf_error_t **error);
215
216 int
217 libewf_handle_get_filename_wide(libewf_handle_t *handle, wchar_t *filename, size_t filename_size, libewf_error_t **error);
218
219 Available when compiled with libbfio support:
220
221 int
222 libewf_handle_open_file_io_pool(libewf_handle_t *handle, libbfio_pool_t *file_io_pool, int access_flags, libewf_error_t **error);
223
224 int
225 libewf_handle_get_file_io_handle(libewf_handle_t *handle, libbfio_handle_t **file_io_handle, libewf_error_t **error);
226
227 Meta data functions
228
229 int
230 libewf_handle_get_sectors_per_chunk(libewf_handle_t *handle, uint32_t *sectors_per_chunk, libewf_error_t **error);
231
232 int
233 libewf_handle_set_sectors_per_chunk(libewf_handle_t *handle, uint32_t sectors_per_chunk, libewf_error_t **error);
234
235 int
236 libewf_handle_get_bytes_per_sector(libewf_handle_t *handle, uint32_t *bytes_per_sector, libewf_error_t **error);
237
238 int
239 libewf_handle_set_bytes_per_sector(libewf_handle_t *handle, uint32_t bytes_per_sector, libewf_error_t **error);
240
241 int
242 libewf_handle_get_number_of_sectors(libewf_handle_t *handle, uint64_t *number_of_sectors, libewf_error_t **error);
243
244 int
245 libewf_handle_get_chunk_size(libewf_handle_t *handle, size32_t *chunk_size, libewf_error_t **error, libewf_error_t **error);
246
247 int
248 libewf_handle_get_error_granularity(libewf_handle_t *handle, uint32_t *error_granularity, libewf_error_t **error);
249
250 int
251 libewf_handle_set_error_granularity(libewf_handle_t *handle, uint32_t error_granularity, libewf_error_t **error);
252
253 int
254 libewf_handle_get_compression_method(libewf_handle_t *handle, uint16_t *compression_method, libewf_error_t **error);
255
256 int
257 libewf_handle_set_compression_method(libewf_handle_t *handle, uint16_t compression_method, libewf_error_t **error);
258
259 int
260 libewf_handle_get_compression_values(libewf_handle_t *handle, int8_t *compression_level, uint8_t *compression_flags, libewf_error_t **error);
261
262 int
263 libewf_handle_set_compression_values(libewf_handle_t *handle, int8_t compression_level, uint8_t compression_flags, libewf_error_t **error);
264
265 int
266 libewf_handle_get_media_size(libewf_handle_t *handle, size64_t *media_size, libewf_error_t **error);
267
268 int
269 libewf_handle_set_media_size(libewf_handle_t *handle, size64_t media_size, libewf_error_t **error);
270
271 int
272 libewf_handle_get_media_type(libewf_handle_t *handle, uint8_t *media_type, libewf_error_t **error);
273
274 int
275 libewf_handle_set_media_type(libewf_handle_t *handle, uint8_t media_type, libewf_error_t **error);
276
277 int
278 libewf_handle_get_media_flags(libewf_handle_t *handle, uint8_t *media_flags, libewf_error_t **error);
279
280 int
281 libewf_handle_set_media_flags(libewf_handle_t *handle, uint8_t media_flags, libewf_error_t **error);
282
283 int
284 libewf_handle_get_format(libewf_handle_t *handle, uint8_t* format, libewf_error_t **error);
285
286 int
287 libewf_handle_set_format(libewf_handle_t *handle, uint8_t format, libewf_error_t **error);
288
289 int
290 libewf_handle_get_segment_file_version(libewf_handle_t *handle, uint8_t *major_version, uint8_t *minor_version, libewf_error_t **error);
291
292 int
293 libewf_handle_get_segment_file_set_identifier(libewf_handle_t *handle, uint8_t *set_identifier, size_t size, libewf_error_t **error);
294
295 int
296 libewf_handle_set_segment_file_set_identifier(libewf_handle_t *handle, uint8_t *set_identifier, size_t size, libewf_error_t **error);
297
298 int
299 libewf_handle_get_md5_hash(libewf_handle_t *handle, uint8_t *md5_hash, size_t size, libewf_error_t **error);
300
301 int
302 libewf_handle_set_md5_hash(libewf_handle_t *handle, const uint8_t *md5_hash, size_t size, libewf_error_t **error);
303
304 int
305 libewf_handle_get_sha1_hash(libewf_handle_t *handle, uint8_t *sha1_hash, size_t size, libewf_error_t **error);
306
307 int
308 libewf_handle_set_sha1_hash(libewf_handle_t *handle, const uint8_t *sha1_hash, size_t size, libewf_error_t **error);
309
310 int
311 libewf_handle_set_read_zero_chunk_on_error(libewf_handle_t *handle, uint8_t zero_on_error, libewf_error_t **error);
312
313 int
314 libewf_handle_copy_media_values(libewf_handle_t *destination_handle, libewf_handle_t *source_handle, libewf_error_t **error);
315
316 int
317 libewf_handle_get_number_of_acquiry_errors(libewf_handle_t *handle, uint32_t *number_of_errors, libewf_error_t **error);
318
319 int
320 libewf_handle_get_acquiry_error(libewf_handle_t *handle, uint32_t index, uint64_t *start_sector, uint64_t *number_of_sectors, libewf_error_t **error);
321
322 int
323 libewf_handle_append_acquiry_error(libewf_handle_t *handle, uint64_t start_sector, uint64_t number_of_sectors, libewf_error_t **error);
324
325 int
326 libewf_handle_get_number_of_checksum_errors(libewf_handle_t *handle, uint32_t *number_of_errors, libewf_error_t **error);
327
328 int
329 libewf_handle_get_checksum_error(libewf_handle_t *handle, uint32_t index, uint64_t *start_sector, uint64_t *number_of_sectors, libewf_error_t **error);
330
331 int
332 libewf_handle_append_checksum_error(libewf_handle_t *handle, uint64_t start_sector, uint64_t number_of_sectors, libewf_error_t **error);
333
334 int
335 libewf_handle_get_number_of_sessions(libewf_handle_t *handle, uint32_t *number_of_sessions, libewf_error_t **error);
336
337 int
338 libewf_handle_get_session(libewf_handle_t *handle, uint32_t index, uint64_t *start_sector, uint64_t *number_of_sectors, libewf_error_t **error);
339
340 int
341 libewf_handle_append_session(libewf_handle_t *handle, uint64_t start_sector, uint64_t number_of_sectors, libewf_error_t **error);
342
343 int
344 libewf_handle_get_number_of_tracks(libewf_handle_t *handle, uint32_t *number_of_tracks, libewf_error_t **error);
345
346 int
347 libewf_handle_get_track(libewf_handle_t *handle, uint32_t index, uint64_t *start_sector, uint64_t *number_of_sectors, libewf_error_t **error);
348
349 int
350 libewf_handle_append_track(libewf_handle_t *handle, uint64_t start_sector, uint64_t number_of_sectors, libewf_error_t **error);
351
352 int
353 libewf_handle_get_header_codepage(libewf_handle_t *handle, int *codepage, libewf_error_t **error);
354
355 int
356 libewf_handle_set_header_codepage(libewf_handle_t *handle, int codepage, libewf_error_t **error);
357
358 int
359 libewf_handle_get_header_values_data_format(libewf_handle_t *handle, int date_format, libewf_error_t **error);
360
361 int
362 libewf_handle_set_header_values_data_format(libewf_handle_t *handle, int date_format, libewf_error_t **error);
363
364 int
365 libewf_handle_get_number_of_header_values(libewf_handle_t *handle, uint32_t *number_of_values, libewf_error_t **error);
366
367 int
368 libewf_handle_get_header_value_identifier_size(libewf_handle_t *handle, uint32_t index, size_t *identifier_size, libewf_error_t **error);
369
370 int
371 libewf_handle_get_header_value_identifier(libewf_handle_t *handle, uint32_t index, uint8_t *identifier, size_t identifier_size, libewf_error_t **error);
372
373 int
374 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);
375
376 int
377 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);
378
379 int
380 libewf_handle_get_utf8_header_value_case_number(libewf_handle_t *handle, uint8_t *value, size_t value_size, libewf_error_t **error);
381
382 int
383 libewf_handle_get_utf8_header_value_description(libewf_handle_t *handle, uint8_t *value, size_t value_size, libewf_error_t **error);
384
385 int
386 libewf_handle_get_utf8_header_value_examiner_name(libewf_handle_t *handle, uint8_t *value, size_t value_size, libewf_error_t **error);
387
388 int
389 libewf_handle_get_utf8_header_value_evidence_number(libewf_handle_t *handle, uint8_t *value, size_t value_size, libewf_error_t **error);
390
391 int
392 libewf_handle_get_utf8_header_value_notes(libewf_handle_t *handle, uint8_t *value, size_t value_size, libewf_error_t **error);
393
394 int
395 libewf_handle_get_utf8_header_value_acquiry_date(libewf_handle_t *handle, uint8_t *value, size_t value_size, libewf_error_t **error);
396
397 int
398 libewf_handle_get_utf8_header_value_system_date(libewf_handle_t *handle, uint8_t *value, size_t value_size, libewf_error_t **error);
399
400 int
401 libewf_handle_get_utf8_header_value_acquiry_operating_system(libewf_handle_t *handle, uint8_t *value, size_t value_size, libewf_error_t **error);
402
403 int
404 libewf_handle_get_utf8_header_value_acquiry_software_version(libewf_handle_t *handle, uint8_t *value, size_t value_size, libewf_error_t **error);
405
406 int
407 libewf_handle_get_utf8_header_value_password(libewf_handle_t *handle, uint8_t *value, size_t value_size, libewf_error_t **error);
408
409 int
410 libewf_handle_get_utf8_header_value_compression_level(libewf_handle_t *handle, uint8_t *value, size_t value_size, libewf_error_t **error);
411
412 int
413 libewf_handle_set_utf8_header_value(libewf_handle_t *handle, const uint8_t *identifier, const uint8_t *utf8_string, size_t utf8_string_length);
414
415 int
416 libewf_handle_set_utf8_header_value_case_number(libewf_handle_t *handle, const uint8_t *value, size_t value_length, libewf_error_t **error);
417
418 int
419 libewf_handle_set_utf8_header_value_description(libewf_handle_t *handle, const uint8_t *value, size_t value_length, libewf_error_t **error);
420
421 int
422 libewf_handle_set_utf8_header_value_examiner_name(libewf_handle_t *handle, const uint8_t *value, size_t value_length, libewf_error_t **error);
423
424 int
425 libewf_handle_set_utf8_header_value_evidence_number(libewf_handle_t *handle, const uint8_t *value, size_t value_length, libewf_error_t **error);
426
427 int
428 libewf_handle_set_utf8_header_value_notes(libewf_handle_t *handle, const uint8_t *value, size_t value_length, libewf_error_t **error);
429
430 int
431 libewf_handle_set_utf8_header_value_acquiry_date(libewf_handle_t *handle, const uint8_t *value, size_t value_length, libewf_error_t **error);
432
433 int
434 libewf_handle_set_utf8_header_value_system_date(libewf_handle_t *handle, const uint8_t *value, size_t value_length, libewf_error_t **error);
435
436 int
437 libewf_handle_set_utf8_header_value_acquiry_operating_system(libewf_handle_t *handle, const uint8_t *value, size_t value_length, libewf_error_t **error);
438
439 int
440 libewf_handle_set_utf8_header_value_acquiry_software_version(libewf_handle_t *handle, const uint8_t *value, size_t value_length, libewf_error_t **error);
441
442 int
443 libewf_handle_set_utf8_header_value_password(libewf_handle_t *handle, const uint8_t *value, size_t value_length, libewf_error_t **error);
444
445 int
446 libewf_handle_set_utf8_header_value_compression_level(libewf_handle_t *handle, const uint8_t *value, size_t value_length, libewf_error_t **error);
447
448 int
449 libewf_handle_set_utf8_header_value_model(libewf_handle_t *handle, const uint8_t *value, size_t value_length, libewf_error_t **error);
450
451 int
452 libewf_handle_set_utf8_header_value_serial_number(libewf_handle_t *handle, const uint8_t *value, size_t value_length, libewf_error_t **error);
453
454 int
455 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);
456
457 int
458 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);
459
460 int
461 libewf_handle_set_utf16_header_value(libewf_handle_t *handle, const uint8_t *identifier, const uint16_t *utf16_string, size_t utf16_string_length);
462
463 int
464 libewf_handle_copy_header_values(libewf_handle_t *destination_handle, libewf_handle_t *source_handle, libewf_error_t **error);
465
466 int
467 libewf_handle_get_number_of_hash_values(libewf_handle_t *handle, uint32_t *number_of_values, libewf_error_t **error);
468
469 int
470 libewf_handle_get_hash_value_identifier_size(libewf_handle_t *handle, uint32_t index, size_t *identifier_size, libewf_error_t **error);
471
472 int
473 libewf_handle_get_hash_value_identifier(libewf_handle_t *handle, uint32_t index, uint8_t *identifier, size_t identifier_size, libewf_error_t **error);
474
475 int
476 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);
477
478 int
479 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);
480
481 int
482 libewf_handle_get_utf8_hash_value_md5(libewf_handle_t *handle, uint8_t *value, size_t value_size, libewf_error_t **error);
483
484 int
485 libewf_handle_get_utf8_hash_value_sha1(libewf_handle_t *handle, uint8_t *value, size_t value_size, libewf_error_t **error);
486
487 int
488 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);
489
490 int
491 libewf_handle_set_utf8_hash_value_md5(libewf_handle_t *handle, const uint8_t *value, size_t value_length, libewf_error_t **error);
492
493 int
494 libewf_handle_set_utf8_hash_value_sha1(libewf_handle_t *handle, const uint8_t *value, size_t value_length, libewf_error_t **error);
495
496 int
497 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);
498
499 int
500 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);
501
502 int
503 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);
504
505 int libewf_handle_get_root_file_entry libewf_handle_t *handle,
506 libewf_file_entry_t **root_file_entry, libewf_error_t **error
507
508 int libewf_file_get_file_entry_by_utf8_path libewf_handle_t *handle,
509 const uint8_t *utf8_string, size_t utf8_string_length,
510 libewf_file_entry_t **file_entry, libewf_error_t **error
511
512 int libewf_file_get_file_entry_by_utf16_path libewf_handle_t *handle,
513 const uint16_t *utf16_string, size_t utf16_string_length,
514 libewf_file_entry_t **file_entry, libewf_error_t **error
515
516 Single file entry functions
517
518 int
519 libewf_file_entry_free(libewf_file_entry_t **file_entry, libewf_error_t **error);
520
521 int
522 libewf_file_entry_get_type(libewf_file_entry_t *file_entry, uint8_t *type, libewf_error_t **error);
523
524 int
525 libewf_file_entry_get_flags(libewf_file_entry_t *file_entry, uint32_t *flags, libewf_error_t **error);
526
527 int();
528
529 libewf_file_entry_get_media_data_offset libewf_file_entry_t *file_entry,
530 off64_t *media_data_offset, libewf_error_t **error
531 int();
532
533 libewf_file_entry_get_media_data_size libewf_file_entry_t *file_entry,
534 size64_t *media_data_size, libewf_error_t **error
535 int();
536
537 libewf_file_entry_get_duplicate_media_data_offset libewf_file_entry_t
538 *file_entry, off64_t *duplicate_media_data_offset, libewf_error_t **error
539
540 int
541 libewf_file_entry_get_utf8_name_size(libewf_file_entry_t *file_entry, size_t *utf8_string_size, libewf_error_t **error);
542
543 int
544 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);
545
546 int
547 libewf_file_entry_get_utf16_name_size(libewf_file_entry_t *file_entry, size_t *utf16_string_size, libewf_error_t **error);
548
549 int
550 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);
551
552 int
553 libewf_file_entry_get_size(libewf_file_entry_t *file_entry, size64_t *size, libewf_error_t **error);
554
555 int
556 libewf_file_entry_get_creation_time(libewf_file_entry_t *file_entry, uint32_t *creation_time, libewf_error_t **error);
557
558 int
559 libewf_file_entry_get_modification_time(libewf_file_entry_t *file_entry, uint32_t *modification_time, libewf_error_t **error);
560
561 int
562 libewf_file_entry_get_access_time(libewf_file_entry_t *file_entry, uint32_t *access_time, libewf_error_t **error);
563
564 int
565 libewf_file_entry_get_entry_modification_time(libewf_file_entry_t *file_entry, uint32_t *entry_modification_time, libewf_error_t **error);
566
567 int
568 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);
569
570 int
571 libewf_file_entry_get_utf16_hash_value_md5(libewf_file_entry_t *file_entry, uint8_t *utf16_string, size_t utf16_string_size, libewf_error_t **error);
572
573 int
574 libewf_file_entry_get_utf8_hash_value_sha1(libewf_file_entry_t *file_entry, uint8_t *utf8_string, size_t utf8_string_size, libewf_error_t **error);
575
576 int
577 libewf_file_entry_get_utf16_hash_value_sha1(libewf_file_entry_t *file_entry, uint8_t *utf16_string, size_t utf16_string_size, libewf_error_t **error);
578
579 ssize_t
580 libewf_file_entry_read_buffer(libewf_file_entry_t *file_entry, void *buffer, size_t buffer_size, libewf_error_t **error);
581
582 ssize_t
583 libewf_file_entry_read_random(libewf_file_entry_t *file_entry, void *buffer, size_t buffer_size, off64_t offset, libewf_error_t **error);
584
585 off64_t
586 libewf_file_entry_seek_offset(libewf_file_entry_t *file_entry, off64_t offset, int whence, libewf_error_t **error);
587
588 int
589 libewf_file_entry_get_offset(libewf_file_entry_t *file_entry, off64_t *offset, libewf_error_t **error);
590
591 int
592 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);
593
594 int
595 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);
596
597 int
598 libewf_file_entry_get_sub_file_entry_by_utf8_name(libewf_file_entry_t *file_entry, const uint8_t *utf8_string, size_t utf8_string_length, libewf_file_entry_t **sub_file_entry, libewf_error_t **error);
599
600 int
601 libewf_file_entry_get_sub_file_entry_by_utf8_path(libewf_file_entry_t *file_entry, const uint8_t *utf8_string, size_t utf8_string_length, libewf_file_entry_t **sub_file_entry, libewf_error_t **error);
602
603 int
604 libewf_file_entry_get_sub_file_entry_by_utf16_name(libewf_file_entry_t *file_entry, const uint16_t *utf16_string, size_t utf16_string_length, libewf_file_entry_t **sub_file_entry, libewf_error_t **error);
605
606 int
607 libewf_file_entry_get_sub_file_entry_by_utf16_path(libewf_file_entry_t *file_entry, const uint16_t *utf16_string, size_t utf16_string_length, libewf_file_entry_t **sub_file_entry, libewf_error_t **error);
608
610 The libewf_get_version() function is used to retrieve the library ver‐
611 sion.
612
613 The libewf_get_flags_*() functions are used to get the values of the
614 flags for read and/or write.
615
616 The libewf_check_file_signature() and libewf_check_file_signature_wide()
617 functions are used to test if the EWF file signature is present within a
618 certain filename.
619
620 The libewf_glob() and libewf_glob_wide() functions glob filenames using
621 the filename and the format according to the EWF segment file naming
622 schema. If the format is known the filename should contain the base of
623 the filename otherwise the function will try to determine the format
624 based on the extension.
625
626 The libewf_handle_signal_abort() function signals the handle to aborts it
627 current activity.
628
629 The libewf_handle_open(), libewf_handle_open_wide(),
630 libewf_handle_close(), libewf_handle_read_buffer(),
631 libewf_handle_read_random(), libewf_handle_write_buffer(),
632 libewf_handle_write_random(), libewf_handle_seek_offset() functions can
633 be used to open, seek in, read from, write to and close a set of EWF
634 files.
635
636 The libewf_handle_write_finalize() function needs to be called after
637 writing a set of EWF files without knowing the input size upfront, e.g.
638 reading from a pipe. libewf_handle_write_finalize() will the necessary
639 correction to the set of EWF files.
640
641 The libewf_handle_prepare_read_chunk(), libewf_handle_read_chunk() func‐
642 tions can be used to read chunks to a set of EWF files.
643
644 The libewf_handle_prepare_write_chunk(), libewf_handle_write_chunk()
645 functions can be used to write chunks to a set of EWF files.
646
647 The libewf_handle_get_*() functions can be used to retrieve information
648 from the handle. This information is read from a set of EWF files when
649 libewf_handle_open() or libewf_handle_open_wide() is used.
650
651 The libewf_handle_set_*() functions can be used to set information in the
652 handle. This information is written to a set of EWF files when
653 libewf_handle_write_buffer() is used.
654
655 The libewf_handle_append_acquiry_error() function can be used to append
656 an acquiry error (a read error during acquiry) to be written into a set
657 of EWF files.
658
659 The libewf_handle_append_checksum_error() function can be used to append
660 an Adler-32 checksum error (a validation error in a chunk in a set of EWF
661 files) to be set in the handle.
662
663 The libewf_handle_append_session() function can be used to append a sess‐
664 sion to be written into a set of EWF files. Note that the only the start
665 offset is stored in a set of EWF files. Libewf ignores the number of sec‐
666 tors on write and determines the session sizes using the available ses‐
667 sion and media information on read.
668
669 The libewf_handle_copy_*() functions copy information from the
670 source_handle to the destination_handle.
671
672 The libewf_notify_set_verbose(), libewf_notify_set_stream() functions can
673 be used to direct the warning, verbose and debug output from the library.
674
676 Most of the functions return NULL or -1 on error, dependent on the return
677 type. For the actual return values refer to libewf.h
678
679 To determine the cause of an error pass a reference to libewf_error_t
680 *error = NULL. libewf will create an error object that must be freed with
681 the libewf_error_free function. If the error reference is NULL libewf
682 will not create an error object.
683
685 None
686
688 None
689
691 libewf supports both UTF-8 and UTF-16 encoded strings except for file‐
692 names. Some platforms like WINAPI require wide character support for
693 Unicode filenames. To compile libewf with wide character support use
694 ./configure --enable-wide-character-type=yes or pass the definition
695 _UNICODE
696 or UNICODE
697 to the compiler (i.e. in case of Microsoft Visual Studio (MSVS) C++).
698
699 To have other code to determine if libewf was compiled with wide charac‐
700 ter support it defines LIBEWF_HAVE_WIDE_CHARACTER_TYPE
701 in libewf/features.h.
702
703 The header in a set of EWF files contains an extended ASCII string using
704 the codepage of the system it was created on. The function
705 libewf_handle_set_header_codepage
706 allows to set the required codepage for reading and writing. The default
707 codepage is ASCII and replaces all extended characters to the Unicode
708 replacement character (U+fffd) when reading and the ASCII substitude
709 character (0x1a) when writing.
710
711 The header2 contains UTF-16 little endian stream and the xheader and
712 xhash contain a UTF-8 stream without or with byte order mark (as of ver‐
713 sion 20080903).
714
715 libewf allows to be compiled with chained IO support using libbfio.
716 libewf will automatically detect if a compatible version of libbfio is
717 available.
718
719 To have other code to determine if libewf was compiled with libbfio sup‐
720 port it defines LIBEWF_HAVE_BFIO
721 in libewf/features.h.
722
723
725 Please report bugs of any kind to <joachim.metz@gmail.com> or on the
726 project website: http://code.google.com/p/libewf/
727
729 These man pages were written by Joachim Metz.
730
732 Copyright 2006-2014, Joachim Metz <joachim.metz@gmail.com>. This is free
733 software; see the source for copying conditions. There is NO warranty;
734 not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
735
737 the libewf.h include file
738
739libewf January 19, 2014 libewf