dsniff  2.4b2
About: A collection of tools for network auditing
  Fossies Dox: dsniff-2.4b2.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

record.c File Reference
#include "config.h"
#include <sys/types.h>
#include <netinet/in.h>
#include <rpc/rpc.h>
#include <stdio.h>
#include <time.h>
#include <md5.h>
#include <db_185.h>
#include <libnet.h>
#include "options.h"
#include "record.h"
Include dependency graph for record.c:

Go to the source code of this file.

Data Structures

struct  rec
 

Macros

#define DB_LIBRARY_COMPATIBILITY_API
 

Functions

static int xdr_rec (XDR *xdrs, struct rec *rec)
 
static void record_print (struct rec *rec)
 
static DBT * record_hash (struct rec *rec)
 
static int record_save (struct rec *rec)
 
void record_dump (void)
 
int record_init (char *file)
 
int record (u_int32_t src, u_int32_t dst, int proto, u_short sport, u_short dport, char *name, u_char *buf, int len)
 
void record_close (void)
 

Variables

static DB * db
 

Macro Definition Documentation

◆ DB_LIBRARY_COMPATIBILITY_API

#define DB_LIBRARY_COMPATIBILITY_API

Definition at line 19 of file record.c.

Function Documentation

◆ record()

int record ( u_int32_t  src,
u_int32_t  dst,
int  proto,
u_short  sport,
u_short  dport,
char *  name,
u_char *  buf,
int  len 
)

◆ record_close()

void record_close ( void  )

Definition at line 207 of file record.c.

References db.

Referenced by main(), sig_die(), and sig_int().

◆ record_dump()

void record_dump ( void  )

Definition at line 140 of file record.c.

References rec::data, db, record_print(), and xdr_rec().

Referenced by main().

◆ record_hash()

static DBT* record_hash ( struct rec rec)
static

Definition at line 93 of file record.c.

References rec::data, rec::dst, MD5Final(), MD5Init(), MD5Update(), rec::name, and rec::src.

Referenced by record_save().

◆ record_init()

int record_init ( char *  file)

Definition at line 158 of file record.c.

References db, and Opt_read.

Referenced by main().

◆ record_print()

static void record_print ( struct rec rec)
static

Definition at line 59 of file record.c.

References rec::data, rec::dport, rec::dst, rec::name, Opt_dns, rec::proto, rec::sport, rec::src, and rec::time.

Referenced by record(), and record_dump().

◆ record_save()

static int record_save ( struct rec rec)
static

Definition at line 115 of file record.c.

References buf, db, record_hash(), and xdr_rec().

Referenced by record().

◆ xdr_rec()

static int xdr_rec ( XDR *  xdrs,
struct rec rec 
)
static

Definition at line 43 of file record.c.

References rec::data, rec::dport, rec::dst, rec::name, rec::proto, rec::sport, rec::src, and rec::time.

Referenced by record_dump(), and record_save().

Variable Documentation

◆ db

DB* db
static

Definition at line 40 of file record.c.

Referenced by decode_postgresql(), record_close(), record_dump(), record_init(), and record_save().