#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include "rdd.h"
#include "writer.h"
#include "libewf.h"
Go to the source code of this file.
Data Structures | |
struct | _RDD_EWF_WRITER |
Typedefs | |
typedef struct _RDD_EWF_WRITER | RDD_EWF_WRITER |
Functions | |
static int | compress_empty_block (int compression_type) |
static int | compress_level (int compression_type) |
static int | ewf_close (RDD_WRITER *w) |
static int | ewf_compare_address (RDD_WRITER *w, struct addrinfo *address, int *result) |
static int | ewf_write (RDD_WRITER *w, const unsigned char *buf, unsigned nbyte) |
static int | path_exists (const char *path, struct stat *info) |
int | rdd_open_ewf_writer (RDD_WRITER **self, const char *path, rdd_count_t splitlen, int compression_type, rdd_write_mode_t wmode, RDD_HASH_CONTAINER *hashcontainer) |
Creates a writer that writes ewf files. | |
Variables | |
static char | copyright [] |
static RDD_WRITE_OPS | ewf_write_ops |
typedef struct _RDD_EWF_WRITER RDD_EWF_WRITER |
static int compress_empty_block | ( | int | compression_type | ) | [static] |
Definition at line 98 of file ewfwriter.c.
static int compress_level | ( | int | compression_type | ) | [static] |
Definition at line 88 of file ewfwriter.c.
static int ewf_close | ( | RDD_WRITER * | w | ) | [static] |
Definition at line 298 of file ewfwriter.c.
References _RDD_EWF_WRITER::ewf_handle, _RDD_EWF_WRITER::hashcontainer, _RDD_EWF_WRITER::path, RDD_BADARG, RDD_ECLOSE, rdd_get_hash(), rdd_hash_present(), RDD_MAX_DIGEST_LENGTH, RDD_MD5, RDD_OK, RDD_SHA1, and _RDD_EWF_WRITER::write_called.
static int ewf_compare_address | ( | RDD_WRITER * | w, | |
struct addrinfo * | address, | |||
int * | result | |||
) | [static] |
static int ewf_write | ( | RDD_WRITER * | w, | |
const unsigned char * | buf, | |||
unsigned | nbyte | |||
) | [static] |
Definition at line 278 of file ewfwriter.c.
References _RDD_EWF_WRITER::ewf_handle, RDD_EWRITE, RDD_OK, _RDD_WRITER::state, and _RDD_EWF_WRITER::write_called.
static int path_exists | ( | const char * | path, | |
struct stat * | info | |||
) | [static] |
Definition at line 82 of file ewfwriter.c.
int rdd_open_ewf_writer | ( | RDD_WRITER ** | w, | |
const char * | path, | |||
rdd_count_t | splitlen, | |||
int | compression_type, | |||
rdd_write_mode_t | overwrite, | |||
RDD_HASH_CONTAINER * | hashcontainer | |||
) |
Creates a writer that writes ewf files.
w | a pointer to the writer object. | |
path | the name of the file that the new writer will write to | |
splitlen | maximum size in bytes of each output file | |
overwrite | indicates what to do when path exists | |
hashes | space to pass the hashes to the writer |
RDD_OK
on success.rdd_open_ewf_writer()
exports the copied data into encase6
format. Currently the only encase option which can be set on the rdd command line is the segment size (splitlen
).
Definition at line 110 of file ewfwriter.c.
References compress_empty_block(), compress_level(), error(), _RDD_EWF_WRITER::ewf_handle, _RDD_EWF_WRITER::hashcontainer, _RDD_EWF_WRITER::path, path_exists(), RDD_BADARG, RDD_EEXISTS, RDD_EOPEN, RDD_EWF_MIN_SPLITLEN, rdd_new_writer(), RDD_NO_OVERWRITE, RDD_NOMEM, RDD_OK, _RDD_WRITER::state, and _RDD_EWF_WRITER::write_called.
char copyright[] [static] |
Initial value:
"@(#) Copyright (c) 2002-2004\n\ Netherlands Forensic Institute. All rights reserved.\n"
Definition at line 34 of file ewfwriter.c.
RDD_WRITE_OPS ewf_write_ops [static] |
Initial value:
Definition at line 64 of file ewfwriter.c.