actions/action_dump_packet.c File Reference

#include "action_dump_packet.h"
#include <stdio.h>
#include "../engine/message.h"
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <sys/stat.h>

Go to the source code of this file.

Data Structures

struct  dump_pcap_pkthdr
struct  dump_pcap_file_header
struct  dump_packet_rec

Defines

#define DUMP_PCAP_VERSION_MAJOR   2
#define DUMP_PCAP_VERSION_MINOR   4

Typedefs

typedef dump_packet_rec DumpPacketRec

Functions

int InitTCPDumpFile (char *FName)
void * DumpPacketParseArgs (char *Args)
int DumpPacketAction (int RuleNum, int PacketSlot, void *Data)
int InitActionDumpPacket ()

Variables

GlobalVars Globals
FILE * fp


Define Documentation

#define DUMP_PCAP_VERSION_MAJOR   2

Definition at line 22 of file action_dump_packet.c.

Referenced by InitTCPDumpFile().

#define DUMP_PCAP_VERSION_MINOR   4

Definition at line 23 of file action_dump_packet.c.

Referenced by InitTCPDumpFile().


Typedef Documentation

typedef struct dump_packet_rec DumpPacketRec


Function Documentation

int DumpPacketAction ( int  RuleNum,
int  PacketSlot,
void *  Data 
)

Definition at line 115 of file action_dump_packet.c.

References dump_pcap_pkthdr::caplen, FALSE, dump_packet_rec::fname, fp, Globals, dump_pcap_pkthdr::len, packet_rec::PacketLen, global_vars::Packets, packet_rec::RawPacket, TRUE, dump_pcap_pkthdr::ts, and packet_rec::tv.

Referenced by InitActionDumpPacket().

void* DumpPacketParseArgs ( char *  Args  ) 

Definition at line 82 of file action_dump_packet.c.

References dump_packet_rec::fname, Globals, InitTCPDumpFile(), global_vars::LogDir, and NULL.

Referenced by InitActionDumpPacket().

int InitActionDumpPacket (  ) 

Definition at line 163 of file action_dump_packet.c.

References ACTION_NONE, action_item::ActionFunc, global_vars::ActionItems, CreateAction(), DumpPacketAction(), DumpPacketParseArgs(), FALSE, Globals, action_item::ParseArgs, and TRUE.

Referenced by InitActions().

int InitTCPDumpFile ( char *  FName  ) 

Definition at line 49 of file action_dump_packet.c.

References DUMP_PCAP_VERSION_MAJOR, DUMP_PCAP_VERSION_MINOR, FALSE, fp, dump_pcap_file_header::linktype, dump_pcap_file_header::magic, dump_pcap_file_header::snaplen, TRUE, dump_pcap_file_header::version_major, and dump_pcap_file_header::version_minor.

Referenced by DumpPacketParseArgs().


Variable Documentation

FILE* fp

Definition at line 44 of file action_dump_packet.c.

GlobalVars Globals

Definition at line 41 of file hlbr.c.


Generated on Sat Jul 7 23:33:10 2007 for HLBR by  doxygen 1.5.2