Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

spo_log_tcpdump.c File Reference

#include <sys/types.h>
#include <pcap.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <time.h>
#include "decode.h"
#include "event.h"
#include "plugbase.h"
#include "spo_plugbase.h"
#include "parser.h"
#include "debug.h"
#include "util.h"
#include "snort.h"

Go to the source code of this file.

Typedefs

typedef _LogTcpdumpData LogTcpdumpData

Functions

void LogTcpdumpInit (u_char *)
LogTcpdumpDataParseTcpdumpArgs (char *)
void LogTcpdump (Packet *, char *, void *, Event *)
void TcpdumpInitLogFile (LogTcpdumpData *)
void SpoLogTcpdumpCleanExitFunc (int, void *)
void SpoLogTcpdumpRestartFunc (int, void *)
void DirectLogTcpdump (struct pcap_pkthdr *, u_int8_t *)
void LogTcpdumpSingle (Packet *, char *, void *, Event *)
void LogTcpdumpStream (Packet *, char *, void *, Event *)
void LogTcpdumpSetup ()

Variables

pcap_dumper_tdumpd
PV pv
LogTcpdumpDatalog_tcpdump_ptr


Typedef Documentation

typedef struct _LogTcpdumpData LogTcpdumpData
 


Function Documentation

void DirectLogTcpdump struct pcap_pkthdr ,
u_int8_t
 

Definition at line 420 of file spo_log_tcpdump.c.

References _LogTcpdumpData::dumpd, _PacketCount::log_pkts, pc, and pcap_dump().

Referenced by LogTraverse().

void LogTcpdump Packet ,
char *  ,
void *  ,
Event
 

Definition at line 204 of file spo_log_tcpdump.c.

References LogTcpdumpSingle(), LogTcpdumpStream(), _Packet::packet_flags, and PKT_REBUILT_STREAM.

Referenced by LogTcpdumpInit().

void LogTcpdumpInit u_char *   ) 
 

Definition at line 130 of file spo_log_tcpdump.c.

References AddFuncToCleanExitList(), AddFuncToOutputList(), AddFuncToRestartList(), DEBUG_INIT, DEBUG_WRAP, _progvars::log_bitmap, _progvars::log_plugin_active, LOG_TCPDUMP, LogTcpdump(), NT_OUTPUT_LOG, ParseTcpdumpArgs(), SpoLogTcpdumpCleanExitFunc(), SpoLogTcpdumpRestartFunc(), and TcpdumpInitLogFile().

Referenced by LogTcpdumpSetup().

void LogTcpdumpSetup  ) 
 

Definition at line 109 of file spo_log_tcpdump.c.

References DEBUG_INIT, DEBUG_WRAP, LogTcpdumpInit(), NT_OUTPUT_LOG, and RegisterOutputPlugin().

Referenced by InitOutputPlugins().

void LogTcpdumpSingle Packet ,
char *  ,
void *  ,
Event
 

Definition at line 220 of file spo_log_tcpdump.c.

References _LogTcpdumpData::dumpd, _progvars::line_buffer_flag, _LogTcpdumpData::log_written, NULL, pcap_dump(), _Packet::pkt, and _Packet::pkth.

Referenced by LogTcpdump().

void LogTcpdumpStream Packet ,
char *  ,
void *  ,
Event
 

Definition at line 241 of file spo_log_tcpdump.c.

References _Stream::data, _LogTcpdumpData::dumpd, _progvars::line_buffer_flag, _LogTcpdumpData::log_written, NULL, pcap_dump(), SEG_UNASSEMBLED, _Packet::streamptr, ubi_btFirst(), and ubi_btNext().

Referenced by LogTcpdump().

LogTcpdumpData * ParseTcpdumpArgs char *   ) 
 

Definition at line 167 of file spo_log_tcpdump.c.

References DEBUG_INIT, DEBUG_WRAP, _LogTcpdumpData::filename, and NULL.

Referenced by LogTcpdumpInit().

void SpoLogTcpdumpCleanExitFunc int  ,
void * 
 

Definition at line 342 of file spo_log_tcpdump.c.

References _PacketCount::alert_pkts, bzero, DEBUG_LOG, DEBUG_WRAP, _LogTcpdumpData::dumpd, _LogTcpdumpData::filename, _PacketCount::log_pkts, NULL, pc, and pcap_dump_close().

Referenced by LogTcpdumpInit().

void SpoLogTcpdumpRestartFunc int  ,
void * 
 

Definition at line 387 of file spo_log_tcpdump.c.

References _PacketCount::alert_pkts, bzero, DEBUG_LOG, DEBUG_WRAP, _LogTcpdumpData::dumpd, _LogTcpdumpData::filename, _PacketCount::log_pkts, NULL, pc, and pcap_dump_close().

Referenced by LogTcpdumpInit().

void TcpdumpInitLogFile LogTcpdumpData  ) 
 

Definition at line 284 of file spo_log_tcpdump.c.

References bzero, DEBUG_LOG, DEBUG_WRAP, _LogTcpdumpData::dumpd, errno, FatalError(), _LogTcpdumpData::filename, _progvars::log_dir, NULL, pcap_dump_open(), pd, snprintf, STD_BUF, and _progvars::test_mode_flag.

Referenced by LogTcpdumpInit().


Variable Documentation

pcap_dumper_t* dumpd
 

LogTcpdumpData* log_tcpdump_ptr
 

Definition at line 95 of file spo_log_tcpdump.c.

PV pv
 

Definition at line 129 of file snort.c.


Generated on Sun May 14 14:51:23 2006 by  doxygen 1.4.2