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

spo_log_ascii.c File Reference

#include <sys/types.h>
#include <string.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "plugbase.h"
#include "spo_plugbase.h"
#include "parser.h"
#include "debug.h"
#include "decode.h"
#include "event.h"
#include "log.h"
#include "util.h"
#include "snort.h"

Go to the source code of this file.

Defines

#define DUMP   1
#define BOGUS   2
#define NON_IP   3
#define ARP   4
#define GENERIC_LOG   5

Functions

void LogAsciiInit (u_char *args)
void LogAscii (Packet *p, char *msg, void *arg, Event *event)
void LogAsciiCleanExit (int signal, void *arg)
void LogAsciiRestart (int signal, void *arg)
char * IcmpFileName (Packet *p)
static FILE * OpenLogFile (int mode, Packet *p)
void LogAsciiSetup ()

Variables

OptTreeNodeotn_tmp
static char * logfile []


Define Documentation

#define ARP   4
 

Definition at line 86 of file spo_log_ascii.c.

Referenced by LogAscii(), and OpenLogFile().

#define BOGUS   2
 

Definition at line 84 of file spo_log_ascii.c.

Referenced by OpenLogFile().

#define DUMP   1
 

Definition at line 83 of file spo_log_ascii.c.

Referenced by OpenLogFile().

#define GENERIC_LOG   5
 

Definition at line 87 of file spo_log_ascii.c.

Referenced by LogAscii(), and OpenLogFile().

#define NON_IP   3
 

Definition at line 85 of file spo_log_ascii.c.

Referenced by LogAscii(), and OpenLogFile().


Function Documentation

char * IcmpFileName Packet p  ) 
 

Definition at line 356 of file spo_log_ascii.c.

References _ICMPHdr::code, ICMP_ADDRESS, ICMP_ADDRESSREPLY, ICMP_DEST_UNREACH, ICMP_ECHO, ICMP_ECHOREPLY, ICMP_FRAG_NEEDED, ICMP_HOST_ISOLATED, ICMP_HOST_UNKNOWN, ICMP_HOST_UNR_TOS, ICMP_HOST_UNREACH, ICMP_INFO_REPLY, ICMP_INFO_REQUEST, ICMP_NET_UNKNOWN, ICMP_NET_UNR_TOS, ICMP_NET_UNREACH, ICMP_PARAMETERPROB, ICMP_PKT_FILTERED, ICMP_PKT_FILTERED_HOST, ICMP_PKT_FILTERED_NET, ICMP_PORT_UNREACH, ICMP_PREC_CUTOFF, ICMP_PREC_VIOLATION, ICMP_PROT_UNREACH, ICMP_REDIRECT, ICMP_SOURCE_QUENCH, ICMP_SR_FAILED, ICMP_TIME_EXCEEDED, ICMP_TIMESTAMP, ICMP_TIMESTAMPREPLY, _Packet::icmph, NULL, and _ICMPHdr::type.

Referenced by OpenLogFile().

void LogAscii Packet p,
char *  msg,
void *  arg,
Event event
 

Definition at line 112 of file spo_log_ascii.c.

References _Packet::ah, ARP, DEBUG_LOG, DEBUG_WRAP, FatalError(), GENERIC_LOG, _IPHdr::ip_proto, _Packet::iph, NON_IP, NULL, OpenLogFile(), PrintArpHeader(), and PrintIPPkt().

Referenced by LogAsciiInit().

void LogAsciiCleanExit int  signal,
void *  arg
 

Definition at line 149 of file spo_log_ascii.c.

Referenced by LogAsciiInit().

void LogAsciiInit u_char *  args  ) 
 

Definition at line 98 of file spo_log_ascii.c.

References AddFuncToCleanExitList(), AddFuncToOutputList(), AddFuncToRestartList(), DEBUG_PLUGIN, DEBUG_WRAP, _progvars::log_plugin_active, LogAscii(), LogAsciiCleanExit(), LogAsciiRestart(), NT_OUTPUT_LOG, NULL, and pv.

Referenced by LogAsciiSetup().

void LogAsciiRestart int  signal,
void *  arg
 

Definition at line 154 of file spo_log_ascii.c.

Referenced by LogAsciiInit().

void LogAsciiSetup  ) 
 

Definition at line 89 of file spo_log_ascii.c.

References DEBUG_PLUGIN, DEBUG_WRAP, LogAsciiInit(), NT_OUTPUT_LOG, and RegisterOutputPlugin().

Referenced by InitOutputPlugins().

FILE * OpenLogFile int  mode,
Packet p
[static]
 

Definition at line 173 of file spo_log_ascii.c.

References ARP, BOGUS, bzero, DEBUG_FLOW, DEBUG_WRAP, _Packet::dp, DUMP, errno, FatalError(), _Packet::frag_flag, GENERIC_LOG, _progvars::homenet, IcmpFileName(), _IPHdr::ip_dst, _IPHdr::ip_proto, _IPHdr::ip_src, _Packet::iph, _progvars::log_dir, logfile, _OptTreeNode::logto, mkdir, _progvars::netmask, NON_IP, NULL, protocol_names, pv, S_IROTH, S_IRWXG, S_IRWXU, S_IXOTH, snprintf, _Packet::sp, and STD_BUF.

Referenced by LogAscii().


Variable Documentation

char* logfile[] [static]
 

Initial value:

        { "", "PACKET_FRAG", "PACKET_BOGUS", "PACKET_NONIP", "ARP", "log" }

Definition at line 159 of file spo_log_ascii.c.

Referenced by OpenLogFile(), and Stream4Init().

OptTreeNode* otn_tmp
 

Definition at line 80 of file parser.c.


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