Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

spo_alert_unixsock.c File Reference

#include <sys/types.h>
#include <string.h>
#include <sys/un.h>
#include <unistd.h>
#include <errno.h>
#include "event.h"
#include "decode.h"
#include "plugbase.h"
#include "spo_plugbase.h"
#include "parser.h"
#include "debug.h"
#include "util.h"
#include "snort.h"
#include "spo_alert_unixsock.h"

Go to the source code of this file.

Defines

#define UNSOCK_FILE   "snort_alert"

Typedefs

typedef _SpoAlertUnixSockData SpoAlertUnixSockData

Functions

void AlertUnixSockInit (u_char *)
void AlertUnixSock (Packet *, char *, void *, Event *)
void ParseAlertUnixSockArgs (char *)
void AlertUnixSockCleanExit (int, void *)
void AlertUnixSockRestart (int, void *)
void OpenAlertSock (void)
void CloseAlertSock (void)
void AlertUnixSockSetup (void)

Variables

static int alertsd
sockaddr_un alertaddr


Define Documentation

#define UNSOCK_FILE   "snort_alert"
 

Definition at line 57 of file spo_alert_unixsock.c.

Referenced by OpenAlertSock().


Typedef Documentation

typedef struct _SpoAlertUnixSockData SpoAlertUnixSockData
 


Function Documentation

void AlertUnixSock Packet ,
char *  ,
void *  ,
Event
 

Definition at line 173 of file spo_alert_unixsock.c.

References alertaddr, ALERTMSG_LENGTH, alertsd, bcopy, bzero, _Packet::data, DEBUG_LOG, DEBUG_WRAP, _Packet::eh, _Packet::icmph, _IPHdr::ip_proto, _Packet::iph, NO_TRANSHDR, NOPACKET_STRUCT, _Packet::pkt, _Packet::pkth, SNAPLEN, _Packet::tcph, and _Packet::udph.

Referenced by AlertUnixSockInit().

void AlertUnixSockCleanExit int  ,
void * 
 

Definition at line 296 of file spo_alert_unixsock.c.

References CloseAlertSock(), DEBUG_LOG, and DEBUG_WRAP.

Referenced by AlertUnixSockInit().

void AlertUnixSockInit u_char *   ) 
 

Definition at line 125 of file spo_alert_unixsock.c.

References AddFuncToCleanExitList(), AddFuncToOutputList(), AddFuncToRestartList(), _progvars::alert_plugin_active, AlertUnixSock(), AlertUnixSockCleanExit(), AlertUnixSockRestart(), DEBUG_INIT, DEBUG_WRAP, NT_OUTPUT_ALERT, NULL, ParseAlertUnixSockArgs(), and pv.

Referenced by AlertUnixSockSetup().

void AlertUnixSockRestart int  ,
void * 
 

Definition at line 302 of file spo_alert_unixsock.c.

References CloseAlertSock(), DEBUG_LOG, and DEBUG_WRAP.

Referenced by AlertUnixSockInit().

void AlertUnixSockSetup void   ) 
 

Definition at line 105 of file spo_alert_unixsock.c.

References AlertUnixSockInit(), DEBUG_INIT, DEBUG_WRAP, NT_OUTPUT_ALERT, and RegisterOutputPlugin().

Referenced by InitOutputPlugins().

void CloseAlertSock void   ) 
 

Definition at line 308 of file spo_alert_unixsock.c.

References alertsd.

Referenced by AlertUnixSockCleanExit(), and AlertUnixSockRestart().

void OpenAlertSock void   ) 
 

Definition at line 270 of file spo_alert_unixsock.c.

References access, alertaddr, alertsd, bzero, _progvars::chroot_dir, errno, ErrorMessage(), FatalError(), _progvars::log_dir, NULL, pv, snprintf, STD_BUF, UNSOCK_FILE, and W_OK.

Referenced by ParseAlertUnixSockArgs().

void ParseAlertUnixSockArgs char *   ) 
 

Definition at line 156 of file spo_alert_unixsock.c.

References DEBUG_LOG, DEBUG_WRAP, and OpenAlertSock().

Referenced by AlertUnixSockInit().


Variable Documentation

struct sockaddr_un alertaddr
 

Definition at line 80 of file spo_alert_unixsock.c.

Referenced by AlertUnixSock(), and OpenAlertSock().

int alertsd [static]
 

Definition at line 78 of file spo_alert_unixsock.c.

Referenced by AlertUnixSock(), CloseAlertSock(), and OpenAlertSock().


Generated on Sun May 14 14:51:23 2006 by  doxygen 1.4.2