actions/action.h File Reference

#include "../config.h"
#include "../engine/hlbr.h"

Go to the source code of this file.

Defines

#define ACTION_NONE   -1

Functions

int InitActions ()
int GetActionByName (char *Name)
int CreateAction (char *Name)
int BuildMessageString (char *Message, int PacketSlot, char *TargetBuff, int TargetBuffLen)
int PerformActions (int PacketSlot)
int LogMessageAllActions (char *Message)


Define Documentation

#define ACTION_NONE   -1

Definition at line 7 of file action.h.

Referenced by CreateAction(), InitActionAlertConsole(), InitActionAlertEMail(), InitActionAlertFile(), InitActionAlertListenSocket(), InitActionAlertSocket(), InitActionAlertSyslog(), InitActionBNS(), InitActionDrop(), InitActionDumpPacket(), InitActionRouteSIP(), ParseAction(), and ParseRule().


Function Documentation

int BuildMessageString ( char *  Message,
int  PacketSlot,
char *  TargetBuff,
int  TargetBuffLen 
)

Definition at line 100 of file action.c.

References FALSE.

int CreateAction ( char *  Name  ) 

Definition at line 69 of file action.c.

References ACTION_NONE, global_vars::ActionItems, GetActionByName(), Globals, action_item::ID, MAX_NAME_LEN, action_item::Name, and global_vars::NumActionItems.

Referenced by InitActionAlertConsole(), InitActionAlertEMail(), InitActionAlertFile(), InitActionAlertListenSocket(), InitActionAlertSocket(), InitActionAlertSyslog(), InitActionBNS(), InitActionDrop(), InitActionDumpPacket(), and InitActionRouteSIP().

int GetActionByName ( char *  Name  ) 

Definition at line 50 of file action.c.

References global_vars::ActionItems, Globals, action_item::Name, and global_vars::NumActionItems.

Referenced by CreateAction(), and ParseAction().

int InitActions (  ) 

Definition at line 27 of file action.c.

References FALSE, InitActionAlertConsole(), InitActionAlertEMail(), InitActionAlertFile(), InitActionAlertListenSocket(), InitActionAlertSocket(), InitActionAlertSyslog(), InitActionBNS(), InitActionDrop(), InitActionDumpPacket(), InitActionRouteSIP(), and TRUE.

Referenced by main().

int LogMessageAllActions ( char *  Message  ) 

Log a message, using all applicable responses in all defined actions. Differentrly from LogMessage, this function searches for all responses in all defined actions and calls every one of them.

See also:
LogMessage

Definition at line 159 of file action.c.

References rule_rec::Action, action_rec::ActionItemData, action_rec::ActionItems, global_vars::ActionItems, global_vars::Actions, DEBUGPATH, FALSE, Globals, action_item::MessageFunc, global_vars::NumActions, action_rec::NumItems, and global_vars::Rules.

Referenced by BNSAction().

int PerformActions ( int  PacketSlot  ) 

Definition at line 114 of file action.c.

References rule_rec::Action, action_item::ActionFunc, action_rec::ActionItemData, action_rec::ActionItems, global_vars::ActionItems, global_vars::Actions, global_vars::AlertCount, DEBUG, Globals, action_rec::NumItems, global_vars::NumRules, global_vars::Packets, RuleIsActive(), global_vars::Rules, and TRUE.

Referenced by ProcessPacket().


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