#include "action_alert_listensocket.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_listensocket_rec |
| struct | remote_connection |
Defines | |
| #define | MAX_SOCKET_RETRIES 10 |
| #define | MAX_REMOTES 10 |
Typedefs | |
| typedef action_listensocket_rec | ActionLSocketRec |
| typedef remote_connection | RemoteConn |
Functions | |
| int | ListenSocketTimerFunc (int TimerID, int Time, void *User) |
| void | HandleClients (int sockfd, int readfd) |
| void * | AlertListenSocketParseArgs (char *Args) |
| int | AlertListenSocketMessage (char *Message, void *Data) |
| int | AlertListenSocketAction (int RuleNum, int PacketSlot, void *Data) |
| int | InitActionAlertListenSocket () |
Variables | |
| GlobalVars | Globals |
| RemoteConn | RCons [MAX_REMOTES] |
| #define MAX_REMOTES 10 |
| #define MAX_SOCKET_RETRIES 10 |
Definition at line 13 of file action_alert_listensocket.c.
Referenced by AlertSocketAction(), and AlertSocketMessage().
| typedef struct action_listensocket_rec ActionLSocketRec |
| typedef struct remote_connection RemoteConn |
| int AlertListenSocketAction | ( | int | RuleNum, | |
| int | PacketSlot, | |||
| void * | Data | |||
| ) |
Definition at line 229 of file action_alert_listensocket.c.
References global_vars::AlertHeader, ApplyMessage(), FALSE, Globals, LDATA_TYPE_ALERT, action_listensocket_rec::ListenSocketFD, rule_rec::MessageFormat, global_vars::Packets, PREMAGIC, global_vars::Rules, and TRUE.
Referenced by InitActionAlertListenSocket().
| int AlertListenSocketMessage | ( | char * | Message, | |
| void * | Data | |||
| ) |
Definition at line 200 of file action_alert_listensocket.c.
References FALSE, action_listensocket_rec::SockFD, and TRUE.
Referenced by InitActionAlertListenSocket().
| void* AlertListenSocketParseArgs | ( | char * | Args | ) |
Definition at line 139 of file action_alert_listensocket.c.
References CreateTimer(), HandleClients(), action_listensocket_rec::ListenSocketFD, ListenSocketTimerFunc(), NULL, action_listensocket_rec::Port, and action_listensocket_rec::SockFD.
Referenced by InitActionAlertListenSocket().
| void HandleClients | ( | int | sockfd, | |
| int | readfd | |||
| ) |
Definition at line 62 of file action_alert_listensocket.c.
References FALSE, remote_connection::InUse, MAX_REMOTES, NULL, RCons, and TRUE.
Referenced by AlertListenSocketParseArgs().
| int InitActionAlertListenSocket | ( | ) |
Definition at line 281 of file action_alert_listensocket.c.
References ACTION_NONE, action_item::ActionFunc, global_vars::ActionItems, AlertListenSocketAction(), AlertListenSocketMessage(), AlertListenSocketParseArgs(), CreateAction(), FALSE, Globals, action_item::MessageFunc, action_item::ParseArgs, and TRUE.
Referenced by InitActions().
| int ListenSocketTimerFunc | ( | int | TimerID, | |
| int | Time, | |||
| void * | User | |||
| ) |
Definition at line 35 of file action_alert_listensocket.c.
References Globals, LDATA_TYPE_STATISTICS, listen_data_record_stats::Len, action_listensocket_rec::ListenSocketFD, listen_data_record_stats::PacketCount, global_vars::PacketsPerSec, PREMAGIC, listen_data_record_stats::PreMagic, listen_data_record_stats::TCPCount, global_vars::TCPPerSec, listen_data_record_stats::Time, TRUE, listen_data_record_stats::Type, listen_data_record_stats::UDPCount, and global_vars::UDPPerSec.
Referenced by AlertListenSocketParseArgs().
| RemoteConn RCons[MAX_REMOTES] |
1.5.2