actions/action_alert_socket.c File Reference

#include "action_alert_socket.h"
#include <stdio.h>
#include "../engine/message.h"
#include <stdlib.h>
#include <string.h>
#include <netdb.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <unistd.h>

Go to the source code of this file.

Data Structures

struct  action_socket_rec

Defines

#define MAX_SOCKET_RETRIES   10

Typedefs

typedef action_socket_rec ActionSocketRec

Functions

int AlertSocketConnect (ActionSocketRec *SR)
void * AlertSocketParseArgs (char *Args)
int AlertSocketMessage (char *Message, void *Data)
int AlertSocketAction (int RuleNum, int PacketSlot, void *Data)
int InitActionAlertSocket ()

Variables

GlobalVars Globals


Define Documentation

#define MAX_SOCKET_RETRIES   10

Definition at line 13 of file action_alert_socket.c.


Typedef Documentation

typedef struct action_socket_rec ActionSocketRec


Function Documentation

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

Definition at line 153 of file action_alert_socket.c.

References global_vars::AlertHeader, AlertSocketConnect(), ApplyMessage(), FALSE, Globals, MAX_SOCKET_RETRIES, rule_rec::MessageFormat, global_vars::Packets, action_socket_rec::Retries, global_vars::Rules, action_socket_rec::SockFD, and TRUE.

Referenced by InitActionAlertSocket().

int AlertSocketConnect ( ActionSocketRec SR  ) 

Definition at line 29 of file action_alert_socket.c.

References FALSE, action_socket_rec::IP, action_socket_rec::Port, action_socket_rec::Retries, action_socket_rec::SockFD, and TRUE.

Referenced by AlertSocketAction(), AlertSocketMessage(), and AlertSocketParseArgs().

int AlertSocketMessage ( char *  Message,
void *  Data 
)

Definition at line 116 of file action_alert_socket.c.

References AlertSocketConnect(), FALSE, MAX_SOCKET_RETRIES, action_socket_rec::Retries, action_socket_rec::SockFD, and TRUE.

Referenced by InitActionAlertSocket().

void* AlertSocketParseArgs ( char *  Args  ) 

Definition at line 55 of file action_alert_socket.c.

References AlertSocketConnect(), DEBUG, action_socket_rec::IP, NULL, and action_socket_rec::Port.

Referenced by InitActionAlertSocket().

int InitActionAlertSocket (  ) 

Definition at line 214 of file action_alert_socket.c.

References ACTION_NONE, action_item::ActionFunc, global_vars::ActionItems, AlertSocketAction(), AlertSocketMessage(), AlertSocketParseArgs(), CreateAction(), FALSE, Globals, action_item::MessageFunc, action_item::ParseArgs, and TRUE.

Referenced by InitActions().


Variable Documentation

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