summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2010-01-27 17:11:16 -0800
committerSam Roberts <vieuxtech@gmail.com>2010-01-27 17:11:16 -0800
commit29ab1bfc1be2c97fb32e9564bcf33bba43c14136 (patch)
treeb638140bfeb5e0b9e9e72cad3ab856bba10ded9f /debian
parent76f9a66807a8b337a0eb7d8497efc57229a68512 (diff)
downloadlibnet-29ab1bfc1be2c97fb32e9564bcf33bba43c14136.tar.gz
Added ability to build a debian package directly from git.
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/build-pkg6
-rw-r--r--debian/changelog6
-rw-r--r--debian/compat1
-rw-r--r--debian/control85
-rw-r--r--debian/copyright234
-rw-r--r--debian/files4
-rw-r--r--debian/libnet-config.133
-rw-r--r--debian/libnet1-dev.README.Debian31
-rw-r--r--debian/libnet1-dev.dirs4
-rw-r--r--debian/libnet1-dev.install5
-rw-r--r--debian/libnet1-dev.manpages4
-rw-r--r--debian/libnet1-doc.doc-base10
-rw-r--r--debian/libnet1-doc.docs10
-rw-r--r--debian/libnet1-doc.examples2
-rw-r--r--debian/libnet1-doc.postinst.debhelper5
-rw-r--r--debian/libnet1-doc.prerm.debhelper6
-rw-r--r--debian/libnet1.dirs2
-rw-r--r--debian/libnet1.docs4
-rw-r--r--debian/libnet1.install1
-rw-r--r--debian/libnet1.postinst.debhelper5
-rw-r--r--debian/libnet1.postrm.debhelper5
-rw-r--r--debian/libnet1.substvars1
-rw-r--r--debian/libnet1.symbols158
-rw-r--r--debian/patches/00-fix_build_process.patch246
-rw-r--r--debian/patches/01-fix_libnet-functions.h.3.patch839
-rw-r--r--debian/patches/02-fix_libnet_802_1q_hdr.3.patch11
-rw-r--r--debian/patches/03-fix_libnet_802_1x_hdr.3.patch11
-rw-r--r--debian/patches/04-fix_libnet_build_ntp.patch13
-rw-r--r--debian/patches/05-fix_libnet_pblock_coalesce_buffer_overrun.patch11
-rw-r--r--debian/patches/06-fix_libnet_pblock_coalesce_leak.patch49
-rw-r--r--debian/patches/07-add_libnet-cq-end-loop.patch32
-rw-r--r--debian/patches/08-fix_libnet_checksum.c.patch23
-rw-r--r--debian/patches/09-fix_hurd-i386_build.patch11
-rw-r--r--debian/patches/series10
-rwxr-xr-xdebian/rules102
-rw-r--r--debian/watch2
36 files changed, 1982 insertions, 0 deletions
diff --git a/debian/build-pkg b/debian/build-pkg
new file mode 100755
index 0000000..34c549e
--- /dev/null
+++ b/debian/build-pkg
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+#V=`svn info . | grep Revision | sed -e's/.*: //'`
+#sed -e"s/%SVNREVISION%/$V/" < debian/changelog.template > debian/changelog
+dpkg-buildpackage -b -us -uc -rfakeroot -i -I.svn -I.swp
+
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..ed53c7c
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,6 @@
+libnet (VERSION) unstable; urgency=low
+
+ * libnet package built from git source
+
+ -- Sam Roberts <vieuxtech@gmail.com> DATE
+
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..1e8b314
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+6
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..0e84fc0
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,85 @@
+Source: libnet
+Section: net
+Priority: optional
+Maintainer: David Paleino <d.paleino@gmail.com>
+Uploaders: Chris Hanson <cph@debian.org>
+Build-Depends: debhelper, sharutils, libpcap-dev, quilt,
+ autotools-dev, automake, autoconf, libtool
+Standards-Version: 3.8.0
+Homepage: http://www.packetfactory.net/libnet
+
+Package: libnet1
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}
+Description: library for the construction and handling of network packets
+ libnet provides a portable framework for low-level network packet
+ writing and handling.
+ .
+ libnet features portable packet creation interfaces at the IP layer
+ and link layer, as well as a host of supplementary functionality.
+ .
+ Using libnet, quick and simple packet assembly applications can be
+ whipped up with little effort. With a bit more time, more complex
+ programs can be written (Traceroute and ping were easily rewritten
+ using libnet and libpcap).
+ .
+ This package contains the shared library.
+
+Package: libnet1-dbg
+Architecture: any
+Priority: extra
+Section: libs
+Depends: ${shlibs:Depends}, libnet1 (= ${binary:Version})
+Description: debugging symbols for libnet
+ libnet provides a portable framework for low-level network packet
+ writing and handling.
+ .
+ libnet features portable packet creation interfaces at the IP layer
+ and link layer, as well as a host of supplementary functionality.
+ .
+ Using libnet, quick and simple packet assembly applications can be
+ whipped up with little effort. With a bit more time, more complex
+ programs can be written (Traceroute and ping were easily rewritten
+ using libnet and libpcap).
+ .
+ This package contains the debugging symbols for libnet.
+
+Package: libnet1-dev
+Architecture: any
+Section: libdevel
+Provides: libnet-dev
+Conflicts: libnet-dev
+Depends: libc6-dev, libnet1 (= ${binary:Version})
+Description: development files for libnet
+ libnet provides a portable framework for low-level network packet
+ writing and handling.
+ .
+ libnet features portable packet creation interfaces at the IP layer
+ and link layer, as well as a host of supplementary functionality.
+ .
+ Using libnet, quick and simple packet assembly applications can be
+ whipped up with little effort. With a bit more time, more complex
+ programs can be written (Traceroute and ping were easily rewritten
+ using libnet and libpcap).
+ .
+ This package contains the files needed to compile and link programs
+ that use libnet.
+
+Package: libnet1-doc
+Architecture: all
+Section: doc
+Suggests: libnet1-dev
+Description: developers documentation files for libnet
+ libnet provides a portable framework for low-level network packet
+ writing and handling.
+ .
+ libnet features portable packet creation interfaces at the IP layer
+ and link layer, as well as a host of supplementary functionality.
+ .
+ Using libnet, quick and simple packet assembly applications can be
+ whipped up with little effort. With a bit more time, more complex
+ programs can be written (Traceroute and ping were easily rewritten
+ using libnet and libpcap).
+ .
+ This package contains the documentation files for developers.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..b776c81
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,234 @@
+Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat
+Upstream-Author: Mike D. Schiffman <mike@infonexus.com>
+Packaged-By: Domenico Andreoli <cavok@debian.org>
+Packaged-Date: Mon, 18 Nov 2002 23:53:40 +0100
+Original-Source-Location: http://www.packetfactory.net/libnet/
+
+Files: debian/*
+Copyright: © 2008, David Paleino <d.paleino@gmail.com>
+ © 2002-2008, Domenico Andreoli <cavok@debian.org>
+License: BSD-2
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED.IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+Files: include/bpf.h
+ include/win32/getopt.h
+ include/win32/in_systm.h
+ sample/win32/getopt.c
+Copyright: © 1982-1997, The Regents of the University of California
+License: BSD-4
+ * This code is derived from the Stanford/CMU enet packet filter,
+ * (net/enet.c) distributed as part of 4.3BSD, and code contributed
+ * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
+ * Berkeley Laboratory.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+
+Files: include/ifaddrlist.h
+Copyright: © 1997, The Regents of the University of California
+License: BSD-3
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code distributions
+ * retain the above copyright notice and this paragraph in its entirety, (2)
+ * distributions including binary code include the above copyright notice and
+ * this paragraph in its entirety in the documentation or other materials
+ * provided with the distribution, and (3) all advertising materials mentioning
+ * features or use of this software display the following acknowledgement:
+ * ``This product includes software developed by the University of California,
+ * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
+ * the University nor the names of its contributors may be used to endorse
+ * or promote products derived from this software without specific prior
+ * written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+Files: include/libnet/libnet-asn1.h
+Copyright: © 1998-2004, Mike D. Schiffman <mike@infonexus.com>
+ © 1988-1989, Carnegie Mellon University
+License: BSD-2 | other
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the name of CMU not be
+ * used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission.
+ *
+ * CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+ * CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+
+Files: sample/bgp4*
+ sample/dns.c
+ sample/gre.c
+ sample/ip_link.c
+ sample/ip_raw.c
+ sample/sebek.c
+ sample/tftp.c
+ src/libnet_build_bgp.c
+ src/libnet_build_gre.c
+Copyright: © 2003-2004 Frédéric Raynal <pappy@security-labs.org>
+License: BSD-2
+
+Files: sample/icmp_redirect.c
+Copyright: © 1998-2004, Mike D. Schiffman <mike@infonexus.com>
+ © 2003, Alberto Ornaghi <alor@antifork.org>
+License: BSD-2
+
+Files: sample/icmp_timeexceed.c
+ src/libnet_build_sebek.c
+ src/libnet_cq.c
+Copyright: © 1998-2004, Mike D. Schiffman <mike@infonexus.com>
+ © 2003, Frédéric Raynal <pappy@security-labs.org>
+License: BSD-2
+
+Files: sample/ospf*
+ src/libnet_build_ospf.c
+Copyright: © 1998-2004, Mike D. Schiffman <mike@infonexus.com>
+ © 1999-2000, Andrew Reiter <areiter@bindview.com>
+License: BSD-2
+
+Files: sample/ping_of_death.c
+Copyright: © 1998-2004, Mike D. Schiffman <mike@infonexus.com>
+ © 1999-2001, Dug Song <dugsong@monkey.org>
+License: BSD-2
+
+Files: srct/libnet_asn1.c
+Copyright: © 1998-2004, Mike D. Schiffman <mike@infonexus.com>
+ © 1988-1992, Carnegie Mellon University
+ © 1993-1996, 1998, The Regents of the University of California
+License: BSD-3 | other
+==> BSD-3 <==
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code distributions
+ * retain the above copyright notice and this paragraph in its entirety, (2)
+ * distributions including binary code include the above copyright notice and
+ * this paragraph in its entirety in the documentation or other materials
+ * provided with the distribution, and (3) all advertising materials mentioning
+ * features or use of this software display the following acknowledgement:
+ * ``This product includes software developed by the University of California,
+ * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
+ * the University nor the names of its contributors may be used to endorse
+ * or promote products derived from this software without specific prior
+ * written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+==> other <==
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the name of CMU not be
+ * used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission.
+ *
+ * CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+ * CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+
+Files: src/libnet_build_fddi.c
+ src/libnet_build_rpc.c
+ src/libnet_build_token_ring.c
+Copyright: © 1998-2004, Mike D. Schiffman <mike@infonexus.com>
+ © Jason Damron <jsdamron@hushmail.com> <jdamron@stackheap.org>
+License: BSD-2
+
+Files: src/libnet_build_ipsec.c
+Copyright: © 1998-2004, Mike D. Schiffman <mike@infonexus.com>
+ © 2002, Jose Nazario <jose@crimelabs.net>
+License: BSD-2
+
+Files: src/libnet_build_link.c
+ src/libnet_write.c
+Copyright: © 1998-2004, Mike D. Schiffman <mike@infonexus.com>
+ © 2003, Roberto Larcher <roberto.larcher@libero.it>
+License: BSD-2
+
+Files: src/libnet_dll.c
+Copyright: © 2002, Roberto Larcher <roberto.larcher@libero.it>
+License: BSD-2
+
+Files: src/libnet_link_dlpi.c
+Copyright: © 1998-2004, Mike D. Schiffman <mike@infonexus.com>
+ © 1993-1997, The Regents of the University of California
+ © Atanu Ghosh <atanu@cs.ucl.ac.uk>, University College London
+License: BSD-3
+
+Files: src/libnet_link_nit.c
+ src/libnet_link_none.c
+ src/libnet_link_pf.c
+ src/libnet_link_snoop.c
+Copyright: © 1998-2004, Mike D. Schiffman <mike@infonexus.com>
+ © 1990-1996, 1998, The Regents of the University of California.
+License: BSD-3
+
+Files: src/libnet_link_snit.c
+Copyright: © 1998-2004, Mike D. Schiffman <mike@infonexus.com>
+ © 1990-1996, 1998, The Regents of the University of California.
+ © 1989, Micky Liu <micky@cunixc.cc.columbia.edu>, Columbia University
+License: BSD-3
+
+Files: src/libnet_link_win32.c
+Copyright: © 1998-2004, Mike D. Schiffman <mike@infonexus.com>
+ © 2001-2002, Don Bowman <don@sandvine.com>
+ © 2002, Roberto Larcher <roberto.larcher@libero.it>
+License: BSD-2
+
+Files: *
+Copyright: © 1998-2004, Mike D. Schiffman <mike@infonexus.com>
+License: BSD-2
diff --git a/debian/files b/debian/files
new file mode 100644
index 0000000..faf8d48
--- /dev/null
+++ b/debian/files
@@ -0,0 +1,4 @@
+libnet1_1.1.2.1-4._amd64.deb libs optional
+libnet1-dbg_1.1.2.1-4._amd64.deb libs extra
+libnet1-dev_1.1.2.1-4._amd64.deb libdevel optional
+libnet1-doc_1.1.2.1-4._all.deb doc optional
diff --git a/debian/libnet-config.1 b/debian/libnet-config.1
new file mode 100644
index 0000000..28b74ea
--- /dev/null
+++ b/debian/libnet-config.1
@@ -0,0 +1,33 @@
+.\" Written by Domenico Andreoli for Debian GNU/Linux.
+.\" Do whatever you want with this file.
+.\" NO warranty is provided.
+.TH libnet-config 1 "18 November 2002" "Libnet 1.1.0" "libnet-config manual"
+.SH NAME
+libnet-config \- Get information about a libnet installation
+.SH SYNOPSIS
+.B libnet-config [options]
+.SH DESCRIPTION
+.B libnet-config
+displays information about a previous libnet installation.
+.SH OPTIONS
+.IP "--cflags"
+Set of compiler options (CFLAGS) to use when compiling files that use
+libnet.
+.IP "--libs"
+Shows the complete set of libs and other linker options you will need in order
+to link your application with libnet.
+.IP "--defines"
+Set of compiler defines used to compile libnet.
+.SH "EXAMPLES"
+What linker options do I need when I link with libnet?
+
+ libnet-config \-\-libs
+
+What compiler options do I need when I compile using libnet functions?
+
+ libnet-config \-\-cflags
+.SH SEE ALSO
+.BR libnet (3)
+.SH AUTHOR
+This manual page was written by Domenico Andreoli <cavok@debian.org>
+for the Debian GNU/Linux system (but may be used by others).
diff --git a/debian/libnet1-dev.README.Debian b/debian/libnet1-dev.README.Debian
new file mode 100644
index 0000000..a51106f
--- /dev/null
+++ b/debian/libnet1-dev.README.Debian
@@ -0,0 +1,31 @@
+Message received at 224674@bugs.debian.org:
+
+Date: Tue, 6 Jan 2004 17:13:04 +0100
+From: Enrico Zini <zinie@cs.unibo.it>
+
+...
+
+ From what I've seen in the libnet mailing list, the current libnet
+package still has documentation and function export issues:
+
+ - if that function is only used internally, it should not be exported
+ in the header file
+ - the HTML documentation seems to refer to the old API of libnet
+ - I've later found out that the manpage suggests to create many libnet
+ contexts if one wants to create many packets at a time; although I
+ don't really like that idea, there is a documented way of doing it
+ and many packets can be created without using libnet_pblock_coalesce
+ - In the mailing list, sandr8 suggests to use libnet_adv_cull_packet(),
+ however that function is not documented in the manpage, but only as a
+ short comment in the header file, which doesn't tell how and if the
+ resulting packet should be deallocated
+ - In the mailing list, sandr8 and Mike Schiffman suggest using the
+ context queue interface, for which I haven't found any documented
+ overview on what its concepts are, but only the single functions
+ briefly documented in the header file
+ - Mike Schiffman also talks about initializing libnet with the ADVANCED
+ interface, but again I only found the LIBNET_????_ADV constants
+ briefly documented, with no overview on what the advanced mode is and
+ does
+
+...
diff --git a/debian/libnet1-dev.dirs b/debian/libnet1-dev.dirs
new file mode 100644
index 0000000..835e4d9
--- /dev/null
+++ b/debian/libnet1-dev.dirs
@@ -0,0 +1,4 @@
+usr/lib
+usr/include
+usr/share/doc/libnet1-dev
+usr/share/man/man3
diff --git a/debian/libnet1-dev.install b/debian/libnet1-dev.install
new file mode 100644
index 0000000..8507350
--- /dev/null
+++ b/debian/libnet1-dev.install
@@ -0,0 +1,5 @@
+usr/bin/libnet-config
+usr/lib/libnet.a
+usr/lib/libnet.la
+usr/lib/libnet.so
+usr/include
diff --git a/debian/libnet1-dev.manpages b/debian/libnet1-dev.manpages
new file mode 100644
index 0000000..a6f808a
--- /dev/null
+++ b/debian/libnet1-dev.manpages
@@ -0,0 +1,4 @@
+debian/libnet-config.1
+doc/man/man3/libnet-macros.h.3
+doc/man/man3/libnet.h.3
+doc/man/man3/libnet-functions.h.3
diff --git a/debian/libnet1-doc.doc-base b/debian/libnet1-doc.doc-base
new file mode 100644
index 0000000..6b9df63
--- /dev/null
+++ b/debian/libnet1-doc.doc-base
@@ -0,0 +1,10 @@
+Document: libnet1-doc
+Title: Libnet Packet Assembly Library
+Author: Mike D. Schiffman
+Abstract: This manual describes to developers
+ how to use the LibNet library
+Section: Programming
+
+Format: HTML
+Index: /usr/share/doc/libnet1-doc/html/index.html
+Files: /usr/share/doc/libnet1-doc/html/*.html
diff --git a/debian/libnet1-doc.docs b/debian/libnet1-doc.docs
new file mode 100644
index 0000000..d895ec4
--- /dev/null
+++ b/debian/libnet1-doc.docs
@@ -0,0 +1,10 @@
+README
+doc/BUGS
+doc/CONTRIB
+doc/TODO
+doc/DESIGN_NOTES
+doc/MIGRATION
+doc/PACKET_BUILDING
+doc/PORTED
+doc/RAWSOCKET_NON_SEQUITUR
+doc/html/
diff --git a/debian/libnet1-doc.examples b/debian/libnet1-doc.examples
new file mode 100644
index 0000000..a5ced5a
--- /dev/null
+++ b/debian/libnet1-doc.examples
@@ -0,0 +1,2 @@
+sample/*.c
+sample/*.h
diff --git a/debian/libnet1-doc.postinst.debhelper b/debian/libnet1-doc.postinst.debhelper
new file mode 100644
index 0000000..bc031e9
--- /dev/null
+++ b/debian/libnet1-doc.postinst.debhelper
@@ -0,0 +1,5 @@
+# Automatically added by dh_installdocs
+if [ "$1" = configure ] && which install-docs >/dev/null 2>&1; then
+ install-docs -i /usr/share/doc-base/libnet1-doc
+fi
+# End automatically added section
diff --git a/debian/libnet1-doc.prerm.debhelper b/debian/libnet1-doc.prerm.debhelper
new file mode 100644
index 0000000..a9daf4d
--- /dev/null
+++ b/debian/libnet1-doc.prerm.debhelper
@@ -0,0 +1,6 @@
+# Automatically added by dh_installdocs
+if [ "$1" = remove ] || [ "$1" = upgrade ] && \
+ which install-docs >/dev/null 2>&1; then
+ install-docs -r libnet1-doc
+fi
+# End automatically added section
diff --git a/debian/libnet1.dirs b/debian/libnet1.dirs
new file mode 100644
index 0000000..4a6ae2c
--- /dev/null
+++ b/debian/libnet1.dirs
@@ -0,0 +1,2 @@
+usr/lib
+usr/share/doc/libnet1
diff --git a/debian/libnet1.docs b/debian/libnet1.docs
new file mode 100644
index 0000000..a7cd0cb
--- /dev/null
+++ b/debian/libnet1.docs
@@ -0,0 +1,4 @@
+README
+doc/BUGS
+doc/CONTRIB
+doc/TODO
diff --git a/debian/libnet1.install b/debian/libnet1.install
new file mode 100644
index 0000000..c6ab3ca
--- /dev/null
+++ b/debian/libnet1.install
@@ -0,0 +1 @@
+usr/lib/libnet.so.*
diff --git a/debian/libnet1.postinst.debhelper b/debian/libnet1.postinst.debhelper
new file mode 100644
index 0000000..3d89d3e
--- /dev/null
+++ b/debian/libnet1.postinst.debhelper
@@ -0,0 +1,5 @@
+# Automatically added by dh_makeshlibs
+if [ "$1" = "configure" ]; then
+ ldconfig
+fi
+# End automatically added section
diff --git a/debian/libnet1.postrm.debhelper b/debian/libnet1.postrm.debhelper
new file mode 100644
index 0000000..7f44047
--- /dev/null
+++ b/debian/libnet1.postrm.debhelper
@@ -0,0 +1,5 @@
+# Automatically added by dh_makeshlibs
+if [ "$1" = "remove" ]; then
+ ldconfig
+fi
+# End automatically added section
diff --git a/debian/libnet1.substvars b/debian/libnet1.substvars
new file mode 100644
index 0000000..17c2baa
--- /dev/null
+++ b/debian/libnet1.substvars
@@ -0,0 +1 @@
+shlibs:Depends=libc6 (>= 2.6-1)
diff --git a/debian/libnet1.symbols b/debian/libnet1.symbols
new file mode 100644
index 0000000..e56aca8
--- /dev/null
+++ b/debian/libnet1.symbols
@@ -0,0 +1,158 @@
+libnet.so.1 libnet1 #MINVER#
+ __libnet_print_vers@Base 1.1.2.1
+ all_lists@Base 1.1.2.1
+ in6addr_error@Base 1.1.2.1
+ libnet_addr2name4@Base 1.1.2.1
+ libnet_addr2name4_r@Base 1.1.2.1
+ libnet_addr2name6_r@Base 1.1.2.1
+ libnet_adv_cull_header@Base 1.1.2.1
+ libnet_adv_cull_packet@Base 1.1.2.1
+ libnet_adv_free_packet@Base 1.1.2.1
+ libnet_adv_write_link@Base 1.1.2.1
+ libnet_autobuild_arp@Base 1.1.2.1
+ libnet_autobuild_ethernet@Base 1.1.2.1
+ libnet_autobuild_fddi@Base 1.1.2.1
+ libnet_autobuild_ipv4@Base 1.1.2.1
+ libnet_autobuild_ipv6@Base 1.1.2.1
+ libnet_autobuild_token_ring@Base 1.1.2.1
+ libnet_build_802_1q@Base 1.1.2.1
+ libnet_build_802_1x@Base 1.1.2.1
+ libnet_build_802_2@Base 1.1.2.1
+ libnet_build_802_2snap@Base 1.1.2.1
+ libnet_build_802_3@Base 1.1.2.1
+ libnet_build_arp@Base 1.1.2.1
+ libnet_build_asn1_bitstring@Base 1.1.2.1
+ libnet_build_asn1_header@Base 1.1.2.1
+ libnet_build_asn1_int@Base 1.1.2.1
+ libnet_build_asn1_length@Base 1.1.2.1
+ libnet_build_asn1_null@Base 1.1.2.1
+ libnet_build_asn1_objid@Base 1.1.2.1
+ libnet_build_asn1_sequence@Base 1.1.2.1
+ libnet_build_asn1_string@Base 1.1.2.1
+ libnet_build_asn1_uint@Base 1.1.2.1
+ libnet_build_bgp4_header@Base 1.1.2.1
+ libnet_build_bgp4_notification@Base 1.1.2.1
+ libnet_build_bgp4_open@Base 1.1.2.1
+ libnet_build_bgp4_update@Base 1.1.2.1
+ libnet_build_bootpv4@Base 1.1.2.1
+ libnet_build_cdp@Base 1.1.2.1
+ libnet_build_cdp_value@Base 1.1.2.1
+ libnet_build_data@Base 1.1.2.1
+ libnet_build_dhcpv4@Base 1.1.2.1
+ libnet_build_dnsv4@Base 1.1.2.1
+ libnet_build_egre@Base 1.1.2.1
+ libnet_build_ethernet@Base 1.1.2.1
+ libnet_build_fddi@Base 1.1.2.1
+ libnet_build_gre@Base 1.1.2.1
+ libnet_build_gre_last_sre@Base 1.1.2.1
+ libnet_build_gre_sre@Base 1.1.2.1
+ libnet_build_icmpv4_echo@Base 1.1.2.1
+ libnet_build_icmpv4_mask@Base 1.1.2.1
+ libnet_build_icmpv4_redirect@Base 1.1.2.1
+ libnet_build_icmpv4_timeexceed@Base 1.1.2.1
+ libnet_build_icmpv4_timestamp@Base 1.1.2.1
+ libnet_build_icmpv4_unreach@Base 1.1.2.1
+ libnet_build_igmp@Base 1.1.2.1
+ libnet_build_ipsec_ah@Base 1.1.2.1
+ libnet_build_ipsec_esp_ftr@Base 1.1.2.1
+ libnet_build_ipsec_esp_hdr@Base 1.1.2.1
+ libnet_build_ipv4@Base 1.1.2.1
+ libnet_build_ipv4_options@Base 1.1.2.1
+ libnet_build_ipv6@Base 1.1.2.1
+ libnet_build_ipv6_destopts@Base 1.1.2.1
+ libnet_build_ipv6_frag@Base 1.1.2.1
+ libnet_build_ipv6_hbhopts@Base 1.1.2.1
+ libnet_build_ipv6_routing@Base 1.1.2.1
+ libnet_build_isl@Base 1.1.2.1
+ libnet_build_mpls@Base 1.1.2.1
+ libnet_build_ntp@Base 1.1.2.1
+ libnet_build_ospfv2@Base 1.1.2.1
+ libnet_build_ospfv2_dbd@Base 1.1.2.1
+ libnet_build_ospfv2_hello@Base 1.1.2.1
+ libnet_build_ospfv2_lsa@Base 1.1.2.1
+ libnet_build_ospfv2_lsa_as@Base 1.1.2.1
+ libnet_build_ospfv2_lsa_net@Base 1.1.2.1
+ libnet_build_ospfv2_lsa_rtr@Base 1.1.2.1
+ libnet_build_ospfv2_lsa_sum@Base 1.1.2.1
+ libnet_build_ospfv2_lsr@Base 1.1.2.1
+ libnet_build_ospfv2_lsu@Base 1.1.2.1
+ libnet_build_rip@Base 1.1.2.1
+ libnet_build_rpc_call@Base 1.1.2.1
+ libnet_build_sebek@Base 1.1.2.1
+ libnet_build_snmp@Base 1.1.2.1
+ libnet_build_stp_conf@Base 1.1.2.1
+ libnet_build_stp_tcn@Base 1.1.2.1
+ libnet_build_tcp@Base 1.1.2.1
+ libnet_build_tcp_options@Base 1.1.2.1
+ libnet_build_token_ring@Base 1.1.2.1
+ libnet_build_udp@Base 1.1.2.1
+ libnet_build_vrrp@Base 1.1.2.1
+ libnet_check_iface@Base 1.1.2.1
+ libnet_clear_packet@Base 1.1.2.1
+ libnet_close_link@Base 1.1.2.1
+ libnet_close_raw4@Base 1.1.2.1
+ libnet_close_raw6@Base 1.1.2.1
+ libnet_compute_crc@Base 1.1.2.1
+ libnet_cq_add@Base 1.1.2.1
+ libnet_cq_destroy@Base 1.1.2.1
+ libnet_cq_end_loop@Base 1.1.2.1
+ libnet_cq_find_by_label@Base 1.1.2.1
+ libnet_cq_getlabel@Base 1.1.2.1
+ libnet_cq_head@Base 1.1.2.1
+ libnet_cq_last@Base 1.1.2.1
+ libnet_cq_next@Base 1.1.2.1
+ libnet_cq_remove@Base 1.1.2.1
+ libnet_cq_remove_by_label@Base 1.1.2.1
+ libnet_cq_size@Base 1.1.2.1
+ libnet_destroy@Base 1.1.2.1
+ libnet_diag_dump_context@Base 1.1.2.1
+ libnet_diag_dump_hex@Base 1.1.2.1
+ libnet_diag_dump_pblock@Base 1.1.2.1
+ libnet_diag_dump_pblock_type@Base 1.1.2.1
+ libnet_do_checksum@Base 1.1.2.1
+ libnet_get_hwaddr@Base 1.1.2.1
+ libnet_get_ipaddr4@Base 1.1.2.1
+ libnet_get_ipaddr6@Base 1.1.2.1
+ libnet_get_prand@Base 1.1.2.1
+ libnet_getdevice@Base 1.1.2.1
+ libnet_geterror@Base 1.1.2.1
+ libnet_getfd@Base 1.1.2.1
+ libnet_getgre_length@Base 1.1.2.1
+ libnet_getpacket_size@Base 1.1.2.1
+ libnet_getpbuf@Base 1.1.2.1
+ libnet_getpbuf_size@Base 1.1.2.1
+ libnet_hex_aton@Base 1.1.2.1
+ libnet_ifaddrlist@Base 1.1.2.1
+ libnet_in_cksum@Base 1.1.2.1
+ libnet_init@Base 1.1.2.1
+ libnet_ip_check@Base 1.1.2.1
+ libnet_name2addr4@Base 1.1.2.1
+ libnet_name2addr6@Base 1.1.2.1
+ libnet_open_link@Base 1.1.2.1
+ libnet_open_raw4@Base 1.1.2.1
+ libnet_open_raw6@Base 1.1.2.1
+ libnet_pblock_append@Base 1.1.2.1
+ libnet_pblock_coalesce@Base 1.1.2.1
+ libnet_pblock_delete@Base 1.1.2.1
+ libnet_pblock_find@Base 1.1.2.1
+ libnet_pblock_insert_before@Base 1.1.2.1
+ libnet_pblock_new@Base 1.1.2.1
+ libnet_pblock_p2p@Base 1.1.2.1
+ libnet_pblock_probe@Base 1.1.2.1
+ libnet_pblock_record_ip_offset@Base 1.1.2.1
+ libnet_pblock_setflags@Base 1.1.2.1
+ libnet_pblock_swap@Base 1.1.2.1
+ libnet_pblock_update@Base 1.1.2.1
+ libnet_plist_chain_dump@Base 1.1.2.1
+ libnet_plist_chain_dump_string@Base 1.1.2.1
+ libnet_plist_chain_free@Base 1.1.2.1
+ libnet_plist_chain_new@Base 1.1.2.1
+ libnet_plist_chain_next_pair@Base 1.1.2.1
+ libnet_seed_prand@Base 1.1.2.1
+ libnet_select_device@Base 1.1.2.1
+ libnet_stats@Base 1.1.2.1
+ libnet_toggle_checksum@Base 1.1.2.1
+ libnet_write@Base 1.1.2.1
+ libnet_write_link@Base 1.1.2.1
+ libnet_write_raw_ipv4@Base 1.1.2.1
+ libnet_write_raw_ipv6@Base 1.1.2.1
diff --git a/debian/patches/00-fix_build_process.patch b/debian/patches/00-fix_build_process.patch
new file mode 100644
index 0000000..49b3842
--- /dev/null
+++ b/debian/patches/00-fix_build_process.patch
@@ -0,0 +1,246 @@
+--- libnet-1.1.2.1.orig/Makefile.am
++++ libnet-1.1.2.1/Makefile.am
+@@ -12,4 +12,4 @@
+
+ EXTRA_DIST = Makefile.am.common
+
+-bin_scripts = libnet-config
++bin_SCRIPTS = libnet-config
+--- libnet-1.1.2.1.orig/configure.in
++++ libnet-1.1.2.1/configure.in
+@@ -21,10 +21,24 @@
+ dnl
+ AC_PROG_CC
+ AC_PROG_INSTALL
+-AC_PROG_RANLIB
++AC_PROG_LIBTOOL
+
++# Added by Debian maintainer after `autoscan`
++AC_PROG_CXX
++AC_PROG_CPP
++AC_PROG_LN_S
++AC_PROG_MAKE_SET
++#
++
++# Check for headers
+ AC_CHECK_HEADERS(sys/sockio.h)
+
++# Added by Debian maintainer after `autoscan`
++AC_CHECK_HEADERS([arpa/inet.h fcntl.h memory.h netdb.h netinet/in.h nlist.h])
++AC_CHECK_HEADERS([stdlib.h string.h sys/file.h sys/ioctl.h sys/param.h])
++AC_CHECK_HEADERS([sys/socket.h sys/systeminfo.h sys/time.h sys/timeb.h unistd.h])
++#
++
+ dnl
+ dnl And some custom things
+ dnl
+@@ -49,6 +63,22 @@
+ CFLAGS="$CFLAGS -Wall"
+ fi
+
++# Added by Debian maintainer after `autoscan`
++AC_C_INLINE
++AC_TYPE_INT16_T
++AC_TYPE_INT32_T
++AC_TYPE_INT64_T
++AC_TYPE_INT8_T
++AC_TYPE_OFF_T
++AC_TYPE_SIZE_T
++AC_CHECK_MEMBERS([struct stat.st_rdev])
++AC_TYPE_UINT16_T
++AC_TYPE_UINT32_T
++AC_TYPE_UINT64_T
++AC_TYPE_UINT8_T
++#
++
++
+ dnl
+ dnl Set the root install directory
+ dnl
+@@ -61,6 +91,11 @@
+ dnl Check for library functions.
+ dnl
+ AC_CHECK_FUNCS(strerror)
++# Added by Debian maintainer after `autoscan`
++AC_HEADER_MAJOR
++AC_CHECK_FUNCS([bzero gethostbyaddr gethostbyname gettimeofday memmove])
++AC_CHECK_FUNCS([memset socket strchr strdup strpbrk strrchr strtol strtoul])
++#
+
+ dnl
+ dnl Get link-layer interface type
+--- libnet-1.1.2.1.orig/src/Makefile.am
++++ libnet-1.1.2.1/src/Makefile.am
+@@ -8,9 +8,9 @@
+
+ include $(top_srcdir)/Makefile.am.common
+
+-lib_LIBRARIES = libnet.a
++lib_LTLIBRARIES = libnet.la
+
+-libnet_a_SOURCES = libnet_asn1.c \
++libnet_la_SOURCES = libnet_asn1.c \
+ libnet_build_802.1q.c \
+ libnet_build_802.1x.c \
+ libnet_build_802.2.c \
+@@ -57,15 +57,20 @@
+ libnet_version.c \
+ libnet_write.c
+
+-EXTRA_libnet_a_SOURCES = libnet_link_bpf.c \
+- libnet_link_dlpi.c \
+- libnet_link_linux.c \
+- libnet_link_nit.c \
+- libnet_link_none.c \
+- libnet_link_pf.c \
+- libnet_link_snit.c \
+- libnet_link_snoop.c \
+- libnet_link_win32.c
+-
+-libnet_a_LIBADD = @LIBOBJS@
++libnet_la_LIBADD = @LTLIBOBJS@
+
++# Here are a set of rules to help you update your library version
++# information:
++#
++# 1. If the library source code has changed at all since the last
++# update, then increment REVISION (`C:R:A' becomes `C:r+1:A').
++#
++# 2. If any interfaces have been added, removed, or changed since the
++# last update, increment CURRENT, and set REVISION to 0.
++#
++# 3. If any interfaces have been added since the last public release,
++# then increment AGE.
++#
++# 4. If any interfaces have been removed since the last public release,
++# then set AGE to 0.
++libnet_la_LDFLAGS = -version-info 4:0:3 # CURRENT[:REVISION[:AGE]]
+--- libnet-1.1.2.1.orig/acinclude.m4
++++ libnet-1.1.2.1/acinclude.m4
+@@ -11,7 +11,7 @@
+ dnl usage: AC_LIBNET_LINUX_PROCFS
+ dnl results: HAVE_LINUX_PROCFS
+ dnl
+-AC_DEFUN(AC_LIBNET_LINUX_PROCFS,
++AC_DEFUN([AC_LIBNET_LINUX_PROCFS],
+ [AC_MSG_CHECKING(for Linux proc filesystem)
+ AC_CACHE_VAL(ac_cv_libnet_linux_procfs,
+ if test "x`cat /proc/sys/kernel/ostype 2>&-`" = "xLinux" ; then
+@@ -37,15 +37,15 @@
+ dnl HAVE_PACKET_SOCKET (DEFINED)
+ dnl
+
+-AC_DEFUN(AC_LIBNET_CHECK_PF_PACKET,
++AC_DEFUN([AC_LIBNET_CHECK_PF_PACKET],
+ [
+ AC_MSG_CHECKING(for packet socket (PF_SOCKET))
+- AC_CACHE_VAL(ac_libnet_have_packet_socket,
++ AC_CACHE_VAL(ac_cv_libnet_have_packet_socket,
+
+ [case "$target_os" in
+
+ linux)
+- ac_libnet_have_packet_socket = no
++ ac_cv_libnet_have_packet_socket = no
+ ;;
+ *)
+
+@@ -94,17 +94,17 @@
+
+ # Oopz 4.3 BSD doesn't have this. Sorry.
+ if test ! -x ./pf_packet-test ; then
+- ac_libnet_have_packet_socket=choked
++ ac_cv_libnet_have_packet_socket=choked
+ else
+- ac_libnet_have_packet_socket=`./pf_packet-test`;
++ ac_cv_libnet_have_packet_socket=`./pf_packet-test`;
+ fi
+- if test $ac_libnet_have_packet_socket = choked; then
++ if test $ac_cv_libnet_have_packet_socket = choked; then
+ AC_MSG_RESULT(test program compile choked... assuming no)
+- elif test $ac_libnet_have_packet_socket = yes; then
++ elif test $ac_cv_libnet_have_packet_socket = yes; then
+ AC_MSG_RESULT(yes)
+- elif test $ac_libnet_have_packet_socket = probably; then
++ elif test $ac_cv_libnet_have_packet_socket = probably; then
+ AC_MSG_RESULT(test program got EPERM... assuming yes)
+- elif test $ac_libnet_have_packet_socket = no; then
++ elif test $ac_cv_libnet_have_packet_socket = no; then
+ AC_MSG_RESULT(no)
+ fi
+
+@@ -112,7 +112,7 @@
+ ;;
+ esac])
+
+- if test $ac_libnet_have_packet_socket = yes -o $ac_libnet_have_packet_socket = probably; then
++ if test $ac_cv_libnet_have_packet_socket = yes -o $ac_cv_libnet_have_packet_socket = probably; then
+ AC_DEFINE(HAVE_PACKET_SOCKET)
+ fi
+ ])
+@@ -131,17 +131,17 @@
+ dnl
+ dnl
+
+-AC_DEFUN(AC_LIBNET_CHECK_LIBNET_VER,
++AC_DEFUN([AC_LIBNET_CHECK_LIBNET_VER],
+ [
+ AC_CHECK_LIB(net, libnet_build_ip, AC_MSG_CHECKING(version) \
+
+ changequote(<<, >>)dnl
+- if [[ ! -f $LIB_PREFIX/libnet.a ]] ; then
++ if [[ ! -f $LIB_PREFIX/libnet.la ]] ; then
+ changequote([, ])dnl
+- AC_MSG_RESULT($LIB_PREFIX/libnet.a doesn't exist)
++ AC_MSG_RESULT($LIB_PREFIX/libnet.la doesn't exist)
+ AC_MSG_RESULT(previous libnet install lives elsewhere, you should probably find it)
+ else
+- __LIBNET_VERSION=`strings $LIB_PREFIX/libnet.a | grep "libnet version"\
++ __LIBNET_VERSION=`strings $LIB_PREFIX/libnet.la | grep "libnet version"\
+ | cut -f3 -d" "`;\
+ if test -z "$__LIBNET_VERSION"; then
+ AC_MSG_RESULT(<0.8)
+@@ -166,7 +166,7 @@
+ dnl HAVE_STRUCT_IP_CSUM (DEFINED)
+ dnl
+
+-AC_DEFUN(AC_LIBNET_CHECK_IP_CSUM,
++AC_DEFUN([AC_LIBNET_CHECK_IP_CSUM],
+ [
+ AC_MSG_CHECKING([struct ip contains ip_csum])
+ AC_TRY_COMPILE([
+@@ -199,7 +199,7 @@
+ dnl LBL_ALIGN (DEFINED)
+ dnl
+
+-AC_DEFUN(AC_LBL_UNALIGNED_ACCESS,
++AC_DEFUN([AC_LBL_UNALIGNED_ACCESS],
+ [AC_MSG_CHECKING(if unaligned accesses fail)
+ AC_CACHE_VAL(ac_cv_lbl_unaligned_fail,
+ [case "$target_cpu" in
+@@ -278,7 +278,7 @@
+ dnl LIBNET_LIL_ENDIAN = 1
+ dnl
+
+-AC_DEFUN(AC_LIBNET_ENDIAN_CHECK,
++AC_DEFUN([AC_LIBNET_ENDIAN_CHECK],
+ [AC_MSG_CHECKING(machine endianess)
+
+ cat > conftest.c << EOF
+@@ -439,7 +439,7 @@
+ dnl statically and happen to have a libresolv.a lying around (and no
+ dnl libnsl.a).
+ dnl
+-AC_DEFUN(AC_LBL_LIBRARY_NET, [
++AC_DEFUN([AC_LBL_LIBRARY_NET], [
+ # Most operating systems have gethostbyname() in the default searched
+ # libraries (i.e. libc):
+ AC_CHECK_FUNC(gethostbyname, ,
+--- libnet-1.1.2.1.orig/sample/Makefile.am
++++ libnet-1.1.2.1/sample/Makefile.am
+@@ -60,4 +60,4 @@
+ ip_link_SOURCES = ip_link.c
+ sebek_SOURCES = sebek.c
+
+-LDADD = $(top_srcdir)/src/libnet.a
++LDADD = $(top_srcdir)/src/libnet.la
diff --git a/debian/patches/01-fix_libnet-functions.h.3.patch b/debian/patches/01-fix_libnet-functions.h.3.patch
new file mode 100644
index 0000000..1ba50e0
--- /dev/null
+++ b/debian/patches/01-fix_libnet-functions.h.3.patch
@@ -0,0 +1,839 @@
+--- libnet.orig/doc/man/man3/libnet-functions.h.3
++++ libnet/doc/man/man3/libnet-functions.h.3
+@@ -485,7 +485,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-1 on success, -1 on failure
++1 on success, \-1 on failure
+ .RE
+ .PP
+
+@@ -504,7 +504,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-1 on success, -1 on failure
++1 on success, \-1 on failure
+ .RE
+ .PP
+
+@@ -535,7 +535,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-the number of bytes written, or -1 on failure
++the number of bytes written, or \-1 on failure
+ .RE
+ .PP
+
+@@ -560,7 +560,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -579,7 +579,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -606,7 +606,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -627,7 +627,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -654,7 +654,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -675,7 +675,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -706,7 +706,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -741,7 +741,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -768,7 +768,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -795,7 +795,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -826,7 +826,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -853,7 +853,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -892,13 +892,14 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+ .SS "libnet_ptag_t libnet_build_bgp4_header (u_int8_t marker[LIBNET_BGP4_MARKER_SIZE], u_int16_t len, u_int8_t type, u_int8_t * payload, u_int32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+ .PP
+-Builds an RFC 1771 Border Gateway Protocol 4 (BGP-4) header. The primary function of a BGP speaking system is to exchange network reachability information with other BGP systems. This network reachability information includes information on the list of Autonomous Systems (ASs) that reachability information traverses. This information is sufficient to construct a graph of AS connectivity from which routing loops may be pruned and some policy decisions at the AS level may be enforced. This function builds the base BGP header which is used as a preamble before any other BGP header. For example, a BGP KEEPALIVE message may be built with only this function, while an error notification requires a subsequent call to libnet_build_bgp4_notification.
++Builds an RFC 1771 Border Gateway Protocol 4 (BGP-4) header. The primary function of a BGP speaking system is to exchange network reachability
++information with other BGP systems. This network reachability information includes information on the list of Autonomous Systems (ASs) that reachability information traverses. This information is sufficient to construct a graph of AS connectivity from which routing loops may be pruned and some policy decisions at the AS level may be enforced. This function builds the base BGP header which is used as a preamble before any other BGP header. For example, a BGP KEEPALIVE message may be built with only this function, while an error notification requires a subsequent call to libnet_build_bgp4_notification.
+ .PP
+ \fBParameters:\fP
+ .RS 4
+@@ -919,7 +920,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -944,7 +945,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -975,7 +976,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1008,7 +1009,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1027,7 +1028,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1060,7 +1061,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1081,7 +1082,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1100,7 +1101,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1133,13 +1134,13 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+ .SS "libnet_ptag_t libnet_build_egre (u_int16_t fv, u_int16_t type, u_int16_t sum, u_int16_t offset, u_int32_t key, u_int32_t seq, u_int16_t len, u_int8_t * payload, u_int32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+ .PP
+-Generic Routing Encapsulation (GRE - RFC 1701) is used to encapsulate any protocol. Hence, the IP part of the packet is usually referred as 'delivery header'. It is then followed by the GRE header and finally the encapsulated packet (IP or whatever). As GRE is very modular, the first GRE header describes the structure of the header, using bits and flag to specify which fields will be present in the header.
++Generic Routing Encapsulation (GRE \- RFC 1701) is used to encapsulate any protocol. Hence, the IP part of the packet is usually referred as 'delivery header'. It is then followed by the GRE header and finally the encapsulated packet (IP or whatever). As GRE is very modular, the first GRE header describes the structure of the header, using bits and flag to specify which fields will be present in the header.
+ .PP
+ \fBParameters:\fP
+ .RS 4
+@@ -1168,7 +1169,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1195,7 +1196,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1228,13 +1229,13 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+ .SS "libnet_ptag_t libnet_build_gre (u_int16_t fv, u_int16_t type, u_int16_t sum, u_int16_t offset, u_int32_t key, u_int32_t seq, u_int16_t len, u_int8_t * payload, u_int32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+ .PP
+-Generic Routing Encapsulation (GRE - RFC 1701) is used to encapsulate any protocol. Hence, the IP part of the packet is usually referred as 'delivery header'. It is then followed by the GRE header and finally the encapsulated packet (IP or whatever). As GRE is very modular, the first GRE header describes the structure of the header, using bits and flag to specify which fields will be present in the header.
++Generic Routing Encapsulation (GRE \- RFC 1701) is used to encapsulate any protocol. Hence, the IP part of the packet is usually referred as 'delivery header'. It is then followed by the GRE header and finally the encapsulated packet (IP or whatever). As GRE is very modular, the first GRE header describes the structure of the header, using bits and flag to specify which fields will be present in the header.
+ .PP
+ \fBParameters:\fP
+ .RS 4
+@@ -1263,7 +1264,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1282,7 +1283,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1301,7 +1302,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1332,7 +1333,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1365,7 +1366,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1406,7 +1407,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1449,7 +1450,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1486,7 +1487,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1527,7 +1528,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1556,7 +1557,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1589,7 +1590,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1616,7 +1617,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1643,7 +1644,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1682,7 +1683,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1703,7 +1704,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1738,7 +1739,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1763,7 +1764,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1792,7 +1793,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1817,7 +1818,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1844,7 +1845,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1883,7 +1884,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1912,7 +1913,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -1941,7 +1942,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2000,7 +2001,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2019,7 +2020,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2038,7 +2039,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2057,7 +2058,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2076,7 +2077,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2095,7 +2096,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2114,7 +2115,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2133,7 +2134,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2152,7 +2153,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2171,7 +2172,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2190,7 +2191,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2229,7 +2230,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2243,7 +2244,7 @@
+ .br
+ \fIxid\fP transaction identifier used to link calls and replies
+ .br
+-\fIprog_num\fP remote program specification typically between 0 - 1fffffff
++\fIprog_num\fP remote program specification typically between 0 \- 1fffffff
+ .br
+ \fIprog_vers\fP remote program version specification
+ .br
+@@ -2272,7 +2273,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2315,7 +2316,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2360,7 +2361,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2387,7 +2388,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2422,7 +2423,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2443,7 +2444,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2482,7 +2483,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2511,7 +2512,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2523,7 +2524,7 @@
+ .RS 4
+ \fIversion\fP VRRP version (should be 2)
+ .br
+-\fItype\fP VRRP packet type (should be 1 -- ADVERTISEMENT)
++\fItype\fP VRRP packet type (should be 1 \-\- ADVERTISEMENT)
+ .br
+ \fIvrouter_id\fP virtual router identification
+ .br
+@@ -2531,7 +2532,7 @@
+ .br
+ \fIip_count\fP number of IPv4 addresses contained in this advertisement
+ .br
+-\fIauth_type\fP type of authentication (0, 1, 2 -- see RFC)
++\fIauth_type\fP type of authentication (0, 1, 2 \-\- see RFC)
+ .br
+ \fIadvert_int\fP interval between advertisements
+ .br
+@@ -2548,7 +2549,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2575,7 +2576,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-1 on success, -1 on failure
++1 on success, \-1 on failure
+ .RE
+ .PP
+
+@@ -2757,7 +2758,7 @@
+
+ .SS "u_int32_t libnet_get_ipaddr4 (libnet_t * l)"
+ .PP
+-Returns the IP address for the device libnet was initialized with. If libnet was initialized without a device (in raw socket mode) the function will attempt to find one. If the function fails and returns -1 a call to libnet_geterrror() will tell you why.
++Returns the IP address for the device libnet was initialized with. If libnet was initialized without a device (in raw socket mode) the function will attempt to find one. If the function fails and returns \-1 a call to libnet_geterrror() will tell you why.
+ .PP
+ \fBParameters:\fP
+ .RS 4
+@@ -2766,7 +2767,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-a big endian IP address suitable for use in a libnet_build function or -1
++a big endian IP address suitable for use in a libnet_build function or \-1
+ .RE
+ .PP
+
+@@ -2787,7 +2788,7 @@
+
+ .SS "u_int32_t libnet_get_prand (int mod)"
+ .PP
+-Generates an unsigned psuedo-random value within the range specified by mod. LIBNET_PR2 0 - 1 LIBNET_PR8 0 - 255 LIBNET_PR16 0 - 32767 LIBNET_PRu16 0 - 65535 LIBNET_PR32 0 - 2147483647 LIBNET_PRu32 0 - 4294967295
++Generates an unsigned psuedo-random value within the range specified by mod. LIBNET_PR2 0 \- 1 LIBNET_PR8 0 \- 255 LIBNET_PR16 0 \- 32767 LIBNET_PRu16 0 \- 65535 LIBNET_PR32 0 \- 2147483647 LIBNET_PRu32 0 \- 4294967295
+ .PP
+ \fBParameters:\fP
+ .RS 4
+@@ -2796,7 +2797,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-1 on success, -1 on failure
++1 on success, \-1 on failure
+ .RE
+ .PP
+
+@@ -2860,7 +2861,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-protocol tag value on success, -1 on error
++protocol tag value on success, \-1 on error
+ .RE
+ .PP
+
+@@ -2964,7 +2965,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-network byte ordered IPv4 address or -1 (2^32 - 1) on error
++network byte ordered IPv4 address or \-1 (2^32 \- 1) on error
+ .RE
+ .PP
+
+@@ -2998,7 +2999,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-1 on success, -1 on failure
++1 on success, \-1 on failure
+ .RE
+ .PP
+
+@@ -3028,13 +3029,13 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-1 on success, -1 on failure
++1 on success, \-1 on failure
+ .RE
+ .PP
+
+ .SS "int libnet_plist_chain_new (libnet_t * l, libnet_plist_t ** plist, char * token_list)"
+ .PP
+-Creates a new port list. Port list chains are useful for TCP and UDP-based applications that need to send packets to a range of ports (contiguous or otherwise). The port list chain, which token_list points to, should contain a series of int8_tacters from the following list: '0123456789,-' of the general format 'x - y, z', where 'xyz' are port numbers between 0 and 65,535. plist points to the front of the port list chain list for use in further libnet_plist_chain() functions. Upon success, the function returns 1. Upon failure, the function returns -1 and \fBlibnet_geterror()\fP can tell you why.
++Creates a new port list. Port list chains are useful for TCP and UDP-based applications that need to send packets to a range of ports (contiguous or otherwise). The port list chain, which token_list points to, should contain a series of int8_tacters from the following list: '0123456789,\-' of the general format 'x \- y, z', where 'xyz' are port numbers between 0 and 65,535. plist points to the front of the port list chain list for use in further libnet_plist_chain() functions. Upon success, the function returns 1. Upon failure, the function returns \-1 and \fBlibnet_geterror()\fP can tell you why.
+ .PP
+ \fBParameters:\fP
+ .RS 4
+@@ -3047,13 +3048,13 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-1 on success, -1 on failure
++1 on success, \-1 on failure
+ .RE
+ .PP
+
+ .SS "int libnet_plist_chain_next_pair (libnet_plist_t * plist, u_int16_t * bport, u_int16_t * eport)"
+ .PP
+-Returns the next port list chain pair from the port list chain plist. bport and eport contain the starting port number and ending port number, respectively. Upon success, the function returns 1 and fills in the port variables; however, if the list is empty, the function returns 0 and sets both port variables to 0. Upon failure, the function returns -1.
++Returns the next port list chain pair from the port list chain plist. bport and eport contain the starting port number and ending port number, respectively. Upon success, the function returns 1 and fills in the port variables; however, if the list is empty, the function returns 0 and sets both port variables to 0. Upon failure, the function returns \-1.
+ .PP
+ \fBParameters:\fP
+ .RS 4
+@@ -3066,7 +3067,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-1 on success, 0 if empty, -1 on failure
++1 on success, 0 if empty, \-1 on failure
+ .RE
+ .PP
+
+@@ -3081,7 +3082,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-1 on success, -1 on failure
++1 on success, \-1 on failure
+ .RE
+ .PP
+
+@@ -3112,7 +3113,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-1 on success, -1 on failure
++1 on success, \-1 on failure
+ .RE
+ .PP
+
+@@ -3127,7 +3128,7 @@
+ .PP
+ \fBReturns:\fP
+ .RS 4
+-the number of bytes written, -1 on error
++the number of bytes written, \-1 on error
+ .RE
+ .PP
+
diff --git a/debian/patches/02-fix_libnet_802_1q_hdr.3.patch b/debian/patches/02-fix_libnet_802_1q_hdr.3.patch
new file mode 100644
index 0000000..90d3961
--- /dev/null
+++ b/debian/patches/02-fix_libnet_802_1q_hdr.3.patch
@@ -0,0 +1,11 @@
+--- libnet.orig/doc/man/man3/libnet_802_1q_hdr.3
++++ libnet/doc/man/man3/libnet_802_1q_hdr.3
+@@ -2,7 +2,7 @@
+ .ad l
+ .nh
+ .SH NAME
+-libnet_802_1q_hdr \-
++libnet_802_1q_hdr \- IEEE 802.1Q VLAN header
+ .SH SYNOPSIS
+ .br
+ .PP
diff --git a/debian/patches/03-fix_libnet_802_1x_hdr.3.patch b/debian/patches/03-fix_libnet_802_1x_hdr.3.patch
new file mode 100644
index 0000000..2c9b945
--- /dev/null
+++ b/debian/patches/03-fix_libnet_802_1x_hdr.3.patch
@@ -0,0 +1,11 @@
+--- libnet.orig/doc/man/man3/libnet_802_1x_hdr.3
++++ libnet/doc/man/man3/libnet_802_1x_hdr.3
+@@ -2,7 +2,7 @@
+ .ad l
+ .nh
+ .SH NAME
+-libnet_802_1x_hdr \-
++libnet_802_1x_hdr \- IEEE 802.1X EAP header
+ .SH SYNOPSIS
+ .br
+ .PP
diff --git a/debian/patches/04-fix_libnet_build_ntp.patch b/debian/patches/04-fix_libnet_build_ntp.patch
new file mode 100644
index 0000000..4bf2d15
--- /dev/null
+++ b/debian/patches/04-fix_libnet_build_ntp.patch
@@ -0,0 +1,13 @@
+--- libnet.orig/src/libnet_build_ntp.c
++++ libnet/src/libnet_build_ntp.c
+@@ -85,8 +85,8 @@
+ ntp_hdr.ntp_ref_ts.fraction = htonl(ref_ts_frac);
+ ntp_hdr.ntp_orig_ts.integer = htonl(orig_ts_int);
+ ntp_hdr.ntp_orig_ts.fraction = htonl(orig_ts_frac);
+- ntp_hdr.ntp_rec_ts.integer = htonl(orig_ts_int);
+- ntp_hdr.ntp_rec_ts.fraction = htonl(orig_ts_frac);
++ ntp_hdr.ntp_rec_ts.integer = htonl(rec_ts_int);
++ ntp_hdr.ntp_rec_ts.fraction = htonl(rec_ts_frac);
+ ntp_hdr.ntp_xmt_ts.integer = htonl(xmt_ts_int);
+ ntp_hdr.ntp_xmt_ts.fraction = htonl(xmt_ts_frac);
+
diff --git a/debian/patches/05-fix_libnet_pblock_coalesce_buffer_overrun.patch b/debian/patches/05-fix_libnet_pblock_coalesce_buffer_overrun.patch
new file mode 100644
index 0000000..7c6a2f2
--- /dev/null
+++ b/debian/patches/05-fix_libnet_pblock_coalesce_buffer_overrun.patch
@@ -0,0 +1,11 @@
+--- libnet.orig/src/libnet_pblock.c
++++ libnet/src/libnet_pblock.c
+@@ -389,7 +389,7 @@
+ {
+ if ((q->flags) & LIBNET_PBLOCK_DO_CHECKSUM)
+ {
+- int offset = (l->total_size + l->aligner) - q->ip_offset;
++ int offset = l->aligner + q->ip_offset;
+ c = libnet_do_checksum(l, *packet + offset,
+ libnet_pblock_p2p(q->type), q->h_len);
+ if (c == -1)
diff --git a/debian/patches/06-fix_libnet_pblock_coalesce_leak.patch b/debian/patches/06-fix_libnet_pblock_coalesce_leak.patch
new file mode 100644
index 0000000..50b9411
--- /dev/null
+++ b/debian/patches/06-fix_libnet_pblock_coalesce_leak.patch
@@ -0,0 +1,49 @@
+--- libnet.orig/src/libnet_pblock.c
++++ libnet/src/libnet_pblock.c
+@@ -339,7 +339,7 @@
+ snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
+ "%s(): packet assembly cannot find a layer 2 header\n",
+ __func__);
+- return (-1);
++ goto err;
+ }
+ break;
+ case LIBNET_RAW4:
+@@ -348,7 +348,7 @@
+ snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
+ "%s(): packet assembly cannot find an IPv4 header\n",
+ __func__);
+- return (-1);
++ goto err;
+ }
+ break;
+ case LIBNET_RAW6:
+@@ -357,7 +357,7 @@
+ snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
+ "%s(): packet assembly cannot find an IPv6 header\n",
+ __func__);
+- return (-1);
++ goto err;
+ }
+ break;
+ default:
+@@ -365,7 +365,7 @@
+ snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
+ "%s(): suddenly the dungeon collapses -- you die\n",
+ __func__);
+- return (-1);
++ goto err;
+ break;
+ }
+ }
+@@ -419,6 +419,10 @@
+ *size -= l->aligner;
+ }
+ return (1);
++
++err:
++ free(packet);
++ return (-1);
+ }
+
+ void
diff --git a/debian/patches/07-add_libnet-cq-end-loop.patch b/debian/patches/07-add_libnet-cq-end-loop.patch
new file mode 100644
index 0000000..7f10311
--- /dev/null
+++ b/debian/patches/07-add_libnet-cq-end-loop.patch
@@ -0,0 +1,32 @@
+--- libnet-1.1.2.1.orig/src/libnet_cq.c
++++ libnet-1.1.2.1/src/libnet_cq.c
+@@ -393,3 +393,14 @@
+ {
+ return (l_cqd.node);
+ }
++
++u_int32_t
++libnet_cq_end_loop()
++{
++ if (! clear_cq_lock(CQ_LOCK_WRITE))
++ {
++ return (0);
++ }
++ l_cqd.current = l_cq;
++ return (1);
++}
+--- libnet-1.1.2.1.orig/include/libnet/libnet-functions.h
++++ libnet-1.1.2.1/include/libnet/libnet-functions.h
+@@ -1886,6 +1886,12 @@
+ libnet_cq_size();
+
+ /**
++ * [Context Queue]
++ */
++u_int32_t
++libnet_cq_end_loop();
++
++/**
+ * [Diagnostic]
+ * Prints the contents of the given context.
+ * @param l pointer to a libnet context
diff --git a/debian/patches/08-fix_libnet_checksum.c.patch b/debian/patches/08-fix_libnet_checksum.c.patch
new file mode 100644
index 0000000..627ddd7
--- /dev/null
+++ b/debian/patches/08-fix_libnet_checksum.c.patch
@@ -0,0 +1,23 @@
+--- libnet-1.1.2.1.orig/src/libnet_checksum.c
++++ libnet-1.1.2.1/src/libnet_checksum.c
+@@ -42,8 +42,10 @@
+ libnet_in_cksum(u_int16_t *addr, int len)
+ {
+ int sum;
++ u_int16_t last_byte;
+
+ sum = 0;
++ last_byte = 0;
+
+ while (len > 1)
+ {
+@@ -52,7 +54,8 @@
+ }
+ if (len == 1)
+ {
+- sum += *(u_int16_t *)addr;
++ *(u_int8_t *)&last_byte = *(u_int8_t *)addr;
++ sum += last_byte;
+ }
+
+ return (sum);
diff --git a/debian/patches/09-fix_hurd-i386_build.patch b/debian/patches/09-fix_hurd-i386_build.patch
new file mode 100644
index 0000000..6ab2b50
--- /dev/null
+++ b/debian/patches/09-fix_hurd-i386_build.patch
@@ -0,0 +1,11 @@
+--- libnet-1.1.2.1.orig/include/libnet.h.in
++++ libnet-1.1.2.1/include/libnet.h.in
+@@ -90,7 +90,7 @@
+ #include <winsock2.h>
+ #include <win32/in_systm.h>
+ #endif /* __WIN32__ */
+-#if !(__linux__) && !(__WIN32__) && !(__APPLE__) && !(__CYGWIN__)
++#if !(__linux__) && !(__WIN32__) && !(__APPLE__) && !(__CYGWIN__) && !(__GNU__)
+ #include <netinet/ip_var.h>
+ #else /* __linux__ */
+ #if (HAVE_NET_ETHERNET_H)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..cb1db37
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,10 @@
+#00-fix_build_process.patch
+#01-fix_libnet-functions.h.3.patch
+#02-fix_libnet_802_1q_hdr.3.patch
+#03-fix_libnet_802_1x_hdr.3.patch
+#04-fix_libnet_build_ntp.patch
+#05-fix_libnet_pblock_coalesce_buffer_overrun.patch
+#06-fix_libnet_pblock_coalesce_leak.patch
+#07-add_libnet-cq-end-loop.patch
+#08-fix_libnet_checksum.c.patch
+#09-fix_hurd-i386_build.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..aea3293
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,102 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+# (what magic? -- cph)
+# (if you do not export it, nobody will see it. -- cavok)
+export DH_OPTIONS
+
+# removed the autotools stuff, currently the update of autotool stuff
+# is done by cvs-debuild when i make the final build of the package.
+# i'd like to keep them out of here and from cvs.
+
+include /usr/share/quilt/quilt.make
+
+DESTDIR := $(CURDIR)/debian/tmp
+
+PREFIX = /usr
+INFODIR = $(PREFIX)/share/info
+MANDIR = $(PREFIX)/share/man
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+ CONFIGURE_ARGS += --build $(DEB_HOST_GNU_TYPE)
+else
+ CONFIGURE_ARGS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+endif
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS := -O0
+else
+ CFLAGS := -O2
+endif
+CFLAGS += -g -Wall
+
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ NUMJOBS := -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ MAKEFLAGS += $(NUMJOBS)
+endif
+
+configure: configure-stamp
+configure-stamp: $(QUILT_STAMPFN)
+ libtoolize
+ aclocal
+ autoconf
+ automake --add-missing --copy
+
+ ./configure $(CONFIGURE_ARGS) \
+ --prefix=$(PREFIX) --mandir=$(MANDIR) --infodir=$(INFODIR) \
+ LDFLAGS="-Wl,-z,defs,--as-needed" CFLAGS="$(CFLAGS)"
+ touch $@
+
+build: build-stamp
+build-stamp: configure-stamp
+ dh_testdir
+ $(MAKE)
+ touch $@
+
+clean: unpatch
+ dh_testdir
+ dh_testroot
+
+ [ ! -f Makefile ] || $(MAKE) distclean
+
+ find $(CURDIR) -name "Makefile.in" -exec rm -rf {} \;
+ rm -rf $(CURDIR)/configure
+
+ dh_clean build-stamp configure-stamp config.sub config.guess ltmain.sh
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ $(MAKE) $(MAKE_FLAGS) DESTDIR=$(DESTDIR) install
+ dh_install --sourcedir=$(DESTDIR) --list-missing
+
+binary-indep: build install
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_installchangelogs doc/CHANGELOG
+ dh_strip --dbg-package=libnet1-dbg
+ dh_compress
+ dh_makeshlibs -V "libnet1 (>= 1.1.2)"
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..d903ca9
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://www.packetfactory.net/libnet/dist/libnet-(\d+.*)\.tar\.gz