1 /* 2 ** Copyright (C) 2002-2009 Sourcefire, Inc. 3 ** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com> 4 ** 5 ** This program is free software; you can redistribute it and/or modify 6 ** it under the terms of the GNU General Public License Version 2 as 7 ** published by the Free Software Foundation. You may not use, modify or 8 ** distribute this program under any other version of the GNU General 9 ** Public License. 10 ** 11 ** This program is distributed in the hope that it will be useful, 12 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 13 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 ** GNU General Public License for more details. 15 ** 16 ** You should have received a copy of the GNU General Public License 17 ** along with this program; if not, write to the Free Software 18 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 */ 20 21 /* $Id$ */ 22 #ifndef __LOG_H__ 23 #define __LOG_H__ 24 25 #ifdef HAVE_CONFIG_H 26 #include "config.h" 27 #endif 28 29 #include <syslog.h> 30 31 #include "decode.h" 32 33 #if defined (SUNOS) || defined (SOLARIS) || defined (HPUX) || defined (IRIX) \ 34 || defined (AIX) || defined (OSF1) 35 #define LOG_AUTHPRIV LOG_AUTH 36 #endif 37 38 #ifndef LOG_AUTHPRIV 39 #define LOG_AUTHPRIV LOG_AUTH 40 #endif 41 42 #define FRAME_SIZE 66 43 #define C_OFFSET 49 44 45 /* P R O T O T Y P E S ******************************************************/ 46 47 48 void PrintIPPkt(FILE *, int,Packet*); 49 void PrintEapolPkt(FILE *, Packet *); 50 void PrintEapolKey(FILE *, Packet *); 51 void PrintNetData(FILE *, const u_char *, const int); 52 void ClearDumpBuf(void); 53 void Print2ndHeader(FILE *, Packet *); 54 void PrintEthHeader(FILE *, Packet *); 55 #ifdef MPLS 56 void PrintMPLSHeader(FILE *, Packet *); 57 #endif 58 void PrintIPHeader(FILE *, Packet *); 59 void PrintTCPHeader(FILE *, Packet *); 60 void PrintTcpOptions(FILE *, Packet *); 61 void PrintIpOptions(FILE *, Packet *); 62 void PrintICMPHeader(FILE *, Packet *); 63 void PrintICMPEmbeddedIP(FILE *, Packet *); 64 void PrintEmbeddedICMPHeader(FILE *, const ICMPHdr *); 65 void PrintUDPHeader(FILE *, Packet *); 66 void PrintPriorityData(FILE *, int); 67 void PrintXrefs(FILE *, int); 68 void CreateTCPFlagString(Packet *, char *); 69 70 #ifndef NO_NON_ETHER_DECODER 71 void PrintEapolPkt(FILE *, Packet *); 72 void PrintEapolKey(FILE *, Packet *); 73 void PrintWifiPkt(FILE *, Packet *); 74 void PrintTrHeader(FILE *, Packet *); 75 void PrintWifiHeader(FILE *, Packet *); 76 void PrintSLLHeader(FILE *, Packet *); 77 void PrintArpHeader(FILE *, Packet *); 78 void PrintEapolHeader(FILE *, Packet *); 79 void PrintEAPHeader(FILE *, Packet *); 80 #endif 81 82 void NoLog(Packet *, char *, void *, void *); 83 void NoAlert(Packet *, char *, void *, void *); 84 FILE *OpenAlertFile(const char *); 85 int RollAlertFile(const char *); 86 87 #endif /* __LOG_H__ */ 88 89