#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 MAX_SOCKET_RETRIES 10 |
Definition at line 13 of file action_alert_socket.c.
| typedef struct action_socket_rec ActionSocketRec |
| 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().
1.5.2