src/alignedreader.c File Reference

#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <errno.h>
#include <unistd.h>
#include "rdd.h"
#include "rdd_internals.h"
#include "alignedbuf.h"
#include "reader.h"

Include dependency graph for alignedreader.c:

Go to the source code of this file.

Data Structures

struct  _RDD_ALIGNED_READER

Defines

#define MOD_ALIGN(r, n)   ((n) % ((r)->align))

Typedefs

typedef struct _RDD_ALIGNED_READER RDD_ALIGNED_READER

Functions

static int rdd_aligned_close (RDD_READER *r, int recurse)
static int rdd_aligned_read (RDD_READER *r, unsigned char *buf, unsigned nbyte, unsigned *nread)
static int rdd_aligned_seek (RDD_READER *r, rdd_count_t pos)
static int rdd_aligned_tell (RDD_READER *r, rdd_count_t *pos)
int rdd_open_aligned_reader (RDD_READER **self, RDD_READER *parent, unsigned align)
 Instantiates a reader that reads from a reader that expects aligned accesses and aligned user buffers.

Variables

static RDD_READ_OPS aligned_read_ops
static char copyright []


Define Documentation

#define MOD_ALIGN ( r,
 )     ((n) % ((r)->align))

Definition at line 55 of file alignedreader.c.


Typedef Documentation


Function Documentation

static int rdd_aligned_close ( RDD_READER r,
int  recurse 
) [static]

Definition at line 239 of file alignedreader.c.

References _RDD_ALIGNED_READER::parent, RDD_OK, and rdd_reader_close().

Here is the call graph for this function:

static int rdd_aligned_read ( RDD_READER r,
unsigned char *  buf,
unsigned  nbyte,
unsigned *  nread 
) [static]

static int rdd_aligned_seek ( RDD_READER r,
rdd_count_t  pos 
) [static]

Definition at line 231 of file alignedreader.c.

References _RDD_ALIGNED_READER::parent, and rdd_reader_seek().

Here is the call graph for this function:

static int rdd_aligned_tell ( RDD_READER r,
rdd_count_t pos 
) [static]

Definition at line 223 of file alignedreader.c.

References _RDD_ALIGNED_READER::parent, and rdd_reader_tell().

Here is the call graph for this function:

int rdd_open_aligned_reader ( RDD_READER **  r,
RDD_READER parent,
unsigned  align 
)

Instantiates a reader that reads from a reader that expects aligned accesses and aligned user buffers.

Parameters:
r output value: a new reader object.
parent output value: the parent reader.
align alignment in bytes.
Returns:
Returns RDD_OK on success.
A file descriptor reader is a simple reader that simply reads bytes from a file descriptor.

Definition at line 79 of file alignedreader.c.

References _RDD_ALIGNED_READER::align, _RDD_ALIGNED_READER::parent, rdd_new_reader(), RDD_OK, and _RDD_READER::state.

Here is the call graph for this function:


Variable Documentation

Initial value:

Definition at line 71 of file alignedreader.c.

char copyright[] [static]

Initial value:

"@(#) Copyright (c) 2002-2004\n\
    Netherlands Forensic Institute.  All rights reserved.\n"

Definition at line 34 of file alignedreader.c.


Generated on Sun Feb 6 12:35:59 2011 for rdd by  doxygen 1.5.6