actions/action_alert_syslog.c File Reference

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include "action_alert_syslog.h"
#include "../engine/hlbrlib.h"

Go to the source code of this file.

Data Structures

struct  _hlbr_syslog_t
struct  action_syslog_rec_t

Typedefs

typedef _hlbr_syslog_t hlbr_syslog_t
typedef action_syslog_rec_t ActionSyslogRec

Functions

int ActionAlertSyslogShutdownFunc (void *Data)
int SyslogInit (ActionSyslogRec *Data)
int AlertSyslogMessage (char *Message, void *Data)
int AlertSyslogAction (int RuleNum, int PacketSlot, void *Data)
void * AlertSyslogParseArgs (char *Args)
int InitActionAlertSyslog ()

Variables

hlbr_syslog_t hlbr_syslog_prioritys []
hlbr_syslog_t hlbr_syslog_facilitys []
hlbr_syslog_t hlbr_syslog_options []


Typedef Documentation

typedef struct action_syslog_rec_t ActionSyslogRec

typedef struct _hlbr_syslog_t hlbr_syslog_t


Function Documentation

int ActionAlertSyslogShutdownFunc ( void *  Data  ) 

Definition at line 86 of file action_alert_syslog.c.

References action_syslog_rec_t::Active, DBG, DEBUGPATH, FALSE, and TRUE.

Referenced by SyslogInit().

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

Definition at line 147 of file action_alert_syslog.c.

References action_syslog_rec_t::Active, ApplyMessage(), DBG, DEBUGPATH, FALSE, Globals, rule_rec::MessageFormat, NULL, global_vars::Packets, global_vars::Rules, SyslogInit(), and TRUE.

Referenced by InitActionAlertSyslog().

int AlertSyslogMessage ( char *  Message,
void *  Data 
)

Definition at line 128 of file action_alert_syslog.c.

References action_syslog_rec_t::Active, DBG, DEBUGPATH, FALSE, NULL, SyslogInit(), and TRUE.

Referenced by InitActionAlertSyslog().

void* AlertSyslogParseArgs ( char *  Args  ) 

Definition at line 177 of file action_alert_syslog.c.

References ARRAYSIZE, DBG, DEBUGPATH, action_syslog_rec_t::facility, FREE, hlbr_syslog_facilitys, hlbr_syslog_options, hlbr_syslog_prioritys, queue_t::item, ListAdd(), ListClear(), queue_t::next, NULL, action_syslog_rec_t::options, ParseCmp(), action_syslog_rec_t::priority, and _hlbr_syslog_t::val.

Referenced by InitActionAlertSyslog().

int InitActionAlertSyslog (  ) 

Definition at line 245 of file action_alert_syslog.c.

References ACTION_NONE, action_item::ActionFunc, global_vars::ActionItems, AlertSyslogAction(), AlertSyslogMessage(), AlertSyslogParseArgs(), CreateAction(), DBG, DEBUGPATH, FALSE, Globals, action_item::MessageFunc, action_item::ParseArgs, and TRUE.

Referenced by InitActions().

int SyslogInit ( ActionSyslogRec Data  ) 

Definition at line 105 of file action_alert_syslog.c.

References ActionAlertSyslogShutdownFunc(), action_syslog_rec_t::Active, AddShutdownHandler(), DBG, DEBUGPATH, action_syslog_rec_t::facility, FALSE, action_syslog_rec_t::options, and TRUE.

Referenced by AlertSyslogAction(), and AlertSyslogMessage().


Variable Documentation

hlbr_syslog_t hlbr_syslog_facilitys[]

Initial value:

 {


        



    {"LOG_AUTH", LOG_AUTH},
    {"LOG_CRON", LOG_CRON},
    {"LOG_DAEMON", LOG_DAEMON},
    {"LOG_KERN", LOG_KERN},
    {"LOG_LPR", LOG_LPR},
    {"LOG_MAIL", LOG_MAIL},
    {"LOG_NEWS", LOG_NEWS},
    {"LOG_SYSLOG", LOG_SYSLOG},
    {"LOG_USER", LOG_USER},
    {"LOG_UUCP", LOG_UUCP},
    {"LOG_LOCAL0", LOG_LOCAL0},
    {"LOG_LOCAL1", LOG_LOCAL1},
    {"LOG_LOCAL2", LOG_LOCAL2},
    {"LOG_LOCAL3", LOG_LOCAL3},
    {"LOG_LOCAL4", LOG_LOCAL4},
    {"LOG_LOCAL5", LOG_LOCAL5},
    {"LOG_LOCAL6", LOG_LOCAL6},
    {"LOG_LOCAL7", LOG_LOCAL7},
}

Definition at line 30 of file action_alert_syslog.c.

Referenced by AlertSyslogParseArgs().

hlbr_syslog_t hlbr_syslog_options[]

Initial value:

 {



















}

Definition at line 57 of file action_alert_syslog.c.

Referenced by AlertSyslogParseArgs().

hlbr_syslog_t hlbr_syslog_prioritys[]

Initial value:

 {
    {"LOG_ALERT", LOG_ALERT},
    {"LOG_CRIT", LOG_CRIT},
    {"LOG_DEBUG", LOG_DEBUG},
    {"LOG_EMERG", LOG_EMERG},
    {"LOG_ERR", LOG_ERR},
    {"LOG_INFO", LOG_INFO},
    {"LOG_NOTICE", LOG_NOTICE},
    {"LOG_WARNING", LOG_WARNING},
}

Definition at line 19 of file action_alert_syslog.c.

Referenced by AlertSyslogParseArgs().


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