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

syslog.c File Reference

#include <windows.h>
#include <stdio.h>
#include <time.h>
#include "name.h"
#include "syslog.h"
#include "snort.h"
#include "util.h"

Go to the source code of this file.

Defines

#define _WINSOCKAPI_
#define TBUF_LEN   2048
#define FMT_LEN   1024
#define INTERNALLOG   LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID
#define DEC()

Functions

void syslog (int pri, char *fmt,...)
void vsyslog (int pri, char *fmt, va_list ap)
void openlog (char *ident, int logstat, int logfac)
void AddEventSource (char *ident)
unsigned long resolve_host (char *host)

Variables

static int LogFile = -1
static int opened
static int LogStat = 0
static char * LogTag = NULL
static int LogFacility = LOG_USER
static int LogMask = 0xff


Define Documentation

#define _WINSOCKAPI_
 

Definition at line 32 of file syslog.c.

 
#define DEC  ) 
 

Value:

do {                                    \
                if (prlen >= tbuf_left)         \
                        prlen = tbuf_left - 1;  \
                p += prlen;                     \
                tbuf_left -= prlen;             \
        } while (0)

Referenced by vsyslog().

#define FMT_LEN   1024
 

Definition at line 43 of file syslog.c.

Referenced by vsyslog().

#define INTERNALLOG   LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID
 

Definition at line 44 of file syslog.c.

Referenced by vsyslog().

#define TBUF_LEN   2048
 

Definition at line 42 of file syslog.c.

Referenced by vsyslog().


Function Documentation

void AddEventSource char *  ident  ) 
 

Definition at line 262 of file syslog.c.

References DWORD, and NULL.

Referenced by openlog().

void openlog char *  ident,
int  logstat,
int  logfac
 

Definition at line 247 of file syslog.c.

References AddEventSource(), LOG_FACMASK, LogFacility, LogStat, LogTag, NULL, and opened.

Referenced by AlertSyslogInit(), SnortMain(), and vsyslog().

unsigned long resolve_host char *  host  ) 
 

Definition at line 310 of file syslog.c.

References FAR, and memcpy.

Referenced by vsyslog().

void syslog int  pri,
char *  fmt,
  ...
 

Definition at line 53 of file syslog.c.

References vsyslog().

Referenced by AlertSyslog(), ErrorMessage(), FatalError(), flow_errormsg(), flow_fatalerror(), flow_printf(), InterfaceThread(), LogMessage(), PrintError(), and vsyslog().

void vsyslog int  pri,
char *  fmt,
va_list  ap
 

Definition at line 61 of file syslog.c.

References closesocket, DEC, errno, ErrorMessage(), EVMSG_SIMPLE, FMT_LEN, HANDLE, INTERNALLOG, LOG_FACMASK, LOG_MASK, LOG_PERROR, LOG_PID, LOG_PRI, LOG_PRIMASK, LogFacility, LogMask, LogStat, LogTag, NULL, opened, openlog(), pv, resolve_host(), snprintf, syslog(), TBUF_LEN, VERSION, and vsnprintf.

Referenced by syslog().


Variable Documentation

int LogFacility = LOG_USER [static]
 

Definition at line 50 of file syslog.c.

Referenced by openlog(), and vsyslog().

int LogFile = -1 [static]
 

Definition at line 46 of file syslog.c.

int LogMask = 0xff [static]
 

Definition at line 51 of file syslog.c.

Referenced by vsyslog().

int LogStat = 0 [static]
 

Definition at line 48 of file syslog.c.

Referenced by openlog(), and vsyslog().

char* LogTag = NULL [static]
 

Definition at line 49 of file syslog.c.

Referenced by openlog(), and vsyslog().

int opened [static]
 

Definition at line 47 of file syslog.c.

Referenced by openlog(), and vsyslog().


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