src/ewfwriter.c File Reference

#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"

Include dependency graph for ewfwriter.c:

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 Documentation


Function Documentation

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]

static int ewf_compare_address ( RDD_WRITER w,
struct addrinfo *  address,
int *  result 
) [static]

Definition at line 384 of file ewfwriter.c.

References RDD_BADARG, and RDD_OK.

static int ewf_write ( RDD_WRITER w,
const unsigned char *  buf,
unsigned  nbyte 
) [static]

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.

Parameters:
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
Returns:
Returns RDD_OK on success.
Routine 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.

Here is the call graph for this function:


Variable Documentation

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.

Initial value:

Definition at line 64 of file ewfwriter.c.


Generated on Sun Feb 6 12:36:07 2011 for rdd by  doxygen 1.5.6