actions/action_alert_file.c File Reference

#include "action_alert_file.h"
#include <stdio.h>
#include "../engine/message.h"
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

void * AlertFileParseArgs (char *Args)
int AlertFileMessage (char *Message, void *Data)
int AlertFileAction (int RuleNum, int PacketSlot, void *Data)
int InitActionAlertFile ()

Variables

GlobalVars Globals
FILE * fp


Function Documentation

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

Write the alert message to the alert file (action alert file).

Definition at line 75 of file action_alert_file.c.

References global_vars::AlertHeader, ApplyMessage(), DEBUGPATH, FALSE, log_file_rec::fname, fp, Globals, rule_rec::MessageFormat, global_vars::Packets, PRINTERROR, PRINTERROR1, global_vars::Rules, and TRUE.

Referenced by InitActionAlertFile().

int AlertFileMessage ( char *  Message,
void *  Data 
)

Handle the message (write to a log file). Basically it gets a file name (inside the LogFileRec type) and writes the message to it.

Definition at line 46 of file action_alert_file.c.

References CloseLogFile(), DEBUGPATH, FALSE, log_file_rec::fname, log_file_rec::fp, fp, LogFile(), PRINTERROR, and TRUE.

Referenced by InitActionAlertFile().

void* AlertFileParseArgs ( char *  Args  ) 

Parse the args for this action (alert file).

Definition at line 16 of file action_alert_file.c.

References DEBUGPATH, log_file_rec::fname, fp, Globals, global_vars::LogDir, NULL, and PRINTERROR1.

Referenced by InitActionAlertFile().

int InitActionAlertFile (  ) 

Set up the alert file stuff.

Definition at line 123 of file action_alert_file.c.

References ACTION_NONE, action_item::ActionFunc, global_vars::ActionItems, AlertFileAction(), AlertFileMessage(), AlertFileParseArgs(), CreateAction(), DEBUGPATH, FALSE, Globals, action_item::MessageFunc, action_item::ParseArgs, PRINTERROR, and TRUE.

Referenced by InitActions().


Variable Documentation

FILE* fp

Definition at line 11 of file action_alert_file.c.

Referenced by AlertFileAction(), AlertFileMessage(), AlertFileParseArgs(), DumpPacketAction(), InitTCPDumpFile(), LogMessage(), ParseConfig(), and ParseRules().

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