/* pdumpq - Pcap Dump for Linux/Netfilter QUEUE * * Copyright (C) 2001 Ian Jones * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef Q_TIME #define Q_TIME 120 /* max seconds before flushing queue */ #endif #ifndef MAX_Q #define MAX_Q 30 /* max alerts before flushing queue */ #endif #ifndef MAILCMD /* You can set this to any command which will accept stdin */ #define MAILCMD "/usr/local/sbin/tcpdump -vvvnxXr - | /bin/mail -s \"IPQueue Alert\" " //#define MAILCMD "/usr/local/bin/tethereal -xr /dev/stdin | /bin/mail -s \"IPQueue Alert\" " //#define MAILCMD "/usr/local/bin/snort -vdqXTr - 2>/dev/null | /bin/mail -s \"IPQueue Alert\" " #endif /* MAILCMD */ typedef struct _Queue { int flush; int num; size_t size; char *queue; FILE *stream; } Queue; Queue *queue; void mail_init (void); void mail (void);