src/rdd_internals.c File Reference

#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
#include <time.h>
#include <signal.h>
#include "rdd.h"
#include "rdd_internals.h"
#include "error.h"

Include dependency graph for rdd_internals.c:

Go to the source code of this file.

Defines

#define bitcount(t)   (sizeof(t) * CHAR_BIT)
#define MAX_SIZE_BUF_LEN   64
#define TIME_BUF_SIZE   64
#define TIME_FORMAT   "%Y-%m-%d %H:%M:%S %Z"

Functions

static void check_type_sizes (void)
int rdd_buf2hex (const unsigned char *buf, unsigned bufsize, char *hexbuf, unsigned hexbuflen)
void rdd_catch_signals (void)
char * rdd_ctime (void)
int rdd_device_size (const char *path, rdd_count_t *size)
void rdd_free (void *p)
double rdd_gettime (void)
void rdd_init (void)
void * rdd_malloc (size_t nbyte)
char * rdd_strsize (rdd_count_t size)
static void set_signal_handler (int signum, void(*handler)(int sig))
static void signal_exit (int signum)
int timeUnits (double timeInSecs, int *secs, int *mins, int *hours, int *days)

Variables

static char copyright []


Define Documentation

#define bitcount (  )     (sizeof(t) * CHAR_BIT)

Definition at line 67 of file rdd_internals.c.

#define MAX_SIZE_BUF_LEN   64

Definition at line 63 of file rdd_internals.c.

#define TIME_BUF_SIZE   64

Definition at line 64 of file rdd_internals.c.

#define TIME_FORMAT   "%Y-%m-%d %H:%M:%S %Z"

Definition at line 65 of file rdd_internals.c.


Function Documentation

static void check_type_sizes ( void   )  [static]

Definition at line 72 of file rdd_internals.c.

References bitcount, and error().

Here is the call graph for this function:

int rdd_buf2hex ( const unsigned char *  buf,
unsigned  bufsize,
char *  hexbuf,
unsigned  hexbuflen 
)

Definition at line 121 of file rdd_internals.c.

References RDD_ESPACE, and RDD_OK.

void rdd_catch_signals ( void   ) 

Definition at line 226 of file rdd_internals.c.

References set_signal_handler(), and signal_exit().

Here is the call graph for this function:

char* rdd_ctime ( void   ) 

Definition at line 144 of file rdd_internals.c.

References error(), TIME_BUF_SIZE, TIME_FORMAT, and unix_error().

Here is the call graph for this function:

int rdd_device_size ( const char *  path,
rdd_count_t size 
)

Definition at line 251 of file rdd_internals.c.

References RDD_EOPEN, RDD_ESEEK, RDD_OK, and RDD_WHOLE_FILE.

void rdd_free ( void *  p  ) 

Definition at line 115 of file rdd_internals.c.

double rdd_gettime ( void   ) 

Definition at line 167 of file rdd_internals.c.

References unix_error().

Here is the call graph for this function:

void rdd_init ( void   ) 

Definition at line 95 of file rdd_internals.c.

References check_type_sizes().

Here is the call graph for this function:

void* rdd_malloc ( size_t  nbyte  ) 

Allocates memory and clears it.

Definition at line 103 of file rdd_internals.c.

References error().

Here is the call graph for this function:

char* rdd_strsize ( rdd_count_t  size  ) 

Definition at line 179 of file rdd_internals.c.

References bug(), MAX_SIZE_BUF_LEN, and RDD_WHOLE_FILE.

Here is the call graph for this function:

static void set_signal_handler ( int  signum,
void(*)(int sig)  handler 
) [static]

Definition at line 212 of file rdd_internals.c.

References unix_error().

Here is the call graph for this function:

static void signal_exit ( int  signum  )  [static]

Definition at line 198 of file rdd_internals.c.

int timeUnits ( double  timeInSecs,
int *  secs,
int *  mins,
int *  hours,
int *  days 
)

Definition at line 291 of file rdd_internals.c.

References RDD_BADARG, and RDD_OK.


Variable Documentation

char copyright[] [static]

Initial value:

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

Definition at line 39 of file rdd_internals.c.


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