00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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
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
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