--- dns-flood-detector-1.12.orig/debian/control
+++ dns-flood-detector-1.12/debian/control
@@ -0,0 +1,24 @@
+Source: dns-flood-detector
+Section: net
+Priority: optional
+Maintainer: Jan Wagner <waja@cyconet.org>
+Build-Depends: debhelper (>= 5), dpatch, libpcap0.8-dev
+Homepage: http://www.adotout.com/
+Vcs-Browser: https://scm.uncompleted.org/projects/debian/repository/show/dns-flood-detector
+Vcs-Svn: https://scm.uncompleted.org/svn/debian/dns-flood-detector
+Standards-Version: 3.8.4
+
+Package: dns-flood-detector
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: detect abusive usage levels on high traffic nameservers
+ This package provides the dns-flood-detector daemon.
+ .
+ It was developed to detect abusive usage levels on high traffic nameservers
+ and to enable quick response in halting the use of one's nameserver to
+ facilitate spam.
+ It uses libpcap (in non-promiscuous mode) to monitor incoming dns queries to a
+ nameserver. The tool may be run in one of two modes, either daemon mode or
+ "bindsnap" mode. In daemon mode, the tool will alarm via syslog. In bindsnap
+ mode, the user is able to get near-real-time stats on usage to aid in more
+ detailed troubleshooting.
--- dns-flood-detector-1.12.orig/debian/README.source
+++ dns-flood-detector-1.12/debian/README.source
@@ -0,0 +1,3 @@
+We use dpatch for patch handling inside our package(s).  Please see
+/usr/share/doc/dpatch/README.source.gz (if you have installed dpatch) for
+documentation about dpatch.
--- dns-flood-detector-1.12.orig/debian/default
+++ dns-flood-detector-1.12/debian/default
@@ -0,0 +1,7 @@
+# Defaults for dns-flood-detector initscript
+# sourced by /etc/init.d/dns-flood-detector
+# installed at /etc/default/dns-flood-detector by the maintainer scripts
+
+# options that are passed to the Daemon.
+# here: daemon mode, be more verbose, alarm at > 5/s, stats every 3 secs
+DAEMON_OPTS="-d -v -v -t5 -w3"
--- dns-flood-detector-1.12.orig/debian/watch
+++ dns-flood-detector-1.12/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://www.adotout.com/dnsflood-(.*)\.tgz
--- dns-flood-detector-1.12.orig/debian/dns-flood-detector.8
+++ dns-flood-detector-1.12/debian/dns-flood-detector.8
@@ -0,0 +1,70 @@
+.TH DNS-FLOOD-DETECTOR 8 "2006-11-03" "1.10" "dns flood detection tool"
+
+.SH NAME
+DNS-FLOOD-DETECTOR \- dns flood detection and alert tool
+
+.SH SYNOPSIS
+.B dns-flood-detector
+.RB [\| \-b \||\| \-d \|]
+.RB [\| \-v \|]
+.RB [\| \-h \|]
+.RB [\| \-i
+.IR device \|]
+.RB [\| -t
+.IR n \|]
+.RB [\| -a
+.IR n \|]
+.RB [\| -w
+.IR n \|]
+.RB [\| -x
+.IR n \|]
+.RB [\| -m
+.IR n \|]
+
+.SH DESCRIPTION
+.B DNS Flood Detector
+was developed to detect abusive usage levels on high traffic nameservers and to
+enable quick response to the use of one's nameserver to facilitate spam.
+
+.SH OPTIONS
+.B
+.TP
+.B \-b
+run in foreground in bindsnap mode
+.TP
+.B \-d
+run in background in daemon mode
+.TP
+.B \-v
+verbose output \- use again for more verbosity
+.TP
+.B \-h
+display help
+.TP
+.B \-i device
+specify device name to listen on
+.TP
+.B \-t n
+alarm at >n queries per second
+.TP
+.B \-a n
+reset alarm after n seconds
+.TP
+.B \-w n
+calculate stats every n seconds
+.TP
+.B \-x n
+create n buckets
+.TP
+.B \-m n
+report overall stats every n seconds
+
+.SH SEE ALSO
+.B Website
+<http://www.adotout.com/>
+
+.SH AUTHOR
+DNS-FLOOD-DETECTOR was written by Dennis Opacki <dopacki@adotout.com>.
+.PP
+This manual page was written by Jan Wagner <waja@cyconet.org>,
+for the Debian project (but may be used by others).
--- dns-flood-detector-1.12.orig/debian/preinst
+++ dns-flood-detector-1.12/debian/preinst
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+# generate correct pid file, for versions where was non or incorrect
+if [ "$1" = "upgrade" ] && [ "$2" ] && dpkg --compare-versions "$2" <= "1.12-1"; then
+	pidof dns-flood-detector > /var/run/dns-flood-detector.pid
+fi
+#DEBHELPER#
--- dns-flood-detector-1.12.orig/debian/docs
+++ dns-flood-detector-1.12/debian/docs
@@ -0,0 +1 @@
+README
--- dns-flood-detector-1.12.orig/debian/changelog
+++ dns-flood-detector-1.12/debian/changelog
@@ -0,0 +1,76 @@
+dns-flood-detector (1.12-6) unstable; urgency=low
+
+  * Add "Copyright" to all copyrights in debian/copyright
+  * Updating standards version to 3.8.4
+    - Add README.source
+  * Migrate Vcs-Fields over to scm.uncompleted.org
+  * Add 1.0 to debian/source/format
+  * Add ${misc:Depends} to dependencies
+
+ -- Jan Wagner <waja@cyconet.org>  Wed, 10 Mar 2010 00:07:06 +0100
+
+dns-flood-detector (1.12-5) unstable; urgency=low
+
+  * Updating standards version to 3.8.2, no changes needed
+  * remove absolute path of pidof from preinst
+
+ -- Jan Wagner <waja@cyconet.org>  Sun, 26 Jul 2009 00:31:45 +0200
+
+dns-flood-detector (1.12-4) unstable; urgency=low
+
+  * Updating standards version to 3.8.0, no changes needed
+  * implement machine-interpretable copyright file
+
+ -- Jan Wagner <waja@cyconet.org>  Sun, 20 Jul 2008 12:53:51 +0200
+
+dns-flood-detector (1.12-3) unstable; urgency=low
+
+  * added Vcs- fields, moved Homepage into source header's field
+  * bump standards version to 3.7.3 (no changes needed)
+  * change copyright of packaging to 2008 in debian/copyright
+  * get rid of 'ps aux' in init script and preinst, using pidof instead
+
+ -- Jan Wagner <waja@cyconet.org>  Mon, 14 Apr 2008 22:39:46 +0200
+
+dns-flood-detector (1.12-2) unstable; urgency=low
+
+  * some cosmetic fixes to init script
+  * make start-stop-daemon working instead of using kill (Closes: #431676).
+  * providing upgrade path via preinst
+  * drop own maintainers scripts and make again use of debhelper
+
+ -- Jan Wagner <waja@cyconet.org>  Wed, 04 Jul 2007 12:29:06 +0200
+
+dns-flood-detector (1.12-1) unstable; urgency=medium
+
+  * New upstream release
+  * modified fix_prototyp patch for upstream
+
+ -- Jan Wagner <waja@cyconet.org>  Thu, 23 Nov 2006 13:35:11 +0100
+
+dns-flood-detector (1.10-4) unstable; urgency=low
+
+  * included fix_prototyp patch provided by "dann frazier <dannf@debian.org>"
+    (Closes: #399283).
+  * build depend to dpatch
+
+ -- Jan Wagner <waja@cyconet.org>  Sun, 19 Nov 2006 10:18:55 +0100
+
+dns-flood-detector (1.10-3) unstable; urgency=low
+
+  * using killall in init script to get daemon stopped
+  * same for prerm
+
+ -- Jan Wagner <waja@cyconet.org>  Thu,  9 Nov 2006 20:49:10 +0100
+
+dns-flood-detector (1.10-2) unstable; urgency=low
+
+  * fixed typo in initscript
+
+ -- Jan Wagner <waja@cyconet.org>  Sat,  4 Nov 2006 21:46:03 +0100
+
+dns-flood-detector (1.10-1) unstable; urgency=low
+
+  * Initial release (Closes: #396618).
+
+ -- Jan Wagner <waja@cyconet.org>  Fri,  3 Nov 2006 12:39:42 +0100
--- dns-flood-detector-1.12.orig/debian/copyright
+++ dns-flood-detector-1.12/debian/copyright
@@ -0,0 +1,32 @@
+Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
+Packaged-By: Jan Wagner <waja@cyconet.org>
+Packaged-Date: Fri,  3 Nov 2006 12:39:42 +0100
+Upstream-Name: DNS Flood Detector
+Upstream-Maintainer: Dennis Opacki <dopacki@adotout.com>
+Upstream-Source: http://www.adotout.com/
+
+Files: *
+Copyright: Copyright (C) 2003 Dennis Opacki <dopacki@adotout.com>
+License: GPL-2+
+
+Files: debian/*
+Copyright: Copyright (C) 2006, 2008 Jan Wagner <waja@cyconet.org>
+License: GPL-2+
+
+License: GPL-2+
+        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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ On Debian systems, the complete text of the GNU General Public License can be
+ found in /usr/share/common-licenses/GPL-2 file.
--- dns-flood-detector-1.12.orig/debian/rules
+++ dns-flood-detector-1.12/debian/rules
@@ -0,0 +1,70 @@
+#!/usr/bin/make -f
+# written by Jan Wagner <waja@cyconet.org>
+#
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+include /usr/share/dpatch/dpatch.make
+
+CFLAGS += -D_BSD_SOURCE -Wall -g
+LDLIBS += -lpcap -lpthread -lm
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+build: build-stamp
+build-stamp: patch-stamp
+	dh_testdir
+	# Add here commands to compile the package.
+	$(CC) $(CFLAGS) dns_flood_detector.c $(LDLIBS) -o dns_flood_detector
+
+	touch $@
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+
+	# Add here commands to clean up after the build process.
+	rm -rf dns_flood_detector *.o *~
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# Add here commands to install the package into debian/dns-flood-detector.
+	install -D -m 0755 dns_flood_detector debian/dns-flood-detector/usr/bin/dns-flood-detector
+	install -D -m 0644 debian/default debian/dns-flood-detector/etc/default/dns-flood-detector
+	install -D -m 0755 debian/init.d debian/dns-flood-detector/etc/init.d/dns-flood-detector
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_installman debian/dns-flood-detector.8
+	dh_installinit -- defaults 40
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_shlibdeps
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- dns-flood-detector-1.12.orig/debian/init.d
+++ dns-flood-detector-1.12/debian/init.d
@@ -0,0 +1,64 @@
+#!/bin/sh
+#		Written by Miquel van Smoorenburg <miquels@cistron.nl>.
+#		Modified for Debian
+#		by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+#
+# Version:	@(#)skeleton  1.9  26-Feb-2001  miquels@cistron.nl
+# /etc/init.d/dns-flood-detector: v1 2006/11/03 Jan Wagner <waja@cyconet.org>
+
+### BEGIN INIT INFO
+# Provides: dns-flood-detector
+# Required-Start: $local_fs $network $remote_fs $syslog
+# Required-Stop: $local_fs $network $remote_fs $syslog
+# Default-Start:  2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: start and stop the dns-flood-detector daemon
+# Description:  detect abusive usage levels on high traffic nameservers
+### END INIT INFO
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/bin/dns-flood-detector
+NAME=dns-flood-detector
+DESC=dns-flood-detector
+
+test -x $DAEMON || exit 0
+
+# Include dns-flood-detector defaults if available
+if [ -f /etc/default/dns-flood-detector ] ; then
+	. /etc/default/dns-flood-detector
+fi
+
+set -e
+
+case "$1" in
+  start)
+	echo -n "Starting $DESC: "
+	start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
+		--exec $DAEMON -- $DAEMON_OPTS
+	/bin/pidof $DAEMON > /var/run/$NAME.pid
+	echo "$NAME."
+	;;
+  stop)
+	echo -n "Stopping $DESC: "
+	start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
+		--exec $DAEMON
+	echo "$NAME."
+	;;
+  restart|force-reload)
+	echo -n "Restarting $DESC: "
+	start-stop-daemon --stop --quiet --pidfile \
+		/var/run/$NAME.pid --exec $DAEMON
+	start-stop-daemon --start --quiet --pidfile \
+		/var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
+	/bin/pidof $DAEMON > /var/run/$NAME.pid
+	echo "$NAME."
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+	echo "Usage: $N {start|stop|restart|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
--- dns-flood-detector-1.12.orig/debian/compat
+++ dns-flood-detector-1.12/debian/compat
@@ -0,0 +1 @@
+5
--- dns-flood-detector-1.12.orig/debian/source/format
+++ dns-flood-detector-1.12/debian/source/format
@@ -0,0 +1 @@
+1.0
--- dns-flood-detector-1.12.orig/debian/patches/01_fix_prototyp.dpatch
+++ dns-flood-detector-1.12/debian/patches/01_fix_prototyp.dpatch
@@ -0,0 +1,17 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 01_fix_prototyp.dpatch by dann frazier <dannf@debian.org>
+##
+## DP: fix missing function prototype definition 
+
+@DPATCH@
+
+--- dns-flood-detector-1.10/dns_flood_detector.c~       2003-12-29 20:53:38.000000000 -0700
++++ dns-flood-detector-1.10/dns_flood_detector.c        2006-11-18 17:38:47.000000000 -0700
+@@ -79,6 +79,7 @@
+ #include <stdlib.h>
+ #include <fcntl.h>
+ #include <errno.h>
++#include <sys/socket.h>
+ #include <netinet/in_systm.h>
+ #include <netinet/in.h>
+ #include <netinet/ip.h>
--- dns-flood-detector-1.12.orig/debian/patches/00list
+++ dns-flood-detector-1.12/debian/patches/00list
@@ -0,0 +1 @@
+01_fix_prototyp.dpatch
