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

log.h

Go to the documentation of this file.
00001 /*
00002 ** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
00003 **
00004 ** This program is free software; you can redistribute it and/or modify
00005 ** it under the terms of the GNU General Public License as published by
00006 ** the Free Software Foundation; either version 2 of the License, or
00007 ** (at your option) any later version.
00008 **
00009 ** This program is distributed in the hope that it will be useful,
00010 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 ** GNU General Public License for more details.
00013 **
00014 ** You should have received a copy of the GNU General Public License
00015 ** along with this program; if not, write to the Free Software
00016 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017 */
00018 
00019 /* $Id$ */
00020 #ifndef __LOG_H__
00021 #define __LOG_H__
00022 
00023 #ifdef HAVE_CONFIG_H
00024 #include "config.h"
00025 #endif
00026 
00027 #include <syslog.h>
00028 
00029 #include "event.h"
00030 #include "decode.h"
00031 
00032 #if defined (SUNOS) || defined (SOLARIS) || defined (HPUX) || defined (IRIX) \
00033 || defined (AIX) || defined (OSF1)
00034     #define LOG_AUTHPRIV LOG_AUTH
00035 #endif
00036 
00037 #ifndef LOG_AUTHPRIV
00038     #define LOG_AUTHPRIV LOG_AUTH
00039 #endif
00040 
00041 #define FRAME_SIZE        66
00042 #define C_OFFSET          49
00043 
00044 
00045 /*  P R O T O T Y P E S  ******************************************************/
00046 
00047 
00048 void PrintIPPkt(FILE *, int,Packet*);
00049 void PrintEapolPkt(FILE *, Packet *);
00050 void PrintEapolKey(FILE *, Packet *);
00051 void PrintNetData(FILE *, u_char *, const int);
00052 void ClearDumpBuf();
00053 void Print2ndHeader(FILE *, Packet *);
00054 void PrintWifiPkt(FILE *, Packet *);
00055 void PrintTrHeader(FILE *, Packet *);
00056 void PrintEthHeader(FILE *, Packet *);
00057 void PrintWifiHeader(FILE *, Packet *);
00058 void PrintSLLHeader(FILE *, Packet *);
00059 void PrintArpHeader(FILE *, Packet *);
00060 void PrintIPHeader(FILE *, Packet *);
00061 void PrintEapolHeader(FILE *, Packet *);
00062 void PrintTCPHeader(FILE *, Packet *);
00063 void PrintEmbeddedTCPHeader(FILE *, Packet *, int);
00064 void PrintTcpOptions(FILE *, Packet *);
00065 void PrintIpOptions(FILE *, Packet *);
00066 void PrintICMPHeader(FILE *, Packet *);
00067 void PrintUDPHeader(FILE *, Packet *);
00068 void PrintEAPHeader(FILE *, Packet *);
00069 void PrintPriorityData(FILE *, int);
00070 void PrintXrefs(FILE *, int);
00071 void CreateTCPFlagString(Packet *, char *);
00072 
00073 
00074 void NoLog(Packet *, char *, void *, Event *);
00075 void NoAlert(Packet *, char *, void *, Event *);
00076 FILE *OpenAlertFile(char *);
00077 
00078 #ifndef WIN32
00079 void SetEvent(Event *, u_int32_t, u_int32_t, u_int32_t, u_int32_t, u_int32_t, 
00080         u_int32_t); 
00081 #else
00082 /* There is a naming conflict with a Win32 standard function, so compensate */
00083 #define SetEvent SnortSetEvent
00084 void SnortSetEvent(Event *, u_int32_t, u_int32_t, u_int32_t, u_int32_t, 
00085         u_int32_t, u_int32_t); 
00086 #endif
00087 
00088 
00089 #endif /* __LOG_H__ */

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