summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Nilsson <troglobit@gmail.com>2019-09-28 13:31:45 +0200
committerJoachim Nilsson <troglobit@gmail.com>2019-09-28 13:31:45 +0200
commitdcc6557fe9dc37abd7c56effee7dd8e0ac50dc98 (patch)
treef58eb8b247c6d05d2f1d4fc0241b4648efc2d820
parent39d3f28a12cdbd817294262025d84a30815f8887 (diff)
parentdda691d94726f23f8fdac581198d9b0eec2d8db0 (diff)
downloadlibnet-dcc6557fe9dc37abd7c56effee7dd8e0ac50dc98.tar.gz
Merge branch 'sgeto-master'
-rw-r--r--.gitignore35
-rw-r--r--.travis.yml8
-rw-r--r--BUILD-FROM-GIT.md75
-rw-r--r--BUILD-FROM-GIT.txt14
-rw-r--r--Doxyfile96
-rw-r--r--Makefile.am59
-rw-r--r--Makefile.am.common14
-rw-r--r--README4
-rw-r--r--README.md40
-rw-r--r--README.win32247
-rw-r--r--TODO44
-rw-r--r--acinclude.m4329
-rw-r--r--appveyor.yml11
-rwxr-xr-xautogen.sh2
-rw-r--r--configure.ac268
-rw-r--r--doc/PORTED161
-rw-r--r--doc/api/bc_s.pngbin0 -> 628 bytes
-rw-r--r--doc/api/bdwn.pngbin0 -> 143 bytes
-rw-r--r--doc/api/closed.pngbin0 -> 128 bytes
-rw-r--r--doc/api/dir_2e83b025d21fe7b9c524d93377692ce4.html42
-rw-r--r--doc/api/doc.pngbin0 -> 639 bytes
-rw-r--r--doc/api/doxygen.css1596
-rw-r--r--doc/api/doxygen.pngbin0 -> 3892 bytes
-rw-r--r--doc/api/files.html36
-rw-r--r--doc/api/folderclosed.pngbin0 -> 532 bytes
-rw-r--r--doc/api/folderopen.pngbin0 -> 535 bytes
-rw-r--r--doc/api/globals.html441
-rw-r--r--doc/api/globals_defs.html56
-rw-r--r--doc/api/globals_func.html403
-rw-r--r--doc/api/graph_legend.html57
-rw-r--r--doc/api/graph_legend.pngbin0 -> 19871 bytes
-rw-r--r--doc/api/index.html78
-rw-r--r--doc/api/libnet-functions_8h.html8856
-rw-r--r--doc/api/libnet-functions_8h__dep__incl.pngbin0 -> 2628 bytes
-rw-r--r--doc/api/libnet-functions_8h_source.html157
-rw-r--r--doc/api/libnet-macros_8h.html228
-rw-r--r--doc/api/libnet-macros_8h__dep__incl.pngbin0 -> 2759 bytes
-rw-r--r--doc/api/libnet-macros_8h_source.html32
-rw-r--r--doc/api/libnet_8h.html58
-rw-r--r--doc/api/libnet_8h__incl.pngbin0 -> 13427 bytes
-rw-r--r--doc/api/libnet_8h_source.html30
-rw-r--r--doc/api/libnet_api_stylesheet.css_tmpl11
-rw-r--r--doc/api/nav_f.pngbin0 -> 134 bytes
-rw-r--r--doc/api/nav_g.pngbin0 -> 95 bytes
-rw-r--r--doc/api/nav_h.pngbin0 -> 96 bytes
-rw-r--r--doc/api/open.pngbin0 -> 122 bytes
-rw-r--r--doc/api/splitbar.pngbin0 -> 299 bytes
-rw-r--r--doc/api/sync_off.pngbin0 -> 808 bytes
-rw-r--r--doc/api/sync_on.pngbin0 -> 793 bytes
-rw-r--r--doc/api/tab_a.pngbin0 -> 137 bytes
-rw-r--r--doc/api/tab_b.pngbin0 -> 147 bytes
-rw-r--r--doc/api/tab_h.pngbin0 -> 155 bytes
-rw-r--r--doc/api/tab_s.pngbin0 -> 167 bytes
-rw-r--r--doc/api/tabs.css1
-rw-r--r--doc/fixmanpages.in72
-rw-r--r--doc/html/closed.pngbin0 -> 132 bytes
-rw-r--r--doc/html/globals_func.html431
-rw-r--r--doc/html/tab_s.pngbin0 -> 184 bytes
-rw-r--r--doc/libnet-config.Pod92
-rw-r--r--doc/libnet.Pod68
-rw-r--r--doc/libnet.chmbin0 -> 212086 bytes
-rw-r--r--doc/libnet.doxygen.conf1628
-rw-r--r--doc/libnet.pdfbin0 -> 379622 bytes
-rw-r--r--doc/libnet_api_footer.html_tmpl8
-rw-r--r--doc/libnet_api_header.html_tmpl12
-rw-r--r--doc/libnet_api_main_page.md84
-rw-r--r--doc/libnet_api_stylesheet.css_tmpl11
-rw-r--r--doc/man/man3/Makefile.am8
-rw-r--r--doc/man/man3/libnet-functions.33874
-rw-r--r--doc/man/man3/libnet-functions.h.33871
-rw-r--r--doc/man/man3/libnet-macros.3127
-rw-r--r--doc/man/man3/libnet-macros.h.380
-rw-r--r--doc/man/man3/libnet.3197
-rw-r--r--include/Makefile.am18
-rw-r--r--include/libnet.h.in116
-rw-r--r--include/libnet/libnet-functions.h67
-rw-r--r--include/libnet/libnet-headers.h7
-rw-r--r--include/libnet/libnet-structures.h22
-rw-r--r--libnet.pc.in4
-rw-r--r--m4/ax_check_link_flag.m474
-rw-r--r--m4/shell.m497
-rw-r--r--msvcbuild.bat108
-rw-r--r--sample/Makefile.am178
-rw-r--r--sample/dns.c2
-rw-r--r--sample/isl.c2
-rw-r--r--sample/libnet_test.h35
-rw-r--r--sample/test_ipv6_icmpv4.c5
-rwxr-xr-xscripts/Build7
-rwxr-xr-xscripts/Clean2
-rwxr-xr-xscripts/Package7
-rwxr-xr-xscripts/Prepare10
-rwxr-xr-xscripts/Push7
-rw-r--r--src/Makefile.am24
-rw-r--r--src/common.h25
-rw-r--r--src/libnet-9.def176
-rw-r--r--src/libnet_dll_info.rc59
-rw-r--r--src/libnet_link_bpf.c2
-rw-r--r--src/libnet_link_none.c2
-rw-r--r--src/libnet_link_win32.c172
-rw-r--r--src/libnet_prand.c46
-rw-r--r--src/libnet_resolve.c2
-rw-r--r--src/libnet_write.c154
-rw-r--r--win32/Makefile.am2
-rw-r--r--win32/libnet.h2
-rw-r--r--win32/wpdpack/Include/Packet32.h359
-rw-r--r--win32/wpdpack/Include/Win32-Extensions.h113
-rw-r--r--win32/wpdpack/Include/bittypes.h137
-rw-r--r--win32/wpdpack/Include/ip6_misc.h163
-rw-r--r--win32/wpdpack/Include/pcap-bpf.h47
-rw-r--r--win32/wpdpack/Include/pcap-namedb.h42
-rw-r--r--win32/wpdpack/Include/pcap-stdinc.h93
-rw-r--r--win32/wpdpack/Include/pcap.h45
-rw-r--r--win32/wpdpack/Include/pcap/bluetooth.h48
-rw-r--r--win32/wpdpack/Include/pcap/bpf.h934
-rw-r--r--win32/wpdpack/Include/pcap/namedb.h89
-rw-r--r--win32/wpdpack/Include/pcap/pcap.h407
-rw-r--r--win32/wpdpack/Include/pcap/sll.h129
-rw-r--r--win32/wpdpack/Include/pcap/usb.h90
-rw-r--r--win32/wpdpack/Include/pcap/vlan.h46
-rw-r--r--win32/wpdpack/Include/remote-ext.h444
-rw-r--r--win32/wpdpack/Lib/Packet.libbin0 -> 8450 bytes
-rw-r--r--win32/wpdpack/Lib/libpacket.abin0 -> 21390 bytes
-rw-r--r--win32/wpdpack/Lib/libwpcap.abin0 -> 55842 bytes
-rw-r--r--win32/wpdpack/Lib/wpcap.libbin0 -> 19320 bytes
-rw-r--r--win32/wpdpack/Lib/x64/Packet.libbin0 -> 8290 bytes
-rw-r--r--win32/wpdpack/Lib/x64/libpacket.abin0 -> 20946 bytes
-rw-r--r--win32/wpdpack/Lib/x64/libwpcap.abin0 -> 54444 bytes
-rw-r--r--win32/wpdpack/Lib/x64/wpcap.libbin0 -> 18892 bytes
-rw-r--r--win32/wpdpack/README7
-rw-r--r--win32/wpdpack/license.txt78
130 files changed, 26285 insertions, 2472 deletions
diff --git a/.gitignore b/.gitignore
index bf2f988..34c92e4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,7 @@
-*.a
+*.la
*.dll
+*.exe
*.exp
-*.la
-*.lib
*.lo
*.loT
*.o
@@ -15,9 +14,11 @@
Makefile
Makefile.in
aclocal.m4
+ar-lib
autom4te.cache
+compile
+config.cache
config.guess
-config.h.in
config.log
config.status
config.sub
@@ -32,20 +33,21 @@ libnet-1.?
libnet-1.?.?
libnet-1.?.?.tar.gz
libnet-1.?.tar.gz
-libnet/*-stamp
-compile
-debian
-doc/html/*.css
-doc/html/*.gif
-doc/html/*.html
-doc/html/*.js
-doc/html/*.png
-doc/man/man3/*.3
+libtool
+ltmain.sh
+missing
+stamp-*
+tags
+version.h
+
+include/config.h.in
include/config.h
include/getopt.h
include/libnet.h
include/libnet/stdint.h
+
m4
+
sample/arp
sample/bgp4_hdr
sample/bgp4_notification
@@ -94,10 +96,3 @@ sample/tring_tcp1
sample/tring_tcp2
sample/udp1
sample/udp2
-libtool
-ltmain.sh
-lua/net.so
-missing
-stamp-*
-tags
-version.h
diff --git a/.travis.yml b/.travis.yml
index 7358f4c..bff0002 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,11 +8,19 @@ compiler:
- gcc
- clang
+os:
+ - linux
+ - osx
+
addons:
apt:
packages:
- tree
- doxygen
+ brew:
+ packages:
+ - tree
+ - doxygen
script:
- ./autogen.sh
diff --git a/BUILD-FROM-GIT.md b/BUILD-FROM-GIT.md
new file mode 100644
index 0000000..690d0c6
--- /dev/null
+++ b/BUILD-FROM-GIT.md
@@ -0,0 +1,75 @@
+# BUILD FROM GIT #
+
+I build from git using some top-level scripts. Refer to libnet/INSTALL for additional information and libnet/README.win32 if you're building for/on Windows.
+
+## Minimum requirements are: ##
+
+- A C compiler (obviously)
+
+The Autotools:
+- autoconf 2.69
+- automake 1.14
+- libtool 2.4.2
+
+
+## To build the documentation (optional): ##
+
+- doxygen 1.8.14
+- pod2man
+
+**...and optionally:**
+
+**For Graphics:**
+- graphviz
+
+**For PDF/PS:**
+(The tools found in) The doxygen-latex Package:
+
+- texlive-extra-utils,
+- texlive-latex-extra,
+- texlive-fonts-recommended,
+- latex-xcolor,
+- texlive-font-utils,
+- ghostscript
+
+**For CHM:**
+On Windows:
+- Microsoft HTML Help Workshop (Part of Visual Studio)
+Standalone: http://go.microsoft.com/fwlink/p/?linkid=154968
+
+On *nix:
+- chmcmd (Part of the Free Pascal Compiler (http://www.freepascal.org/)
+
+
+## To build LUA bindings (optional): ##
+
+- libdumbnet-dev
+(consider using my fork https://github.com/sgeto/libdnet)
+
+- liblua5.1-0-dev (See lua/Makefile)
+
+## **To create Debian packages:** ##
+
+- debhelper
+- sharutils
+- quilt
+
+## General procedure is: ##
+
+`git clone https://github.com/sgeto/libnet.git`
+
+`cd libnet/libnet`
+
+`../Prepare`
+
+`../Build`
+
+and then, one of the following, depending on how you like to install local packages:
+
+`sudo make install`
+
+`../Stow`
+
+`../Package`
+
+**Again, see libnet/INSTALL and libnet/README.win32 for more detailed instructions.**
diff --git a/BUILD-FROM-GIT.txt b/BUILD-FROM-GIT.txt
deleted file mode 100644
index 4fe952a..0000000
--- a/BUILD-FROM-GIT.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-I build from git using some scripts. General procedure is
-
- git clone https://github.com/libnet/libnet.git
- cd libnet
- scripts/Prepare
- scripts/Build
-
-and then, one of the following, depending on how you like to install
-local packages:
-
- sudo make install
- scripts/Stow
- scripts/Package
-
diff --git a/Doxyfile b/Doxyfile
new file mode 100644
index 0000000..46124b7
--- /dev/null
+++ b/Doxyfile
@@ -0,0 +1,96 @@
+# Doxyfile 1.8.14
+# ALRIGHT LISTEN UP: This is a standalone Doxyfile for codedocs.xyz.
+# The real deal is libnet.doxygen.conf found in libnet/doc/ (but only works
+# in conjunction with automake)
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "libnet"
+PROJECT_NUMBER = "1.2-rc3"
+PROJECT_BRIEF = "A Portable Framework for Low-Level Network Packet Construction"
+PROJECT_LOGO =
+OUTPUT_DIRECTORY = libnet/doc
+ABBREVIATE_BRIEF =
+STRIP_FROM_PATH = include
+OPTIMIZE_OUTPUT_FOR_C = YES
+EXTRACT_LOCAL_CLASSES = NO
+HIDE_UNDOC_MEMBERS = YES
+HIDE_UNDOC_CLASSES = YES
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET = YES
+WARN_NO_PARAMDOC = YES
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = libnet/doc/libnet_api_main_page.md \
+ libnet/include/libnet \
+ libnet/include/libnet.h
+FILE_PATTERNS = *.h
+RECURSIVE = YES
+EXCLUDE = libnet/include/libnet/libnet-headers.h \
+ libnet/include/libnet/libnet-types.h \
+ libnet/include/libnet/libnet-asn1.h \
+ libnet/include/libnet/libnet-structures.h
+EXAMPLE_PATTERNS =
+USE_MDFILE_AS_MAINPAGE = libnet_api_main_page.md
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION = YES
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+COLS_IN_ALPHA_INDEX = 3
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML = YES
+HTML_OUTPUT = api
+HTML_HEADER = libnet/doc/libnet_api_header.html_tmpl
+HTML_FOOTER = libnet/doc/libnet_api_footer.html_tmpl
+HTML_EXTRA_STYLESHEET = libnet/doc/libnet_api_stylesheet.css_tmpl
+HTML_COLORSTYLE_HUE = 120
+HTML_COLORSTYLE_SAT = 50
+HTML_COLORSTYLE_GAMMA = 40
+CHM_FILE = ../libnet.chm
+HHC_LOCATION = "C:\Program Files (x86)\HTML Help Workshop\hhc.exe"
+DISABLE_INDEX = YES
+SEARCHENGINE = NO
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+LATEX_BATCHMODE = YES
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+PERL_PATH = C:\msys64\usr\bin\perl.exe
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+HAVE_DOT = YES
+DOT_MULTI_TARGETS = YES
diff --git a/Makefile.am b/Makefile.am
index 2826478..8a1e4c6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,3 @@
-# $Id: Makefile.am,v 1.7 2004/03/01 20:26:11 mike Exp $
#
# Libnet automake information file
# Copyright (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com>
@@ -6,16 +5,62 @@
#
# Process this file with automake to produce a Makefile.in script.
-include $(top_srcdir)/Makefile.am.common
+DISTCHECK_CONFIGURE_FLAGS = \
+ --enable-doxygen-doc \
+ --disable-samples
+
+# Include macros implemented in the directory m4
+ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+
+SUBDIRS = include src doc win32
+
+if ENABLE_SAMPLES
+SUBDIRS += sample
+endif
+
+# deleting doc/libnet.tag forces make to rebuild all docs (if enabled)
+CLEANFILES = doc/libnet.tag libnet.pc
+DISTCLEANFILES = fixmanpages
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libnet.pc
-SUBDIRS = include src sample doc win32
-
-EXTRA_DIST = Makefile.am.common msvcbuild.bat
-EXTRA_DIST += README.win32 map-pblock-types
if ENABLE_DOXYGEN
-all: @DX_DOCDIR@/@PACKAGE@.tag
+all: doxygen-doc
@DX_RULES@
+
+all:
+ $(AM_V_GEN)cd $(DX_DOCDIR) && ./fixmanpages && cd -
endif
+
+doc: doxygen-doc
+ $(AM_V_GEN)cd $(DX_DOCDIR) && ./fixmanpages && cd -
+
+EXTRA_DIST = msvcbuild.bat \
+ README.win32 \
+ autogen.sh \
+ map-pblock-types
+
+APIDOCS = $(top_srcdir)/doc/api/*.html \
+ $(top_srcdir)/doc/api/*.css \
+ $(top_srcdir)/doc/api/*.png
+
+APIDOC_DEPS = $(top_srcdir)/doc/libnet.doxygen.conf \
+ $(top_srcdir)/doc/libnet.Pod \
+ $(top_srcdir)/doc/libnet-config.Pod \
+ $(top_srcdir)/doc/libnet_api_header.html_tmpl \
+ $(top_srcdir)/doc/libnet_api_footer.html_tmpl \
+ $(top_srcdir)/doc/libnet_api_stylesheet.css_tmpl
+
+install-data-local:
+ $(mkinstalldirs) $(DESTDIR)$(docdir)/api
+ $(INSTALL_DATA) `test -f doc/api/index.html || echo $(srcdir)/`doc/api/*.png $(DESTDIR)$(docdir)/api
+ $(INSTALL_DATA) `test -f doc/api/index.html || echo $(srcdir)/`doc/api/*.css $(DESTDIR)$(docdir)/api
+ $(INSTALL_DATA) `test -f doc/api/index.html || echo $(srcdir)/`doc/api/*.html $(DESTDIR)$(docdir)/api
+
+uninstall-local:
+ rm -rf $(DESTDIR)$(docdir)/api
+
+# (GNU make only) Unless we say otherwise, spare us the
+# “Entering/Leaving directory ...†messages
+GNUMAKEFLAGS = $(if $(value VERBOSE),,--no-print-directory)
diff --git a/Makefile.am.common b/Makefile.am.common
deleted file mode 100644
index fffd02f..0000000
--- a/Makefile.am.common
+++ /dev/null
@@ -1,14 +0,0 @@
-# $Id: Makefile.am.common,v 1.3 2004/01/03 20:31:00 mike Exp $
-#
-# Libnet automake information file
-# Copyright (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com>
-# All rights reserved.
-#
-
-
-DISTCLEANFILES = *~
-
-ACLOCAL_AMFLAGS=-I m4
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
diff --git a/README b/README
index 716532b..7c8efa3 100644
--- a/README
+++ b/README
@@ -6,10 +6,10 @@
http://github.com/sam-github/libnet
===============================================================================
-libnet provides a fairly portable framework for network packet construction
+Libnet provides a fairly portable framework for network packet construction
an injection.
-It is widely used, but had become unmaintained at packetfactory.net, and it's
+It is widely used, but had become unmaintained at packetfactory.net, and its
author is unreachable.
This version was forked from the 1.1.3 release candidate, then bug fixed,
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..ac98cc0
--- /dev/null
+++ b/README.md
@@ -0,0 +1,40 @@
+[![Build status](https://ci.appveyor.com/api/projects/status/9ic7kmwektgornlg?svg=true)](https://ci.appveyor.com/project/sgeto/libnet) [![Build Status](https://travis-ci.org/sgeto/libnet.svg?branch=master)](https://travis-ci.org/sgeto/libnet)
+
+# Libnet #
+
+Libnet provides a fairly portable framework for network packet construction
+an injection.
+
+It is widely used, but had become unmaintained at packetfactory.net, and its
+author is unreachable.
+
+This version was forked from the 1.1.3 release candidate, then bug fixed,
+actively maintained, and rereleased.
+
+Contact Sam Roberts <vieuxtech@gmail.com> if you have patches, find bugs, or
+have issues porting or building against it.
+
+Newest code is at:
+
+ http://github.com/sam-github/libnet
+
+Releases are at:
+
+ http://sourceforge.net/projects/libnet-dev/
+
+Some old docs are at:
+
+ http://packetfactory.openwall.net/projects/libnet/index.html
+
+**A C library for portable packet creation and injection**
+
+Libnet is an API to help with the construction and handling of network packets. It provides a portable framework for low-level network packet writing and handling (use libnet in conjunction with libpcap and you can write some really cool stuff). Libnet includes packet creation at the IP layer and at the link layer as well as a host of supplementary and complementary functionality. Libnet is very handy with which to write network tools and network test code. See the manpage and sample test code for more detailed information.
+
+Your old code (circa *libnet-1.0.x*) WILL NOT WORK with *libnet-1.1.x*.
+Read *doc/MIGRATION* for easy steps on porting your old code.
+
+**LIBNET 1.1 (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com>**
+http://www.packetfactory.net/libnet
+
+**LIBNET 1.1.3 and later (c) 2009 - 2013 Sam Roberts <vieuxtech@gmail.com>**
+http://github.com/sam-github/libnet \ No newline at end of file
diff --git a/README.win32 b/README.win32
index 52be775..020c38f 100644
--- a/README.win32
+++ b/README.win32
@@ -1,17 +1,246 @@
-Run msvcbuild.bat to build for Win32 with MSVC.
+Information, Recommendations and Build Instructions for Windows
+**************************************************************************
-The batch file depends on the MSVC build environment being set (PATH, etc.),
-this can be done with Visual Studio's vsvars32.bat, or by starting a Visual
-Studio shell.
+_____________________________ IMPORTANT _____________________________
+The execution of the currently shipped msvcbuild.bat batch script will
+causes ANY subsequent none-MSVC build to fail. It has been wrongly set
+up to copy several MSVC-specific header files from <libnet-root>/win32/
+to <libnet-root>/include/ and <libnet-root>/include/libnet/ during the
+build process. This is a high priority issue and will be taken care of
+ASAP. If you ever have to make use of this file, consider compiling all
+other builds from a separate tarball.
+_____________________________________________________________________
+
+This file list additional steps and suggestions for Windows users.
+Please see INSTALL for a more general overview and doc/PORTED for
+other platforms.
+
+Unless you know what you are doing, you should follow the recommendations
+below. Notice that there are plenty of other (sometimes better) ways
+to build libnet, but these steps and suggestions are known to work.
+If the build breaks, please re-read this guide carefully.
+
+Contents
+========
+
+1. Introduction
+ 1.1 Microsoft Visual C++ and GCC/MinGW
+ 1.2 WinPcap/Npcap
+ 1.3 Supported Operating Systems
+
+2. MinGW Compiler
+ 2.1 Native
+ 2.2 Cross-Compiling
+
+3. Microsoft Visual C++
+
+
+
+1. Introduction
+===============
+
+
+1.1 Microsoft Visual C++ and GCC/MinGW
+--------------------------------------------------------------
+
+The Microsoft Visual C++ compiler (aka MSVC) and the GCC Windows port
+(aka MinGW) are unfortunately not fully compatible. Although MSVC is a
+great compiler, libnet has been developed with the GNU toolchain in mind.
+So building libnet with the Visual C++ Build Tools will always have its
+flaws, even while it might work in some points.
+
+Most of libnet’s development is therefore done with GCC and its MinGW
+Windows port.
+In other words, if this this all new to you, I recommended you to use
+MinGW for building libnet on Windows.
+
+
+On the other hand, the two can work well together:
+
+If you for instance build libnet with MinGW, and you want to use it
+with MSVC too (or vice versa), you can use the DLL and the supplied
+"libnet*.def" file located in <libnet-root>/win32/ (this file is always
+rebuild at the end of every successful build on windows) to create an
+MSVC compatible import library that you can use to link your projects
+with without the need of rebuilding libnet again.
+
+To produce a MinGW compatible import library from any libnet DLL:
+
+$ dlltool -D path/to/libnet*.dll -d path/to/libnet*.def -l libnet.dll.a
+
+To produce a MSVC compatible import library from any libnet DLL:
+
+$ lib /machine:X64 /def:example.def (for x64)
+or
+$ lib /machine:X86 /def:example.def (for x86)
+
+Note 1: If you have removed any or all symbol information from the DLL
+(aka "stripped" it), during build, by for example running configure
+with "--enable-fast", then this obviously won't work.
+
+
+1.2 WinPcap/Npcap
+-----------------
+
+Currently, the supported method of sending packets under Windows is with
+WinPcap (http://www.winpcap.org). However, libnet's support for
+Npcap (http://www.npcap.org), an update of WinPcap sponsored by the
+Nmap Project, is being seriously considered.
+Windows users should know that with the switch to Npcap, WinPcap compatibility
+is expected to be deprecated.
+
+Please be sure to install the WinPcap/Npcap driver/DLL and make sure
+that the content of the Wpdpack's/Npcap SDK's Include and Lib directories
+are somewhat reachable by your compiler.
+
+Note 2: Remember that you cannot use MSVC-generated .lib files to create
+shared libraries with MinGW, you have to use the lib*.a files.
+WinPcap development came to a standstill before the Developer's Pack ever
+provided x64 compatible lib*.a files for use with MinGW/Cygwin. And since
+libnet depends on WinPcap, you would have to compile 64-bit lib*.a libraries
+yourself if you want to be able to produce 64-bit compatible libnet builds
+with MinGW/Cygwin.
+
+Luckily for you, this has been taken care of by me. 64-bit compatible
+WinPcap libraries as well as DIY instructions can be found in
+<libnet-root>/win32/wpdpack/.
+
+1.3 Supported Operating Systems
+-------------------------------
+
+At the latest with the switch to Npcap, libnet support for Windows XP,
+Windows Server 2003 and earlier will be dropped.
+I can think of too many better things to do than to continuously deal with
+error handling and backwards compatibility (msvcrt vs crtdll) for EOL systems.
+
+Remnants in the source suggests that building libnet with Cygwin must have
+been possible at some point. This may or may not be the case these days.
+If it still works, let me know. If you get it to work (again), let me know.
+And if you need to get it to work, let me know.
+
+
+2. MinGW Compiler
+=================
+
+Both native and cross compilation are possible, and there are quite a
+few possibilities and options to choose from. If you just want to get
+over with it, follow these steps:
+
+Known traps are:
+- Setting the wrong (or no) prefix. (important when running 'make install')
+- Using incompatible WinPcap libraries for x64 (see Note 2)
+- Not having said WinPcap libraries and header files in your compiler's path
+
+Note 3: If you're building with MinGW, and want to install libnet to your
+compiler's lib and include directories, you almost always want to set your
+prefix manually. If you don't know what that means, run "gcc -v", look for
+"--prefix=/some/path" and use that.
+
+Note 4: If you're using a multilib MinGW-w64 GCC compiler, make sure to add
+the -m32 or -m64 CFLAGS to instruct the compiler to build for your desired
+architecture.
+
+
+2.1 Native
+----------
+
+The recommended MinGW distribution for building libnet is Msys2.
+First, follow the installation instructions for Msys2 available at
+msys2.github.io. Then, depending on your desired target architecture,
+open a mingw32 or mingw64 shell, navigate to the source directory,
+and execute the following commands:
+
+1. If you want to produce 32 bit binaries:
+
+$ CFLAGS="-O2 -Wall -I$(pwd)/win32/wpdpack/Include" LDFLAGS="-L$(pwd)/win32/wpdpack/Lib/" ./configure --prefix=/mingw64
+
+If you want to produce 64 bit binaries:
+
+$ CFLAGS="-O2 -Wall -I$(pwd)/win32/wpdpack/Include" LDFLAGS="-L$(pwd)/win32/wpdpack/Lib/x64" ./configure --prefix=/mingw64
+
+2. $ make
+
+3. $ make install (optional)
+
+
+2.2 Cross-Compiling
+-------------------
+
+Note 5: During sample building, you may see a warning similar this:
+
+ Could not determine the host path corresponding to
+ `... a path ...'
+ Continuing, but uninstalled executables may not work.
+
+This, among other things, means that the samples will depend on
+a shared version of libgcc (aka libgcc_s_sjlj-1.dll). If no shared
+version of libgcc was built when the compiler was configured, you
+most likely won't be able to execute them.
+In that case, your best bet is to link with the static version
+of libgcc by disabling shared libraries altogether
+(./configure --disable-shared).
+
+
+In general, you should know what you're doing and what your host, target
+and compiler are all about beforehand.
+These steps have been successfully tested on Ubuntu and the default
+mingw32-w32 toolchain (GCC 4.8).
+The recommended steps to build libnet therefore are:
+
+1. If you're targeting x86:
+$ CFLAGS="-O2 -Wall -I$(pwd)/win32/wpdpack/Include" LDFLAGS="-L$(pwd)/win32/wpdpack/Lib" ./configure --host=i686-w64-mingw32 --prefix=/usr/i686-w64-mingw32
+
+If you're targeting x64:
+$ CFLAGS="-O2 -Wall -I$(pwd)/win32/wpdpack/Include" LDFLAGS="-L$(pwd)/win32/wpdpack/Lib/x64" ./configure --host=x86_64-w64-mingw32 --prefix=/usr/x86_64-w64-mingw32
+
+2. make
+
+3. (optionally) sudo make install
+
+Notice that the --host option is usually all you need for cross-compiling.
+
+Note 6: Although the steps should be very similar, if you're using any
+other distribution of MinGW (cross or native), you're pretty much on your own.
+You can send suggestions and complains to https://github.com/sgeto/libnet/issues
+
+
+3. Microsoft Visual C++
+=======================
+Known traps are:
+- Not using the correct (x86 or x64) version of the Visual Studio command prompt
+- Using incompatible WinPcap libraries for x64 (see Note 2)
+- Not having said WinPcap libraries and header files in your compiler's path
+
+Until the issue described at the top of this document is completely
+resolved, MSVC support should be considered a work in progress and unsafe.
+And that’s why I won't even go into it, and instead leave you with these
+old but still perfectly fine instructions:
+
+
+
+Run msvcbuild.bat to build for Win32 with MSVC
+----------------------------------------------
+
+The batch file takes arguments and sets the appropriate path and environment
+variables for the desired built by running either vsvars32.bat (for x86),
+vcvars64.bat (for x64) or vcvarsall.bat (for Cross development).
+Type "msvcbuild.bat help" for a description of all available options.
+If no argument is specified, x86 is assumed.
The batch file copies pre-prepared headers out of win32/, avoiding the
-requirement for a gnu (cygwin or mingw) build environment.
+requirement for a gnu (Cygwin or MinGW) build environment.
-The batch file hard-codes the location of the WinPcap developer's tools,
-you may have to modify it for your environment, or install the developer's
+The batch file hard-codes the location of the WinPcap developer's tools.
+You may have to modify it for your environment, or install the developer's
pack in the expected location.
-For Visual Studio 2010, the shell can be found at:
+Although not required, it is advisable to execute the batch file from a
+VS2015 Developer Command Prompt.
+
+For Visual Studio 2015, the shell can be found at:
- Program Files >> Microsoft Visual Studio 2010 >> Visual Studio Tools >> Visual Studio Command Prompt
+ Program Files (x86) >> Microsoft Visual Studio 14.0 >> Common7 >> Tools >> VsDevCmd.bat
+After building, libnet libraries and .obj files are found in newly created
+"<libnet-root>\libnet\src\[Win32|Win64]\" "<libnet-root>\libnet\lib\[x86|x64]\"
+respectively.
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..b21829b
--- /dev/null
+++ b/TODO
@@ -0,0 +1,44 @@
+This file complements the TODO in doc/TODO
+
+
+Roadmap:
+
+change all __WIN32 and __WIN32__ preprocessor directives with the more universal WIN32 and _WIN32 directives (msvc + mingw) (eliminating the need for -mwin32)
+
+add INSTALL and edit README in libnet/README
+
+short term goals:
+
+I'm afraid the build system needs a complete overhaul.
+
+improve documentation
+- FAQ
+- Examples
+- add RFCs
+
+fix "broken" samples (on win32?)
+
+fix MSVC/Mingw collision
+
+increase warning level on all OS's when using "Build" top level script
+
+
+long term goals:
+
+build with the debug memory allocation or dmalloc library
+http://dmalloc.com/
+https://www.gnu.org/software/automake/manual/html_node/Public-Macros.html (AM_WITH_DMALLOC)
+
+implement netmap compatibilty https://github.com/luigirizzo/netmap
+
+switch to npcap (win32)
+
+come after as many reasonable issues in https://github.com/sam-github/libnet/issues/ and http://stackoverflow.com/questions/tagged/libnet# as possible
+
+Somethings not right with checksums...
+
+improve LUA bindings
+
+test and verify everything IPv6
+
+Dynamic loading... \ No newline at end of file
diff --git a/acinclude.m4 b/acinclude.m4
deleted file mode 100644
index de6f459..0000000
--- a/acinclude.m4
+++ /dev/null
@@ -1,329 +0,0 @@
-dnl $Id: acinclude.m4,v 1.3 2004/01/15 23:53:06 mike Exp $
-dnl
-dnl Libnet specific autoconf macros
-dnl Copyright (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com>
-dnl All rights reserved.
-dnl
-
-dnl
-dnl Check for the Linux /proc filesystem
-dnl
-dnl usage: AC_LIBNET_LINUX_PROCFS
-dnl results: HAVE_LINUX_PROCFS
-dnl
-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
- ac_cv_libnet_linux_procfs=yes
- else
- ac_cv_libnet_linux_procfs=no
- fi)
- AC_MSG_RESULT($ac_cv_libnet_linux_procfs)
- if test $ac_cv_libnet_linux_procfs = yes ; then
- AC_DEFINE(HAVE_LINUX_PROCFS, 1,
- [Define if you have the Linux /proc filesystem.])
- fi])
-
-dnl
-dnl Checks to see if this linux kernel has a working PF_PACKET
-dnl
-dnl usage:
-dnl
-dnl AC_LIBNET_CHECK_PF_PACKET
-dnl
-dnl results:
-dnl
-dnl HAVE_PACKET_SOCKET (DEFINED)
-dnl
-
-AC_DEFUN([AC_LIBNET_CHECK_PF_PACKET],
-[
- AC_MSG_CHECKING(for packet socket (PF_PACKET))
- AC_CACHE_VAL(libnet_cv_have_packet_socket,
-
- [
- cat > pf_packet-test.c << EOF
-#include <stdio.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <netinet/in.h>
-#include <sys/socket.h>
-#include <features.h> /* for the glibc version number */
-#if __GLIBC__ >= 2 && __GLIBC_MINOR >= 1
-#include <netpacket/packet.h>
-#include <net/ethernet.h> /* the L2 protocols */
-#else
-#include <asm/types.h>
-#include <linux/if_packet.h>
-#include <linux/if_ether.h> /* The L2 protocols */
-#endif
-
-#ifndef SOL_PACKET
-#define SOL_PACKET 263
-#endif /* SOL_PACKET */
-
-int
-main(int argc, char **argv)
-{
- int fd;
-
- fd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
- if (fd == -1)
- {
- if (errno == EPERM)
- {
- /* user's UID != 0 */
- printf("probably");
- exit (EXIT_FAILURE);
- }
- printf("no");
- exit (EXIT_FAILURE);
- }
- printf("yes");
- exit (EXIT_SUCCESS);
-}
-EOF
- ${CC-cc} -o pf_packet-test $CFLAGS pf_packet-test.c >/dev/null 2>&1
-
- # Oopz 4.3 BSD doesn't have this. Sorry.
- if test ! -x ./pf_packet-test ; then
- libnet_cv_have_packet_socket=choked
- else
- libnet_cv_have_packet_socket=`./pf_packet-test`;
- fi
- if test $libnet_cv_have_packet_socket = choked; then
- AC_MSG_RESULT(test program compile choked... assuming no)
- elif test $libnet_cv_have_packet_socket = yes; then
- AC_MSG_RESULT(yes)
- elif test $libnet_cv_have_packet_socket = probably; then
- AC_MSG_RESULT(test program got EPERM... assuming yes)
- elif test $libnet_cv_have_packet_socket = no; then
- AC_MSG_RESULT(no)
- fi
-
- rm -f pf_packet-test* core core.pf_packet-test
-
- ])
-
- if test $libnet_cv_have_packet_socket = yes -o $libnet_cv_have_packet_socket = probably; then
- AC_DEFINE(HAVE_PACKET_SOCKET, 1,
- [Define if we're running on a Linux system with PF_PACKET sockets.])
- fi
-])
-
-dnl
-dnl Looks for a previous libnet version and attempts to determine which verion
-dnl it is. Version 0.8 was the first version that actually knew internally
-dnl what version it was.
-dnl
-dnl usage:
-dnl
-dnl AC_LIBNET_CHECK_LIBNET_VERSION
-dnl
-dnl results:
-dnl
-dnl
-dnl
-
-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
-changequote([, ])dnl
- AC_MSG_RESULT($LIB_PREFIX/libnet.a 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"\
- | cut -f3 -d" "`;\
- if test -z "$__LIBNET_VERSION"; then
- AC_MSG_RESULT(<0.8)
- else
- AC_MSG_RESULT($__LIBNET_VERSION)
- fi
- fi\
- )
-])
-
-
-dnl
-dnl Checks to see if this linux kernel uses ip_sum or ip_csum
-dnl (Pulled from queso)
-dnl
-dnl usage:
-dnl
-dnl AC_LIBNET_CHECK_IP_CSUM
-dnl
-dnl results:
-dnl
-dnl HAVE_STRUCT_IP_CSUM (DEFINED)
-dnl
-
-AC_DEFUN([AC_LIBNET_CHECK_IP_CSUM],
-[
- AC_MSG_CHECKING([struct ip contains ip_csum])
- AC_TRY_COMPILE([
- #define __BSD_SOURCE
- #define _BSD_SOURCE
- #define _DEFAULT_SOURCE
- #include <sys/types.h>
- #include <netinet/in.h>
- #include <netinet/in_systm.h>
- #include <netinet/ip.h>],
- [
- struct ip ip;
- ip.ip_csum = 0;
- ],
- [AC_MSG_RESULT(yes);
- AC_DEFINE(HAVE_STRUCT_IP_CSUM)],
- [AC_MSG_RESULT(no);
- ])
-])
-
-
-dnl
-dnl Checks endianess
-dnl
-dnl usage:
-dnl
-dnl AC_LIBNET_ENDIAN_CHECK
-dnl
-dnl results:
-dnl
-dnl LIBNET_BIG_ENDIAN = 1 or
-dnl LIBNET_LIL_ENDIAN = 1
-dnl
-
-AC_DEFUN([AC_LIBNET_ENDIAN_CHECK],
- [AC_C_BIGENDIAN
- if test $ac_cv_c_bigendian = yes ; then
- AC_DEFINE(LIBNET_BIG_ENDIAN, 1,
- [We are running on a big-endian machine.])
- ENDIANESS="LIBNET_BIG_ENDIAN"
- LIBNET_CONFIG_DEFINES="$LIBNET_CONFIG_DEFINES -DLIBNET_BIG_ENDIAN"
- else
- AC_DEFINE(LIBNET_LIL_ENDIAN, 1,
- [We are running on a little-endian machine.])
- ENDIANESS="LIBNET_LIL_ENDIAN"
- LIBNET_CONFIG_DEFINES="$LIBNET_CONFIG_DEFINES -DLIBNET_LIL_ENDIAN"
- fi
- ])
-
-dnl
-dnl Improved version of AC_CHECK_LIB
-dnl
-dnl Thanks to John Hawkinson (jhawk@mit.edu)
-dnl
-dnl usage:
-dnl
-dnl AC_LBL_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [,
-dnl ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
-dnl
-dnl results:
-dnl
-dnl LIBS
-dnl
-
-define([AC_LBL_CHECK_LIB],
-[AC_MSG_CHECKING([for $2 in -l$1])
-dnl Use a cache variable name containing both the library and function name,
-dnl because the test really is for library $1 defining function $2, not
-dnl just for library $1. Separate tests with the same $1 and different $2's
-dnl may have different results.
-ac_lib_var=`echo $1['_']$2['_']$5 | sed 'y%./+- %__p__%'`
-AC_CACHE_VAL(ac_cv_lbl_lib_$ac_lib_var,
-[ac_save_LIBS="$LIBS"
-LIBS="-l$1 $5 $LIBS"
-AC_TRY_LINK(dnl
-ifelse([$2], [main], , dnl Avoid conflicting decl of main.
-[/* Override any gcc2 internal prototype to avoid an error. */
-]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
-extern "C"
-#endif
-])dnl
-[/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $2();
-]),
- [$2()],
- eval "ac_cv_lbl_lib_$ac_lib_var=yes",
- eval "ac_cv_lbl_lib_$ac_lib_var=no")
-LIBS="$ac_save_LIBS"
-])dnl
-if eval "test \"`echo '$ac_cv_lbl_lib_'$ac_lib_var`\" = yes"; then
- AC_MSG_RESULT(yes)
- ifelse([$3], ,
-[changequote(, )dnl
- ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-changequote([, ])dnl
- AC_DEFINE_UNQUOTED($ac_tr_lib)
- LIBS="-l$1 $LIBS"
-], [$3])
-else
- AC_MSG_RESULT(no)
-ifelse([$4], , , [$4
-])dnl
-fi
-])
-
-dnl
-dnl AC_LBL_LIBRARY_NET
-dnl
-dnl This test is for network applications that need socket() and
-dnl gethostbyname() -ish functions. Under Solaris, those applications
-dnl need to link with "-lsocket -lnsl". Under IRIX, they need to link
-dnl with "-lnsl" but should *not* link with "-lsocket" because
-dnl libsocket.a breaks a number of things (for instance:
-dnl gethostbyname() under IRIX 5.2, and snoop sockets under most
-dnl versions of IRIX).
-dnl
-dnl Unfortunately, many application developers are not aware of this,
-dnl and mistakenly write tests that cause -lsocket to be used under
-dnl IRIX. It is also easy to write tests that cause -lnsl to be used
-dnl under operating systems where neither are necessary (or useful),
-dnl such as SunOS 4.1.4, which uses -lnsl for TLI.
-dnl
-dnl This test exists so that every application developer does not test
-dnl this in a different, and subtly broken fashion.
-
-dnl It has been argued that this test should be broken up into two
-dnl seperate tests, one for the resolver libraries, and one for the
-dnl libraries necessary for using Sockets API. Unfortunately, the two
-dnl are carefully intertwined and allowing the autoconf user to use
-dnl them independantly potentially results in unfortunate ordering
-dnl dependancies -- as such, such component macros would have to
-dnl carefully use indirection and be aware if the other components were
-dnl executed. Since other autoconf macros do not go to this trouble,
-dnl and almost no applications use sockets without the resolver, this
-dnl complexity has not been implemented.
-dnl
-dnl The check for libresolv is in case you are attempting to link
-dnl statically and happen to have a libresolv.a lying around (and no
-dnl libnsl.a).
-dnl
-AC_DEFUN([AC_LBL_LIBRARY_NET],
-[
- # Most operating systems have gethostbyname() in the default searched
- # libraries (i.e. libc):
- AC_CHECK_FUNC(gethostbyname, ,
- # Some OSes (eg. Solaris) place it in libnsl:
- AC_LBL_CHECK_LIB(nsl, gethostbyname, ,
- # Some strange OSes (SINIX) have it in libsocket:
- AC_LBL_CHECK_LIB(socket, gethostbyname, ,
- # Unfortunately libsocket sometimes depends on libnsl.
- # AC_CHECK_LIB's API is essentially broken so the
- # following ugliness is necessary:
- AC_LBL_CHECK_LIB(socket, gethostbyname,
- LIBS="-lsocket -lnsl $LIBS",
- AC_CHECK_LIB(resolv, gethostbyname),
- -lnsl))))
- AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket, ,
- AC_LBL_CHECK_LIB(socket, socket, LIBS="-lsocket -lnsl $LIBS", ,
- -lnsl)))
- # DLPI needs putmsg under HPUX so test for -lstr while we're at it
- AC_CHECK_LIB(str, putmsg)
- ])
-
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..3f963f0
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,11 @@
+
+install:
+- appveyor DownloadFile http://www.winpcap.org/install/bin/WpdPack_4_1_2.zip
+- 7z x .\WpdPack_4_1_2.zip -o..
+
+before_build:
+- cd C:\projects\libnet\libnet
+
+build_script:
+- msvcbuild.bat
+- msvcbuild.bat x64 \ No newline at end of file
diff --git a/autogen.sh b/autogen.sh
index b1f4a93..a794250 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -5,4 +5,4 @@
set -e
-autoreconf --install $*
+autoreconf --force --install $*
diff --git a/configure.ac b/configure.ac
index 58b5f2a..9723e3f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,27 +1,40 @@
+dnl
dnl Libnet autoconfiguration information file
dnl Copyright (c) 1998 - 2002 Mike D. Schiffman <mike@infonexus.com>
+dnl Modified by Ali Abdulkadir <autostart.ini@gmail.com>
dnl All rights reserved.
dnl
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([libnet],[1.2-rc3],,,[https://github.com/libnet/libnet])
-AC_MSG_RESULT(beginning autoconfiguration process for libnet-${PACKAGE_VERSION} ...)
+AC_INIT([libnet],[1.2-rc3],[https://github.com/libnet/libnet/issues],,[https://github.com/libnet/libnet])
+
+dnl the autotools and libtool should be at least these versions
+AC_PREREQ([2.69])
+LT_PREREQ([2.4.2])
+
+AC_COPYRIGHT([Copyright 1998 - 2017 The libnet Developer Community])
+AC_MSG_RESULT(Beginning autoconfiguration process for libnet-${PACKAGE_VERSION} ...)
+AC_PROG_SHELL
+AC_PROG_SED
+AC_CHECK_PROGS([CHMOD],[chmod],[true])
AC_CANONICAL_TARGET
AC_CONFIG_SRCDIR([src/libnet_build_ip.c])
AC_CONFIG_MACRO_DIR([m4])
-AM_INIT_AUTOMAKE([foreign subdir-objects no-dependencies -Wall])
+AM_INIT_AUTOMAKE([1.14 foreign subdir-objects no-dependencies dist-zip])
+AM_SILENT_RULES([yes])
AC_CONFIG_HEADERS([include/config.h])
-dnl
+dnl the default compiler flags are "-O2 -g" if the user does not set anything.
+dnl IMO O2 optimizations are fine, but debugging should be up to the user.
+: ${CFLAGS="-O2"}
+
dnl Check for the usual programs
-dnl
AC_PROG_CC
AC_PROG_INSTALL
AC_USE_SYSTEM_EXTENSIONS
-dnl disable shared libraries (for now)
-dnl AC_DISABLE_SHARED
-AM_PROG_AR
-LT_INIT
+dnl The default is to use only PIC objects.
+dnl This can still be overwritten with --without-pic
+LT_INIT([pic-only])
dnl
dnl Check for DOxygen and enable its features
@@ -70,26 +83,16 @@ dnl
AC_LIBNET_ENDIAN_CHECK
dnl AC_LBL_LIBRARY_NET
-
AC_SUBST(ENDIANESS)
AC_SUBST(HAVE_PACKET_SOCKET)
AC_SUBST(ADDITIONAL_LIBS)
AC_SUBST(LIBNET_CONFIG_DEFINES)
AC_SUBST(LIBNET_CONFIG_LIBS)
+dnl FIXME this variable is unused
AC_SUBST(LIBNET_CONFIG_CFLAGS)
AC_SUBST(LTLIBOBJS)
-dnl
-dnl Set the root install directory
-dnl
-AC_PREFIX_DEFAULT(/usr/local)
-dnl if test "$prefix" = "NONE"; then
-dnl prefix="/usr"
-dnl fi
-
-dnl
dnl Get link-layer interface type
-dnl
AC_ARG_WITH(
[link-layer],
[AS_HELP_STRING([--with-link-layer],[when cross-compiling, one of * from libnet_link_*.c @<:@autodetect@:>@])]
@@ -107,9 +110,11 @@ if test -n "${with_link_layer}"; then
nit) AC_LIBOBJ([libnet_link_nit]) ;;
snoop) AC_LIBOBJ([libnet_link_snoop]) ;;
dlpi) AC_LIBOBJ([libnet_link_dlpi]) ;;
+ win32) AC_LIBOBJ([libnet_link_win32]) ;;
+ none) AC_LIBOBJ([libnet_link_none]) ;;
linux) AC_LIBOBJ([libnet_link_linux])
- AC_LIBNET_CHECK_PF_PACKET
- AC_LIBNET_LINUX_PROCFS ;;
+ AC_LIBNET_CHECK_PF_PACKET
+ AC_LIBNET_LINUX_PROCFS ;;
none) AC_LIBOBJ([libnet_link_none]) ;;
*) AC_MSG_ERROR([Invalid link type "${with_link_layer}"]) ;;
esac
@@ -147,6 +152,9 @@ elif test "${cross_compiling}" != "yes" -a -c /dev/nit ; then # check
elif test "$target_os" = "cygwin" ; then
AC_LIBOBJ([libnet_link_win32])
AC_MSG_RESULT(found link layer win32 wpcap)
+elif test "$host" = "i686-w64-mingw32" -o "x86_64-w64-mingw32" -o "x86_64-pc-mingw64"; then
+ AC_LIBOBJ([libnet_link_win32])
+ AC_MSG_RESULT(found link layer win32 @<:@WinPcap@:>@)
else
AC_LIBOBJ([libnet_link_none])
AC_MSG_WARN(could not find a link-layer packet interface)
@@ -155,26 +163,98 @@ fi
dnl This is necessary so that .o files in LIBOBJS are also built via
dnl the ANSI2KNR-filtering rules.
+dnl FIXME Isn't this nowadays already taken care of by AC_PROG_CC?
LIB@&t@OBJS=`echo "$LIB@&t@OBJS" |
sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'`
LTLIBOBJS=`echo "$LIB@&t@OBJS" |
sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
+link_layer=`"echo"${LTLIBOBJS}"" | cut -c 13- | awk -F$ '/U.lo/ {print $1}'`
-
-dnl
dnl Inform user about the packet builders we've got
-dnl
echo -n "scanning available packet construction modules: "
for dir in src/*build*c ; do
echo $dir | sed -e /src\\/libnet_build_/s/// | sed -e /\\.c/s/// | tr \\n \\040
done
echo ""
-dnl
-dnl Check and set OS specific parameters
-dnl
+# dnl Check for Doxygen and enable its features
+# dnl See m4/ax_prog_doxygen.m4
+DX_DOXYGEN_FEATURE(OFF)
+DX_DOT_FEATURE(ON)
+DX_HTML_FEATURE(ON)
+DX_CHM_FEATURE(ON)
+DX_CHI_FEATURE(OFF)
+DX_MAN_FEATURE(ON)
+DX_RTF_FEATURE(OFF)
+DX_XML_FEATURE(OFF)
+DX_PDF_FEATURE(ON)
+DX_PS_FEATURE(OFF)
+DX_INIT_DOXYGEN(${PACKAGE_NAME}, [$(top_srcdir)/doc/libnet.doxygen.conf], [doc])
+AM_CONDITIONAL(ENABLE_DOXYGEN,[test "x${DX_FLAG_doc}" = x1])
+
+if test ${DX_FLAG_doc} -eq 1; then
+ rebuild_docs=yes
+else
+ rebuild_docs=no
+fi
+
+dnl Check for sample building
+AC_MSG_CHECKING([whether to build sample programs])
+AC_ARG_ENABLE([samples],
+ [AS_HELP_STRING([--disable-samples],[do not build sample programs @<:@default=no@:>@])],
+ [enable_samples=$enableval],
+ [enable_samples=yes]
+)
+AC_MSG_RESULT([$enable_samples])
+
+AM_CONDITIONAL([ENABLE_SAMPLES], [test "$enable_samples" = "yes"])
+
+dnl Check for debug
+dnl FIXME make it do any actual debuging
+AC_MSG_CHECKING([whether to compile in debug mode])
+AC_ARG_ENABLE([debug],
+ [AS_HELP_STRING([--enable-debug],[compile with extra debugging output @<:@default=no@:>@])],
+ [use_debug=$enableval],
+ [use_debug=no]
+)
+AC_MSG_RESULT([$use_debug])
+
+dnl Check for max speed
+dnl FIXME add more flags
+AC_MSG_CHECKING([whether to enable additional optimizations])
+AC_ARG_ENABLE([fast],
+ [AS_HELP_STRING([--enable-fast],[compile with optimizations @<:@default=no@:>@])],
+ [use_fast=$enableval],
+ [use_fast=no]
+)
+AC_MSG_RESULT([$use_fast])
+
+if test "x${use_fast}" != "xno"
+then
+ if test "x${use_debug}" != "xno"
+ then
+ AC_MSG_ERROR([Cannot specify --enable-fast and --enable-debug at the same time.])
+ fi
+fi
+
+if test "x$use_fast" = "xyes"
+then
+ OPT_FLAGS="-O2 -g -fno-strict-aliasing"
+else
+ OPT_FLAGS="-O0 -ggdb"
+ AM_CFLAGS="${AM_CFLAGS} -fkeep-inline-functions"
+ if test "x$use_debug" = "xyes"
+ then
+ AM_CPPFLAGS="${AM_CPPFLAGS} -DDEBUG -DTRACE"
+ fi
+fi
+
+dnl what (not) to do if the user disables shared libraries
+AM_CONDITIONAL([COND_SHARED], [test "x$enable_shared" != xno])
+
+dnl Check and set OS specific parameters
case "$target_os" in
*linux*)
@@ -292,7 +372,7 @@ dnl
esac
- ADDITIONAL_LIBS='-lresolv -lsocket -lnsl'
+ ADDITIONAL_LIBS="-lresolv -lsocket -lnsl"
LIBNET_CONFIG_LIBS="$LIBNET_CONFIG_LIBS -lresolv -lsocket -lnsl"
;;
@@ -302,15 +382,47 @@ dnl
AC_CHECK_HEADERS(sys/dlpi_ext.h)
;;
-*cygwin*)
- AC_DEFINE(LIBNET_BSDISH_OS, 1,
- [Define if our build OS supports the BSD APIs])
- LIBNET_CONFIG_DEFINES="-DLIBNET_BSDISH_OS"
- CFLAGS="$CFLAGS -mno-cygwin -O0 -fnative-struct -I/usr/include/pcap"
- AC_CHECK_LIB(packet, PacketSetMode, ,AC_MSG_ERROR(packet lib not found.))
- AC_CHECK_LIB(wpcap, pcap_setmode, ,AC_MSG_ERROR(pcap lib not found.))
- LIBS="$LIBS -lws2_32"
- ;;
+*cygwin* | *msys*)
+ WIN32="yes"
+ AC_SUBST(WIN32)
+ AC_DEFINE(LIBNET_BSDISH_OS, 1,
+ [Define if our build OS supports the BSD APIs])
+ LIBNET_CONFIG_DEFINES="-DLIBNET_BSDISH_OS"
+ CFLAGS="$CFLAGS -mwin32"
+ AC_CHECK_LIB(packet, PacketSetMode, ,AC_MSG_ERROR(packet lib not found.))
+ AC_CHECK_LIB(wpcap, pcap_setmode, ,AC_MSG_ERROR(pcap lib not found.))
+ LIBS="$LIBS -lws2_32"
+ ;;
+
+*mingw*)
+ WIN32="yes"
+ AC_SUBST(WIN32)
+
+ if test "$enable_shared" = "yes"; then
+ AC_CHECK_TOOL(WINDRES, windres, :)
+ fi
+
+ AC_DEFINE(WIN32_LEAN_AND_MEAN, 1,
+ [Define to limit the scope of <windows.h>])
+
+ AC_CHECK_LIB(packet, PacketSetMode, ,AC_MSG_ERROR(libpacket.a not found. See README.win32 for more information))
+ AC_CHECK_LIB(wpcap, pcap_setmode, ,AC_MSG_ERROR(libwpcap.a not found. See README.win32 for more information))
+ LIBS="$LIBS -lws2_32 -liphlpapi"
+
+ if test "$host" = "i686-w64-mingw32" ; then
+ CFLAGS="$CFLAGS -march=i686 -mwin32"
+ else
+ CFLAGS="$CFLAGS -mwin32"
+dnl the default GCC toolchains on Debian & Co are so old
+ AX_CHECK_LINK_FLAG([-Wl,--high-entropy-va],
+ [LDFLAGS="$LDFLAGS -Wl,--high-entropy-va"],
+ [AC_MSG_NOTICE([Consider updating your toolchain.])])
+ fi
+
+ if test "${cross_compiling}" = "yes" ; then
+ CFLAGS="$CFLAGS -static-libgcc"
+ fi
+ ;;
*irix*)
CFLAGS="$CFLAGS -DINET6=1"
@@ -319,22 +431,80 @@ dnl
*)
AC_MSG_WARN(apparently your OS is not officially supported yet)
AC_MSG_WARN(this may not work)
- AC_MSG_RESULT(please send diffs to vieuxtech@gmail.com)
+ AC_MSG_RESULT(please send diffs to autostart.ini@gmail.com)
;;
esac
+dnl this only matters if we are building for Windows...
+AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"])
+
+AC_CONFIG_FILES([Makefile \
+ doc/Makefile \
+ doc/html/Makefile \
+ doc/man/Makefile \
+ doc/man/man3/Makefile \
+ include/Makefile \
+ include/libnet.h \
+ libnet.pc \
+ src/Makefile \
+ sample/Makefile])
+AC_CONFIG_FILES([doc/fixmanpages], [chmod a+x doc/fixmanpages])
+AC_OUTPUT
-AC_ARG_ENABLE([samples],
- [AS_HELP_STRING([--enable-samples],[install the sample programs @<:@default=no@:>@])])
+AC_MSG_RESULT([
+-=-=-=-=-=-=-=-=-= $PACKAGE Configuration Complete =-=-=-=-=-=-=-=-=-=-
-AM_CONDITIONAL([INSTALL_SAMPLES], [test x"$enable_samples" = xyes])
-AC_CONFIG_FILES([Makefile src/Makefile \
- include/Makefile \
- include/libnet/Makefile win32/Makefile \
- sample/Makefile doc/Makefile \
- doc/man/Makefile doc/man/man3/Makefile doc/html/Makefile \
- include/libnet.h libnet.pc])
-AC_OUTPUT
+Configuration Summary
+
+ Version : ..................... ${VERSION}
+ Protocols: .................... 32
+
+ Host : ........................ ${host}
+ Operating System: ............. ${host_os}
+ Host CPU : .................... ${host_cpu}
+ Host Vendor : ................. ${host_vendor}
+ Host OS : ..................... ${host_os}
+ Prefix: ....................... ${prefix}
+
+Compilation Environment
+
+ Cross-compiling: .............. ${cross_compiling}
+ Compiler is GCC: .............. ${ac_cv_c_compiler_gnu}
+ CC: ........................... ${CC}
+ CFLAGS:........................ ${CFLAGS}
+ LD: ........................... ${LD}
+ LDFLAGS: ...................... ${LDFLAGS}
+ LIBS: ......................... ${LIBS}
+
+Features and Examples
+
+ Link Layer: ................... ${link_layer}
+ Shared Libraries: ............. ${enable_shared}
+ Static Libraries: ............. ${enable_static}
+ PIC ........................... ${pic_mode}
+ Debugging: .................... ${use_debug}
+ Additional Optimizations: ..... ${use_fast}
+ Build Sample Programs: ........ ${enable_samples}
+ Rebuild docs: ................. ${rebuild_docs}
+
+To override options, see ./configure --help
+
+To disable silent building and print the full command line of every stage, run "make V=1"
+])
+if test "$WIN32" = "yes" ; then
+AC_MSG_WARN([To compile shared libraries on MinGW, use the WinPcap libraries in $(pwd)/win32/.
+GCC is NOT able to produce x64 compatible images using the official WinPcap Developer Pack.
+See README.win32 for more information.
+
+Report bugs to ${PACKAGE_BUGREPORT}])
+elif test "$rebuild_docs" = "yes" ; then
+AC_MSG_RESULT([To build just the Documentation run "make doc"
+
+Report bugs to ${PACKAGE_BUGREPORT}])
+else
+AC_MSG_RESULT([Report bugs to ${PACKAGE_BUGREPORT}])
+fi
+
dnl EOF
diff --git a/doc/PORTED b/doc/PORTED
index 7af1c39..a619859 100644
--- a/doc/PORTED
+++ b/doc/PORTED
@@ -1,47 +1,136 @@
-===============================================================================
- $Id: PORTED,v 1.2 2004/01/03 20:31:00 mike Exp $
- LIBNET 1.1 (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com>
- http://www.packetfactory.net/libnet
-===============================================================================
+==============================================================================
+ P O R T I N G S T A T U S
+==============================================================================
-NOTE - this list is no longer maintained, and there are more supported
-operating systems than listed here.
+libnet is reasonably portable.
- 1.1.0 PORTED OPERATING SYSTEMS
-
- If you verify libnet building and running successfully (sample code works)
- on a platform not listed here please send email to mike@infonexus.com.
+If you verify libnet building and running successfully (sample code works)
+on platforms currently labeled UNKNOWN or not listed here at all, please
+send email to autostart.ini@gmail.com.
- - BSD/OS
- 4.x
+libnet has been run successfully on at least the following operating systems:
- - Cygwin
- - requires winpcap (http://netgroup-serv.polito.it/winpcap) and pcap
- header files copied to /usr/include/pcap/ and the library files to
- be copied to /usr/lib/
+SYSTEM STATUS NOTES
+==============================================================================
- - FreeBSD
- version?
+LINUX
+------------------------------------------------------------------------------
+ Linux 3.x FULL (primary development platform)
- - HPUX
- 11.0
+SOLARIS
+------------------------------------------------------------------------------
+ Solaris UNKNOWN not confirmed working in ages
- - Linux
- 2.0.x
- 2.2.x
- 2.4.x
+*BSD
+------------------------------------------------------------------------------
+ FreeBSD UNKNOWN not confirmed working in ages
- - OpenBSD
- 2.x
- 3.x
+ OpenBSD UNKNOWN not confirmed working in ages
- - OS/X
- version?
+ NetBSD UNKNOWN not confirmed working in ages
- - Solaris
- 2.x
- 7
- 8
- 9
+HP-UX
+------------------------------------------------------------------------------
+ HP-UX UNKNOWN not confirmed working in ages
-EOF
+Apple (Darwin)
+------------------------------------------------------------------------------
+ macOS FULL not tested by me
+
+WINDOWS (Native/MinGW/Cygwin/Cross)
+------------------------------------------------------------------------------
+ MSVC 14.0 FULL Working. See README.win32 for instructions
+
+ MinGW (GCC 6.2) FULL Working. See README.win32 for instructions
+
+ Cygwin UNKNOWN not confirmed working in ages
+
+ANDROID (Native/Cross)
+------------------------------------------------------------------------------
+ Termux (clang 3.9.1) FULL Working. See detailed instructions below
+
+ ARM Toolchain (gnueabi) FULL not tested by me
+
+
+Platform Specific Details/Instructions
+======================================
+
+ANDROID
+-------
+libnet can be build natively on Android devices running 5.0 Lollipop (SDK 21)
+or higher using Termux (https://termux.com/).
+See the help pages of Termux for install and setup instructions.
+
+At the time of this writing, doxygen has not been ported to Android yet.
+So for this guide, we will build libnet without any docs. If you want docs
+you can do one the following:
+
+- build from a release (https://github.com/sgeto/libnet/releases)
+- compile docs on one of the supported platforms
+- port doxygen to Android
+ Update: check out my port: https://github.com/sgeto/doxygen
+ Update 2: my port has been merged into doxygen/master.
+ Don't use my port. Get the real deal from their repo:
+ https://github.com/doxygen/doxygen
+
+The minimum packages to install are:
+
+coreutils (important! Busybox alone is not enough!)
+autoconf
+automake
+m4
+make
+libtool
+clang
+git (optional)
+
+After that:
+
+1. $ git clone https://github.com/sgeto/libnet.git
+
+This is optional. As explained earlier, you can also build from a release.
+
+2. $ cd libnet && autoreconf -i
+
+Attention! You can not use the autogen.sh bootstrapping script for this step.
+The Android file system only loosely resembles what many of us are used to
+from their *nix boxes. This means that in Android, many files and folders aren't
+located where you would expect them. As a result, many shell scripts, including
+this one, will not be able run because their shebangs are pointing to a
+none-existing location. (/bin/sh instead of /system/bin/sh or in Termux's
+case: /data/data/com.termux/files/usr/bin/sh)
+
+3. $ ./configure TMPDIR=$PREFIX/tmp --prefix=$PREFIX
+
+TMPDIR=$PREFIX/tmp Tell configure to use $PREFIX/tmp instead of /tmp
+ This is the only MANDATORY configure option.
+ This is due to the fact that config.guess is
+ (without root privileges) unable to write to /tmp
+
+--prefix=$PREFIX where to (possibly) install libnet
+ Use "$PREFIX" or make sure to add a valid path
+
+4. $ make
+
+5. $ make install
+
+This step is optional and really only works if the proper prefix has been set
+in step 3
+
+Final Thoughts:
+
+- You don't need a rooted device to build libnet, but you need need root
+privileges in order to try the samples and to make use of libnet in general.
+
+- You can not execute anything libnet from the Termux shell, because it does not
+have root privileges.
+
+- Even when you elevate you prompt and become root (by typing 'su'), you will
+most likely still be unable to to use libnet right away. The reason for that is
+that root prompts in Android come with their own shell (which is separate from
+the one you use to elevate). So you need to either set or migrate the necessary
+environment variables you had in your previous (Termux) shell over to your newly
+spawn root shell. Specifically LD_LIBRARY_PATH
+If you don't know what that means just run this every time you're root and want
+to use libnet (adjust path accordingly):
+LD_LIBRARY_PATH=/data/data/com.termux/files/usr/lib
diff --git a/doc/api/bc_s.png b/doc/api/bc_s.png
new file mode 100644
index 0000000..d37b6c2
--- /dev/null
+++ b/doc/api/bc_s.png
Binary files differ
diff --git a/doc/api/bdwn.png b/doc/api/bdwn.png
new file mode 100644
index 0000000..af85939
--- /dev/null
+++ b/doc/api/bdwn.png
Binary files differ
diff --git a/doc/api/closed.png b/doc/api/closed.png
new file mode 100644
index 0000000..b452535
--- /dev/null
+++ b/doc/api/closed.png
Binary files differ
diff --git a/doc/api/dir_2e83b025d21fe7b9c524d93377692ce4.html b/doc/api/dir_2e83b025d21fe7b9c524d93377692ce4.html
new file mode 100644
index 0000000..b0242b6
--- /dev/null
+++ b/doc/api/dir_2e83b025d21fe7b9c524d93377692ce4.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.14"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>libnet: API Documentation: libnet Directory Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="libnet_api_stylesheet.css_tmpl" rel="stylesheet" type="text/css"/>
+</head>
+<!-- Generated by Doxygen 1.8.14 -->
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_2e83b025d21fe7b9c524d93377692ce4.html">libnet</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">libnet Directory Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
+Files</h2></td></tr>
+<tr class="memitem:libnet-functions_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html">libnet-functions.h</a> <a href="libnet-functions_8h_source.html">[code]</a></td></tr>
+<tr class="memdesc:libnet-functions_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">libnet exported function prototypes <br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:libnet-macros_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-macros_8h.html">libnet-macros.h</a> <a href="libnet-macros_8h_source.html">[code]</a></td></tr>
+<tr class="memdesc:libnet-macros_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">libnet macros and symbolic constants <br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+</div><!-- contents -->
+<hr>
+<address><small>
+Documentation for <a href="https://github.com/sgeto/libnet">libnet</a> (version 1.2-rc3).<br>
+Generated on Wed Apr 26 2017 by
+<a href="http://www.doxygen.org/">Doxygen 1.8.14</a>.
+</small></address>
+</body>
+</html>
diff --git a/doc/api/doc.png b/doc/api/doc.png
new file mode 100644
index 0000000..36a3972
--- /dev/null
+++ b/doc/api/doc.png
Binary files differ
diff --git a/doc/api/doxygen.css b/doc/api/doxygen.css
new file mode 100644
index 0000000..cb47685
--- /dev/null
+++ b/doc/api/doxygen.css
@@ -0,0 +1,1596 @@
+/* The standard CSS for doxygen 1.8.14 */
+
+body, table, div, p, dl {
+ font: 400 14px/22px Roboto,sans-serif;
+}
+
+p.reference, p.definition {
+ font: 400 14px/22px Roboto,sans-serif;
+}
+
+/* @group Heading Levels */
+
+h1.groupheader {
+ font-size: 150%;
+}
+
+.title {
+ font: 400 14px/28px Roboto,sans-serif;
+ font-size: 150%;
+ font-weight: bold;
+ margin: 10px 2px;
+}
+
+h2.groupheader {
+ border-bottom: 1px solid #C6D9C6;
+ color: #81AA81;
+ font-size: 150%;
+ font-weight: normal;
+ margin-top: 1.75em;
+ padding-top: 8px;
+ padding-bottom: 4px;
+ width: 100%;
+}
+
+h3.groupheader {
+ font-size: 100%;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ -webkit-transition: text-shadow 0.5s linear;
+ -moz-transition: text-shadow 0.5s linear;
+ -ms-transition: text-shadow 0.5s linear;
+ -o-transition: text-shadow 0.5s linear;
+ transition: text-shadow 0.5s linear;
+ margin-right: 15px;
+}
+
+h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow {
+ text-shadow: 0 0 15px cyan;
+}
+
+dt {
+ font-weight: bold;
+}
+
+div.multicol {
+ -moz-column-gap: 1em;
+ -webkit-column-gap: 1em;
+ -moz-column-count: 3;
+ -webkit-column-count: 3;
+}
+
+p.startli, p.startdd {
+ margin-top: 2px;
+}
+
+p.starttd {
+ margin-top: 0px;
+}
+
+p.endli {
+ margin-bottom: 0px;
+}
+
+p.enddd {
+ margin-bottom: 4px;
+}
+
+p.endtd {
+ margin-bottom: 2px;
+}
+
+/* @end */
+
+caption {
+ font-weight: bold;
+}
+
+span.legend {
+ font-size: 70%;
+ text-align: center;
+}
+
+h3.version {
+ font-size: 90%;
+ text-align: center;
+}
+
+div.qindex, div.navtab{
+ background-color: #F6F9F6;
+ border: 1px solid #D4E2D4;
+ text-align: center;
+}
+
+div.qindex, div.navpath {
+ width: 100%;
+ line-height: 140%;
+}
+
+div.navtab {
+ margin-right: 15px;
+}
+
+/* @group Link Styling */
+
+a {
+ color: #8DB28D;
+ font-weight: normal;
+ text-decoration: none;
+}
+
+.contents a:visited {
+ color: #9CBC9C;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+a.qindex {
+ font-weight: bold;
+}
+
+a.qindexHL {
+ font-weight: bold;
+ background-color: #D1E0D1;
+ color: #ffffff;
+ border: 1px double #C5D8C5;
+}
+
+.contents a.qindexHL:visited {
+ color: #ffffff;
+}
+
+a.el {
+ font-weight: bold;
+}
+
+a.elRef {
+}
+
+a.code, a.code:visited, a.line, a.line:visited {
+ color: #4665A2;
+}
+
+a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited {
+ color: #4665A2;
+}
+
+/* @end */
+
+dl.el {
+ margin-left: -1cm;
+}
+
+pre.fragment {
+ border: 1px solid #C4CFE5;
+ background-color: #FBFCFD;
+ padding: 4px 6px;
+ margin: 4px 8px 4px 2px;
+ overflow: auto;
+ word-wrap: break-word;
+ font-size: 9pt;
+ line-height: 125%;
+ font-family: monospace, fixed;
+ font-size: 105%;
+}
+
+div.fragment {
+ padding: 0px;
+ margin: 4px 8px 4px 2px;
+ background-color: #FDFEFD;
+ border: 1px solid #E4EDE4;
+}
+
+div.line {
+ font-family: monospace, fixed;
+ font-size: 13px;
+ min-height: 13px;
+ line-height: 1.0;
+ text-wrap: unrestricted;
+ white-space: -moz-pre-wrap; /* Moz */
+ white-space: -pre-wrap; /* Opera 4-6 */
+ white-space: -o-pre-wrap; /* Opera 7 */
+ white-space: pre-wrap; /* CSS3 */
+ word-wrap: break-word; /* IE 5.5+ */
+ text-indent: -53px;
+ padding-left: 53px;
+ padding-bottom: 0px;
+ margin: 0px;
+ -webkit-transition-property: background-color, box-shadow;
+ -webkit-transition-duration: 0.5s;
+ -moz-transition-property: background-color, box-shadow;
+ -moz-transition-duration: 0.5s;
+ -ms-transition-property: background-color, box-shadow;
+ -ms-transition-duration: 0.5s;
+ -o-transition-property: background-color, box-shadow;
+ -o-transition-duration: 0.5s;
+ transition-property: background-color, box-shadow;
+ transition-duration: 0.5s;
+}
+
+div.line:after {
+ content:"\000A";
+ white-space: pre;
+}
+
+div.line.glow {
+ background-color: cyan;
+ box-shadow: 0 0 10px cyan;
+}
+
+
+span.lineno {
+ padding-right: 4px;
+ text-align: right;
+ border-right: 2px solid #0F0;
+ background-color: #E8E8E8;
+ white-space: pre;
+}
+span.lineno a {
+ background-color: #D8D8D8;
+}
+
+span.lineno a:hover {
+ background-color: #C8C8C8;
+}
+
+.lineno {
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+div.ah, span.ah {
+ background-color: black;
+ font-weight: bold;
+ color: #ffffff;
+ margin-bottom: 3px;
+ margin-top: 3px;
+ padding: 0.2em;
+ border: solid thin #333;
+ border-radius: 0.5em;
+ -webkit-border-radius: .5em;
+ -moz-border-radius: .5em;
+ box-shadow: 2px 2px 3px #999;
+ -webkit-box-shadow: 2px 2px 3px #999;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
+ background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%);
+}
+
+div.classindex ul {
+ list-style: none;
+ padding-left: 0;
+}
+
+div.classindex span.ai {
+ display: inline-block;
+}
+
+div.groupHeader {
+ margin-left: 16px;
+ margin-top: 12px;
+ font-weight: bold;
+}
+
+div.groupText {
+ margin-left: 16px;
+ font-style: italic;
+}
+
+body {
+ background-color: white;
+ color: black;
+ margin: 0;
+}
+
+div.contents {
+ margin-top: 10px;
+ margin-left: 12px;
+ margin-right: 8px;
+}
+
+td.indexkey {
+ background-color: #F6F9F6;
+ font-weight: bold;
+ border: 1px solid #E4EDE4;
+ margin: 2px 0px 2px 0;
+ padding: 2px 10px;
+ white-space: nowrap;
+ vertical-align: top;
+}
+
+td.indexvalue {
+ background-color: #F6F9F6;
+ border: 1px solid #E4EDE4;
+ padding: 2px 10px;
+ margin: 2px 0px;
+}
+
+tr.memlist {
+ background-color: #F7FAF7;
+}
+
+p.formulaDsp {
+ text-align: center;
+}
+
+img.formulaDsp {
+
+}
+
+img.formulaInl {
+ vertical-align: middle;
+}
+
+div.center {
+ text-align: center;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ padding: 0px;
+}
+
+div.center img {
+ border: 0px;
+}
+
+address.footer {
+ text-align: right;
+ padding-right: 12px;
+}
+
+img.footer {
+ border: 0px;
+ vertical-align: middle;
+}
+
+/* @group Code Colorization */
+
+span.keyword {
+ color: #008000
+}
+
+span.keywordtype {
+ color: #604020
+}
+
+span.keywordflow {
+ color: #e08000
+}
+
+span.comment {
+ color: #800000
+}
+
+span.preprocessor {
+ color: #806020
+}
+
+span.stringliteral {
+ color: #002080
+}
+
+span.charliteral {
+ color: #008080
+}
+
+span.vhdldigit {
+ color: #ff00ff
+}
+
+span.vhdlchar {
+ color: #000000
+}
+
+span.vhdlkeyword {
+ color: #700070
+}
+
+span.vhdllogic {
+ color: #ff0000
+}
+
+blockquote {
+ background-color: #FBFCFB;
+ border-left: 2px solid #D1E0D1;
+ margin: 0 24px 0 4px;
+ padding: 0 12px 0 16px;
+}
+
+/* @end */
+
+/*
+.search {
+ color: #003399;
+ font-weight: bold;
+}
+
+form.search {
+ margin-bottom: 0px;
+ margin-top: 0px;
+}
+
+input.search {
+ font-size: 75%;
+ color: #000080;
+ font-weight: normal;
+ background-color: #e8eef2;
+}
+*/
+
+td.tiny {
+ font-size: 75%;
+}
+
+.dirtab {
+ padding: 4px;
+ border-collapse: collapse;
+ border: 1px solid #D4E2D4;
+}
+
+th.dirtab {
+ background: #F6F9F6;
+ font-weight: bold;
+}
+
+hr {
+ height: 0px;
+ border: none;
+ border-top: 1px solid #A1C0A1;
+}
+
+hr.footer {
+ height: 1px;
+}
+
+/* @group Member Descriptions */
+
+table.memberdecls {
+ border-spacing: 0px;
+ padding: 0px;
+}
+
+.memberdecls td, .fieldtable tr {
+ -webkit-transition-property: background-color, box-shadow;
+ -webkit-transition-duration: 0.5s;
+ -moz-transition-property: background-color, box-shadow;
+ -moz-transition-duration: 0.5s;
+ -ms-transition-property: background-color, box-shadow;
+ -ms-transition-duration: 0.5s;
+ -o-transition-property: background-color, box-shadow;
+ -o-transition-duration: 0.5s;
+ transition-property: background-color, box-shadow;
+ transition-duration: 0.5s;
+}
+
+.memberdecls td.glow, .fieldtable tr.glow {
+ background-color: cyan;
+ box-shadow: 0 0 15px cyan;
+}
+
+.mdescLeft, .mdescRight,
+.memItemLeft, .memItemRight,
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
+ background-color: #FCFDFC;
+ border: none;
+ margin: 4px;
+ padding: 1px 0 0 8px;
+}
+
+.mdescLeft, .mdescRight {
+ padding: 0px 8px 4px 8px;
+ color: #555;
+}
+
+.memSeparator {
+ border-bottom: 1px solid #DEE4F0;
+ line-height: 1px;
+ margin: 0px;
+ padding: 0px;
+}
+
+.memItemLeft, .memTemplItemLeft {
+ white-space: nowrap;
+}
+
+.memItemRight {
+ width: 100%;
+}
+
+.memTemplParams {
+ color: #9CBC9C;
+ white-space: nowrap;
+ font-size: 80%;
+}
+
+/* @end */
+
+/* @group Member Details */
+
+/* Styles for detailed member documentation */
+
+.memtitle {
+ padding: 8px;
+ border-top: 1px solid #D7E4D7;
+ border-left: 1px solid #D7E4D7;
+ border-right: 1px solid #D7E4D7;
+ border-top-right-radius: 4px;
+ border-top-left-radius: 4px;
+ margin-bottom: -1px;
+ background-image: url('nav_f.png');
+ background-repeat: repeat-x;
+ background-color: #F2F6F2;
+ line-height: 1.25;
+ font-weight: 300;
+ float:left;
+}
+
+.permalink
+{
+ font-size: 65%;
+ display: inline-block;
+ vertical-align: middle;
+}
+
+.memtemplate {
+ font-size: 80%;
+ color: #9CBC9C;
+ font-weight: normal;
+ margin-left: 9px;
+}
+
+.memnav {
+ background-color: #F6F9F6;
+ border: 1px solid #D4E2D4;
+ text-align: center;
+ margin: 2px;
+ margin-right: 15px;
+ padding: 2px;
+}
+
+.mempage {
+ width: 100%;
+}
+
+.memitem {
+ padding: 0;
+ margin-bottom: 10px;
+ margin-right: 5px;
+ -webkit-transition: box-shadow 0.5s linear;
+ -moz-transition: box-shadow 0.5s linear;
+ -ms-transition: box-shadow 0.5s linear;
+ -o-transition: box-shadow 0.5s linear;
+ transition: box-shadow 0.5s linear;
+ display: table !important;
+ width: 100%;
+}
+
+.memitem.glow {
+ box-shadow: 0 0 15px cyan;
+}
+
+.memname {
+ font-weight: 400;
+ margin-left: 6px;
+}
+
+.memname td {
+ vertical-align: bottom;
+}
+
+.memproto, dl.reflist dt {
+ border-top: 1px solid #D7E4D7;
+ border-left: 1px solid #D7E4D7;
+ border-right: 1px solid #D7E4D7;
+ padding: 6px 0px 6px 0px;
+ color: #649564;
+ font-weight: bold;
+ text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
+ background-color: #F1F5F1;
+ /* opera specific markup */
+ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ border-top-right-radius: 4px;
+ /* firefox specific markup */
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+ -moz-border-radius-topright: 4px;
+ /* webkit specific markup */
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ -webkit-border-top-right-radius: 4px;
+
+}
+
+.overload {
+ font-family: "courier new",courier,monospace;
+ font-size: 65%;
+}
+
+.memdoc, dl.reflist dd {
+ border-bottom: 1px solid #D7E4D7;
+ border-left: 1px solid #D7E4D7;
+ border-right: 1px solid #D7E4D7;
+ padding: 6px 10px 2px 10px;
+ background-color: #FDFEFD;
+ border-top-width: 0;
+ background-image:url('nav_g.png');
+ background-repeat:repeat-x;
+ background-color: #FFFFFF;
+ /* opera specific markup */
+ border-bottom-left-radius: 4px;
+ border-bottom-right-radius: 4px;
+ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ /* firefox specific markup */
+ -moz-border-radius-bottomleft: 4px;
+ -moz-border-radius-bottomright: 4px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+ /* webkit specific markup */
+ -webkit-border-bottom-left-radius: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+}
+
+dl.reflist dt {
+ padding: 5px;
+}
+
+dl.reflist dd {
+ margin: 0px 0px 10px 0px;
+ padding: 5px;
+}
+
+.paramkey {
+ text-align: right;
+}
+
+.paramtype {
+ white-space: nowrap;
+}
+
+.paramname {
+ color: #602020;
+ white-space: nowrap;
+}
+.paramname em {
+ font-style: normal;
+}
+.paramname code {
+ line-height: 14px;
+}
+
+.params, .retval, .exception, .tparams {
+ margin-left: 0px;
+ padding-left: 0px;
+}
+
+.params .paramname, .retval .paramname {
+ font-weight: bold;
+ vertical-align: top;
+}
+
+.params .paramtype {
+ font-style: italic;
+ vertical-align: top;
+}
+
+.params .paramdir {
+ font-family: "courier new",courier,monospace;
+ vertical-align: top;
+}
+
+table.mlabels {
+ border-spacing: 0px;
+}
+
+td.mlabels-left {
+ width: 100%;
+ padding: 0px;
+}
+
+td.mlabels-right {
+ vertical-align: bottom;
+ padding: 0px;
+ white-space: nowrap;
+}
+
+span.mlabels {
+ margin-left: 8px;
+}
+
+span.mlabel {
+ background-color: #BBD1BB;
+ border-top:1px solid #A9C5A9;
+ border-left:1px solid #A9C5A9;
+ border-right:1px solid #E4EDE4;
+ border-bottom:1px solid #E4EDE4;
+ text-shadow: none;
+ color: white;
+ margin-right: 4px;
+ padding: 2px 3px;
+ border-radius: 3px;
+ font-size: 7pt;
+ white-space: nowrap;
+ vertical-align: middle;
+}
+
+
+
+/* @end */
+
+/* these are for tree view inside a (index) page */
+
+div.directory {
+ margin: 10px 0px;
+ border-top: 1px solid #D1E0D1;
+ border-bottom: 1px solid #D1E0D1;
+ width: 100%;
+}
+
+.directory table {
+ border-collapse:collapse;
+}
+
+.directory td {
+ margin: 0px;
+ padding: 0px;
+ vertical-align: top;
+}
+
+.directory td.entry {
+ white-space: nowrap;
+ padding-right: 6px;
+ padding-top: 3px;
+}
+
+.directory td.entry a {
+ outline:none;
+}
+
+.directory td.entry a img {
+ border: none;
+}
+
+.directory td.desc {
+ width: 100%;
+ padding-left: 6px;
+ padding-right: 6px;
+ padding-top: 3px;
+ border-left: 1px solid rgba(0,0,0,0.05);
+}
+
+.directory tr.even {
+ padding-left: 6px;
+ background-color: #FBFCFB;
+}
+
+.directory img {
+ vertical-align: -30%;
+}
+
+.directory .levels {
+ white-space: nowrap;
+ width: 100%;
+ text-align: right;
+ font-size: 9pt;
+}
+
+.directory .levels span {
+ cursor: pointer;
+ padding-left: 2px;
+ padding-right: 2px;
+ color: #8DB28D;
+}
+
+.arrow {
+ color: #D1E0D1;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ cursor: pointer;
+ font-size: 80%;
+ display: inline-block;
+ width: 16px;
+ height: 22px;
+}
+
+.icon {
+ font-family: Arial, Helvetica;
+ font-weight: bold;
+ font-size: 12px;
+ height: 14px;
+ width: 16px;
+ display: inline-block;
+ background-color: #BBD1BB;
+ color: white;
+ text-align: center;
+ border-radius: 4px;
+ margin-left: 2px;
+ margin-right: 2px;
+}
+
+.icona {
+ width: 24px;
+ height: 22px;
+ display: inline-block;
+}
+
+.iconfopen {
+ width: 24px;
+ height: 18px;
+ margin-bottom: 4px;
+ background-image:url('folderopen.png');
+ background-position: 0px -4px;
+ background-repeat: repeat-y;
+ vertical-align:top;
+ display: inline-block;
+}
+
+.iconfclosed {
+ width: 24px;
+ height: 18px;
+ margin-bottom: 4px;
+ background-image:url('folderclosed.png');
+ background-position: 0px -4px;
+ background-repeat: repeat-y;
+ vertical-align:top;
+ display: inline-block;
+}
+
+.icondoc {
+ width: 24px;
+ height: 18px;
+ margin-bottom: 4px;
+ background-image:url('doc.png');
+ background-position: 0px -4px;
+ background-repeat: repeat-y;
+ vertical-align:top;
+ display: inline-block;
+}
+
+table.directory {
+ font: 400 14px Roboto,sans-serif;
+}
+
+/* @end */
+
+div.dynheader {
+ margin-top: 8px;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+address {
+ font-style: normal;
+ color: #6E9D6E;
+}
+
+table.doxtable caption {
+ caption-side: top;
+}
+
+table.doxtable {
+ border-collapse:collapse;
+ margin-top: 4px;
+ margin-bottom: 4px;
+}
+
+table.doxtable td, table.doxtable th {
+ border: 1px solid #73A073;
+ padding: 3px 7px 2px;
+}
+
+table.doxtable th {
+ background-color: #84AC84;
+ color: #FFFFFF;
+ font-size: 110%;
+ padding-bottom: 4px;
+ padding-top: 5px;
+}
+
+table.fieldtable {
+ /*width: 100%;*/
+ margin-bottom: 10px;
+ border: 1px solid #D7E4D7;
+ border-spacing: 0px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
+ -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
+ box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
+}
+
+.fieldtable td, .fieldtable th {
+ padding: 3px 7px 2px;
+}
+
+.fieldtable td.fieldtype, .fieldtable td.fieldname {
+ white-space: nowrap;
+ border-right: 1px solid #D7E4D7;
+ border-bottom: 1px solid #D7E4D7;
+ vertical-align: top;
+}
+
+.fieldtable td.fieldname {
+ padding-top: 3px;
+}
+
+.fieldtable td.fielddoc {
+ border-bottom: 1px solid #D7E4D7;
+ /*width: 100%;*/
+}
+
+.fieldtable td.fielddoc p:first-child {
+ margin-top: 0px;
+}
+
+.fieldtable td.fielddoc p:last-child {
+ margin-bottom: 2px;
+}
+
+.fieldtable tr:last-child td {
+ border-bottom: none;
+}
+
+.fieldtable th {
+ background-image:url('nav_f.png');
+ background-repeat:repeat-x;
+ background-color: #F2F6F2;
+ font-size: 90%;
+ color: #649564;
+ padding-bottom: 4px;
+ padding-top: 5px;
+ text-align:left;
+ font-weight: 400;
+ -moz-border-radius-topleft: 4px;
+ -moz-border-radius-topright: 4px;
+ -webkit-border-top-left-radius: 4px;
+ -webkit-border-top-right-radius: 4px;
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+ border-bottom: 1px solid #D7E4D7;
+}
+
+
+.tabsearch {
+ top: 0px;
+ left: 10px;
+ height: 36px;
+ background-image: url('tab_b.png');
+ z-index: 101;
+ overflow: hidden;
+ font-size: 13px;
+}
+
+.navpath ul
+{
+ font-size: 11px;
+ background-image:url('tab_b.png');
+ background-repeat:repeat-x;
+ background-position: 0 -5px;
+ height:30px;
+ line-height:30px;
+ color:#C7D9C7;
+ border:solid 1px #E3ECE3;
+ overflow:hidden;
+ margin:0px;
+ padding:0px;
+}
+
+.navpath li
+{
+ list-style-type:none;
+ float:left;
+ padding-left:10px;
+ padding-right:15px;
+ background-image:url('bc_s.png');
+ background-repeat:no-repeat;
+ background-position:right;
+ color:#82AB82;
+}
+
+.navpath li.navelem a
+{
+ height:32px;
+ display:block;
+ text-decoration: none;
+ outline: none;
+ color: #6A9B6A;
+ font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
+ text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
+ text-decoration: none;
+}
+
+.navpath li.navelem a:hover
+{
+ color:#B5CDB5;
+}
+
+.navpath li.footer
+{
+ list-style-type:none;
+ float:right;
+ padding-left:10px;
+ padding-right:15px;
+ background-image:none;
+ background-repeat:no-repeat;
+ background-position:right;
+ color:#82AB82;
+ font-size: 8pt;
+}
+
+
+div.summary
+{
+ float: right;
+ font-size: 8pt;
+ padding-right: 5px;
+ width: 50%;
+ text-align: right;
+}
+
+div.summary a
+{
+ white-space: nowrap;
+}
+
+table.classindex
+{
+ margin: 10px;
+ white-space: nowrap;
+ margin-left: 3%;
+ margin-right: 3%;
+ width: 94%;
+ border: 0;
+ border-spacing: 0;
+ padding: 0;
+}
+
+div.ingroups
+{
+ font-size: 8pt;
+ width: 50%;
+ text-align: left;
+}
+
+div.ingroups a
+{
+ white-space: nowrap;
+}
+
+div.header
+{
+ background-image:url('nav_h.png');
+ background-repeat:repeat-x;
+ background-color: #FCFDFC;
+ margin: 0px;
+ border-bottom: 1px solid #E4EDE4;
+}
+
+div.headertitle
+{
+ padding: 5px 5px 5px 10px;
+}
+
+dl
+{
+ padding: 0 0 0 10px;
+}
+
+/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */
+dl.section
+{
+ margin-left: 0px;
+ padding-left: 0px;
+}
+
+dl.note
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #D0C000;
+}
+
+dl.warning, dl.attention
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #FF0000;
+}
+
+dl.pre, dl.post, dl.invariant
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #00D000;
+}
+
+dl.deprecated
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #505050;
+}
+
+dl.todo
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #00C0E0;
+}
+
+dl.test
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #3030E0;
+}
+
+dl.bug
+{
+ margin-left:-7px;
+ padding-left: 3px;
+ border-left:4px solid;
+ border-color: #C08050;
+}
+
+dl.section dd {
+ margin-bottom: 6px;
+}
+
+
+#projectlogo
+{
+ text-align: center;
+ vertical-align: bottom;
+ border-collapse: separate;
+}
+
+#projectlogo img
+{
+ border: 0px none;
+}
+
+#projectalign
+{
+ vertical-align: middle;
+}
+
+#projectname
+{
+ font: 300% Tahoma, Arial,sans-serif;
+ margin: 0px;
+ padding: 2px 0px;
+}
+
+#projectbrief
+{
+ font: 120% Tahoma, Arial,sans-serif;
+ margin: 0px;
+ padding: 0px;
+}
+
+#projectnumber
+{
+ font: 50% Tahoma, Arial,sans-serif;
+ margin: 0px;
+ padding: 0px;
+}
+
+#titlearea
+{
+ padding: 0px;
+ margin: 0px;
+ width: 100%;
+ border-bottom: 1px solid #A9C5A9;
+}
+
+.image
+{
+ text-align: center;
+}
+
+.dotgraph
+{
+ text-align: center;
+}
+
+.mscgraph
+{
+ text-align: center;
+}
+
+.plantumlgraph
+{
+ text-align: center;
+}
+
+.diagraph
+{
+ text-align: center;
+}
+
+.caption
+{
+ font-weight: bold;
+}
+
+div.zoom
+{
+ border: 1px solid #CBDCCB;
+}
+
+dl.citelist {
+ margin-bottom:50px;
+}
+
+dl.citelist dt {
+ color:#7DA77D;
+ float:left;
+ font-weight:bold;
+ margin-right:10px;
+ padding:5px;
+}
+
+dl.citelist dd {
+ margin:2px 0;
+ padding:5px 0;
+}
+
+div.toc {
+ padding: 14px 25px;
+ background-color: #FAFCFA;
+ border: 1px solid #EEF3EE;
+ border-radius: 7px 7px 7px 7px;
+ float: right;
+ height: auto;
+ margin: 0 8px 10px 10px;
+ width: 200px;
+}
+
+div.toc li {
+ background: url("bdwn.png") no-repeat scroll 0 5px transparent;
+ font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif;
+ margin-top: 5px;
+ padding-left: 10px;
+ padding-top: 2px;
+}
+
+div.toc h3 {
+ font: bold 12px/1.2 Arial,FreeSans,sans-serif;
+ color: #9CBC9C;
+ border-bottom: 0 none;
+ margin: 0;
+}
+
+div.toc ul {
+ list-style: none outside none;
+ border: medium none;
+ padding: 0px;
+}
+
+div.toc li.level1 {
+ margin-left: 0px;
+}
+
+div.toc li.level2 {
+ margin-left: 15px;
+}
+
+div.toc li.level3 {
+ margin-left: 30px;
+}
+
+div.toc li.level4 {
+ margin-left: 45px;
+}
+
+.inherit_header {
+ font-weight: bold;
+ color: gray;
+ cursor: pointer;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.inherit_header td {
+ padding: 6px 0px 2px 5px;
+}
+
+.inherit {
+ display: none;
+}
+
+tr.heading h2 {
+ margin-top: 12px;
+ margin-bottom: 4px;
+}
+
+/* tooltip related style info */
+
+.ttc {
+ position: absolute;
+ display: none;
+}
+
+#powerTip {
+ cursor: default;
+ white-space: nowrap;
+ background-color: white;
+ border: 1px solid gray;
+ border-radius: 4px 4px 4px 4px;
+ box-shadow: 1px 1px 7px gray;
+ display: none;
+ font-size: smaller;
+ max-width: 80%;
+ opacity: 0.9;
+ padding: 1ex 1em 1em;
+ position: absolute;
+ z-index: 2147483647;
+}
+
+#powerTip div.ttdoc {
+ color: grey;
+ font-style: italic;
+}
+
+#powerTip div.ttname a {
+ font-weight: bold;
+}
+
+#powerTip div.ttname {
+ font-weight: bold;
+}
+
+#powerTip div.ttdeci {
+ color: #006318;
+}
+
+#powerTip div {
+ margin: 0px;
+ padding: 0px;
+ font: 12px/16px Roboto,sans-serif;
+}
+
+#powerTip:before, #powerTip:after {
+ content: "";
+ position: absolute;
+ margin: 0px;
+}
+
+#powerTip.n:after, #powerTip.n:before,
+#powerTip.s:after, #powerTip.s:before,
+#powerTip.w:after, #powerTip.w:before,
+#powerTip.e:after, #powerTip.e:before,
+#powerTip.ne:after, #powerTip.ne:before,
+#powerTip.se:after, #powerTip.se:before,
+#powerTip.nw:after, #powerTip.nw:before,
+#powerTip.sw:after, #powerTip.sw:before {
+ border: solid transparent;
+ content: " ";
+ height: 0;
+ width: 0;
+ position: absolute;
+}
+
+#powerTip.n:after, #powerTip.s:after,
+#powerTip.w:after, #powerTip.e:after,
+#powerTip.nw:after, #powerTip.ne:after,
+#powerTip.sw:after, #powerTip.se:after {
+ border-color: rgba(255, 255, 255, 0);
+}
+
+#powerTip.n:before, #powerTip.s:before,
+#powerTip.w:before, #powerTip.e:before,
+#powerTip.nw:before, #powerTip.ne:before,
+#powerTip.sw:before, #powerTip.se:before {
+ border-color: rgba(128, 128, 128, 0);
+}
+
+#powerTip.n:after, #powerTip.n:before,
+#powerTip.ne:after, #powerTip.ne:before,
+#powerTip.nw:after, #powerTip.nw:before {
+ top: 100%;
+}
+
+#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after {
+ border-top-color: #ffffff;
+ border-width: 10px;
+ margin: 0px -10px;
+}
+#powerTip.n:before {
+ border-top-color: #808080;
+ border-width: 11px;
+ margin: 0px -11px;
+}
+#powerTip.n:after, #powerTip.n:before {
+ left: 50%;
+}
+
+#powerTip.nw:after, #powerTip.nw:before {
+ right: 14px;
+}
+
+#powerTip.ne:after, #powerTip.ne:before {
+ left: 14px;
+}
+
+#powerTip.s:after, #powerTip.s:before,
+#powerTip.se:after, #powerTip.se:before,
+#powerTip.sw:after, #powerTip.sw:before {
+ bottom: 100%;
+}
+
+#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after {
+ border-bottom-color: #ffffff;
+ border-width: 10px;
+ margin: 0px -10px;
+}
+
+#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before {
+ border-bottom-color: #808080;
+ border-width: 11px;
+ margin: 0px -11px;
+}
+
+#powerTip.s:after, #powerTip.s:before {
+ left: 50%;
+}
+
+#powerTip.sw:after, #powerTip.sw:before {
+ right: 14px;
+}
+
+#powerTip.se:after, #powerTip.se:before {
+ left: 14px;
+}
+
+#powerTip.e:after, #powerTip.e:before {
+ left: 100%;
+}
+#powerTip.e:after {
+ border-left-color: #ffffff;
+ border-width: 10px;
+ top: 50%;
+ margin-top: -10px;
+}
+#powerTip.e:before {
+ border-left-color: #808080;
+ border-width: 11px;
+ top: 50%;
+ margin-top: -11px;
+}
+
+#powerTip.w:after, #powerTip.w:before {
+ right: 100%;
+}
+#powerTip.w:after {
+ border-right-color: #ffffff;
+ border-width: 10px;
+ top: 50%;
+ margin-top: -10px;
+}
+#powerTip.w:before {
+ border-right-color: #808080;
+ border-width: 11px;
+ top: 50%;
+ margin-top: -11px;
+}
+
+@media print
+{
+ #top { display: none; }
+ #side-nav { display: none; }
+ #nav-path { display: none; }
+ body { overflow:visible; }
+ h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
+ .summary { display: none; }
+ .memitem { page-break-inside: avoid; }
+ #doc-content
+ {
+ margin-left:0 !important;
+ height:auto !important;
+ width:auto !important;
+ overflow:inherit;
+ display:inline;
+ }
+}
+
+/* @group Markdown */
+
+/*
+table.markdownTable {
+ border-collapse:collapse;
+ margin-top: 4px;
+ margin-bottom: 4px;
+}
+
+table.markdownTable td, table.markdownTable th {
+ border: 1px solid #73A073;
+ padding: 3px 7px 2px;
+}
+
+table.markdownTableHead tr {
+}
+
+table.markdownTableBodyLeft td, table.markdownTable th {
+ border: 1px solid #73A073;
+ padding: 3px 7px 2px;
+}
+
+th.markdownTableHeadLeft th.markdownTableHeadRight th.markdownTableHeadCenter th.markdownTableHeadNone {
+ background-color: #84AC84;
+ color: #FFFFFF;
+ font-size: 110%;
+ padding-bottom: 4px;
+ padding-top: 5px;
+}
+
+th.markdownTableHeadLeft {
+ text-align: left
+}
+
+th.markdownTableHeadRight {
+ text-align: right
+}
+
+th.markdownTableHeadCenter {
+ text-align: center
+}
+*/
+
+table.markdownTable {
+ border-collapse:collapse;
+ margin-top: 4px;
+ margin-bottom: 4px;
+}
+
+table.markdownTable td, table.markdownTable th {
+ border: 1px solid #73A073;
+ padding: 3px 7px 2px;
+}
+
+table.markdownTable tr {
+}
+
+th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone {
+ background-color: #374F7F;
+ color: #FFFFFF;
+ font-size: 110%;
+ padding-bottom: 4px;
+ padding-top: 5px;
+}
+
+th.markdownTableHeadLeft, td.markdownTableBodyLeft {
+ text-align: left
+}
+
+th.markdownTableHeadRight, td.markdownTableBodyRight {
+ text-align: right
+}
+
+th.markdownTableHeadCenter, td.markdownTableBodyCenter {
+ text-align: center
+}
+
+
+/* @end */
diff --git a/doc/api/doxygen.png b/doc/api/doxygen.png
new file mode 100644
index 0000000..3007280
--- /dev/null
+++ b/doc/api/doxygen.png
Binary files differ
diff --git a/doc/api/files.html b/doc/api/files.html
new file mode 100644
index 0000000..e905232
--- /dev/null
+++ b/doc/api/files.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.14"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>libnet: API Documentation: File List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="libnet_api_stylesheet.css_tmpl" rel="stylesheet" type="text/css"/>
+</head>
+<!-- Generated by Doxygen 1.8.14 -->
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">File List</div> </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock">Here is a list of all documented files with brief descriptions:</div><div class="directory">
+<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span>]</div><table class="directory">
+<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">&#9660;</span><span id="img_0_" class="iconfopen" onclick="toggleFolder('0_')">&#160;</span><a class="el" href="dir_2e83b025d21fe7b9c524d93377692ce4.html" target="_self">libnet</a></td><td class="desc"></td></tr>
+<tr id="row_0_0_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="libnet-functions_8h_source.html"><span class="icondoc"></span></a><a class="el" href="libnet-functions_8h.html" target="_self">libnet-functions.h</a></td><td class="desc">Libnet exported function prototypes </td></tr>
+<tr id="row_0_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="libnet-macros_8h_source.html"><span class="icondoc"></span></a><a class="el" href="libnet-macros_8h.html" target="_self">libnet-macros.h</a></td><td class="desc">Libnet macros and symbolic constants </td></tr>
+<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><a href="libnet_8h_source.html"><span class="icondoc"></span></a><a class="el" href="libnet_8h.html" target="_self">libnet.h</a></td><td class="desc">Top-level libnet header file </td></tr>
+</table>
+</div><!-- directory -->
+</div><!-- contents -->
+<hr>
+<address><small>
+Documentation for <a href="https://github.com/sgeto/libnet">libnet</a> (version 1.2-rc3).<br>
+Generated on Wed Apr 26 2017 by
+<a href="http://www.doxygen.org/">Doxygen 1.8.14</a>.
+</small></address>
+</body>
+</html>
diff --git a/doc/api/folderclosed.png b/doc/api/folderclosed.png
new file mode 100644
index 0000000..1563ad1
--- /dev/null
+++ b/doc/api/folderclosed.png
Binary files differ
diff --git a/doc/api/folderopen.png b/doc/api/folderopen.png
new file mode 100644
index 0000000..f3d2e12
--- /dev/null
+++ b/doc/api/folderopen.png
Binary files differ
diff --git a/doc/api/globals.html b/doc/api/globals.html
new file mode 100644
index 0000000..953aacd
--- /dev/null
+++ b/doc/api/globals.html
@@ -0,0 +1,441 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.14"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>libnet: API Documentation: Globals</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="libnet_api_stylesheet.css_tmpl" rel="stylesheet" type="text/css"/>
+</head>
+<!-- Generated by Doxygen 1.8.14 -->
+</div><!-- top -->
+<div class="contents">
+<div class="textblock">Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:</div>
+
+<h3><a id="index_f"></a>- f -</h3><ul>
+<li>for_each_context_in_cq
+: <a class="el" href="libnet-macros_8h.html#af36eb84eee10c525720134cfadb50a3e">libnet-macros.h</a>
+</li>
+</ul>
+
+
+<h3><a id="index_i"></a>- i -</h3><ul>
+<li>IN6ADDR_ERROR_INIT
+: <a class="el" href="libnet-macros_8h.html#a9c76fe8da8e411fe1db9f75583dc1b8a">libnet-macros.h</a>
+</li>
+</ul>
+
+
+<h3><a id="index_l"></a>- l -</h3><ul>
+<li>libnet_addr2name4()
+: <a class="el" href="libnet-functions_8h.html#added478f7cb16e00cf34f44816e33083">libnet-functions.h</a>
+</li>
+<li>libnet_addr2name6_r()
+: <a class="el" href="libnet-functions_8h.html#a50fcb283db9884651c59d79ebd825bc4">libnet-functions.h</a>
+</li>
+<li>libnet_adv_cull_header()
+: <a class="el" href="libnet-functions_8h.html#aac02edd8930cb604dc65f72f7ffd8892">libnet-functions.h</a>
+</li>
+<li>libnet_adv_cull_packet()
+: <a class="el" href="libnet-functions_8h.html#a9f91e176ba3b1f93ec049f82c08b54be">libnet-functions.h</a>
+</li>
+<li>libnet_adv_free_packet()
+: <a class="el" href="libnet-functions_8h.html#a92c45b67cbf9a16f8e6edd9a067c3f6d">libnet-functions.h</a>
+</li>
+<li>libnet_adv_write_link()
+: <a class="el" href="libnet-functions_8h.html#ad00e9f92da1faea6c8ce400d6e7cd45e">libnet-functions.h</a>
+</li>
+<li>libnet_adv_write_raw_ipv4()
+: <a class="el" href="libnet-functions_8h.html#a3524aaf97da73461cabd4797e89c4da4">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_arp()
+: <a class="el" href="libnet-functions_8h.html#aa1bb2efa1cec14b12f1ce6210f20b358">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_ethernet()
+: <a class="el" href="libnet-functions_8h.html#a6da323c2eb9eeab293cdfd99ceb134b5">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_fddi()
+: <a class="el" href="libnet-functions_8h.html#a367d0539e0c7484ac4e0092ced22ca8e">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_ipv4()
+: <a class="el" href="libnet-functions_8h.html#a6894d563677d9f229feedf52c759ac0a">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_ipv6()
+: <a class="el" href="libnet-functions_8h.html#a606209e22d203a859a380e1d37f9688c">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_link()
+: <a class="el" href="libnet-functions_8h.html#a8a881ba6d300b16e5cadd9e3f6ef7bc8">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_token_ring()
+: <a class="el" href="libnet-functions_8h.html#ac4e70a6d0e895d722e407c6d5fae1466">libnet-functions.h</a>
+</li>
+<li>libnet_build_802_1q()
+: <a class="el" href="libnet-functions_8h.html#acbab0d304c5e9d36438050ac6d233132">libnet-functions.h</a>
+</li>
+<li>libnet_build_802_1x()
+: <a class="el" href="libnet-functions_8h.html#ab33fc501031e68af303fbffb7643b11d">libnet-functions.h</a>
+</li>
+<li>libnet_build_802_2()
+: <a class="el" href="libnet-functions_8h.html#a6f616f8d4646db5ada510991cce80808">libnet-functions.h</a>
+</li>
+<li>libnet_build_802_2snap()
+: <a class="el" href="libnet-functions_8h.html#a22f004a0b0d496762fbd056ca5d31eeb">libnet-functions.h</a>
+</li>
+<li>libnet_build_802_3()
+: <a class="el" href="libnet-functions_8h.html#ab6777b0c3c3b80eaa465686654f668e8">libnet-functions.h</a>
+</li>
+<li>libnet_build_arp()
+: <a class="el" href="libnet-functions_8h.html#ab606fadc44daa426fa4ba8b43bee5ece">libnet-functions.h</a>
+</li>
+<li>libnet_build_bgp4_header()
+: <a class="el" href="libnet-functions_8h.html#a3f9827171fbe5dbc4b02c7d9876a2393">libnet-functions.h</a>
+</li>
+<li>libnet_build_bgp4_notification()
+: <a class="el" href="libnet-functions_8h.html#afe0007cf544b1d6773b6046c5c5ad372">libnet-functions.h</a>
+</li>
+<li>libnet_build_bgp4_open()
+: <a class="el" href="libnet-functions_8h.html#a4a7df60e7798fddfff25f163ef63e2af">libnet-functions.h</a>
+</li>
+<li>libnet_build_bgp4_update()
+: <a class="el" href="libnet-functions_8h.html#a88f572ee97c9223d4b24f55d868ce419">libnet-functions.h</a>
+</li>
+<li>libnet_build_bootpv4()
+: <a class="el" href="libnet-functions_8h.html#a564c31892fb8cc2bf44244cdb26d693e">libnet-functions.h</a>
+</li>
+<li>libnet_build_cdp()
+: <a class="el" href="libnet-functions_8h.html#aed8b33a329bda096ecac629e92e9bca5">libnet-functions.h</a>
+</li>
+<li>libnet_build_data()
+: <a class="el" href="libnet-functions_8h.html#aa4c6c975b3c87d3d17224302e4319eec">libnet-functions.h</a>
+</li>
+<li>libnet_build_dhcpv4()
+: <a class="el" href="libnet-functions_8h.html#a3333c5e5cde290dda9b80adc13a00466">libnet-functions.h</a>
+</li>
+<li>libnet_build_dnsv4()
+: <a class="el" href="libnet-functions_8h.html#a5829f525c067e1d99826865292542d8a">libnet-functions.h</a>
+</li>
+<li>libnet_build_egre()
+: <a class="el" href="libnet-functions_8h.html#a0092b3f0285f4c96915eef9579655036">libnet-functions.h</a>
+</li>
+<li>libnet_build_ethernet()
+: <a class="el" href="libnet-functions_8h.html#acb97a898e200c1aaea6081545f2fcb39">libnet-functions.h</a>
+</li>
+<li>libnet_build_fddi()
+: <a class="el" href="libnet-functions_8h.html#ab8c2a7a3572bcfef2705ab05c8ef12bc">libnet-functions.h</a>
+</li>
+<li>libnet_build_gre()
+: <a class="el" href="libnet-functions_8h.html#a41e095c98e623f00618f6d306cb31289">libnet-functions.h</a>
+</li>
+<li>libnet_build_gre_last_sre()
+: <a class="el" href="libnet-functions_8h.html#ae514f81f6d68bc1b2442762a6f87804a">libnet-functions.h</a>
+</li>
+<li>libnet_build_gre_sre()
+: <a class="el" href="libnet-functions_8h.html#ae0c59a8f8d014cc1955d88139c2096c0">libnet-functions.h</a>
+</li>
+<li>libnet_build_hsrp()
+: <a class="el" href="libnet-functions_8h.html#abe75e9be71910c580eff1d6925224778">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv4_echo()
+: <a class="el" href="libnet-functions_8h.html#a4a4d3dc8f02e6fe6629e35e37ece0264">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv4_mask()
+: <a class="el" href="libnet-functions_8h.html#ab403c63ae76d0bc59b6641e3c821550c">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv4_redirect()
+: <a class="el" href="libnet-functions_8h.html#a6df9db28162c58a2cc356b3a87a16f6b">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv4_timeexceed()
+: <a class="el" href="libnet-functions_8h.html#a4f2eb3f11fd921b0fd0948cf8ef37c91">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv4_timestamp()
+: <a class="el" href="libnet-functions_8h.html#a926f33ff4ea64923b49f16f8c5f7286d">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv4_unreach()
+: <a class="el" href="libnet-functions_8h.html#a83197de705eb7929e8216f5771aa4b96">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv6_echo()
+: <a class="el" href="libnet-functions_8h.html#a09a512c9f670528f7f1c9fe9775a0a61">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv6_ndp_nadv()
+: <a class="el" href="libnet-functions_8h.html#a0d2d7119072c0b98f1248172a2b7885d">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv6_ndp_nsol()
+: <a class="el" href="libnet-functions_8h.html#aa184e1e69a7fc7161d484dcdca4f74db">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv6_ndp_opt()
+: <a class="el" href="libnet-functions_8h.html#aecee0675d61d3ff71d79c64c74a7c924">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv6_unreach()
+: <a class="el" href="libnet-functions_8h.html#a86ee5967b07a4fe49af301add8656450">libnet-functions.h</a>
+</li>
+<li>libnet_build_igmp()
+: <a class="el" href="libnet-functions_8h.html#afbeeb2c1c377c59aa2747dff4db4d5e8">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipsec_ah()
+: <a class="el" href="libnet-functions_8h.html#a22d1d874a5d12b8d3528f637990ceb21">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipsec_esp_ftr()
+: <a class="el" href="libnet-functions_8h.html#a0e7ba4cf571d4d85b1084e15059c7336">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipsec_esp_hdr()
+: <a class="el" href="libnet-functions_8h.html#ad7d163363769594667524e7607535aec">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv4()
+: <a class="el" href="libnet-functions_8h.html#a2d9839736df3b1c46acdcc67e291c03e">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv4_options()
+: <a class="el" href="libnet-functions_8h.html#aa209cafad74cd8f259aa97732e06d07c">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv6()
+: <a class="el" href="libnet-functions_8h.html#a50fc0e6ad5c2b1fd705f349eff382dfd">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv6_destopts()
+: <a class="el" href="libnet-functions_8h.html#a1b6e9597bf110de597a673a4c6ed6ebc">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv6_frag()
+: <a class="el" href="libnet-functions_8h.html#a9eeb211b6b8579fe9725da6d32d2732d">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv6_hbhopts()
+: <a class="el" href="libnet-functions_8h.html#a1a8b5292e4e714c0f299f0577c86cb00">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv6_routing()
+: <a class="el" href="libnet-functions_8h.html#a7fb612955dd3a787f13ab0c85b360023">libnet-functions.h</a>
+</li>
+<li>libnet_build_isl()
+: <a class="el" href="libnet-functions_8h.html#afdcc92fd59366c48693ad48c076c488e">libnet-functions.h</a>
+</li>
+<li>libnet_build_link()
+: <a class="el" href="libnet-functions_8h.html#a9ec77e2ffcb9540d9f4eee2b0ff57af2">libnet-functions.h</a>
+</li>
+<li>libnet_build_mpls()
+: <a class="el" href="libnet-functions_8h.html#a520053e593215a240f7207c2b28075cb">libnet-functions.h</a>
+</li>
+<li>libnet_build_ntp()
+: <a class="el" href="libnet-functions_8h.html#af305c48631b600e472f60b951b9ebf75">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2()
+: <a class="el" href="libnet-functions_8h.html#a429bf355c69895a5ad7ca900d734bf48">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_dbd()
+: <a class="el" href="libnet-functions_8h.html#a9f859449de2c7e2f1b2d18051a315634">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_hello()
+: <a class="el" href="libnet-functions_8h.html#a224a55d5758cd6685fdd374597f133c4">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsa()
+: <a class="el" href="libnet-functions_8h.html#a798142aed2aee944fdc80ce14faf31f6">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsa_as()
+: <a class="el" href="libnet-functions_8h.html#a9002c457692ce2557197dc68c9932849">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsa_net()
+: <a class="el" href="libnet-functions_8h.html#a234cf0a788a5944ff70c879c96467bc4">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsa_rtr()
+: <a class="el" href="libnet-functions_8h.html#a67209523b736cc9f70743d3dfbce1129">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsa_sum()
+: <a class="el" href="libnet-functions_8h.html#ae9c55870fecbd742edc25f06b73ad5a2">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsr()
+: <a class="el" href="libnet-functions_8h.html#a17d51de46576464ff606e15250c7fe3a">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsu()
+: <a class="el" href="libnet-functions_8h.html#a5ffe185b91c48fad0dc84f81b7d26697">libnet-functions.h</a>
+</li>
+<li>libnet_build_rip()
+: <a class="el" href="libnet-functions_8h.html#a154c83b71614c8cf3635f7c80cf7e9a6">libnet-functions.h</a>
+</li>
+<li>libnet_build_rpc_call()
+: <a class="el" href="libnet-functions_8h.html#a4a657cd81f10ba6dbdcbd6a6a81f72d2">libnet-functions.h</a>
+</li>
+<li>libnet_build_sebek()
+: <a class="el" href="libnet-functions_8h.html#a0d4ce5211113c5d5818d557ce3fc0234">libnet-functions.h</a>
+</li>
+<li>libnet_build_stp_conf()
+: <a class="el" href="libnet-functions_8h.html#ad6310dd6dff16dc711663f70256d2148">libnet-functions.h</a>
+</li>
+<li>libnet_build_stp_tcn()
+: <a class="el" href="libnet-functions_8h.html#a913fc0cf8782d915edc20f4f6abf847f">libnet-functions.h</a>
+</li>
+<li>libnet_build_tcp()
+: <a class="el" href="libnet-functions_8h.html#ad096d303ddcddbd63ea269453bd26a20">libnet-functions.h</a>
+</li>
+<li>libnet_build_tcp_options()
+: <a class="el" href="libnet-functions_8h.html#aec6344132528e6903837b0d8909ad08c">libnet-functions.h</a>
+</li>
+<li>libnet_build_token_ring()
+: <a class="el" href="libnet-functions_8h.html#a4d77b901ebcc18b8c0ee2345e4ea6177">libnet-functions.h</a>
+</li>
+<li>libnet_build_udp()
+: <a class="el" href="libnet-functions_8h.html#a0ae166a293c0495431246fe0d0ba66f6">libnet-functions.h</a>
+</li>
+<li>libnet_build_vrrp()
+: <a class="el" href="libnet-functions_8h.html#a5a6538c0cf4dd6c2f59b1657d56796b3">libnet-functions.h</a>
+</li>
+<li>libnet_clear_packet()
+: <a class="el" href="libnet-functions_8h.html#a9ae9cb6e191e382c653237451f9bacd6">libnet-functions.h</a>
+</li>
+<li>libnet_cq_add()
+: <a class="el" href="libnet-functions_8h.html#a20887ffe940f1d2c5bcae79a188176c6">libnet-functions.h</a>
+</li>
+<li>libnet_cq_destroy()
+: <a class="el" href="libnet-functions_8h.html#a1577413fdaf10706d5016b64f7f7924b">libnet-functions.h</a>
+</li>
+<li>libnet_cq_end_loop()
+: <a class="el" href="libnet-functions_8h.html#a65145cbd0be6d1609bf07b52d6c57695">libnet-functions.h</a>
+</li>
+<li>libnet_cq_find_by_label()
+: <a class="el" href="libnet-functions_8h.html#a1775288c17694d4d606327ad066f970d">libnet-functions.h</a>
+</li>
+<li>libnet_cq_getlabel()
+: <a class="el" href="libnet-functions_8h.html#a337f556ed05df13c1de19acbd4d7f50a">libnet-functions.h</a>
+</li>
+<li>libnet_cq_head()
+: <a class="el" href="libnet-functions_8h.html#a8233338e5050d8fc46c6d1f35ef32b5e">libnet-functions.h</a>
+</li>
+<li>libnet_cq_last()
+: <a class="el" href="libnet-functions_8h.html#a7edc80233d439b7755fdc127cfd7f88d">libnet-functions.h</a>
+</li>
+<li>libnet_cq_next()
+: <a class="el" href="libnet-functions_8h.html#af21a48ca025b23dfcd5d10e9d1b924ba">libnet-functions.h</a>
+</li>
+<li>libnet_cq_remove()
+: <a class="el" href="libnet-functions_8h.html#a93d5ccdcdba31daacde82fc50f467412">libnet-functions.h</a>
+</li>
+<li>libnet_cq_remove_by_label()
+: <a class="el" href="libnet-functions_8h.html#a90a6ea3b24de3906ca1cf9c78a7b5a5f">libnet-functions.h</a>
+</li>
+<li>libnet_cq_size()
+: <a class="el" href="libnet-functions_8h.html#ae071e441671c342ea2d3bbca979e2769">libnet-functions.h</a>
+</li>
+<li>libnet_destroy()
+: <a class="el" href="libnet-functions_8h.html#a8ddea475d4051b695f519100755d6a05">libnet-functions.h</a>
+</li>
+<li>libnet_diag_dump_context()
+: <a class="el" href="libnet-functions_8h.html#a1c70d00eefe61b2f5902ab56c802e07c">libnet-functions.h</a>
+</li>
+<li>libnet_diag_dump_hex()
+: <a class="el" href="libnet-functions_8h.html#adb2f7d417f05a058c0c2c7f76b6f66e6">libnet-functions.h</a>
+</li>
+<li>libnet_diag_dump_pblock()
+: <a class="el" href="libnet-functions_8h.html#a49e6023168b4f660ed8ff67dcc8ee228">libnet-functions.h</a>
+</li>
+<li>libnet_diag_dump_pblock_type()
+: <a class="el" href="libnet-functions_8h.html#a59cc8a10dd7a94f01238f96417b08420">libnet-functions.h</a>
+</li>
+<li>LIBNET_DONT_RESOLVE
+: <a class="el" href="libnet-macros_8h.html#ac67cb6e9b00fd492cc3a9247e9477d87">libnet-macros.h</a>
+</li>
+<li>LIBNET_ERRBUF_SIZE
+: <a class="el" href="libnet-macros_8h.html#a2d720375e2ef5a85a62d6069283a5223">libnet-macros.h</a>
+</li>
+<li>libnet_get_hwaddr()
+: <a class="el" href="libnet-functions_8h.html#acf6dc1ece9e994d4f4d3e47e5b218f6c">libnet-functions.h</a>
+</li>
+<li>libnet_get_ipaddr4()
+: <a class="el" href="libnet-functions_8h.html#a0adcfdd368764d4c4ab610daefe56b3d">libnet-functions.h</a>
+</li>
+<li>libnet_get_ipaddr6()
+: <a class="el" href="libnet-functions_8h.html#a7ca153d8efe6650769765fbc23e2b312">libnet-functions.h</a>
+</li>
+<li>libnet_get_prand()
+: <a class="el" href="libnet-functions_8h.html#ae0a1d32fdd169c55a0ce4c186a19b125">libnet-functions.h</a>
+</li>
+<li>libnet_getdevice()
+: <a class="el" href="libnet-functions_8h.html#ab65f1cd5ef46ae93909e6dd45bcff0cb">libnet-functions.h</a>
+</li>
+<li>libnet_geterror()
+: <a class="el" href="libnet-functions_8h.html#a7932677fa8ddd7f512c7b154d91263e9">libnet-functions.h</a>
+</li>
+<li>libnet_getfd()
+: <a class="el" href="libnet-functions_8h.html#a301939dd9e773bec51a8a3cc8e09ca3b">libnet-functions.h</a>
+</li>
+<li>libnet_getgre_length()
+: <a class="el" href="libnet-functions_8h.html#a6173dfa2aaf953c8a36ebf347a567100">libnet-functions.h</a>
+</li>
+<li>libnet_getpacket_size()
+: <a class="el" href="libnet-functions_8h.html#ad5c14b23de1fe0aaf36315c710972fcd">libnet-functions.h</a>
+</li>
+<li>libnet_getpbuf()
+: <a class="el" href="libnet-functions_8h.html#a1e1bc31a56aad7f000e55d9f2ed002b9">libnet-functions.h</a>
+</li>
+<li>libnet_getpbuf_size()
+: <a class="el" href="libnet-functions_8h.html#a6b945999765b5c5cfa2e496153fc7d03">libnet-functions.h</a>
+</li>
+<li>libnet_hex_aton()
+: <a class="el" href="libnet-functions_8h.html#a62a7ac78ee69568e17927674786c1b69">libnet-functions.h</a>
+</li>
+<li>libnet_in6_is_error()
+: <a class="el" href="libnet-functions_8h.html#a0a43add9ba39e677367ff167e807814b">libnet-functions.h</a>
+</li>
+<li>libnet_init()
+: <a class="el" href="libnet-functions_8h.html#aced83ef40edb05a9fc1e129373fe44dd">libnet-functions.h</a>
+</li>
+<li>LIBNET_MAX_PACKET
+: <a class="el" href="libnet-macros_8h.html#ac7301c95aa36d66e8904979650b5189d">libnet-macros.h</a>
+</li>
+<li>LIBNET_MAXOPTION_SIZE
+: <a class="el" href="libnet-macros_8h.html#ae9cd154f8cb482809ee456b6ac43dea5">libnet-macros.h</a>
+</li>
+<li>libnet_name2addr4()
+: <a class="el" href="libnet-functions_8h.html#a634e7d60fd7117c948fafea0ff25f77b">libnet-functions.h</a>
+</li>
+<li>libnet_name2addr6()
+: <a class="el" href="libnet-functions_8h.html#af525a32eb69e48519f84abed4231643a">libnet-functions.h</a>
+</li>
+<li>LIBNET_OFF
+: <a class="el" href="libnet-macros_8h.html#af87da67c016a9791d256c2d71bf0b0ac">libnet-macros.h</a>
+</li>
+<li>LIBNET_ON
+: <a class="el" href="libnet-macros_8h.html#a5ff9536ca9bbe6f73f69bec817962742">libnet-macros.h</a>
+</li>
+<li>libnet_plist_chain_dump()
+: <a class="el" href="libnet-functions_8h.html#a155f2da7f242051d5d80691c1754ca9c">libnet-functions.h</a>
+</li>
+<li>libnet_plist_chain_dump_string()
+: <a class="el" href="libnet-functions_8h.html#adbd62cbfc5a072a9e77f1b64af78b46e">libnet-functions.h</a>
+</li>
+<li>libnet_plist_chain_free()
+: <a class="el" href="libnet-functions_8h.html#a59623a76b513ae6af05befded04f65d2">libnet-functions.h</a>
+</li>
+<li>libnet_plist_chain_new()
+: <a class="el" href="libnet-functions_8h.html#aaedc1110a9c8deab0909f15e141f5883">libnet-functions.h</a>
+</li>
+<li>libnet_plist_chain_next_pair()
+: <a class="el" href="libnet-functions_8h.html#ac4b56b34eb9124cb6b70fb9bff5ba6f4">libnet-functions.h</a>
+</li>
+<li>LIBNET_PR2
+: <a class="el" href="libnet-macros_8h.html#a96a6017948aa76e5a5d415c3227348df">libnet-macros.h</a>
+</li>
+<li>LIBNET_RESOLVE
+: <a class="el" href="libnet-macros_8h.html#a6733960f6981f1930b2d1a489df89cc7">libnet-macros.h</a>
+</li>
+<li>libnet_seed_prand()
+: <a class="el" href="libnet-functions_8h.html#a0a995dfd68f20b80394507b9968ae951">libnet-functions.h</a>
+</li>
+<li>libnet_stats()
+: <a class="el" href="libnet-functions_8h.html#a8fe5ad751cf8320b0ac56a0736332ec3">libnet-functions.h</a>
+</li>
+<li>libnet_toggle_checksum()
+: <a class="el" href="libnet-functions_8h.html#af17b19befbe13e23a240739b19846503">libnet-functions.h</a>
+</li>
+<li>libnet_version()
+: <a class="el" href="libnet-functions_8h.html#ac4a33a98186ad71f7ae4c559b039af0f">libnet-functions.h</a>
+</li>
+<li>libnet_write()
+: <a class="el" href="libnet-functions_8h.html#a3ec16c8aa5c7ae59ff63ce4a9329ab90">libnet-functions.h</a>
+</li>
+</ul>
+</div><!-- contents -->
+<hr>
+<address><small>
+Documentation for <a href="https://github.com/sgeto/libnet">libnet</a> (version 1.2-rc3).<br>
+Generated on Wed Apr 26 2017 by
+<a href="http://www.doxygen.org/">Doxygen 1.8.14</a>.
+</small></address>
+</body>
+</html>
diff --git a/doc/api/globals_defs.html b/doc/api/globals_defs.html
new file mode 100644
index 0000000..b0340dd
--- /dev/null
+++ b/doc/api/globals_defs.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.14"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>libnet: API Documentation: Globals</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="libnet_api_stylesheet.css_tmpl" rel="stylesheet" type="text/css"/>
+</head>
+<!-- Generated by Doxygen 1.8.14 -->
+</div><!-- top -->
+<div class="contents">
+&#160;<ul>
+<li>for_each_context_in_cq
+: <a class="el" href="libnet-macros_8h.html#af36eb84eee10c525720134cfadb50a3e">libnet-macros.h</a>
+</li>
+<li>IN6ADDR_ERROR_INIT
+: <a class="el" href="libnet-macros_8h.html#a9c76fe8da8e411fe1db9f75583dc1b8a">libnet-macros.h</a>
+</li>
+<li>LIBNET_DONT_RESOLVE
+: <a class="el" href="libnet-macros_8h.html#ac67cb6e9b00fd492cc3a9247e9477d87">libnet-macros.h</a>
+</li>
+<li>LIBNET_ERRBUF_SIZE
+: <a class="el" href="libnet-macros_8h.html#a2d720375e2ef5a85a62d6069283a5223">libnet-macros.h</a>
+</li>
+<li>LIBNET_MAX_PACKET
+: <a class="el" href="libnet-macros_8h.html#ac7301c95aa36d66e8904979650b5189d">libnet-macros.h</a>
+</li>
+<li>LIBNET_MAXOPTION_SIZE
+: <a class="el" href="libnet-macros_8h.html#ae9cd154f8cb482809ee456b6ac43dea5">libnet-macros.h</a>
+</li>
+<li>LIBNET_OFF
+: <a class="el" href="libnet-macros_8h.html#af87da67c016a9791d256c2d71bf0b0ac">libnet-macros.h</a>
+</li>
+<li>LIBNET_ON
+: <a class="el" href="libnet-macros_8h.html#a5ff9536ca9bbe6f73f69bec817962742">libnet-macros.h</a>
+</li>
+<li>LIBNET_PR2
+: <a class="el" href="libnet-macros_8h.html#a96a6017948aa76e5a5d415c3227348df">libnet-macros.h</a>
+</li>
+<li>LIBNET_RESOLVE
+: <a class="el" href="libnet-macros_8h.html#a6733960f6981f1930b2d1a489df89cc7">libnet-macros.h</a>
+</li>
+</ul>
+</div><!-- contents -->
+<hr>
+<address><small>
+Documentation for <a href="https://github.com/sgeto/libnet">libnet</a> (version 1.2-rc3).<br>
+Generated on Wed Apr 26 2017 by
+<a href="http://www.doxygen.org/">Doxygen 1.8.14</a>.
+</small></address>
+</body>
+</html>
diff --git a/doc/api/globals_func.html b/doc/api/globals_func.html
new file mode 100644
index 0000000..c0824d8
--- /dev/null
+++ b/doc/api/globals_func.html
@@ -0,0 +1,403 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.14"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>libnet: API Documentation: Globals</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="libnet_api_stylesheet.css_tmpl" rel="stylesheet" type="text/css"/>
+</head>
+<!-- Generated by Doxygen 1.8.14 -->
+</div><!-- top -->
+<div class="contents">
+&#160;
+
+<h3><a id="index_l"></a>- l -</h3><ul>
+<li>libnet_addr2name4()
+: <a class="el" href="libnet-functions_8h.html#added478f7cb16e00cf34f44816e33083">libnet-functions.h</a>
+</li>
+<li>libnet_addr2name6_r()
+: <a class="el" href="libnet-functions_8h.html#a50fcb283db9884651c59d79ebd825bc4">libnet-functions.h</a>
+</li>
+<li>libnet_adv_cull_header()
+: <a class="el" href="libnet-functions_8h.html#aac02edd8930cb604dc65f72f7ffd8892">libnet-functions.h</a>
+</li>
+<li>libnet_adv_cull_packet()
+: <a class="el" href="libnet-functions_8h.html#a9f91e176ba3b1f93ec049f82c08b54be">libnet-functions.h</a>
+</li>
+<li>libnet_adv_free_packet()
+: <a class="el" href="libnet-functions_8h.html#a92c45b67cbf9a16f8e6edd9a067c3f6d">libnet-functions.h</a>
+</li>
+<li>libnet_adv_write_link()
+: <a class="el" href="libnet-functions_8h.html#ad00e9f92da1faea6c8ce400d6e7cd45e">libnet-functions.h</a>
+</li>
+<li>libnet_adv_write_raw_ipv4()
+: <a class="el" href="libnet-functions_8h.html#a3524aaf97da73461cabd4797e89c4da4">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_arp()
+: <a class="el" href="libnet-functions_8h.html#aa1bb2efa1cec14b12f1ce6210f20b358">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_ethernet()
+: <a class="el" href="libnet-functions_8h.html#a6da323c2eb9eeab293cdfd99ceb134b5">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_fddi()
+: <a class="el" href="libnet-functions_8h.html#a367d0539e0c7484ac4e0092ced22ca8e">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_ipv4()
+: <a class="el" href="libnet-functions_8h.html#a6894d563677d9f229feedf52c759ac0a">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_ipv6()
+: <a class="el" href="libnet-functions_8h.html#a606209e22d203a859a380e1d37f9688c">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_link()
+: <a class="el" href="libnet-functions_8h.html#a8a881ba6d300b16e5cadd9e3f6ef7bc8">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_token_ring()
+: <a class="el" href="libnet-functions_8h.html#ac4e70a6d0e895d722e407c6d5fae1466">libnet-functions.h</a>
+</li>
+<li>libnet_build_802_1q()
+: <a class="el" href="libnet-functions_8h.html#acbab0d304c5e9d36438050ac6d233132">libnet-functions.h</a>
+</li>
+<li>libnet_build_802_1x()
+: <a class="el" href="libnet-functions_8h.html#ab33fc501031e68af303fbffb7643b11d">libnet-functions.h</a>
+</li>
+<li>libnet_build_802_2()
+: <a class="el" href="libnet-functions_8h.html#a6f616f8d4646db5ada510991cce80808">libnet-functions.h</a>
+</li>
+<li>libnet_build_802_2snap()
+: <a class="el" href="libnet-functions_8h.html#a22f004a0b0d496762fbd056ca5d31eeb">libnet-functions.h</a>
+</li>
+<li>libnet_build_802_3()
+: <a class="el" href="libnet-functions_8h.html#ab6777b0c3c3b80eaa465686654f668e8">libnet-functions.h</a>
+</li>
+<li>libnet_build_arp()
+: <a class="el" href="libnet-functions_8h.html#ab606fadc44daa426fa4ba8b43bee5ece">libnet-functions.h</a>
+</li>
+<li>libnet_build_bgp4_header()
+: <a class="el" href="libnet-functions_8h.html#a3f9827171fbe5dbc4b02c7d9876a2393">libnet-functions.h</a>
+</li>
+<li>libnet_build_bgp4_notification()
+: <a class="el" href="libnet-functions_8h.html#afe0007cf544b1d6773b6046c5c5ad372">libnet-functions.h</a>
+</li>
+<li>libnet_build_bgp4_open()
+: <a class="el" href="libnet-functions_8h.html#a4a7df60e7798fddfff25f163ef63e2af">libnet-functions.h</a>
+</li>
+<li>libnet_build_bgp4_update()
+: <a class="el" href="libnet-functions_8h.html#a88f572ee97c9223d4b24f55d868ce419">libnet-functions.h</a>
+</li>
+<li>libnet_build_bootpv4()
+: <a class="el" href="libnet-functions_8h.html#a564c31892fb8cc2bf44244cdb26d693e">libnet-functions.h</a>
+</li>
+<li>libnet_build_cdp()
+: <a class="el" href="libnet-functions_8h.html#aed8b33a329bda096ecac629e92e9bca5">libnet-functions.h</a>
+</li>
+<li>libnet_build_data()
+: <a class="el" href="libnet-functions_8h.html#aa4c6c975b3c87d3d17224302e4319eec">libnet-functions.h</a>
+</li>
+<li>libnet_build_dhcpv4()
+: <a class="el" href="libnet-functions_8h.html#a3333c5e5cde290dda9b80adc13a00466">libnet-functions.h</a>
+</li>
+<li>libnet_build_dnsv4()
+: <a class="el" href="libnet-functions_8h.html#a5829f525c067e1d99826865292542d8a">libnet-functions.h</a>
+</li>
+<li>libnet_build_egre()
+: <a class="el" href="libnet-functions_8h.html#a0092b3f0285f4c96915eef9579655036">libnet-functions.h</a>
+</li>
+<li>libnet_build_ethernet()
+: <a class="el" href="libnet-functions_8h.html#acb97a898e200c1aaea6081545f2fcb39">libnet-functions.h</a>
+</li>
+<li>libnet_build_fddi()
+: <a class="el" href="libnet-functions_8h.html#ab8c2a7a3572bcfef2705ab05c8ef12bc">libnet-functions.h</a>
+</li>
+<li>libnet_build_gre()
+: <a class="el" href="libnet-functions_8h.html#a41e095c98e623f00618f6d306cb31289">libnet-functions.h</a>
+</li>
+<li>libnet_build_gre_last_sre()
+: <a class="el" href="libnet-functions_8h.html#ae514f81f6d68bc1b2442762a6f87804a">libnet-functions.h</a>
+</li>
+<li>libnet_build_gre_sre()
+: <a class="el" href="libnet-functions_8h.html#ae0c59a8f8d014cc1955d88139c2096c0">libnet-functions.h</a>
+</li>
+<li>libnet_build_hsrp()
+: <a class="el" href="libnet-functions_8h.html#abe75e9be71910c580eff1d6925224778">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv4_echo()
+: <a class="el" href="libnet-functions_8h.html#a4a4d3dc8f02e6fe6629e35e37ece0264">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv4_mask()
+: <a class="el" href="libnet-functions_8h.html#ab403c63ae76d0bc59b6641e3c821550c">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv4_redirect()
+: <a class="el" href="libnet-functions_8h.html#a6df9db28162c58a2cc356b3a87a16f6b">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv4_timeexceed()
+: <a class="el" href="libnet-functions_8h.html#a4f2eb3f11fd921b0fd0948cf8ef37c91">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv4_timestamp()
+: <a class="el" href="libnet-functions_8h.html#a926f33ff4ea64923b49f16f8c5f7286d">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv4_unreach()
+: <a class="el" href="libnet-functions_8h.html#a83197de705eb7929e8216f5771aa4b96">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv6_echo()
+: <a class="el" href="libnet-functions_8h.html#a09a512c9f670528f7f1c9fe9775a0a61">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv6_ndp_nadv()
+: <a class="el" href="libnet-functions_8h.html#a0d2d7119072c0b98f1248172a2b7885d">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv6_ndp_nsol()
+: <a class="el" href="libnet-functions_8h.html#aa184e1e69a7fc7161d484dcdca4f74db">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv6_ndp_opt()
+: <a class="el" href="libnet-functions_8h.html#aecee0675d61d3ff71d79c64c74a7c924">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv6_unreach()
+: <a class="el" href="libnet-functions_8h.html#a86ee5967b07a4fe49af301add8656450">libnet-functions.h</a>
+</li>
+<li>libnet_build_igmp()
+: <a class="el" href="libnet-functions_8h.html#afbeeb2c1c377c59aa2747dff4db4d5e8">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipsec_ah()
+: <a class="el" href="libnet-functions_8h.html#a22d1d874a5d12b8d3528f637990ceb21">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipsec_esp_ftr()
+: <a class="el" href="libnet-functions_8h.html#a0e7ba4cf571d4d85b1084e15059c7336">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipsec_esp_hdr()
+: <a class="el" href="libnet-functions_8h.html#ad7d163363769594667524e7607535aec">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv4()
+: <a class="el" href="libnet-functions_8h.html#a2d9839736df3b1c46acdcc67e291c03e">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv4_options()
+: <a class="el" href="libnet-functions_8h.html#aa209cafad74cd8f259aa97732e06d07c">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv6()
+: <a class="el" href="libnet-functions_8h.html#a50fc0e6ad5c2b1fd705f349eff382dfd">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv6_destopts()
+: <a class="el" href="libnet-functions_8h.html#a1b6e9597bf110de597a673a4c6ed6ebc">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv6_frag()
+: <a class="el" href="libnet-functions_8h.html#a9eeb211b6b8579fe9725da6d32d2732d">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv6_hbhopts()
+: <a class="el" href="libnet-functions_8h.html#a1a8b5292e4e714c0f299f0577c86cb00">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv6_routing()
+: <a class="el" href="libnet-functions_8h.html#a7fb612955dd3a787f13ab0c85b360023">libnet-functions.h</a>
+</li>
+<li>libnet_build_isl()
+: <a class="el" href="libnet-functions_8h.html#afdcc92fd59366c48693ad48c076c488e">libnet-functions.h</a>
+</li>
+<li>libnet_build_link()
+: <a class="el" href="libnet-functions_8h.html#a9ec77e2ffcb9540d9f4eee2b0ff57af2">libnet-functions.h</a>
+</li>
+<li>libnet_build_mpls()
+: <a class="el" href="libnet-functions_8h.html#a520053e593215a240f7207c2b28075cb">libnet-functions.h</a>
+</li>
+<li>libnet_build_ntp()
+: <a class="el" href="libnet-functions_8h.html#af305c48631b600e472f60b951b9ebf75">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2()
+: <a class="el" href="libnet-functions_8h.html#a429bf355c69895a5ad7ca900d734bf48">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_dbd()
+: <a class="el" href="libnet-functions_8h.html#a9f859449de2c7e2f1b2d18051a315634">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_hello()
+: <a class="el" href="libnet-functions_8h.html#a224a55d5758cd6685fdd374597f133c4">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsa()
+: <a class="el" href="libnet-functions_8h.html#a798142aed2aee944fdc80ce14faf31f6">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsa_as()
+: <a class="el" href="libnet-functions_8h.html#a9002c457692ce2557197dc68c9932849">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsa_net()
+: <a class="el" href="libnet-functions_8h.html#a234cf0a788a5944ff70c879c96467bc4">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsa_rtr()
+: <a class="el" href="libnet-functions_8h.html#a67209523b736cc9f70743d3dfbce1129">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsa_sum()
+: <a class="el" href="libnet-functions_8h.html#ae9c55870fecbd742edc25f06b73ad5a2">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsr()
+: <a class="el" href="libnet-functions_8h.html#a17d51de46576464ff606e15250c7fe3a">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsu()
+: <a class="el" href="libnet-functions_8h.html#a5ffe185b91c48fad0dc84f81b7d26697">libnet-functions.h</a>
+</li>
+<li>libnet_build_rip()
+: <a class="el" href="libnet-functions_8h.html#a154c83b71614c8cf3635f7c80cf7e9a6">libnet-functions.h</a>
+</li>
+<li>libnet_build_rpc_call()
+: <a class="el" href="libnet-functions_8h.html#a4a657cd81f10ba6dbdcbd6a6a81f72d2">libnet-functions.h</a>
+</li>
+<li>libnet_build_sebek()
+: <a class="el" href="libnet-functions_8h.html#a0d4ce5211113c5d5818d557ce3fc0234">libnet-functions.h</a>
+</li>
+<li>libnet_build_stp_conf()
+: <a class="el" href="libnet-functions_8h.html#ad6310dd6dff16dc711663f70256d2148">libnet-functions.h</a>
+</li>
+<li>libnet_build_stp_tcn()
+: <a class="el" href="libnet-functions_8h.html#a913fc0cf8782d915edc20f4f6abf847f">libnet-functions.h</a>
+</li>
+<li>libnet_build_tcp()
+: <a class="el" href="libnet-functions_8h.html#ad096d303ddcddbd63ea269453bd26a20">libnet-functions.h</a>
+</li>
+<li>libnet_build_tcp_options()
+: <a class="el" href="libnet-functions_8h.html#aec6344132528e6903837b0d8909ad08c">libnet-functions.h</a>
+</li>
+<li>libnet_build_token_ring()
+: <a class="el" href="libnet-functions_8h.html#a4d77b901ebcc18b8c0ee2345e4ea6177">libnet-functions.h</a>
+</li>
+<li>libnet_build_udp()
+: <a class="el" href="libnet-functions_8h.html#a0ae166a293c0495431246fe0d0ba66f6">libnet-functions.h</a>
+</li>
+<li>libnet_build_vrrp()
+: <a class="el" href="libnet-functions_8h.html#a5a6538c0cf4dd6c2f59b1657d56796b3">libnet-functions.h</a>
+</li>
+<li>libnet_clear_packet()
+: <a class="el" href="libnet-functions_8h.html#a9ae9cb6e191e382c653237451f9bacd6">libnet-functions.h</a>
+</li>
+<li>libnet_cq_add()
+: <a class="el" href="libnet-functions_8h.html#a20887ffe940f1d2c5bcae79a188176c6">libnet-functions.h</a>
+</li>
+<li>libnet_cq_destroy()
+: <a class="el" href="libnet-functions_8h.html#a1577413fdaf10706d5016b64f7f7924b">libnet-functions.h</a>
+</li>
+<li>libnet_cq_end_loop()
+: <a class="el" href="libnet-functions_8h.html#a65145cbd0be6d1609bf07b52d6c57695">libnet-functions.h</a>
+</li>
+<li>libnet_cq_find_by_label()
+: <a class="el" href="libnet-functions_8h.html#a1775288c17694d4d606327ad066f970d">libnet-functions.h</a>
+</li>
+<li>libnet_cq_getlabel()
+: <a class="el" href="libnet-functions_8h.html#a337f556ed05df13c1de19acbd4d7f50a">libnet-functions.h</a>
+</li>
+<li>libnet_cq_head()
+: <a class="el" href="libnet-functions_8h.html#a8233338e5050d8fc46c6d1f35ef32b5e">libnet-functions.h</a>
+</li>
+<li>libnet_cq_last()
+: <a class="el" href="libnet-functions_8h.html#a7edc80233d439b7755fdc127cfd7f88d">libnet-functions.h</a>
+</li>
+<li>libnet_cq_next()
+: <a class="el" href="libnet-functions_8h.html#af21a48ca025b23dfcd5d10e9d1b924ba">libnet-functions.h</a>
+</li>
+<li>libnet_cq_remove()
+: <a class="el" href="libnet-functions_8h.html#a93d5ccdcdba31daacde82fc50f467412">libnet-functions.h</a>
+</li>
+<li>libnet_cq_remove_by_label()
+: <a class="el" href="libnet-functions_8h.html#a90a6ea3b24de3906ca1cf9c78a7b5a5f">libnet-functions.h</a>
+</li>
+<li>libnet_cq_size()
+: <a class="el" href="libnet-functions_8h.html#ae071e441671c342ea2d3bbca979e2769">libnet-functions.h</a>
+</li>
+<li>libnet_destroy()
+: <a class="el" href="libnet-functions_8h.html#a8ddea475d4051b695f519100755d6a05">libnet-functions.h</a>
+</li>
+<li>libnet_diag_dump_context()
+: <a class="el" href="libnet-functions_8h.html#a1c70d00eefe61b2f5902ab56c802e07c">libnet-functions.h</a>
+</li>
+<li>libnet_diag_dump_hex()
+: <a class="el" href="libnet-functions_8h.html#adb2f7d417f05a058c0c2c7f76b6f66e6">libnet-functions.h</a>
+</li>
+<li>libnet_diag_dump_pblock()
+: <a class="el" href="libnet-functions_8h.html#a49e6023168b4f660ed8ff67dcc8ee228">libnet-functions.h</a>
+</li>
+<li>libnet_diag_dump_pblock_type()
+: <a class="el" href="libnet-functions_8h.html#a59cc8a10dd7a94f01238f96417b08420">libnet-functions.h</a>
+</li>
+<li>libnet_get_hwaddr()
+: <a class="el" href="libnet-functions_8h.html#acf6dc1ece9e994d4f4d3e47e5b218f6c">libnet-functions.h</a>
+</li>
+<li>libnet_get_ipaddr4()
+: <a class="el" href="libnet-functions_8h.html#a0adcfdd368764d4c4ab610daefe56b3d">libnet-functions.h</a>
+</li>
+<li>libnet_get_ipaddr6()
+: <a class="el" href="libnet-functions_8h.html#a7ca153d8efe6650769765fbc23e2b312">libnet-functions.h</a>
+</li>
+<li>libnet_get_prand()
+: <a class="el" href="libnet-functions_8h.html#ae0a1d32fdd169c55a0ce4c186a19b125">libnet-functions.h</a>
+</li>
+<li>libnet_getdevice()
+: <a class="el" href="libnet-functions_8h.html#ab65f1cd5ef46ae93909e6dd45bcff0cb">libnet-functions.h</a>
+</li>
+<li>libnet_geterror()
+: <a class="el" href="libnet-functions_8h.html#a7932677fa8ddd7f512c7b154d91263e9">libnet-functions.h</a>
+</li>
+<li>libnet_getfd()
+: <a class="el" href="libnet-functions_8h.html#a301939dd9e773bec51a8a3cc8e09ca3b">libnet-functions.h</a>
+</li>
+<li>libnet_getgre_length()
+: <a class="el" href="libnet-functions_8h.html#a6173dfa2aaf953c8a36ebf347a567100">libnet-functions.h</a>
+</li>
+<li>libnet_getpacket_size()
+: <a class="el" href="libnet-functions_8h.html#ad5c14b23de1fe0aaf36315c710972fcd">libnet-functions.h</a>
+</li>
+<li>libnet_getpbuf()
+: <a class="el" href="libnet-functions_8h.html#a1e1bc31a56aad7f000e55d9f2ed002b9">libnet-functions.h</a>
+</li>
+<li>libnet_getpbuf_size()
+: <a class="el" href="libnet-functions_8h.html#a6b945999765b5c5cfa2e496153fc7d03">libnet-functions.h</a>
+</li>
+<li>libnet_hex_aton()
+: <a class="el" href="libnet-functions_8h.html#a62a7ac78ee69568e17927674786c1b69">libnet-functions.h</a>
+</li>
+<li>libnet_in6_is_error()
+: <a class="el" href="libnet-functions_8h.html#a0a43add9ba39e677367ff167e807814b">libnet-functions.h</a>
+</li>
+<li>libnet_init()
+: <a class="el" href="libnet-functions_8h.html#aced83ef40edb05a9fc1e129373fe44dd">libnet-functions.h</a>
+</li>
+<li>libnet_name2addr4()
+: <a class="el" href="libnet-functions_8h.html#a634e7d60fd7117c948fafea0ff25f77b">libnet-functions.h</a>
+</li>
+<li>libnet_name2addr6()
+: <a class="el" href="libnet-functions_8h.html#af525a32eb69e48519f84abed4231643a">libnet-functions.h</a>
+</li>
+<li>libnet_plist_chain_dump()
+: <a class="el" href="libnet-functions_8h.html#a155f2da7f242051d5d80691c1754ca9c">libnet-functions.h</a>
+</li>
+<li>libnet_plist_chain_dump_string()
+: <a class="el" href="libnet-functions_8h.html#adbd62cbfc5a072a9e77f1b64af78b46e">libnet-functions.h</a>
+</li>
+<li>libnet_plist_chain_free()
+: <a class="el" href="libnet-functions_8h.html#a59623a76b513ae6af05befded04f65d2">libnet-functions.h</a>
+</li>
+<li>libnet_plist_chain_new()
+: <a class="el" href="libnet-functions_8h.html#aaedc1110a9c8deab0909f15e141f5883">libnet-functions.h</a>
+</li>
+<li>libnet_plist_chain_next_pair()
+: <a class="el" href="libnet-functions_8h.html#ac4b56b34eb9124cb6b70fb9bff5ba6f4">libnet-functions.h</a>
+</li>
+<li>libnet_seed_prand()
+: <a class="el" href="libnet-functions_8h.html#a0a995dfd68f20b80394507b9968ae951">libnet-functions.h</a>
+</li>
+<li>libnet_stats()
+: <a class="el" href="libnet-functions_8h.html#a8fe5ad751cf8320b0ac56a0736332ec3">libnet-functions.h</a>
+</li>
+<li>libnet_toggle_checksum()
+: <a class="el" href="libnet-functions_8h.html#af17b19befbe13e23a240739b19846503">libnet-functions.h</a>
+</li>
+<li>libnet_version()
+: <a class="el" href="libnet-functions_8h.html#ac4a33a98186ad71f7ae4c559b039af0f">libnet-functions.h</a>
+</li>
+<li>libnet_write()
+: <a class="el" href="libnet-functions_8h.html#a3ec16c8aa5c7ae59ff63ce4a9329ab90">libnet-functions.h</a>
+</li>
+</ul>
+</div><!-- contents -->
+<hr>
+<address><small>
+Documentation for <a href="https://github.com/sgeto/libnet">libnet</a> (version 1.2-rc3).<br>
+Generated on Wed Apr 26 2017 by
+<a href="http://www.doxygen.org/">Doxygen 1.8.14</a>.
+</small></address>
+</body>
+</html>
diff --git a/doc/api/graph_legend.html b/doc/api/graph_legend.html
new file mode 100644
index 0000000..b41f86a
--- /dev/null
+++ b/doc/api/graph_legend.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.14"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>libnet: API Documentation: Graph Legend</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="libnet_api_stylesheet.css_tmpl" rel="stylesheet" type="text/css"/>
+</head>
+<!-- Generated by Doxygen 1.8.14 -->
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">Graph Legend</div> </div>
+</div><!--header-->
+<div class="contents">
+<p>This page explains how to interpret the graphs that are generated by doxygen.</p>
+<p>Consider the following example: </p><div class="fragment"><div class="line">/*! Invisible class because of truncation */</div><div class="line">class Invisible { };</div><div class="line"></div><div class="line">/*! Truncated class, inheritance relation is hidden */</div><div class="line">class Truncated : public Invisible { };</div><div class="line"></div><div class="line">/* Class not documented with doxygen comments */</div><div class="line">class Undocumented { };</div><div class="line"></div><div class="line">/*! Class that is inherited using public inheritance */</div><div class="line">class PublicBase : public Truncated { };</div><div class="line"></div><div class="line">/*! A template class */</div><div class="line">template&lt;class T&gt; class Templ { };</div><div class="line"></div><div class="line">/*! Class that is inherited using protected inheritance */</div><div class="line">class ProtectedBase { };</div><div class="line"></div><div class="line">/*! Class that is inherited using private inheritance */</div><div class="line">class PrivateBase { };</div><div class="line"></div><div class="line">/*! Class that is used by the Inherited class */</div><div class="line">class Used { };</div><div class="line"></div><div class="line">/*! Super class that inherits a number of other classes */</div><div class="line">class Inherited : public PublicBase,</div><div class="line"> protected ProtectedBase,</div><div class="line"> private PrivateBase,</div><div class="line"> public Undocumented,</div><div class="line"> public Templ&lt;int&gt;</div><div class="line">{</div><div class="line"> private:</div><div class="line"> Used *m_usedClass;</div><div class="line">};</div></div><!-- fragment --><p> This will result in the following graph:</p>
+<center><div class="image">
+<img src="graph_legend.png"/>
+</div>
+</center><p>The boxes in the above graph have the following meaning: </p>
+<ul>
+<li>
+A filled gray box represents the struct or class for which the graph is generated. </li>
+<li>
+A box with a black border denotes a documented struct or class. </li>
+<li>
+A box with a gray border denotes an undocumented struct or class. </li>
+<li>
+A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries. </li>
+</ul>
+<p>The arrows have the following meaning: </p>
+<ul>
+<li>
+A dark blue arrow is used to visualize a public inheritance relation between two classes. </li>
+<li>
+A dark green arrow is used for protected inheritance. </li>
+<li>
+A dark red arrow is used for private inheritance. </li>
+<li>
+A purple dashed arrow is used if a class is contained or used by another class. The arrow is labelled with the variable(s) through which the pointed class or struct is accessible. </li>
+<li>
+A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labelled with the template parameters of the instance. </li>
+</ul>
+</div><!-- contents -->
+<hr>
+<address><small>
+Documentation for <a href="https://github.com/sgeto/libnet">libnet</a> (version 1.2-rc3).<br>
+Generated on Wed Apr 26 2017 by
+<a href="http://www.doxygen.org/">Doxygen 1.8.14</a>.
+</small></address>
+</body>
+</html>
diff --git a/doc/api/graph_legend.png b/doc/api/graph_legend.png
new file mode 100644
index 0000000..6c1d0c2
--- /dev/null
+++ b/doc/api/graph_legend.png
Binary files differ
diff --git a/doc/api/index.html b/doc/api/index.html
new file mode 100644
index 0000000..0a810fa
--- /dev/null
+++ b/doc/api/index.html
@@ -0,0 +1,78 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.14"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>libnet: API Documentation: libnet API Documentation</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="libnet_api_stylesheet.css_tmpl" rel="stylesheet" type="text/css"/>
+</head>
+<!-- Generated by Doxygen 1.8.14 -->
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">libnet API Documentation </div> </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><p>1998 - 2017 The libnet Developer Community</p>
+<h2>Content(s) </h2>
+<ul>
+<li><a href="index.html">Main Page</a></li>
+<li>Files<ul>
+<li><a href="files.html">File List</a></li>
+<li><a href="globals.html">Globals</a></li>
+</ul>
+</li>
+<li>Stuff<ul>
+<li><a href="rawsocket_non_sequitur.html">Rawsocket Non Sequitur</a><ul>
+<li>Some Sub-sub-page</li>
+</ul>
+</li>
+<li>Design Notes</li>
+<li>Hacking</li>
+<li>TODO</li>
+</ul>
+</li>
+<li>Bindings<ul>
+<li>Lua</li>
+<li><a href="https://github.com/allfro/pylibnet" title="pylibnet">Python</a></li>
+</ul>
+</li>
+<li>Page</li>
+<li>More Page!<ul>
+<li>Me Another Sub-page, yay!</li>
+</ul>
+</li>
+<li><a href="index.html#Topics-TODO">TODO</a></li>
+</ul>
+<h2>Introduction </h2>
+<p><b>Attention:</b> Most on the stuff on this page is either placeholder text and/or work in progress. At best, you should take the content on this page half-serious. I invite you to help expand/improve it.</p>
+<p>This manual documents the low-level libnet API. <b>If you're planning to this API directly, you're signing up for some pain.</b> Just kidding. (I'm not kidding)</p>
+<p>Although there aren't many up-to-date places to look for libnet information these days (yet), you still might not want to get started learning about libnet by reading this document. These pages provide an overview of (some) the internals of libnet with links to the relevant parts of the code. If you "just want it to work" or if this is all very new to you, then you should first refer to <a href="http://www.yomama.com">these</a> (more or less) separate set of pages. Be sure to check out the man pages as well.</p>
+<p>The libnet API deliberately lacks most convenient functions. As further explained in <a href="Design_Notes.html" title="Design Notes">Design Notes</a>, those happen behind the scenes, are left to complementary libraries, higher-level libraries or to "bindings" such as pcap, Python, Lua, etc. and have features such as ~~object systems and main loops~~ that allow a much more convenient API.</p>
+<p>The low-level API also contains plenty of clutter to support integration with arbitrary ~~object systems, languages, main loops~~, and so forth. These features add a lot of noise to the API that you probably don't care about unless you're coding a binding.</p>
+<p>For now, and probably never will there be similar docs for libnet's internals. So if you want to get oriented with the libnet source code (because you're interested in patching the code for example), you should dive straight into each source file, read the source and the comments surrounding it, and... just... figure the rest out! Or ask about it <a href="https://github.com/sgeto/libnet/issues" title="Report bugs">here</a>. If that's something you think you're you can see yourself doing then <b>Welcome Aboard!</b> By the way, it's also a good idea to go through some of the commits to understand the purpose or aim of whoever had their hands on the source before you. There will be a "[Hacking](Hacking.html)" section soon that is intended to guide and assist developers through this adventures journey.</p>
+<p>That is, if I don't lose interest, any hope or my sanity before that. Just kidding. (I'm not kidding)</p>
+<p>Stay tuned.</p>
+<p><b>Last Modified:</b> <em>Wed, 26 Apr 2017 02:58:54 +0300</em></p>
+<h2>TODO </h2>
+<ul>
+<li>try to make it sound smart</li>
+<li>replace stuff inside ~~ with stuff that is actually true</li>
+<li>call mom and dad</li>
+<li>try to get Inbal back :-(</li>
+<li>re-install Windows</li>
+<li>create a separate "doc" branch and never ever (ever) commit anything relate to it directly to master (lesson learnt) </li>
+</ul>
+</div></div><!-- contents -->
+<hr>
+<address><small>
+Documentation for <a href="https://github.com/sgeto/libnet">libnet</a> (version 1.2-rc3).<br>
+Generated on Wed Apr 26 2017 by
+<a href="http://www.doxygen.org/">Doxygen 1.8.14</a>.
+</small></address>
+</body>
+</html>
diff --git a/doc/api/libnet-functions_8h.html b/doc/api/libnet-functions_8h.html
new file mode 100644
index 0000000..e370dfd
--- /dev/null
+++ b/doc/api/libnet-functions_8h.html
@@ -0,0 +1,8856 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.14"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>libnet: API Documentation: libnet/libnet-functions.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="libnet_api_stylesheet.css_tmpl" rel="stylesheet" type="text/css"/>
+</head>
+<!-- Generated by Doxygen 1.8.14 -->
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_2e83b025d21fe7b9c524d93377692ce4.html">libnet</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#func-members">Functions</a> </div>
+ <div class="headertitle">
+<div class="title">libnet-functions.h File Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+
+<p>libnet exported function prototypes
+<a href="#details">More...</a></p>
+<div class="textblock"><div class="dynheader">
+This graph shows which files directly or indirectly include this file:</div>
+<div class="dyncontent">
+<div class="center"><img src="libnet-functions_8h__dep__incl.png" border="0" usemap="#libnet_2libnet-functions_8hdep" alt=""/></div>
+<map name="libnet_2libnet-functions_8hdep" id="libnet_2libnet-functions_8hdep">
+<area shape="rect" id="node2" href="libnet_8h.html" title="Top&#45;level libnet header file. " alt="" coords="51,80,115,107"/>
+</map>
+</div>
+</div>
+<p><a href="libnet-functions_8h_source.html">Go to the source code of this file.</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:aced83ef40edb05a9fc1e129373fe44dd"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#aced83ef40edb05a9fc1e129373fe44dd">libnet_init</a> (int injection_type, const char *device, char *err_buf)</td></tr>
+<tr class="separator:aced83ef40edb05a9fc1e129373fe44dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8ddea475d4051b695f519100755d6a05"><td class="memItemLeft" align="right" valign="top">LIBNET_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a8ddea475d4051b695f519100755d6a05">libnet_destroy</a> (libnet_t *l)</td></tr>
+<tr class="separator:a8ddea475d4051b695f519100755d6a05"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a9ae9cb6e191e382c653237451f9bacd6"><td class="memItemLeft" align="right" valign="top">LIBNET_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a9ae9cb6e191e382c653237451f9bacd6">libnet_clear_packet</a> (libnet_t *l)</td></tr>
+<tr class="separator:a9ae9cb6e191e382c653237451f9bacd6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8fe5ad751cf8320b0ac56a0736332ec3"><td class="memItemLeft" align="right" valign="top">LIBNET_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a8fe5ad751cf8320b0ac56a0736332ec3">libnet_stats</a> (libnet_t *l, struct libnet_stats *ls)</td></tr>
+<tr class="separator:a8fe5ad751cf8320b0ac56a0736332ec3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a301939dd9e773bec51a8a3cc8e09ca3b"><td class="memItemLeft" align="right" valign="top">LIBNET_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a301939dd9e773bec51a8a3cc8e09ca3b">libnet_getfd</a> (libnet_t *l)</td></tr>
+<tr class="separator:a301939dd9e773bec51a8a3cc8e09ca3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab65f1cd5ef46ae93909e6dd45bcff0cb"><td class="memItemLeft" align="right" valign="top">LIBNET_API const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#ab65f1cd5ef46ae93909e6dd45bcff0cb">libnet_getdevice</a> (libnet_t *l)</td></tr>
+<tr class="separator:ab65f1cd5ef46ae93909e6dd45bcff0cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1e1bc31a56aad7f000e55d9f2ed002b9"><td class="memItemLeft" align="right" valign="top">LIBNET_API uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a1e1bc31a56aad7f000e55d9f2ed002b9">libnet_getpbuf</a> (libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a1e1bc31a56aad7f000e55d9f2ed002b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6b945999765b5c5cfa2e496153fc7d03"><td class="memItemLeft" align="right" valign="top">LIBNET_API uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a6b945999765b5c5cfa2e496153fc7d03">libnet_getpbuf_size</a> (libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a6b945999765b5c5cfa2e496153fc7d03"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a7932677fa8ddd7f512c7b154d91263e9"><td class="memItemLeft" align="right" valign="top">LIBNET_API char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a7932677fa8ddd7f512c7b154d91263e9">libnet_geterror</a> (libnet_t *l)</td></tr>
+<tr class="separator:a7932677fa8ddd7f512c7b154d91263e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad5c14b23de1fe0aaf36315c710972fcd"><td class="memItemLeft" align="right" valign="top">LIBNET_API uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#ad5c14b23de1fe0aaf36315c710972fcd">libnet_getpacket_size</a> (libnet_t *l)</td></tr>
+<tr class="separator:ad5c14b23de1fe0aaf36315c710972fcd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0a995dfd68f20b80394507b9968ae951"><td class="memItemLeft" align="right" valign="top">LIBNET_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a0a995dfd68f20b80394507b9968ae951">libnet_seed_prand</a> (libnet_t *l)</td></tr>
+<tr class="separator:a0a995dfd68f20b80394507b9968ae951"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae0a1d32fdd169c55a0ce4c186a19b125"><td class="memItemLeft" align="right" valign="top">LIBNET_API uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#ae0a1d32fdd169c55a0ce4c186a19b125">libnet_get_prand</a> (int mod)</td></tr>
+<tr class="separator:ae0a1d32fdd169c55a0ce4c186a19b125"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af17b19befbe13e23a240739b19846503"><td class="memItemLeft" align="right" valign="top">LIBNET_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#af17b19befbe13e23a240739b19846503">libnet_toggle_checksum</a> (libnet_t *l, libnet_ptag_t ptag, int mode)</td></tr>
+<tr class="separator:af17b19befbe13e23a240739b19846503"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:added478f7cb16e00cf34f44816e33083"><td class="memItemLeft" align="right" valign="top">LIBNET_API char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#added478f7cb16e00cf34f44816e33083">libnet_addr2name4</a> (uint32_t in, uint8_t use_name)</td></tr>
+<tr class="separator:added478f7cb16e00cf34f44816e33083"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a634e7d60fd7117c948fafea0ff25f77b"><td class="memItemLeft" align="right" valign="top">LIBNET_API uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a634e7d60fd7117c948fafea0ff25f77b">libnet_name2addr4</a> (libnet_t *l, const char *host_name, uint8_t use_name)</td></tr>
+<tr class="separator:a634e7d60fd7117c948fafea0ff25f77b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0a43add9ba39e677367ff167e807814b"><td class="memItemLeft" align="right" valign="top">LIBNET_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a0a43add9ba39e677367ff167e807814b">libnet_in6_is_error</a> (struct libnet_in6_addr addr)</td></tr>
+<tr class="separator:a0a43add9ba39e677367ff167e807814b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af525a32eb69e48519f84abed4231643a"><td class="memItemLeft" align="right" valign="top">LIBNET_API struct libnet_in6_addr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#af525a32eb69e48519f84abed4231643a">libnet_name2addr6</a> (libnet_t *l, const char *host_name, uint8_t use_name)</td></tr>
+<tr class="separator:af525a32eb69e48519f84abed4231643a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a50fcb283db9884651c59d79ebd825bc4"><td class="memItemLeft" align="right" valign="top">LIBNET_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a50fcb283db9884651c59d79ebd825bc4">libnet_addr2name6_r</a> (struct libnet_in6_addr addr, uint8_t use_name, char *host_name, int host_name_len)</td></tr>
+<tr class="separator:a50fcb283db9884651c59d79ebd825bc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aaedc1110a9c8deab0909f15e141f5883"><td class="memItemLeft" align="right" valign="top">LIBNET_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#aaedc1110a9c8deab0909f15e141f5883">libnet_plist_chain_new</a> (libnet_t *l, libnet_plist_t **plist, char *token_list)</td></tr>
+<tr class="separator:aaedc1110a9c8deab0909f15e141f5883"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac4b56b34eb9124cb6b70fb9bff5ba6f4"><td class="memItemLeft" align="right" valign="top">LIBNET_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#ac4b56b34eb9124cb6b70fb9bff5ba6f4">libnet_plist_chain_next_pair</a> (libnet_plist_t *plist, uint16_t *bport, uint16_t *eport)</td></tr>
+<tr class="separator:ac4b56b34eb9124cb6b70fb9bff5ba6f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a155f2da7f242051d5d80691c1754ca9c"><td class="memItemLeft" align="right" valign="top">LIBNET_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a155f2da7f242051d5d80691c1754ca9c">libnet_plist_chain_dump</a> (libnet_plist_t *plist)</td></tr>
+<tr class="separator:a155f2da7f242051d5d80691c1754ca9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:adbd62cbfc5a072a9e77f1b64af78b46e"><td class="memItemLeft" align="right" valign="top">LIBNET_API char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#adbd62cbfc5a072a9e77f1b64af78b46e">libnet_plist_chain_dump_string</a> (libnet_plist_t *plist)</td></tr>
+<tr class="separator:adbd62cbfc5a072a9e77f1b64af78b46e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a59623a76b513ae6af05befded04f65d2"><td class="memItemLeft" align="right" valign="top">LIBNET_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a59623a76b513ae6af05befded04f65d2">libnet_plist_chain_free</a> (libnet_plist_t *plist)</td></tr>
+<tr class="separator:a59623a76b513ae6af05befded04f65d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:acbab0d304c5e9d36438050ac6d233132"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#acbab0d304c5e9d36438050ac6d233132">libnet_build_802_1q</a> (const uint8_t *dst, const uint8_t *src, uint16_t tpi, uint8_t priority, uint8_t cfi, uint16_t vlan_id, uint16_t len_proto, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:acbab0d304c5e9d36438050ac6d233132"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab33fc501031e68af303fbffb7643b11d"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#ab33fc501031e68af303fbffb7643b11d">libnet_build_802_1x</a> (uint8_t eap_ver, uint8_t eap_type, uint16_t length, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:ab33fc501031e68af303fbffb7643b11d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6f616f8d4646db5ada510991cce80808"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a6f616f8d4646db5ada510991cce80808">libnet_build_802_2</a> (uint8_t dsap, uint8_t ssap, uint8_t control, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a6f616f8d4646db5ada510991cce80808"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a22f004a0b0d496762fbd056ca5d31eeb"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a22f004a0b0d496762fbd056ca5d31eeb">libnet_build_802_2snap</a> (uint8_t dsap, uint8_t ssap, uint8_t control, uint8_t *oui, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a22f004a0b0d496762fbd056ca5d31eeb"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab6777b0c3c3b80eaa465686654f668e8"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#ab6777b0c3c3b80eaa465686654f668e8">libnet_build_802_3</a> (const uint8_t *dst, const uint8_t *src, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:ab6777b0c3c3b80eaa465686654f668e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:acb97a898e200c1aaea6081545f2fcb39"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#acb97a898e200c1aaea6081545f2fcb39">libnet_build_ethernet</a> (const uint8_t *dst, const uint8_t *src, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:acb97a898e200c1aaea6081545f2fcb39"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6da323c2eb9eeab293cdfd99ceb134b5"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a6da323c2eb9eeab293cdfd99ceb134b5">libnet_autobuild_ethernet</a> (const uint8_t *dst, uint16_t type, libnet_t *l)</td></tr>
+<tr class="separator:a6da323c2eb9eeab293cdfd99ceb134b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab8c2a7a3572bcfef2705ab05c8ef12bc"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#ab8c2a7a3572bcfef2705ab05c8ef12bc">libnet_build_fddi</a> (uint8_t fc, const uint8_t *dst, const uint8_t *src, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t *oui, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:ab8c2a7a3572bcfef2705ab05c8ef12bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a367d0539e0c7484ac4e0092ced22ca8e"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a367d0539e0c7484ac4e0092ced22ca8e">libnet_autobuild_fddi</a> (uint8_t fc, const uint8_t *dst, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t *oui, uint16_t type, libnet_t *l)</td></tr>
+<tr class="separator:a367d0539e0c7484ac4e0092ced22ca8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab606fadc44daa426fa4ba8b43bee5ece"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#ab606fadc44daa426fa4ba8b43bee5ece">libnet_build_arp</a> (uint16_t hrd, uint16_t pro, uint8_t hln, uint8_t pln, uint16_t op, const uint8_t *sha, const uint8_t *spa, const uint8_t *tha, const uint8_t *tpa, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:ab606fadc44daa426fa4ba8b43bee5ece"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa1bb2efa1cec14b12f1ce6210f20b358"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#aa1bb2efa1cec14b12f1ce6210f20b358">libnet_autobuild_arp</a> (uint16_t op, const uint8_t *sha, const uint8_t *spa, const uint8_t *tha, uint8_t *tpa, libnet_t *l)</td></tr>
+<tr class="separator:aa1bb2efa1cec14b12f1ce6210f20b358"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad096d303ddcddbd63ea269453bd26a20"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#ad096d303ddcddbd63ea269453bd26a20">libnet_build_tcp</a> (uint16_t sp, uint16_t dp, uint32_t seq, uint32_t ack, uint8_t control, uint16_t win, uint16_t sum, uint16_t urg, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:ad096d303ddcddbd63ea269453bd26a20"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aec6344132528e6903837b0d8909ad08c"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#aec6344132528e6903837b0d8909ad08c">libnet_build_tcp_options</a> (const uint8_t *options, uint32_t options_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:aec6344132528e6903837b0d8909ad08c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0ae166a293c0495431246fe0d0ba66f6"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a0ae166a293c0495431246fe0d0ba66f6">libnet_build_udp</a> (uint16_t sp, uint16_t dp, uint16_t len, uint16_t sum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a0ae166a293c0495431246fe0d0ba66f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aed8b33a329bda096ecac629e92e9bca5"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#aed8b33a329bda096ecac629e92e9bca5">libnet_build_cdp</a> (uint8_t version, uint8_t ttl, uint16_t sum, uint16_t type, uint16_t value_s, const uint8_t *value, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:aed8b33a329bda096ecac629e92e9bca5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4a4d3dc8f02e6fe6629e35e37ece0264"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a4a4d3dc8f02e6fe6629e35e37ece0264">libnet_build_icmpv4_echo</a> (uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a4a4d3dc8f02e6fe6629e35e37ece0264"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab403c63ae76d0bc59b6641e3c821550c"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#ab403c63ae76d0bc59b6641e3c821550c">libnet_build_icmpv4_mask</a> (uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint32_t mask, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:ab403c63ae76d0bc59b6641e3c821550c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a83197de705eb7929e8216f5771aa4b96"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a83197de705eb7929e8216f5771aa4b96">libnet_build_icmpv4_unreach</a> (uint8_t type, uint8_t code, uint16_t sum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a83197de705eb7929e8216f5771aa4b96"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6df9db28162c58a2cc356b3a87a16f6b"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a6df9db28162c58a2cc356b3a87a16f6b">libnet_build_icmpv4_redirect</a> (uint8_t type, uint8_t code, uint16_t sum, uint32_t gateway, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a6df9db28162c58a2cc356b3a87a16f6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4f2eb3f11fd921b0fd0948cf8ef37c91"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a4f2eb3f11fd921b0fd0948cf8ef37c91">libnet_build_icmpv4_timeexceed</a> (uint8_t type, uint8_t code, uint16_t sum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a4f2eb3f11fd921b0fd0948cf8ef37c91"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a926f33ff4ea64923b49f16f8c5f7286d"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a926f33ff4ea64923b49f16f8c5f7286d">libnet_build_icmpv4_timestamp</a> (uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint32_t otime, uint32_t rtime, uint32_t ttime, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a926f33ff4ea64923b49f16f8c5f7286d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a09a512c9f670528f7f1c9fe9775a0a61"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a09a512c9f670528f7f1c9fe9775a0a61">libnet_build_icmpv6_echo</a> (uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a09a512c9f670528f7f1c9fe9775a0a61"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a86ee5967b07a4fe49af301add8656450"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a86ee5967b07a4fe49af301add8656450">libnet_build_icmpv6_unreach</a> (uint8_t type, uint8_t code, uint16_t sum, uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a86ee5967b07a4fe49af301add8656450"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa184e1e69a7fc7161d484dcdca4f74db"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#aa184e1e69a7fc7161d484dcdca4f74db">libnet_build_icmpv6_ndp_nsol</a> (uint8_t type, uint8_t code, uint16_t sum, struct libnet_in6_addr target, uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:aa184e1e69a7fc7161d484dcdca4f74db"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0d2d7119072c0b98f1248172a2b7885d"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a0d2d7119072c0b98f1248172a2b7885d">libnet_build_icmpv6_ndp_nadv</a> (uint8_t type, uint8_t code, uint16_t sum, uint32_t flags, struct libnet_in6_addr target, uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a0d2d7119072c0b98f1248172a2b7885d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aecee0675d61d3ff71d79c64c74a7c924"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#aecee0675d61d3ff71d79c64c74a7c924">libnet_build_icmpv6_ndp_opt</a> (uint8_t type, uint8_t *option, uint32_t option_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:aecee0675d61d3ff71d79c64c74a7c924"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:afbeeb2c1c377c59aa2747dff4db4d5e8"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#afbeeb2c1c377c59aa2747dff4db4d5e8">libnet_build_igmp</a> (uint8_t type, uint8_t reserved, uint16_t sum, uint32_t ip, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:afbeeb2c1c377c59aa2747dff4db4d5e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2d9839736df3b1c46acdcc67e291c03e"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a2d9839736df3b1c46acdcc67e291c03e">libnet_build_ipv4</a> (uint16_t ip_len, uint8_t tos, uint16_t id, uint16_t frag, uint8_t ttl, uint8_t prot, uint16_t sum, uint32_t src, uint32_t dst, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a2d9839736df3b1c46acdcc67e291c03e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa209cafad74cd8f259aa97732e06d07c"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#aa209cafad74cd8f259aa97732e06d07c">libnet_build_ipv4_options</a> (const uint8_t *options, uint32_t options_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:aa209cafad74cd8f259aa97732e06d07c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6894d563677d9f229feedf52c759ac0a"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a6894d563677d9f229feedf52c759ac0a">libnet_autobuild_ipv4</a> (uint16_t len, uint8_t prot, uint32_t dst, libnet_t *l)</td></tr>
+<tr class="separator:a6894d563677d9f229feedf52c759ac0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a50fc0e6ad5c2b1fd705f349eff382dfd"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a50fc0e6ad5c2b1fd705f349eff382dfd">libnet_build_ipv6</a> (uint8_t tc, uint32_t fl, uint16_t len, uint8_t nh, uint8_t hl, struct libnet_in6_addr src, struct libnet_in6_addr dst, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a50fc0e6ad5c2b1fd705f349eff382dfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a9eeb211b6b8579fe9725da6d32d2732d"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a9eeb211b6b8579fe9725da6d32d2732d">libnet_build_ipv6_frag</a> (uint8_t nh, uint8_t reserved, uint16_t frag, uint32_t id, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a9eeb211b6b8579fe9725da6d32d2732d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a7fb612955dd3a787f13ab0c85b360023"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a7fb612955dd3a787f13ab0c85b360023">libnet_build_ipv6_routing</a> (uint8_t nh, uint8_t len, uint8_t rtype, uint8_t segments, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a7fb612955dd3a787f13ab0c85b360023"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1b6e9597bf110de597a673a4c6ed6ebc"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a1b6e9597bf110de597a673a4c6ed6ebc">libnet_build_ipv6_destopts</a> (uint8_t nh, uint8_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a1b6e9597bf110de597a673a4c6ed6ebc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1a8b5292e4e714c0f299f0577c86cb00"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a1a8b5292e4e714c0f299f0577c86cb00">libnet_build_ipv6_hbhopts</a> (uint8_t nh, uint8_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a1a8b5292e4e714c0f299f0577c86cb00"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a606209e22d203a859a380e1d37f9688c"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a606209e22d203a859a380e1d37f9688c">libnet_autobuild_ipv6</a> (uint16_t len, uint8_t nh, struct libnet_in6_addr dst, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a606209e22d203a859a380e1d37f9688c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:afdcc92fd59366c48693ad48c076c488e"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#afdcc92fd59366c48693ad48c076c488e">libnet_build_isl</a> (uint8_t *dhost, uint8_t type, uint8_t user, uint8_t *shost, uint16_t len, const uint8_t *snap, uint16_t vid, uint16_t portindex, uint16_t reserved, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:afdcc92fd59366c48693ad48c076c488e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad7d163363769594667524e7607535aec"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#ad7d163363769594667524e7607535aec">libnet_build_ipsec_esp_hdr</a> (uint32_t spi, uint32_t seq, uint32_t iv, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:ad7d163363769594667524e7607535aec"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0e7ba4cf571d4d85b1084e15059c7336"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a0e7ba4cf571d4d85b1084e15059c7336">libnet_build_ipsec_esp_ftr</a> (uint8_t len, uint8_t nh, int8_t *auth, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a0e7ba4cf571d4d85b1084e15059c7336"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a22d1d874a5d12b8d3528f637990ceb21"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a22d1d874a5d12b8d3528f637990ceb21">libnet_build_ipsec_ah</a> (uint8_t nh, uint8_t len, uint16_t res, uint32_t spi, uint32_t seq, uint32_t auth, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a22d1d874a5d12b8d3528f637990ceb21"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5829f525c067e1d99826865292542d8a"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a5829f525c067e1d99826865292542d8a">libnet_build_dnsv4</a> (uint16_t h_len, uint16_t id, uint16_t flags, uint16_t num_q, uint16_t num_anws_rr, uint16_t num_auth_rr, uint16_t num_addi_rr, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a5829f525c067e1d99826865292542d8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a154c83b71614c8cf3635f7c80cf7e9a6"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a154c83b71614c8cf3635f7c80cf7e9a6">libnet_build_rip</a> (uint8_t cmd, uint8_t version, uint16_t rd, uint16_t af, uint16_t rt, uint32_t addr, uint32_t mask, uint32_t next_hop, uint32_t metric, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a154c83b71614c8cf3635f7c80cf7e9a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4a657cd81f10ba6dbdcbd6a6a81f72d2"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a4a657cd81f10ba6dbdcbd6a6a81f72d2">libnet_build_rpc_call</a> (uint32_t rm, uint32_t xid, uint32_t prog_num, uint32_t prog_vers, uint32_t procedure, uint32_t cflavor, uint32_t clength, uint8_t *cdata, uint32_t vflavor, uint32_t vlength, const uint8_t *vdata, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a4a657cd81f10ba6dbdcbd6a6a81f72d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad6310dd6dff16dc711663f70256d2148"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#ad6310dd6dff16dc711663f70256d2148">libnet_build_stp_conf</a> (uint16_t id, uint8_t version, uint8_t bpdu_type, uint8_t flags, const uint8_t *root_id, uint32_t root_pc, const uint8_t *bridge_id, uint16_t port_id, uint16_t message_age, uint16_t max_age, uint16_t hello_time, uint16_t f_delay, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:ad6310dd6dff16dc711663f70256d2148"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a913fc0cf8782d915edc20f4f6abf847f"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a913fc0cf8782d915edc20f4f6abf847f">libnet_build_stp_tcn</a> (uint16_t id, uint8_t version, uint8_t bpdu_type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a913fc0cf8782d915edc20f4f6abf847f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4d77b901ebcc18b8c0ee2345e4ea6177"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a4d77b901ebcc18b8c0ee2345e4ea6177">libnet_build_token_ring</a> (uint8_t ac, uint8_t fc, const uint8_t *dst, const uint8_t *src, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t *oui, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a4d77b901ebcc18b8c0ee2345e4ea6177"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac4e70a6d0e895d722e407c6d5fae1466"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#ac4e70a6d0e895d722e407c6d5fae1466">libnet_autobuild_token_ring</a> (uint8_t ac, uint8_t fc, const uint8_t *dst, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t *oui, uint16_t type, libnet_t *l)</td></tr>
+<tr class="separator:ac4e70a6d0e895d722e407c6d5fae1466"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5a6538c0cf4dd6c2f59b1657d56796b3"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a5a6538c0cf4dd6c2f59b1657d56796b3">libnet_build_vrrp</a> (uint8_t version, uint8_t type, uint8_t vrouter_id, uint8_t priority, uint8_t ip_count, uint8_t auth_type, uint8_t advert_int, uint16_t sum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a5a6538c0cf4dd6c2f59b1657d56796b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a520053e593215a240f7207c2b28075cb"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a520053e593215a240f7207c2b28075cb">libnet_build_mpls</a> (uint32_t label, uint8_t experimental, uint8_t bos, uint8_t ttl, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a520053e593215a240f7207c2b28075cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af305c48631b600e472f60b951b9ebf75"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#af305c48631b600e472f60b951b9ebf75">libnet_build_ntp</a> (uint8_t leap_indicator, uint8_t version, uint8_t mode, uint8_t stratum, uint8_t poll, uint8_t precision, uint16_t delay_int, uint16_t delay_frac, uint16_t dispersion_int, uint16_t dispersion_frac, uint32_t reference_id, uint32_t ref_ts_int, uint32_t ref_ts_frac, uint32_t orig_ts_int, uint32_t orig_ts_frac, uint32_t rec_ts_int, uint32_t rec_ts_frac, uint32_t xmt_ts_int, uint32_t xmt_ts_frac, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:af305c48631b600e472f60b951b9ebf75"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a429bf355c69895a5ad7ca900d734bf48"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a429bf355c69895a5ad7ca900d734bf48">libnet_build_ospfv2</a> (uint16_t len, uint8_t type, uint32_t rtr_id, uint32_t area_id, uint16_t sum, uint16_t autype, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a429bf355c69895a5ad7ca900d734bf48"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a224a55d5758cd6685fdd374597f133c4"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a224a55d5758cd6685fdd374597f133c4">libnet_build_ospfv2_hello</a> (uint32_t netmask, uint16_t interval, uint8_t opts, uint8_t priority, uint32_t dead_int, uint32_t des_rtr, uint32_t bkup_rtr, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a224a55d5758cd6685fdd374597f133c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a9f859449de2c7e2f1b2d18051a315634"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a9f859449de2c7e2f1b2d18051a315634">libnet_build_ospfv2_dbd</a> (uint16_t dgram_len, uint8_t opts, uint8_t type, uint32_t seqnum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a9f859449de2c7e2f1b2d18051a315634"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a17d51de46576464ff606e15250c7fe3a"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a17d51de46576464ff606e15250c7fe3a">libnet_build_ospfv2_lsr</a> (uint32_t type, uint32_t lsid, uint32_t advrtr, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a17d51de46576464ff606e15250c7fe3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5ffe185b91c48fad0dc84f81b7d26697"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a5ffe185b91c48fad0dc84f81b7d26697">libnet_build_ospfv2_lsu</a> (uint32_t num, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a5ffe185b91c48fad0dc84f81b7d26697"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a798142aed2aee944fdc80ce14faf31f6"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a798142aed2aee944fdc80ce14faf31f6">libnet_build_ospfv2_lsa</a> (uint16_t age, uint8_t opts, uint8_t type, uint32_t lsid, uint32_t advrtr, uint32_t seqnum, uint16_t sum, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a798142aed2aee944fdc80ce14faf31f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a67209523b736cc9f70743d3dfbce1129"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a67209523b736cc9f70743d3dfbce1129">libnet_build_ospfv2_lsa_rtr</a> (uint16_t flags, uint16_t num, uint32_t id, uint32_t data, uint8_t type, uint8_t tos, uint16_t metric, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a67209523b736cc9f70743d3dfbce1129"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a234cf0a788a5944ff70c879c96467bc4"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a234cf0a788a5944ff70c879c96467bc4">libnet_build_ospfv2_lsa_net</a> (uint32_t nmask, uint32_t rtrid, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a234cf0a788a5944ff70c879c96467bc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae9c55870fecbd742edc25f06b73ad5a2"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#ae9c55870fecbd742edc25f06b73ad5a2">libnet_build_ospfv2_lsa_sum</a> (uint32_t nmask, uint32_t metric, uint32_t tos, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:ae9c55870fecbd742edc25f06b73ad5a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a9002c457692ce2557197dc68c9932849"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a9002c457692ce2557197dc68c9932849">libnet_build_ospfv2_lsa_as</a> (uint32_t nmask, uint32_t metric, uint32_t fwdaddr, uint32_t tag, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a9002c457692ce2557197dc68c9932849"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa4c6c975b3c87d3d17224302e4319eec"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#aa4c6c975b3c87d3d17224302e4319eec">libnet_build_data</a> (const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:aa4c6c975b3c87d3d17224302e4319eec"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3333c5e5cde290dda9b80adc13a00466"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a3333c5e5cde290dda9b80adc13a00466">libnet_build_dhcpv4</a> (uint8_t opcode, uint8_t htype, uint8_t hlen, uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags, uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip, const uint8_t *chaddr, const char *sname, const char *file, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a3333c5e5cde290dda9b80adc13a00466"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a564c31892fb8cc2bf44244cdb26d693e"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a564c31892fb8cc2bf44244cdb26d693e">libnet_build_bootpv4</a> (uint8_t opcode, uint8_t htype, uint8_t hlen, uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags, uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip, const uint8_t *chaddr, const char *sname, const char *file, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a564c31892fb8cc2bf44244cdb26d693e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6173dfa2aaf953c8a36ebf347a567100"><td class="memItemLeft" align="right" valign="top">LIBNET_API uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a6173dfa2aaf953c8a36ebf347a567100">libnet_getgre_length</a> (uint16_t fv)</td></tr>
+<tr class="separator:a6173dfa2aaf953c8a36ebf347a567100"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a41e095c98e623f00618f6d306cb31289"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a41e095c98e623f00618f6d306cb31289">libnet_build_gre</a> (uint16_t fv, uint16_t type, uint16_t sum, uint16_t offset, uint32_t key, uint32_t seq, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a41e095c98e623f00618f6d306cb31289"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0092b3f0285f4c96915eef9579655036"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a0092b3f0285f4c96915eef9579655036">libnet_build_egre</a> (uint16_t fv, uint16_t type, uint16_t sum, uint16_t offset, uint32_t key, uint32_t seq, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a0092b3f0285f4c96915eef9579655036"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae0c59a8f8d014cc1955d88139c2096c0"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#ae0c59a8f8d014cc1955d88139c2096c0">libnet_build_gre_sre</a> (uint16_t af, uint8_t offset, uint8_t length, uint8_t *routing, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:ae0c59a8f8d014cc1955d88139c2096c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae514f81f6d68bc1b2442762a6f87804a"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#ae514f81f6d68bc1b2442762a6f87804a">libnet_build_gre_last_sre</a> (libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:ae514f81f6d68bc1b2442762a6f87804a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3f9827171fbe5dbc4b02c7d9876a2393"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a3f9827171fbe5dbc4b02c7d9876a2393">libnet_build_bgp4_header</a> (uint8_t marker[LIBNET_BGP4_MARKER_SIZE], uint16_t len, uint8_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a3f9827171fbe5dbc4b02c7d9876a2393"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4a7df60e7798fddfff25f163ef63e2af"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a4a7df60e7798fddfff25f163ef63e2af">libnet_build_bgp4_open</a> (uint8_t version, uint16_t src_as, uint16_t hold_time, uint32_t bgp_id, uint8_t opt_len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a4a7df60e7798fddfff25f163ef63e2af"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a88f572ee97c9223d4b24f55d868ce419"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a88f572ee97c9223d4b24f55d868ce419">libnet_build_bgp4_update</a> (uint16_t unfeasible_rt_len, const uint8_t *withdrawn_rt, uint16_t total_path_attr_len, const uint8_t *path_attributes, uint16_t info_len, uint8_t *reachability_info, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a88f572ee97c9223d4b24f55d868ce419"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:afe0007cf544b1d6773b6046c5c5ad372"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#afe0007cf544b1d6773b6046c5c5ad372">libnet_build_bgp4_notification</a> (uint8_t err_code, uint8_t err_subcode, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:afe0007cf544b1d6773b6046c5c5ad372"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0d4ce5211113c5d5818d557ce3fc0234"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a0d4ce5211113c5d5818d557ce3fc0234">libnet_build_sebek</a> (uint32_t magic, uint16_t version, uint16_t type, uint32_t counter, uint32_t time_sec, uint32_t time_usec, uint32_t pid, uint32_t uid, uint32_t fd, uint8_t cmd[SEBEK_CMD_LENGTH], uint32_t length, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a0d4ce5211113c5d5818d557ce3fc0234"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:abe75e9be71910c580eff1d6925224778"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#abe75e9be71910c580eff1d6925224778">libnet_build_hsrp</a> (uint8_t version, uint8_t opcode, uint8_t state, uint8_t hello_time, uint8_t hold_time, uint8_t priority, uint8_t group, uint8_t reserved, uint8_t authdata[HSRP_AUTHDATA_LENGTH], uint32_t virtual_ip, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:abe75e9be71910c580eff1d6925224778"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a9ec77e2ffcb9540d9f4eee2b0ff57af2"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a9ec77e2ffcb9540d9f4eee2b0ff57af2">libnet_build_link</a> (const uint8_t *dst, const uint8_t *src, const uint8_t *oui, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</td></tr>
+<tr class="separator:a9ec77e2ffcb9540d9f4eee2b0ff57af2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8a881ba6d300b16e5cadd9e3f6ef7bc8"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_ptag_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a8a881ba6d300b16e5cadd9e3f6ef7bc8">libnet_autobuild_link</a> (const uint8_t *dst, const uint8_t *oui, uint16_t type, libnet_t *l)</td></tr>
+<tr class="separator:a8a881ba6d300b16e5cadd9e3f6ef7bc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3ec16c8aa5c7ae59ff63ce4a9329ab90"><td class="memItemLeft" align="right" valign="top">LIBNET_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a3ec16c8aa5c7ae59ff63ce4a9329ab90">libnet_write</a> (libnet_t *l)</td></tr>
+<tr class="separator:a3ec16c8aa5c7ae59ff63ce4a9329ab90"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0adcfdd368764d4c4ab610daefe56b3d"><td class="memItemLeft" align="right" valign="top">LIBNET_API uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a0adcfdd368764d4c4ab610daefe56b3d">libnet_get_ipaddr4</a> (libnet_t *l)</td></tr>
+<tr class="separator:a0adcfdd368764d4c4ab610daefe56b3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a7ca153d8efe6650769765fbc23e2b312"><td class="memItemLeft" align="right" valign="top">LIBNET_API struct libnet_in6_addr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a7ca153d8efe6650769765fbc23e2b312">libnet_get_ipaddr6</a> (libnet_t *l)</td></tr>
+<tr class="separator:a7ca153d8efe6650769765fbc23e2b312"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:acf6dc1ece9e994d4f4d3e47e5b218f6c"><td class="memItemLeft" align="right" valign="top">LIBNET_API struct libnet_ether_addr *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#acf6dc1ece9e994d4f4d3e47e5b218f6c">libnet_get_hwaddr</a> (libnet_t *l)</td></tr>
+<tr class="separator:acf6dc1ece9e994d4f4d3e47e5b218f6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a62a7ac78ee69568e17927674786c1b69"><td class="memItemLeft" align="right" valign="top">LIBNET_API uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a62a7ac78ee69568e17927674786c1b69">libnet_hex_aton</a> (const char *s, int *len)</td></tr>
+<tr class="separator:a62a7ac78ee69568e17927674786c1b69"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac4a33a98186ad71f7ae4c559b039af0f"><td class="memItemLeft" align="right" valign="top">LIBNET_API const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#ac4a33a98186ad71f7ae4c559b039af0f">libnet_version</a> (void)</td></tr>
+<tr class="separator:ac4a33a98186ad71f7ae4c559b039af0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a9f91e176ba3b1f93ec049f82c08b54be"><td class="memItemLeft" align="right" valign="top">LIBNET_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a9f91e176ba3b1f93ec049f82c08b54be">libnet_adv_cull_packet</a> (libnet_t *l, uint8_t **packet, uint32_t *packet_s)</td></tr>
+<tr class="separator:a9f91e176ba3b1f93ec049f82c08b54be"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aac02edd8930cb604dc65f72f7ffd8892"><td class="memItemLeft" align="right" valign="top">LIBNET_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#aac02edd8930cb604dc65f72f7ffd8892">libnet_adv_cull_header</a> (libnet_t *l, libnet_ptag_t ptag, uint8_t **header, uint32_t *header_s)</td></tr>
+<tr class="separator:aac02edd8930cb604dc65f72f7ffd8892"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad00e9f92da1faea6c8ce400d6e7cd45e"><td class="memItemLeft" align="right" valign="top">LIBNET_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#ad00e9f92da1faea6c8ce400d6e7cd45e">libnet_adv_write_link</a> (libnet_t *l, const uint8_t *packet, uint32_t packet_s)</td></tr>
+<tr class="separator:ad00e9f92da1faea6c8ce400d6e7cd45e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3524aaf97da73461cabd4797e89c4da4"><td class="memItemLeft" align="right" valign="top">LIBNET_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a3524aaf97da73461cabd4797e89c4da4">libnet_adv_write_raw_ipv4</a> (libnet_t *l, const uint8_t *packet, uint32_t packet_s)</td></tr>
+<tr class="separator:a3524aaf97da73461cabd4797e89c4da4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a92c45b67cbf9a16f8e6edd9a067c3f6d"><td class="memItemLeft" align="right" valign="top">LIBNET_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a92c45b67cbf9a16f8e6edd9a067c3f6d">libnet_adv_free_packet</a> (libnet_t *l, uint8_t *packet)</td></tr>
+<tr class="separator:a92c45b67cbf9a16f8e6edd9a067c3f6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a20887ffe940f1d2c5bcae79a188176c6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a20887ffe940f1d2c5bcae79a188176c6">libnet_cq_add</a> (libnet_t *l, char *label)</td></tr>
+<tr class="separator:a20887ffe940f1d2c5bcae79a188176c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a93d5ccdcdba31daacde82fc50f467412"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a93d5ccdcdba31daacde82fc50f467412">libnet_cq_remove</a> (libnet_t *l)</td></tr>
+<tr class="separator:a93d5ccdcdba31daacde82fc50f467412"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a90a6ea3b24de3906ca1cf9c78a7b5a5f"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a90a6ea3b24de3906ca1cf9c78a7b5a5f">libnet_cq_remove_by_label</a> (char *label)</td></tr>
+<tr class="separator:a90a6ea3b24de3906ca1cf9c78a7b5a5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a337f556ed05df13c1de19acbd4d7f50a"><td class="memItemLeft" align="right" valign="top">LIBNET_API const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a337f556ed05df13c1de19acbd4d7f50a">libnet_cq_getlabel</a> (libnet_t *l)</td></tr>
+<tr class="separator:a337f556ed05df13c1de19acbd4d7f50a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1775288c17694d4d606327ad066f970d"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a1775288c17694d4d606327ad066f970d">libnet_cq_find_by_label</a> (char *label)</td></tr>
+<tr class="separator:a1775288c17694d4d606327ad066f970d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1577413fdaf10706d5016b64f7f7924b"><td class="memItemLeft" align="right" valign="top">LIBNET_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a1577413fdaf10706d5016b64f7f7924b">libnet_cq_destroy</a> (void)</td></tr>
+<tr class="separator:a1577413fdaf10706d5016b64f7f7924b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8233338e5050d8fc46c6d1f35ef32b5e"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a8233338e5050d8fc46c6d1f35ef32b5e">libnet_cq_head</a> (void)</td></tr>
+<tr class="separator:a8233338e5050d8fc46c6d1f35ef32b5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a7edc80233d439b7755fdc127cfd7f88d"><td class="memItemLeft" align="right" valign="top">LIBNET_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a7edc80233d439b7755fdc127cfd7f88d">libnet_cq_last</a> (void)</td></tr>
+<tr class="separator:a7edc80233d439b7755fdc127cfd7f88d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af21a48ca025b23dfcd5d10e9d1b924ba"><td class="memItemLeft" align="right" valign="top">LIBNET_API libnet_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#af21a48ca025b23dfcd5d10e9d1b924ba">libnet_cq_next</a> (void)</td></tr>
+<tr class="separator:af21a48ca025b23dfcd5d10e9d1b924ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae071e441671c342ea2d3bbca979e2769"><td class="memItemLeft" align="right" valign="top">LIBNET_API uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#ae071e441671c342ea2d3bbca979e2769">libnet_cq_size</a> (void)</td></tr>
+<tr class="separator:ae071e441671c342ea2d3bbca979e2769"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a65145cbd0be6d1609bf07b52d6c57695"><td class="memItemLeft" align="right" valign="top">LIBNET_API uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a65145cbd0be6d1609bf07b52d6c57695">libnet_cq_end_loop</a> (void)</td></tr>
+<tr class="separator:a65145cbd0be6d1609bf07b52d6c57695"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1c70d00eefe61b2f5902ab56c802e07c"><td class="memItemLeft" align="right" valign="top">LIBNET_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a1c70d00eefe61b2f5902ab56c802e07c">libnet_diag_dump_context</a> (libnet_t *l)</td></tr>
+<tr class="separator:a1c70d00eefe61b2f5902ab56c802e07c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a49e6023168b4f660ed8ff67dcc8ee228"><td class="memItemLeft" align="right" valign="top">LIBNET_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a49e6023168b4f660ed8ff67dcc8ee228">libnet_diag_dump_pblock</a> (libnet_t *l)</td></tr>
+<tr class="separator:a49e6023168b4f660ed8ff67dcc8ee228"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a59cc8a10dd7a94f01238f96417b08420"><td class="memItemLeft" align="right" valign="top">LIBNET_API char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#a59cc8a10dd7a94f01238f96417b08420">libnet_diag_dump_pblock_type</a> (uint8_t type)</td></tr>
+<tr class="separator:a59cc8a10dd7a94f01238f96417b08420"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:adb2f7d417f05a058c0c2c7f76b6f66e6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-functions_8h.html#adb2f7d417f05a058c0c2c7f76b6f66e6">libnet_diag_dump_hex</a> (const uint8_t *packet, uint32_t len, int swap, FILE *stream)</td></tr>
+<tr class="separator:adb2f7d417f05a058c0c2c7f76b6f66e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>libnet exported function prototypes </p>
+</div><h2 class="groupheader">Function Documentation</h2>
+<a id="added478f7cb16e00cf34f44816e33083"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#added478f7cb16e00cf34f44816e33083">&#9670;&nbsp;</a></span>libnet_addr2name4()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API char* libnet_addr2name4 </td>
+ <td>(</td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>in</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>use_name</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Takes a network byte ordered IPv4 address and returns a pointer to either a canonical DNS name (if it has one) or a string of dotted decimals. This may incur a DNS lookup if the hostname and mode is set to LIBNET_RESOLVE. If mode is set to LIBNET_DONT_RESOLVE, no DNS lookup will be performed and the function will return a pointer to a dotted decimal string. The function cannot fail &ndash; if no canonical name exists, it will fall back on returning a dotted decimal string. This function is non-reentrant. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">in</td><td>network byte ordered IPv4 address </td></tr>
+ <tr><td class="paramname">use_name</td><td>LIBNET_RESOLVE or LIBNET_DONT_RESOLVE </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>a pointer to presentation format string </dd></dl>
+
+</div>
+</div>
+<a id="a50fcb283db9884651c59d79ebd825bc4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a50fcb283db9884651c59d79ebd825bc4">&#9670;&nbsp;</a></span>libnet_addr2name6_r()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API void libnet_addr2name6_r </td>
+ <td>(</td>
+ <td class="paramtype">struct libnet_in6_addr&#160;</td>
+ <td class="paramname"><em>addr</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>use_name</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">char *&#160;</td>
+ <td class="paramname"><em>host_name</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&#160;</td>
+ <td class="paramname"><em>host_name_len</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Should document this baby right here. </p>
+
+</div>
+</div>
+<a id="aac02edd8930cb604dc65f72f7ffd8892"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aac02edd8930cb604dc65f72f7ffd8892">&#9670;&nbsp;</a></span>libnet_adv_cull_header()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API int libnet_adv_cull_header </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t **&#160;</td>
+ <td class="paramname"><em>header</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t *&#160;</td>
+ <td class="paramname"><em>header_s</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>[Advanced Interface] Pulls the header from the specified ptag from the given libnet context. This function is part of the advanced interface and is only available when libnet is initialized in advanced mode. If the function fails <a class="el" href="libnet-functions_8h.html#a7932677fa8ddd7f512c7b154d91263e9">libnet_geterror()</a> can tell you why. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>the ptag referencing the header to pull </td></tr>
+ <tr><td class="paramname">header</td><td>will contain the header </td></tr>
+ <tr><td class="paramname">header_s</td><td>will contain the header size </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">1</td><td>on success </td></tr>
+ <tr><td class="paramname">-1</td><td>on failure </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a9f91e176ba3b1f93ec049f82c08b54be"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a9f91e176ba3b1f93ec049f82c08b54be">&#9670;&nbsp;</a></span>libnet_adv_cull_packet()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API int libnet_adv_cull_packet </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t **&#160;</td>
+ <td class="paramname"><em>packet</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t *&#160;</td>
+ <td class="paramname"><em>packet_s</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>[Advanced Interface] Yanks a prebuilt, wire-ready packet from the given libnet context. If libnet was configured to do so (which it is by default) the packet will have all checksums written in. This function is part of the advanced interface and is only available when libnet is initialized in advanced mode. It is important to note that the function performs an implicit malloc() and a corresponding call to <a class="el" href="libnet-functions_8h.html#a92c45b67cbf9a16f8e6edd9a067c3f6d">libnet_adv_free_packet()</a> should be made to free the memory packet occupies. If the function fails <a class="el" href="libnet-functions_8h.html#a7932677fa8ddd7f512c7b154d91263e9">libnet_geterror()</a> can tell you why. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">packet</td><td>will contain the wire-ready packet </td></tr>
+ <tr><td class="paramname">packet_s</td><td>will contain the packet size </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">1</td><td>on success </td></tr>
+ <tr><td class="paramname">-1</td><td>on failure </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a92c45b67cbf9a16f8e6edd9a067c3f6d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a92c45b67cbf9a16f8e6edd9a067c3f6d">&#9670;&nbsp;</a></span>libnet_adv_free_packet()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API void libnet_adv_free_packet </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>packet</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>[Advanced Interface] Frees the memory allocated when <a class="el" href="libnet-functions_8h.html#a9f91e176ba3b1f93ec049f82c08b54be">libnet_adv_cull_packet()</a> is called. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">packet</td><td>a pointer to the packet to free </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="ad00e9f92da1faea6c8ce400d6e7cd45e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad00e9f92da1faea6c8ce400d6e7cd45e">&#9670;&nbsp;</a></span>libnet_adv_write_link()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API int libnet_adv_write_link </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>packet</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>packet_s</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>[Advanced Interface] Writes a packet the network at the link layer. This function is useful to write a packet that has been constructed by hand by the application programmer or, more commonly, to write a packet that has been returned by a call to <a class="el" href="libnet-functions_8h.html#a9f91e176ba3b1f93ec049f82c08b54be">libnet_adv_cull_packet()</a>. This function is part of the advanced interface and is only available when libnet is initialized in advanced mode. If the function fails <a class="el" href="libnet-functions_8h.html#a7932677fa8ddd7f512c7b154d91263e9">libnet_geterror()</a> can tell you why. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">packet</td><td>a pointer to the packet to inject </td></tr>
+ <tr><td class="paramname">packet_s</td><td>the size of the packet </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>the number of bytes written </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on failure </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a3524aaf97da73461cabd4797e89c4da4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3524aaf97da73461cabd4797e89c4da4">&#9670;&nbsp;</a></span>libnet_adv_write_raw_ipv4()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API int libnet_adv_write_raw_ipv4 </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>packet</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>packet_s</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>[Advanced Interface] Writes a packet the network at the raw socket layer. This function is useful to write a packet that has been constructed by hand by the application programmer or, more commonly, to write a packet that has been returned by a call to <a class="el" href="libnet-functions_8h.html#a9f91e176ba3b1f93ec049f82c08b54be">libnet_adv_cull_packet()</a>. This function is part of the advanced interface and is only available when libnet is initialized in advanced mode. If the function fails <a class="el" href="libnet-functions_8h.html#a7932677fa8ddd7f512c7b154d91263e9">libnet_geterror()</a> can tell you why. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">packet</td><td>a pointer to the packet to inject </td></tr>
+ <tr><td class="paramname">packet_s</td><td>the size of the packet </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>the number of bytes written </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on failure </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="aa1bb2efa1cec14b12f1ce6210f20b358"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa1bb2efa1cec14b12f1ce6210f20b358">&#9670;&nbsp;</a></span>libnet_autobuild_arp()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_autobuild_arp </td>
+ <td>(</td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>op</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>sha</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>spa</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>tha</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>tpa</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Autouilds an Address Resolution Protocol (ARP) header. Depending on the op value, the function builds one of several different types of RFC 826 or RFC 903 RARP packets. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">op</td><td>ARP operation type </td></tr>
+ <tr><td class="paramname">sha</td><td>sender's hardware address </td></tr>
+ <tr><td class="paramname">spa</td><td>sender's protocol address </td></tr>
+ <tr><td class="paramname">tha</td><td>target hardware address </td></tr>
+ <tr><td class="paramname">tpa</td><td>targer protocol address </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a6da323c2eb9eeab293cdfd99ceb134b5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6da323c2eb9eeab293cdfd99ceb134b5">&#9670;&nbsp;</a></span>libnet_autobuild_ethernet()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_autobuild_ethernet </td>
+ <td>(</td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>dst</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Autobuilds an Ethernet header. The RFC 894 Ethernet II header is almost identical to the IEEE 802.3 header, with the exception that the field immediately following the source address holds the layer 3 protocol (as opposed to frame's length). You should only use this function when libnet is initialized with the LIBNET_LINK interface. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">dst</td><td>destination ethernet address </td></tr>
+ <tr><td class="paramname">type</td><td>upper layer protocol type </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a367d0539e0c7484ac4e0092ced22ca8e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a367d0539e0c7484ac4e0092ced22ca8e">&#9670;&nbsp;</a></span>libnet_autobuild_fddi()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_autobuild_fddi </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>fc</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>dst</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>dsap</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>ssap</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>cf</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>oui</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Autobuilds a Fiber Distributed Data Interface (FDDI) header. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">fc</td><td>class format and priority </td></tr>
+ <tr><td class="paramname">dst</td><td>destination fddi address </td></tr>
+ <tr><td class="paramname">dsap</td><td>destination service access point </td></tr>
+ <tr><td class="paramname">ssap</td><td>source service access point </td></tr>
+ <tr><td class="paramname">cf</td><td>cf </td></tr>
+ <tr><td class="paramname">oui</td><td>IEEE organizational code </td></tr>
+ <tr><td class="paramname">type</td><td>upper layer protocol </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a6894d563677d9f229feedf52c759ac0a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6894d563677d9f229feedf52c759ac0a">&#9670;&nbsp;</a></span>libnet_autobuild_ipv4()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_autobuild_ipv4 </td>
+ <td>(</td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>prot</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>dst</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Autobuilds a version 4 Internet Protocol (IP) header. The function is useful to build an IP header quickly when you do not need a granular level of control. The function takes the same len, prot, and dst arguments as <a class="el" href="libnet-functions_8h.html#a2d9839736df3b1c46acdcc67e291c03e">libnet_build_ipv4()</a>. The function does not accept a ptag argument, but it does return a ptag. In other words, you can use it to build a new IP header but not to modify an existing one. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">len</td><td>total length of the IP packet including all subsequent data </td></tr>
+ <tr><td class="paramname">prot</td><td>upper layer protocol </td></tr>
+ <tr><td class="paramname">dst</td><td>destination IPv4 address (little endian) </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a606209e22d203a859a380e1d37f9688c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a606209e22d203a859a380e1d37f9688c">&#9670;&nbsp;</a></span>libnet_autobuild_ipv6()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_autobuild_ipv6 </td>
+ <td>(</td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>nh</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">struct libnet_in6_addr&#160;</td>
+ <td class="paramname"><em>dst</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Autobuilds a version 6 RFC 2460 Internet Protocol (IP) header. The function is useful to build an IP header quickly when you do not need a granular level of control. The function takes the same len, nh, and dst arguments as <a class="el" href="libnet-functions_8h.html#a2d9839736df3b1c46acdcc67e291c03e">libnet_build_ipv4()</a>. The function does not accept a ptag argument, but it does return a ptag. In other words, you can use it to build a new IP header but not to modify an existing one. This function requires <a class="el" href="libnet-functions_8h.html#a7ca153d8efe6650769765fbc23e2b312">libnet_get_ipaddr6()</a>, which is not yet implemented for Win32 platforms. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">len</td><td>length </td></tr>
+ <tr><td class="paramname">nh</td><td>next header </td></tr>
+ <tr><td class="paramname">dst</td><td>destination IPv6 address </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a8a881ba6d300b16e5cadd9e3f6ef7bc8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8a881ba6d300b16e5cadd9e3f6ef7bc8">&#9670;&nbsp;</a></span>libnet_autobuild_link()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_autobuild_link </td>
+ <td>(</td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>dst</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>oui</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Automatically builds a link layer header for an initialized l. The function determines the proper link layer header format from how l was initialized. The function current supports Ethernet and Token Ring link layers. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">dst</td><td>the destination MAC address </td></tr>
+ <tr><td class="paramname">oui</td><td>Organizationally Unique Identifier (unused for Ethernet) </td></tr>
+ <tr><td class="paramname">type</td><td>the upper layer protocol type </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="ac4e70a6d0e895d722e407c6d5fae1466"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac4e70a6d0e895d722e407c6d5fae1466">&#9670;&nbsp;</a></span>libnet_autobuild_token_ring()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_autobuild_token_ring </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>ac</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>fc</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>dst</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>dsap</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>ssap</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>cf</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>oui</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Auto-builds a token ring header. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">ac</td><td>access control </td></tr>
+ <tr><td class="paramname">fc</td><td>frame control </td></tr>
+ <tr><td class="paramname">dst</td><td>destination address </td></tr>
+ <tr><td class="paramname">dsap</td><td>destination service access point </td></tr>
+ <tr><td class="paramname">ssap</td><td>source service access point </td></tr>
+ <tr><td class="paramname">cf</td><td>control field </td></tr>
+ <tr><td class="paramname">oui</td><td>Organizationally Unique Identifier </td></tr>
+ <tr><td class="paramname">type</td><td>upper layer protocol type </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="acbab0d304c5e9d36438050ac6d233132"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#acbab0d304c5e9d36438050ac6d233132">&#9670;&nbsp;</a></span>libnet_build_802_1q()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_802_1q </td>
+ <td>(</td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>dst</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>src</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>tpi</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>priority</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>cfi</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>vlan_id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>len_proto</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<h1><a class="anchor" id="PBF"></a>
+Packet Builder Functions</h1>
+<p>The core of libnet is the platform-independent packet-building functionality. These functions enable an application programmer to build protocol headers (and data) in a simple and consistent manner without having to worry (too much) about low-level network odds and ends. Each libnet_build() function builds a piece of a packet (generally a protocol header). While it is perfectly possible to build an entire, ready-to-transmit packet with a single call to a libnet_build() function, generally more than one builder-class function call is required to construct a full packet. A complete wire-ready packet generally consists of more than one piece. Every function that builds a protocol header takes a series of arguments roughly corresponding to the header values as they appear on the wire. This process is intuitive but often makes for functions with huge prototypes and large stack frames. One important thing to note is that you must call these functions in order, corresponding to how they should appear on the wire (from the highest protocol layer on down). This building process is intuitive; it approximates what happens in an operating system kernel. In other words, to build a Network Time Protocol (NTP) packet by using the link-layer interface, the application programmer would call the libnet_build() functions in the following order:</p><ol type="1">
+<li><a class="el" href="libnet-functions_8h.html#af305c48631b600e472f60b951b9ebf75">libnet_build_ntp()</a></li>
+<li><a class="el" href="libnet-functions_8h.html#a0ae166a293c0495431246fe0d0ba66f6">libnet_build_udp()</a></li>
+<li><a class="el" href="libnet-functions_8h.html#a2d9839736df3b1c46acdcc67e291c03e">libnet_build_ipv4()</a></li>
+<li><a class="el" href="libnet-functions_8h.html#acb97a898e200c1aaea6081545f2fcb39">libnet_build_ethernet()</a> This ordering is essential for libnet 1.1.x to properly link together the packet internally (previous libnet versions did not have the requirement).</li>
+</ol>
+<h2><a class="anchor" id="TPI"></a>
+The Payload Interface</h2>
+<p>The payload interface specifies an optional way to include data directly after the protocol header in question. You can use this function for a variety of purposes, including the following:</p><ul>
+<li>Including additional or arbitrary protocol header information that is not available from a libnet interface</li>
+<li>Including a packet payload (data segment)</li>
+<li>Building another protocol header that is not available from a libnet interface To employ the interface, the application programmer should construct the i payload data and pass a const uint8_t * to this data and its size to the desired libnet_build() function. Libnet handles the rest.</li>
+</ul>
+<p>It is important to note that some functions (notably the IPv6 builders) do use the payload interface to specify variable length but ostensibly non-optional data. See the individual libnet_build_ipv6*() functions for more information.</p>
+<h2><a class="anchor" id="PT"></a>
+Protocol Tags and Packet Builder Return Values</h2>
+<p>Libnet uses the protocol tag (ptag) to identify individual pieces of a packet after being created. A new ptag results every time a libnet_build() function with an empty (0) ptag argument completes successfully. This new ptag now refers to the packet piece just created. The application programmer's responsibility is to save this value if he or she plans to modify this particular portion later on in the program. If the application programmer needs to modify some portion of that particular packet piece again, he or she calls the same libnet_build() function specifying the saved ptag argument. Libnet then searches for that packet piece and modifies it rather than creating a new one. Upon failure for any reason, libnet_build() functions return -1; <a class="el" href="libnet-functions_8h.html#a7932677fa8ddd7f512c7b154d91263e9">libnet_geterror()</a> tells you why. Builds an IEEE 802.1q VLAN tagging header. Depending on the value of len_proto, the function wraps the 802.1q header inside either an IEEE 802.3 header or an RFC 894 Ethernet II (DIX) header (both resulting in an 18-byte frame). If len is 1500 or less, most receiving protocol stacks parse the frame as an IEEE 802.3 encapsulated frame. If len is one of the Ethernet type values, most protocol stacks parse the frame as an RFC 894 Ethernet II encapsulated frame. Note the length value is calculated without the 802.1q header of 18 bytes. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">dst</td><td>pointer to a six byte source ethernet address </td></tr>
+ <tr><td class="paramname">src</td><td>pointer to a six byte destination ethernet address </td></tr>
+ <tr><td class="paramname">tpi</td><td>tag protocol identifier </td></tr>
+ <tr><td class="paramname">priority</td><td>priority </td></tr>
+ <tr><td class="paramname">cfi</td><td>canonical format indicator </td></tr>
+ <tr><td class="paramname">vlan_id</td><td>vlan identifier </td></tr>
+ <tr><td class="paramname">len_proto</td><td>length (802.3) protocol (Ethernet II) </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="ab33fc501031e68af303fbffb7643b11d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab33fc501031e68af303fbffb7643b11d">&#9670;&nbsp;</a></span>libnet_build_802_1x()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_802_1x </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>eap_ver</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>eap_type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>length</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an IEEE 802.1x extended authentication protocol header. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">eap_ver</td><td>the EAP version </td></tr>
+ <tr><td class="paramname">eap_type</td><td>the EAP type </td></tr>
+ <tr><td class="paramname">length</td><td>frame length </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a6f616f8d4646db5ada510991cce80808"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6f616f8d4646db5ada510991cce80808">&#9670;&nbsp;</a></span>libnet_build_802_2()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_802_2 </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>dsap</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>ssap</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>control</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an IEEE 802.2 LLC header. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">dsap</td><td>destination service access point </td></tr>
+ <tr><td class="paramname">ssap</td><td>source service access point </td></tr>
+ <tr><td class="paramname">control</td><td>control field </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a22f004a0b0d496762fbd056ca5d31eeb"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a22f004a0b0d496762fbd056ca5d31eeb">&#9670;&nbsp;</a></span>libnet_build_802_2snap()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_802_2snap </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>dsap</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>ssap</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>control</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>oui</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an IEEE 802.2 LLC SNAP header. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">dsap</td><td>destination service access point </td></tr>
+ <tr><td class="paramname">ssap</td><td>source service access point </td></tr>
+ <tr><td class="paramname">control</td><td>control field </td></tr>
+ <tr><td class="paramname">oui</td><td>Organizationally Unique Identifier </td></tr>
+ <tr><td class="paramname">type</td><td>upper layer protocol </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="ab6777b0c3c3b80eaa465686654f668e8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab6777b0c3c3b80eaa465686654f668e8">&#9670;&nbsp;</a></span>libnet_build_802_3()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_802_3 </td>
+ <td>(</td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>dst</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>src</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an IEEE 802.3 header. The 802.3 header is almost identical to the RFC 894 Ethernet II header, the exception being that the field immediately following the source address holds the frame's length (as opposed to the layer 3 protocol). You should only use this function when libnet is initialized with the LIBNET_LINK interface. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">dst</td><td>destination ethernet address </td></tr>
+ <tr><td class="paramname">src</td><td>source ethernet address </td></tr>
+ <tr><td class="paramname">len</td><td>frame length sans header </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="ab606fadc44daa426fa4ba8b43bee5ece"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab606fadc44daa426fa4ba8b43bee5ece">&#9670;&nbsp;</a></span>libnet_build_arp()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_arp </td>
+ <td>(</td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>hrd</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>pro</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>hln</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>pln</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>op</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>sha</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>spa</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>tha</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>tpa</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an Address Resolution Protocol (ARP) header. Depending on the op value, the function builds one of several different types of RFC 826 or RFC 903 RARP packets. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">hrd</td><td>hardware address format </td></tr>
+ <tr><td class="paramname">pro</td><td>protocol address format </td></tr>
+ <tr><td class="paramname">hln</td><td>hardware address length </td></tr>
+ <tr><td class="paramname">pln</td><td>protocol address length </td></tr>
+ <tr><td class="paramname">op</td><td>ARP operation type </td></tr>
+ <tr><td class="paramname">sha</td><td>sender's hardware address </td></tr>
+ <tr><td class="paramname">spa</td><td>sender's protocol address </td></tr>
+ <tr><td class="paramname">tha</td><td>target hardware address </td></tr>
+ <tr><td class="paramname">tpa</td><td>targer protocol address </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a3f9827171fbe5dbc4b02c7d9876a2393"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3f9827171fbe5dbc4b02c7d9876a2393">&#9670;&nbsp;</a></span>libnet_build_bgp4_header()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_bgp4_header </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>marker</em>[LIBNET_BGP4_MARKER_SIZE], </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>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. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">marker</td><td>a value the receiver can predict (if the message type is not BGP OPEN, or no authentication is used, these 16 bytes are normally set as all ones) </td></tr>
+ <tr><td class="paramname">len</td><td>total length of the BGP message, including the header </td></tr>
+ <tr><td class="paramname">type</td><td>type code of the message (OPEN, UPDATE, NOTIFICATION or KEEPALIVE) </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="afe0007cf544b1d6773b6046c5c5ad372"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#afe0007cf544b1d6773b6046c5c5ad372">&#9670;&nbsp;</a></span>libnet_build_bgp4_notification()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_bgp4_notification </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>err_code</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>err_subcode</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an RFC 1771 Border Gateway Protocol 4 (BGP-4) notification header. A NOTIFICATION message is sent when an error condition is detected. Specific error information may be passed through the payload interface. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">err_code</td><td>type of notification </td></tr>
+ <tr><td class="paramname">err_subcode</td><td>more specific information about the reported error. </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a4a7df60e7798fddfff25f163ef63e2af"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a4a7df60e7798fddfff25f163ef63e2af">&#9670;&nbsp;</a></span>libnet_build_bgp4_open()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_bgp4_open </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>version</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>src_as</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>hold_time</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>bgp_id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>opt_len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an RFC 1771 Border Gateway Protocol 4 (BGP-4) OPEN header. This is the first message sent by each side of a BGP connection. The optional parameters options should be constructed using the payload interface (see RFC 1771 for the options structures). </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">version</td><td>protocol version (should be set to 4) </td></tr>
+ <tr><td class="paramname">src_as</td><td>Autonomous System of the sender </td></tr>
+ <tr><td class="paramname">hold_time</td><td>used to compute the maximum allowed time between the receipt of KEEPALIVE, and/or UPDATE messages by the sender </td></tr>
+ <tr><td class="paramname">bgp_id</td><td>BGP identifier of the sender </td></tr>
+ <tr><td class="paramname">opt_len</td><td>total length of the optional parameters field in bytes </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a88f572ee97c9223d4b24f55d868ce419"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a88f572ee97c9223d4b24f55d868ce419">&#9670;&nbsp;</a></span>libnet_build_bgp4_update()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_bgp4_update </td>
+ <td>(</td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>unfeasible_rt_len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>withdrawn_rt</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>total_path_attr_len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>path_attributes</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>info_len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>reachability_info</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an RFC 1771 Border Gateway Protocol 4 (BGP-4) update header. Update messages are used to transfer routing information between BGP peers. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">unfeasible_rt_len</td><td>indicates the length of the (next) "withdrawn routes" field in bytes </td></tr>
+ <tr><td class="paramname">withdrawn_rt</td><td>list of IP addresses prefixes for the routes that are being withdrawn; each IP address prefix is built as a 2-tuple &lt;length (1 byte), prefix (variable)&gt; </td></tr>
+ <tr><td class="paramname">total_path_attr_len</td><td>indicates the length of the (next) "path attributes" field in bytes </td></tr>
+ <tr><td class="paramname">path_attributes</td><td>each attribute is a 3-tuple &lt;type (2 bytes), length, value&gt; </td></tr>
+ <tr><td class="paramname">info_len</td><td>indicates the length of the (next) "network layer reachability information" field in bytes (needed for internal memory size calculation) </td></tr>
+ <tr><td class="paramname">reachability_info</td><td>2-tuples &lt;length (1 byte), prefix (variable)&gt;. </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a564c31892fb8cc2bf44244cdb26d693e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a564c31892fb8cc2bf44244cdb26d693e">&#9670;&nbsp;</a></span>libnet_build_bootpv4()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_bootpv4 </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>opcode</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>htype</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>hlen</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>hopcount</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>xid</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>secs</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>flags</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>cip</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>yip</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>sip</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>gip</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>chaddr</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>sname</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>file</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">opcode</td><td></td></tr>
+ <tr><td class="paramname">htype</td><td></td></tr>
+ <tr><td class="paramname">hlen</td><td></td></tr>
+ <tr><td class="paramname">hopcount</td><td></td></tr>
+ <tr><td class="paramname">xid</td><td></td></tr>
+ <tr><td class="paramname">secs</td><td></td></tr>
+ <tr><td class="paramname">flags</td><td></td></tr>
+ <tr><td class="paramname">cip</td><td></td></tr>
+ <tr><td class="paramname">yip</td><td></td></tr>
+ <tr><td class="paramname">sip</td><td></td></tr>
+ <tr><td class="paramname">gip</td><td></td></tr>
+ <tr><td class="paramname">chaddr</td><td>client hardware address, length is hlen </td></tr>
+ <tr><td class="paramname">sname</td><td>server host name, a null terminated string </td></tr>
+ <tr><td class="paramname">file</td><td>boot file name, a null terminated string </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="aed8b33a329bda096ecac629e92e9bca5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aed8b33a329bda096ecac629e92e9bca5">&#9670;&nbsp;</a></span>libnet_build_cdp()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_cdp </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>version</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>ttl</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>value_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>value</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds a Cisco Discovery Protocol (CDP) header. Cisco Systems designed CDP to aid in the network management of adjacent Cisco devices. The CDP protocol specifies data by using a type/length/value (TLV) setup. The first TLV can specified by using the functions type, length, and value arguments. To specify additional TLVs, the programmer could either use the payload interface or <a class="el" href="libnet-functions_8h.html#aa4c6c975b3c87d3d17224302e4319eec">libnet_build_data()</a> to construct them. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">version</td><td>CDP version </td></tr>
+ <tr><td class="paramname">ttl</td><td>time to live (time information should be cached by recipient) </td></tr>
+ <tr><td class="paramname">sum</td><td>checksum (0 for libnet to auto-fill) </td></tr>
+ <tr><td class="paramname">type</td><td>type of data contained in value </td></tr>
+ <tr><td class="paramname">value_s</td><td>length of value argument </td></tr>
+ <tr><td class="paramname">value</td><td>the CDP information string </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="aa4c6c975b3c87d3d17224302e4319eec"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa4c6c975b3c87d3d17224302e4319eec">&#9670;&nbsp;</a></span>libnet_build_data()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_data </td>
+ <td>(</td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds a generic libnet protocol header. This is useful for including an optional payload to a packet that might need to change repeatedly inside of a loop. This won't work for TCP or IP payload, they have special types (this is probably a bug). </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a3333c5e5cde290dda9b80adc13a00466"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3333c5e5cde290dda9b80adc13a00466">&#9670;&nbsp;</a></span>libnet_build_dhcpv4()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_dhcpv4 </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>opcode</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>htype</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>hlen</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>hopcount</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>xid</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>secs</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>flags</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>cip</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>yip</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>sip</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>gip</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>chaddr</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>sname</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>file</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">opcode</td><td></td></tr>
+ <tr><td class="paramname">htype</td><td></td></tr>
+ <tr><td class="paramname">hlen</td><td></td></tr>
+ <tr><td class="paramname">hopcount</td><td></td></tr>
+ <tr><td class="paramname">xid</td><td></td></tr>
+ <tr><td class="paramname">secs</td><td></td></tr>
+ <tr><td class="paramname">flags</td><td></td></tr>
+ <tr><td class="paramname">cip</td><td></td></tr>
+ <tr><td class="paramname">yip</td><td></td></tr>
+ <tr><td class="paramname">sip</td><td></td></tr>
+ <tr><td class="paramname">gip</td><td></td></tr>
+ <tr><td class="paramname">chaddr</td><td>client hardware address, length is hlen </td></tr>
+ <tr><td class="paramname">sname</td><td>server host name, a null terminated string </td></tr>
+ <tr><td class="paramname">file</td><td>boot file name, a null terminated string </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a5829f525c067e1d99826865292542d8a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a5829f525c067e1d99826865292542d8a">&#9670;&nbsp;</a></span>libnet_build_dnsv4()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_dnsv4 </td>
+ <td>(</td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>h_len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>flags</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>num_q</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>num_anws_rr</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>num_auth_rr</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>num_addi_rr</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an RFC 1035 version 4 DNS header. Additional DNS payload information should be specified using the payload interface. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">h_len</td><td></td></tr>
+ <tr><td class="paramname">id</td><td>DNS packet id </td></tr>
+ <tr><td class="paramname">flags</td><td>control flags </td></tr>
+ <tr><td class="paramname">num_q</td><td>number of questions </td></tr>
+ <tr><td class="paramname">num_anws_rr</td><td>number of answer resource records </td></tr>
+ <tr><td class="paramname">num_auth_rr</td><td>number of authority resource records </td></tr>
+ <tr><td class="paramname">num_addi_rr</td><td>number of additional resource records </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a0092b3f0285f4c96915eef9579655036"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0092b3f0285f4c96915eef9579655036">&#9670;&nbsp;</a></span>libnet_build_egre()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_egre </td>
+ <td>(</td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>fv</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>offset</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>key</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>seq</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>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. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">fv</td><td>the 16 0 to 7: which fields are included in the header (checksum, seq. number, key, ...), bits 8 to 12: flag, bits 13 to 15: version. </td></tr>
+ <tr><td class="paramname">type</td><td>which protocol is encapsulated (PPP, IP, ...) </td></tr>
+ <tr><td class="paramname">sum</td><td>checksum (0 for libnet to auto-fill). </td></tr>
+ <tr><td class="paramname">offset</td><td>byte offset from the start of the routing field to the first byte of the SRE </td></tr>
+ <tr><td class="paramname">key</td><td>inserted by the encapsulator to authenticate the source </td></tr>
+ <tr><td class="paramname">seq</td><td>sequence number used by the receiver to sort the packets </td></tr>
+ <tr><td class="paramname">len</td><td>size of the GRE packet </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="acb97a898e200c1aaea6081545f2fcb39"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#acb97a898e200c1aaea6081545f2fcb39">&#9670;&nbsp;</a></span>libnet_build_ethernet()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ethernet </td>
+ <td>(</td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>dst</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>src</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an Ethernet header. The RFC 894 Ethernet II header is almost identical to the IEEE 802.3 header, with the exception that the field immediately following the source address holds the layer 3 protocol (as opposed to frame's length). You should only use this function when libnet is initialized with the LIBNET_LINK interface. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">dst</td><td>destination ethernet address </td></tr>
+ <tr><td class="paramname">src</td><td>source ethernet address </td></tr>
+ <tr><td class="paramname">type</td><td>upper layer protocol type </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="ab8c2a7a3572bcfef2705ab05c8ef12bc"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab8c2a7a3572bcfef2705ab05c8ef12bc">&#9670;&nbsp;</a></span>libnet_build_fddi()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_fddi </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>fc</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>dst</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>src</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>dsap</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>ssap</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>cf</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>oui</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds a Fiber Distributed Data Interface (FDDI) header. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">fc</td><td>class format and priority </td></tr>
+ <tr><td class="paramname">dst</td><td>destination fddi address </td></tr>
+ <tr><td class="paramname">src</td><td>source fddi address </td></tr>
+ <tr><td class="paramname">dsap</td><td>destination service access point </td></tr>
+ <tr><td class="paramname">ssap</td><td>source service access point </td></tr>
+ <tr><td class="paramname">cf</td><td>cf </td></tr>
+ <tr><td class="paramname">oui</td><td>3 byte IEEE organizational code </td></tr>
+ <tr><td class="paramname">type</td><td>upper layer protocol </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a41e095c98e623f00618f6d306cb31289"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a41e095c98e623f00618f6d306cb31289">&#9670;&nbsp;</a></span>libnet_build_gre()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_gre </td>
+ <td>(</td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>fv</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>offset</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>key</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>seq</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>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. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">fv</td><td>the 16 0 to 7: which fields are included in the header (checksum, seq. number, key, ...), bits 8 to 12: flag, bits 13 to 15: version. </td></tr>
+ <tr><td class="paramname">type</td><td>which protocol is encapsulated (PPP, IP, ...) </td></tr>
+ <tr><td class="paramname">sum</td><td>checksum (0 for libnet to auto-fill). </td></tr>
+ <tr><td class="paramname">offset</td><td>byte offset from the start of the routing field to the first byte of the SRE </td></tr>
+ <tr><td class="paramname">key</td><td>inserted by the encapsulator to authenticate the source </td></tr>
+ <tr><td class="paramname">seq</td><td>sequence number used by the receiver to sort the packets </td></tr>
+ <tr><td class="paramname">len</td><td>size of the GRE packet </td></tr>
+ <tr><td class="paramname">payload</td><td></td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="ae514f81f6d68bc1b2442762a6f87804a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae514f81f6d68bc1b2442762a6f87804a">&#9670;&nbsp;</a></span>libnet_build_gre_last_sre()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_gre_last_sre </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="ae0c59a8f8d014cc1955d88139c2096c0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae0c59a8f8d014cc1955d88139c2096c0">&#9670;&nbsp;</a></span>libnet_build_gre_sre()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_gre_sre </td>
+ <td>(</td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>af</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>offset</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>length</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>routing</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">af</td><td></td></tr>
+ <tr><td class="paramname">offset</td><td></td></tr>
+ <tr><td class="paramname">length</td><td></td></tr>
+ <tr><td class="paramname">routing</td><td></td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="abe75e9be71910c580eff1d6925224778"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#abe75e9be71910c580eff1d6925224778">&#9670;&nbsp;</a></span>libnet_build_hsrp()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_hsrp </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>version</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>opcode</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>state</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>hello_time</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>hold_time</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>priority</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>group</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>reserved</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>authdata</em>[HSRP_AUTHDATA_LENGTH], </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>virtual_ip</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds a HSRP header. HSRP is a Cisco proprietary protocol defined in RFC 2281 </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">version</td><td>version of the HSRP messages </td></tr>
+ <tr><td class="paramname">opcode</td><td>type of message </td></tr>
+ <tr><td class="paramname">state</td><td>current state of the router </td></tr>
+ <tr><td class="paramname">hello_time</td><td>period in seconds between hello messages </td></tr>
+ <tr><td class="paramname">hold_time</td><td>seconds that the current hello message is valid </td></tr>
+ <tr><td class="paramname">priority</td><td>priority for the election process </td></tr>
+ <tr><td class="paramname">group</td><td>standby group </td></tr>
+ <tr><td class="paramname">reserved</td><td>reserved field </td></tr>
+ <tr><td class="paramname">authdata</td><td>password </td></tr>
+ <tr><td class="paramname">virtual_ip</td><td>virtual ip address </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a4a4d3dc8f02e6fe6629e35e37ece0264"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a4a4d3dc8f02e6fe6629e35e37ece0264">&#9670;&nbsp;</a></span>libnet_build_icmpv4_echo()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_icmpv4_echo </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>code</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>seq</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an IP version 4 RFC 792 Internet Control Message Protocol (ICMP) echo request/reply header </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">type</td><td>type of ICMP packet (should be ICMP_ECHOREPLY or ICMP_ECHO) </td></tr>
+ <tr><td class="paramname">code</td><td>code of ICMP packet (should be 0) </td></tr>
+ <tr><td class="paramname">sum</td><td>checksum (0 for libnet to auto-fill) </td></tr>
+ <tr><td class="paramname">id</td><td>identification number </td></tr>
+ <tr><td class="paramname">seq</td><td>packet sequence number </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="ab403c63ae76d0bc59b6641e3c821550c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab403c63ae76d0bc59b6641e3c821550c">&#9670;&nbsp;</a></span>libnet_build_icmpv4_mask()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_icmpv4_mask </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>code</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>seq</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>mask</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an IP version 4 RFC 792 Internet Control Message Protocol (ICMP) IP netmask request/reply header. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">type</td><td>type of ICMP packet (should be ICMP_MASKREQ or ICMP_MASKREPLY) </td></tr>
+ <tr><td class="paramname">code</td><td>code of ICMP packet (should be 0) </td></tr>
+ <tr><td class="paramname">sum</td><td>checksum (0 for libnet to auto-fill) </td></tr>
+ <tr><td class="paramname">id</td><td>identification number </td></tr>
+ <tr><td class="paramname">seq</td><td>packet sequence number </td></tr>
+ <tr><td class="paramname">mask</td><td>subnet mask </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a6df9db28162c58a2cc356b3a87a16f6b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6df9db28162c58a2cc356b3a87a16f6b">&#9670;&nbsp;</a></span>libnet_build_icmpv4_redirect()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_icmpv4_redirect </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>code</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>gateway</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an IP version 4 RFC 792 Internet Message Control Protocol (ICMP) redirect header. The IP header that caused the error message should be built by a previous call to <a class="el" href="libnet-functions_8h.html#a2d9839736df3b1c46acdcc67e291c03e">libnet_build_ipv4()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">type</td><td>type of ICMP packet (should be ICMP_REDIRECT) </td></tr>
+ <tr><td class="paramname">code</td><td>code of ICMP packet (should be one of the four redirect codes) </td></tr>
+ <tr><td class="paramname">sum</td><td>checksum (0 for libnet to auto-fill) </td></tr>
+ <tr><td class="paramname">gateway</td><td></td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a4f2eb3f11fd921b0fd0948cf8ef37c91"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a4f2eb3f11fd921b0fd0948cf8ef37c91">&#9670;&nbsp;</a></span>libnet_build_icmpv4_timeexceed()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_icmpv4_timeexceed </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>code</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an IP version 4 RFC 792 Internet Control Message Protocol (ICMP) time exceeded header. The IP header that caused the error message should be built by a previous call to <a class="el" href="libnet-functions_8h.html#a2d9839736df3b1c46acdcc67e291c03e">libnet_build_ipv4()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">type</td><td>type of ICMP packet (should be ICMP_TIMXCEED) </td></tr>
+ <tr><td class="paramname">code</td><td>code of ICMP packet (ICMP_TIMXCEED_INTRANS / ICMP_TIMXCEED_REASS) </td></tr>
+ <tr><td class="paramname">sum</td><td>checksum (0 for libnet to auto-fill) </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a926f33ff4ea64923b49f16f8c5f7286d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a926f33ff4ea64923b49f16f8c5f7286d">&#9670;&nbsp;</a></span>libnet_build_icmpv4_timestamp()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_icmpv4_timestamp </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>code</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>seq</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>otime</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>rtime</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>ttime</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an IP version 4 RFC 792 Internet Control Message Protocol (ICMP) timestamp request/reply header. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">type</td><td>type of ICMP packet (should be ICMP_TSTAMP or ICMP_TSTAMPREPLY) </td></tr>
+ <tr><td class="paramname">code</td><td>code of ICMP packet (should be 0) </td></tr>
+ <tr><td class="paramname">sum</td><td>checksum (0 for libnet to auto-fill) </td></tr>
+ <tr><td class="paramname">id</td><td>identification number </td></tr>
+ <tr><td class="paramname">seq</td><td>sequence number </td></tr>
+ <tr><td class="paramname">otime</td><td>originate timestamp </td></tr>
+ <tr><td class="paramname">rtime</td><td>receive timestamp </td></tr>
+ <tr><td class="paramname">ttime</td><td>transmit timestamp </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a83197de705eb7929e8216f5771aa4b96"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a83197de705eb7929e8216f5771aa4b96">&#9670;&nbsp;</a></span>libnet_build_icmpv4_unreach()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_icmpv4_unreach </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>code</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an IP version 4 RFC 792 Internet Control Message Protocol (ICMP) unreachable header. The IP header that caused the error message should be built by a previous call to <a class="el" href="libnet-functions_8h.html#a2d9839736df3b1c46acdcc67e291c03e">libnet_build_ipv4()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">type</td><td>type of ICMP packet (should be ICMP_UNREACH) </td></tr>
+ <tr><td class="paramname">code</td><td>code of ICMP packet (should be one of the 16 unreachable codes) </td></tr>
+ <tr><td class="paramname">sum</td><td>checksum (0 for libnet to auto-fill) </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a09a512c9f670528f7f1c9fe9775a0a61"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a09a512c9f670528f7f1c9fe9775a0a61">&#9670;&nbsp;</a></span>libnet_build_icmpv6_echo()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_icmpv6_echo </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>code</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>seq</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an IP version 6 RFC 4443 Internet Control Message Protocol (ICMP) echo or echo reply header. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">type</td><td>type of ICMP packet (should be ICMP6_ECHO_REQUEST or ICMP6_ECHO_REPLY) </td></tr>
+ <tr><td class="paramname">code</td><td>code of ICMP packet (should be zero) </td></tr>
+ <tr><td class="paramname">sum</td><td>checksum (0 for libnet to auto-fill) </td></tr>
+ <tr><td class="paramname">id</td><td>echo id number </td></tr>
+ <tr><td class="paramname">seq</td><td>echo sequence number </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a0d2d7119072c0b98f1248172a2b7885d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0d2d7119072c0b98f1248172a2b7885d">&#9670;&nbsp;</a></span>libnet_build_icmpv6_ndp_nadv()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_icmpv6_ndp_nadv </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>code</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>flags</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">struct libnet_in6_addr&#160;</td>
+ <td class="paramname"><em>target</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an IP version 6 RFC 2461 Internet Control Message Protocol (ICMP) NDP neighbour advertisement header. Could be used with <a class="el" href="libnet-functions_8h.html#aecee0675d61d3ff71d79c64c74a7c924">libnet_build_icmpv6_ndp_opt()</a> and ND_OPT_TARGET_LINKADDR. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">type</td><td>type of ICMP packet (should be ND_NEIGHBOR_ADVERT) </td></tr>
+ <tr><td class="paramname">code</td><td>code of ICMP packet (should be zero) </td></tr>
+ <tr><td class="paramname">sum</td><td>checksum (0 for libnet to auto-fill) </td></tr>
+ <tr><td class="paramname">flags</td><td>should be a bitwise or of any applicable ND_NA_FLAG_* flags </td></tr>
+ <tr><td class="paramname">target</td><td>target ipv6 address </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="aa184e1e69a7fc7161d484dcdca4f74db"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa184e1e69a7fc7161d484dcdca4f74db">&#9670;&nbsp;</a></span>libnet_build_icmpv6_ndp_nsol()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_icmpv6_ndp_nsol </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>code</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">struct libnet_in6_addr&#160;</td>
+ <td class="paramname"><em>target</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an IP version 6 RFC 2461 Internet Control Message Protocol (ICMP) NDP neighbour solicitation header. Could be used with <a class="el" href="libnet-functions_8h.html#aecee0675d61d3ff71d79c64c74a7c924">libnet_build_icmpv6_ndp_opt()</a> and ICMPV6_NDP_OPT_SLLA. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">type</td><td>type of ICMP packet (should be ND_NEIGHBOR_SOLICIT) </td></tr>
+ <tr><td class="paramname">code</td><td>code of ICMP packet (should be zero) </td></tr>
+ <tr><td class="paramname">sum</td><td>checksum (0 for libnet to auto-fill) </td></tr>
+ <tr><td class="paramname">target</td><td>target ipv6 address </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="aecee0675d61d3ff71d79c64c74a7c924"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aecee0675d61d3ff71d79c64c74a7c924">&#9670;&nbsp;</a></span>libnet_build_icmpv6_ndp_opt()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_icmpv6_ndp_opt </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>option</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>option_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds ICMPv6 NDP options. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">type</td><td>one of ND_OPT_* types </td></tr>
+ <tr><td class="paramname">option</td><td>option data </td></tr>
+ <tr><td class="paramname">option_s</td><td>size of option data (will be padded out to an 8-byte boundary) </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a86ee5967b07a4fe49af301add8656450"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a86ee5967b07a4fe49af301add8656450">&#9670;&nbsp;</a></span>libnet_build_icmpv6_unreach()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_icmpv6_unreach </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>code</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an IP version 6 RFC 4443 Internet Control Message Protocol (ICMP) unreachable header. The IP header that caused the error message should be built by a previous call to <a class="el" href="libnet-functions_8h.html#a50fc0e6ad5c2b1fd705f349eff382dfd">libnet_build_ipv6()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">type</td><td>type of ICMP packet (should be ICMP6_DST_UNREACH) </td></tr>
+ <tr><td class="paramname">code</td><td>code of ICMP packet (should be one of the 5 ICMP6_DST_UNREACH_* codes) </td></tr>
+ <tr><td class="paramname">sum</td><td>checksum (0 for libnet to auto-fill) </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="afbeeb2c1c377c59aa2747dff4db4d5e8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#afbeeb2c1c377c59aa2747dff4db4d5e8">&#9670;&nbsp;</a></span>libnet_build_igmp()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_igmp </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>reserved</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>ip</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an RFC 1112 Internet Group Membership Protocol (IGMP) header. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">type</td><td>packet type </td></tr>
+ <tr><td class="paramname">reserved</td><td>(should be 0 for IGMPv1) </td></tr>
+ <tr><td class="paramname">sum</td><td>checksum (0 for libnet to auto-fill) </td></tr>
+ <tr><td class="paramname">ip</td><td>IPv4 address (in standard/network byte order) </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section note"><dt>Note</dt><dd>'reserved' was previously called 'code', which it is not, in any IGMP version. </dd></dl>
+
+</div>
+</div>
+<a id="a22d1d874a5d12b8d3528f637990ceb21"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a22d1d874a5d12b8d3528f637990ceb21">&#9670;&nbsp;</a></span>libnet_build_ipsec_ah()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ipsec_ah </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>nh</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>res</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>spi</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>seq</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>auth</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an Internet Protocol Security Authentication header. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">nh</td><td>next header </td></tr>
+ <tr><td class="paramname">len</td><td>payload length </td></tr>
+ <tr><td class="paramname">res</td><td>reserved </td></tr>
+ <tr><td class="paramname">spi</td><td>security parameter index </td></tr>
+ <tr><td class="paramname">seq</td><td>sequence number </td></tr>
+ <tr><td class="paramname">auth</td><td>authentication data </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a0e7ba4cf571d4d85b1084e15059c7336"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0e7ba4cf571d4d85b1084e15059c7336">&#9670;&nbsp;</a></span>libnet_build_ipsec_esp_ftr()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ipsec_esp_ftr </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>nh</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int8_t *&#160;</td>
+ <td class="paramname"><em>auth</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an Internet Protocol Security Encapsulating Security Payload footer. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">len</td><td>padding length </td></tr>
+ <tr><td class="paramname">nh</td><td>next header </td></tr>
+ <tr><td class="paramname">auth</td><td>authentication data </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="ad7d163363769594667524e7607535aec"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad7d163363769594667524e7607535aec">&#9670;&nbsp;</a></span>libnet_build_ipsec_esp_hdr()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ipsec_esp_hdr </td>
+ <td>(</td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>spi</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>seq</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>iv</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an Internet Protocol Security Encapsulating Security Payload header. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">spi</td><td>security parameter index </td></tr>
+ <tr><td class="paramname">seq</td><td>ESP sequence number </td></tr>
+ <tr><td class="paramname">iv</td><td>initialization vector </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a2d9839736df3b1c46acdcc67e291c03e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2d9839736df3b1c46acdcc67e291c03e">&#9670;&nbsp;</a></span>libnet_build_ipv4()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ipv4 </td>
+ <td>(</td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>ip_len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>tos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>frag</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>ttl</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>prot</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>src</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>dst</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds a version 4 RFC 791 Internet Protocol (IP) header.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">ip_len</td><td>total length of the IP packet including all subsequent data (subsequent data includes any IP options and IP options padding) </td></tr>
+ <tr><td class="paramname">tos</td><td>type of service bits </td></tr>
+ <tr><td class="paramname">id</td><td>IP identification number </td></tr>
+ <tr><td class="paramname">frag</td><td>fragmentation bits and offset </td></tr>
+ <tr><td class="paramname">ttl</td><td>time to live in the network </td></tr>
+ <tr><td class="paramname">prot</td><td>upper layer protocol </td></tr>
+ <tr><td class="paramname">sum</td><td>checksum (0 for libnet to auto-fill) </td></tr>
+ <tr><td class="paramname">src</td><td>source IPv4 address (little endian) </td></tr>
+ <tr><td class="paramname">dst</td><td>destination IPv4 address (little endian) </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="aa209cafad74cd8f259aa97732e06d07c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa209cafad74cd8f259aa97732e06d07c">&#9670;&nbsp;</a></span>libnet_build_ipv4_options()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ipv4_options </td>
+ <td>(</td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>options</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>options_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an version 4 Internet Protocol (IP) options header. The function expects options to be a valid IP options string of size options_s, no larger than 40 bytes (the maximum size of an options string).</p>
+<p>When building a chain, the options must be built, then the IPv4 header.</p>
+<p>When updating a chain, if the block following the options is an IPv4 header, it's total length and header length will be updated if the options block size changes.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">options</td><td>byte string of IP options (it will be padded up to be an integral multiple of 32-bit words). </td></tr>
+ <tr><td class="paramname">options_s</td><td>length of options string </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a50fc0e6ad5c2b1fd705f349eff382dfd"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a50fc0e6ad5c2b1fd705f349eff382dfd">&#9670;&nbsp;</a></span>libnet_build_ipv6()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ipv6 </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>tc</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>fl</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>nh</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>hl</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">struct libnet_in6_addr&#160;</td>
+ <td class="paramname"><em>src</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">struct libnet_in6_addr&#160;</td>
+ <td class="paramname"><em>dst</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds a version 6 RFC 2460 Internet Protocol (IP) header. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">tc</td><td>traffic class </td></tr>
+ <tr><td class="paramname">fl</td><td>flow label </td></tr>
+ <tr><td class="paramname">len</td><td>total length of the IP packet </td></tr>
+ <tr><td class="paramname">nh</td><td>next header </td></tr>
+ <tr><td class="paramname">hl</td><td>hop limit </td></tr>
+ <tr><td class="paramname">src</td><td>source IPv6 address </td></tr>
+ <tr><td class="paramname">dst</td><td>destination IPv6 address </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a1b6e9597bf110de597a673a4c6ed6ebc"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1b6e9597bf110de597a673a4c6ed6ebc">&#9670;&nbsp;</a></span>libnet_build_ipv6_destopts()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ipv6_destopts </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>nh</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds a version 6 RFC 2460 Internet Protocol (IP) destination options header. This function is special in that it uses the payload interface to include the options data. The application programmer will build an IPv6 options byte string and pass it to the function using the payload interface. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">nh</td><td>next header </td></tr>
+ <tr><td class="paramname">len</td><td>length of the header in 8-byte octets not including the first 8 octets </td></tr>
+ <tr><td class="paramname">payload</td><td>options payload </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a9eeb211b6b8579fe9725da6d32d2732d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a9eeb211b6b8579fe9725da6d32d2732d">&#9670;&nbsp;</a></span>libnet_build_ipv6_frag()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ipv6_frag </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>nh</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>reserved</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>frag</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds a version 6 RFC 2460 Internet Protocol (IP) fragmentation header. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">nh</td><td>next header </td></tr>
+ <tr><td class="paramname">reserved</td><td>unused value... OR IS IT! </td></tr>
+ <tr><td class="paramname">frag</td><td>fragmentation bits (ala ipv4) </td></tr>
+ <tr><td class="paramname">id</td><td>packet identification </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a1a8b5292e4e714c0f299f0577c86cb00"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1a8b5292e4e714c0f299f0577c86cb00">&#9670;&nbsp;</a></span>libnet_build_ipv6_hbhopts()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ipv6_hbhopts </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>nh</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds a version 6 RFC 2460 Internet Protocol (IP) hop by hop options header. This function is special in that it uses the payload interface to include the options data. The application programmer will build an IPv6 hop by hop options byte string and pass it to the function using the payload interface. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">nh</td><td>next header </td></tr>
+ <tr><td class="paramname">len</td><td>length of the header in 8-byte octets not including the first 8 octets </td></tr>
+ <tr><td class="paramname">payload</td><td>options payload </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a7fb612955dd3a787f13ab0c85b360023"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7fb612955dd3a787f13ab0c85b360023">&#9670;&nbsp;</a></span>libnet_build_ipv6_routing()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ipv6_routing </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>nh</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>rtype</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>segments</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds a version 6 RFC 2460 Internet Protocol (IP) routing header. This function is special in that it uses the payload interface to include the "type-specific data"; that is the routing information. Most often this will be a number of 128-bit IPv6 addresses. The application programmer will build a byte string of IPv6 address and pass them to the function using the payload interface. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">nh</td><td>next header </td></tr>
+ <tr><td class="paramname">len</td><td>length of the header in 8-byte octets not including the first 8 octets </td></tr>
+ <tr><td class="paramname">rtype</td><td>routing header type </td></tr>
+ <tr><td class="paramname">segments</td><td>number of routing segments that follow </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload of routing information </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="afdcc92fd59366c48693ad48c076c488e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#afdcc92fd59366c48693ad48c076c488e">&#9670;&nbsp;</a></span>libnet_build_isl()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_isl </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>dhost</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>user</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>shost</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>snap</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>vid</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>portindex</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>reserved</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds a Cisco Inter-Switch Link (ISL) header. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">dhost</td><td>destination address (should be 01:00:0c:00:00) </td></tr>
+ <tr><td class="paramname">type</td><td>type of frame </td></tr>
+ <tr><td class="paramname">user</td><td>user defined data </td></tr>
+ <tr><td class="paramname">shost</td><td>source mac address </td></tr>
+ <tr><td class="paramname">len</td><td>total length of the encapsulated packet less 18 bytes </td></tr>
+ <tr><td class="paramname">snap</td><td>SNAP information (0xaaaa03 + vendor code) </td></tr>
+ <tr><td class="paramname">vid</td><td>15 bit VLAN ID, 1 bit BPDU or CDP indicator </td></tr>
+ <tr><td class="paramname">portindex</td><td>port index </td></tr>
+ <tr><td class="paramname">reserved</td><td>used for FDDI and token ring </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a9ec77e2ffcb9540d9f4eee2b0ff57af2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a9ec77e2ffcb9540d9f4eee2b0ff57af2">&#9670;&nbsp;</a></span>libnet_build_link()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_link </td>
+ <td>(</td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>dst</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>src</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>oui</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds a link layer header for an initialized l. The function determines the proper link layer header format from how l was initialized. The function current supports Ethernet and Token Ring link layers. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">dst</td><td>the destination MAC address </td></tr>
+ <tr><td class="paramname">src</td><td>the source MAC address </td></tr>
+ <tr><td class="paramname">oui</td><td>Organizationally Unique Identifier (unused for Ethernet) </td></tr>
+ <tr><td class="paramname">type</td><td>the upper layer protocol type </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a520053e593215a240f7207c2b28075cb"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a520053e593215a240f7207c2b28075cb">&#9670;&nbsp;</a></span>libnet_build_mpls()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_mpls </td>
+ <td>(</td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>label</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>experimental</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>bos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>ttl</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an RFC 3032 Multi-Protocol Label Switching (MPLS) header. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">label</td><td>20-bit label value </td></tr>
+ <tr><td class="paramname">experimental</td><td>3-bit reserved field </td></tr>
+ <tr><td class="paramname">bos</td><td>1-bit bottom of stack identifier </td></tr>
+ <tr><td class="paramname">ttl</td><td>time to live </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="af305c48631b600e472f60b951b9ebf75"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af305c48631b600e472f60b951b9ebf75">&#9670;&nbsp;</a></span>libnet_build_ntp()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ntp </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>leap_indicator</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>version</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>mode</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>stratum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>poll</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>precision</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>delay_int</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>delay_frac</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>dispersion_int</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>dispersion_frac</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>reference_id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>ref_ts_int</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>ref_ts_frac</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>orig_ts_int</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>orig_ts_frac</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>rec_ts_int</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>rec_ts_frac</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>xmt_ts_int</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>xmt_ts_frac</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an RFC 958 Network Time Protocol (NTP) header. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">leap_indicator</td><td>the leap indicator </td></tr>
+ <tr><td class="paramname">version</td><td>NTP protocol version </td></tr>
+ <tr><td class="paramname">mode</td><td>NTP mode </td></tr>
+ <tr><td class="paramname">stratum</td><td>stratum </td></tr>
+ <tr><td class="paramname">poll</td><td>polling interval </td></tr>
+ <tr><td class="paramname">precision</td><td>precision </td></tr>
+ <tr><td class="paramname">delay_int</td><td>delay interval </td></tr>
+ <tr><td class="paramname">delay_frac</td><td>delay fraction </td></tr>
+ <tr><td class="paramname">dispersion_int</td><td>dispersion interval </td></tr>
+ <tr><td class="paramname">dispersion_frac</td><td>dispersion fraction </td></tr>
+ <tr><td class="paramname">reference_id</td><td>reference id </td></tr>
+ <tr><td class="paramname">ref_ts_int</td><td>reference timestamp integer </td></tr>
+ <tr><td class="paramname">ref_ts_frac</td><td>reference timestamp fraction </td></tr>
+ <tr><td class="paramname">orig_ts_int</td><td>original timestamp integer </td></tr>
+ <tr><td class="paramname">orig_ts_frac</td><td>original timestamp fraction </td></tr>
+ <tr><td class="paramname">rec_ts_int</td><td>receiver timestamp integer </td></tr>
+ <tr><td class="paramname">rec_ts_frac</td><td>receiver timestamp fraction </td></tr>
+ <tr><td class="paramname">xmt_ts_int</td><td>transmit timestamp integer </td></tr>
+ <tr><td class="paramname">xmt_ts_frac</td><td>transmit timestamp integer </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a429bf355c69895a5ad7ca900d734bf48"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a429bf355c69895a5ad7ca900d734bf48">&#9670;&nbsp;</a></span>libnet_build_ospfv2()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ospfv2 </td>
+ <td>(</td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>rtr_id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>area_id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>autype</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">len</td><td></td></tr>
+ <tr><td class="paramname">type</td><td></td></tr>
+ <tr><td class="paramname">rtr_id</td><td></td></tr>
+ <tr><td class="paramname">area_id</td><td></td></tr>
+ <tr><td class="paramname">sum</td><td></td></tr>
+ <tr><td class="paramname">autype</td><td></td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a9f859449de2c7e2f1b2d18051a315634"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a9f859449de2c7e2f1b2d18051a315634">&#9670;&nbsp;</a></span>libnet_build_ospfv2_dbd()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ospfv2_dbd </td>
+ <td>(</td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>dgram_len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>opts</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>seqnum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">dgram_len</td><td></td></tr>
+ <tr><td class="paramname">opts</td><td></td></tr>
+ <tr><td class="paramname">type</td><td></td></tr>
+ <tr><td class="paramname">seqnum</td><td></td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a224a55d5758cd6685fdd374597f133c4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a224a55d5758cd6685fdd374597f133c4">&#9670;&nbsp;</a></span>libnet_build_ospfv2_hello()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ospfv2_hello </td>
+ <td>(</td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>netmask</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>interval</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>opts</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>priority</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>dead_int</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>des_rtr</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>bkup_rtr</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">netmask</td><td></td></tr>
+ <tr><td class="paramname">interval</td><td></td></tr>
+ <tr><td class="paramname">opts</td><td></td></tr>
+ <tr><td class="paramname">priority</td><td></td></tr>
+ <tr><td class="paramname">dead_int</td><td></td></tr>
+ <tr><td class="paramname">des_rtr</td><td></td></tr>
+ <tr><td class="paramname">bkup_rtr</td><td></td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a798142aed2aee944fdc80ce14faf31f6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a798142aed2aee944fdc80ce14faf31f6">&#9670;&nbsp;</a></span>libnet_build_ospfv2_lsa()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa </td>
+ <td>(</td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>age</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>opts</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>lsid</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>advrtr</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>seqnum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">age</td><td></td></tr>
+ <tr><td class="paramname">opts</td><td></td></tr>
+ <tr><td class="paramname">type</td><td></td></tr>
+ <tr><td class="paramname">lsid</td><td></td></tr>
+ <tr><td class="paramname">advrtr</td><td></td></tr>
+ <tr><td class="paramname">seqnum</td><td></td></tr>
+ <tr><td class="paramname">sum</td><td></td></tr>
+ <tr><td class="paramname">len</td><td></td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a9002c457692ce2557197dc68c9932849"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a9002c457692ce2557197dc68c9932849">&#9670;&nbsp;</a></span>libnet_build_ospfv2_lsa_as()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa_as </td>
+ <td>(</td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>nmask</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>metric</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>fwdaddr</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>tag</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">nmask</td><td></td></tr>
+ <tr><td class="paramname">metric</td><td></td></tr>
+ <tr><td class="paramname">fwdaddr</td><td></td></tr>
+ <tr><td class="paramname">tag</td><td></td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a234cf0a788a5944ff70c879c96467bc4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a234cf0a788a5944ff70c879c96467bc4">&#9670;&nbsp;</a></span>libnet_build_ospfv2_lsa_net()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa_net </td>
+ <td>(</td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>nmask</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>rtrid</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">nmask</td><td></td></tr>
+ <tr><td class="paramname">rtrid</td><td></td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a67209523b736cc9f70743d3dfbce1129"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a67209523b736cc9f70743d3dfbce1129">&#9670;&nbsp;</a></span>libnet_build_ospfv2_lsa_rtr()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa_rtr </td>
+ <td>(</td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>flags</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>num</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>data</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>tos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>metric</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">flags</td><td></td></tr>
+ <tr><td class="paramname">num</td><td></td></tr>
+ <tr><td class="paramname">id</td><td></td></tr>
+ <tr><td class="paramname">data</td><td></td></tr>
+ <tr><td class="paramname">type</td><td></td></tr>
+ <tr><td class="paramname">tos</td><td></td></tr>
+ <tr><td class="paramname">metric</td><td></td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="ae9c55870fecbd742edc25f06b73ad5a2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae9c55870fecbd742edc25f06b73ad5a2">&#9670;&nbsp;</a></span>libnet_build_ospfv2_lsa_sum()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa_sum </td>
+ <td>(</td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>nmask</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>metric</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>tos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">nmask</td><td></td></tr>
+ <tr><td class="paramname">metric</td><td></td></tr>
+ <tr><td class="paramname">tos</td><td></td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a17d51de46576464ff606e15250c7fe3a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a17d51de46576464ff606e15250c7fe3a">&#9670;&nbsp;</a></span>libnet_build_ospfv2_lsr()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsr </td>
+ <td>(</td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>lsid</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>advrtr</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">type</td><td></td></tr>
+ <tr><td class="paramname">lsid</td><td></td></tr>
+ <tr><td class="paramname">advrtr</td><td></td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a5ffe185b91c48fad0dc84f81b7d26697"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a5ffe185b91c48fad0dc84f81b7d26697">&#9670;&nbsp;</a></span>libnet_build_ospfv2_lsu()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsu </td>
+ <td>(</td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>num</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">num</td><td></td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a154c83b71614c8cf3635f7c80cf7e9a6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a154c83b71614c8cf3635f7c80cf7e9a6">&#9670;&nbsp;</a></span>libnet_build_rip()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_rip </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>cmd</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>version</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>rd</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>af</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>rt</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>addr</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>mask</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>next_hop</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>metric</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds a Routing Information Protocol header (RFCs 1058 and 2453). </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">cmd</td><td>command </td></tr>
+ <tr><td class="paramname">version</td><td>protocol version </td></tr>
+ <tr><td class="paramname">rd</td><td>version one: 0, version two: routing domain </td></tr>
+ <tr><td class="paramname">af</td><td>address family </td></tr>
+ <tr><td class="paramname">rt</td><td>version one: 0, version two: route tag </td></tr>
+ <tr><td class="paramname">addr</td><td>IPv4 address </td></tr>
+ <tr><td class="paramname">mask</td><td>version one: 0, version two: subnet mask </td></tr>
+ <tr><td class="paramname">next_hop</td><td>version one: 0, version two: next hop address </td></tr>
+ <tr><td class="paramname">metric</td><td>routing metric </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a4a657cd81f10ba6dbdcbd6a6a81f72d2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a4a657cd81f10ba6dbdcbd6a6a81f72d2">&#9670;&nbsp;</a></span>libnet_build_rpc_call()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_rpc_call </td>
+ <td>(</td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>rm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>xid</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>prog_num</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>prog_vers</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>procedure</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>cflavor</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>clength</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>cdata</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>vflavor</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>vlength</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>vdata</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an Remote Procedure Call (Version 2) Call message header as specified in RFC 1831. This builder provides the option for specifying the record marking which is required when used with streaming protocols (TCP). </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">rm</td><td>record marking indicating the position in a stream, 0 otherwise </td></tr>
+ <tr><td class="paramname">xid</td><td>transaction identifier used to link calls and replies </td></tr>
+ <tr><td class="paramname">prog_num</td><td>remote program specification typically between 0 - 1fffffff </td></tr>
+ <tr><td class="paramname">prog_vers</td><td>remote program version specification </td></tr>
+ <tr><td class="paramname">procedure</td><td>procedure to be performed by remote program </td></tr>
+ <tr><td class="paramname">cflavor</td><td>authentication credential type </td></tr>
+ <tr><td class="paramname">clength</td><td>credential length (should be 0) </td></tr>
+ <tr><td class="paramname">cdata</td><td>opaque credential data (currently unused) </td></tr>
+ <tr><td class="paramname">vflavor</td><td>authentication verifier type </td></tr>
+ <tr><td class="paramname">vlength</td><td>verifier length (should be 0) </td></tr>
+ <tr><td class="paramname">vdata</td><td>opaque verifier data (currently unused) </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a0d4ce5211113c5d5818d557ce3fc0234"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0d4ce5211113c5d5818d557ce3fc0234">&#9670;&nbsp;</a></span>libnet_build_sebek()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_sebek </td>
+ <td>(</td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>magic</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>version</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>counter</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>time_sec</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>time_usec</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>pid</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>uid</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>fd</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>cmd</em>[SEBEK_CMD_LENGTH], </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>length</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds a Sebek header. The Sebek protocol was designed by the Honeynet Project as a transport mechanism for post-intrusion forensic data. More information may be found here: <a href="http://www.honeynet.org/papers/sebek.pdf">http://www.honeynet.org/papers/sebek.pdf</a>. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">magic</td><td>identify packets that should be hidden </td></tr>
+ <tr><td class="paramname">version</td><td>protocol version, currently 1 </td></tr>
+ <tr><td class="paramname">type</td><td>type of record (read data is type 0, write data is type 1) </td></tr>
+ <tr><td class="paramname">counter</td><td>PDU counter used to identify when packet are lost </td></tr>
+ <tr><td class="paramname">time_sec</td><td>seconds since EPOCH according to the honeypot </td></tr>
+ <tr><td class="paramname">time_usec</td><td>residual microseconds </td></tr>
+ <tr><td class="paramname">pid</td><td>PID </td></tr>
+ <tr><td class="paramname">uid</td><td>UID </td></tr>
+ <tr><td class="paramname">fd</td><td>FD </td></tr>
+ <tr><td class="paramname">cmd</td><td>12 first characters of the command </td></tr>
+ <tr><td class="paramname">length</td><td>length in bytes of the PDU's body </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="ad6310dd6dff16dc711663f70256d2148"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad6310dd6dff16dc711663f70256d2148">&#9670;&nbsp;</a></span>libnet_build_stp_conf()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_stp_conf </td>
+ <td>(</td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>version</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>bpdu_type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>flags</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>root_id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>root_pc</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>bridge_id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>port_id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>message_age</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>max_age</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>hello_time</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>f_delay</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an IEEE 802.1d Spanning Tree Protocol (STP) configuration header. STP frames are usually encapsulated inside of an 802.2 + 802.3 frame combination. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">id</td><td>protocol id </td></tr>
+ <tr><td class="paramname">version</td><td>protocol version </td></tr>
+ <tr><td class="paramname">bpdu_type</td><td>bridge protocol data unit type </td></tr>
+ <tr><td class="paramname">flags</td><td>flags </td></tr>
+ <tr><td class="paramname">root_id</td><td>root id </td></tr>
+ <tr><td class="paramname">root_pc</td><td>root path cost </td></tr>
+ <tr><td class="paramname">bridge_id</td><td>bridge id </td></tr>
+ <tr><td class="paramname">port_id</td><td>port id </td></tr>
+ <tr><td class="paramname">message_age</td><td>message age </td></tr>
+ <tr><td class="paramname">max_age</td><td>max age </td></tr>
+ <tr><td class="paramname">hello_time</td><td>hello time </td></tr>
+ <tr><td class="paramname">f_delay</td><td>forward delay </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a913fc0cf8782d915edc20f4f6abf847f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a913fc0cf8782d915edc20f4f6abf847f">&#9670;&nbsp;</a></span>libnet_build_stp_tcn()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_stp_tcn </td>
+ <td>(</td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>version</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>bpdu_type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an IEEE 802.1d Spanning Tree Protocol (STP) topology change notification header. STP frames are usually encapsulated inside of an 802.2 + 802.3 frame combination. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">id</td><td>protocol id </td></tr>
+ <tr><td class="paramname">version</td><td>protocol version </td></tr>
+ <tr><td class="paramname">bpdu_type</td><td>bridge protocol data unit type </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="ad096d303ddcddbd63ea269453bd26a20"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad096d303ddcddbd63ea269453bd26a20">&#9670;&nbsp;</a></span>libnet_build_tcp()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_tcp </td>
+ <td>(</td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sp</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>dp</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>seq</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>ack</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>control</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>win</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>urg</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an RFC 793 Transmission Control Protocol (TCP) header. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">sp</td><td>source port </td></tr>
+ <tr><td class="paramname">dp</td><td>destination port </td></tr>
+ <tr><td class="paramname">seq</td><td>sequence number </td></tr>
+ <tr><td class="paramname">ack</td><td>acknowledgement number </td></tr>
+ <tr><td class="paramname">control</td><td>control flags </td></tr>
+ <tr><td class="paramname">win</td><td>window size </td></tr>
+ <tr><td class="paramname">sum</td><td>checksum (0 for libnet to auto-fill) </td></tr>
+ <tr><td class="paramname">urg</td><td>urgent pointer </td></tr>
+ <tr><td class="paramname">len</td><td>total length of the TCP packet (for checksum calculation) </td></tr>
+ <tr><td class="paramname">payload</td><td></td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="aec6344132528e6903837b0d8909ad08c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aec6344132528e6903837b0d8909ad08c">&#9670;&nbsp;</a></span>libnet_build_tcp_options()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_tcp_options </td>
+ <td>(</td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>options</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>options_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an RFC 793 Transmission Control Protocol (TCP) options header. The function expects options to be a valid TCP options string of size options_s, which is no larger than 40 bytes (the maximum size of an options string). The function checks to ensure that the packet consists of a TCP header preceded by an IPv4 header, and that the addition of the options string would not result in a packet larger than 65,535 bytes (IPMAXPACKET). The function counts up the number of 32-bit words in the options string and adjusts the TCP header length value as necessary. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">options</td><td>byte string of TCP options </td></tr>
+ <tr><td class="paramname">options_s</td><td>length of options string </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a4d77b901ebcc18b8c0ee2345e4ea6177"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a4d77b901ebcc18b8c0ee2345e4ea6177">&#9670;&nbsp;</a></span>libnet_build_token_ring()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_token_ring </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>ac</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>fc</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>dst</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>src</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>dsap</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>ssap</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>cf</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>oui</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds a token ring header. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">ac</td><td>access control </td></tr>
+ <tr><td class="paramname">fc</td><td>frame control </td></tr>
+ <tr><td class="paramname">dst</td><td>destination address </td></tr>
+ <tr><td class="paramname">src</td><td>source address </td></tr>
+ <tr><td class="paramname">dsap</td><td>destination service access point </td></tr>
+ <tr><td class="paramname">ssap</td><td>source service access point </td></tr>
+ <tr><td class="paramname">cf</td><td>control field </td></tr>
+ <tr><td class="paramname">oui</td><td>Organizationally Unique Identifier </td></tr>
+ <tr><td class="paramname">type</td><td>upper layer protocol type </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a0ae166a293c0495431246fe0d0ba66f6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0ae166a293c0495431246fe0d0ba66f6">&#9670;&nbsp;</a></span>libnet_build_udp()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_udp </td>
+ <td>(</td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sp</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>dp</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an RFC 768 User Datagram Protocol (UDP) header. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">sp</td><td>source port </td></tr>
+ <tr><td class="paramname">dp</td><td>destination port </td></tr>
+ <tr><td class="paramname">len</td><td>total length of the UDP packet </td></tr>
+ <tr><td class="paramname">sum</td><td>checksum (0 for libnet to auto-fill) </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a5a6538c0cf4dd6c2f59b1657d56796b3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a5a6538c0cf4dd6c2f59b1657d56796b3">&#9670;&nbsp;</a></span>libnet_build_vrrp()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_ptag_t libnet_build_vrrp </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>version</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>vrouter_id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>priority</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>ip_count</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>auth_type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>advert_int</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>sum</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>payload</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>payload_s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Builds an RFC 2338 Virtual Router Redundacy Protool (VRRP) header. Use the payload interface to specify address and authentication information. To build a "legal" packet, the destination IPv4 address should be the multicast * address 224.0.0.18, the IP TTL should be set to 255, and the IP protocol should be set to 112. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">version</td><td>VRRP version (should be 2) </td></tr>
+ <tr><td class="paramname">type</td><td>VRRP packet type (should be 1 &ndash; ADVERTISEMENT) </td></tr>
+ <tr><td class="paramname">vrouter_id</td><td>virtual router identification </td></tr>
+ <tr><td class="paramname">priority</td><td>priority (higher numbers indicate higher priority) </td></tr>
+ <tr><td class="paramname">ip_count</td><td>number of IPv4 addresses contained in this advertisement </td></tr>
+ <tr><td class="paramname">auth_type</td><td>type of authentication (0, 1, 2 &ndash; see RFC) </td></tr>
+ <tr><td class="paramname">advert_int</td><td>interval between advertisements </td></tr>
+ <tr><td class="paramname">sum</td><td>checksum (0 for libnet to autofill) </td></tr>
+ <tr><td class="paramname">payload</td><td>optional payload or NULL </td></tr>
+ <tr><td class="paramname">payload_s</td><td>payload length or 0 </td></tr>
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>protocol tag to modify an existing header, 0 to build a new one </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>protocol tag value on success </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a9ae9cb6e191e382c653237451f9bacd6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a9ae9cb6e191e382c653237451f9bacd6">&#9670;&nbsp;</a></span>libnet_clear_packet()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API void libnet_clear_packet </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Clears the current packet referenced and frees all pblocks. Should be called when the programmer want to send a completely new packet of a different type using the same context. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a20887ffe940f1d2c5bcae79a188176c6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a20887ffe940f1d2c5bcae79a188176c6">&#9670;&nbsp;</a></span>libnet_cq_add()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int libnet_cq_add </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">char *&#160;</td>
+ <td class="paramname"><em>label</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>[Context Queue] Adds a new context to the libnet context queue. If no queue exists, this function will create the queue and add the specified libnet context as the first entry on the list. The functions checks to ensure niether l nor label are NULL, and that label doesn't refer to an existing context already in the queue. Additionally, l should refer to a libnet context previously initialized with a call to <a class="el" href="libnet-functions_8h.html#aced83ef40edb05a9fc1e129373fe44dd">libnet_init()</a>. If the context queue in write locked, this function will fail. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">label</td><td>a canonical name given to recognize the new context, no longer than LIBNET_LABEL_SIZE </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">1</td><td>on success </td></tr>
+ <tr><td class="paramname">-1</td><td>on failure </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a1577413fdaf10706d5016b64f7f7924b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1577413fdaf10706d5016b64f7f7924b">&#9670;&nbsp;</a></span>libnet_cq_destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API void libnet_cq_destroy </td>
+ <td>(</td>
+ <td class="paramtype">void&#160;</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>[Context Queue] Destroys the entire context queue, calling <a class="el" href="libnet-functions_8h.html#a8ddea475d4051b695f519100755d6a05">libnet_destroy()</a> on each member context. </p>
+
+</div>
+</div>
+<a id="a65145cbd0be6d1609bf07b52d6c57695"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a65145cbd0be6d1609bf07b52d6c57695">&#9670;&nbsp;</a></span>libnet_cq_end_loop()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API uint32_t libnet_cq_end_loop </td>
+ <td>(</td>
+ <td class="paramtype">void&#160;</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>[Context Queue] </p>
+
+</div>
+</div>
+<a id="a1775288c17694d4d606327ad066f970d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1775288c17694d4d606327ad066f970d">&#9670;&nbsp;</a></span>libnet_cq_find_by_label()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_t* libnet_cq_find_by_label </td>
+ <td>(</td>
+ <td class="paramtype">char *&#160;</td>
+ <td class="paramname"><em>label</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>[Context Queue] Locates a libnet context from the queue, indexed by a canonical label. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">label</td><td>canonical label of the libnet context to retrieve </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>the expected libnet context </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">NULL</td><td>on failure </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a337f556ed05df13c1de19acbd4d7f50a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a337f556ed05df13c1de19acbd4d7f50a">&#9670;&nbsp;</a></span>libnet_cq_getlabel()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API const char* libnet_cq_getlabel </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>[Context Queue] Returns the canonical label associated with the context. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>pointer to the libnet context's label </dd></dl>
+
+</div>
+</div>
+<a id="a8233338e5050d8fc46c6d1f35ef32b5e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8233338e5050d8fc46c6d1f35ef32b5e">&#9670;&nbsp;</a></span>libnet_cq_head()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_t* libnet_cq_head </td>
+ <td>(</td>
+ <td class="paramtype">void&#160;</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>[Context Queue] Intiailizes the interator interface and set a write lock on the entire queue. This function is intended to be called just prior to interating through the entire list of contexts (with the probable intent of inject a series of packets in rapid succession). This function is often used as per the following:</p>
+<p>for (l = <a class="el" href="libnet-functions_8h.html#a8233338e5050d8fc46c6d1f35ef32b5e">libnet_cq_head()</a>; <a class="el" href="libnet-functions_8h.html#a7edc80233d439b7755fdc127cfd7f88d">libnet_cq_last()</a>; l = <a class="el" href="libnet-functions_8h.html#af21a48ca025b23dfcd5d10e9d1b924ba">libnet_cq_next()</a>) { ... }</p>
+<p>Much of the time, the application programmer will use the iterator as it is written above; as such, libnet provides a macro to do exactly that, <a class="el" href="libnet-macros_8h.html#af36eb84eee10c525720134cfadb50a3e">for_each_context_in_cq(l)</a>. Warning: do not call the iterator more than once in a single loop. </p><dl class="section return"><dt>Returns</dt><dd>the head of the context queue </dd></dl>
+
+</div>
+</div>
+<a id="a7edc80233d439b7755fdc127cfd7f88d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7edc80233d439b7755fdc127cfd7f88d">&#9670;&nbsp;</a></span>libnet_cq_last()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API int libnet_cq_last </td>
+ <td>(</td>
+ <td class="paramtype">void&#160;</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>[Context Queue] Check whether the iterator is at the last context in the queue. </p><dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">1</td><td>if at the end of the context queue </td></tr>
+ <tr><td class="paramname">0</td><td>otherwise </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="af21a48ca025b23dfcd5d10e9d1b924ba"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af21a48ca025b23dfcd5d10e9d1b924ba">&#9670;&nbsp;</a></span>libnet_cq_next()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_t* libnet_cq_next </td>
+ <td>(</td>
+ <td class="paramtype">void&#160;</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>[Context Queue] Get next context from the context queue. </p><dl class="section return"><dt>Returns</dt><dd>the next context from the context queue </dd></dl>
+
+</div>
+</div>
+<a id="a93d5ccdcdba31daacde82fc50f467412"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a93d5ccdcdba31daacde82fc50f467412">&#9670;&nbsp;</a></span>libnet_cq_remove()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_t* libnet_cq_remove </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>[Context Queue] Removes a specified context from the libnet context queue by specifying the libnet context pointer. Note the function will remove the specified context from the context queue and cleanup internal memory from the queue, it is up to the application programmer to free the returned libnet context with a call to <a class="el" href="libnet-functions_8h.html#a8ddea475d4051b695f519100755d6a05">libnet_destroy()</a>. Also, as it is not necessary to keep the libnet context pointer when initially adding it to the context queue, most application programmers will prefer to refer to entries on the context queue by canonical name and would use <a class="el" href="libnet-functions_8h.html#a90a6ea3b24de3906ca1cf9c78a7b5a5f">libnet_cq_remove_by_label()</a>. If the context queue is write locked, this function will fail. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>the pointer to the removed libnet context </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">NULL</td><td>on failure </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a90a6ea3b24de3906ca1cf9c78a7b5a5f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a90a6ea3b24de3906ca1cf9c78a7b5a5f">&#9670;&nbsp;</a></span>libnet_cq_remove_by_label()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_t* libnet_cq_remove_by_label </td>
+ <td>(</td>
+ <td class="paramtype">char *&#160;</td>
+ <td class="paramname"><em>label</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>[Context Queue] Removes a specified context from the libnet context queue by specifying the canonical name. Note the function will remove the specified context from the context queue and cleanup internal memory from the queue, it is up to the application programmer to free the returned libnet context with a call to <a class="el" href="libnet-functions_8h.html#a8ddea475d4051b695f519100755d6a05">libnet_destroy()</a>. If the context queue is write locked, this function will fail. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">label</td><td>canonical name of the context to remove </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>the pointer to the removed libnet context </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">NULL</td><td>on failure </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="ae071e441671c342ea2d3bbca979e2769"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae071e441671c342ea2d3bbca979e2769">&#9670;&nbsp;</a></span>libnet_cq_size()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API uint32_t libnet_cq_size </td>
+ <td>(</td>
+ <td class="paramtype">void&#160;</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>[Context Queue] Function returns the number of libnet contexts that are in the queue. </p><dl class="section return"><dt>Returns</dt><dd>the number of libnet contexts currently in the queue </dd></dl>
+
+</div>
+</div>
+<a id="a8ddea475d4051b695f519100755d6a05"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8ddea475d4051b695f519100755d6a05">&#9670;&nbsp;</a></span>libnet_destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API void libnet_destroy </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Shuts down the libnet session referenced by l. It closes the network interface and frees all internal memory structures associated with l. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a1c70d00eefe61b2f5902ab56c802e07c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1c70d00eefe61b2f5902ab56c802e07c">&#9670;&nbsp;</a></span>libnet_diag_dump_context()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API void libnet_diag_dump_context </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>[Diagnostic] Prints the contents of the given context. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="adb2f7d417f05a058c0c2c7f76b6f66e6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#adb2f7d417f05a058c0c2c7f76b6f66e6">&#9670;&nbsp;</a></span>libnet_diag_dump_hex()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void libnet_diag_dump_hex </td>
+ <td>(</td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>packet</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>len</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&#160;</td>
+ <td class="paramname"><em>swap</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">FILE *&#160;</td>
+ <td class="paramname"><em>stream</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>[Diagnostic] Function prints the contents of the supplied buffer to the supplied stream pointer. Will swap endianness based disposition of mode variable. Useful to be used in conjunction with the advanced interface and a culled packet. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">packet</td><td>the packet to print </td></tr>
+ <tr><td class="paramname">len</td><td>length of the packet in bytes </td></tr>
+ <tr><td class="paramname">swap</td><td>1 to swap byte order, 0 to not. Counter-intuitively, it is necessary to swap in order to see the byte order as it is on the wire (this may be a bug). </td></tr>
+ <tr><td class="paramname">stream</td><td>a stream pointer to print to </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a49e6023168b4f660ed8ff67dcc8ee228"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a49e6023168b4f660ed8ff67dcc8ee228">&#9670;&nbsp;</a></span>libnet_diag_dump_pblock()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API void libnet_diag_dump_pblock </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>[Diagnostic] Prints the contents of every pblock. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a59cc8a10dd7a94f01238f96417b08420"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a59cc8a10dd7a94f01238f96417b08420">&#9670;&nbsp;</a></span>libnet_diag_dump_pblock_type()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API char* libnet_diag_dump_pblock_type </td>
+ <td>(</td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>type</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>[Diagnostic] Returns the canonical name of the pblock type. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">type</td><td>pblock type </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>a string representing the pblock type type </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">unknown</td><td>for an unknown value </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="acf6dc1ece9e994d4f4d3e47e5b218f6c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#acf6dc1ece9e994d4f4d3e47e5b218f6c">&#9670;&nbsp;</a></span>libnet_get_hwaddr()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API struct libnet_ether_addr* libnet_get_hwaddr </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Returns the MAC address for the device libnet was initialized with. If libnet was initialized without a device the function will attempt to find one. If the function fails and returns NULL a call to <a class="el" href="libnet-functions_8h.html#a7932677fa8ddd7f512c7b154d91263e9">libnet_geterror()</a> will tell you why. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>a pointer to the MAC address or NULL </dd></dl>
+
+</div>
+</div>
+<a id="a0adcfdd368764d4c4ab610daefe56b3d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0adcfdd368764d4c4ab610daefe56b3d">&#9670;&nbsp;</a></span>libnet_get_ipaddr4()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API uint32_t libnet_get_ipaddr4 </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>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. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>a big endian IP address suitable for use in a libnet_build function </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td></td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a7ca153d8efe6650769765fbc23e2b312"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7ca153d8efe6650769765fbc23e2b312">&#9670;&nbsp;</a></span>libnet_get_ipaddr6()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API struct libnet_in6_addr libnet_get_ipaddr6 </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Returns the IPv6 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 in6addr_error, a call to libnet_geterrror() will tell you why. This function is not yet implemented for Win32 platforms. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">in6addr_error</td><td>on failure </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="ae0a1d32fdd169c55a0ce4c186a19b125"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae0a1d32fdd169c55a0ce4c186a19b125">&#9670;&nbsp;</a></span>libnet_get_prand()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API uint32_t libnet_get_prand </td>
+ <td>(</td>
+ <td class="paramtype">int&#160;</td>
+ <td class="paramname"><em>mod</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Generates an unsigned pseudo-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</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">mod</td><td>one the of LIBNET_PR* constants </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">1</td><td>on success </td></tr>
+ <tr><td class="paramname">-1</td><td>on failure </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="ab65f1cd5ef46ae93909e6dd45bcff0cb"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab65f1cd5ef46ae93909e6dd45bcff0cb">&#9670;&nbsp;</a></span>libnet_getdevice()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API const char* libnet_getdevice </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Returns the canonical name of the device used for packet injection. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>the canonical name of the device used for packet injection. Note it can be NULL without being an error. </dd></dl>
+
+</div>
+</div>
+<a id="a7932677fa8ddd7f512c7b154d91263e9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7932677fa8ddd7f512c7b154d91263e9">&#9670;&nbsp;</a></span>libnet_geterror()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API char* libnet_geterror </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Returns the last error set inside of the referenced libnet context. This function should be called anytime a function fails or an error condition is detected inside of libnet. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>an error string or NULL if no error has occurred </dd></dl>
+
+</div>
+</div>
+<a id="a301939dd9e773bec51a8a3cc8e09ca3b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a301939dd9e773bec51a8a3cc8e09ca3b">&#9670;&nbsp;</a></span>libnet_getfd()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API int libnet_getfd </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Returns the FILENO of the file descriptor used for packet injection. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>the file number of the file descriptor used for packet injection </dd></dl>
+
+</div>
+</div>
+<a id="a6173dfa2aaf953c8a36ebf347a567100"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6173dfa2aaf953c8a36ebf347a567100">&#9670;&nbsp;</a></span>libnet_getgre_length()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API uint32_t libnet_getgre_length </td>
+ <td>(</td>
+ <td class="paramtype">uint16_t&#160;</td>
+ <td class="paramname"><em>fv</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">fv</td><td>see <a class="el" href="libnet-functions_8h.html#a41e095c98e623f00618f6d306cb31289">libnet_build_gre()</a>. </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>size </dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="libnet-functions_8h.html#a41e095c98e623f00618f6d306cb31289">libnet_build_gre()</a>. </dd></dl>
+
+</div>
+</div>
+<a id="ad5c14b23de1fe0aaf36315c710972fcd"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad5c14b23de1fe0aaf36315c710972fcd">&#9670;&nbsp;</a></span>libnet_getpacket_size()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API uint32_t libnet_getpacket_size </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Returns the sum of the size of all of the pblocks inside of l (this should be the resulting packet size). </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>the size of the packet in l </dd></dl>
+
+</div>
+</div>
+<a id="a1e1bc31a56aad7f000e55d9f2ed002b9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1e1bc31a56aad7f000e55d9f2ed002b9">&#9670;&nbsp;</a></span>libnet_getpbuf()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API uint8_t* libnet_getpbuf </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Returns the pblock buffer contents for the specified ptag; a subsequent call to <a class="el" href="libnet-functions_8h.html#a6b945999765b5c5cfa2e496153fc7d03">libnet_getpbuf_size()</a> should be made to determine the size of the buffer. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>the ptag reference number </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>a pointer to the pblock buffer or NULL on error </dd></dl>
+
+</div>
+</div>
+<a id="a6b945999765b5c5cfa2e496153fc7d03"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6b945999765b5c5cfa2e496153fc7d03">&#9670;&nbsp;</a></span>libnet_getpbuf_size()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API uint32_t libnet_getpbuf_size </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Returns the pblock buffer size for the specified ptag; a previous call to <a class="el" href="libnet-functions_8h.html#a1e1bc31a56aad7f000e55d9f2ed002b9">libnet_getpbuf()</a> should be made to pull the actual buffer contents. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>the ptag reference number </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>the size of the pblock buffer </dd></dl>
+
+</div>
+</div>
+<a id="a62a7ac78ee69568e17927674786c1b69"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a62a7ac78ee69568e17927674786c1b69">&#9670;&nbsp;</a></span>libnet_hex_aton()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API uint8_t* libnet_hex_aton </td>
+ <td>(</td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int *&#160;</td>
+ <td class="paramname"><em>len</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Takes a colon separated hexidecimal address (from the command line) and returns a bytestring suitable for use in a libnet_build function. Note this function performs an implicit malloc and the return value should be freed after its use. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">s</td><td>the string to be parsed </td></tr>
+ <tr><td class="paramname">len</td><td>the resulting size of the returned byte string </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>a byte string or NULL on failure </dd></dl>
+
+</div>
+</div>
+<a id="a0a43add9ba39e677367ff167e807814b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0a43add9ba39e677367ff167e807814b">&#9670;&nbsp;</a></span>libnet_in6_is_error()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API int libnet_in6_is_error </td>
+ <td>(</td>
+ <td class="paramtype">struct libnet_in6_addr&#160;</td>
+ <td class="paramname"><em>addr</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Check a libnet_in6_addr structure for identity with in6addr_error. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">addr</td><td>address to check </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">1</td><td>if addr is in6addr_error </td></tr>
+ <tr><td class="paramname">0</td><td>if it is not </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="aced83ef40edb05a9fc1e129373fe44dd"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aced83ef40edb05a9fc1e129373fe44dd">&#9670;&nbsp;</a></span>libnet_init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API libnet_t* libnet_init </td>
+ <td>(</td>
+ <td class="paramtype">int&#160;</td>
+ <td class="paramname"><em>injection_type</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>device</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">char *&#160;</td>
+ <td class="paramname"><em>err_buf</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Creates the libnet environment. It initializes the library and returns a libnet context. If the injection_type is LIBNET_LINK or LIBNET_LINK_ADV, the function initializes the injection primitives for the link-layer interface enabling the application programmer to build packets starting at the data-link layer (which also provides more granular control over the IP layer). If libnet uses the link-layer and the device argument is non-NULL, the function attempts to use the specified network device for packet injection. This is either a canonical string that references the device (such as "eth0" for a 100MB Ethernet card on Linux or "fxp0" for a 100MB Ethernet card on OpenBSD) or the dots and decimals representation of the device's IP address (192.168.0.1). If device is NULL, libnet attempts to find a suitable device to use. If the injection_type is LIBNET_RAW4 or LIBNET_RAW4_ADV, the function initializes the injection primitives for the IPv4 raw socket interface. The final argument, err_buf, should be a buffer of size LIBNET_ERRBUF_SIZE and holds an error message if the function fails. This function requires root privileges to execute successfully. Upon success, the function returns a valid libnet context for use in later function calls; upon failure, the function returns NULL. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">injection_type</td><td>packet injection type (LIBNET_LINK, LIBNET_LINK_ADV, LIBNET_RAW4, LIBNET_RAW4_ADV, LIBNET_RAW6, LIBNET_RAW6_ADV) </td></tr>
+ <tr><td class="paramname">device</td><td>the interface to use (NULL and libnet will choose one) </td></tr>
+ <tr><td class="paramname">err_buf</td><td>will contain an error message on failure </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>libnet context ready for use or NULL on error. </dd></dl>
+
+</div>
+</div>
+<a id="a634e7d60fd7117c948fafea0ff25f77b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a634e7d60fd7117c948fafea0ff25f77b">&#9670;&nbsp;</a></span>libnet_name2addr4()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API uint32_t libnet_name2addr4 </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>host_name</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>use_name</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Takes a dotted decimal string or a canonical DNS name and returns a network byte ordered IPv4 address. This may incur a DNS lookup if mode is set to LIBNET_RESOLVE and host_name refers to a canonical DNS name. If mode is set to LIBNET_DONT_RESOLVE no DNS lookup will occur. The function can fail if DNS lookup fails or if mode is set to LIBNET_DONT_RESOLVE and host_name refers to a canonical DNS name. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">host_name</td><td>pointer to a string containing a presentation format host name </td></tr>
+ <tr><td class="paramname">use_name</td><td>LIBNET_RESOLVE or LIBNET_DONT_RESOLVE </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>address in network byte order </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>(2^32 - 1) on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="af525a32eb69e48519f84abed4231643a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af525a32eb69e48519f84abed4231643a">&#9670;&nbsp;</a></span>libnet_name2addr6()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API struct libnet_in6_addr libnet_name2addr6 </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>host_name</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t&#160;</td>
+ <td class="paramname"><em>use_name</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Takes a dotted decimal string or a canonical DNS name and returns a network byte ordered IPv6 address. This may incur a DNS lookup if mode is set to LIBNET_RESOLVE and host_name refers to a canonical DNS name. If mode is set to LIBNET_DONT_RESOLVE no DNS lookup will occur. The function can fail if DNS lookup fails or if mode is set to LIBNET_DONT_RESOLVE and host_name refers to a canonical DNS name. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">host_name</td><td>pointer to a string containing a presentation format host name </td></tr>
+ <tr><td class="paramname">use_name</td><td>LIBNET_RESOLVE or LIBNET_DONT_RESOLVE </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>network byte ordered IPv6 address structure </dd></dl>
+
+</div>
+</div>
+<a id="a155f2da7f242051d5d80691c1754ca9c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a155f2da7f242051d5d80691c1754ca9c">&#9670;&nbsp;</a></span>libnet_plist_chain_dump()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API int libnet_plist_chain_dump </td>
+ <td>(</td>
+ <td class="paramtype">libnet_plist_t *&#160;</td>
+ <td class="paramname"><em>plist</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Runs through the port list and prints the contents of the port list chain list to stdout. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">plist</td><td>previously created portlist </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">1</td><td>on success </td></tr>
+ <tr><td class="paramname">-1</td><td>on failure </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="adbd62cbfc5a072a9e77f1b64af78b46e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#adbd62cbfc5a072a9e77f1b64af78b46e">&#9670;&nbsp;</a></span>libnet_plist_chain_dump_string()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API char* libnet_plist_chain_dump_string </td>
+ <td>(</td>
+ <td class="paramtype">libnet_plist_t *&#160;</td>
+ <td class="paramname"><em>plist</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Runs through the port list and prints the contents of the port list chain list to string. This function uses strdup and is not re-entrant. It also has a memory leak and should not really be used. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">plist</td><td>previously created portlist </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>a printable string containing the port list contents on success or NULL on error </dd></dl>
+
+</div>
+</div>
+<a id="a59623a76b513ae6af05befded04f65d2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a59623a76b513ae6af05befded04f65d2">&#9670;&nbsp;</a></span>libnet_plist_chain_free()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API int libnet_plist_chain_free </td>
+ <td>(</td>
+ <td class="paramtype">libnet_plist_t *&#160;</td>
+ <td class="paramname"><em>plist</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Frees all memory associated with port list chain. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">plist</td><td>previously created portlist </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">1</td><td>on success </td></tr>
+ <tr><td class="paramname">-1</td><td>on failure </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="aaedc1110a9c8deab0909f15e141f5883"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aaedc1110a9c8deab0909f15e141f5883">&#9670;&nbsp;</a></span>libnet_plist_chain_new()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API int libnet_plist_chain_new </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_plist_t **&#160;</td>
+ <td class="paramname"><em>plist</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">char *&#160;</td>
+ <td class="paramname"><em>token_list</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>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</p><ol type="1">
+<li>Upon failure, the function returns -1 and <a class="el" href="libnet-functions_8h.html#a7932677fa8ddd7f512c7b154d91263e9">libnet_geterror()</a> can tell you why. <dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">plist</td><td>if successful, will refer to the portlist, if not, NULL </td></tr>
+ <tr><td class="paramname">token_list</td><td>string containing the port list primitive </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">1</td><td>on success </td></tr>
+ <tr><td class="paramname">-1</td><td>on failure </td></tr>
+ </table>
+ </dd>
+</dl>
+</li>
+</ol>
+
+</div>
+</div>
+<a id="ac4b56b34eb9124cb6b70fb9bff5ba6f4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac4b56b34eb9124cb6b70fb9bff5ba6f4">&#9670;&nbsp;</a></span>libnet_plist_chain_next_pair()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API int libnet_plist_chain_next_pair </td>
+ <td>(</td>
+ <td class="paramtype">libnet_plist_t *&#160;</td>
+ <td class="paramname"><em>plist</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t *&#160;</td>
+ <td class="paramname"><em>bport</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint16_t *&#160;</td>
+ <td class="paramname"><em>eport</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>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. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">plist</td><td>previously created portlist </td></tr>
+ <tr><td class="paramname">bport</td><td>will contain the beginning port number or 0 </td></tr>
+ <tr><td class="paramname">eport</td><td>will contain the ending port number or 0 </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">1</td><td>on success </td></tr>
+ <tr><td class="paramname">0</td><td>if empty </td></tr>
+ <tr><td class="paramname">-1</td><td>on failure </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a0a995dfd68f20b80394507b9968ae951"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0a995dfd68f20b80394507b9968ae951">&#9670;&nbsp;</a></span>libnet_seed_prand()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API int libnet_seed_prand </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Seeds the pseudo-random number generator. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">1</td><td>on success </td></tr>
+ <tr><td class="paramname">-1</td><td>on failure </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a8fe5ad751cf8320b0ac56a0736332ec3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8fe5ad751cf8320b0ac56a0736332ec3">&#9670;&nbsp;</a></span>libnet_stats()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API void libnet_stats </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">struct libnet_stats *&#160;</td>
+ <td class="paramname"><em>ls</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Fills in a libnet_stats structure with packet injection statistics (packets written, bytes written, packet sending errors). </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ls</td><td>pointer to a libnet statistics structure </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="af17b19befbe13e23a240739b19846503"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af17b19befbe13e23a240739b19846503">&#9670;&nbsp;</a></span>libnet_toggle_checksum()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API int libnet_toggle_checksum </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">libnet_ptag_t&#160;</td>
+ <td class="paramname"><em>ptag</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&#160;</td>
+ <td class="paramname"><em>mode</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>If a given protocol header is built with the checksum field set to "0", by default libnet will calculate the header checksum prior to injection. If the header is set to any other value, by default libnet will not calculate the header checksum. To over-ride this behavior, use <a class="el" href="libnet-functions_8h.html#af17b19befbe13e23a240739b19846503">libnet_toggle_checksum()</a>. Switches auto-checksumming on or off for the specified ptag. If mode is set to LIBNET_ON, libnet will mark the specified ptag to calculate a checksum for the ptag prior to injection. This assumes that the ptag refers to a protocol that has a checksum field. If mode is set to LIBNET_OFF, libnet will clear the checksum flag and no checksum will be computed prior to injection. This assumes that the programmer will assign a value (zero or otherwise) to the checksum field. Often times this is useful if a precomputed checksum or some other predefined value is going to be used. Note that when libnet is initialized with LIBNET_RAW4, the IPv4 header checksum will always be computed by the kernel prior to injection, regardless of what the programmer sets. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ <tr><td class="paramname">ptag</td><td>the ptag reference number </td></tr>
+ <tr><td class="paramname">mode</td><td>LIBNET_ON or LIBNET_OFF </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">1</td><td>on success </td></tr>
+ <tr><td class="paramname">-1</td><td>on failure </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="ac4a33a98186ad71f7ae4c559b039af0f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac4a33a98186ad71f7ae4c559b039af0f">&#9670;&nbsp;</a></span>libnet_version()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API const char* libnet_version </td>
+ <td>(</td>
+ <td class="paramtype">void&#160;</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Returns the version of libnet. </p><dl class="section return"><dt>Returns</dt><dd>the libnet version </dd></dl>
+
+</div>
+</div>
+<a id="a3ec16c8aa5c7ae59ff63ce4a9329ab90"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3ec16c8aa5c7ae59ff63ce4a9329ab90">&#9670;&nbsp;</a></span>libnet_write()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">LIBNET_API int libnet_write </td>
+ <td>(</td>
+ <td class="paramtype">libnet_t *&#160;</td>
+ <td class="paramname"><em>l</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Writes a prebuilt packet to the network. The function assumes that l was previously initialized (via a call to <a class="el" href="libnet-functions_8h.html#aced83ef40edb05a9fc1e129373fe44dd">libnet_init()</a>) and that a previously constructed packet has been built inside this context (via one or more calls to the libnet_build* family of functions) and is ready to go. Depending on how libnet was initialized, the function will write the packet to the wire either via the raw or link layer interface. The function will also bump up the internal libnet stat counters which are retrievable via <a class="el" href="libnet-functions_8h.html#a8fe5ad751cf8320b0ac56a0736332ec3">libnet_stats()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">l</td><td>pointer to a libnet context </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>the number of bytes written </dd></dl>
+<dl class="retval"><dt>Return values</dt><dd>
+ <table class="retval">
+ <tr><td class="paramname">-1</td><td>on error </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+<hr>
+<address><small>
+Documentation for <a href="https://github.com/sgeto/libnet">libnet</a> (version 1.2-rc3).<br>
+Generated on Wed Apr 26 2017 by
+<a href="http://www.doxygen.org/">Doxygen 1.8.14</a>.
+</small></address>
+</body>
+</html>
diff --git a/doc/api/libnet-functions_8h__dep__incl.png b/doc/api/libnet-functions_8h__dep__incl.png
new file mode 100644
index 0000000..a989c03
--- /dev/null
+++ b/doc/api/libnet-functions_8h__dep__incl.png
Binary files differ
diff --git a/doc/api/libnet-functions_8h_source.html b/doc/api/libnet-functions_8h_source.html
new file mode 100644
index 0000000..bbf89fd
--- /dev/null
+++ b/doc/api/libnet-functions_8h_source.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.14"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>libnet: API Documentation: libnet/libnet-functions.h Source File</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="libnet_api_stylesheet.css_tmpl" rel="stylesheet" type="text/css"/>
+</head>
+<!-- Generated by Doxygen 1.8.14 -->
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_2e83b025d21fe7b9c524d93377692ce4.html">libnet</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">libnet-functions.h</div> </div>
+</div><!--header-->
+<div class="contents">
+<a href="libnet-functions_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * libnet</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> * libnet-functions.h - function prototypes</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> * Copyright (c) 1998 - 2004 Mike D. Schiffman &lt;mike@infonexus.com&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * All rights reserved.</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * Redistribution and use in source and binary forms, with or without</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * modification, are permitted provided that the following conditions</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * are met:</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * 1. Redistributions of source code must retain the above copyright</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * notice, this list of conditions and the following disclaimer.</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * notice, this list of conditions and the following disclaimer in the</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * documentation and/or other materials provided with the distribution.</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS&#39;&#39; AND</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment"> * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment"> * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="comment"> * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment"> * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment"> * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment"> * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment"> * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment"> * SUCH DAMAGE.</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#ifndef __LIBNET_FUNCTIONS_H</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#define __LIBNET_FUNCTIONS_H</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;LIBNET_API</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;libnet_t *</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;<a class="code" href="libnet-functions_8h.html#aced83ef40edb05a9fc1e129373fe44dd">libnet_init</a>(<span class="keywordtype">int</span> injection_type, <span class="keyword">const</span> <span class="keywordtype">char</span> *device, <span class="keywordtype">char</span> *err_buf);</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;LIBNET_API</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;<a class="code" href="libnet-functions_8h.html#a8ddea475d4051b695f519100755d6a05">libnet_destroy</a>(libnet_t *l);</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;LIBNET_API</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;<a class="code" href="libnet-functions_8h.html#a9ae9cb6e191e382c653237451f9bacd6">libnet_clear_packet</a>(libnet_t *l);</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;LIBNET_API</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160;<a class="code" href="libnet-functions_8h.html#a8fe5ad751cf8320b0ac56a0736332ec3">libnet_stats</a>(libnet_t *l, <span class="keyword">struct</span> <a class="code" href="libnet-functions_8h.html#a8fe5ad751cf8320b0ac56a0736332ec3">libnet_stats</a> *ls);</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;LIBNET_API</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;<span class="keywordtype">int</span> </div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;<a class="code" href="libnet-functions_8h.html#a301939dd9e773bec51a8a3cc8e09ca3b">libnet_getfd</a>(libnet_t *l);</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;LIBNET_API</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;<span class="keyword">const</span> <span class="keywordtype">char</span> *</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;<a class="code" href="libnet-functions_8h.html#ab65f1cd5ef46ae93909e6dd45bcff0cb">libnet_getdevice</a>(libnet_t *l);</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160;LIBNET_API</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;uint8_t *</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;<a class="code" href="libnet-functions_8h.html#a1e1bc31a56aad7f000e55d9f2ed002b9">libnet_getpbuf</a>(libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160;</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;LIBNET_API</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;uint32_t</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;<a class="code" href="libnet-functions_8h.html#a6b945999765b5c5cfa2e496153fc7d03">libnet_getpbuf_size</a>(libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;LIBNET_API</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;<span class="keywordtype">char</span> *</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160;<a class="code" href="libnet-functions_8h.html#a7932677fa8ddd7f512c7b154d91263e9">libnet_geterror</a>(libnet_t *l);</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160;LIBNET_API</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;uint32_t</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;<a class="code" href="libnet-functions_8h.html#ad5c14b23de1fe0aaf36315c710972fcd">libnet_getpacket_size</a>(libnet_t *l);</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160;LIBNET_API</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160;<a class="code" href="libnet-functions_8h.html#a0a995dfd68f20b80394507b9968ae951">libnet_seed_prand</a>(libnet_t *l);</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160;LIBNET_API</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160;uint32_t</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160;<a class="code" href="libnet-functions_8h.html#ae0a1d32fdd169c55a0ce4c186a19b125">libnet_get_prand</a>(<span class="keywordtype">int</span> mod);</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160;</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160;LIBNET_API</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160;<a class="code" href="libnet-functions_8h.html#af17b19befbe13e23a240739b19846503">libnet_toggle_checksum</a>(libnet_t *l, libnet_ptag_t ptag, <span class="keywordtype">int</span> mode);</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160;</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160;LIBNET_API</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160;<span class="keywordtype">char</span> *</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160;<a class="code" href="libnet-functions_8h.html#added478f7cb16e00cf34f44816e33083">libnet_addr2name4</a>(uint32_t in, uint8_t use_name);</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160;</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160;LIBNET_API</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160;uint32_t</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160;<a class="code" href="libnet-functions_8h.html#a634e7d60fd7117c948fafea0ff25f77b">libnet_name2addr4</a>(libnet_t *l, <span class="keyword">const</span> <span class="keywordtype">char</span> *host_name, uint8_t use_name);</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160;</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <span class="keyword">struct </span>libnet_in6_addr in6addr_error;</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160;</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160;LIBNET_API</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160;<a class="code" href="libnet-functions_8h.html#a0a43add9ba39e677367ff167e807814b">libnet_in6_is_error</a>(<span class="keyword">struct</span> libnet_in6_addr addr);</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160;</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160;LIBNET_API</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160;<span class="keyword">struct </span>libnet_in6_addr</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160;<a class="code" href="libnet-functions_8h.html#af525a32eb69e48519f84abed4231643a">libnet_name2addr6</a>(libnet_t *l, <span class="keyword">const</span> <span class="keywordtype">char</span> *host_name, uint8_t use_name);</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160;</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160;LIBNET_API</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160;<a class="code" href="libnet-functions_8h.html#a50fcb283db9884651c59d79ebd825bc4">libnet_addr2name6_r</a>(<span class="keyword">struct</span> libnet_in6_addr addr, uint8_t use_name,</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160;<span class="keywordtype">char</span> *host_name, <span class="keywordtype">int</span> host_name_len);</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160;</div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160;LIBNET_API</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160;<a class="code" href="libnet-functions_8h.html#aaedc1110a9c8deab0909f15e141f5883">libnet_plist_chain_new</a>(libnet_t *l, libnet_plist_t **plist, <span class="keywordtype">char</span> *token_list);</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160;</div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160;LIBNET_API</div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160;<a class="code" href="libnet-functions_8h.html#ac4b56b34eb9124cb6b70fb9bff5ba6f4">libnet_plist_chain_next_pair</a>(libnet_plist_t *plist, uint16_t *bport, </div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160;uint16_t *eport); </div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160;</div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160;LIBNET_API</div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160;<a class="code" href="libnet-functions_8h.html#a155f2da7f242051d5d80691c1754ca9c">libnet_plist_chain_dump</a>(libnet_plist_t *plist);</div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160;</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span>&#160;LIBNET_API</div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>&#160;<span class="keywordtype">char</span> *</div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>&#160;<a class="code" href="libnet-functions_8h.html#adbd62cbfc5a072a9e77f1b64af78b46e">libnet_plist_chain_dump_string</a>(libnet_plist_t *plist);</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>&#160;</div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span>&#160;LIBNET_API</div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span>&#160;<a class="code" href="libnet-functions_8h.html#a59623a76b513ae6af05befded04f65d2">libnet_plist_chain_free</a>(libnet_plist_t *plist);</div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>&#160;</div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span>&#160;LIBNET_API</div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>&#160;<a class="code" href="libnet-functions_8h.html#acbab0d304c5e9d36438050ac6d233132">libnet_build_802_1q</a>(<span class="keyword">const</span> uint8_t *dst, <span class="keyword">const</span> uint8_t *src, uint16_t tpi,</div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span>&#160;uint8_t priority, uint8_t cfi, uint16_t vlan_id, uint16_t len_proto,</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>&#160;</div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>&#160;LIBNET_API</div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>&#160;<a class="code" href="libnet-functions_8h.html#ab33fc501031e68af303fbffb7643b11d">libnet_build_802_1x</a>(uint8_t eap_ver, uint8_t eap_type, uint16_t length, </div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>&#160;</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>&#160;LIBNET_API</div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>&#160;<a class="code" href="libnet-functions_8h.html#a6f616f8d4646db5ada510991cce80808">libnet_build_802_2</a>(uint8_t dsap, uint8_t ssap, uint8_t control,</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span>&#160;</div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span>&#160;LIBNET_API</div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span>&#160;<a class="code" href="libnet-functions_8h.html#a22f004a0b0d496762fbd056ca5d31eeb">libnet_build_802_2snap</a>(uint8_t dsap, uint8_t ssap, uint8_t control, </div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span>&#160;uint8_t *oui, uint16_t type, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s,</div><div class="line"><a name="l00500"></a><span class="lineno"> 500</span>&#160;libnet_t *l, libnet_ptag_t ptag); </div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span>&#160;</div><div class="line"><a name="l00518"></a><span class="lineno"> 518</span>&#160;LIBNET_API</div><div class="line"><a name="l00519"></a><span class="lineno"> 519</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00520"></a><span class="lineno"> 520</span>&#160;<a class="code" href="libnet-functions_8h.html#ab6777b0c3c3b80eaa465686654f668e8">libnet_build_802_3</a>(<span class="keyword">const</span> uint8_t *dst, <span class="keyword">const</span> uint8_t *src, uint16_t len, </div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span>&#160;</div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span>&#160;LIBNET_API</div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span>&#160;<a class="code" href="libnet-functions_8h.html#acb97a898e200c1aaea6081545f2fcb39">libnet_build_ethernet</a>(<span class="keyword">const</span> uint8_t *dst, <span class="keyword">const</span> uint8_t *src, uint16_t type, </div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span>&#160;</div><div class="line"><a name="l00556"></a><span class="lineno"> 556</span>&#160;LIBNET_API</div><div class="line"><a name="l00557"></a><span class="lineno"> 557</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span>&#160;<a class="code" href="libnet-functions_8h.html#a6da323c2eb9eeab293cdfd99ceb134b5">libnet_autobuild_ethernet</a>(<span class="keyword">const</span> uint8_t *dst, uint16_t type, libnet_t *l);</div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span>&#160;</div><div class="line"><a name="l00577"></a><span class="lineno"> 577</span>&#160;LIBNET_API</div><div class="line"><a name="l00578"></a><span class="lineno"> 578</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00579"></a><span class="lineno"> 579</span>&#160;<a class="code" href="libnet-functions_8h.html#ab8c2a7a3572bcfef2705ab05c8ef12bc">libnet_build_fddi</a>(uint8_t fc, <span class="keyword">const</span> uint8_t *dst, <span class="keyword">const</span> uint8_t *src, uint8_t dsap,</div><div class="line"><a name="l00580"></a><span class="lineno"> 580</span>&#160;uint8_t ssap, uint8_t cf, <span class="keyword">const</span> uint8_t *oui, uint16_t type, <span class="keyword">const</span> uint8_t* payload,</div><div class="line"><a name="l00581"></a><span class="lineno"> 581</span>&#160;uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l00582"></a><span class="lineno"> 582</span>&#160;</div><div class="line"><a name="l00596"></a><span class="lineno"> 596</span>&#160;LIBNET_API</div><div class="line"><a name="l00597"></a><span class="lineno"> 597</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00598"></a><span class="lineno"> 598</span>&#160;<a class="code" href="libnet-functions_8h.html#a367d0539e0c7484ac4e0092ced22ca8e">libnet_autobuild_fddi</a>(uint8_t fc, <span class="keyword">const</span> uint8_t *dst, uint8_t dsap, uint8_t ssap,</div><div class="line"><a name="l00599"></a><span class="lineno"> 599</span>&#160;uint8_t cf, <span class="keyword">const</span> uint8_t *oui, uint16_t type, libnet_t *l);</div><div class="line"><a name="l00600"></a><span class="lineno"> 600</span>&#160;</div><div class="line"><a name="l00621"></a><span class="lineno"> 621</span>&#160;LIBNET_API</div><div class="line"><a name="l00622"></a><span class="lineno"> 622</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00623"></a><span class="lineno"> 623</span>&#160;<a class="code" href="libnet-functions_8h.html#ab606fadc44daa426fa4ba8b43bee5ece">libnet_build_arp</a>(uint16_t hrd, uint16_t pro, uint8_t hln, uint8_t pln,</div><div class="line"><a name="l00624"></a><span class="lineno"> 624</span>&#160;uint16_t op, <span class="keyword">const</span> uint8_t *sha, <span class="keyword">const</span> uint8_t *spa, <span class="keyword">const</span> uint8_t *tha, <span class="keyword">const</span> uint8_t *tpa,</div><div class="line"><a name="l00625"></a><span class="lineno"> 625</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l00626"></a><span class="lineno"> 626</span>&#160;</div><div class="line"><a name="l00640"></a><span class="lineno"> 640</span>&#160;LIBNET_API</div><div class="line"><a name="l00641"></a><span class="lineno"> 641</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00642"></a><span class="lineno"> 642</span>&#160;<a class="code" href="libnet-functions_8h.html#aa1bb2efa1cec14b12f1ce6210f20b358">libnet_autobuild_arp</a>(uint16_t op, <span class="keyword">const</span> uint8_t *sha, <span class="keyword">const</span> uint8_t *spa, <span class="keyword">const</span> uint8_t *tha,</div><div class="line"><a name="l00643"></a><span class="lineno"> 643</span>&#160;uint8_t *tpa, libnet_t *l);</div><div class="line"><a name="l00644"></a><span class="lineno"> 644</span>&#160;</div><div class="line"><a name="l00663"></a><span class="lineno"> 663</span>&#160;LIBNET_API</div><div class="line"><a name="l00664"></a><span class="lineno"> 664</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00665"></a><span class="lineno"> 665</span>&#160;<a class="code" href="libnet-functions_8h.html#ad096d303ddcddbd63ea269453bd26a20">libnet_build_tcp</a>(uint16_t sp, uint16_t dp, uint32_t seq, uint32_t ack,</div><div class="line"><a name="l00666"></a><span class="lineno"> 666</span>&#160;uint8_t control, uint16_t win, uint16_t sum, uint16_t urg, uint16_t len, </div><div class="line"><a name="l00667"></a><span class="lineno"> 667</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l00668"></a><span class="lineno"> 668</span>&#160;</div><div class="line"><a name="l00685"></a><span class="lineno"> 685</span>&#160;LIBNET_API</div><div class="line"><a name="l00686"></a><span class="lineno"> 686</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00687"></a><span class="lineno"> 687</span>&#160;<a class="code" href="libnet-functions_8h.html#aec6344132528e6903837b0d8909ad08c">libnet_build_tcp_options</a>(<span class="keyword">const</span> uint8_t *options, uint32_t options_s, libnet_t *l,</div><div class="line"><a name="l00688"></a><span class="lineno"> 688</span>&#160;libnet_ptag_t ptag);</div><div class="line"><a name="l00689"></a><span class="lineno"> 689</span>&#160;</div><div class="line"><a name="l00703"></a><span class="lineno"> 703</span>&#160;LIBNET_API</div><div class="line"><a name="l00704"></a><span class="lineno"> 704</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00705"></a><span class="lineno"> 705</span>&#160;<a class="code" href="libnet-functions_8h.html#a0ae166a293c0495431246fe0d0ba66f6">libnet_build_udp</a>(uint16_t sp, uint16_t dp, uint16_t len, uint16_t sum,</div><div class="line"><a name="l00706"></a><span class="lineno"> 706</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l00707"></a><span class="lineno"> 707</span>&#160;</div><div class="line"><a name="l00728"></a><span class="lineno"> 728</span>&#160;LIBNET_API</div><div class="line"><a name="l00729"></a><span class="lineno"> 729</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00730"></a><span class="lineno"> 730</span>&#160;<a class="code" href="libnet-functions_8h.html#aed8b33a329bda096ecac629e92e9bca5">libnet_build_cdp</a>(uint8_t version, uint8_t ttl, uint16_t sum, uint16_t type,</div><div class="line"><a name="l00731"></a><span class="lineno"> 731</span>&#160;uint16_t value_s, <span class="keyword">const</span> uint8_t *value, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s,</div><div class="line"><a name="l00732"></a><span class="lineno"> 732</span>&#160;libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l00733"></a><span class="lineno"> 733</span>&#160;</div><div class="line"><a name="l00749"></a><span class="lineno"> 749</span>&#160;LIBNET_API</div><div class="line"><a name="l00750"></a><span class="lineno"> 750</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00751"></a><span class="lineno"> 751</span>&#160;<a class="code" href="libnet-functions_8h.html#a4a4d3dc8f02e6fe6629e35e37ece0264">libnet_build_icmpv4_echo</a>(uint8_t type, uint8_t code, uint16_t sum,</div><div class="line"><a name="l00752"></a><span class="lineno"> 752</span>&#160;uint16_t <span class="keywordtype">id</span>, uint16_t seq, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s,</div><div class="line"><a name="l00753"></a><span class="lineno"> 753</span>&#160;libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l00754"></a><span class="lineno"> 754</span>&#160;</div><div class="line"><a name="l00771"></a><span class="lineno"> 771</span>&#160;LIBNET_API</div><div class="line"><a name="l00772"></a><span class="lineno"> 772</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00773"></a><span class="lineno"> 773</span>&#160;<a class="code" href="libnet-functions_8h.html#ab403c63ae76d0bc59b6641e3c821550c">libnet_build_icmpv4_mask</a>(uint8_t type, uint8_t code, uint16_t sum,</div><div class="line"><a name="l00774"></a><span class="lineno"> 774</span>&#160;uint16_t <span class="keywordtype">id</span>, uint16_t seq, uint32_t mask, <span class="keyword">const</span> uint8_t* payload,</div><div class="line"><a name="l00775"></a><span class="lineno"> 775</span>&#160;uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l00776"></a><span class="lineno"> 776</span>&#160;</div><div class="line"><a name="l00791"></a><span class="lineno"> 791</span>&#160;LIBNET_API</div><div class="line"><a name="l00792"></a><span class="lineno"> 792</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00793"></a><span class="lineno"> 793</span>&#160;<a class="code" href="libnet-functions_8h.html#a83197de705eb7929e8216f5771aa4b96">libnet_build_icmpv4_unreach</a>(uint8_t type, uint8_t code, uint16_t sum,</div><div class="line"><a name="l00794"></a><span class="lineno"> 794</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l00795"></a><span class="lineno"> 795</span>&#160;</div><div class="line"><a name="l00811"></a><span class="lineno"> 811</span>&#160;LIBNET_API</div><div class="line"><a name="l00812"></a><span class="lineno"> 812</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00813"></a><span class="lineno"> 813</span>&#160;<a class="code" href="libnet-functions_8h.html#a6df9db28162c58a2cc356b3a87a16f6b">libnet_build_icmpv4_redirect</a>(uint8_t type, uint8_t code, uint16_t sum,</div><div class="line"><a name="l00814"></a><span class="lineno"> 814</span>&#160;uint32_t gateway, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,</div><div class="line"><a name="l00815"></a><span class="lineno"> 815</span>&#160;libnet_ptag_t ptag);</div><div class="line"><a name="l00816"></a><span class="lineno"> 816</span>&#160;</div><div class="line"><a name="l00832"></a><span class="lineno"> 832</span>&#160;LIBNET_API</div><div class="line"><a name="l00833"></a><span class="lineno"> 833</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00834"></a><span class="lineno"> 834</span>&#160;<a class="code" href="libnet-functions_8h.html#a4f2eb3f11fd921b0fd0948cf8ef37c91">libnet_build_icmpv4_timeexceed</a>(uint8_t type, uint8_t code, uint16_t sum,</div><div class="line"><a name="l00835"></a><span class="lineno"> 835</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l00836"></a><span class="lineno"> 836</span>&#160;</div><div class="line"><a name="l00855"></a><span class="lineno"> 855</span>&#160;LIBNET_API</div><div class="line"><a name="l00856"></a><span class="lineno"> 856</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00857"></a><span class="lineno"> 857</span>&#160;<a class="code" href="libnet-functions_8h.html#a926f33ff4ea64923b49f16f8c5f7286d">libnet_build_icmpv4_timestamp</a>(uint8_t type, uint8_t code, uint16_t sum,</div><div class="line"><a name="l00858"></a><span class="lineno"> 858</span>&#160;uint16_t <span class="keywordtype">id</span>, uint16_t seq, uint32_t otime, uint32_t rtime, uint32_t ttime,</div><div class="line"><a name="l00859"></a><span class="lineno"> 859</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l00860"></a><span class="lineno"> 860</span>&#160;</div><div class="line"><a name="l00876"></a><span class="lineno"> 876</span>&#160;LIBNET_API</div><div class="line"><a name="l00877"></a><span class="lineno"> 877</span>&#160;libnet_ptag_t <a class="code" href="libnet-functions_8h.html#a09a512c9f670528f7f1c9fe9775a0a61">libnet_build_icmpv6_echo</a>(uint8_t type, uint8_t code, uint16_t</div><div class="line"><a name="l00878"></a><span class="lineno"> 878</span>&#160; sum, uint16_t <span class="keywordtype">id</span>, uint16_t seq, uint8_t *payload, uint32_t payload_s,</div><div class="line"><a name="l00879"></a><span class="lineno"> 879</span>&#160; libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l00880"></a><span class="lineno"> 880</span>&#160;</div><div class="line"><a name="l00895"></a><span class="lineno"> 895</span>&#160;LIBNET_API</div><div class="line"><a name="l00896"></a><span class="lineno"> 896</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00897"></a><span class="lineno"> 897</span>&#160;<a class="code" href="libnet-functions_8h.html#a86ee5967b07a4fe49af301add8656450">libnet_build_icmpv6_unreach</a>(uint8_t type, uint8_t code, uint16_t sum,</div><div class="line"><a name="l00898"></a><span class="lineno"> 898</span>&#160;uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l00899"></a><span class="lineno"> 899</span>&#160;</div><div class="line"><a name="l00915"></a><span class="lineno"> 915</span>&#160;LIBNET_API</div><div class="line"><a name="l00916"></a><span class="lineno"> 916</span>&#160;libnet_ptag_t <a class="code" href="libnet-functions_8h.html#aa184e1e69a7fc7161d484dcdca4f74db">libnet_build_icmpv6_ndp_nsol</a>(uint8_t type, uint8_t code,</div><div class="line"><a name="l00917"></a><span class="lineno"> 917</span>&#160; uint16_t sum, <span class="keyword">struct</span> libnet_in6_addr target, uint8_t *payload, uint32_t</div><div class="line"><a name="l00918"></a><span class="lineno"> 918</span>&#160; payload_s, libnet_t* l, libnet_ptag_t ptag);</div><div class="line"><a name="l00919"></a><span class="lineno"> 919</span>&#160;</div><div class="line"><a name="l00936"></a><span class="lineno"> 936</span>&#160;LIBNET_API</div><div class="line"><a name="l00937"></a><span class="lineno"> 937</span>&#160;libnet_ptag_t <a class="code" href="libnet-functions_8h.html#a0d2d7119072c0b98f1248172a2b7885d">libnet_build_icmpv6_ndp_nadv</a>(uint8_t type, uint8_t code,</div><div class="line"><a name="l00938"></a><span class="lineno"> 938</span>&#160; uint16_t sum, uint32_t flags, <span class="keyword">struct</span> libnet_in6_addr target, uint8_t</div><div class="line"><a name="l00939"></a><span class="lineno"> 939</span>&#160; *payload, uint32_t payload_s, libnet_t* l, libnet_ptag_t ptag);</div><div class="line"><a name="l00940"></a><span class="lineno"> 940</span>&#160;</div><div class="line"><a name="l00951"></a><span class="lineno"> 951</span>&#160;LIBNET_API</div><div class="line"><a name="l00952"></a><span class="lineno"> 952</span>&#160;libnet_ptag_t <a class="code" href="libnet-functions_8h.html#aecee0675d61d3ff71d79c64c74a7c924">libnet_build_icmpv6_ndp_opt</a>(uint8_t type, uint8_t* option,</div><div class="line"><a name="l00953"></a><span class="lineno"> 953</span>&#160; uint32_t option_s, libnet_t* l, libnet_ptag_t ptag);</div><div class="line"><a name="l00954"></a><span class="lineno"> 954</span>&#160;</div><div class="line"><a name="l00970"></a><span class="lineno"> 970</span>&#160;LIBNET_API</div><div class="line"><a name="l00971"></a><span class="lineno"> 971</span>&#160;libnet_ptag_t</div><div class="line"><a name="l00972"></a><span class="lineno"> 972</span>&#160;<a class="code" href="libnet-functions_8h.html#afbeeb2c1c377c59aa2747dff4db4d5e8">libnet_build_igmp</a>(uint8_t type, uint8_t reserved, uint16_t sum, uint32_t ip,</div><div class="line"><a name="l00973"></a><span class="lineno"> 973</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l00974"></a><span class="lineno"> 974</span>&#160;</div><div class="line"><a name="l00995"></a><span class="lineno"> 995</span>&#160;LIBNET_API</div><div class="line"><a name="l00996"></a><span class="lineno"> 996</span>&#160;libnet_ptag_t </div><div class="line"><a name="l00997"></a><span class="lineno"> 997</span>&#160;<a class="code" href="libnet-functions_8h.html#a2d9839736df3b1c46acdcc67e291c03e">libnet_build_ipv4</a>(uint16_t ip_len, uint8_t tos, uint16_t <span class="keywordtype">id</span>, uint16_t frag,</div><div class="line"><a name="l00998"></a><span class="lineno"> 998</span>&#160;uint8_t ttl, uint8_t prot, uint16_t sum, uint32_t src, uint32_t dst,</div><div class="line"><a name="l00999"></a><span class="lineno"> 999</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01000"></a><span class="lineno"> 1000</span>&#160;</div><div class="line"><a name="l01020"></a><span class="lineno"> 1020</span>&#160;LIBNET_API</div><div class="line"><a name="l01021"></a><span class="lineno"> 1021</span>&#160;libnet_ptag_t </div><div class="line"><a name="l01022"></a><span class="lineno"> 1022</span>&#160;<a class="code" href="libnet-functions_8h.html#aa209cafad74cd8f259aa97732e06d07c">libnet_build_ipv4_options</a>(<span class="keyword">const</span> uint8_t *options, uint32_t options_s, libnet_t *l,</div><div class="line"><a name="l01023"></a><span class="lineno"> 1023</span>&#160;libnet_ptag_t ptag);</div><div class="line"><a name="l01024"></a><span class="lineno"> 1024</span>&#160;</div><div class="line"><a name="l01039"></a><span class="lineno"> 1039</span>&#160;LIBNET_API</div><div class="line"><a name="l01040"></a><span class="lineno"> 1040</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01041"></a><span class="lineno"> 1041</span>&#160;<a class="code" href="libnet-functions_8h.html#a6894d563677d9f229feedf52c759ac0a">libnet_autobuild_ipv4</a>(uint16_t len, uint8_t prot, uint32_t dst, libnet_t *l);</div><div class="line"><a name="l01042"></a><span class="lineno"> 1042</span>&#160;</div><div class="line"><a name="l01059"></a><span class="lineno"> 1059</span>&#160;LIBNET_API</div><div class="line"><a name="l01060"></a><span class="lineno"> 1060</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01061"></a><span class="lineno"> 1061</span>&#160;<a class="code" href="libnet-functions_8h.html#a50fc0e6ad5c2b1fd705f349eff382dfd">libnet_build_ipv6</a>(uint8_t tc, uint32_t fl, uint16_t len, uint8_t nh,</div><div class="line"><a name="l01062"></a><span class="lineno"> 1062</span>&#160;uint8_t hl, <span class="keyword">struct</span> libnet_in6_addr src, <span class="keyword">struct</span> libnet_in6_addr dst, </div><div class="line"><a name="l01063"></a><span class="lineno"> 1063</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01064"></a><span class="lineno"> 1064</span>&#160;</div><div class="line"><a name="l01078"></a><span class="lineno"> 1078</span>&#160;LIBNET_API</div><div class="line"><a name="l01079"></a><span class="lineno"> 1079</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01080"></a><span class="lineno"> 1080</span>&#160;<a class="code" href="libnet-functions_8h.html#a9eeb211b6b8579fe9725da6d32d2732d">libnet_build_ipv6_frag</a>(uint8_t nh, uint8_t reserved, uint16_t frag,</div><div class="line"><a name="l01081"></a><span class="lineno"> 1081</span>&#160;uint32_t <span class="keywordtype">id</span>, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,</div><div class="line"><a name="l01082"></a><span class="lineno"> 1082</span>&#160;libnet_ptag_t ptag);</div><div class="line"><a name="l01083"></a><span class="lineno"> 1083</span>&#160;</div><div class="line"><a name="l01102"></a><span class="lineno"> 1102</span>&#160;LIBNET_API</div><div class="line"><a name="l01103"></a><span class="lineno"> 1103</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01104"></a><span class="lineno"> 1104</span>&#160;<a class="code" href="libnet-functions_8h.html#a7fb612955dd3a787f13ab0c85b360023">libnet_build_ipv6_routing</a>(uint8_t nh, uint8_t len, uint8_t rtype,</div><div class="line"><a name="l01105"></a><span class="lineno"> 1105</span>&#160;uint8_t segments, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,</div><div class="line"><a name="l01106"></a><span class="lineno"> 1106</span>&#160;libnet_ptag_t ptag);</div><div class="line"><a name="l01107"></a><span class="lineno"> 1107</span>&#160;</div><div class="line"><a name="l01122"></a><span class="lineno"> 1122</span>&#160;LIBNET_API</div><div class="line"><a name="l01123"></a><span class="lineno"> 1123</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01124"></a><span class="lineno"> 1124</span>&#160;<a class="code" href="libnet-functions_8h.html#a1b6e9597bf110de597a673a4c6ed6ebc">libnet_build_ipv6_destopts</a>(uint8_t nh, uint8_t len, <span class="keyword">const</span> uint8_t* payload,</div><div class="line"><a name="l01125"></a><span class="lineno"> 1125</span>&#160;uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01126"></a><span class="lineno"> 1126</span>&#160;</div><div class="line"><a name="l01142"></a><span class="lineno"> 1142</span>&#160;LIBNET_API</div><div class="line"><a name="l01143"></a><span class="lineno"> 1143</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01144"></a><span class="lineno"> 1144</span>&#160;<a class="code" href="libnet-functions_8h.html#a1a8b5292e4e714c0f299f0577c86cb00">libnet_build_ipv6_hbhopts</a>(uint8_t nh, uint8_t len, <span class="keyword">const</span> uint8_t* payload,</div><div class="line"><a name="l01145"></a><span class="lineno"> 1145</span>&#160;uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01146"></a><span class="lineno"> 1146</span>&#160;</div><div class="line"><a name="l01164"></a><span class="lineno"> 1164</span>&#160;LIBNET_API</div><div class="line"><a name="l01165"></a><span class="lineno"> 1165</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01166"></a><span class="lineno"> 1166</span>&#160;<a class="code" href="libnet-functions_8h.html#a606209e22d203a859a380e1d37f9688c">libnet_autobuild_ipv6</a>(uint16_t len, uint8_t nh, <span class="keyword">struct</span> libnet_in6_addr dst,</div><div class="line"><a name="l01167"></a><span class="lineno"> 1167</span>&#160;libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01168"></a><span class="lineno"> 1168</span>&#160;</div><div class="line"><a name="l01187"></a><span class="lineno"> 1187</span>&#160;LIBNET_API</div><div class="line"><a name="l01188"></a><span class="lineno"> 1188</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01189"></a><span class="lineno"> 1189</span>&#160;<a class="code" href="libnet-functions_8h.html#afdcc92fd59366c48693ad48c076c488e">libnet_build_isl</a>(uint8_t *dhost, uint8_t type, uint8_t user,</div><div class="line"><a name="l01190"></a><span class="lineno"> 1190</span>&#160;uint8_t *shost, uint16_t len, <span class="keyword">const</span> uint8_t *snap, uint16_t vid,</div><div class="line"><a name="l01191"></a><span class="lineno"> 1191</span>&#160;uint16_t portindex, uint16_t reserved, <span class="keyword">const</span> uint8_t* payload,</div><div class="line"><a name="l01192"></a><span class="lineno"> 1192</span>&#160;uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01193"></a><span class="lineno"> 1193</span>&#160;</div><div class="line"><a name="l01206"></a><span class="lineno"> 1206</span>&#160;LIBNET_API</div><div class="line"><a name="l01207"></a><span class="lineno"> 1207</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01208"></a><span class="lineno"> 1208</span>&#160;<a class="code" href="libnet-functions_8h.html#ad7d163363769594667524e7607535aec">libnet_build_ipsec_esp_hdr</a>(uint32_t spi, uint32_t seq, uint32_t iv,</div><div class="line"><a name="l01209"></a><span class="lineno"> 1209</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01210"></a><span class="lineno"> 1210</span>&#160;</div><div class="line"><a name="l01223"></a><span class="lineno"> 1223</span>&#160;LIBNET_API</div><div class="line"><a name="l01224"></a><span class="lineno"> 1224</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01225"></a><span class="lineno"> 1225</span>&#160;<a class="code" href="libnet-functions_8h.html#a0e7ba4cf571d4d85b1084e15059c7336">libnet_build_ipsec_esp_ftr</a>(uint8_t len, uint8_t nh, int8_t *auth,</div><div class="line"><a name="l01226"></a><span class="lineno"> 1226</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01227"></a><span class="lineno"> 1227</span>&#160;</div><div class="line"><a name="l01243"></a><span class="lineno"> 1243</span>&#160;LIBNET_API</div><div class="line"><a name="l01244"></a><span class="lineno"> 1244</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01245"></a><span class="lineno"> 1245</span>&#160;<a class="code" href="libnet-functions_8h.html#a22d1d874a5d12b8d3528f637990ceb21">libnet_build_ipsec_ah</a>(uint8_t nh, uint8_t len, uint16_t res,</div><div class="line"><a name="l01246"></a><span class="lineno"> 1246</span>&#160;uint32_t spi, uint32_t seq, uint32_t auth, <span class="keyword">const</span> uint8_t* payload,</div><div class="line"><a name="l01247"></a><span class="lineno"> 1247</span>&#160;uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01248"></a><span class="lineno"> 1248</span>&#160;</div><div class="line"><a name="l01266"></a><span class="lineno"> 1266</span>&#160;LIBNET_API</div><div class="line"><a name="l01267"></a><span class="lineno"> 1267</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01268"></a><span class="lineno"> 1268</span>&#160;<a class="code" href="libnet-functions_8h.html#a5829f525c067e1d99826865292542d8a">libnet_build_dnsv4</a>(uint16_t h_len, uint16_t <span class="keywordtype">id</span>, uint16_t flags,</div><div class="line"><a name="l01269"></a><span class="lineno"> 1269</span>&#160;uint16_t num_q, uint16_t num_anws_rr, uint16_t num_auth_rr,</div><div class="line"><a name="l01270"></a><span class="lineno"> 1270</span>&#160;uint16_t num_addi_rr, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,</div><div class="line"><a name="l01271"></a><span class="lineno"> 1271</span>&#160;libnet_ptag_t ptag);</div><div class="line"><a name="l01272"></a><span class="lineno"> 1272</span>&#160;</div><div class="line"><a name="l01291"></a><span class="lineno"> 1291</span>&#160;LIBNET_API</div><div class="line"><a name="l01292"></a><span class="lineno"> 1292</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01293"></a><span class="lineno"> 1293</span>&#160;<a class="code" href="libnet-functions_8h.html#a154c83b71614c8cf3635f7c80cf7e9a6">libnet_build_rip</a>(uint8_t cmd, uint8_t version, uint16_t rd, uint16_t af,</div><div class="line"><a name="l01294"></a><span class="lineno"> 1294</span>&#160;uint16_t rt, uint32_t addr, uint32_t mask, uint32_t next_hop,</div><div class="line"><a name="l01295"></a><span class="lineno"> 1295</span>&#160;uint32_t metric, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,</div><div class="line"><a name="l01296"></a><span class="lineno"> 1296</span>&#160;libnet_ptag_t ptag);</div><div class="line"><a name="l01297"></a><span class="lineno"> 1297</span>&#160;</div><div class="line"><a name="l01321"></a><span class="lineno"> 1321</span>&#160;LIBNET_API</div><div class="line"><a name="l01322"></a><span class="lineno"> 1322</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01323"></a><span class="lineno"> 1323</span>&#160;<a class="code" href="libnet-functions_8h.html#a4a657cd81f10ba6dbdcbd6a6a81f72d2">libnet_build_rpc_call</a>(uint32_t rm, uint32_t xid, uint32_t prog_num,</div><div class="line"><a name="l01324"></a><span class="lineno"> 1324</span>&#160;uint32_t prog_vers, uint32_t procedure, uint32_t cflavor, uint32_t clength,</div><div class="line"><a name="l01325"></a><span class="lineno"> 1325</span>&#160;uint8_t *cdata, uint32_t vflavor, uint32_t vlength, <span class="keyword">const</span> uint8_t *vdata,</div><div class="line"><a name="l01326"></a><span class="lineno"> 1326</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01327"></a><span class="lineno"> 1327</span>&#160;</div><div class="line"><a name="l01351"></a><span class="lineno"> 1351</span>&#160;LIBNET_API</div><div class="line"><a name="l01352"></a><span class="lineno"> 1352</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01353"></a><span class="lineno"> 1353</span>&#160;<a class="code" href="libnet-functions_8h.html#ad6310dd6dff16dc711663f70256d2148">libnet_build_stp_conf</a>(uint16_t <span class="keywordtype">id</span>, uint8_t version, uint8_t bpdu_type,</div><div class="line"><a name="l01354"></a><span class="lineno"> 1354</span>&#160;uint8_t flags, <span class="keyword">const</span> uint8_t *root_id, uint32_t root_pc, <span class="keyword">const</span> uint8_t *bridge_id,</div><div class="line"><a name="l01355"></a><span class="lineno"> 1355</span>&#160;uint16_t port_id, uint16_t message_age, uint16_t max_age, </div><div class="line"><a name="l01356"></a><span class="lineno"> 1356</span>&#160;uint16_t hello_time, uint16_t f_delay, <span class="keyword">const</span> uint8_t* payload,</div><div class="line"><a name="l01357"></a><span class="lineno"> 1357</span>&#160;uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01358"></a><span class="lineno"> 1358</span>&#160;</div><div class="line"><a name="l01373"></a><span class="lineno"> 1373</span>&#160;LIBNET_API</div><div class="line"><a name="l01374"></a><span class="lineno"> 1374</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01375"></a><span class="lineno"> 1375</span>&#160;<a class="code" href="libnet-functions_8h.html#a913fc0cf8782d915edc20f4f6abf847f">libnet_build_stp_tcn</a>(uint16_t <span class="keywordtype">id</span>, uint8_t version, uint8_t bpdu_type,</div><div class="line"><a name="l01376"></a><span class="lineno"> 1376</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01377"></a><span class="lineno"> 1377</span>&#160;</div><div class="line"><a name="l01396"></a><span class="lineno"> 1396</span>&#160;LIBNET_API</div><div class="line"><a name="l01397"></a><span class="lineno"> 1397</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01398"></a><span class="lineno"> 1398</span>&#160;<a class="code" href="libnet-functions_8h.html#a4d77b901ebcc18b8c0ee2345e4ea6177">libnet_build_token_ring</a>(uint8_t ac, uint8_t fc, <span class="keyword">const</span> uint8_t *dst, <span class="keyword">const</span> uint8_t *src,</div><div class="line"><a name="l01399"></a><span class="lineno"> 1399</span>&#160;uint8_t dsap, uint8_t ssap, uint8_t cf, <span class="keyword">const</span> uint8_t *oui, uint16_t type,</div><div class="line"><a name="l01400"></a><span class="lineno"> 1400</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01401"></a><span class="lineno"> 1401</span>&#160;</div><div class="line"><a name="l01416"></a><span class="lineno"> 1416</span>&#160;LIBNET_API</div><div class="line"><a name="l01417"></a><span class="lineno"> 1417</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01418"></a><span class="lineno"> 1418</span>&#160;<a class="code" href="libnet-functions_8h.html#ac4e70a6d0e895d722e407c6d5fae1466">libnet_autobuild_token_ring</a>(uint8_t ac, uint8_t fc, <span class="keyword">const</span> uint8_t *dst, </div><div class="line"><a name="l01419"></a><span class="lineno"> 1419</span>&#160;uint8_t dsap, uint8_t ssap, uint8_t cf, <span class="keyword">const</span> uint8_t *oui, uint16_t type,</div><div class="line"><a name="l01420"></a><span class="lineno"> 1420</span>&#160;libnet_t *l);</div><div class="line"><a name="l01421"></a><span class="lineno"> 1421</span>&#160;</div><div class="line"><a name="l01442"></a><span class="lineno"> 1442</span>&#160;LIBNET_API</div><div class="line"><a name="l01443"></a><span class="lineno"> 1443</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01444"></a><span class="lineno"> 1444</span>&#160;<a class="code" href="libnet-functions_8h.html#a5a6538c0cf4dd6c2f59b1657d56796b3">libnet_build_vrrp</a>(uint8_t version, uint8_t type, uint8_t vrouter_id,</div><div class="line"><a name="l01445"></a><span class="lineno"> 1445</span>&#160;uint8_t priority, uint8_t ip_count, uint8_t auth_type, uint8_t advert_int,</div><div class="line"><a name="l01446"></a><span class="lineno"> 1446</span>&#160;uint16_t sum, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,</div><div class="line"><a name="l01447"></a><span class="lineno"> 1447</span>&#160;libnet_ptag_t ptag);</div><div class="line"><a name="l01448"></a><span class="lineno"> 1448</span>&#160;</div><div class="line"><a name="l01462"></a><span class="lineno"> 1462</span>&#160;LIBNET_API</div><div class="line"><a name="l01463"></a><span class="lineno"> 1463</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01464"></a><span class="lineno"> 1464</span>&#160;<a class="code" href="libnet-functions_8h.html#a520053e593215a240f7207c2b28075cb">libnet_build_mpls</a>(uint32_t label, uint8_t experimental, uint8_t bos,</div><div class="line"><a name="l01465"></a><span class="lineno"> 1465</span>&#160;uint8_t ttl, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,</div><div class="line"><a name="l01466"></a><span class="lineno"> 1466</span>&#160;libnet_ptag_t ptag);</div><div class="line"><a name="l01467"></a><span class="lineno"> 1467</span>&#160;</div><div class="line"><a name="l01496"></a><span class="lineno"> 1496</span>&#160;LIBNET_API</div><div class="line"><a name="l01497"></a><span class="lineno"> 1497</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01498"></a><span class="lineno"> 1498</span>&#160;<a class="code" href="libnet-functions_8h.html#af305c48631b600e472f60b951b9ebf75">libnet_build_ntp</a>(uint8_t leap_indicator, uint8_t version, uint8_t mode,</div><div class="line"><a name="l01499"></a><span class="lineno"> 1499</span>&#160;uint8_t stratum, uint8_t poll, uint8_t precision, uint16_t delay_int,</div><div class="line"><a name="l01500"></a><span class="lineno"> 1500</span>&#160;uint16_t delay_frac, uint16_t dispersion_int, uint16_t dispersion_frac,</div><div class="line"><a name="l01501"></a><span class="lineno"> 1501</span>&#160;uint32_t reference_id, uint32_t ref_ts_int, uint32_t ref_ts_frac,</div><div class="line"><a name="l01502"></a><span class="lineno"> 1502</span>&#160;uint32_t orig_ts_int, uint32_t orig_ts_frac, uint32_t rec_ts_int,</div><div class="line"><a name="l01503"></a><span class="lineno"> 1503</span>&#160;uint32_t rec_ts_frac, uint32_t xmt_ts_int, uint32_t xmt_ts_frac,</div><div class="line"><a name="l01504"></a><span class="lineno"> 1504</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01505"></a><span class="lineno"> 1505</span>&#160;</div><div class="line"><a name="l01520"></a><span class="lineno"> 1520</span>&#160;LIBNET_API</div><div class="line"><a name="l01521"></a><span class="lineno"> 1521</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01522"></a><span class="lineno"> 1522</span>&#160;<a class="code" href="libnet-functions_8h.html#a429bf355c69895a5ad7ca900d734bf48">libnet_build_ospfv2</a>(uint16_t len, uint8_t type, uint32_t rtr_id,</div><div class="line"><a name="l01523"></a><span class="lineno"> 1523</span>&#160;uint32_t area_id, uint16_t sum, uint16_t autype, <span class="keyword">const</span> uint8_t* payload,</div><div class="line"><a name="l01524"></a><span class="lineno"> 1524</span>&#160;uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01525"></a><span class="lineno"> 1525</span>&#160;</div><div class="line"><a name="l01541"></a><span class="lineno"> 1541</span>&#160;LIBNET_API</div><div class="line"><a name="l01542"></a><span class="lineno"> 1542</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01543"></a><span class="lineno"> 1543</span>&#160;<a class="code" href="libnet-functions_8h.html#a224a55d5758cd6685fdd374597f133c4">libnet_build_ospfv2_hello</a>(uint32_t netmask, uint16_t interval, uint8_t opts,</div><div class="line"><a name="l01544"></a><span class="lineno"> 1544</span>&#160;uint8_t priority, uint32_t dead_int, uint32_t des_rtr, uint32_t bkup_rtr,</div><div class="line"><a name="l01545"></a><span class="lineno"> 1545</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01546"></a><span class="lineno"> 1546</span>&#160; </div><div class="line"><a name="l01559"></a><span class="lineno"> 1559</span>&#160;LIBNET_API</div><div class="line"><a name="l01560"></a><span class="lineno"> 1560</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01561"></a><span class="lineno"> 1561</span>&#160;<a class="code" href="libnet-functions_8h.html#a9f859449de2c7e2f1b2d18051a315634">libnet_build_ospfv2_dbd</a>(uint16_t dgram_len, uint8_t opts, uint8_t type,</div><div class="line"><a name="l01562"></a><span class="lineno"> 1562</span>&#160;uint32_t seqnum, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,</div><div class="line"><a name="l01563"></a><span class="lineno"> 1563</span>&#160;libnet_ptag_t ptag);</div><div class="line"><a name="l01564"></a><span class="lineno"> 1564</span>&#160; </div><div class="line"><a name="l01576"></a><span class="lineno"> 1576</span>&#160;LIBNET_API</div><div class="line"><a name="l01577"></a><span class="lineno"> 1577</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01578"></a><span class="lineno"> 1578</span>&#160;<a class="code" href="libnet-functions_8h.html#a17d51de46576464ff606e15250c7fe3a">libnet_build_ospfv2_lsr</a>(uint32_t type, uint32_t lsid, uint32_t advrtr,</div><div class="line"><a name="l01579"></a><span class="lineno"> 1579</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01580"></a><span class="lineno"> 1580</span>&#160; </div><div class="line"><a name="l01590"></a><span class="lineno"> 1590</span>&#160;LIBNET_API</div><div class="line"><a name="l01591"></a><span class="lineno"> 1591</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01592"></a><span class="lineno"> 1592</span>&#160;<a class="code" href="libnet-functions_8h.html#a5ffe185b91c48fad0dc84f81b7d26697">libnet_build_ospfv2_lsu</a>(uint32_t num, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s,</div><div class="line"><a name="l01593"></a><span class="lineno"> 1593</span>&#160;libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01594"></a><span class="lineno"> 1594</span>&#160;</div><div class="line"><a name="l01611"></a><span class="lineno"> 1611</span>&#160;LIBNET_API</div><div class="line"><a name="l01612"></a><span class="lineno"> 1612</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01613"></a><span class="lineno"> 1613</span>&#160;<a class="code" href="libnet-functions_8h.html#a798142aed2aee944fdc80ce14faf31f6">libnet_build_ospfv2_lsa</a>(uint16_t age, uint8_t opts, uint8_t type,</div><div class="line"><a name="l01614"></a><span class="lineno"> 1614</span>&#160;uint32_t lsid, uint32_t advrtr, uint32_t seqnum, uint16_t sum, uint16_t len,</div><div class="line"><a name="l01615"></a><span class="lineno"> 1615</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01616"></a><span class="lineno"> 1616</span>&#160; </div><div class="line"><a name="l01632"></a><span class="lineno"> 1632</span>&#160;LIBNET_API</div><div class="line"><a name="l01633"></a><span class="lineno"> 1633</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01634"></a><span class="lineno"> 1634</span>&#160;<a class="code" href="libnet-functions_8h.html#a67209523b736cc9f70743d3dfbce1129">libnet_build_ospfv2_lsa_rtr</a>(uint16_t flags, uint16_t num, uint32_t <span class="keywordtype">id</span>,</div><div class="line"><a name="l01635"></a><span class="lineno"> 1635</span>&#160;uint32_t data, uint8_t type, uint8_t tos, uint16_t metric, <span class="keyword">const</span> uint8_t* payload,</div><div class="line"><a name="l01636"></a><span class="lineno"> 1636</span>&#160;uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01637"></a><span class="lineno"> 1637</span>&#160; </div><div class="line"><a name="l01648"></a><span class="lineno"> 1648</span>&#160;LIBNET_API</div><div class="line"><a name="l01649"></a><span class="lineno"> 1649</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01650"></a><span class="lineno"> 1650</span>&#160;<a class="code" href="libnet-functions_8h.html#a234cf0a788a5944ff70c879c96467bc4">libnet_build_ospfv2_lsa_net</a>(uint32_t nmask, uint32_t rtrid, <span class="keyword">const</span> uint8_t* payload,</div><div class="line"><a name="l01651"></a><span class="lineno"> 1651</span>&#160;uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01652"></a><span class="lineno"> 1652</span>&#160; </div><div class="line"><a name="l01664"></a><span class="lineno"> 1664</span>&#160;LIBNET_API</div><div class="line"><a name="l01665"></a><span class="lineno"> 1665</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01666"></a><span class="lineno"> 1666</span>&#160;<a class="code" href="libnet-functions_8h.html#ae9c55870fecbd742edc25f06b73ad5a2">libnet_build_ospfv2_lsa_sum</a>(uint32_t nmask, uint32_t metric, uint32_t tos,</div><div class="line"><a name="l01667"></a><span class="lineno"> 1667</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01668"></a><span class="lineno"> 1668</span>&#160; </div><div class="line"><a name="l01681"></a><span class="lineno"> 1681</span>&#160;LIBNET_API</div><div class="line"><a name="l01682"></a><span class="lineno"> 1682</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01683"></a><span class="lineno"> 1683</span>&#160;<a class="code" href="libnet-functions_8h.html#a9002c457692ce2557197dc68c9932849">libnet_build_ospfv2_lsa_as</a>(uint32_t nmask, uint32_t metric, uint32_t fwdaddr,</div><div class="line"><a name="l01684"></a><span class="lineno"> 1684</span>&#160;uint32_t tag, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,</div><div class="line"><a name="l01685"></a><span class="lineno"> 1685</span>&#160;libnet_ptag_t ptag);</div><div class="line"><a name="l01686"></a><span class="lineno"> 1686</span>&#160;</div><div class="line"><a name="l01699"></a><span class="lineno"> 1699</span>&#160;LIBNET_API</div><div class="line"><a name="l01700"></a><span class="lineno"> 1700</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01701"></a><span class="lineno"> 1701</span>&#160;<a class="code" href="libnet-functions_8h.html#aa4c6c975b3c87d3d17224302e4319eec">libnet_build_data</a>(<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,</div><div class="line"><a name="l01702"></a><span class="lineno"> 1702</span>&#160;libnet_ptag_t ptag);</div><div class="line"><a name="l01703"></a><span class="lineno"> 1703</span>&#160;</div><div class="line"><a name="l01726"></a><span class="lineno"> 1726</span>&#160;LIBNET_API</div><div class="line"><a name="l01727"></a><span class="lineno"> 1727</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01728"></a><span class="lineno"> 1728</span>&#160;<a class="code" href="libnet-functions_8h.html#a3333c5e5cde290dda9b80adc13a00466">libnet_build_dhcpv4</a>(uint8_t opcode, uint8_t htype, uint8_t hlen,</div><div class="line"><a name="l01729"></a><span class="lineno"> 1729</span>&#160;uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags,</div><div class="line"><a name="l01730"></a><span class="lineno"> 1730</span>&#160;uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip, <span class="keyword">const</span> uint8_t *chaddr,</div><div class="line"><a name="l01731"></a><span class="lineno"> 1731</span>&#160;<span class="keyword">const</span> <span class="keywordtype">char</span> *sname, <span class="keyword">const</span> <span class="keywordtype">char</span> *file, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, </div><div class="line"><a name="l01732"></a><span class="lineno"> 1732</span>&#160;libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01733"></a><span class="lineno"> 1733</span>&#160;</div><div class="line"><a name="l01756"></a><span class="lineno"> 1756</span>&#160;LIBNET_API</div><div class="line"><a name="l01757"></a><span class="lineno"> 1757</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01758"></a><span class="lineno"> 1758</span>&#160;<a class="code" href="libnet-functions_8h.html#a564c31892fb8cc2bf44244cdb26d693e">libnet_build_bootpv4</a>(uint8_t opcode, uint8_t htype, uint8_t hlen,</div><div class="line"><a name="l01759"></a><span class="lineno"> 1759</span>&#160;uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags,</div><div class="line"><a name="l01760"></a><span class="lineno"> 1760</span>&#160;uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip, <span class="keyword">const</span> uint8_t *chaddr,</div><div class="line"><a name="l01761"></a><span class="lineno"> 1761</span>&#160;<span class="keyword">const</span> <span class="keywordtype">char</span> *sname, <span class="keyword">const</span> <span class="keywordtype">char</span> *file, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, </div><div class="line"><a name="l01762"></a><span class="lineno"> 1762</span>&#160;libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01763"></a><span class="lineno"> 1763</span>&#160;</div><div class="line"><a name="l01769"></a><span class="lineno"> 1769</span>&#160;LIBNET_API</div><div class="line"><a name="l01770"></a><span class="lineno"> 1770</span>&#160;uint32_t</div><div class="line"><a name="l01771"></a><span class="lineno"> 1771</span>&#160;<a class="code" href="libnet-functions_8h.html#a6173dfa2aaf953c8a36ebf347a567100">libnet_getgre_length</a>(uint16_t fv);</div><div class="line"><a name="l01772"></a><span class="lineno"> 1772</span>&#160;</div><div class="line"><a name="l01796"></a><span class="lineno"> 1796</span>&#160;LIBNET_API</div><div class="line"><a name="l01797"></a><span class="lineno"> 1797</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01798"></a><span class="lineno"> 1798</span>&#160;<a class="code" href="libnet-functions_8h.html#a41e095c98e623f00618f6d306cb31289">libnet_build_gre</a>(uint16_t fv, uint16_t type, uint16_t sum,</div><div class="line"><a name="l01799"></a><span class="lineno"> 1799</span>&#160;uint16_t offset, uint32_t key, uint32_t seq, uint16_t len,</div><div class="line"><a name="l01800"></a><span class="lineno"> 1800</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01801"></a><span class="lineno"> 1801</span>&#160;</div><div class="line"><a name="l01824"></a><span class="lineno"> 1824</span>&#160;LIBNET_API</div><div class="line"><a name="l01825"></a><span class="lineno"> 1825</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01826"></a><span class="lineno"> 1826</span>&#160;<a class="code" href="libnet-functions_8h.html#a0092b3f0285f4c96915eef9579655036">libnet_build_egre</a>(uint16_t fv, uint16_t type, uint16_t sum,</div><div class="line"><a name="l01827"></a><span class="lineno"> 1827</span>&#160;uint16_t offset, uint32_t key, uint32_t seq, uint16_t len,</div><div class="line"><a name="l01828"></a><span class="lineno"> 1828</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01829"></a><span class="lineno"> 1829</span>&#160;</div><div class="line"><a name="l01842"></a><span class="lineno"> 1842</span>&#160;LIBNET_API</div><div class="line"><a name="l01843"></a><span class="lineno"> 1843</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01844"></a><span class="lineno"> 1844</span>&#160;<a class="code" href="libnet-functions_8h.html#ae0c59a8f8d014cc1955d88139c2096c0">libnet_build_gre_sre</a>(uint16_t af, uint8_t offset, uint8_t length,</div><div class="line"><a name="l01845"></a><span class="lineno"> 1845</span>&#160;uint8_t *routing, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l,</div><div class="line"><a name="l01846"></a><span class="lineno"> 1846</span>&#160;libnet_ptag_t ptag);</div><div class="line"><a name="l01847"></a><span class="lineno"> 1847</span>&#160;</div><div class="line"><a name="l01854"></a><span class="lineno"> 1854</span>&#160;LIBNET_API</div><div class="line"><a name="l01855"></a><span class="lineno"> 1855</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01856"></a><span class="lineno"> 1856</span>&#160;<a class="code" href="libnet-functions_8h.html#ae514f81f6d68bc1b2442762a6f87804a">libnet_build_gre_last_sre</a>(libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01857"></a><span class="lineno"> 1857</span>&#160;</div><div class="line"><a name="l01880"></a><span class="lineno"> 1880</span>&#160;LIBNET_API</div><div class="line"><a name="l01881"></a><span class="lineno"> 1881</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01882"></a><span class="lineno"> 1882</span>&#160;<a class="code" href="libnet-functions_8h.html#a3f9827171fbe5dbc4b02c7d9876a2393">libnet_build_bgp4_header</a>(uint8_t marker[LIBNET_BGP4_MARKER_SIZE],</div><div class="line"><a name="l01883"></a><span class="lineno"> 1883</span>&#160;uint16_t len, uint8_t type, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s,</div><div class="line"><a name="l01884"></a><span class="lineno"> 1884</span>&#160;libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01885"></a><span class="lineno"> 1885</span>&#160;</div><div class="line"><a name="l01903"></a><span class="lineno"> 1903</span>&#160;LIBNET_API</div><div class="line"><a name="l01904"></a><span class="lineno"> 1904</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01905"></a><span class="lineno"> 1905</span>&#160;<a class="code" href="libnet-functions_8h.html#a4a7df60e7798fddfff25f163ef63e2af">libnet_build_bgp4_open</a>(uint8_t version, uint16_t src_as, uint16_t hold_time,</div><div class="line"><a name="l01906"></a><span class="lineno"> 1906</span>&#160;uint32_t bgp_id, uint8_t opt_len, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s,</div><div class="line"><a name="l01907"></a><span class="lineno"> 1907</span>&#160;libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01908"></a><span class="lineno"> 1908</span>&#160;</div><div class="line"><a name="l01925"></a><span class="lineno"> 1925</span>&#160;LIBNET_API</div><div class="line"><a name="l01926"></a><span class="lineno"> 1926</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01927"></a><span class="lineno"> 1927</span>&#160;<a class="code" href="libnet-functions_8h.html#a88f572ee97c9223d4b24f55d868ce419">libnet_build_bgp4_update</a>(uint16_t unfeasible_rt_len, <span class="keyword">const</span> uint8_t *withdrawn_rt,</div><div class="line"><a name="l01928"></a><span class="lineno"> 1928</span>&#160;uint16_t total_path_attr_len, <span class="keyword">const</span> uint8_t *path_attributes, uint16_t info_len,</div><div class="line"><a name="l01929"></a><span class="lineno"> 1929</span>&#160;uint8_t *reachability_info, <span class="keyword">const</span> uint8_t* payload, uint32_t payload_s,</div><div class="line"><a name="l01930"></a><span class="lineno"> 1930</span>&#160;libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01931"></a><span class="lineno"> 1931</span>&#160;</div><div class="line"><a name="l01945"></a><span class="lineno"> 1945</span>&#160;LIBNET_API</div><div class="line"><a name="l01946"></a><span class="lineno"> 1946</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01947"></a><span class="lineno"> 1947</span>&#160;<a class="code" href="libnet-functions_8h.html#afe0007cf544b1d6773b6046c5c5ad372">libnet_build_bgp4_notification</a>(uint8_t err_code, uint8_t err_subcode,</div><div class="line"><a name="l01948"></a><span class="lineno"> 1948</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01949"></a><span class="lineno"> 1949</span>&#160;</div><div class="line"><a name="l01972"></a><span class="lineno"> 1972</span>&#160;LIBNET_API</div><div class="line"><a name="l01973"></a><span class="lineno"> 1973</span>&#160;libnet_ptag_t</div><div class="line"><a name="l01974"></a><span class="lineno"> 1974</span>&#160;<a class="code" href="libnet-functions_8h.html#a0d4ce5211113c5d5818d557ce3fc0234">libnet_build_sebek</a>(uint32_t magic, uint16_t version, uint16_t type, </div><div class="line"><a name="l01975"></a><span class="lineno"> 1975</span>&#160;uint32_t counter, uint32_t time_sec, uint32_t time_usec, uint32_t pid,</div><div class="line"><a name="l01976"></a><span class="lineno"> 1976</span>&#160;uint32_t uid, uint32_t fd, uint8_t cmd[SEBEK_CMD_LENGTH], uint32_t length, </div><div class="line"><a name="l01977"></a><span class="lineno"> 1977</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l01978"></a><span class="lineno"> 1978</span>&#160;</div><div class="line"><a name="l01999"></a><span class="lineno"> 1999</span>&#160;LIBNET_API</div><div class="line"><a name="l02000"></a><span class="lineno"> 2000</span>&#160;libnet_ptag_t</div><div class="line"><a name="l02001"></a><span class="lineno"> 2001</span>&#160;<a class="code" href="libnet-functions_8h.html#abe75e9be71910c580eff1d6925224778">libnet_build_hsrp</a>(uint8_t version, uint8_t opcode, uint8_t state, </div><div class="line"><a name="l02002"></a><span class="lineno"> 2002</span>&#160;uint8_t hello_time, uint8_t hold_time, uint8_t priority, uint8_t group,</div><div class="line"><a name="l02003"></a><span class="lineno"> 2003</span>&#160;uint8_t reserved, uint8_t authdata[HSRP_AUTHDATA_LENGTH], uint32_t virtual_ip,</div><div class="line"><a name="l02004"></a><span class="lineno"> 2004</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l02005"></a><span class="lineno"> 2005</span>&#160;</div><div class="line"><a name="l02021"></a><span class="lineno"> 2021</span>&#160;LIBNET_API</div><div class="line"><a name="l02022"></a><span class="lineno"> 2022</span>&#160;libnet_ptag_t</div><div class="line"><a name="l02023"></a><span class="lineno"> 2023</span>&#160;<a class="code" href="libnet-functions_8h.html#a9ec77e2ffcb9540d9f4eee2b0ff57af2">libnet_build_link</a>(<span class="keyword">const</span> uint8_t *dst, <span class="keyword">const</span> uint8_t *src, <span class="keyword">const</span> uint8_t *oui, uint16_t type, </div><div class="line"><a name="l02024"></a><span class="lineno"> 2024</span>&#160;<span class="keyword">const</span> uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l02025"></a><span class="lineno"> 2025</span>&#160;</div><div class="line"><a name="l02037"></a><span class="lineno"> 2037</span>&#160;LIBNET_API</div><div class="line"><a name="l02038"></a><span class="lineno"> 2038</span>&#160;libnet_ptag_t</div><div class="line"><a name="l02039"></a><span class="lineno"> 2039</span>&#160;<a class="code" href="libnet-functions_8h.html#a8a881ba6d300b16e5cadd9e3f6ef7bc8">libnet_autobuild_link</a>(<span class="keyword">const</span> uint8_t *dst, <span class="keyword">const</span> uint8_t *oui, uint16_t type,</div><div class="line"><a name="l02040"></a><span class="lineno"> 2040</span>&#160;libnet_t *l);</div><div class="line"><a name="l02041"></a><span class="lineno"> 2041</span>&#160;</div><div class="line"><a name="l02055"></a><span class="lineno"> 2055</span>&#160;LIBNET_API</div><div class="line"><a name="l02056"></a><span class="lineno"> 2056</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02057"></a><span class="lineno"> 2057</span>&#160;<a class="code" href="libnet-functions_8h.html#a3ec16c8aa5c7ae59ff63ce4a9329ab90">libnet_write</a>(libnet_t *l);</div><div class="line"><a name="l02058"></a><span class="lineno"> 2058</span>&#160;</div><div class="line"><a name="l02068"></a><span class="lineno"> 2068</span>&#160;LIBNET_API</div><div class="line"><a name="l02069"></a><span class="lineno"> 2069</span>&#160;uint32_t</div><div class="line"><a name="l02070"></a><span class="lineno"> 2070</span>&#160;<a class="code" href="libnet-functions_8h.html#a0adcfdd368764d4c4ab610daefe56b3d">libnet_get_ipaddr4</a>(libnet_t *l);</div><div class="line"><a name="l02071"></a><span class="lineno"> 2071</span>&#160;</div><div class="line"><a name="l02081"></a><span class="lineno"> 2081</span>&#160;LIBNET_API</div><div class="line"><a name="l02082"></a><span class="lineno"> 2082</span>&#160;<span class="keyword">struct </span>libnet_in6_addr</div><div class="line"><a name="l02083"></a><span class="lineno"> 2083</span>&#160;<a class="code" href="libnet-functions_8h.html#a7ca153d8efe6650769765fbc23e2b312">libnet_get_ipaddr6</a>(libnet_t *l);</div><div class="line"><a name="l02084"></a><span class="lineno"> 2084</span>&#160;</div><div class="line"><a name="l02093"></a><span class="lineno"> 2093</span>&#160;LIBNET_API</div><div class="line"><a name="l02094"></a><span class="lineno"> 2094</span>&#160;<span class="keyword">struct </span>libnet_ether_addr *</div><div class="line"><a name="l02095"></a><span class="lineno"> 2095</span>&#160;<a class="code" href="libnet-functions_8h.html#acf6dc1ece9e994d4f4d3e47e5b218f6c">libnet_get_hwaddr</a>(libnet_t *l);</div><div class="line"><a name="l02096"></a><span class="lineno"> 2096</span>&#160;</div><div class="line"><a name="l02106"></a><span class="lineno"> 2106</span>&#160;LIBNET_API</div><div class="line"><a name="l02107"></a><span class="lineno"> 2107</span>&#160;uint8_t *</div><div class="line"><a name="l02108"></a><span class="lineno"> 2108</span>&#160;<a class="code" href="libnet-functions_8h.html#a62a7ac78ee69568e17927674786c1b69">libnet_hex_aton</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *s, <span class="keywordtype">int</span> *len);</div><div class="line"><a name="l02109"></a><span class="lineno"> 2109</span>&#160;</div><div class="line"><a name="l02114"></a><span class="lineno"> 2114</span>&#160;LIBNET_API</div><div class="line"><a name="l02115"></a><span class="lineno"> 2115</span>&#160;<span class="keyword">const</span> <span class="keywordtype">char</span> *</div><div class="line"><a name="l02116"></a><span class="lineno"> 2116</span>&#160;<a class="code" href="libnet-functions_8h.html#ac4a33a98186ad71f7ae4c559b039af0f">libnet_version</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l02117"></a><span class="lineno"> 2117</span>&#160;</div><div class="line"><a name="l02134"></a><span class="lineno"> 2134</span>&#160;LIBNET_API</div><div class="line"><a name="l02135"></a><span class="lineno"> 2135</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02136"></a><span class="lineno"> 2136</span>&#160;<a class="code" href="libnet-functions_8h.html#a9f91e176ba3b1f93ec049f82c08b54be">libnet_adv_cull_packet</a>(libnet_t *l, uint8_t **packet, uint32_t *packet_s);</div><div class="line"><a name="l02137"></a><span class="lineno"> 2137</span>&#160;</div><div class="line"><a name="l02151"></a><span class="lineno"> 2151</span>&#160;LIBNET_API</div><div class="line"><a name="l02152"></a><span class="lineno"> 2152</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02153"></a><span class="lineno"> 2153</span>&#160;<a class="code" href="libnet-functions_8h.html#aac02edd8930cb604dc65f72f7ffd8892">libnet_adv_cull_header</a>(libnet_t *l, libnet_ptag_t ptag, uint8_t **header,</div><div class="line"><a name="l02154"></a><span class="lineno"> 2154</span>&#160;uint32_t *header_s);</div><div class="line"><a name="l02155"></a><span class="lineno"> 2155</span>&#160;</div><div class="line"><a name="l02170"></a><span class="lineno"> 2170</span>&#160;LIBNET_API</div><div class="line"><a name="l02171"></a><span class="lineno"> 2171</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02172"></a><span class="lineno"> 2172</span>&#160;<a class="code" href="libnet-functions_8h.html#ad00e9f92da1faea6c8ce400d6e7cd45e">libnet_adv_write_link</a>(libnet_t *l, <span class="keyword">const</span> uint8_t *packet, uint32_t packet_s);</div><div class="line"><a name="l02173"></a><span class="lineno"> 2173</span>&#160;</div><div class="line"><a name="l02188"></a><span class="lineno"> 2188</span>&#160;LIBNET_API</div><div class="line"><a name="l02189"></a><span class="lineno"> 2189</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02190"></a><span class="lineno"> 2190</span>&#160;<a class="code" href="libnet-functions_8h.html#a3524aaf97da73461cabd4797e89c4da4">libnet_adv_write_raw_ipv4</a>(libnet_t *l, <span class="keyword">const</span> uint8_t *packet, uint32_t packet_s);</div><div class="line"><a name="l02191"></a><span class="lineno"> 2191</span>&#160;</div><div class="line"><a name="l02198"></a><span class="lineno"> 2198</span>&#160;LIBNET_API</div><div class="line"><a name="l02199"></a><span class="lineno"> 2199</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l02200"></a><span class="lineno"> 2200</span>&#160;<a class="code" href="libnet-functions_8h.html#a92c45b67cbf9a16f8e6edd9a067c3f6d">libnet_adv_free_packet</a>(libnet_t *l, uint8_t *packet);</div><div class="line"><a name="l02201"></a><span class="lineno"> 2201</span>&#160;</div><div class="line"><a name="l02216"></a><span class="lineno"> 2216</span>&#160;<span class="keywordtype">int</span> </div><div class="line"><a name="l02217"></a><span class="lineno"> 2217</span>&#160;<a class="code" href="libnet-functions_8h.html#a20887ffe940f1d2c5bcae79a188176c6">libnet_cq_add</a>(libnet_t *l, <span class="keywordtype">char</span> *label);</div><div class="line"><a name="l02218"></a><span class="lineno"> 2218</span>&#160;</div><div class="line"><a name="l02234"></a><span class="lineno"> 2234</span>&#160;LIBNET_API</div><div class="line"><a name="l02235"></a><span class="lineno"> 2235</span>&#160;libnet_t *</div><div class="line"><a name="l02236"></a><span class="lineno"> 2236</span>&#160;<a class="code" href="libnet-functions_8h.html#a93d5ccdcdba31daacde82fc50f467412">libnet_cq_remove</a>(libnet_t *l);</div><div class="line"><a name="l02237"></a><span class="lineno"> 2237</span>&#160;</div><div class="line"><a name="l02250"></a><span class="lineno"> 2250</span>&#160;LIBNET_API </div><div class="line"><a name="l02251"></a><span class="lineno"> 2251</span>&#160;libnet_t *</div><div class="line"><a name="l02252"></a><span class="lineno"> 2252</span>&#160;<a class="code" href="libnet-functions_8h.html#a90a6ea3b24de3906ca1cf9c78a7b5a5f">libnet_cq_remove_by_label</a>(<span class="keywordtype">char</span> *label);</div><div class="line"><a name="l02253"></a><span class="lineno"> 2253</span>&#160; </div><div class="line"><a name="l02260"></a><span class="lineno"> 2260</span>&#160;LIBNET_API </div><div class="line"><a name="l02261"></a><span class="lineno"> 2261</span>&#160;<span class="keyword">const</span> <span class="keywordtype">char</span> *</div><div class="line"><a name="l02262"></a><span class="lineno"> 2262</span>&#160;<a class="code" href="libnet-functions_8h.html#a337f556ed05df13c1de19acbd4d7f50a">libnet_cq_getlabel</a>(libnet_t *l);</div><div class="line"><a name="l02263"></a><span class="lineno"> 2263</span>&#160; </div><div class="line"><a name="l02271"></a><span class="lineno"> 2271</span>&#160;LIBNET_API</div><div class="line"><a name="l02272"></a><span class="lineno"> 2272</span>&#160;libnet_t *</div><div class="line"><a name="l02273"></a><span class="lineno"> 2273</span>&#160;<a class="code" href="libnet-functions_8h.html#a1775288c17694d4d606327ad066f970d">libnet_cq_find_by_label</a>(<span class="keywordtype">char</span> *label);</div><div class="line"><a name="l02274"></a><span class="lineno"> 2274</span>&#160; </div><div class="line"><a name="l02280"></a><span class="lineno"> 2280</span>&#160;LIBNET_API</div><div class="line"><a name="l02281"></a><span class="lineno"> 2281</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l02282"></a><span class="lineno"> 2282</span>&#160;<a class="code" href="libnet-functions_8h.html#a1577413fdaf10706d5016b64f7f7924b">libnet_cq_destroy</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l02283"></a><span class="lineno"> 2283</span>&#160;</div><div class="line"><a name="l02303"></a><span class="lineno"> 2303</span>&#160;LIBNET_API</div><div class="line"><a name="l02304"></a><span class="lineno"> 2304</span>&#160;libnet_t *</div><div class="line"><a name="l02305"></a><span class="lineno"> 2305</span>&#160;<a class="code" href="libnet-functions_8h.html#a8233338e5050d8fc46c6d1f35ef32b5e">libnet_cq_head</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l02306"></a><span class="lineno"> 2306</span>&#160;</div><div class="line"><a name="l02313"></a><span class="lineno"> 2313</span>&#160;LIBNET_API</div><div class="line"><a name="l02314"></a><span class="lineno"> 2314</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02315"></a><span class="lineno"> 2315</span>&#160;<a class="code" href="libnet-functions_8h.html#a7edc80233d439b7755fdc127cfd7f88d">libnet_cq_last</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l02316"></a><span class="lineno"> 2316</span>&#160;</div><div class="line"><a name="l02322"></a><span class="lineno"> 2322</span>&#160;LIBNET_API</div><div class="line"><a name="l02323"></a><span class="lineno"> 2323</span>&#160;libnet_t *</div><div class="line"><a name="l02324"></a><span class="lineno"> 2324</span>&#160;<a class="code" href="libnet-functions_8h.html#af21a48ca025b23dfcd5d10e9d1b924ba">libnet_cq_next</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l02325"></a><span class="lineno"> 2325</span>&#160;</div><div class="line"><a name="l02331"></a><span class="lineno"> 2331</span>&#160;LIBNET_API</div><div class="line"><a name="l02332"></a><span class="lineno"> 2332</span>&#160;uint32_t</div><div class="line"><a name="l02333"></a><span class="lineno"> 2333</span>&#160;<a class="code" href="libnet-functions_8h.html#ae071e441671c342ea2d3bbca979e2769">libnet_cq_size</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l02334"></a><span class="lineno"> 2334</span>&#160;</div><div class="line"><a name="l02338"></a><span class="lineno"> 2338</span>&#160;LIBNET_API</div><div class="line"><a name="l02339"></a><span class="lineno"> 2339</span>&#160;uint32_t</div><div class="line"><a name="l02340"></a><span class="lineno"> 2340</span>&#160;<a class="code" href="libnet-functions_8h.html#a65145cbd0be6d1609bf07b52d6c57695">libnet_cq_end_loop</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l02341"></a><span class="lineno"> 2341</span>&#160;</div><div class="line"><a name="l02347"></a><span class="lineno"> 2347</span>&#160;LIBNET_API</div><div class="line"><a name="l02348"></a><span class="lineno"> 2348</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l02349"></a><span class="lineno"> 2349</span>&#160;<a class="code" href="libnet-functions_8h.html#a1c70d00eefe61b2f5902ab56c802e07c">libnet_diag_dump_context</a>(libnet_t *l);</div><div class="line"><a name="l02350"></a><span class="lineno"> 2350</span>&#160;</div><div class="line"><a name="l02356"></a><span class="lineno"> 2356</span>&#160;LIBNET_API</div><div class="line"><a name="l02357"></a><span class="lineno"> 2357</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l02358"></a><span class="lineno"> 2358</span>&#160;<a class="code" href="libnet-functions_8h.html#a49e6023168b4f660ed8ff67dcc8ee228">libnet_diag_dump_pblock</a>(libnet_t *l);</div><div class="line"><a name="l02359"></a><span class="lineno"> 2359</span>&#160;</div><div class="line"><a name="l02367"></a><span class="lineno"> 2367</span>&#160;LIBNET_API</div><div class="line"><a name="l02368"></a><span class="lineno"> 2368</span>&#160;<span class="keywordtype">char</span> *</div><div class="line"><a name="l02369"></a><span class="lineno"> 2369</span>&#160;<a class="code" href="libnet-functions_8h.html#a59cc8a10dd7a94f01238f96417b08420">libnet_diag_dump_pblock_type</a>(uint8_t type);</div><div class="line"><a name="l02370"></a><span class="lineno"> 2370</span>&#160;</div><div class="line"><a name="l02384"></a><span class="lineno"> 2384</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l02385"></a><span class="lineno"> 2385</span>&#160;<a class="code" href="libnet-functions_8h.html#adb2f7d417f05a058c0c2c7f76b6f66e6">libnet_diag_dump_hex</a>(<span class="keyword">const</span> uint8_t *packet, uint32_t len, <span class="keywordtype">int</span> swap, FILE *stream);</div><div class="line"><a name="l02386"></a><span class="lineno"> 2386</span>&#160;</div><div class="line"><a name="l02387"></a><span class="lineno"> 2387</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02388"></a><span class="lineno"> 2388</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02389"></a><span class="lineno"> 2389</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02390"></a><span class="lineno"> 2390</span>&#160;LIBNET_API</div><div class="line"><a name="l02391"></a><span class="lineno"> 2391</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02392"></a><span class="lineno"> 2392</span>&#160;libnet_write_raw_ipv4(libnet_t *l, <span class="keyword">const</span> uint8_t *packet, uint32_t size);</div><div class="line"><a name="l02393"></a><span class="lineno"> 2393</span>&#160;</div><div class="line"><a name="l02394"></a><span class="lineno"> 2394</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02395"></a><span class="lineno"> 2395</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02396"></a><span class="lineno"> 2396</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02397"></a><span class="lineno"> 2397</span>&#160;LIBNET_API</div><div class="line"><a name="l02398"></a><span class="lineno"> 2398</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02399"></a><span class="lineno"> 2399</span>&#160;libnet_write_raw_ipv6(libnet_t *l, <span class="keyword">const</span> uint8_t *packet, uint32_t size);</div><div class="line"><a name="l02400"></a><span class="lineno"> 2400</span>&#160;</div><div class="line"><a name="l02401"></a><span class="lineno"> 2401</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02402"></a><span class="lineno"> 2402</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02403"></a><span class="lineno"> 2403</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02404"></a><span class="lineno"> 2404</span>&#160;LIBNET_API</div><div class="line"><a name="l02405"></a><span class="lineno"> 2405</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02406"></a><span class="lineno"> 2406</span>&#160;libnet_write_link(libnet_t *l, <span class="keyword">const</span> uint8_t *packet, uint32_t size);</div><div class="line"><a name="l02407"></a><span class="lineno"> 2407</span>&#160;</div><div class="line"><a name="l02408"></a><span class="lineno"> 2408</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02409"></a><span class="lineno"> 2409</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02410"></a><span class="lineno"> 2410</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02411"></a><span class="lineno"> 2411</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02412"></a><span class="lineno"> 2412</span>&#160;libnet_open_raw4(libnet_t *l);</div><div class="line"><a name="l02413"></a><span class="lineno"> 2413</span>&#160;</div><div class="line"><a name="l02414"></a><span class="lineno"> 2414</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02415"></a><span class="lineno"> 2415</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02416"></a><span class="lineno"> 2416</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02417"></a><span class="lineno"> 2417</span>&#160;LIBNET_API</div><div class="line"><a name="l02418"></a><span class="lineno"> 2418</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02419"></a><span class="lineno"> 2419</span>&#160;libnet_close_raw4(libnet_t *l);</div><div class="line"><a name="l02420"></a><span class="lineno"> 2420</span>&#160;</div><div class="line"><a name="l02421"></a><span class="lineno"> 2421</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02422"></a><span class="lineno"> 2422</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02423"></a><span class="lineno"> 2423</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02424"></a><span class="lineno"> 2424</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02425"></a><span class="lineno"> 2425</span>&#160;libnet_open_raw6(libnet_t *l);</div><div class="line"><a name="l02426"></a><span class="lineno"> 2426</span>&#160; </div><div class="line"><a name="l02427"></a><span class="lineno"> 2427</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02428"></a><span class="lineno"> 2428</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02429"></a><span class="lineno"> 2429</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02430"></a><span class="lineno"> 2430</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02431"></a><span class="lineno"> 2431</span>&#160;libnet_close_raw6(libnet_t *l);</div><div class="line"><a name="l02432"></a><span class="lineno"> 2432</span>&#160;</div><div class="line"><a name="l02433"></a><span class="lineno"> 2433</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02434"></a><span class="lineno"> 2434</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02435"></a><span class="lineno"> 2435</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02436"></a><span class="lineno"> 2436</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02437"></a><span class="lineno"> 2437</span>&#160;libnet_select_device(libnet_t *l);</div><div class="line"><a name="l02438"></a><span class="lineno"> 2438</span>&#160;</div><div class="line"><a name="l02439"></a><span class="lineno"> 2439</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02440"></a><span class="lineno"> 2440</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02441"></a><span class="lineno"> 2441</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02442"></a><span class="lineno"> 2442</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02443"></a><span class="lineno"> 2443</span>&#160;libnet_open_link(libnet_t *l);</div><div class="line"><a name="l02444"></a><span class="lineno"> 2444</span>&#160;</div><div class="line"><a name="l02445"></a><span class="lineno"> 2445</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02446"></a><span class="lineno"> 2446</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02447"></a><span class="lineno"> 2447</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02448"></a><span class="lineno"> 2448</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02449"></a><span class="lineno"> 2449</span>&#160;libnet_close_link(libnet_t *l);</div><div class="line"><a name="l02450"></a><span class="lineno"> 2450</span>&#160;</div><div class="line"><a name="l02451"></a><span class="lineno"> 2451</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02452"></a><span class="lineno"> 2452</span>&#160;<span class="comment"> * [Internal]</span></div><div class="line"><a name="l02453"></a><span class="lineno"> 2453</span>&#160;<span class="comment"> * THIS FUNCTION IS BROKEN. IT WILL SEGFAULT OR CORRUPT MEMORY, OR JUST SILENTLY DO THE</span></div><div class="line"><a name="l02454"></a><span class="lineno"> 2454</span>&#160;<span class="comment"> * WRONG THING IF NOT CALLED CORRECTLY, AND CALLING IT CORRECTLY IS UNDOCUMENTED, AND</span></div><div class="line"><a name="l02455"></a><span class="lineno"> 2455</span>&#160;<span class="comment"> * ALMOST IMPOSSIBLE. YOU HAVE BEEN WARNED.</span></div><div class="line"><a name="l02456"></a><span class="lineno"> 2456</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02457"></a><span class="lineno"> 2457</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02458"></a><span class="lineno"> 2458</span>&#160;libnet_do_checksum(libnet_t *l, uint8_t *iphdr, <span class="keywordtype">int</span> protocol, <span class="keywordtype">int</span> h_len);</div><div class="line"><a name="l02459"></a><span class="lineno"> 2459</span>&#160;</div><div class="line"><a name="l02460"></a><span class="lineno"> 2460</span>&#160;<span class="comment">/* Calculate internet checksums.</span></div><div class="line"><a name="l02461"></a><span class="lineno"> 2461</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l02462"></a><span class="lineno"> 2462</span>&#160;<span class="comment"> * IP (TCP, UDP, IGMP, ICMP, etc...) checksums usually need information from</span></div><div class="line"><a name="l02463"></a><span class="lineno"> 2463</span>&#160;<span class="comment"> * the IP header to construct the &quot;pseudo header&quot;, this function takes a</span></div><div class="line"><a name="l02464"></a><span class="lineno"> 2464</span>&#160;<span class="comment"> * pointer to that header, the buffer boundaries, the &quot;h_len&quot; (see pblock_t for</span></div><div class="line"><a name="l02465"></a><span class="lineno"> 2465</span>&#160;<span class="comment"> * a description, it is increasingly unused, though, and I&#39;m trying to remove it</span></div><div class="line"><a name="l02466"></a><span class="lineno"> 2466</span>&#160;<span class="comment"> * altogether), and the protocol number for the protocol that is to be</span></div><div class="line"><a name="l02467"></a><span class="lineno"> 2467</span>&#160;<span class="comment"> * checksummed.</span></div><div class="line"><a name="l02468"></a><span class="lineno"> 2468</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l02469"></a><span class="lineno"> 2469</span>&#160;<span class="comment"> * Finding that protocol requires that the IP header be well-formed... so this</span></div><div class="line"><a name="l02470"></a><span class="lineno"> 2470</span>&#160;<span class="comment"> * won&#39;t work well for invalid packets. But then, what is the valid checksum</span></div><div class="line"><a name="l02471"></a><span class="lineno"> 2471</span>&#160;<span class="comment"> * for a invalid packet, anyhow?</span></div><div class="line"><a name="l02472"></a><span class="lineno"> 2472</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l02473"></a><span class="lineno"> 2473</span>&#160;<span class="comment"> * This doesn&#39;t work well for non-inet checksums, sorry, that&#39;s an original design</span></div><div class="line"><a name="l02474"></a><span class="lineno"> 2474</span>&#160;<span class="comment"> * flaw. pblock_t needs a pointer in it, to a packet assembly function that can be</span></div><div class="line"><a name="l02475"></a><span class="lineno"> 2475</span>&#160;<span class="comment"> * called at runtime to do assembly and checksumming.</span></div><div class="line"><a name="l02476"></a><span class="lineno"> 2476</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02477"></a><span class="lineno"> 2477</span>&#160;LIBNET_API</div><div class="line"><a name="l02478"></a><span class="lineno"> 2478</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02479"></a><span class="lineno"> 2479</span>&#160;libnet_inet_checksum(libnet_t *l, uint8_t *iphdr, <span class="keywordtype">int</span> protocol, <span class="keywordtype">int</span> h_len, <span class="keyword">const</span> uint8_t *beg, <span class="keyword">const</span> uint8_t * end);</div><div class="line"><a name="l02480"></a><span class="lineno"> 2480</span>&#160;</div><div class="line"><a name="l02481"></a><span class="lineno"> 2481</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02482"></a><span class="lineno"> 2482</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02483"></a><span class="lineno"> 2483</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02484"></a><span class="lineno"> 2484</span>&#160;LIBNET_API</div><div class="line"><a name="l02485"></a><span class="lineno"> 2485</span>&#160;uint32_t</div><div class="line"><a name="l02486"></a><span class="lineno"> 2486</span>&#160;libnet_compute_crc(uint8_t *buf, uint32_t len);</div><div class="line"><a name="l02487"></a><span class="lineno"> 2487</span>&#160;</div><div class="line"><a name="l02488"></a><span class="lineno"> 2488</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02489"></a><span class="lineno"> 2489</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02490"></a><span class="lineno"> 2490</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02491"></a><span class="lineno"> 2491</span>&#160;LIBNET_API</div><div class="line"><a name="l02492"></a><span class="lineno"> 2492</span>&#160;uint16_t</div><div class="line"><a name="l02493"></a><span class="lineno"> 2493</span>&#160;libnet_ip_check(uint16_t *addr, <span class="keywordtype">int</span> len);</div><div class="line"><a name="l02494"></a><span class="lineno"> 2494</span>&#160;</div><div class="line"><a name="l02495"></a><span class="lineno"> 2495</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02496"></a><span class="lineno"> 2496</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02497"></a><span class="lineno"> 2497</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02498"></a><span class="lineno"> 2498</span>&#160;LIBNET_API</div><div class="line"><a name="l02499"></a><span class="lineno"> 2499</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02500"></a><span class="lineno"> 2500</span>&#160;libnet_in_cksum(uint16_t *addr, <span class="keywordtype">int</span> len);</div><div class="line"><a name="l02501"></a><span class="lineno"> 2501</span>&#160;</div><div class="line"><a name="l02502"></a><span class="lineno"> 2502</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02503"></a><span class="lineno"> 2503</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02504"></a><span class="lineno"> 2504</span>&#160;<span class="comment"> * If ptag is 0, function will create a pblock for the protocol unit type,</span></div><div class="line"><a name="l02505"></a><span class="lineno"> 2505</span>&#160;<span class="comment"> * append it to the list and return a pointer to it. If ptag is not 0,</span></div><div class="line"><a name="l02506"></a><span class="lineno"> 2506</span>&#160;<span class="comment"> * function will search the pblock list for the specified protocol block </span></div><div class="line"><a name="l02507"></a><span class="lineno"> 2507</span>&#160;<span class="comment"> * and return a pointer to it.</span></div><div class="line"><a name="l02508"></a><span class="lineno"> 2508</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02509"></a><span class="lineno"> 2509</span>&#160;LIBNET_API</div><div class="line"><a name="l02510"></a><span class="lineno"> 2510</span>&#160;libnet_pblock_t *</div><div class="line"><a name="l02511"></a><span class="lineno"> 2511</span>&#160;libnet_pblock_probe(libnet_t *l, libnet_ptag_t ptag, uint32_t b_len, </div><div class="line"><a name="l02512"></a><span class="lineno"> 2512</span>&#160;uint8_t type);</div><div class="line"><a name="l02513"></a><span class="lineno"> 2513</span>&#160;</div><div class="line"><a name="l02514"></a><span class="lineno"> 2514</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02515"></a><span class="lineno"> 2515</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02516"></a><span class="lineno"> 2516</span>&#160;<span class="comment"> * Function creates the pblock list if l-&gt;protocol_blocks == NULL or appends</span></div><div class="line"><a name="l02517"></a><span class="lineno"> 2517</span>&#160;<span class="comment"> * an entry to the doubly linked list.</span></div><div class="line"><a name="l02518"></a><span class="lineno"> 2518</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02519"></a><span class="lineno"> 2519</span>&#160;LIBNET_API</div><div class="line"><a name="l02520"></a><span class="lineno"> 2520</span>&#160;libnet_pblock_t *</div><div class="line"><a name="l02521"></a><span class="lineno"> 2521</span>&#160;libnet_pblock_new(libnet_t *l, uint32_t b_len);</div><div class="line"><a name="l02522"></a><span class="lineno"> 2522</span>&#160;</div><div class="line"><a name="l02523"></a><span class="lineno"> 2523</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02524"></a><span class="lineno"> 2524</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02525"></a><span class="lineno"> 2525</span>&#160;<span class="comment"> * Function swaps two pblocks in memory.</span></div><div class="line"><a name="l02526"></a><span class="lineno"> 2526</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02527"></a><span class="lineno"> 2527</span>&#160;LIBNET_API</div><div class="line"><a name="l02528"></a><span class="lineno"> 2528</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02529"></a><span class="lineno"> 2529</span>&#160;libnet_pblock_swap(libnet_t *l, libnet_ptag_t ptag1, libnet_ptag_t ptag2);</div><div class="line"><a name="l02530"></a><span class="lineno"> 2530</span>&#160;</div><div class="line"><a name="l02531"></a><span class="lineno"> 2531</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02532"></a><span class="lineno"> 2532</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02533"></a><span class="lineno"> 2533</span>&#160;<span class="comment"> * Function inserts ptag2 before ptag1 in the doubly linked list.</span></div><div class="line"><a name="l02534"></a><span class="lineno"> 2534</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02535"></a><span class="lineno"> 2535</span>&#160;LIBNET_API</div><div class="line"><a name="l02536"></a><span class="lineno"> 2536</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02537"></a><span class="lineno"> 2537</span>&#160;libnet_pblock_insert_before(libnet_t *l, libnet_ptag_t ptag1,</div><div class="line"><a name="l02538"></a><span class="lineno"> 2538</span>&#160;libnet_ptag_t ptag2);</div><div class="line"><a name="l02539"></a><span class="lineno"> 2539</span>&#160;</div><div class="line"><a name="l02540"></a><span class="lineno"> 2540</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02541"></a><span class="lineno"> 2541</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02542"></a><span class="lineno"> 2542</span>&#160;<span class="comment"> * Function removes a pblock from context </span></div><div class="line"><a name="l02543"></a><span class="lineno"> 2543</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02544"></a><span class="lineno"> 2544</span>&#160;LIBNET_API</div><div class="line"><a name="l02545"></a><span class="lineno"> 2545</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l02546"></a><span class="lineno"> 2546</span>&#160;libnet_pblock_delete(libnet_t *l, libnet_pblock_t *p);</div><div class="line"><a name="l02547"></a><span class="lineno"> 2547</span>&#160;</div><div class="line"><a name="l02548"></a><span class="lineno"> 2548</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02549"></a><span class="lineno"> 2549</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02550"></a><span class="lineno"> 2550</span>&#160;<span class="comment"> * Function updates the pblock meta-information. Internally it updates the</span></div><div class="line"><a name="l02551"></a><span class="lineno"> 2551</span>&#160;<span class="comment"> * ptag with a monotonically increasing variable kept in l. This way each</span></div><div class="line"><a name="l02552"></a><span class="lineno"> 2552</span>&#160;<span class="comment"> * pblock has a successively increasing ptag identifier.</span></div><div class="line"><a name="l02553"></a><span class="lineno"> 2553</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02554"></a><span class="lineno"> 2554</span>&#160;LIBNET_API</div><div class="line"><a name="l02555"></a><span class="lineno"> 2555</span>&#160;libnet_ptag_t</div><div class="line"><a name="l02556"></a><span class="lineno"> 2556</span>&#160;libnet_pblock_update(libnet_t *l, libnet_pblock_t *p, uint32_t h, uint8_t type);</div><div class="line"><a name="l02557"></a><span class="lineno"> 2557</span>&#160;</div><div class="line"><a name="l02558"></a><span class="lineno"> 2558</span>&#160;</div><div class="line"><a name="l02559"></a><span class="lineno"> 2559</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02560"></a><span class="lineno"> 2560</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02561"></a><span class="lineno"> 2561</span>&#160;<span class="comment"> * Function locates a given block by it&#39;s ptag. </span></div><div class="line"><a name="l02562"></a><span class="lineno"> 2562</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02563"></a><span class="lineno"> 2563</span>&#160;LIBNET_API</div><div class="line"><a name="l02564"></a><span class="lineno"> 2564</span>&#160;libnet_pblock_t *</div><div class="line"><a name="l02565"></a><span class="lineno"> 2565</span>&#160;libnet_pblock_find(libnet_t *l, libnet_ptag_t ptag);</div><div class="line"><a name="l02566"></a><span class="lineno"> 2566</span>&#160;</div><div class="line"><a name="l02567"></a><span class="lineno"> 2567</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02568"></a><span class="lineno"> 2568</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02569"></a><span class="lineno"> 2569</span>&#160;<span class="comment"> * Function copies protocol block data over.</span></div><div class="line"><a name="l02570"></a><span class="lineno"> 2570</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02571"></a><span class="lineno"> 2571</span>&#160;LIBNET_API</div><div class="line"><a name="l02572"></a><span class="lineno"> 2572</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02573"></a><span class="lineno"> 2573</span>&#160;libnet_pblock_append(libnet_t *l, libnet_pblock_t *p, <span class="keyword">const</span> <span class="keywordtype">void</span> *buf, uint32_t len);</div><div class="line"><a name="l02574"></a><span class="lineno"> 2574</span>&#160;</div><div class="line"><a name="l02575"></a><span class="lineno"> 2575</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02576"></a><span class="lineno"> 2576</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02577"></a><span class="lineno"> 2577</span>&#160;<span class="comment"> * Function sets pblock flags.</span></div><div class="line"><a name="l02578"></a><span class="lineno"> 2578</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02579"></a><span class="lineno"> 2579</span>&#160;LIBNET_API</div><div class="line"><a name="l02580"></a><span class="lineno"> 2580</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l02581"></a><span class="lineno"> 2581</span>&#160;libnet_pblock_setflags(libnet_pblock_t *p, uint8_t flags);</div><div class="line"><a name="l02582"></a><span class="lineno"> 2582</span>&#160;</div><div class="line"><a name="l02583"></a><span class="lineno"> 2583</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02584"></a><span class="lineno"> 2584</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02585"></a><span class="lineno"> 2585</span>&#160;<span class="comment"> * Function returns the protocol number for the protocol block type. If</span></div><div class="line"><a name="l02586"></a><span class="lineno"> 2586</span>&#160;<span class="comment"> * the type is unknown, the function defaults to returning IPPROTO_IP.</span></div><div class="line"><a name="l02587"></a><span class="lineno"> 2587</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02588"></a><span class="lineno"> 2588</span>&#160;LIBNET_API</div><div class="line"><a name="l02589"></a><span class="lineno"> 2589</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02590"></a><span class="lineno"> 2590</span>&#160;libnet_pblock_p2p(uint8_t type);</div><div class="line"><a name="l02591"></a><span class="lineno"> 2591</span>&#160;</div><div class="line"><a name="l02592"></a><span class="lineno"> 2592</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02593"></a><span class="lineno"> 2593</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02594"></a><span class="lineno"> 2594</span>&#160;<span class="comment"> * Function assembles the protocol blocks into a packet, checksums are</span></div><div class="line"><a name="l02595"></a><span class="lineno"> 2595</span>&#160;<span class="comment"> * calculated if that was requested.</span></div><div class="line"><a name="l02596"></a><span class="lineno"> 2596</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02597"></a><span class="lineno"> 2597</span>&#160;LIBNET_API</div><div class="line"><a name="l02598"></a><span class="lineno"> 2598</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02599"></a><span class="lineno"> 2599</span>&#160;libnet_pblock_coalesce(libnet_t *l, uint8_t **packet, uint32_t *size);</div><div class="line"><a name="l02600"></a><span class="lineno"> 2600</span>&#160;</div><div class="line"><a name="l02601"></a><span class="lineno"> 2601</span>&#160;<span class="preprocessor">#if !(__WIN32__)</span></div><div class="line"><a name="l02602"></a><span class="lineno"> 2602</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02603"></a><span class="lineno"> 2603</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02604"></a><span class="lineno"> 2604</span>&#160;<span class="comment"> * By testing if we can retrieve the FLAGS of an interface</span></div><div class="line"><a name="l02605"></a><span class="lineno"> 2605</span>&#160;<span class="comment"> * we can know if it exists or not and if it is up.</span></div><div class="line"><a name="l02606"></a><span class="lineno"> 2606</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02607"></a><span class="lineno"> 2607</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02608"></a><span class="lineno"> 2608</span>&#160;libnet_check_iface(libnet_t *l);</div><div class="line"><a name="l02609"></a><span class="lineno"> 2609</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l02610"></a><span class="lineno"> 2610</span>&#160;</div><div class="line"><a name="l02611"></a><span class="lineno"> 2611</span>&#160;<span class="preprocessor">#if defined(__WIN32__)</span></div><div class="line"><a name="l02612"></a><span class="lineno"> 2612</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02613"></a><span class="lineno"> 2613</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02614"></a><span class="lineno"> 2614</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02615"></a><span class="lineno"> 2615</span>&#160;BYTE *</div><div class="line"><a name="l02616"></a><span class="lineno"> 2616</span>&#160;libnet_win32_get_remote_mac(libnet_t *l, DWORD IP);</div><div class="line"><a name="l02617"></a><span class="lineno"> 2617</span>&#160;</div><div class="line"><a name="l02618"></a><span class="lineno"> 2618</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02619"></a><span class="lineno"> 2619</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02620"></a><span class="lineno"> 2620</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02621"></a><span class="lineno"> 2621</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l02622"></a><span class="lineno"> 2622</span>&#160;libnet_close_link_interface(libnet_t *l);</div><div class="line"><a name="l02623"></a><span class="lineno"> 2623</span>&#160;</div><div class="line"><a name="l02624"></a><span class="lineno"> 2624</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02625"></a><span class="lineno"> 2625</span>&#160;<span class="comment"> * [Internal] </span></div><div class="line"><a name="l02626"></a><span class="lineno"> 2626</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l02627"></a><span class="lineno"> 2627</span>&#160;BYTE * </div><div class="line"><a name="l02628"></a><span class="lineno"> 2628</span>&#160;libnet_win32_read_arp_table(DWORD IP);</div><div class="line"><a name="l02629"></a><span class="lineno"> 2629</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l02630"></a><span class="lineno"> 2630</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* __LIBNET_FUNCTIONS_H */</span><span class="preprocessor"></span></div><div class="line"><a name="l02631"></a><span class="lineno"> 2631</span>&#160;</div><div class="line"><a name="l02632"></a><span class="lineno"> 2632</span>&#160;<span class="comment">/* EOF */</span></div><div class="ttc" id="libnet-functions_8h_html_a3ec16c8aa5c7ae59ff63ce4a9329ab90"><div class="ttname"><a href="libnet-functions_8h.html#a3ec16c8aa5c7ae59ff63ce4a9329ab90">libnet_write</a></div><div class="ttdeci">LIBNET_API int libnet_write(libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_acbab0d304c5e9d36438050ac6d233132"><div class="ttname"><a href="libnet-functions_8h.html#acbab0d304c5e9d36438050ac6d233132">libnet_build_802_1q</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_802_1q(const uint8_t *dst, const uint8_t *src, uint16_t tpi, uint8_t priority, uint8_t cfi, uint16_t vlan_id, uint16_t len_proto, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a9f859449de2c7e2f1b2d18051a315634"><div class="ttname"><a href="libnet-functions_8h.html#a9f859449de2c7e2f1b2d18051a315634">libnet_build_ospfv2_dbd</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ospfv2_dbd(uint16_t dgram_len, uint8_t opts, uint8_t type, uint32_t seqnum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_afbeeb2c1c377c59aa2747dff4db4d5e8"><div class="ttname"><a href="libnet-functions_8h.html#afbeeb2c1c377c59aa2747dff4db4d5e8">libnet_build_igmp</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_igmp(uint8_t type, uint8_t reserved, uint16_t sum, uint32_t ip, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_afe0007cf544b1d6773b6046c5c5ad372"><div class="ttname"><a href="libnet-functions_8h.html#afe0007cf544b1d6773b6046c5c5ad372">libnet_build_bgp4_notification</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_bgp4_notification(uint8_t err_code, uint8_t err_subcode, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a88f572ee97c9223d4b24f55d868ce419"><div class="ttname"><a href="libnet-functions_8h.html#a88f572ee97c9223d4b24f55d868ce419">libnet_build_bgp4_update</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_bgp4_update(uint16_t unfeasible_rt_len, const uint8_t *withdrawn_rt, uint16_t total_path_attr_len, const uint8_t *path_attributes, uint16_t info_len, uint8_t *reachability_info, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a5ffe185b91c48fad0dc84f81b7d26697"><div class="ttname"><a href="libnet-functions_8h.html#a5ffe185b91c48fad0dc84f81b7d26697">libnet_build_ospfv2_lsu</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsu(uint32_t num, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a6da323c2eb9eeab293cdfd99ceb134b5"><div class="ttname"><a href="libnet-functions_8h.html#a6da323c2eb9eeab293cdfd99ceb134b5">libnet_autobuild_ethernet</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_autobuild_ethernet(const uint8_t *dst, uint16_t type, libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a6173dfa2aaf953c8a36ebf347a567100"><div class="ttname"><a href="libnet-functions_8h.html#a6173dfa2aaf953c8a36ebf347a567100">libnet_getgre_length</a></div><div class="ttdeci">LIBNET_API uint32_t libnet_getgre_length(uint16_t fv)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_acf6dc1ece9e994d4f4d3e47e5b218f6c"><div class="ttname"><a href="libnet-functions_8h.html#acf6dc1ece9e994d4f4d3e47e5b218f6c">libnet_get_hwaddr</a></div><div class="ttdeci">LIBNET_API struct libnet_ether_addr * libnet_get_hwaddr(libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_aa209cafad74cd8f259aa97732e06d07c"><div class="ttname"><a href="libnet-functions_8h.html#aa209cafad74cd8f259aa97732e06d07c">libnet_build_ipv4_options</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ipv4_options(const uint8_t *options, uint32_t options_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a913fc0cf8782d915edc20f4f6abf847f"><div class="ttname"><a href="libnet-functions_8h.html#a913fc0cf8782d915edc20f4f6abf847f">libnet_build_stp_tcn</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_stp_tcn(uint16_t id, uint8_t version, uint8_t bpdu_type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a301939dd9e773bec51a8a3cc8e09ca3b"><div class="ttname"><a href="libnet-functions_8h.html#a301939dd9e773bec51a8a3cc8e09ca3b">libnet_getfd</a></div><div class="ttdeci">LIBNET_API int libnet_getfd(libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a8fe5ad751cf8320b0ac56a0736332ec3"><div class="ttname"><a href="libnet-functions_8h.html#a8fe5ad751cf8320b0ac56a0736332ec3">libnet_stats</a></div><div class="ttdeci">LIBNET_API void libnet_stats(libnet_t *l, struct libnet_stats *ls)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_af21a48ca025b23dfcd5d10e9d1b924ba"><div class="ttname"><a href="libnet-functions_8h.html#af21a48ca025b23dfcd5d10e9d1b924ba">libnet_cq_next</a></div><div class="ttdeci">LIBNET_API libnet_t * libnet_cq_next(void)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_ab33fc501031e68af303fbffb7643b11d"><div class="ttname"><a href="libnet-functions_8h.html#ab33fc501031e68af303fbffb7643b11d">libnet_build_802_1x</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_802_1x(uint8_t eap_ver, uint8_t eap_type, uint16_t length, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a1775288c17694d4d606327ad066f970d"><div class="ttname"><a href="libnet-functions_8h.html#a1775288c17694d4d606327ad066f970d">libnet_cq_find_by_label</a></div><div class="ttdeci">LIBNET_API libnet_t * libnet_cq_find_by_label(char *label)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a0a43add9ba39e677367ff167e807814b"><div class="ttname"><a href="libnet-functions_8h.html#a0a43add9ba39e677367ff167e807814b">libnet_in6_is_error</a></div><div class="ttdeci">LIBNET_API int libnet_in6_is_error(struct libnet_in6_addr addr)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a1b6e9597bf110de597a673a4c6ed6ebc"><div class="ttname"><a href="libnet-functions_8h.html#a1b6e9597bf110de597a673a4c6ed6ebc">libnet_build_ipv6_destopts</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ipv6_destopts(uint8_t nh, uint8_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a7ca153d8efe6650769765fbc23e2b312"><div class="ttname"><a href="libnet-functions_8h.html#a7ca153d8efe6650769765fbc23e2b312">libnet_get_ipaddr6</a></div><div class="ttdeci">LIBNET_API struct libnet_in6_addr libnet_get_ipaddr6(libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_acb97a898e200c1aaea6081545f2fcb39"><div class="ttname"><a href="libnet-functions_8h.html#acb97a898e200c1aaea6081545f2fcb39">libnet_build_ethernet</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ethernet(const uint8_t *dst, const uint8_t *src, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a155f2da7f242051d5d80691c1754ca9c"><div class="ttname"><a href="libnet-functions_8h.html#a155f2da7f242051d5d80691c1754ca9c">libnet_plist_chain_dump</a></div><div class="ttdeci">LIBNET_API int libnet_plist_chain_dump(libnet_plist_t *plist)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a8a881ba6d300b16e5cadd9e3f6ef7bc8"><div class="ttname"><a href="libnet-functions_8h.html#a8a881ba6d300b16e5cadd9e3f6ef7bc8">libnet_autobuild_link</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_autobuild_link(const uint8_t *dst, const uint8_t *oui, uint16_t type, libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_ad6310dd6dff16dc711663f70256d2148"><div class="ttname"><a href="libnet-functions_8h.html#ad6310dd6dff16dc711663f70256d2148">libnet_build_stp_conf</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_stp_conf(uint16_t id, uint8_t version, uint8_t bpdu_type, uint8_t flags, const uint8_t *root_id, uint32_t root_pc, const uint8_t *bridge_id, uint16_t port_id, uint16_t message_age, uint16_t max_age, uint16_t hello_time, uint16_t f_delay, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a49e6023168b4f660ed8ff67dcc8ee228"><div class="ttname"><a href="libnet-functions_8h.html#a49e6023168b4f660ed8ff67dcc8ee228">libnet_diag_dump_pblock</a></div><div class="ttdeci">LIBNET_API void libnet_diag_dump_pblock(libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_ab8c2a7a3572bcfef2705ab05c8ef12bc"><div class="ttname"><a href="libnet-functions_8h.html#ab8c2a7a3572bcfef2705ab05c8ef12bc">libnet_build_fddi</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_fddi(uint8_t fc, const uint8_t *dst, const uint8_t *src, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t *oui, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a2d9839736df3b1c46acdcc67e291c03e"><div class="ttname"><a href="libnet-functions_8h.html#a2d9839736df3b1c46acdcc67e291c03e">libnet_build_ipv4</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ipv4(uint16_t ip_len, uint8_t tos, uint16_t id, uint16_t frag, uint8_t ttl, uint8_t prot, uint16_t sum, uint32_t src, uint32_t dst, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a22f004a0b0d496762fbd056ca5d31eeb"><div class="ttname"><a href="libnet-functions_8h.html#a22f004a0b0d496762fbd056ca5d31eeb">libnet_build_802_2snap</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_802_2snap(uint8_t dsap, uint8_t ssap, uint8_t control, uint8_t *oui, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_aaedc1110a9c8deab0909f15e141f5883"><div class="ttname"><a href="libnet-functions_8h.html#aaedc1110a9c8deab0909f15e141f5883">libnet_plist_chain_new</a></div><div class="ttdeci">LIBNET_API int libnet_plist_chain_new(libnet_t *l, libnet_plist_t **plist, char *token_list)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a7fb612955dd3a787f13ab0c85b360023"><div class="ttname"><a href="libnet-functions_8h.html#a7fb612955dd3a787f13ab0c85b360023">libnet_build_ipv6_routing</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ipv6_routing(uint8_t nh, uint8_t len, uint8_t rtype, uint8_t segments, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a429bf355c69895a5ad7ca900d734bf48"><div class="ttname"><a href="libnet-functions_8h.html#a429bf355c69895a5ad7ca900d734bf48">libnet_build_ospfv2</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ospfv2(uint16_t len, uint8_t type, uint32_t rtr_id, uint32_t area_id, uint16_t sum, uint16_t autype, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a0e7ba4cf571d4d85b1084e15059c7336"><div class="ttname"><a href="libnet-functions_8h.html#a0e7ba4cf571d4d85b1084e15059c7336">libnet_build_ipsec_esp_ftr</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ipsec_esp_ftr(uint8_t len, uint8_t nh, int8_t *auth, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_aec6344132528e6903837b0d8909ad08c"><div class="ttname"><a href="libnet-functions_8h.html#aec6344132528e6903837b0d8909ad08c">libnet_build_tcp_options</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_tcp_options(const uint8_t *options, uint32_t options_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_aed8b33a329bda096ecac629e92e9bca5"><div class="ttname"><a href="libnet-functions_8h.html#aed8b33a329bda096ecac629e92e9bca5">libnet_build_cdp</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_cdp(uint8_t version, uint8_t ttl, uint16_t sum, uint16_t type, uint16_t value_s, const uint8_t *value, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a606209e22d203a859a380e1d37f9688c"><div class="ttname"><a href="libnet-functions_8h.html#a606209e22d203a859a380e1d37f9688c">libnet_autobuild_ipv6</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_autobuild_ipv6(uint16_t len, uint8_t nh, struct libnet_in6_addr dst, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a224a55d5758cd6685fdd374597f133c4"><div class="ttname"><a href="libnet-functions_8h.html#a224a55d5758cd6685fdd374597f133c4">libnet_build_ospfv2_hello</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ospfv2_hello(uint32_t netmask, uint16_t interval, uint8_t opts, uint8_t priority, uint32_t dead_int, uint32_t des_rtr, uint32_t bkup_rtr, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a5a6538c0cf4dd6c2f59b1657d56796b3"><div class="ttname"><a href="libnet-functions_8h.html#a5a6538c0cf4dd6c2f59b1657d56796b3">libnet_build_vrrp</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_vrrp(uint8_t version, uint8_t type, uint8_t vrouter_id, uint8_t priority, uint8_t ip_count, uint8_t auth_type, uint8_t advert_int, uint16_t sum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a90a6ea3b24de3906ca1cf9c78a7b5a5f"><div class="ttname"><a href="libnet-functions_8h.html#a90a6ea3b24de3906ca1cf9c78a7b5a5f">libnet_cq_remove_by_label</a></div><div class="ttdeci">LIBNET_API libnet_t * libnet_cq_remove_by_label(char *label)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_abe75e9be71910c580eff1d6925224778"><div class="ttname"><a href="libnet-functions_8h.html#abe75e9be71910c580eff1d6925224778">libnet_build_hsrp</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_hsrp(uint8_t version, uint8_t opcode, uint8_t state, uint8_t hello_time, uint8_t hold_time, uint8_t priority, uint8_t group, uint8_t reserved, uint8_t authdata[HSRP_AUTHDATA_LENGTH], uint32_t virtual_ip, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a0a995dfd68f20b80394507b9968ae951"><div class="ttname"><a href="libnet-functions_8h.html#a0a995dfd68f20b80394507b9968ae951">libnet_seed_prand</a></div><div class="ttdeci">LIBNET_API int libnet_seed_prand(libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_aac02edd8930cb604dc65f72f7ffd8892"><div class="ttname"><a href="libnet-functions_8h.html#aac02edd8930cb604dc65f72f7ffd8892">libnet_adv_cull_header</a></div><div class="ttdeci">LIBNET_API int libnet_adv_cull_header(libnet_t *l, libnet_ptag_t ptag, uint8_t **header, uint32_t *header_s)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a0092b3f0285f4c96915eef9579655036"><div class="ttname"><a href="libnet-functions_8h.html#a0092b3f0285f4c96915eef9579655036">libnet_build_egre</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_egre(uint16_t fv, uint16_t type, uint16_t sum, uint16_t offset, uint32_t key, uint32_t seq, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a50fc0e6ad5c2b1fd705f349eff382dfd"><div class="ttname"><a href="libnet-functions_8h.html#a50fc0e6ad5c2b1fd705f349eff382dfd">libnet_build_ipv6</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ipv6(uint8_t tc, uint32_t fl, uint16_t len, uint8_t nh, uint8_t hl, struct libnet_in6_addr src, struct libnet_in6_addr dst, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a59623a76b513ae6af05befded04f65d2"><div class="ttname"><a href="libnet-functions_8h.html#a59623a76b513ae6af05befded04f65d2">libnet_plist_chain_free</a></div><div class="ttdeci">LIBNET_API int libnet_plist_chain_free(libnet_plist_t *plist)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_ad096d303ddcddbd63ea269453bd26a20"><div class="ttname"><a href="libnet-functions_8h.html#ad096d303ddcddbd63ea269453bd26a20">libnet_build_tcp</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_tcp(uint16_t sp, uint16_t dp, uint32_t seq, uint32_t ack, uint8_t control, uint16_t win, uint16_t sum, uint16_t urg, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a367d0539e0c7484ac4e0092ced22ca8e"><div class="ttname"><a href="libnet-functions_8h.html#a367d0539e0c7484ac4e0092ced22ca8e">libnet_autobuild_fddi</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_autobuild_fddi(uint8_t fc, const uint8_t *dst, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t *oui, uint16_t type, libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a3f9827171fbe5dbc4b02c7d9876a2393"><div class="ttname"><a href="libnet-functions_8h.html#a3f9827171fbe5dbc4b02c7d9876a2393">libnet_build_bgp4_header</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_bgp4_header(uint8_t marker[LIBNET_BGP4_MARKER_SIZE], uint16_t len, uint8_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a926f33ff4ea64923b49f16f8c5f7286d"><div class="ttname"><a href="libnet-functions_8h.html#a926f33ff4ea64923b49f16f8c5f7286d">libnet_build_icmpv4_timestamp</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_icmpv4_timestamp(uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint32_t otime, uint32_t rtime, uint32_t ttime, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_ab606fadc44daa426fa4ba8b43bee5ece"><div class="ttname"><a href="libnet-functions_8h.html#ab606fadc44daa426fa4ba8b43bee5ece">libnet_build_arp</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_arp(uint16_t hrd, uint16_t pro, uint8_t hln, uint8_t pln, uint16_t op, const uint8_t *sha, const uint8_t *spa, const uint8_t *tha, const uint8_t *tpa, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a634e7d60fd7117c948fafea0ff25f77b"><div class="ttname"><a href="libnet-functions_8h.html#a634e7d60fd7117c948fafea0ff25f77b">libnet_name2addr4</a></div><div class="ttdeci">LIBNET_API uint32_t libnet_name2addr4(libnet_t *l, const char *host_name, uint8_t use_name)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a798142aed2aee944fdc80ce14faf31f6"><div class="ttname"><a href="libnet-functions_8h.html#a798142aed2aee944fdc80ce14faf31f6">libnet_build_ospfv2_lsa</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa(uint16_t age, uint8_t opts, uint8_t type, uint32_t lsid, uint32_t advrtr, uint32_t seqnum, uint16_t sum, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a1577413fdaf10706d5016b64f7f7924b"><div class="ttname"><a href="libnet-functions_8h.html#a1577413fdaf10706d5016b64f7f7924b">libnet_cq_destroy</a></div><div class="ttdeci">LIBNET_API void libnet_cq_destroy(void)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a22d1d874a5d12b8d3528f637990ceb21"><div class="ttname"><a href="libnet-functions_8h.html#a22d1d874a5d12b8d3528f637990ceb21">libnet_build_ipsec_ah</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ipsec_ah(uint8_t nh, uint8_t len, uint16_t res, uint32_t spi, uint32_t seq, uint32_t auth, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a41e095c98e623f00618f6d306cb31289"><div class="ttname"><a href="libnet-functions_8h.html#a41e095c98e623f00618f6d306cb31289">libnet_build_gre</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_gre(uint16_t fv, uint16_t type, uint16_t sum, uint16_t offset, uint32_t key, uint32_t seq, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_ae071e441671c342ea2d3bbca979e2769"><div class="ttname"><a href="libnet-functions_8h.html#ae071e441671c342ea2d3bbca979e2769">libnet_cq_size</a></div><div class="ttdeci">LIBNET_API uint32_t libnet_cq_size(void)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_ae9c55870fecbd742edc25f06b73ad5a2"><div class="ttname"><a href="libnet-functions_8h.html#ae9c55870fecbd742edc25f06b73ad5a2">libnet_build_ospfv2_lsa_sum</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa_sum(uint32_t nmask, uint32_t metric, uint32_t tos, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_ab403c63ae76d0bc59b6641e3c821550c"><div class="ttname"><a href="libnet-functions_8h.html#ab403c63ae76d0bc59b6641e3c821550c">libnet_build_icmpv4_mask</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_icmpv4_mask(uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint32_t mask, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_af17b19befbe13e23a240739b19846503"><div class="ttname"><a href="libnet-functions_8h.html#af17b19befbe13e23a240739b19846503">libnet_toggle_checksum</a></div><div class="ttdeci">LIBNET_API int libnet_toggle_checksum(libnet_t *l, libnet_ptag_t ptag, int mode)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a0adcfdd368764d4c4ab610daefe56b3d"><div class="ttname"><a href="libnet-functions_8h.html#a0adcfdd368764d4c4ab610daefe56b3d">libnet_get_ipaddr4</a></div><div class="ttdeci">LIBNET_API uint32_t libnet_get_ipaddr4(libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a9002c457692ce2557197dc68c9932849"><div class="ttname"><a href="libnet-functions_8h.html#a9002c457692ce2557197dc68c9932849">libnet_build_ospfv2_lsa_as</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa_as(uint32_t nmask, uint32_t metric, uint32_t fwdaddr, uint32_t tag, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_ad7d163363769594667524e7607535aec"><div class="ttname"><a href="libnet-functions_8h.html#ad7d163363769594667524e7607535aec">libnet_build_ipsec_esp_hdr</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ipsec_esp_hdr(uint32_t spi, uint32_t seq, uint32_t iv, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a50fcb283db9884651c59d79ebd825bc4"><div class="ttname"><a href="libnet-functions_8h.html#a50fcb283db9884651c59d79ebd825bc4">libnet_addr2name6_r</a></div><div class="ttdeci">LIBNET_API void libnet_addr2name6_r(struct libnet_in6_addr addr, uint8_t use_name, char *host_name, int host_name_len)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a6894d563677d9f229feedf52c759ac0a"><div class="ttname"><a href="libnet-functions_8h.html#a6894d563677d9f229feedf52c759ac0a">libnet_autobuild_ipv4</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_autobuild_ipv4(uint16_t len, uint8_t prot, uint32_t dst, libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_ad5c14b23de1fe0aaf36315c710972fcd"><div class="ttname"><a href="libnet-functions_8h.html#ad5c14b23de1fe0aaf36315c710972fcd">libnet_getpacket_size</a></div><div class="ttdeci">LIBNET_API uint32_t libnet_getpacket_size(libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a0ae166a293c0495431246fe0d0ba66f6"><div class="ttname"><a href="libnet-functions_8h.html#a0ae166a293c0495431246fe0d0ba66f6">libnet_build_udp</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_udp(uint16_t sp, uint16_t dp, uint16_t len, uint16_t sum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_aa184e1e69a7fc7161d484dcdca4f74db"><div class="ttname"><a href="libnet-functions_8h.html#aa184e1e69a7fc7161d484dcdca4f74db">libnet_build_icmpv6_ndp_nsol</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_icmpv6_ndp_nsol(uint8_t type, uint8_t code, uint16_t sum, struct libnet_in6_addr target, uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a20887ffe940f1d2c5bcae79a188176c6"><div class="ttname"><a href="libnet-functions_8h.html#a20887ffe940f1d2c5bcae79a188176c6">libnet_cq_add</a></div><div class="ttdeci">int libnet_cq_add(libnet_t *l, char *label)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a59cc8a10dd7a94f01238f96417b08420"><div class="ttname"><a href="libnet-functions_8h.html#a59cc8a10dd7a94f01238f96417b08420">libnet_diag_dump_pblock_type</a></div><div class="ttdeci">LIBNET_API char * libnet_diag_dump_pblock_type(uint8_t type)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a86ee5967b07a4fe49af301add8656450"><div class="ttname"><a href="libnet-functions_8h.html#a86ee5967b07a4fe49af301add8656450">libnet_build_icmpv6_unreach</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_icmpv6_unreach(uint8_t type, uint8_t code, uint16_t sum, uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a9ae9cb6e191e382c653237451f9bacd6"><div class="ttname"><a href="libnet-functions_8h.html#a9ae9cb6e191e382c653237451f9bacd6">libnet_clear_packet</a></div><div class="ttdeci">LIBNET_API void libnet_clear_packet(libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_ab6777b0c3c3b80eaa465686654f668e8"><div class="ttname"><a href="libnet-functions_8h.html#ab6777b0c3c3b80eaa465686654f668e8">libnet_build_802_3</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_802_3(const uint8_t *dst, const uint8_t *src, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a7932677fa8ddd7f512c7b154d91263e9"><div class="ttname"><a href="libnet-functions_8h.html#a7932677fa8ddd7f512c7b154d91263e9">libnet_geterror</a></div><div class="ttdeci">LIBNET_API char * libnet_geterror(libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a0d2d7119072c0b98f1248172a2b7885d"><div class="ttname"><a href="libnet-functions_8h.html#a0d2d7119072c0b98f1248172a2b7885d">libnet_build_icmpv6_ndp_nadv</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_icmpv6_ndp_nadv(uint8_t type, uint8_t code, uint16_t sum, uint32_t flags, struct libnet_in6_addr target, uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a9f91e176ba3b1f93ec049f82c08b54be"><div class="ttname"><a href="libnet-functions_8h.html#a9f91e176ba3b1f93ec049f82c08b54be">libnet_adv_cull_packet</a></div><div class="ttdeci">LIBNET_API int libnet_adv_cull_packet(libnet_t *l, uint8_t **packet, uint32_t *packet_s)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a8ddea475d4051b695f519100755d6a05"><div class="ttname"><a href="libnet-functions_8h.html#a8ddea475d4051b695f519100755d6a05">libnet_destroy</a></div><div class="ttdeci">LIBNET_API void libnet_destroy(libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a5829f525c067e1d99826865292542d8a"><div class="ttname"><a href="libnet-functions_8h.html#a5829f525c067e1d99826865292542d8a">libnet_build_dnsv4</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_dnsv4(uint16_t h_len, uint16_t id, uint16_t flags, uint16_t num_q, uint16_t num_anws_rr, uint16_t num_auth_rr, uint16_t num_addi_rr, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a93d5ccdcdba31daacde82fc50f467412"><div class="ttname"><a href="libnet-functions_8h.html#a93d5ccdcdba31daacde82fc50f467412">libnet_cq_remove</a></div><div class="ttdeci">LIBNET_API libnet_t * libnet_cq_remove(libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a337f556ed05df13c1de19acbd4d7f50a"><div class="ttname"><a href="libnet-functions_8h.html#a337f556ed05df13c1de19acbd4d7f50a">libnet_cq_getlabel</a></div><div class="ttdeci">LIBNET_API const char * libnet_cq_getlabel(libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a8233338e5050d8fc46c6d1f35ef32b5e"><div class="ttname"><a href="libnet-functions_8h.html#a8233338e5050d8fc46c6d1f35ef32b5e">libnet_cq_head</a></div><div class="ttdeci">LIBNET_API libnet_t * libnet_cq_head(void)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a67209523b736cc9f70743d3dfbce1129"><div class="ttname"><a href="libnet-functions_8h.html#a67209523b736cc9f70743d3dfbce1129">libnet_build_ospfv2_lsa_rtr</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa_rtr(uint16_t flags, uint16_t num, uint32_t id, uint32_t data, uint8_t type, uint8_t tos, uint16_t metric, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a154c83b71614c8cf3635f7c80cf7e9a6"><div class="ttname"><a href="libnet-functions_8h.html#a154c83b71614c8cf3635f7c80cf7e9a6">libnet_build_rip</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_rip(uint8_t cmd, uint8_t version, uint16_t rd, uint16_t af, uint16_t rt, uint32_t addr, uint32_t mask, uint32_t next_hop, uint32_t metric, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a92c45b67cbf9a16f8e6edd9a067c3f6d"><div class="ttname"><a href="libnet-functions_8h.html#a92c45b67cbf9a16f8e6edd9a067c3f6d">libnet_adv_free_packet</a></div><div class="ttdeci">LIBNET_API void libnet_adv_free_packet(libnet_t *l, uint8_t *packet)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a1e1bc31a56aad7f000e55d9f2ed002b9"><div class="ttname"><a href="libnet-functions_8h.html#a1e1bc31a56aad7f000e55d9f2ed002b9">libnet_getpbuf</a></div><div class="ttdeci">LIBNET_API uint8_t * libnet_getpbuf(libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_afdcc92fd59366c48693ad48c076c488e"><div class="ttname"><a href="libnet-functions_8h.html#afdcc92fd59366c48693ad48c076c488e">libnet_build_isl</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_isl(uint8_t *dhost, uint8_t type, uint8_t user, uint8_t *shost, uint16_t len, const uint8_t *snap, uint16_t vid, uint16_t portindex, uint16_t reserved, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_ac4e70a6d0e895d722e407c6d5fae1466"><div class="ttname"><a href="libnet-functions_8h.html#ac4e70a6d0e895d722e407c6d5fae1466">libnet_autobuild_token_ring</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_autobuild_token_ring(uint8_t ac, uint8_t fc, const uint8_t *dst, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t *oui, uint16_t type, libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_aa4c6c975b3c87d3d17224302e4319eec"><div class="ttname"><a href="libnet-functions_8h.html#aa4c6c975b3c87d3d17224302e4319eec">libnet_build_data</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_data(const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a4d77b901ebcc18b8c0ee2345e4ea6177"><div class="ttname"><a href="libnet-functions_8h.html#a4d77b901ebcc18b8c0ee2345e4ea6177">libnet_build_token_ring</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_token_ring(uint8_t ac, uint8_t fc, const uint8_t *dst, const uint8_t *src, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t *oui, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a1a8b5292e4e714c0f299f0577c86cb00"><div class="ttname"><a href="libnet-functions_8h.html#a1a8b5292e4e714c0f299f0577c86cb00">libnet_build_ipv6_hbhopts</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ipv6_hbhopts(uint8_t nh, uint8_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a4a657cd81f10ba6dbdcbd6a6a81f72d2"><div class="ttname"><a href="libnet-functions_8h.html#a4a657cd81f10ba6dbdcbd6a6a81f72d2">libnet_build_rpc_call</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_rpc_call(uint32_t rm, uint32_t xid, uint32_t prog_num, uint32_t prog_vers, uint32_t procedure, uint32_t cflavor, uint32_t clength, uint8_t *cdata, uint32_t vflavor, uint32_t vlength, const uint8_t *vdata, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_ac4b56b34eb9124cb6b70fb9bff5ba6f4"><div class="ttname"><a href="libnet-functions_8h.html#ac4b56b34eb9124cb6b70fb9bff5ba6f4">libnet_plist_chain_next_pair</a></div><div class="ttdeci">LIBNET_API int libnet_plist_chain_next_pair(libnet_plist_t *plist, uint16_t *bport, uint16_t *eport)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a4a4d3dc8f02e6fe6629e35e37ece0264"><div class="ttname"><a href="libnet-functions_8h.html#a4a4d3dc8f02e6fe6629e35e37ece0264">libnet_build_icmpv4_echo</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_icmpv4_echo(uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a65145cbd0be6d1609bf07b52d6c57695"><div class="ttname"><a href="libnet-functions_8h.html#a65145cbd0be6d1609bf07b52d6c57695">libnet_cq_end_loop</a></div><div class="ttdeci">LIBNET_API uint32_t libnet_cq_end_loop(void)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a17d51de46576464ff606e15250c7fe3a"><div class="ttname"><a href="libnet-functions_8h.html#a17d51de46576464ff606e15250c7fe3a">libnet_build_ospfv2_lsr</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsr(uint32_t type, uint32_t lsid, uint32_t advrtr, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a3524aaf97da73461cabd4797e89c4da4"><div class="ttname"><a href="libnet-functions_8h.html#a3524aaf97da73461cabd4797e89c4da4">libnet_adv_write_raw_ipv4</a></div><div class="ttdeci">LIBNET_API int libnet_adv_write_raw_ipv4(libnet_t *l, const uint8_t *packet, uint32_t packet_s)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_aced83ef40edb05a9fc1e129373fe44dd"><div class="ttname"><a href="libnet-functions_8h.html#aced83ef40edb05a9fc1e129373fe44dd">libnet_init</a></div><div class="ttdeci">LIBNET_API libnet_t * libnet_init(int injection_type, const char *device, char *err_buf)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a62a7ac78ee69568e17927674786c1b69"><div class="ttname"><a href="libnet-functions_8h.html#a62a7ac78ee69568e17927674786c1b69">libnet_hex_aton</a></div><div class="ttdeci">LIBNET_API uint8_t * libnet_hex_aton(const char *s, int *len)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a6b945999765b5c5cfa2e496153fc7d03"><div class="ttname"><a href="libnet-functions_8h.html#a6b945999765b5c5cfa2e496153fc7d03">libnet_getpbuf_size</a></div><div class="ttdeci">LIBNET_API uint32_t libnet_getpbuf_size(libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a564c31892fb8cc2bf44244cdb26d693e"><div class="ttname"><a href="libnet-functions_8h.html#a564c31892fb8cc2bf44244cdb26d693e">libnet_build_bootpv4</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_bootpv4(uint8_t opcode, uint8_t htype, uint8_t hlen, uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags, uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip, const uint8_t *chaddr, const char *sname, const char *file, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_ac4a33a98186ad71f7ae4c559b039af0f"><div class="ttname"><a href="libnet-functions_8h.html#ac4a33a98186ad71f7ae4c559b039af0f">libnet_version</a></div><div class="ttdeci">LIBNET_API const char * libnet_version(void)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a9ec77e2ffcb9540d9f4eee2b0ff57af2"><div class="ttname"><a href="libnet-functions_8h.html#a9ec77e2ffcb9540d9f4eee2b0ff57af2">libnet_build_link</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_link(const uint8_t *dst, const uint8_t *src, const uint8_t *oui, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a7edc80233d439b7755fdc127cfd7f88d"><div class="ttname"><a href="libnet-functions_8h.html#a7edc80233d439b7755fdc127cfd7f88d">libnet_cq_last</a></div><div class="ttdeci">LIBNET_API int libnet_cq_last(void)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a4a7df60e7798fddfff25f163ef63e2af"><div class="ttname"><a href="libnet-functions_8h.html#a4a7df60e7798fddfff25f163ef63e2af">libnet_build_bgp4_open</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_bgp4_open(uint8_t version, uint16_t src_as, uint16_t hold_time, uint32_t bgp_id, uint8_t opt_len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_aecee0675d61d3ff71d79c64c74a7c924"><div class="ttname"><a href="libnet-functions_8h.html#aecee0675d61d3ff71d79c64c74a7c924">libnet_build_icmpv6_ndp_opt</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_icmpv6_ndp_opt(uint8_t type, uint8_t *option, uint32_t option_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_aa1bb2efa1cec14b12f1ce6210f20b358"><div class="ttname"><a href="libnet-functions_8h.html#aa1bb2efa1cec14b12f1ce6210f20b358">libnet_autobuild_arp</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_autobuild_arp(uint16_t op, const uint8_t *sha, const uint8_t *spa, const uint8_t *tha, uint8_t *tpa, libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_adb2f7d417f05a058c0c2c7f76b6f66e6"><div class="ttname"><a href="libnet-functions_8h.html#adb2f7d417f05a058c0c2c7f76b6f66e6">libnet_diag_dump_hex</a></div><div class="ttdeci">void libnet_diag_dump_hex(const uint8_t *packet, uint32_t len, int swap, FILE *stream)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_ab65f1cd5ef46ae93909e6dd45bcff0cb"><div class="ttname"><a href="libnet-functions_8h.html#ab65f1cd5ef46ae93909e6dd45bcff0cb">libnet_getdevice</a></div><div class="ttdeci">LIBNET_API const char * libnet_getdevice(libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a0d4ce5211113c5d5818d557ce3fc0234"><div class="ttname"><a href="libnet-functions_8h.html#a0d4ce5211113c5d5818d557ce3fc0234">libnet_build_sebek</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_sebek(uint32_t magic, uint16_t version, uint16_t type, uint32_t counter, uint32_t time_sec, uint32_t time_usec, uint32_t pid, uint32_t uid, uint32_t fd, uint8_t cmd[SEBEK_CMD_LENGTH], uint32_t length, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a234cf0a788a5944ff70c879c96467bc4"><div class="ttname"><a href="libnet-functions_8h.html#a234cf0a788a5944ff70c879c96467bc4">libnet_build_ospfv2_lsa_net</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa_net(uint32_t nmask, uint32_t rtrid, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a1c70d00eefe61b2f5902ab56c802e07c"><div class="ttname"><a href="libnet-functions_8h.html#a1c70d00eefe61b2f5902ab56c802e07c">libnet_diag_dump_context</a></div><div class="ttdeci">LIBNET_API void libnet_diag_dump_context(libnet_t *l)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a09a512c9f670528f7f1c9fe9775a0a61"><div class="ttname"><a href="libnet-functions_8h.html#a09a512c9f670528f7f1c9fe9775a0a61">libnet_build_icmpv6_echo</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_icmpv6_echo(uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_ad00e9f92da1faea6c8ce400d6e7cd45e"><div class="ttname"><a href="libnet-functions_8h.html#ad00e9f92da1faea6c8ce400d6e7cd45e">libnet_adv_write_link</a></div><div class="ttdeci">LIBNET_API int libnet_adv_write_link(libnet_t *l, const uint8_t *packet, uint32_t packet_s)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_af525a32eb69e48519f84abed4231643a"><div class="ttname"><a href="libnet-functions_8h.html#af525a32eb69e48519f84abed4231643a">libnet_name2addr6</a></div><div class="ttdeci">LIBNET_API struct libnet_in6_addr libnet_name2addr6(libnet_t *l, const char *host_name, uint8_t use_name)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a6df9db28162c58a2cc356b3a87a16f6b"><div class="ttname"><a href="libnet-functions_8h.html#a6df9db28162c58a2cc356b3a87a16f6b">libnet_build_icmpv4_redirect</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_icmpv4_redirect(uint8_t type, uint8_t code, uint16_t sum, uint32_t gateway, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_ae0c59a8f8d014cc1955d88139c2096c0"><div class="ttname"><a href="libnet-functions_8h.html#ae0c59a8f8d014cc1955d88139c2096c0">libnet_build_gre_sre</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_gre_sre(uint16_t af, uint8_t offset, uint8_t length, uint8_t *routing, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a83197de705eb7929e8216f5771aa4b96"><div class="ttname"><a href="libnet-functions_8h.html#a83197de705eb7929e8216f5771aa4b96">libnet_build_icmpv4_unreach</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_icmpv4_unreach(uint8_t type, uint8_t code, uint16_t sum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a3333c5e5cde290dda9b80adc13a00466"><div class="ttname"><a href="libnet-functions_8h.html#a3333c5e5cde290dda9b80adc13a00466">libnet_build_dhcpv4</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_dhcpv4(uint8_t opcode, uint8_t htype, uint8_t hlen, uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags, uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip, const uint8_t *chaddr, const char *sname, const char *file, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a4f2eb3f11fd921b0fd0948cf8ef37c91"><div class="ttname"><a href="libnet-functions_8h.html#a4f2eb3f11fd921b0fd0948cf8ef37c91">libnet_build_icmpv4_timeexceed</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_icmpv4_timeexceed(uint8_t type, uint8_t code, uint16_t sum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a6f616f8d4646db5ada510991cce80808"><div class="ttname"><a href="libnet-functions_8h.html#a6f616f8d4646db5ada510991cce80808">libnet_build_802_2</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_802_2(uint8_t dsap, uint8_t ssap, uint8_t control, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a520053e593215a240f7207c2b28075cb"><div class="ttname"><a href="libnet-functions_8h.html#a520053e593215a240f7207c2b28075cb">libnet_build_mpls</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_mpls(uint32_t label, uint8_t experimental, uint8_t bos, uint8_t ttl, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_added478f7cb16e00cf34f44816e33083"><div class="ttname"><a href="libnet-functions_8h.html#added478f7cb16e00cf34f44816e33083">libnet_addr2name4</a></div><div class="ttdeci">LIBNET_API char * libnet_addr2name4(uint32_t in, uint8_t use_name)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_af305c48631b600e472f60b951b9ebf75"><div class="ttname"><a href="libnet-functions_8h.html#af305c48631b600e472f60b951b9ebf75">libnet_build_ntp</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ntp(uint8_t leap_indicator, uint8_t version, uint8_t mode, uint8_t stratum, uint8_t poll, uint8_t precision, uint16_t delay_int, uint16_t delay_frac, uint16_t dispersion_int, uint16_t dispersion_frac, uint32_t reference_id, uint32_t ref_ts_int, uint32_t ref_ts_frac, uint32_t orig_ts_int, uint32_t orig_ts_frac, uint32_t rec_ts_int, uint32_t rec_ts_frac, uint32_t xmt_ts_int, uint32_t xmt_ts_frac, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_ae514f81f6d68bc1b2442762a6f87804a"><div class="ttname"><a href="libnet-functions_8h.html#ae514f81f6d68bc1b2442762a6f87804a">libnet_build_gre_last_sre</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_gre_last_sre(libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_adbd62cbfc5a072a9e77f1b64af78b46e"><div class="ttname"><a href="libnet-functions_8h.html#adbd62cbfc5a072a9e77f1b64af78b46e">libnet_plist_chain_dump_string</a></div><div class="ttdeci">LIBNET_API char * libnet_plist_chain_dump_string(libnet_plist_t *plist)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_a9eeb211b6b8579fe9725da6d32d2732d"><div class="ttname"><a href="libnet-functions_8h.html#a9eeb211b6b8579fe9725da6d32d2732d">libnet_build_ipv6_frag</a></div><div class="ttdeci">LIBNET_API libnet_ptag_t libnet_build_ipv6_frag(uint8_t nh, uint8_t reserved, uint16_t frag, uint32_t id, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)</div></div>
+<div class="ttc" id="libnet-functions_8h_html_ae0a1d32fdd169c55a0ce4c186a19b125"><div class="ttname"><a href="libnet-functions_8h.html#ae0a1d32fdd169c55a0ce4c186a19b125">libnet_get_prand</a></div><div class="ttdeci">LIBNET_API uint32_t libnet_get_prand(int mod)</div></div>
+</div><!-- fragment --></div><!-- contents -->
+<hr>
+<address><small>
+Documentation for <a href="https://github.com/sgeto/libnet">libnet</a> (version 1.2-rc3).<br>
+Generated on Wed Apr 26 2017 by
+<a href="http://www.doxygen.org/">Doxygen 1.8.14</a>.
+</small></address>
+</body>
+</html>
diff --git a/doc/api/libnet-macros_8h.html b/doc/api/libnet-macros_8h.html
new file mode 100644
index 0000000..6c37cb4
--- /dev/null
+++ b/doc/api/libnet-macros_8h.html
@@ -0,0 +1,228 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.14"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>libnet: API Documentation: libnet/libnet-macros.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="libnet_api_stylesheet.css_tmpl" rel="stylesheet" type="text/css"/>
+</head>
+<!-- Generated by Doxygen 1.8.14 -->
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_2e83b025d21fe7b9c524d93377692ce4.html">libnet</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#define-members">Macros</a> </div>
+ <div class="headertitle">
+<div class="title">libnet-macros.h File Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+
+<p>libnet macros and symbolic constants
+<a href="#details">More...</a></p>
+<div class="textblock"><div class="dynheader">
+This graph shows which files directly or indirectly include this file:</div>
+<div class="dyncontent">
+<div class="center"><img src="libnet-macros_8h__dep__incl.png" border="0" usemap="#libnet_2libnet-macros_8hdep" alt=""/></div>
+<map name="libnet_2libnet-macros_8hdep" id="libnet_2libnet-macros_8hdep">
+<area shape="rect" id="node2" href="libnet_8h.html" title="Top&#45;level libnet header file. " alt="" coords="47,80,111,107"/>
+</map>
+</div>
+</div>
+<p><a href="libnet-macros_8h_source.html">Go to the source code of this file.</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
+Macros</h2></td></tr>
+<tr class="memitem:ac67cb6e9b00fd492cc3a9247e9477d87"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-macros_8h.html#ac67cb6e9b00fd492cc3a9247e9477d87">LIBNET_DONT_RESOLVE</a>&#160;&#160;&#160;0</td></tr>
+<tr class="separator:ac67cb6e9b00fd492cc3a9247e9477d87"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6733960f6981f1930b2d1a489df89cc7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-macros_8h.html#a6733960f6981f1930b2d1a489df89cc7">LIBNET_RESOLVE</a>&#160;&#160;&#160;1</td></tr>
+<tr class="separator:a6733960f6981f1930b2d1a489df89cc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5ff9536ca9bbe6f73f69bec817962742"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-macros_8h.html#a5ff9536ca9bbe6f73f69bec817962742">LIBNET_ON</a>&#160;&#160;&#160;0</td></tr>
+<tr class="separator:a5ff9536ca9bbe6f73f69bec817962742"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af87da67c016a9791d256c2d71bf0b0ac"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-macros_8h.html#af87da67c016a9791d256c2d71bf0b0ac">LIBNET_OFF</a>&#160;&#160;&#160;1</td></tr>
+<tr class="separator:af87da67c016a9791d256c2d71bf0b0ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a9c76fe8da8e411fe1db9f75583dc1b8a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-macros_8h.html#a9c76fe8da8e411fe1db9f75583dc1b8a">IN6ADDR_ERROR_INIT</a></td></tr>
+<tr class="separator:a9c76fe8da8e411fe1db9f75583dc1b8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a96a6017948aa76e5a5d415c3227348df"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-macros_8h.html#a96a6017948aa76e5a5d415c3227348df">LIBNET_PR2</a>&#160;&#160;&#160;0</td></tr>
+<tr class="separator:a96a6017948aa76e5a5d415c3227348df"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac7301c95aa36d66e8904979650b5189d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-macros_8h.html#ac7301c95aa36d66e8904979650b5189d">LIBNET_MAX_PACKET</a>&#160;&#160;&#160;0xffff</td></tr>
+<tr class="separator:ac7301c95aa36d66e8904979650b5189d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2d720375e2ef5a85a62d6069283a5223"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-macros_8h.html#a2d720375e2ef5a85a62d6069283a5223">LIBNET_ERRBUF_SIZE</a>&#160;&#160;&#160;0x100</td></tr>
+<tr class="separator:a2d720375e2ef5a85a62d6069283a5223"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae9cd154f8cb482809ee456b6ac43dea5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-macros_8h.html#ae9cd154f8cb482809ee456b6ac43dea5">LIBNET_MAXOPTION_SIZE</a>&#160;&#160;&#160;0x28</td></tr>
+<tr class="separator:ae9cd154f8cb482809ee456b6ac43dea5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af36eb84eee10c525720134cfadb50a3e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libnet-macros_8h.html#af36eb84eee10c525720134cfadb50a3e">for_each_context_in_cq</a>(l)&#160;&#160;&#160;for (l = <a class="el" href="libnet-functions_8h.html#a8233338e5050d8fc46c6d1f35ef32b5e">libnet_cq_head</a>(); <a class="el" href="libnet-functions_8h.html#a7edc80233d439b7755fdc127cfd7f88d">libnet_cq_last</a>(); l = <a class="el" href="libnet-functions_8h.html#af21a48ca025b23dfcd5d10e9d1b924ba">libnet_cq_next</a>())</td></tr>
+<tr class="separator:af36eb84eee10c525720134cfadb50a3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>libnet macros and symbolic constants </p>
+</div><h2 class="groupheader">Macro Definition Documentation</h2>
+<a id="af36eb84eee10c525720134cfadb50a3e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af36eb84eee10c525720134cfadb50a3e">&#9670;&nbsp;</a></span>for_each_context_in_cq</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define for_each_context_in_cq</td>
+ <td>(</td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname">l</td><td>)</td>
+ <td>&#160;&#160;&#160;for (l = <a class="el" href="libnet-functions_8h.html#a8233338e5050d8fc46c6d1f35ef32b5e">libnet_cq_head</a>(); <a class="el" href="libnet-functions_8h.html#a7edc80233d439b7755fdc127cfd7f88d">libnet_cq_last</a>(); l = <a class="el" href="libnet-functions_8h.html#af21a48ca025b23dfcd5d10e9d1b924ba">libnet_cq_next</a>())</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Provides an interface to iterate through the context queue of libnet contexts. Before calling this macro, be sure to set the queue using <a class="el" href="libnet-functions_8h.html#a8233338e5050d8fc46c6d1f35ef32b5e">libnet_cq_head()</a>. </p>
+
+</div>
+</div>
+<a id="a9c76fe8da8e411fe1db9f75583dc1b8a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a9c76fe8da8e411fe1db9f75583dc1b8a">&#9670;&nbsp;</a></span>IN6ADDR_ERROR_INIT</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define IN6ADDR_ERROR_INIT</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<b>Value:</b><div class="fragment"><div class="line">{ { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \</div><div class="line"> 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \</div><div class="line"> 0xff, 0xff } } }</div></div><!-- fragment --><p>IPv6 error code </p>
+
+</div>
+</div>
+<a id="ac67cb6e9b00fd492cc3a9247e9477d87"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac67cb6e9b00fd492cc3a9247e9477d87">&#9670;&nbsp;</a></span>LIBNET_DONT_RESOLVE</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LIBNET_DONT_RESOLVE&#160;&#160;&#160;0</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Used for libnet's name resolution functions, specifies that no DNS lookups should be performed and the IP address should be kept in numeric form. </p>
+
+</div>
+</div>
+<a id="a2d720375e2ef5a85a62d6069283a5223"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2d720375e2ef5a85a62d6069283a5223">&#9670;&nbsp;</a></span>LIBNET_ERRBUF_SIZE</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LIBNET_ERRBUF_SIZE&#160;&#160;&#160;0x100</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>The libnet error buffer is 256 bytes long. </p>
+
+</div>
+</div>
+<a id="ac7301c95aa36d66e8904979650b5189d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac7301c95aa36d66e8904979650b5189d">&#9670;&nbsp;</a></span>LIBNET_MAX_PACKET</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LIBNET_MAX_PACKET&#160;&#160;&#160;0xffff</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>The biggest an IP packet can be &ndash; 65,535 bytes. </p>
+
+</div>
+</div>
+<a id="ae9cd154f8cb482809ee456b6ac43dea5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae9cd154f8cb482809ee456b6ac43dea5">&#9670;&nbsp;</a></span>LIBNET_MAXOPTION_SIZE</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LIBNET_MAXOPTION_SIZE&#160;&#160;&#160;0x28</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>IP and TCP options can be up to 40 bytes long. </p>
+
+</div>
+</div>
+<a id="af87da67c016a9791d256c2d71bf0b0ac"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af87da67c016a9791d256c2d71bf0b0ac">&#9670;&nbsp;</a></span>LIBNET_OFF</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LIBNET_OFF&#160;&#160;&#160;1</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Used several places, to specify "on" or "one" </p>
+
+</div>
+</div>
+<a id="a5ff9536ca9bbe6f73f69bec817962742"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a5ff9536ca9bbe6f73f69bec817962742">&#9670;&nbsp;</a></span>LIBNET_ON</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LIBNET_ON&#160;&#160;&#160;0</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Used several places, to specify "on" or "one" </p>
+
+</div>
+</div>
+<a id="a96a6017948aa76e5a5d415c3227348df"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a96a6017948aa76e5a5d415c3227348df">&#9670;&nbsp;</a></span>LIBNET_PR2</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LIBNET_PR2&#160;&#160;&#160;0</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Used for <a class="el" href="libnet-functions_8h.html#ae0a1d32fdd169c55a0ce4c186a19b125">libnet_get_prand()</a> to specify function disposition </p>
+
+</div>
+</div>
+<a id="a6733960f6981f1930b2d1a489df89cc7"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6733960f6981f1930b2d1a489df89cc7">&#9670;&nbsp;</a></span>LIBNET_RESOLVE</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LIBNET_RESOLVE&#160;&#160;&#160;1</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Used for libnet's name resolution functions, specifies that a DNS lookup can be performed if needed to resolve the IP address to a canonical form. </p>
+
+</div>
+</div>
+</div><!-- contents -->
+<hr>
+<address><small>
+Documentation for <a href="https://github.com/sgeto/libnet">libnet</a> (version 1.2-rc3).<br>
+Generated on Wed Apr 26 2017 by
+<a href="http://www.doxygen.org/">Doxygen 1.8.14</a>.
+</small></address>
+</body>
+</html>
diff --git a/doc/api/libnet-macros_8h__dep__incl.png b/doc/api/libnet-macros_8h__dep__incl.png
new file mode 100644
index 0000000..eb8227b
--- /dev/null
+++ b/doc/api/libnet-macros_8h__dep__incl.png
Binary files differ
diff --git a/doc/api/libnet-macros_8h_source.html b/doc/api/libnet-macros_8h_source.html
new file mode 100644
index 0000000..af3451e
--- /dev/null
+++ b/doc/api/libnet-macros_8h_source.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.14"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>libnet: API Documentation: libnet/libnet-macros.h Source File</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="libnet_api_stylesheet.css_tmpl" rel="stylesheet" type="text/css"/>
+</head>
+<!-- Generated by Doxygen 1.8.14 -->
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_2e83b025d21fe7b9c524d93377692ce4.html">libnet</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">libnet-macros.h</div> </div>
+</div><!--header-->
+<div class="contents">
+<a href="libnet-macros_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * $Id: libnet-macros.h,v 1.7 2004/04/13 17:32:28 mike Exp $</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * libnet-macros.h - Network routine library macro header file</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Copyright (c) 1998 - 2004 Mike D. Schiffman &lt;mike@infonexus.com&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> * All rights reserved.</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * Redistribution and use in source and binary forms, with or without</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * modification, are permitted provided that the following conditions</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * are met:</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * 1. Redistributions of source code must retain the above copyright</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * notice, this list of conditions and the following disclaimer.</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * notice, this list of conditions and the following disclaimer in the</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * documentation and/or other materials provided with the distribution.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS&#39;&#39; AND</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment"> * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="comment"> * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment"> * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment"> * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment"> * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment"> * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment"> * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="comment"> * SUCH DAMAGE.</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#ifndef __LIBNET_MACROS_H</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="preprocessor">#define __LIBNET_MACROS_H</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="comment">/* for systems without snprintf */</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="preprocessor">#if defined(NO_SNPRINTF)</span></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="preprocessor">#define snprintf(buf, len, args...) sprintf(buf, ##args)</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="libnet-macros_8h.html#ac67cb6e9b00fd492cc3a9247e9477d87"> 49</a></span>&#160;<span class="preprocessor">#define LIBNET_DONT_RESOLVE 0</span></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="libnet-macros_8h.html#a6733960f6981f1930b2d1a489df89cc7"> 55</a></span>&#160;<span class="preprocessor">#define LIBNET_RESOLVE 1</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="libnet-macros_8h.html#a5ff9536ca9bbe6f73f69bec817962742"> 60</a></span>&#160;<span class="preprocessor">#define LIBNET_ON 0</span></div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="libnet-macros_8h.html#af87da67c016a9791d256c2d71bf0b0ac"> 65</a></span>&#160;<span class="preprocessor">#define LIBNET_OFF 1</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;<span class="preprocessor">#ifndef IN6ADDR_ERROR_INIT</span></div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="libnet-macros_8h.html#a9c76fe8da8e411fe1db9f75583dc1b8a"> 71</a></span>&#160;<span class="preprocessor">#define IN6ADDR_ERROR_INIT { { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \</span></div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;<span class="preprocessor"> 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \</span></div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;<span class="preprocessor"> 0xff, 0xff } } }</span></div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="libnet-macros_8h.html#a96a6017948aa76e5a5d415c3227348df"> 79</a></span>&#160;<span class="preprocessor">#define LIBNET_PR2 0</span></div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;<span class="preprocessor">#define LIBNET_PR8 1</span></div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;<span class="preprocessor">#define LIBNET_PR16 2</span></div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;<span class="preprocessor">#define LIBNET_PRu16 3</span></div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;<span class="preprocessor">#define LIBNET_PR32 4</span></div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;<span class="preprocessor">#define LIBNET_PRu32 5</span></div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;<span class="preprocessor">#define LIBNET_PRAND_MAX 0xffffffff</span></div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="libnet-macros_8h.html#ac7301c95aa36d66e8904979650b5189d"> 90</a></span>&#160;<span class="preprocessor">#define LIBNET_MAX_PACKET 0xffff</span></div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;<span class="preprocessor">#ifndef IP_MAXPACKET</span></div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;<span class="preprocessor">#define IP_MAXPACKET 0xffff</span></div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;<span class="comment">/* ethernet addresses are 6 octets long */</span></div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;<span class="preprocessor">#ifndef ETHER_ADDR_LEN</span></div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;<span class="preprocessor">#define ETHER_ADDR_LEN 0x6</span></div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;<span class="comment">/* FDDI addresses are 6 octets long */</span></div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;<span class="preprocessor">#ifndef FDDI_ADDR_LEN</span></div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;<span class="preprocessor">#define FDDI_ADDR_LEN 0x6</span></div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;<span class="comment">/* token ring addresses are 6 octets long */</span></div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160;<span class="preprocessor">#ifndef TOKEN_RING_ADDR_LEN</span></div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160;<span class="preprocessor">#define TOKEN_RING_ADDR_LEN 0x6</span></div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;<span class="comment">/* LLC Organization Code is 3 bytes long */</span></div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;<span class="preprocessor">#define LIBNET_ORG_CODE_SIZE 0x3</span></div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;</div><div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="libnet-macros_8h.html#a2d720375e2ef5a85a62d6069283a5223"> 117</a></span>&#160;<span class="preprocessor">#define LIBNET_ERRBUF_SIZE 0x100</span></div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="libnet-macros_8h.html#ae9cd154f8cb482809ee456b6ac43dea5"> 122</a></span>&#160;<span class="preprocessor">#define LIBNET_MAXOPTION_SIZE 0x28</span></div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;<span class="comment">/* some BSD variants have this endianess problem */</span></div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160;<span class="preprocessor">#if (LIBNET_BSD_BYTE_SWAP)</span></div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;<span class="preprocessor">#define FIX(n) ntohs(n)</span></div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;<span class="preprocessor">#define UNFIX(n) htons(n)</span></div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;<span class="preprocessor">#define FIX(n) (n)</span></div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;<span class="preprocessor">#define UNFIX(n) (n)</span></div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160;<span class="comment">/* used internally for packet builders */</span></div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;<span class="preprocessor">#define LIBNET_DO_PAYLOAD(l, p) \</span></div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;<span class="preprocessor">if (payload_s &amp;&amp; !payload) \</span></div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;<span class="preprocessor">{ \</span></div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;<span class="preprocessor"> snprintf(l-&gt;err_buf, LIBNET_ERRBUF_SIZE, \</span></div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;<span class="preprocessor"> &quot;%s(): payload inconsistency\n&quot;, __func__); \</span></div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;<span class="preprocessor"> goto bad; \</span></div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;<span class="preprocessor">} \</span></div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160;<span class="preprocessor">if (payload_s) \</span></div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160;<span class="preprocessor">{ \</span></div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;<span class="preprocessor"> n = libnet_pblock_append(l, p, payload, payload_s); \</span></div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160;<span class="preprocessor"> if (n == (uint32_t) - 1) \</span></div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;<span class="preprocessor"> { \</span></div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;<span class="preprocessor"> goto bad; \</span></div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160;<span class="preprocessor"> } \</span></div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160;<span class="preprocessor">} \</span></div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160;<span class="comment">/* used internally for checksum stuff */</span></div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;<span class="preprocessor">#define LIBNET_CKSUM_CARRY(x) \</span></div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;<span class="preprocessor"> (x = (x &gt;&gt; 16) + (x &amp; 0xffff), (~(x + (x &gt;&gt; 16)) &amp; 0xffff))</span></div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160;<span class="comment">/* used interally for OSPF stuff */</span></div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;<span class="preprocessor">#define LIBNET_OSPF_AUTHCPY(x, y) \</span></div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;<span class="preprocessor"> memcpy((uint8_t *)x, (uint8_t *)y, sizeof(y))</span></div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;<span class="preprocessor">#define LIBNET_OSPF_CKSUMBUF(x, y) \</span></div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160;<span class="preprocessor"> memcpy((uint8_t *)x, (uint8_t *)y, sizeof(y)) </span></div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;<span class="comment">/* used internally for NTP leap indicator, version, and mode */</span></div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160;<span class="preprocessor">#define LIBNET_NTP_DO_LI_VN_MODE(li, vn, md) \</span></div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160;<span class="preprocessor"> ((uint8_t)((((li) &lt;&lt; 6) &amp; 0xc0) | (((vn) &lt;&lt; 3) &amp; 0x38) | ((md) &amp; 0x7)))</span></div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160;<span class="comment">/* Not all systems have IFF_LOOPBACK */</span></div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160;<span class="preprocessor">#ifdef IFF_LOOPBACK</span></div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160;<span class="preprocessor">#define LIBNET_ISLOOPBACK(p) ((p)-&gt;ifr_flags &amp; IFF_LOOPBACK)</span></div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160;<span class="preprocessor">#define LIBNET_ISLOOPBACK(p) (strcmp((p)-&gt;ifr_name, &quot;lo&quot;) == 0)</span></div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160;</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160;<span class="comment">/* advanced mode check */</span></div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160;<span class="preprocessor">#define LIBNET_ISADVMODE(x) (x &amp; 0x08)</span></div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160;</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160;<span class="comment">/* context queue macros and constants */</span></div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;<span class="preprocessor">#define LIBNET_LABEL_SIZE 64</span></div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160;<span class="preprocessor">#define LIBNET_LABEL_DEFAULT &quot;cardshark&quot;</span></div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160;<span class="preprocessor">#define CQ_LOCK_UNLOCKED (u_int)0x00000000</span></div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160;<span class="preprocessor">#define CQ_LOCK_READ (u_int)0x00000001</span></div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160;<span class="preprocessor">#define CQ_LOCK_WRITE (u_int)0x00000002</span></div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160;</div><div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="libnet-macros_8h.html#af36eb84eee10c525720134cfadb50a3e"> 187</a></span>&#160;<span class="preprocessor">#define for_each_context_in_cq(l) \</span></div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160;<span class="preprocessor"> for (l = libnet_cq_head(); libnet_cq_last(); l = libnet_cq_next())</span></div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160;</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160;<span class="comment">/* return 1 if write lock is set on cq */</span></div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160;<span class="preprocessor">#define cq_is_wlocked() (l_cqd.cq_lock &amp; CQ_LOCK_WRITE)</span></div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160;</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160;<span class="comment">/* return 1 if read lock is set on cq */</span></div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160;<span class="preprocessor">#define cq_is_rlocked() (l_cqd.cq_lock &amp; CQ_LOCK_READ)</span></div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160;</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160;<span class="comment">/* return 1 if any lock is set on cq */</span></div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160;<span class="preprocessor">#define cq_is_locked() (l_cqd.cq_lock &amp; (CQ_LOCK_READ | CQ_LOCK_WRITE))</span></div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160;</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160;<span class="comment">/* check if a context queue is locked */</span></div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160;<span class="preprocessor">#define check_cq_lock(x) (l_cqd.cq_lock &amp; x)</span></div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160;</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* __LIBNET_MACROS_H */</span><span class="preprocessor"></span></div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160;</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160;<span class="comment">/* EOF */</span></div></div><!-- fragment --></div><!-- contents -->
+<hr>
+<address><small>
+Documentation for <a href="https://github.com/sgeto/libnet">libnet</a> (version 1.2-rc3).<br>
+Generated on Wed Apr 26 2017 by
+<a href="http://www.doxygen.org/">Doxygen 1.8.14</a>.
+</small></address>
+</body>
+</html>
diff --git a/doc/api/libnet_8h.html b/doc/api/libnet_8h.html
new file mode 100644
index 0000000..20c9e4d
--- /dev/null
+++ b/doc/api/libnet_8h.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.14"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>libnet: API Documentation: libnet.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="libnet_api_stylesheet.css_tmpl" rel="stylesheet" type="text/css"/>
+</head>
+<!-- Generated by Doxygen 1.8.14 -->
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">libnet.h File Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+
+<p>Top-level libnet header file.
+<a href="#details">More...</a></p>
+<div class="textblock"><code>#include &quot;./libnet/libnet-types.h&quot;</code><br />
+<code>#include &quot;<a class="el" href="libnet-macros_8h_source.html">./libnet/libnet-macros.h</a>&quot;</code><br />
+<code>#include &quot;./libnet/libnet-headers.h&quot;</code><br />
+<code>#include &quot;./libnet/libnet-structures.h&quot;</code><br />
+<code>#include &quot;./libnet/libnet-asn1.h&quot;</code><br />
+<code>#include &quot;<a class="el" href="libnet-functions_8h_source.html">./libnet/libnet-functions.h</a>&quot;</code><br />
+</div><div class="textblock"><div class="dynheader">
+Include dependency graph for libnet.h:</div>
+<div class="dyncontent">
+<div class="center"><img src="libnet_8h__incl.png" border="0" usemap="#libnet_8h" alt=""/></div>
+<map name="libnet_8h" id="libnet_8h">
+<area shape="rect" id="node3" href="libnet-macros_8h.html" title="libnet macros and symbolic constants " alt="" coords="172,80,325,107"/>
+<area shape="rect" id="node7" href="libnet-functions_8h.html" title="libnet exported function prototypes " alt="" coords="890,80,1053,107"/>
+</map>
+</div>
+</div>
+<p><a href="libnet_8h_source.html">Go to the source code of this file.</a></p>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Top-level libnet header file. </p>
+<p>This section doesn't contain any details about <a class="el" href="libnet_8h.html" title="Top-level libnet header file. ">libnet.h</a>.</p>
+<p>If you're wondering why, then that's mostly because <a class="el" href="libnet_8h.html" title="Top-level libnet header file. ">libnet.h</a> isn't where the action takes place. In fact, no action at all. Okay, maybe a little. But definitely not enough worth a separate man page or a detailed description. The real action goes down in some of the other files this file includes.</p>
+<p>Which probably makes you wonder why, of all libnet*.h headers this file includes, only <a class="el" href="libnet-functions_8h.html" title="libnet exported function prototypes ">libnet-functions.h</a> and <a class="el" href="libnet-macros_8h.html" title="libnet macros and symbolic constants ">libnet-macros.h</a> are documented. My friend, you're not alone in your marveling.</p>
+<p>You see, the guy who wrote them (Mike D. Schiffman) is gone, and the guy after him (Sam Roberts) didn't had much time left at the end of the day after bug fixing the living hell out of the source.</p>
+<p>And if you're wondering why the rest of libnet's documentation is either full of holes or nonexistent, then (a) good question; and (b) see the previous paragraph.</p>
+<p>Is this a sinking ship? Well, I can't answer that right now. What I can say is that it's just us now. So, "Lets (try to) make libnet great again"!</p>
+<p>Sincerely,</p>
+<p>Ali Abdulkadir </p>
+</div></div><!-- contents -->
+<hr>
+<address><small>
+Documentation for <a href="https://github.com/sgeto/libnet">libnet</a> (version 1.2-rc3).<br>
+Generated on Wed Apr 26 2017 by
+<a href="http://www.doxygen.org/">Doxygen 1.8.14</a>.
+</small></address>
+</body>
+</html>
diff --git a/doc/api/libnet_8h__incl.png b/doc/api/libnet_8h__incl.png
new file mode 100644
index 0000000..ff05ecf
--- /dev/null
+++ b/doc/api/libnet_8h__incl.png
Binary files differ
diff --git a/doc/api/libnet_8h_source.html b/doc/api/libnet_8h_source.html
new file mode 100644
index 0000000..160f9ca
--- /dev/null
+++ b/doc/api/libnet_8h_source.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.14"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>libnet: API Documentation: libnet.h Source File</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="libnet_api_stylesheet.css_tmpl" rel="stylesheet" type="text/css"/>
+</head>
+<!-- Generated by Doxygen 1.8.14 -->
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle">
+<div class="title">libnet.h</div> </div>
+</div><!--header-->
+<div class="contents">
+<a href="libnet_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * libnet</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> * libnet.h - Network routine library header file</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * include/libnet.h. Generated from libnet.h.in by configure.</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Copyright (c) 1998 - 2004 Mike D. Schiffman &lt;mike@infonexus.com&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> * All rights reserved.</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * Redistribution and use in source and binary forms, with or without</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * modification, are permitted provided that the following conditions</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * are met:</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * 1. Redistributions of source code must retain the above copyright</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * notice, this list of conditions and the following disclaimer.</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * notice, this list of conditions and the following disclaimer in the</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * documentation and/or other materials provided with the distribution.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS&#39;&#39; AND</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment"> * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="comment"> * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment"> * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment"> * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment"> * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment"> * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment"> * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="comment"> * SUCH DAMAGE.</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#ifndef __LIBNET_H</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="preprocessor">#define __LIBNET_H</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; <span class="comment">/*</span></div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;<span class="comment"> * TODO move the stuff we ALWAYS need out of the DOXYGEN ifndef block</span></div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;<span class="comment"> * and minimize their redundancies (see doc/TODO)</span></div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;<span class="preprocessor">#ifndef DOXYGEN_SHOULD_SKIP_THIS // mess</span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;<span class="preprocessor">#include &lt;string.h&gt;</span></div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;<span class="preprocessor">#include &lt;fcntl.h&gt;</span></div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;<span class="preprocessor">#include &lt;signal.h&gt;</span></div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;<span class="preprocessor">#include &lt;stdlib.h&gt;</span></div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;<span class="preprocessor">#include &lt;sys/stat.h&gt;</span></div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;<span class="preprocessor">#include &lt;sys/types.h&gt;</span></div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;<span class="preprocessor">#include &lt;ctype.h&gt;</span></div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;<span class="preprocessor">#include &lt;errno.h&gt;</span></div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;<span class="preprocessor">#include &lt;stdarg.h&gt;</span></div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;<span class="preprocessor">#if !defined(_MSC_VER)</span></div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;<span class="preprocessor">#include &lt;unistd.h&gt;</span></div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160;<span class="preprocessor">#if defined(HAVE_SYS_SOCKIO_H) &amp;&amp; !defined(SIOCGIFADDR)</span></div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;<span class="preprocessor">#include &lt;sys/sockio.h&gt;</span></div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;<span class="preprocessor">#if !defined(__WIN32__)</span></div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;<span class="preprocessor">#include &lt;sys/ioctl.h&gt;</span></div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;<span class="preprocessor">#include &lt;sys/socket.h&gt;</span></div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;<span class="preprocessor">#include &lt;net/if.h&gt;</span></div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;<span class="preprocessor">#include &lt;arpa/inet.h&gt;</span></div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;<span class="preprocessor">#include &lt;sys/time.h&gt;</span></div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;<span class="preprocessor">#include &lt;netdb.h&gt;</span></div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;<span class="preprocessor">#else </span><span class="comment">/* __WIN32__ */</span><span class="preprocessor"></span></div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;<span class="preprocessor">#if (__CYGWIN__)</span></div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;<span class="preprocessor">#include &lt;sys/socket.h&gt;</span></div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160;<span class="preprocessor">#include &lt;ws2tcpip.h&gt;</span></div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;<span class="preprocessor">#include &lt;windows.h&gt;</span></div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;<span class="preprocessor">#include &lt;winsock2.h&gt;</span></div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* __WIN32__ */</span><span class="preprocessor"></span></div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;<span class="preprocessor">#if (HAVE_NET_ETHERNET_H)</span></div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;<span class="preprocessor">#include &lt;net/ethernet.h&gt;</span></div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* HAVE_NET_ETHERNET_H */</span><span class="preprocessor"></span></div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;<span class="preprocessor">#define LIBNET_VERSION &quot;1.2-rc3&quot;</span></div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;<span class="preprocessor">#define LIBNET_LIL_ENDIAN 1</span></div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160;<span class="preprocessor">#ifndef LIBNET_API</span></div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;<span class="preprocessor">#define LIBNET_API</span></div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* DOXYGEN_SHOULD_SKIP_THIS */</span><span class="preprocessor"></span></div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;<span class="preprocessor">#include &quot;./libnet/libnet-types.h&quot;</span></div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="libnet-macros_8h.html">./libnet/libnet-macros.h</a>&quot;</span></div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;<span class="preprocessor">#include &quot;./libnet/libnet-headers.h&quot;</span></div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;<span class="preprocessor">#include &quot;./libnet/libnet-structures.h&quot;</span></div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;<span class="preprocessor">#include &quot;./libnet/libnet-asn1.h&quot;</span></div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="libnet-functions_8h.html">./libnet/libnet-functions.h</a>&quot;</span></div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160;</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;}</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* __LIBNET_H */</span><span class="preprocessor"></span></div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;<span class="comment">/* EOF */</span></div><div class="ttc" id="libnet-functions_8h_html"><div class="ttname"><a href="libnet-functions_8h.html">libnet-functions.h</a></div><div class="ttdoc">libnet exported function prototypes </div></div>
+<div class="ttc" id="libnet-macros_8h_html"><div class="ttname"><a href="libnet-macros_8h.html">libnet-macros.h</a></div><div class="ttdoc">libnet macros and symbolic constants </div></div>
+</div><!-- fragment --></div><!-- contents -->
+<hr>
+<address><small>
+Documentation for <a href="https://github.com/sgeto/libnet">libnet</a> (version 1.2-rc3).<br>
+Generated on Wed Apr 26 2017 by
+<a href="http://www.doxygen.org/">Doxygen 1.8.14</a>.
+</small></address>
+</body>
+</html>
diff --git a/doc/api/libnet_api_stylesheet.css_tmpl b/doc/api/libnet_api_stylesheet.css_tmpl
new file mode 100644
index 0000000..ea5753c
--- /dev/null
+++ b/doc/api/libnet_api_stylesheet.css_tmpl
@@ -0,0 +1,11 @@
+/* Additional CSS for libnet */
+
+body {
+ background-color: #fafafa;
+}
+
+.memdoc, dl.reflist dd {
+ background-color: #f7f5f5;
+}
+
+/* @end */
diff --git a/doc/api/nav_f.png b/doc/api/nav_f.png
new file mode 100644
index 0000000..457c5c5
--- /dev/null
+++ b/doc/api/nav_f.png
Binary files differ
diff --git a/doc/api/nav_g.png b/doc/api/nav_g.png
new file mode 100644
index 0000000..2093a23
--- /dev/null
+++ b/doc/api/nav_g.png
Binary files differ
diff --git a/doc/api/nav_h.png b/doc/api/nav_h.png
new file mode 100644
index 0000000..f05b426
--- /dev/null
+++ b/doc/api/nav_h.png
Binary files differ
diff --git a/doc/api/open.png b/doc/api/open.png
new file mode 100644
index 0000000..9faf1be
--- /dev/null
+++ b/doc/api/open.png
Binary files differ
diff --git a/doc/api/splitbar.png b/doc/api/splitbar.png
new file mode 100644
index 0000000..e3d93bb
--- /dev/null
+++ b/doc/api/splitbar.png
Binary files differ
diff --git a/doc/api/sync_off.png b/doc/api/sync_off.png
new file mode 100644
index 0000000..ba381cd
--- /dev/null
+++ b/doc/api/sync_off.png
Binary files differ
diff --git a/doc/api/sync_on.png b/doc/api/sync_on.png
new file mode 100644
index 0000000..8464e7f
--- /dev/null
+++ b/doc/api/sync_on.png
Binary files differ
diff --git a/doc/api/tab_a.png b/doc/api/tab_a.png
new file mode 100644
index 0000000..b1bba98
--- /dev/null
+++ b/doc/api/tab_a.png
Binary files differ
diff --git a/doc/api/tab_b.png b/doc/api/tab_b.png
new file mode 100644
index 0000000..8653df2
--- /dev/null
+++ b/doc/api/tab_b.png
Binary files differ
diff --git a/doc/api/tab_h.png b/doc/api/tab_h.png
new file mode 100644
index 0000000..ca18e9e
--- /dev/null
+++ b/doc/api/tab_h.png
Binary files differ
diff --git a/doc/api/tab_s.png b/doc/api/tab_s.png
new file mode 100644
index 0000000..ebc1618
--- /dev/null
+++ b/doc/api/tab_s.png
Binary files differ
diff --git a/doc/api/tabs.css b/doc/api/tabs.css
new file mode 100644
index 0000000..a28614b
--- /dev/null
+++ b/doc/api/tabs.css
@@ -0,0 +1 @@
+.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#doc-content{overflow:auto;display:block;padding:0;margin:0;-webkit-overflow-scrolling:touch}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,0.9);color:#283a5d;outline:0}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace!important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283a5d transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;-moz-border-radius:0!important;-webkit-border-radius:0;border-radius:0!important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a:hover span.sub-arrow{border-color:white transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;-moz-border-radius:5px!important;-webkit-border-radius:5px;border-radius:5px!important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0!important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent white}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px!important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}} \ No newline at end of file
diff --git a/doc/fixmanpages.in b/doc/fixmanpages.in
new file mode 100644
index 0000000..0270b45
--- /dev/null
+++ b/doc/fixmanpages.in
@@ -0,0 +1,72 @@
+#!@SHELL@
+
+# Doxygen's man page generation is unfortunately very rudimentary.
+#
+# So in addition to creating the libnet(3) and the libnet-config(1) man page
+# from two pod files, this (over-documented) script will also try to add a few
+# "finishing touches" to the two (or three or more) man pages generated by Doxygen.
+#
+# It will run after building libnet and after Doxygen generated all its
+# documentations. If you ever have to run it manually, you should do the same.
+# Apart from a few widely available GNU utilities, you'll also need pod2man
+# (aka libpod-latex-perl) to get it to work.
+
+echo "Finalizing man pages..."
+
+MANPAGENOTE='.SH "SEE ALSO"\n\.IX Header "SEE ALSO"\nlibnet(3), libnet\-config(1)\n.SH "AUTHORS"\n.IX Header "AUTHORS"\nThe original author of libnet is Mike D. Schiffman.\n.PP\nlibnet has been maintained and extensively enhanced since 2009 by Sam Roberts.\n.PP\nIt is currently maintained by Ali Abdulkadir and available at\n.PP\n.Vb 1\n\& <https://github.com/sgeto/libnet>\n.Ve\n.SH "BUGS"\n.IX Header "BUGS"\nFor bugs, questions, patch submissions, desirable enhancements, etc. see:\n.PP\n.Vb 1\n\& <https://github.com/sgeto/libnet/issues>\n.Ve\n.SH "COPYRIGHT"\n.IX Header "COPYRIGHT"\nlibnet is licensed under the 3\-Clause \s-1BSD\s0 License. You can basically\ndo whatever you want with it.'
+
+die() {
+ echo "$*" 1>&2
+ exit 1
+}
+
+MANDIR=$1
+if test x"$MANDIR" = x ; then
+ MANDIR=man/
+fi
+
+test -d $MANDIR/man3 || die "Could not locate $MANDIR/man3 directory."
+test -d $MANDIR/man1 || mkdir $MANDIR/man1 || die "Could not create $MANDIR/man1 directory."
+
+# For now, I will let Doxygen still produces its useless and totally misleading
+# man page for "libnet.h" and simply delete it now. That's mostly because not
+# doing so will also remove all references to "libnet.h" in all documentations.
+# And we wouldn't want that, would we?
+find $MANDIR/man3/ -name "libnet.h.3" -exec sh -c 'rm -f "$1"' _ {} \;
+
+# Let's create libnet.3 and the libnet-config.3 before dealing with the rest.
+# BTW: We're using this hideous date format because Doxygen generated man
+# pages have them set like this and our date format shouldn't look different.
+
+pod2man -d "$(date +%a\ %b\ %d\ %C%y)" -n LIBNET -c "libnet Programmers Guide" -s 3 -r "@PACKAGE_NAME@-@PACKAGE_VERSION@" @top_srcdir@/doc/libnet.Pod man/man3/libnet.3 || die "Could not create libnet.3 in $MANDIR/man/man3."
+
+# pod2html --title="libnet Programmers Guide" --noindex --infile=libnet.Pod --outfile=libnet.html
+
+pod2man -d "$(date +%a\ %b\ %d\ %C%y)" -n LIBNET-CONFIG -c "General Commands Manual" -s 1 -r "@PACKAGE_NAME@-@PACKAGE_VERSION@" @top_srcdir@/doc/libnet-config.Pod man/man1/libnet-config.1 || die "Could not create libnet-config.1 in $MANDIR/man/man1."
+
+cd "$MANDIR/man3" || die "Could not cd into $MANDIR/man3"
+
+# A little housekeeping...
+(find . -name "_*" -exec sh -c 'rm "$1"' _ {} \;) || die "could not remove all underscore-prefixed items"
+
+# renaming all man pages form "*.h.3" to just "*.3"
+(find . -name "*.h.3" -exec sh -c 'mv "$1" "${1%.h.3}.3"' _ {} \;) || die "could not rename all .h.3-suffixed items"
+
+# Changing the name of the man pages to all UPPERCASE.
+# FIXME make Doxygen properly generate docs for all other
+# libnet-*.h files and add them here
+sed -i -e '1!b;s/libnet\/libnet-functions\.h/LIBNET-FUNCTIONS/' libnet-functions.3
+sed -i -e '1!b;s/libnet\/libnet-macros\.h/LIBNET-MACROS/' libnet-macros.3
+
+# Adjusting version string, changing the title, removing both the path and
+# the ".h" extension from name section as well as adding a few more sections
+# to the end.
+for MAN in $(find . -name "libnet-*.3"); do
+ sed -i -e '1!b;s/Version\ /libnet-/' \
+ -e '1!b;s/"libnet"/"libnet\ Programmers \Guide"/' $MAN
+ sed -i -e '5 s/libnet\///' \
+ -e '/.SH "Author"/,/from the source code\&./c \nBe' $MAN
+ echo -e $MANPAGENOTE >> $MAN
+done
+
+echo "Done."
diff --git a/doc/html/closed.png b/doc/html/closed.png
new file mode 100644
index 0000000..98cc2c9
--- /dev/null
+++ b/doc/html/closed.png
Binary files differ
diff --git a/doc/html/globals_func.html b/doc/html/globals_func.html
new file mode 100644
index 0000000..1d703d0
--- /dev/null
+++ b/doc/html/globals_func.html
@@ -0,0 +1,431 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>libnet: Globals</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">libnet
+ &#160;<span id="projectnumber">1.1</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',false,false,'search.php','Search');
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div class="contents">
+&#160;
+
+<h3><a id="index_l"></a>- l -</h3><ul>
+<li>libnet_addr2name4()
+: <a class="el" href="libnet-functions_8h.html#added478f7cb16e00cf34f44816e33083">libnet-functions.h</a>
+</li>
+<li>libnet_addr2name6_r()
+: <a class="el" href="libnet-functions_8h.html#a50fcb283db9884651c59d79ebd825bc4">libnet-functions.h</a>
+</li>
+<li>libnet_adv_cull_header()
+: <a class="el" href="libnet-functions_8h.html#aac02edd8930cb604dc65f72f7ffd8892">libnet-functions.h</a>
+</li>
+<li>libnet_adv_cull_packet()
+: <a class="el" href="libnet-functions_8h.html#a9f91e176ba3b1f93ec049f82c08b54be">libnet-functions.h</a>
+</li>
+<li>libnet_adv_free_packet()
+: <a class="el" href="libnet-functions_8h.html#a92c45b67cbf9a16f8e6edd9a067c3f6d">libnet-functions.h</a>
+</li>
+<li>libnet_adv_write_link()
+: <a class="el" href="libnet-functions_8h.html#ad00e9f92da1faea6c8ce400d6e7cd45e">libnet-functions.h</a>
+</li>
+<li>libnet_adv_write_raw_ipv4()
+: <a class="el" href="libnet-functions_8h.html#a3524aaf97da73461cabd4797e89c4da4">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_arp()
+: <a class="el" href="libnet-functions_8h.html#ababa81422be544239a595da41fe15d8e">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_ethernet()
+: <a class="el" href="libnet-functions_8h.html#a6da323c2eb9eeab293cdfd99ceb134b5">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_fddi()
+: <a class="el" href="libnet-functions_8h.html#a367d0539e0c7484ac4e0092ced22ca8e">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_ipv4()
+: <a class="el" href="libnet-functions_8h.html#a6894d563677d9f229feedf52c759ac0a">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_ipv6()
+: <a class="el" href="libnet-functions_8h.html#a606209e22d203a859a380e1d37f9688c">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_link()
+: <a class="el" href="libnet-functions_8h.html#a8a881ba6d300b16e5cadd9e3f6ef7bc8">libnet-functions.h</a>
+</li>
+<li>libnet_autobuild_token_ring()
+: <a class="el" href="libnet-functions_8h.html#ac4e70a6d0e895d722e407c6d5fae1466">libnet-functions.h</a>
+</li>
+<li>libnet_build_802_1q()
+: <a class="el" href="libnet-functions_8h.html#acbab0d304c5e9d36438050ac6d233132">libnet-functions.h</a>
+</li>
+<li>libnet_build_802_1x()
+: <a class="el" href="libnet-functions_8h.html#ab33fc501031e68af303fbffb7643b11d">libnet-functions.h</a>
+</li>
+<li>libnet_build_802_2()
+: <a class="el" href="libnet-functions_8h.html#a6f616f8d4646db5ada510991cce80808">libnet-functions.h</a>
+</li>
+<li>libnet_build_802_2snap()
+: <a class="el" href="libnet-functions_8h.html#a22f004a0b0d496762fbd056ca5d31eeb">libnet-functions.h</a>
+</li>
+<li>libnet_build_802_3()
+: <a class="el" href="libnet-functions_8h.html#ab6777b0c3c3b80eaa465686654f668e8">libnet-functions.h</a>
+</li>
+<li>libnet_build_arp()
+: <a class="el" href="libnet-functions_8h.html#ab606fadc44daa426fa4ba8b43bee5ece">libnet-functions.h</a>
+</li>
+<li>libnet_build_bgp4_header()
+: <a class="el" href="libnet-functions_8h.html#a3f9827171fbe5dbc4b02c7d9876a2393">libnet-functions.h</a>
+</li>
+<li>libnet_build_bgp4_notification()
+: <a class="el" href="libnet-functions_8h.html#afe0007cf544b1d6773b6046c5c5ad372">libnet-functions.h</a>
+</li>
+<li>libnet_build_bgp4_open()
+: <a class="el" href="libnet-functions_8h.html#a4a7df60e7798fddfff25f163ef63e2af">libnet-functions.h</a>
+</li>
+<li>libnet_build_bgp4_update()
+: <a class="el" href="libnet-functions_8h.html#a88f572ee97c9223d4b24f55d868ce419">libnet-functions.h</a>
+</li>
+<li>libnet_build_bootpv4()
+: <a class="el" href="libnet-functions_8h.html#a564c31892fb8cc2bf44244cdb26d693e">libnet-functions.h</a>
+</li>
+<li>libnet_build_cdp()
+: <a class="el" href="libnet-functions_8h.html#aed8b33a329bda096ecac629e92e9bca5">libnet-functions.h</a>
+</li>
+<li>libnet_build_data()
+: <a class="el" href="libnet-functions_8h.html#aa4c6c975b3c87d3d17224302e4319eec">libnet-functions.h</a>
+</li>
+<li>libnet_build_dhcpv4()
+: <a class="el" href="libnet-functions_8h.html#a3333c5e5cde290dda9b80adc13a00466">libnet-functions.h</a>
+</li>
+<li>libnet_build_dnsv4()
+: <a class="el" href="libnet-functions_8h.html#a5829f525c067e1d99826865292542d8a">libnet-functions.h</a>
+</li>
+<li>libnet_build_egre()
+: <a class="el" href="libnet-functions_8h.html#a0092b3f0285f4c96915eef9579655036">libnet-functions.h</a>
+</li>
+<li>libnet_build_ethernet()
+: <a class="el" href="libnet-functions_8h.html#acb97a898e200c1aaea6081545f2fcb39">libnet-functions.h</a>
+</li>
+<li>libnet_build_fddi()
+: <a class="el" href="libnet-functions_8h.html#ab8c2a7a3572bcfef2705ab05c8ef12bc">libnet-functions.h</a>
+</li>
+<li>libnet_build_gre()
+: <a class="el" href="libnet-functions_8h.html#a41e095c98e623f00618f6d306cb31289">libnet-functions.h</a>
+</li>
+<li>libnet_build_gre_last_sre()
+: <a class="el" href="libnet-functions_8h.html#ae514f81f6d68bc1b2442762a6f87804a">libnet-functions.h</a>
+</li>
+<li>libnet_build_gre_sre()
+: <a class="el" href="libnet-functions_8h.html#ae0c59a8f8d014cc1955d88139c2096c0">libnet-functions.h</a>
+</li>
+<li>libnet_build_hsrp()
+: <a class="el" href="libnet-functions_8h.html#abe75e9be71910c580eff1d6925224778">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv4_echo()
+: <a class="el" href="libnet-functions_8h.html#a4a4d3dc8f02e6fe6629e35e37ece0264">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv4_mask()
+: <a class="el" href="libnet-functions_8h.html#ab403c63ae76d0bc59b6641e3c821550c">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv4_redirect()
+: <a class="el" href="libnet-functions_8h.html#a6df9db28162c58a2cc356b3a87a16f6b">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv4_timeexceed()
+: <a class="el" href="libnet-functions_8h.html#a4f2eb3f11fd921b0fd0948cf8ef37c91">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv4_timestamp()
+: <a class="el" href="libnet-functions_8h.html#a926f33ff4ea64923b49f16f8c5f7286d">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv4_unreach()
+: <a class="el" href="libnet-functions_8h.html#a83197de705eb7929e8216f5771aa4b96">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv6_echo()
+: <a class="el" href="libnet-functions_8h.html#a09a512c9f670528f7f1c9fe9775a0a61">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv6_ndp_nadv()
+: <a class="el" href="libnet-functions_8h.html#a0d2d7119072c0b98f1248172a2b7885d">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv6_ndp_nsol()
+: <a class="el" href="libnet-functions_8h.html#aa184e1e69a7fc7161d484dcdca4f74db">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv6_ndp_opt()
+: <a class="el" href="libnet-functions_8h.html#aecee0675d61d3ff71d79c64c74a7c924">libnet-functions.h</a>
+</li>
+<li>libnet_build_icmpv6_unreach()
+: <a class="el" href="libnet-functions_8h.html#a86ee5967b07a4fe49af301add8656450">libnet-functions.h</a>
+</li>
+<li>libnet_build_igmp()
+: <a class="el" href="libnet-functions_8h.html#afbeeb2c1c377c59aa2747dff4db4d5e8">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipsec_ah()
+: <a class="el" href="libnet-functions_8h.html#a22d1d874a5d12b8d3528f637990ceb21">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipsec_esp_ftr()
+: <a class="el" href="libnet-functions_8h.html#a0e7ba4cf571d4d85b1084e15059c7336">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipsec_esp_hdr()
+: <a class="el" href="libnet-functions_8h.html#ad7d163363769594667524e7607535aec">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv4()
+: <a class="el" href="libnet-functions_8h.html#a2d9839736df3b1c46acdcc67e291c03e">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv4_options()
+: <a class="el" href="libnet-functions_8h.html#aa209cafad74cd8f259aa97732e06d07c">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv6()
+: <a class="el" href="libnet-functions_8h.html#a50fc0e6ad5c2b1fd705f349eff382dfd">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv6_destopts()
+: <a class="el" href="libnet-functions_8h.html#a1b6e9597bf110de597a673a4c6ed6ebc">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv6_frag()
+: <a class="el" href="libnet-functions_8h.html#a9eeb211b6b8579fe9725da6d32d2732d">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv6_hbhopts()
+: <a class="el" href="libnet-functions_8h.html#a1a8b5292e4e714c0f299f0577c86cb00">libnet-functions.h</a>
+</li>
+<li>libnet_build_ipv6_routing()
+: <a class="el" href="libnet-functions_8h.html#a7fb612955dd3a787f13ab0c85b360023">libnet-functions.h</a>
+</li>
+<li>libnet_build_isl()
+: <a class="el" href="libnet-functions_8h.html#afdcc92fd59366c48693ad48c076c488e">libnet-functions.h</a>
+</li>
+<li>libnet_build_link()
+: <a class="el" href="libnet-functions_8h.html#a9ec77e2ffcb9540d9f4eee2b0ff57af2">libnet-functions.h</a>
+</li>
+<li>libnet_build_mpls()
+: <a class="el" href="libnet-functions_8h.html#a520053e593215a240f7207c2b28075cb">libnet-functions.h</a>
+</li>
+<li>libnet_build_ntp()
+: <a class="el" href="libnet-functions_8h.html#af305c48631b600e472f60b951b9ebf75">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2()
+: <a class="el" href="libnet-functions_8h.html#a429bf355c69895a5ad7ca900d734bf48">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_dbd()
+: <a class="el" href="libnet-functions_8h.html#a9f859449de2c7e2f1b2d18051a315634">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_hello()
+: <a class="el" href="libnet-functions_8h.html#a224a55d5758cd6685fdd374597f133c4">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_hello_neighbor()
+: <a class="el" href="libnet-functions_8h.html#aadf443b65fb0dd6972b87ebd6165e249">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsa()
+: <a class="el" href="libnet-functions_8h.html#a798142aed2aee944fdc80ce14faf31f6">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsa_as()
+: <a class="el" href="libnet-functions_8h.html#a9002c457692ce2557197dc68c9932849">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsa_net()
+: <a class="el" href="libnet-functions_8h.html#a234cf0a788a5944ff70c879c96467bc4">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsa_rtr()
+: <a class="el" href="libnet-functions_8h.html#a67209523b736cc9f70743d3dfbce1129">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsa_sum()
+: <a class="el" href="libnet-functions_8h.html#ae9c55870fecbd742edc25f06b73ad5a2">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsr()
+: <a class="el" href="libnet-functions_8h.html#a17d51de46576464ff606e15250c7fe3a">libnet-functions.h</a>
+</li>
+<li>libnet_build_ospfv2_lsu()
+: <a class="el" href="libnet-functions_8h.html#a5ffe185b91c48fad0dc84f81b7d26697">libnet-functions.h</a>
+</li>
+<li>libnet_build_rip()
+: <a class="el" href="libnet-functions_8h.html#a154c83b71614c8cf3635f7c80cf7e9a6">libnet-functions.h</a>
+</li>
+<li>libnet_build_rpc_call()
+: <a class="el" href="libnet-functions_8h.html#a4a657cd81f10ba6dbdcbd6a6a81f72d2">libnet-functions.h</a>
+</li>
+<li>libnet_build_sebek()
+: <a class="el" href="libnet-functions_8h.html#a0d4ce5211113c5d5818d557ce3fc0234">libnet-functions.h</a>
+</li>
+<li>libnet_build_stp_conf()
+: <a class="el" href="libnet-functions_8h.html#ad6310dd6dff16dc711663f70256d2148">libnet-functions.h</a>
+</li>
+<li>libnet_build_stp_tcn()
+: <a class="el" href="libnet-functions_8h.html#a913fc0cf8782d915edc20f4f6abf847f">libnet-functions.h</a>
+</li>
+<li>libnet_build_tcp()
+: <a class="el" href="libnet-functions_8h.html#ad096d303ddcddbd63ea269453bd26a20">libnet-functions.h</a>
+</li>
+<li>libnet_build_tcp_options()
+: <a class="el" href="libnet-functions_8h.html#aec6344132528e6903837b0d8909ad08c">libnet-functions.h</a>
+</li>
+<li>libnet_build_token_ring()
+: <a class="el" href="libnet-functions_8h.html#a4d77b901ebcc18b8c0ee2345e4ea6177">libnet-functions.h</a>
+</li>
+<li>libnet_build_udp()
+: <a class="el" href="libnet-functions_8h.html#a0ae166a293c0495431246fe0d0ba66f6">libnet-functions.h</a>
+</li>
+<li>libnet_build_vrrp()
+: <a class="el" href="libnet-functions_8h.html#a5a6538c0cf4dd6c2f59b1657d56796b3">libnet-functions.h</a>
+</li>
+<li>libnet_clear_packet()
+: <a class="el" href="libnet-functions_8h.html#a9ae9cb6e191e382c653237451f9bacd6">libnet-functions.h</a>
+</li>
+<li>libnet_cq_add()
+: <a class="el" href="libnet-functions_8h.html#a20887ffe940f1d2c5bcae79a188176c6">libnet-functions.h</a>
+</li>
+<li>libnet_cq_destroy()
+: <a class="el" href="libnet-functions_8h.html#a1577413fdaf10706d5016b64f7f7924b">libnet-functions.h</a>
+</li>
+<li>libnet_cq_end_loop()
+: <a class="el" href="libnet-functions_8h.html#a65145cbd0be6d1609bf07b52d6c57695">libnet-functions.h</a>
+</li>
+<li>libnet_cq_find_by_label()
+: <a class="el" href="libnet-functions_8h.html#a1775288c17694d4d606327ad066f970d">libnet-functions.h</a>
+</li>
+<li>libnet_cq_getlabel()
+: <a class="el" href="libnet-functions_8h.html#a337f556ed05df13c1de19acbd4d7f50a">libnet-functions.h</a>
+</li>
+<li>libnet_cq_head()
+: <a class="el" href="libnet-functions_8h.html#a8233338e5050d8fc46c6d1f35ef32b5e">libnet-functions.h</a>
+</li>
+<li>libnet_cq_last()
+: <a class="el" href="libnet-functions_8h.html#a7edc80233d439b7755fdc127cfd7f88d">libnet-functions.h</a>
+</li>
+<li>libnet_cq_next()
+: <a class="el" href="libnet-functions_8h.html#af21a48ca025b23dfcd5d10e9d1b924ba">libnet-functions.h</a>
+</li>
+<li>libnet_cq_remove()
+: <a class="el" href="libnet-functions_8h.html#a93d5ccdcdba31daacde82fc50f467412">libnet-functions.h</a>
+</li>
+<li>libnet_cq_remove_by_label()
+: <a class="el" href="libnet-functions_8h.html#a90a6ea3b24de3906ca1cf9c78a7b5a5f">libnet-functions.h</a>
+</li>
+<li>libnet_cq_size()
+: <a class="el" href="libnet-functions_8h.html#ae071e441671c342ea2d3bbca979e2769">libnet-functions.h</a>
+</li>
+<li>libnet_destroy()
+: <a class="el" href="libnet-functions_8h.html#a8ddea475d4051b695f519100755d6a05">libnet-functions.h</a>
+</li>
+<li>libnet_diag_dump_context()
+: <a class="el" href="libnet-functions_8h.html#a1c70d00eefe61b2f5902ab56c802e07c">libnet-functions.h</a>
+</li>
+<li>libnet_diag_dump_hex()
+: <a class="el" href="libnet-functions_8h.html#adb2f7d417f05a058c0c2c7f76b6f66e6">libnet-functions.h</a>
+</li>
+<li>libnet_diag_dump_pblock()
+: <a class="el" href="libnet-functions_8h.html#a49e6023168b4f660ed8ff67dcc8ee228">libnet-functions.h</a>
+</li>
+<li>libnet_diag_dump_pblock_type()
+: <a class="el" href="libnet-functions_8h.html#a59cc8a10dd7a94f01238f96417b08420">libnet-functions.h</a>
+</li>
+<li>libnet_get_hwaddr()
+: <a class="el" href="libnet-functions_8h.html#acf6dc1ece9e994d4f4d3e47e5b218f6c">libnet-functions.h</a>
+</li>
+<li>libnet_get_ipaddr4()
+: <a class="el" href="libnet-functions_8h.html#a0adcfdd368764d4c4ab610daefe56b3d">libnet-functions.h</a>
+</li>
+<li>libnet_get_ipaddr6()
+: <a class="el" href="libnet-functions_8h.html#a7ca153d8efe6650769765fbc23e2b312">libnet-functions.h</a>
+</li>
+<li>libnet_get_prand()
+: <a class="el" href="libnet-functions_8h.html#ae0a1d32fdd169c55a0ce4c186a19b125">libnet-functions.h</a>
+</li>
+<li>libnet_getdevice()
+: <a class="el" href="libnet-functions_8h.html#ab65f1cd5ef46ae93909e6dd45bcff0cb">libnet-functions.h</a>
+</li>
+<li>libnet_geterror()
+: <a class="el" href="libnet-functions_8h.html#a7932677fa8ddd7f512c7b154d91263e9">libnet-functions.h</a>
+</li>
+<li>libnet_getfd()
+: <a class="el" href="libnet-functions_8h.html#a301939dd9e773bec51a8a3cc8e09ca3b">libnet-functions.h</a>
+</li>
+<li>libnet_getgre_length()
+: <a class="el" href="libnet-functions_8h.html#a6173dfa2aaf953c8a36ebf347a567100">libnet-functions.h</a>
+</li>
+<li>libnet_getpacket_size()
+: <a class="el" href="libnet-functions_8h.html#ad5c14b23de1fe0aaf36315c710972fcd">libnet-functions.h</a>
+</li>
+<li>libnet_getpbuf()
+: <a class="el" href="libnet-functions_8h.html#a1e1bc31a56aad7f000e55d9f2ed002b9">libnet-functions.h</a>
+</li>
+<li>libnet_getpbuf_size()
+: <a class="el" href="libnet-functions_8h.html#a6b945999765b5c5cfa2e496153fc7d03">libnet-functions.h</a>
+</li>
+<li>libnet_hex_aton()
+: <a class="el" href="libnet-functions_8h.html#a62a7ac78ee69568e17927674786c1b69">libnet-functions.h</a>
+</li>
+<li>libnet_in6_is_error()
+: <a class="el" href="libnet-functions_8h.html#a0a43add9ba39e677367ff167e807814b">libnet-functions.h</a>
+</li>
+<li>libnet_init()
+: <a class="el" href="libnet-functions_8h.html#aced83ef40edb05a9fc1e129373fe44dd">libnet-functions.h</a>
+</li>
+<li>libnet_name2addr4()
+: <a class="el" href="libnet-functions_8h.html#a634e7d60fd7117c948fafea0ff25f77b">libnet-functions.h</a>
+</li>
+<li>libnet_name2addr6()
+: <a class="el" href="libnet-functions_8h.html#af525a32eb69e48519f84abed4231643a">libnet-functions.h</a>
+</li>
+<li>libnet_plist_chain_dump()
+: <a class="el" href="libnet-functions_8h.html#a155f2da7f242051d5d80691c1754ca9c">libnet-functions.h</a>
+</li>
+<li>libnet_plist_chain_dump_string()
+: <a class="el" href="libnet-functions_8h.html#adbd62cbfc5a072a9e77f1b64af78b46e">libnet-functions.h</a>
+</li>
+<li>libnet_plist_chain_free()
+: <a class="el" href="libnet-functions_8h.html#a59623a76b513ae6af05befded04f65d2">libnet-functions.h</a>
+</li>
+<li>libnet_plist_chain_new()
+: <a class="el" href="libnet-functions_8h.html#aaedc1110a9c8deab0909f15e141f5883">libnet-functions.h</a>
+</li>
+<li>libnet_plist_chain_next_pair()
+: <a class="el" href="libnet-functions_8h.html#ac4b56b34eb9124cb6b70fb9bff5ba6f4">libnet-functions.h</a>
+</li>
+<li>libnet_seed_prand()
+: <a class="el" href="libnet-functions_8h.html#a0a995dfd68f20b80394507b9968ae951">libnet-functions.h</a>
+</li>
+<li>libnet_stats()
+: <a class="el" href="libnet-functions_8h.html#a8fe5ad751cf8320b0ac56a0736332ec3">libnet-functions.h</a>
+</li>
+<li>libnet_toggle_checksum()
+: <a class="el" href="libnet-functions_8h.html#af17b19befbe13e23a240739b19846503">libnet-functions.h</a>
+</li>
+<li>libnet_version()
+: <a class="el" href="libnet-functions_8h.html#ac4a33a98186ad71f7ae4c559b039af0f">libnet-functions.h</a>
+</li>
+<li>libnet_write()
+: <a class="el" href="libnet-functions_8h.html#a3ec16c8aa5c7ae59ff63ce4a9329ab90">libnet-functions.h</a>
+</li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated on Sat Sep 28 2019 11:13:34 for libnet by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/doc/html/tab_s.png b/doc/html/tab_s.png
new file mode 100644
index 0000000..ab478c9
--- /dev/null
+++ b/doc/html/tab_s.png
Binary files differ
diff --git a/doc/libnet-config.Pod b/doc/libnet-config.Pod
new file mode 100644
index 0000000..91ca1e7
--- /dev/null
+++ b/doc/libnet-config.Pod
@@ -0,0 +1,92 @@
+=pod
+
+=encoding utf8
+
+=head1 NAME
+
+libnet-config - script to get information about, and for linking against libnet
+
+=head1 SYNOPSIS
+
+B<libnet-config [--help] | [--version] | [--prefix] | [--libs --cflags --defines]>
+
+=head1 DESCRIPTION
+
+libnet-config tells the application programmer what flags to use to compile and
+link programs against an installed L<libnet> library.
+
+An alternative (and perhaps more convenient) method of retrieving the various
+configuration information needed to compile programs that use libnet is to use
+the L<pkg-config(1)> program. Pkg-config support was added in version 1.2.
+
+Both methods write to standard output the flags that should be used to compile
+and link programs that use libnet.
+
+=head1 OPTIONS
+
+=over 8
+
+=item B<--help>
+
+Print a usage message and exit. This is the default behavior when no options are
+specified.
+
+=item B<--version>
+
+Print version information and exit.
+
+=item B<--libs>
+
+Print the linker flags (LDFLAGS) that are necessary to link a programs with
+libnet.
+
+=item B<--cflags>
+
+Print the compiler options (CFLAGS) to use when compiling files that use libnet.
+Currently that is only the include path to the libnet include files.
+
+=item B<--defines>
+
+Print the pre-processor definitions libnet was compiler with.
+
+=item B<--prefix>
+
+Print the prefix used when libnet was installed. The prefix can be set during
+the build process with "configure --prefix".
+
+=back
+
+=head1 EXAMPLES
+
+To print all linker options needed when linking with libnet, use
+
+B<C<libnet-config --libs>>
+
+To build the singe-file C program 'prog' against the libnet library, use
+
+B<C<gcc $(libnet-config --cflags --defines --libs) progr.c -o progr>>
+
+The same in a Makefile:
+
+B<CFLAGS+=$(shell libnet-config --cflags --defines )>
+
+B<LDFLAGS+=$(shell libnet-config --libs)>
+
+B<all: prog>
+
+To build a dynamically loadable libnet module, use
+
+B<C<gcc $(libnet-config --cflags --defines --libs) -shared -fPIC progr.cpp -o progr.so>>
+
+Note that libnet-config can also be called from 'configure' scripts.
+
+=head1 SEE ALSO
+
+L<libnet(3)>, L<pkg-config(1)>
+
+=head1 AUTHORS
+
+This manual page was written by Ali Abdulkadir <autostart.ini@gmail.com>
+
+=cut
+
diff --git a/doc/libnet.Pod b/doc/libnet.Pod
new file mode 100644
index 0000000..6dd5cad
--- /dev/null
+++ b/doc/libnet.Pod
@@ -0,0 +1,68 @@
+=pod
+
+=encoding utf8
+
+=head1 NAME
+
+libnet - A C library for packet creation and injection
+
+=head1 SYNOPSIS
+
+B<#include E<lt>libnet.hE<gt>>
+
+=head1 DESCRIPTION
+
+libnet is a packet assembly library that provides a portable interface for
+packet creation and injection.
+
+It is a high-level API that allows an application programmer to construct and
+inject network packets. libnet provides a simplified interface for low-level
+network packet shaping, handling and injection.
+
+libnet hides much of the tedium of packet creation from the application
+programmer such as multiplexing, buffer management, arcane packet header
+information, byte-ordering, OS-dependent issues, and much more. libnet features
+portable packet creation interfaces at the IP and link layer, as well
+as a host of supplementary and complementary 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 (L<traceroute(8)> and L<ping(8)> were easily rewritten using libnet and L<pcap(3)>.
+
+When building applications with libnet, the L<libnet-config(1)> script or the L<pkg-config(1)> program can be used to return the compiler and linker flags
+of the installed libnet library as well as give other useful information.
+
+B<NOTE>: If you are writing your application with libnet, include F<libnet.h>,
+which will include any additional header for you, rather than including
+F<libnet/libnet-functions.h>, F<libnet/libnet-macros.h> or any of the others.
+
+=head1 BACKWARDS COMPATIBILITY
+
+Your old code (circa libnet B<1.0.x>) WILL NOT WORK with libnet> B<E<gt>=1.1.x>.
+See B<doc/MIGRATION> for easy steps on porting your old code.
+
+=head1 SEE ALSO
+
+L<libnet-config(1)>, L<libnet-functions(3)>, L<libnet-macros(3)>
+
+=head1 AUTHORS
+
+The original author of libnet is Mike D. Schiffman.
+
+libnet has been maintained and extensively enhanced since 2009 by Sam Roberts.
+
+It is currently maintained by Ali Abdulkadir and available at
+
+ <https://github.com/sgeto/libnet>
+
+=head1 BUGS
+
+For bugs, questions, patch submissions, desirable enhancements, etc. see:
+
+ <https://github.com/sgeto/libnet/issues>
+
+=head1 COPYRIGHT
+
+libnet is licensed under the 3-Clause BSD License. You can basically
+do whatever you want with it.
+
+=cut
+
diff --git a/doc/libnet.chm b/doc/libnet.chm
new file mode 100644
index 0000000..5193ca2
--- /dev/null
+++ b/doc/libnet.chm
Binary files differ
diff --git a/doc/libnet.doxygen.conf b/doc/libnet.doxygen.conf
index 48d27b8..41ff0d3 100644
--- a/doc/libnet.doxygen.conf
+++ b/doc/libnet.doxygen.conf
@@ -1,1777 +1,325 @@
-# Doxyfile 1.8.1.2
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project.
-#
-# All text after a hash (#) is considered a comment and will be ignored.
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ").
+# Doxyfile 1.8.14
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or sequence of words) that should
-# identify the project. Note that if you do not use Doxywizard you need
-# to put quotes around the project name if it contains spaces.
-
-PROJECT_NAME = "libnet"
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER = "1.1"
-
-# Using the PROJECT_BRIEF tag one can provide an optional one line description
-# for a project that appears at the top of each page and should give viewer
-# a quick idea about the purpose of the project. Keep the description short.
-
-PROJECT_BRIEF =
-
-# With the PROJECT_LOGO tag one can specify an logo or icon that is
-# included in the documentation. The maximum height of the logo should not
-# exceed 55 pixels and the maximum width should not exceed 200 pixels.
-# Doxygen will copy the logo to the output directory.
-
+PROJECT_NAME = $(PROJECT)
+PROJECT_NUMBER = $(VERSION)
+PROJECT_BRIEF = "A Portable Framework for Low-Level Network Packet Construction"
PROJECT_LOGO =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY = "doc"
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
+OUTPUT_DIRECTORY = $(DOCDIR)
CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
+ALLOW_UNICODE_NAMES = NO
OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
ABBREVIATE_BRIEF =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
FULL_PATH_NAMES = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
+STRIP_FROM_PATH = include
STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful if your file system
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
JAVADOC_AUTOBRIEF = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
TAB_SIZE = 4
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
ALIASES =
-
-# This tag can be used to specify a number of word-keyword mappings (TCL only).
-# A mapping has the form "name=value". For example adding
-# "class=itcl::class" will allow you to use the command class in the
-# itcl::class meaning.
-
TCL_SUBST =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
OPTIMIZE_OUTPUT_FOR_C = YES
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
EXTENSION_MAPPING =
-
-# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all
-# comments according to the Markdown format, which allows for more readable
-# documentation. See http://daringfireball.net/projects/markdown/ for details.
-# The output of markdown processing is further processed by doxygen, so you
-# can mix doxygen, HTML, and XML commands with Markdown formatting.
-# Disable only in case of backward compatibilities issues.
-
MARKDOWN_SUPPORT = YES
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also makes the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
+TOC_INCLUDE_HEADINGS = 0
+AUTOLINK_SUPPORT = YES
BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
+GROUP_NESTED_COMPOUNDS = NO
SUBGROUPING = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
-# unions are shown inside the group in which they are included (e.g. using
-# @ingroup) instead of on a separate page (for HTML and Man pages) or
-# section (for LaTeX and RTF).
-
INLINE_GROUPED_CLASSES = NO
-
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
-# unions with only public data fields will be shown inline in the documentation
-# of the scope in which they are defined (i.e. file, namespace, or group
-# documentation), provided this scope is documented. If set to NO (the default),
-# structs, classes, and unions are shown on a separate page (for HTML and Man
-# pages) or section (for LaTeX and RTF).
-
INLINE_SIMPLE_STRUCTS = NO
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
TYPEDEF_HIDES_STRUCT = NO
-
-# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
-# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
-# their name and scope. Since this can be an expensive process and often the
-# same symbol appear multiple times in the code, doxygen keeps a cache of
-# pre-resolved symbols. If the cache is too small doxygen will become slower.
-# If the cache is too large, memory is wasted. The cache size is given by this
-# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
LOOKUP_CACHE_SIZE = 0
-
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
EXTRACT_ALL = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal scope will be included in the documentation.
-
EXTRACT_PACKAGE = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
EXTRACT_STATIC = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
EXTRACT_LOCAL_CLASSES = NO
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
EXTRACT_LOCAL_METHODS = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespaces are hidden.
-
EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
HIDE_UNDOC_MEMBERS = YES
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
HIDE_UNDOC_CLASSES = YES
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
CASE_SENSE_NAMES = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
+HIDE_COMPOUND_REFERENCE= NO
SHOW_INCLUDE_FILES = YES
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
+SHOW_GROUPED_MEMB_INC = NO
FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
SORT_BRIEF_DOCS = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
SORT_GROUP_NAMES = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
SORT_BY_SCOPE_NAME = NO
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
-# do proper type resolution of all parameters of a function it will reject a
-# match between the prototype and the implementation of a member function even
-# if there is only one candidate or it is obvious which candidate to choose
-# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
-# will still accept a match between prototype and implementation in such cases.
-
STRICT_PROTO_MATCHING = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or macro consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and macros in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
SHOW_USED_FILES = YES
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page.
-# This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
SHOW_NAMESPACES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. To create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
LAYOUT_FILE =
-
-# The CITE_BIB_FILES tag can be used to specify one or more bib files
-# containing the references data. This must be a list of .bib files. The
-# .bib extension is automatically appended if omitted. Using this command
-# requires the bibtex tool to be installed. See also
-# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
-# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
-# feature you need bibtex and perl available in the search path.
-
CITE_BIB_FILES =
-
#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
+# Configuration options related to warning and progress messages
#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
QUIET = YES
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = NO
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
+WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
-
-# The WARN_NO_PARAMDOC option can be enabled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
WARN_NO_PARAMDOC = YES
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
+WARN_AS_ERROR = NO
WARN_FORMAT = "$file:$line: $text "
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
WARN_LOGFILE =
-
#---------------------------------------------------------------------------
-# configuration options related to the input files
+# Configuration options related to the input files
#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT = include/libnet \
+INPUT = $(SRCDIR)/doc/libnet_api_main_page.md \
+ $(SRCDIR)/include/libnet \
include/libnet.h
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
-# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
-# *.f90 *.f *.for *.vhd *.vhdl
-
FILE_PATTERNS = *.h
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should be
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-# Note that relative paths are relative to the directory from which doxygen is
-# run.
-
-EXCLUDE = include/libnet/libnet-headers.h
-
-# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
-# directories that are symbolic links (a Unix file system feature) are excluded
-# from the input.
-
+EXCLUDE = include/libnet/libnet-headers.h \
+ include/libnet/libnet-types.h \
+ include/libnet/libnet-asn1.h \
+ include/libnet/libnet-structures.h
EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
EXCLUDE_PATTERNS = */sample/*
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
EXAMPLE_PATTERNS =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
IMAGE_PATH =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output.
-# If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis.
-# Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match.
-# The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty or if
-# non of the patterns match the file name, INPUT_FILTER is applied.
-
FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
FILTER_SOURCE_FILES = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
-# and it is also possible to disable source filtering for a specific pattern
-# using *.ext= (so without naming a filter). This option only has effect when
-# FILTER_SOURCE_FILES is enabled.
-
FILTER_SOURCE_PATTERNS =
-
+USE_MDFILE_AS_MAINPAGE = libnet_api_main_page.md
#---------------------------------------------------------------------------
-# configuration options related to source browsing
+# Configuration options related to source browsing
#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
SOURCE_BROWSER = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C, C++ and Fortran comments will always remain visible.
-
STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
REFERENCES_RELATION = YES
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.
-# Otherwise they will link to the documentation.
-
REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
+SOURCE_TOOLTIPS = YES
USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
VERBATIM_HEADERS = YES
-
#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
+# Configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
+ALPHABETICAL_INDEX = YES
+COLS_IN_ALPHA_INDEX = 3
IGNORE_PREFIX =
-
#---------------------------------------------------------------------------
-# configuration options related to the HTML output
+# Configuration options related to the HTML output
#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
+GENERATE_HTML = $(GENERATE_HTML)
+HTML_OUTPUT = api
HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header. Note that when using a custom header you are responsible
-# for the proper inclusion of any scripts and style sheets that doxygen
-# needs, which is dependent on the configuration options used.
-# It is advised to generate a default header using "doxygen -w html
-# header.html footer.html stylesheet.css YourConfigFile" and then modify
-# that header. Note that the header is subject to change so you typically
-# have to redo this when upgrading to a newer version of doxygen or when
-# changing the value of configuration settings such as GENERATE_TREEVIEW!
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# style sheet in the HTML output directory as well, or it will be erased!
-
+HTML_HEADER = $(SRCDIR)/doc/libnet_api_header.html_tmpl
+HTML_FOOTER = $(SRCDIR)/doc/libnet_api_footer.html_tmpl
HTML_STYLESHEET =
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that
-# the files will be copied as-is; there are no commands or markers available.
-
+HTML_EXTRA_STYLESHEET = $(SRCDIR)/doc/libnet_api_stylesheet.css_tmpl
HTML_EXTRA_FILES =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the style sheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded.
-
+HTML_COLORSTYLE_HUE = 120
+HTML_COLORSTYLE_SAT = 50
+HTML_COLORSTYLE_GAMMA = 40
+HTML_TIMESTAMP = NO
+HTML_DYNAMIC_MENUS = YES
HTML_DYNAMIC_SECTIONS = NO
-
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of
-# entries shown in the various tree structured indices initially; the user
-# can expand and collapse entries dynamically later on. Doxygen will expand
-# the tree to such a level that at most the specified number of entries are
-# visible (unless a fully collapsed tree already exceeds this amount).
-# So setting the number of entries 1 will produce a full collapsed tree by
-# default. 0 is a special value representing an infinite number of entries
-# and will result in a full expanded tree by default.
-
HTML_INDEX_NUM_ENTRIES = 100
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
GENERATE_DOCSET = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
+GENERATE_HTMLHELP = $(GENERATE_HTMLHELP)
+CHM_FILE = ../$(PROJECT).chm
+HHC_LOCATION = $(HHC_PATH)
+GENERATE_CHI = $(GENERATE_CHI)
CHM_INDEX_ENCODING =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
QHP_NAMESPACE = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
QHP_VIRTUAL_FOLDER = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-# Qt Help Project / Custom Filters</a>.
-
QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-# Qt Help Project / Filter Attributes</a>.
-
QHP_SECT_FILTER_ATTRS =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-# will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
-
GENERATE_ECLIPSEHELP = NO
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
ECLIPSE_DOC_ID = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs)
-# at top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it. Since the tabs have the same information as the
-# navigation tree you can set this option to NO if you already set
-# GENERATE_TREEVIEW to YES.
-
-DISABLE_INDEX = NO
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-# Since the tree basically has the same information as the tab index you
-# could consider to set DISABLE_INDEX to NO when enabling this option.
-
+DISABLE_INDEX = YES
GENERATE_TREEVIEW = NO
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
-# (range [0,1..20]) that doxygen will group on one line in the generated HTML
-# documentation. Note that a value of 0 will completely suppress the enum
-# values from appearing in the overview section.
-
ENUM_VALUES_PER_LINE = 4
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
TREEVIEW_WIDTH = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
-
EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
-
FORMULA_TRANSPARENT = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
-# (see http://www.mathjax.org) which uses client side Javascript for the
-# rendering instead of using prerendered bitmaps. Use this if you do not
-# have LaTeX installed or if you want to formulas look prettier in the HTML
-# output. When enabled you may also need to install MathJax separately and
-# configure the path to it using the MATHJAX_RELPATH option.
-
USE_MATHJAX = NO
-
-# When MathJax is enabled you need to specify the location relative to the
-# HTML output directory using the MATHJAX_RELPATH option. The destination
-# directory should contain the MathJax.js script. For instance, if the mathjax
-# directory is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to
-# the MathJax Content Delivery Network so you can quickly see the result without
-# installing MathJax.
-# However, it is strongly recommended to install a local
-# copy of MathJax from http://www.mathjax.org before deployment.
-
-MATHJAX_RELPATH = http://www.mathjax.org/mathjax
-
-# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
-# names that should be enabled during MathJax rendering.
-
+MATHJAX_FORMAT = HTML-CSS
+MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
MATHJAX_EXTENSIONS =
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
+MATHJAX_CODEFILE =
SEARCHENGINE = NO
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a PHP enabled web server instead of at the web client
-# using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server
-# based approach is that it scales better to large projects and allows
-# full text search. The disadvantages are that it is more difficult to setup
-# and does not have live searching capabilities.
-
SERVER_BASED_SEARCH = NO
-
+EXTERNAL_SEARCH = NO
+SEARCHENGINE_URL =
+SEARCHDATA_FILE = searchdata.xml
+EXTERNAL_SEARCH_ID =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
+# Configuration options related to the LaTeX output
#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = YES
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
+GENERATE_LATEX = $(GENERATE_LATEX)
LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = YES
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
+COMPACT_LATEX = NO
+PAPER_TYPE = $(PAPER_SIZE)
EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
LATEX_HEADER =
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
-# the generated latex document. The footer should contain everything after
-# the last chapter. If it is left blank doxygen will generate a
-# standard footer. Notice: only use this tag if you know what you are doing!
-
LATEX_FOOTER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
+LATEX_EXTRA_STYLESHEET =
+LATEX_EXTRA_FILES =
PDF_HYPERLINKS = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
LATEX_BATCHMODE = YES
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
LATEX_HIDE_INDICES = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
LATEX_SOURCE_CODE = NO
-
-# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
-# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
-# http://en.wikipedia.org/wiki/BibTeX for more info.
-
LATEX_BIB_STYLE = plain
-
+LATEX_TIMESTAMP = NO
#---------------------------------------------------------------------------
-# configuration options related to the RTF output
+# Configuration options related to the RTF output
#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
+GENERATE_RTF = $(GENERATE_RTF)
RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
RTF_HYPERLINKS = NO
-
-# Load style sheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
RTF_EXTENSIONS_FILE =
-
+RTF_SOURCE_CODE = NO
#---------------------------------------------------------------------------
-# configuration options related to the man page output
+# Configuration options related to the man page output
#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = YES
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
+GENERATE_MAN = $(GENERATE_MAN)
MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
+MAN_SUBDIR =
MAN_LINKS = NO
-
#---------------------------------------------------------------------------
-# configuration options related to the XML output
+# Configuration options related to the XML output
#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
+GENERATE_XML = $(GENERATE_XML)
XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
XML_PROGRAMLISTING = YES
-
#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+GENERATE_DOCBOOK = NO
+DOCBOOK_OUTPUT = docbook
+DOCBOOK_PROGRAMLISTING = NO
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
GENERATE_AUTOGEN_DEF = NO
-
#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
+# Configuration options related to the Perl module output
#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader.
-# This is useful
-# if you want to understand what is going on.
-# On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
PERLMOD_MAKEVAR_PREFIX =
-
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# pointed to by INCLUDE_PATH will be searched when a #include is found.
-
SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition that
-# overrules the definition found in the source code.
-
+PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS
EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all references to function-like macros
-# that are alone on a line, have an all uppercase name, and do not end with a
-# semicolon, because these will confuse the parser if not removed.
-
SKIP_FUNCTION_MACROS = YES
-
#---------------------------------------------------------------------------
-# Configuration::additions related to external references
+# Configuration options related to external references
#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles. For each
-# tag file the location of the external documentation should be added. The
-# format of a tag file without this location is as follows:
-#
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-#
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths
-# or URLs. Note that each tag file must have a unique name (where the name does
-# NOT include the path). If a tag file is not located in the directory in which
-# doxygen is run, you must also specify the path to the tagfile here.
-
TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
+GENERATE_TAGFILE = $(DOCDIR)/$(PROJECT).tag
ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
+EXTERNAL_PAGES = YES
+PERL_PATH = $(PERL_PATH)
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option also works with HAVE_DOT disabled, but it is recommended to
-# install and use dot, since it yields more powerful graphs.
-
CLASS_DIAGRAMS = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
MSCGEN_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
+DIA_PATH =
HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = NO
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
+HAVE_DOT = $(HAVE_DOT)
DOT_NUM_THREADS = 0
-
-# By default doxygen will use the Helvetica font for all dot files that
-# doxygen generates. When you want a differently looking font you can specify
-# the font name using DOT_FONTNAME. You need to make sure dot is able to find
-# the font, which can be done by putting it in a standard location or by setting
-# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
-# directory containing the font.
-
DOT_FONTNAME = Helvetica
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the Helvetica font.
-# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
-# set the path where dot can find it.
-
DOT_FONTPATH =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# CLASS_DIAGRAMS tag to NO.
-
CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
UML_LOOK = NO
-
-# If the UML_LOOK tag is enabled, the fields and methods are shown inside
-# the class node. If there are many fields or methods and many nodes the
-# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS
-# threshold limits the number of items for each type to make the size more
-# managable. Set this to 0 for no limit. Note that the threshold may be
-# exceeded by 50% before the limit is enforced.
-
UML_LIMIT_NUM_FIELDS = 10
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
TEMPLATE_RELATIONS = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
CALL_GRAPH = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
CALLER_GRAPH = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will generate a graphical hierarchy of all classes instead of a textual one.
-
GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are svg, png, jpg, or gif.
-# If left blank png will be used. If you choose svg you need to set
-# HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible in IE 9+ (other browsers do not have this requirement).
-
DOT_IMAGE_FORMAT = png
-
-# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
-# enable generation of interactive SVG images that allow zooming and panning.
-# Note that this requires a modern browser other than Internet Explorer.
-# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
-# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible. Older versions of IE do not have SVG support.
-
INTERACTIVE_SVG = NO
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
+DOT_PATH = $(DOT_PATH)
DOTFILE_DIRS =
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the
-# \mscfile command).
-
MSCFILE_DIRS =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
+DIAFILE_DIRS =
+PLANTUML_JAR_PATH =
+PLANTUML_CFG_FILE =
+PLANTUML_INCLUDE_PATH =
DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
+DOT_MULTI_TARGETS = YES
GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
DOT_CLEANUP = YES
diff --git a/doc/libnet.pdf b/doc/libnet.pdf
new file mode 100644
index 0000000..0f3559b
--- /dev/null
+++ b/doc/libnet.pdf
Binary files differ
diff --git a/doc/libnet_api_footer.html_tmpl b/doc/libnet_api_footer.html_tmpl
new file mode 100644
index 0000000..fe84bde
--- /dev/null
+++ b/doc/libnet_api_footer.html_tmpl
@@ -0,0 +1,8 @@
+<hr>
+<address><small>
+Documentation for <a href="https://github.com/sgeto/libnet">libnet</a> (version $projectnumber).<br>
+Generated on $date by
+<a href="http://www.doxygen.org/">Doxygen $doxygenversion</a>.
+</small></address>
+</body>
+</html>
diff --git a/doc/libnet_api_header.html_tmpl b/doc/libnet_api_header.html_tmpl
new file mode 100644
index 0000000..e58524f
--- /dev/null
+++ b/doc/libnet_api_header.html_tmpl
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen $doxygenversion"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>libnet: API Documentation: $title</title>
+<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
+<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
+$extrastylesheet
+</head>
diff --git a/doc/libnet_api_main_page.md b/doc/libnet_api_main_page.md
new file mode 100644
index 0000000..9b6ce06
--- /dev/null
+++ b/doc/libnet_api_main_page.md
@@ -0,0 +1,84 @@
+libnet API Documentation {#mainpage}
+============================
+1998 - 2017 The libnet Developer Community
+
+
+Content(s)
+-----
+- [Main Page](index.html)
+- Files
+ - [File List](files.html)
+ - [Globals](globals.html)
+- Stuff
+ - [Rawsocket Non Sequitur](rawsocket_non_sequitur.html)
+ - Some Sub-sub-page
+ - Design Notes
+ - Hacking
+ - TODO
+- Bindings
+ - Lua
+ - [Python](https://github.com/allfro/pylibnet "pylibnet")
+- Page
+- More Page!
+ - Me Another Sub-page, yay!
+- [TODO](index.html#Topics-TODO)
+
+
+Introduction
+------------
+
+**Attention:** Most on the stuff on this page is either placeholder text and/or
+work in progress.
+At best, you should take the content on this page half-serious.
+I invite you to help expand/improve it.
+
+This manual documents the low-level libnet API. **If you're planning to this API
+directly, you're signing up for some pain.** Just kidding. (I'm not kidding)
+
+Although there aren't many up-to-date places to look for libnet information these
+days (yet), you still might not want to get started learning about libnet by reading
+this document. These pages provide an overview of (some) the internals of libnet
+with links to the relevant parts of the code. If you "just want it to work"
+or if this is all very new to you, then you should first refer to [these](http://www.yomama.com)
+(more or less) separate set of pages.
+Be sure to check out the man pages as well.
+
+The libnet API deliberately lacks most convenient functions. As further explained
+in [Design Notes](Design_Notes.html "Design Notes"), those happen behind the
+scenes, are left to complementary libraries, higher-level libraries or to
+"bindings" such as pcap, Python, Lua, etc. and have features such as ~~object
+systems and main loops~~ that allow a much more convenient API.
+
+The low-level API also contains plenty of clutter to support integration with
+arbitrary ~~object systems, languages, main loops~~, and so forth. These features
+add a lot of noise to the API that you probably don't care about unless you're
+coding a binding.
+
+For now, and probably never will there be similar docs for libnet's internals.
+So if you want to get oriented with the libnet source code (because you're interested
+in patching the code for example), you should dive straight into each source file,
+read the source and the comments surrounding it, and... just... figure the rest out!
+Or ask about it [here](https://github.com/sgeto/libnet/issues "Report bugs").
+If that's something you think you're you can see yourself doing then **Welcome Aboard!**
+By the way, it's also a good idea to go through some of the commits to understand
+the purpose or aim of whoever had their hands on the source before you.
+There will be a "[Hacking](Hacking.html)" section soon that is intended to
+guide and assist developers through this adventures journey.
+
+That is, if I don't lose interest, any hope or my sanity before that.
+Just kidding. (I'm not kidding)
+
+Stay tuned.
+
+**Last Modified:** *Wed, 26 Apr 2017 02:58:54 +0300*
+
+
+TODO
+----
+
+- try to make it sound smart
+- replace stuff inside ~~ with stuff that is actually true
+- call mom and dad
+- try to get Inbal back :-(
+- re-install Windows
+- create a separate "doc" branch and never ever (ever) commit anything relate to it directly to master (lesson learnt) \ No newline at end of file
diff --git a/doc/libnet_api_stylesheet.css_tmpl b/doc/libnet_api_stylesheet.css_tmpl
new file mode 100644
index 0000000..ea5753c
--- /dev/null
+++ b/doc/libnet_api_stylesheet.css_tmpl
@@ -0,0 +1,11 @@
+/* Additional CSS for libnet */
+
+body {
+ background-color: #fafafa;
+}
+
+.memdoc, dl.reflist dd {
+ background-color: #f7f5f5;
+}
+
+/* @end */
diff --git a/doc/man/man3/Makefile.am b/doc/man/man3/Makefile.am
index 011c193..593ba7a 100644
--- a/doc/man/man3/Makefile.am
+++ b/doc/man/man3/Makefile.am
@@ -1,3 +1,7 @@
-man3_MANS = $(srcdir)/libnet*.3
-EXTRA_DIST = $(srcdir)/libnet*.3
+man3_MANS = $(srcdir)/libnet.3 \
+ $(srcdir)/libnet-functions.3 \
+ $(srcdir)/libnet-macros.3
+EXTRA_DIST = $(srcdir)/libnet.3 \
+ $(srcdir)/libnet-functions.3 \
+ $(srcdir)/libnet-macros.3
diff --git a/doc/man/man3/libnet-functions.3 b/doc/man/man3/libnet-functions.3
new file mode 100644
index 0000000..1240c09
--- /dev/null
+++ b/doc/man/man3/libnet-functions.3
@@ -0,0 +1,3874 @@
+.TH "LIBNET-FUNCTIONS" 3 "Wed Apr 26 2017" "libnet-1.2-rc3" "libnet Programmers Guide" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+libnet-functions.h \- libnet exported function prototypes
+
+.SH SYNOPSIS
+.br
+.PP
+.SS "Functions"
+
+.in +1c
+.ti -1c
+.RI "LIBNET_API libnet_t * \fBlibnet_init\fP (int injection_type, const char *device, char *err_buf)"
+.br
+.ti -1c
+.RI "LIBNET_API void \fBlibnet_destroy\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API void \fBlibnet_clear_packet\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API void \fBlibnet_stats\fP (libnet_t *l, struct libnet_stats *ls)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_getfd\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API const char * \fBlibnet_getdevice\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API uint8_t * \fBlibnet_getpbuf\fP (libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API uint32_t \fBlibnet_getpbuf_size\fP (libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API char * \fBlibnet_geterror\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API uint32_t \fBlibnet_getpacket_size\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_seed_prand\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API uint32_t \fBlibnet_get_prand\fP (int mod)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_toggle_checksum\fP (libnet_t *l, libnet_ptag_t ptag, int mode)"
+.br
+.ti -1c
+.RI "LIBNET_API char * \fBlibnet_addr2name4\fP (uint32_t in, uint8_t use_name)"
+.br
+.ti -1c
+.RI "LIBNET_API uint32_t \fBlibnet_name2addr4\fP (libnet_t *l, const char *host_name, uint8_t use_name)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_in6_is_error\fP (struct libnet_in6_addr addr)"
+.br
+.ti -1c
+.RI "LIBNET_API struct libnet_in6_addr \fBlibnet_name2addr6\fP (libnet_t *l, const char *host_name, uint8_t use_name)"
+.br
+.ti -1c
+.RI "LIBNET_API void \fBlibnet_addr2name6_r\fP (struct libnet_in6_addr addr, uint8_t use_name, char *host_name, int host_name_len)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_plist_chain_new\fP (libnet_t *l, libnet_plist_t **plist, char *token_list)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_plist_chain_next_pair\fP (libnet_plist_t *plist, uint16_t *bport, uint16_t *eport)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_plist_chain_dump\fP (libnet_plist_t *plist)"
+.br
+.ti -1c
+.RI "LIBNET_API char * \fBlibnet_plist_chain_dump_string\fP (libnet_plist_t *plist)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_plist_chain_free\fP (libnet_plist_t *plist)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_802_1q\fP (const uint8_t *dst, const uint8_t *src, uint16_t tpi, uint8_t priority, uint8_t cfi, uint16_t vlan_id, uint16_t len_proto, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_802_1x\fP (uint8_t eap_ver, uint8_t eap_type, uint16_t length, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_802_2\fP (uint8_t dsap, uint8_t ssap, uint8_t control, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_802_2snap\fP (uint8_t dsap, uint8_t ssap, uint8_t control, uint8_t *oui, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_802_3\fP (const uint8_t *dst, const uint8_t *src, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ethernet\fP (const uint8_t *dst, const uint8_t *src, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_autobuild_ethernet\fP (const uint8_t *dst, uint16_t type, libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_fddi\fP (uint8_t fc, const uint8_t *dst, const uint8_t *src, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t *oui, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_autobuild_fddi\fP (uint8_t fc, const uint8_t *dst, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t *oui, uint16_t type, libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_arp\fP (uint16_t hrd, uint16_t pro, uint8_t hln, uint8_t pln, uint16_t op, const uint8_t *sha, const uint8_t *spa, const uint8_t *tha, const uint8_t *tpa, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_autobuild_arp\fP (uint16_t op, const uint8_t *sha, const uint8_t *spa, const uint8_t *tha, uint8_t *tpa, libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_tcp\fP (uint16_t sp, uint16_t dp, uint32_t seq, uint32_t ack, uint8_t control, uint16_t win, uint16_t sum, uint16_t urg, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_tcp_options\fP (const uint8_t *options, uint32_t options_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_udp\fP (uint16_t sp, uint16_t dp, uint16_t len, uint16_t sum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_cdp\fP (uint8_t version, uint8_t ttl, uint16_t sum, uint16_t type, uint16_t value_s, const uint8_t *value, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv4_echo\fP (uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv4_mask\fP (uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint32_t mask, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv4_unreach\fP (uint8_t type, uint8_t code, uint16_t sum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv4_redirect\fP (uint8_t type, uint8_t code, uint16_t sum, uint32_t gateway, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv4_timeexceed\fP (uint8_t type, uint8_t code, uint16_t sum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv4_timestamp\fP (uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint32_t otime, uint32_t rtime, uint32_t ttime, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv6_echo\fP (uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv6_unreach\fP (uint8_t type, uint8_t code, uint16_t sum, uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv6_ndp_nsol\fP (uint8_t type, uint8_t code, uint16_t sum, struct libnet_in6_addr target, uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv6_ndp_nadv\fP (uint8_t type, uint8_t code, uint16_t sum, uint32_t flags, struct libnet_in6_addr target, uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv6_ndp_opt\fP (uint8_t type, uint8_t *option, uint32_t option_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_igmp\fP (uint8_t type, uint8_t reserved, uint16_t sum, uint32_t ip, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ipv4\fP (uint16_t ip_len, uint8_t tos, uint16_t id, uint16_t frag, uint8_t ttl, uint8_t prot, uint16_t sum, uint32_t src, uint32_t dst, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ipv4_options\fP (const uint8_t *options, uint32_t options_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_autobuild_ipv4\fP (uint16_t len, uint8_t prot, uint32_t dst, libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ipv6\fP (uint8_t tc, uint32_t fl, uint16_t len, uint8_t nh, uint8_t hl, struct libnet_in6_addr src, struct libnet_in6_addr dst, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ipv6_frag\fP (uint8_t nh, uint8_t reserved, uint16_t frag, uint32_t id, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ipv6_routing\fP (uint8_t nh, uint8_t len, uint8_t rtype, uint8_t segments, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ipv6_destopts\fP (uint8_t nh, uint8_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ipv6_hbhopts\fP (uint8_t nh, uint8_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_autobuild_ipv6\fP (uint16_t len, uint8_t nh, struct libnet_in6_addr dst, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_isl\fP (uint8_t *dhost, uint8_t type, uint8_t user, uint8_t *shost, uint16_t len, const uint8_t *snap, uint16_t vid, uint16_t portindex, uint16_t reserved, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ipsec_esp_hdr\fP (uint32_t spi, uint32_t seq, uint32_t iv, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ipsec_esp_ftr\fP (uint8_t len, uint8_t nh, int8_t *auth, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ipsec_ah\fP (uint8_t nh, uint8_t len, uint16_t res, uint32_t spi, uint32_t seq, uint32_t auth, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_dnsv4\fP (uint16_t h_len, uint16_t id, uint16_t flags, uint16_t num_q, uint16_t num_anws_rr, uint16_t num_auth_rr, uint16_t num_addi_rr, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_rip\fP (uint8_t cmd, uint8_t version, uint16_t rd, uint16_t af, uint16_t rt, uint32_t addr, uint32_t mask, uint32_t next_hop, uint32_t metric, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_rpc_call\fP (uint32_t rm, uint32_t xid, uint32_t prog_num, uint32_t prog_vers, uint32_t procedure, uint32_t cflavor, uint32_t clength, uint8_t *cdata, uint32_t vflavor, uint32_t vlength, const uint8_t *vdata, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_stp_conf\fP (uint16_t id, uint8_t version, uint8_t bpdu_type, uint8_t flags, const uint8_t *root_id, uint32_t root_pc, const uint8_t *bridge_id, uint16_t port_id, uint16_t message_age, uint16_t max_age, uint16_t hello_time, uint16_t f_delay, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_stp_tcn\fP (uint16_t id, uint8_t version, uint8_t bpdu_type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_token_ring\fP (uint8_t ac, uint8_t fc, const uint8_t *dst, const uint8_t *src, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t *oui, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_autobuild_token_ring\fP (uint8_t ac, uint8_t fc, const uint8_t *dst, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t *oui, uint16_t type, libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_vrrp\fP (uint8_t version, uint8_t type, uint8_t vrouter_id, uint8_t priority, uint8_t ip_count, uint8_t auth_type, uint8_t advert_int, uint16_t sum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_mpls\fP (uint32_t label, uint8_t experimental, uint8_t bos, uint8_t ttl, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ntp\fP (uint8_t leap_indicator, uint8_t version, uint8_t mode, uint8_t stratum, uint8_t poll, uint8_t precision, uint16_t delay_int, uint16_t delay_frac, uint16_t dispersion_int, uint16_t dispersion_frac, uint32_t reference_id, uint32_t ref_ts_int, uint32_t ref_ts_frac, uint32_t orig_ts_int, uint32_t orig_ts_frac, uint32_t rec_ts_int, uint32_t rec_ts_frac, uint32_t xmt_ts_int, uint32_t xmt_ts_frac, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ospfv2\fP (uint16_t len, uint8_t type, uint32_t rtr_id, uint32_t area_id, uint16_t sum, uint16_t autype, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ospfv2_hello\fP (uint32_t netmask, uint16_t interval, uint8_t opts, uint8_t priority, uint32_t dead_int, uint32_t des_rtr, uint32_t bkup_rtr, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ospfv2_dbd\fP (uint16_t dgram_len, uint8_t opts, uint8_t type, uint32_t seqnum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ospfv2_lsr\fP (uint32_t type, uint32_t lsid, uint32_t advrtr, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ospfv2_lsu\fP (uint32_t num, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ospfv2_lsa\fP (uint16_t age, uint8_t opts, uint8_t type, uint32_t lsid, uint32_t advrtr, uint32_t seqnum, uint16_t sum, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ospfv2_lsa_rtr\fP (uint16_t flags, uint16_t num, uint32_t id, uint32_t data, uint8_t type, uint8_t tos, uint16_t metric, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ospfv2_lsa_net\fP (uint32_t nmask, uint32_t rtrid, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ospfv2_lsa_sum\fP (uint32_t nmask, uint32_t metric, uint32_t tos, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ospfv2_lsa_as\fP (uint32_t nmask, uint32_t metric, uint32_t fwdaddr, uint32_t tag, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_data\fP (const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_dhcpv4\fP (uint8_t opcode, uint8_t htype, uint8_t hlen, uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags, uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip, const uint8_t *chaddr, const char *sname, const char *file, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_bootpv4\fP (uint8_t opcode, uint8_t htype, uint8_t hlen, uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags, uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip, const uint8_t *chaddr, const char *sname, const char *file, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API uint32_t \fBlibnet_getgre_length\fP (uint16_t fv)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_gre\fP (uint16_t fv, uint16_t type, uint16_t sum, uint16_t offset, uint32_t key, uint32_t seq, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_egre\fP (uint16_t fv, uint16_t type, uint16_t sum, uint16_t offset, uint32_t key, uint32_t seq, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_gre_sre\fP (uint16_t af, uint8_t offset, uint8_t length, uint8_t *routing, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_gre_last_sre\fP (libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_bgp4_header\fP (uint8_t marker[LIBNET_BGP4_MARKER_SIZE], uint16_t len, uint8_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_bgp4_open\fP (uint8_t version, uint16_t src_as, uint16_t hold_time, uint32_t bgp_id, uint8_t opt_len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_bgp4_update\fP (uint16_t unfeasible_rt_len, const uint8_t *withdrawn_rt, uint16_t total_path_attr_len, const uint8_t *path_attributes, uint16_t info_len, uint8_t *reachability_info, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_bgp4_notification\fP (uint8_t err_code, uint8_t err_subcode, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_sebek\fP (uint32_t magic, uint16_t version, uint16_t type, uint32_t counter, uint32_t time_sec, uint32_t time_usec, uint32_t pid, uint32_t uid, uint32_t fd, uint8_t cmd[SEBEK_CMD_LENGTH], uint32_t length, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_hsrp\fP (uint8_t version, uint8_t opcode, uint8_t state, uint8_t hello_time, uint8_t hold_time, uint8_t priority, uint8_t group, uint8_t reserved, uint8_t authdata[HSRP_AUTHDATA_LENGTH], uint32_t virtual_ip, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_link\fP (const uint8_t *dst, const uint8_t *src, const uint8_t *oui, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_autobuild_link\fP (const uint8_t *dst, const uint8_t *oui, uint16_t type, libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_write\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API uint32_t \fBlibnet_get_ipaddr4\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API struct libnet_in6_addr \fBlibnet_get_ipaddr6\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API struct libnet_ether_addr * \fBlibnet_get_hwaddr\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API uint8_t * \fBlibnet_hex_aton\fP (const char *s, int *len)"
+.br
+.ti -1c
+.RI "LIBNET_API const char * \fBlibnet_version\fP (void)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_adv_cull_packet\fP (libnet_t *l, uint8_t **packet, uint32_t *packet_s)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_adv_cull_header\fP (libnet_t *l, libnet_ptag_t ptag, uint8_t **header, uint32_t *header_s)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_adv_write_link\fP (libnet_t *l, const uint8_t *packet, uint32_t packet_s)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_adv_write_raw_ipv4\fP (libnet_t *l, const uint8_t *packet, uint32_t packet_s)"
+.br
+.ti -1c
+.RI "LIBNET_API void \fBlibnet_adv_free_packet\fP (libnet_t *l, uint8_t *packet)"
+.br
+.ti -1c
+.RI "int \fBlibnet_cq_add\fP (libnet_t *l, char *label)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_t * \fBlibnet_cq_remove\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_t * \fBlibnet_cq_remove_by_label\fP (char *label)"
+.br
+.ti -1c
+.RI "LIBNET_API const char * \fBlibnet_cq_getlabel\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_t * \fBlibnet_cq_find_by_label\fP (char *label)"
+.br
+.ti -1c
+.RI "LIBNET_API void \fBlibnet_cq_destroy\fP (void)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_t * \fBlibnet_cq_head\fP (void)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_cq_last\fP (void)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_t * \fBlibnet_cq_next\fP (void)"
+.br
+.ti -1c
+.RI "LIBNET_API uint32_t \fBlibnet_cq_size\fP (void)"
+.br
+.ti -1c
+.RI "LIBNET_API uint32_t \fBlibnet_cq_end_loop\fP (void)"
+.br
+.ti -1c
+.RI "LIBNET_API void \fBlibnet_diag_dump_context\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API void \fBlibnet_diag_dump_pblock\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API char * \fBlibnet_diag_dump_pblock_type\fP (uint8_t type)"
+.br
+.ti -1c
+.RI "void \fBlibnet_diag_dump_hex\fP (const uint8_t *packet, uint32_t len, int swap, FILE *stream)"
+.br
+.in -1c
+.SH "Detailed Description"
+.PP
+libnet exported function prototypes
+
+
+.SH "Function Documentation"
+.PP
+.SS "LIBNET_API char* libnet_addr2name4 (uint32_t in, uint8_t use_name)"
+Takes a network byte ordered IPv4 address and returns a pointer to either a canonical DNS name (if it has one) or a string of dotted decimals\&. This may incur a DNS lookup if the hostname and mode is set to LIBNET_RESOLVE\&. If mode is set to LIBNET_DONT_RESOLVE, no DNS lookup will be performed and the function will return a pointer to a dotted decimal string\&. The function cannot fail -- if no canonical name exists, it will fall back on returning a dotted decimal string\&. This function is non-reentrant\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIin\fP network byte ordered IPv4 address
+.br
+\fIuse_name\fP LIBNET_RESOLVE or LIBNET_DONT_RESOLVE
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+a pointer to presentation format string
+.RE
+.PP
+
+.SS "LIBNET_API void libnet_addr2name6_r (struct libnet_in6_addr addr, uint8_t use_name, char * host_name, int host_name_len)"
+Should document this baby right here\&.
+.SS "LIBNET_API int libnet_adv_cull_header (libnet_t * l, libnet_ptag_t ptag, uint8_t ** header, uint32_t * header_s)"
+[Advanced Interface] Pulls the header from the specified ptag from the given libnet context\&. This function is part of the advanced interface and is only available when libnet is initialized in advanced mode\&. If the function fails \fBlibnet_geterror()\fP can tell you why\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP the ptag referencing the header to pull
+.br
+\fIheader\fP will contain the header
+.br
+\fIheader_s\fP will contain the header size
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP on success
+.br
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_adv_cull_packet (libnet_t * l, uint8_t ** packet, uint32_t * packet_s)"
+[Advanced Interface] Yanks a prebuilt, wire-ready packet from the given libnet context\&. If libnet was configured to do so (which it is by default) the packet will have all checksums written in\&. This function is part of the advanced interface and is only available when libnet is initialized in advanced mode\&. It is important to note that the function performs an implicit malloc() and a corresponding call to \fBlibnet_adv_free_packet()\fP should be made to free the memory packet occupies\&. If the function fails \fBlibnet_geterror()\fP can tell you why\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIpacket\fP will contain the wire-ready packet
+.br
+\fIpacket_s\fP will contain the packet size
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP on success
+.br
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API void libnet_adv_free_packet (libnet_t * l, uint8_t * packet)"
+[Advanced Interface] Frees the memory allocated when \fBlibnet_adv_cull_packet()\fP is called\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIpacket\fP a pointer to the packet to free
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_adv_write_link (libnet_t * l, const uint8_t * packet, uint32_t packet_s)"
+[Advanced Interface] Writes a packet the network at the link layer\&. This function is useful to write a packet that has been constructed by hand by the application programmer or, more commonly, to write a packet that has been returned by a call to \fBlibnet_adv_cull_packet()\fP\&. This function is part of the advanced interface and is only available when libnet is initialized in advanced mode\&. If the function fails \fBlibnet_geterror()\fP can tell you why\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIpacket\fP a pointer to the packet to inject
+.br
+\fIpacket_s\fP the size of the packet
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the number of bytes written
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_adv_write_raw_ipv4 (libnet_t * l, const uint8_t * packet, uint32_t packet_s)"
+[Advanced Interface] Writes a packet the network at the raw socket layer\&. This function is useful to write a packet that has been constructed by hand by the application programmer or, more commonly, to write a packet that has been returned by a call to \fBlibnet_adv_cull_packet()\fP\&. This function is part of the advanced interface and is only available when libnet is initialized in advanced mode\&. If the function fails \fBlibnet_geterror()\fP can tell you why\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIpacket\fP a pointer to the packet to inject
+.br
+\fIpacket_s\fP the size of the packet
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the number of bytes written
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_autobuild_arp (uint16_t op, const uint8_t * sha, const uint8_t * spa, const uint8_t * tha, uint8_t * tpa, libnet_t * l)"
+Autouilds an Address Resolution Protocol (ARP) header\&. Depending on the op value, the function builds one of several different types of RFC 826 or RFC 903 RARP packets\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIop\fP ARP operation type
+.br
+\fIsha\fP sender's hardware address
+.br
+\fIspa\fP sender's protocol address
+.br
+\fItha\fP target hardware address
+.br
+\fItpa\fP targer protocol address
+.br
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_autobuild_ethernet (const uint8_t * dst, uint16_t type, libnet_t * l)"
+Autobuilds an Ethernet header\&. The RFC 894 Ethernet II header is almost identical to the IEEE 802\&.3 header, with the exception that the field immediately following the source address holds the layer 3 protocol (as opposed to frame's length)\&. You should only use this function when libnet is initialized with the LIBNET_LINK interface\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdst\fP destination ethernet address
+.br
+\fItype\fP upper layer protocol type
+.br
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_autobuild_fddi (uint8_t fc, const uint8_t * dst, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t * oui, uint16_t type, libnet_t * l)"
+Autobuilds a Fiber Distributed Data Interface (FDDI) header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIfc\fP class format and priority
+.br
+\fIdst\fP destination fddi address
+.br
+\fIdsap\fP destination service access point
+.br
+\fIssap\fP source service access point
+.br
+\fIcf\fP cf
+.br
+\fIoui\fP IEEE organizational code
+.br
+\fItype\fP upper layer protocol
+.br
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_autobuild_ipv4 (uint16_t len, uint8_t prot, uint32_t dst, libnet_t * l)"
+Autobuilds a version 4 Internet Protocol (IP) header\&. The function is useful to build an IP header quickly when you do not need a granular level of control\&. The function takes the same len, prot, and dst arguments as \fBlibnet_build_ipv4()\fP\&. The function does not accept a ptag argument, but it does return a ptag\&. In other words, you can use it to build a new IP header but not to modify an existing one\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIlen\fP total length of the IP packet including all subsequent data
+.br
+\fIprot\fP upper layer protocol
+.br
+\fIdst\fP destination IPv4 address (little endian)
+.br
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_autobuild_ipv6 (uint16_t len, uint8_t nh, struct libnet_in6_addr dst, libnet_t * l, libnet_ptag_t ptag)"
+Autobuilds a version 6 RFC 2460 Internet Protocol (IP) header\&. The function is useful to build an IP header quickly when you do not need a granular level of control\&. The function takes the same len, nh, and dst arguments as \fBlibnet_build_ipv4()\fP\&. The function does not accept a ptag argument, but it does return a ptag\&. In other words, you can use it to build a new IP header but not to modify an existing one\&. This function requires \fBlibnet_get_ipaddr6()\fP, which is not yet implemented for Win32 platforms\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIlen\fP length
+.br
+\fInh\fP next header
+.br
+\fIdst\fP destination IPv6 address
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_autobuild_link (const uint8_t * dst, const uint8_t * oui, uint16_t type, libnet_t * l)"
+Automatically builds a link layer header for an initialized l\&. The function determines the proper link layer header format from how l was initialized\&. The function current supports Ethernet and Token Ring link layers\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdst\fP the destination MAC address
+.br
+\fIoui\fP Organizationally Unique Identifier (unused for Ethernet)
+.br
+\fItype\fP the upper layer protocol type
+.br
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_autobuild_token_ring (uint8_t ac, uint8_t fc, const uint8_t * dst, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t * oui, uint16_t type, libnet_t * l)"
+Auto-builds a token ring header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIac\fP access control
+.br
+\fIfc\fP frame control
+.br
+\fIdst\fP destination address
+.br
+\fIdsap\fP destination service access point
+.br
+\fIssap\fP source service access point
+.br
+\fIcf\fP control field
+.br
+\fIoui\fP Organizationally Unique Identifier
+.br
+\fItype\fP upper layer protocol type
+.br
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_802_1q (const uint8_t * dst, const uint8_t * src, uint16_t tpi, uint8_t priority, uint8_t cfi, uint16_t vlan_id, uint16_t len_proto, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.SH "Packet Builder Functions"
+.PP
+The core of libnet is the platform-independent packet-building functionality\&. These functions enable an application programmer to build protocol headers (and data) in a simple and consistent manner without having to worry (too much) about low-level network odds and ends\&. Each libnet_build() function builds a piece of a packet (generally a protocol header)\&. While it is perfectly possible to build an entire, ready-to-transmit packet with a single call to a libnet_build() function, generally more than one builder-class function call is required to construct a full packet\&. A complete wire-ready packet generally consists of more than one piece\&. Every function that builds a protocol header takes a series of arguments roughly corresponding to the header values as they appear on the wire\&. This process is intuitive but often makes for functions with huge prototypes and large stack frames\&. One important thing to note is that you must call these functions in order, corresponding to how they should appear on the wire (from the highest protocol layer on down)\&. This building process is intuitive; it approximates what happens in an operating system kernel\&. In other words, to build a Network Time Protocol (NTP) packet by using the link-layer interface, the application programmer would call the libnet_build() functions in the following order:
+.IP "1." 4
+\fBlibnet_build_ntp()\fP
+.IP "2." 4
+\fBlibnet_build_udp()\fP
+.IP "3." 4
+\fBlibnet_build_ipv4()\fP
+.IP "4." 4
+\fBlibnet_build_ethernet()\fP This ordering is essential for libnet 1\&.1\&.x to properly link together the packet internally (previous libnet versions did not have the requirement)\&.
+.PP
+.SS "The Payload Interface"
+The payload interface specifies an optional way to include data directly after the protocol header in question\&. You can use this function for a variety of purposes, including the following:
+.IP "\(bu" 2
+Including additional or arbitrary protocol header information that is not available from a libnet interface
+.IP "\(bu" 2
+Including a packet payload (data segment)
+.IP "\(bu" 2
+Building another protocol header that is not available from a libnet interface To employ the interface, the application programmer should construct the i payload data and pass a const uint8_t * to this data and its size to the desired libnet_build() function\&. Libnet handles the rest\&.
+.PP
+.PP
+It is important to note that some functions (notably the IPv6 builders) do use the payload interface to specify variable length but ostensibly non-optional data\&. See the individual libnet_build_ipv6*() functions for more information\&.
+.SS "Protocol Tags and Packet Builder Return Values"
+Libnet uses the protocol tag (ptag) to identify individual pieces of a packet after being created\&. A new ptag results every time a libnet_build() function with an empty (0) ptag argument completes successfully\&. This new ptag now refers to the packet piece just created\&. The application programmer's responsibility is to save this value if he or she plans to modify this particular portion later on in the program\&. If the application programmer needs to modify some portion of that particular packet piece again, he or she calls the same libnet_build() function specifying the saved ptag argument\&. Libnet then searches for that packet piece and modifies it rather than creating a new one\&. Upon failure for any reason, libnet_build() functions return -1; \fBlibnet_geterror()\fP tells you why\&. Builds an IEEE 802\&.1q VLAN tagging header\&. Depending on the value of len_proto, the function wraps the 802\&.1q header inside either an IEEE 802\&.3 header or an RFC 894 Ethernet II (DIX) header (both resulting in an 18-byte frame)\&. If len is 1500 or less, most receiving protocol stacks parse the frame as an IEEE 802\&.3 encapsulated frame\&. If len is one of the Ethernet type values, most protocol stacks parse the frame as an RFC 894 Ethernet II encapsulated frame\&. Note the length value is calculated without the 802\&.1q header of 18 bytes\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdst\fP pointer to a six byte source ethernet address
+.br
+\fIsrc\fP pointer to a six byte destination ethernet address
+.br
+\fItpi\fP tag protocol identifier
+.br
+\fIpriority\fP priority
+.br
+\fIcfi\fP canonical format indicator
+.br
+\fIvlan_id\fP vlan identifier
+.br
+\fIlen_proto\fP length (802\&.3) protocol (Ethernet II)
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_802_1x (uint8_t eap_ver, uint8_t eap_type, uint16_t length, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IEEE 802\&.1x extended authentication protocol header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIeap_ver\fP the EAP version
+.br
+\fIeap_type\fP the EAP type
+.br
+\fIlength\fP frame length
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_802_2 (uint8_t dsap, uint8_t ssap, uint8_t control, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IEEE 802\&.2 LLC header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdsap\fP destination service access point
+.br
+\fIssap\fP source service access point
+.br
+\fIcontrol\fP control field
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_802_2snap (uint8_t dsap, uint8_t ssap, uint8_t control, uint8_t * oui, uint16_t type, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IEEE 802\&.2 LLC SNAP header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdsap\fP destination service access point
+.br
+\fIssap\fP source service access point
+.br
+\fIcontrol\fP control field
+.br
+\fIoui\fP Organizationally Unique Identifier
+.br
+\fItype\fP upper layer protocol
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_802_3 (const uint8_t * dst, const uint8_t * src, uint16_t len, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IEEE 802\&.3 header\&. The 802\&.3 header is almost identical to the RFC 894 Ethernet II header, the exception being that the field immediately following the source address holds the frame's length (as opposed to the layer 3 protocol)\&. You should only use this function when libnet is initialized with the LIBNET_LINK interface\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdst\fP destination ethernet address
+.br
+\fIsrc\fP source ethernet address
+.br
+\fIlen\fP frame length sans header
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_arp (uint16_t hrd, uint16_t pro, uint8_t hln, uint8_t pln, uint16_t op, const uint8_t * sha, const uint8_t * spa, const uint8_t * tha, const uint8_t * tpa, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an Address Resolution Protocol (ARP) header\&. Depending on the op value, the function builds one of several different types of RFC 826 or RFC 903 RARP packets\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIhrd\fP hardware address format
+.br
+\fIpro\fP protocol address format
+.br
+\fIhln\fP hardware address length
+.br
+\fIpln\fP protocol address length
+.br
+\fIop\fP ARP operation type
+.br
+\fIsha\fP sender's hardware address
+.br
+\fIspa\fP sender's protocol address
+.br
+\fItha\fP target hardware address
+.br
+\fItpa\fP targer protocol address
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_bgp4_header (uint8_t marker[LIBNET_BGP4_MARKER_SIZE], uint16_t len, uint8_t type, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+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
+\fImarker\fP a value the receiver can predict (if the message type is not BGP OPEN, or no authentication is used, these 16 bytes are normally set as all ones)
+.br
+\fIlen\fP total length of the BGP message, including the header
+.br
+\fItype\fP type code of the message (OPEN, UPDATE, NOTIFICATION or KEEPALIVE)
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_bgp4_notification (uint8_t err_code, uint8_t err_subcode, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 1771 Border Gateway Protocol 4 (BGP-4) notification header\&. A NOTIFICATION message is sent when an error condition is detected\&. Specific error information may be passed through the payload interface\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIerr_code\fP type of notification
+.br
+\fIerr_subcode\fP more specific information about the reported error\&.
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_bgp4_open (uint8_t version, uint16_t src_as, uint16_t hold_time, uint32_t bgp_id, uint8_t opt_len, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 1771 Border Gateway Protocol 4 (BGP-4) OPEN header\&. This is the first message sent by each side of a BGP connection\&. The optional parameters options should be constructed using the payload interface (see RFC 1771 for the options structures)\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIversion\fP protocol version (should be set to 4)
+.br
+\fIsrc_as\fP Autonomous System of the sender
+.br
+\fIhold_time\fP used to compute the maximum allowed time between the receipt of KEEPALIVE, and/or UPDATE messages by the sender
+.br
+\fIbgp_id\fP BGP identifier of the sender
+.br
+\fIopt_len\fP total length of the optional parameters field in bytes
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_bgp4_update (uint16_t unfeasible_rt_len, const uint8_t * withdrawn_rt, uint16_t total_path_attr_len, const uint8_t * path_attributes, uint16_t info_len, uint8_t * reachability_info, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 1771 Border Gateway Protocol 4 (BGP-4) update header\&. Update messages are used to transfer routing information between BGP peers\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIunfeasible_rt_len\fP indicates the length of the (next) 'withdrawn routes' field in bytes
+.br
+\fIwithdrawn_rt\fP list of IP addresses prefixes for the routes that are being withdrawn; each IP address prefix is built as a 2-tuple <length (1 byte), prefix (variable)>
+.br
+\fItotal_path_attr_len\fP indicates the length of the (next) 'path attributes' field in bytes
+.br
+\fIpath_attributes\fP each attribute is a 3-tuple <type (2 bytes), length, value>
+.br
+\fIinfo_len\fP indicates the length of the (next) 'network layer reachability information' field in bytes (needed for internal memory size calculation)
+.br
+\fIreachability_info\fP 2-tuples <length (1 byte), prefix (variable)>\&.
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_bootpv4 (uint8_t opcode, uint8_t htype, uint8_t hlen, uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags, uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip, const uint8_t * chaddr, const char * sname, const char * file, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fIopcode\fP
+.br
+\fIhtype\fP
+.br
+\fIhlen\fP
+.br
+\fIhopcount\fP
+.br
+\fIxid\fP
+.br
+\fIsecs\fP
+.br
+\fIflags\fP
+.br
+\fIcip\fP
+.br
+\fIyip\fP
+.br
+\fIsip\fP
+.br
+\fIgip\fP
+.br
+\fIchaddr\fP client hardware address, length is hlen
+.br
+\fIsname\fP server host name, a null terminated string
+.br
+\fIfile\fP boot file name, a null terminated string
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_cdp (uint8_t version, uint8_t ttl, uint16_t sum, uint16_t type, uint16_t value_s, const uint8_t * value, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a Cisco Discovery Protocol (CDP) header\&. Cisco Systems designed CDP to aid in the network management of adjacent Cisco devices\&. The CDP protocol specifies data by using a type/length/value (TLV) setup\&. The first TLV can specified by using the functions type, length, and value arguments\&. To specify additional TLVs, the programmer could either use the payload interface or \fBlibnet_build_data()\fP to construct them\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIversion\fP CDP version
+.br
+\fIttl\fP time to live (time information should be cached by recipient)
+.br
+\fIsum\fP checksum (0 for libnet to auto-fill)
+.br
+\fItype\fP type of data contained in value
+.br
+\fIvalue_s\fP length of value argument
+.br
+\fIvalue\fP the CDP information string
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_data (const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a generic libnet protocol header\&. This is useful for including an optional payload to a packet that might need to change repeatedly inside of a loop\&. This won't work for TCP or IP payload, they have special types (this is probably a bug)\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_dhcpv4 (uint8_t opcode, uint8_t htype, uint8_t hlen, uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags, uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip, const uint8_t * chaddr, const char * sname, const char * file, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fIopcode\fP
+.br
+\fIhtype\fP
+.br
+\fIhlen\fP
+.br
+\fIhopcount\fP
+.br
+\fIxid\fP
+.br
+\fIsecs\fP
+.br
+\fIflags\fP
+.br
+\fIcip\fP
+.br
+\fIyip\fP
+.br
+\fIsip\fP
+.br
+\fIgip\fP
+.br
+\fIchaddr\fP client hardware address, length is hlen
+.br
+\fIsname\fP server host name, a null terminated string
+.br
+\fIfile\fP boot file name, a null terminated string
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_dnsv4 (uint16_t h_len, uint16_t id, uint16_t flags, uint16_t num_q, uint16_t num_anws_rr, uint16_t num_auth_rr, uint16_t num_addi_rr, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 1035 version 4 DNS header\&. Additional DNS payload information should be specified using the payload interface\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIh_len\fP
+.br
+\fIid\fP DNS packet id
+.br
+\fIflags\fP control flags
+.br
+\fInum_q\fP number of questions
+.br
+\fInum_anws_rr\fP number of answer resource records
+.br
+\fInum_auth_rr\fP number of authority resource records
+.br
+\fInum_addi_rr\fP number of additional resource records
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_egre (uint16_t fv, uint16_t type, uint16_t sum, uint16_t offset, uint32_t key, uint32_t seq, uint16_t len, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+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
+\fIfv\fP the 16 0 to 7: which fields are included in the header (checksum, seq\&. number, key, \&.\&.\&.), bits 8 to 12: flag, bits 13 to 15: version\&.
+.br
+\fItype\fP which protocol is encapsulated (PPP, IP, \&.\&.\&.)
+.br
+\fIsum\fP checksum (0 for libnet to auto-fill)\&.
+.br
+\fIoffset\fP byte offset from the start of the routing field to the first byte of the SRE
+.br
+\fIkey\fP inserted by the encapsulator to authenticate the source
+.br
+\fIseq\fP sequence number used by the receiver to sort the packets
+.br
+\fIlen\fP size of the GRE packet
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ethernet (const uint8_t * dst, const uint8_t * src, uint16_t type, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an Ethernet header\&. The RFC 894 Ethernet II header is almost identical to the IEEE 802\&.3 header, with the exception that the field immediately following the source address holds the layer 3 protocol (as opposed to frame's length)\&. You should only use this function when libnet is initialized with the LIBNET_LINK interface\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdst\fP destination ethernet address
+.br
+\fIsrc\fP source ethernet address
+.br
+\fItype\fP upper layer protocol type
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_fddi (uint8_t fc, const uint8_t * dst, const uint8_t * src, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t * oui, uint16_t type, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a Fiber Distributed Data Interface (FDDI) header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIfc\fP class format and priority
+.br
+\fIdst\fP destination fddi address
+.br
+\fIsrc\fP source fddi address
+.br
+\fIdsap\fP destination service access point
+.br
+\fIssap\fP source service access point
+.br
+\fIcf\fP cf
+.br
+\fIoui\fP 3 byte IEEE organizational code
+.br
+\fItype\fP upper layer protocol
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_gre (uint16_t fv, uint16_t type, uint16_t sum, uint16_t offset, uint32_t key, uint32_t seq, uint16_t len, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+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
+\fIfv\fP the 16 0 to 7: which fields are included in the header (checksum, seq\&. number, key, \&.\&.\&.), bits 8 to 12: flag, bits 13 to 15: version\&.
+.br
+\fItype\fP which protocol is encapsulated (PPP, IP, \&.\&.\&.)
+.br
+\fIsum\fP checksum (0 for libnet to auto-fill)\&.
+.br
+\fIoffset\fP byte offset from the start of the routing field to the first byte of the SRE
+.br
+\fIkey\fP inserted by the encapsulator to authenticate the source
+.br
+\fIseq\fP sequence number used by the receiver to sort the packets
+.br
+\fIlen\fP size of the GRE packet
+.br
+\fIpayload\fP
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_gre_last_sre (libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_gre_sre (uint16_t af, uint8_t offset, uint8_t length, uint8_t * routing, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fIaf\fP
+.br
+\fIoffset\fP
+.br
+\fIlength\fP
+.br
+\fIrouting\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_hsrp (uint8_t version, uint8_t opcode, uint8_t state, uint8_t hello_time, uint8_t hold_time, uint8_t priority, uint8_t group, uint8_t reserved, uint8_t authdata[HSRP_AUTHDATA_LENGTH], uint32_t virtual_ip, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a HSRP header\&. HSRP is a Cisco proprietary protocol defined in RFC 2281
+.PP
+\fBParameters:\fP
+.RS 4
+\fIversion\fP version of the HSRP messages
+.br
+\fIopcode\fP type of message
+.br
+\fIstate\fP current state of the router
+.br
+\fIhello_time\fP period in seconds between hello messages
+.br
+\fIhold_time\fP seconds that the current hello message is valid
+.br
+\fIpriority\fP priority for the election process
+.br
+\fIgroup\fP standby group
+.br
+\fIreserved\fP reserved field
+.br
+\fIauthdata\fP password
+.br
+\fIvirtual_ip\fP virtual ip address
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv4_echo (uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IP version 4 RFC 792 Internet Control Message Protocol (ICMP) echo request/reply header
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP type of ICMP packet (should be ICMP_ECHOREPLY or ICMP_ECHO)
+.br
+\fIcode\fP code of ICMP packet (should be 0)
+.br
+\fIsum\fP checksum (0 for libnet to auto-fill)
+.br
+\fIid\fP identification number
+.br
+\fIseq\fP packet sequence number
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv4_mask (uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint32_t mask, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IP version 4 RFC 792 Internet Control Message Protocol (ICMP) IP netmask request/reply header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP type of ICMP packet (should be ICMP_MASKREQ or ICMP_MASKREPLY)
+.br
+\fIcode\fP code of ICMP packet (should be 0)
+.br
+\fIsum\fP checksum (0 for libnet to auto-fill)
+.br
+\fIid\fP identification number
+.br
+\fIseq\fP packet sequence number
+.br
+\fImask\fP subnet mask
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv4_redirect (uint8_t type, uint8_t code, uint16_t sum, uint32_t gateway, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IP version 4 RFC 792 Internet Message Control Protocol (ICMP) redirect header\&. The IP header that caused the error message should be built by a previous call to \fBlibnet_build_ipv4()\fP\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP type of ICMP packet (should be ICMP_REDIRECT)
+.br
+\fIcode\fP code of ICMP packet (should be one of the four redirect codes)
+.br
+\fIsum\fP checksum (0 for libnet to auto-fill)
+.br
+\fIgateway\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv4_timeexceed (uint8_t type, uint8_t code, uint16_t sum, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IP version 4 RFC 792 Internet Control Message Protocol (ICMP) time exceeded header\&. The IP header that caused the error message should be built by a previous call to \fBlibnet_build_ipv4()\fP\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP type of ICMP packet (should be ICMP_TIMXCEED)
+.br
+\fIcode\fP code of ICMP packet (ICMP_TIMXCEED_INTRANS / ICMP_TIMXCEED_REASS)
+.br
+\fIsum\fP checksum (0 for libnet to auto-fill)
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv4_timestamp (uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint32_t otime, uint32_t rtime, uint32_t ttime, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IP version 4 RFC 792 Internet Control Message Protocol (ICMP) timestamp request/reply header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP type of ICMP packet (should be ICMP_TSTAMP or ICMP_TSTAMPREPLY)
+.br
+\fIcode\fP code of ICMP packet (should be 0)
+.br
+\fIsum\fP checksum (0 for libnet to auto-fill)
+.br
+\fIid\fP identification number
+.br
+\fIseq\fP sequence number
+.br
+\fIotime\fP originate timestamp
+.br
+\fIrtime\fP receive timestamp
+.br
+\fIttime\fP transmit timestamp
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv4_unreach (uint8_t type, uint8_t code, uint16_t sum, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IP version 4 RFC 792 Internet Control Message Protocol (ICMP) unreachable header\&. The IP header that caused the error message should be built by a previous call to \fBlibnet_build_ipv4()\fP\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP type of ICMP packet (should be ICMP_UNREACH)
+.br
+\fIcode\fP code of ICMP packet (should be one of the 16 unreachable codes)
+.br
+\fIsum\fP checksum (0 for libnet to auto-fill)
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv6_echo (uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IP version 6 RFC 4443 Internet Control Message Protocol (ICMP) echo or echo reply header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP type of ICMP packet (should be ICMP6_ECHO_REQUEST or ICMP6_ECHO_REPLY)
+.br
+\fIcode\fP code of ICMP packet (should be zero)
+.br
+\fIsum\fP checksum (0 for libnet to auto-fill)
+.br
+\fIid\fP echo id number
+.br
+\fIseq\fP echo sequence number
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv6_ndp_nadv (uint8_t type, uint8_t code, uint16_t sum, uint32_t flags, struct libnet_in6_addr target, uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IP version 6 RFC 2461 Internet Control Message Protocol (ICMP) NDP neighbour advertisement header\&. Could be used with \fBlibnet_build_icmpv6_ndp_opt()\fP and ND_OPT_TARGET_LINKADDR\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP type of ICMP packet (should be ND_NEIGHBOR_ADVERT)
+.br
+\fIcode\fP code of ICMP packet (should be zero)
+.br
+\fIsum\fP checksum (0 for libnet to auto-fill)
+.br
+\fIflags\fP should be a bitwise or of any applicable ND_NA_FLAG_* flags
+.br
+\fItarget\fP target ipv6 address
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv6_ndp_nsol (uint8_t type, uint8_t code, uint16_t sum, struct libnet_in6_addr target, uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IP version 6 RFC 2461 Internet Control Message Protocol (ICMP) NDP neighbour solicitation header\&. Could be used with \fBlibnet_build_icmpv6_ndp_opt()\fP and ICMPV6_NDP_OPT_SLLA\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP type of ICMP packet (should be ND_NEIGHBOR_SOLICIT)
+.br
+\fIcode\fP code of ICMP packet (should be zero)
+.br
+\fIsum\fP checksum (0 for libnet to auto-fill)
+.br
+\fItarget\fP target ipv6 address
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv6_ndp_opt (uint8_t type, uint8_t * option, uint32_t option_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds ICMPv6 NDP options\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP one of ND_OPT_* types
+.br
+\fIoption\fP option data
+.br
+\fIoption_s\fP size of option data (will be padded out to an 8-byte boundary)
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv6_unreach (uint8_t type, uint8_t code, uint16_t sum, uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IP version 6 RFC 4443 Internet Control Message Protocol (ICMP) unreachable header\&. The IP header that caused the error message should be built by a previous call to \fBlibnet_build_ipv6()\fP\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP type of ICMP packet (should be ICMP6_DST_UNREACH)
+.br
+\fIcode\fP code of ICMP packet (should be one of the 5 ICMP6_DST_UNREACH_* codes)
+.br
+\fIsum\fP checksum (0 for libnet to auto-fill)
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_igmp (uint8_t type, uint8_t reserved, uint16_t sum, uint32_t ip, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 1112 Internet Group Membership Protocol (IGMP) header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP packet type
+.br
+\fIreserved\fP (should be 0 for IGMPv1)
+.br
+\fIsum\fP checksum (0 for libnet to auto-fill)
+.br
+\fIip\fP IPv4 address (in standard/network byte order)
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+\fBNote:\fP
+.RS 4
+'reserved' was previously called 'code', which it is not, in any IGMP version\&.
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ipsec_ah (uint8_t nh, uint8_t len, uint16_t res, uint32_t spi, uint32_t seq, uint32_t auth, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an Internet Protocol Security Authentication header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fInh\fP next header
+.br
+\fIlen\fP payload length
+.br
+\fIres\fP reserved
+.br
+\fIspi\fP security parameter index
+.br
+\fIseq\fP sequence number
+.br
+\fIauth\fP authentication data
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ipsec_esp_ftr (uint8_t len, uint8_t nh, int8_t * auth, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an Internet Protocol Security Encapsulating Security Payload footer\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIlen\fP padding length
+.br
+\fInh\fP next header
+.br
+\fIauth\fP authentication data
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ipsec_esp_hdr (uint32_t spi, uint32_t seq, uint32_t iv, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an Internet Protocol Security Encapsulating Security Payload header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIspi\fP security parameter index
+.br
+\fIseq\fP ESP sequence number
+.br
+\fIiv\fP initialization vector
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ipv4 (uint16_t ip_len, uint8_t tos, uint16_t id, uint16_t frag, uint8_t ttl, uint8_t prot, uint16_t sum, uint32_t src, uint32_t dst, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a version 4 RFC 791 Internet Protocol (IP) header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIip_len\fP total length of the IP packet including all subsequent data (subsequent data includes any IP options and IP options padding)
+.br
+\fItos\fP type of service bits
+.br
+\fIid\fP IP identification number
+.br
+\fIfrag\fP fragmentation bits and offset
+.br
+\fIttl\fP time to live in the network
+.br
+\fIprot\fP upper layer protocol
+.br
+\fIsum\fP checksum (0 for libnet to auto-fill)
+.br
+\fIsrc\fP source IPv4 address (little endian)
+.br
+\fIdst\fP destination IPv4 address (little endian)
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ipv4_options (const uint8_t * options, uint32_t options_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an version 4 Internet Protocol (IP) options header\&. The function expects options to be a valid IP options string of size options_s, no larger than 40 bytes (the maximum size of an options string)\&.
+.PP
+When building a chain, the options must be built, then the IPv4 header\&.
+.PP
+When updating a chain, if the block following the options is an IPv4 header, it's total length and header length will be updated if the options block size changes\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIoptions\fP byte string of IP options (it will be padded up to be an integral multiple of 32-bit words)\&.
+.br
+\fIoptions_s\fP length of options string
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ipv6 (uint8_t tc, uint32_t fl, uint16_t len, uint8_t nh, uint8_t hl, struct libnet_in6_addr src, struct libnet_in6_addr dst, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a version 6 RFC 2460 Internet Protocol (IP) header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItc\fP traffic class
+.br
+\fIfl\fP flow label
+.br
+\fIlen\fP total length of the IP packet
+.br
+\fInh\fP next header
+.br
+\fIhl\fP hop limit
+.br
+\fIsrc\fP source IPv6 address
+.br
+\fIdst\fP destination IPv6 address
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ipv6_destopts (uint8_t nh, uint8_t len, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a version 6 RFC 2460 Internet Protocol (IP) destination options header\&. This function is special in that it uses the payload interface to include the options data\&. The application programmer will build an IPv6 options byte string and pass it to the function using the payload interface\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fInh\fP next header
+.br
+\fIlen\fP length of the header in 8-byte octets not including the first 8 octets
+.br
+\fIpayload\fP options payload
+.br
+\fIpayload_s\fP payload length
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ipv6_frag (uint8_t nh, uint8_t reserved, uint16_t frag, uint32_t id, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a version 6 RFC 2460 Internet Protocol (IP) fragmentation header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fInh\fP next header
+.br
+\fIreserved\fP unused value\&.\&.\&. OR IS IT!
+.br
+\fIfrag\fP fragmentation bits (ala ipv4)
+.br
+\fIid\fP packet identification
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ipv6_hbhopts (uint8_t nh, uint8_t len, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a version 6 RFC 2460 Internet Protocol (IP) hop by hop options header\&. This function is special in that it uses the payload interface to include the options data\&. The application programmer will build an IPv6 hop by hop options byte string and pass it to the function using the payload interface\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fInh\fP next header
+.br
+\fIlen\fP length of the header in 8-byte octets not including the first 8 octets
+.br
+\fIpayload\fP options payload
+.br
+\fIpayload_s\fP payload length
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ipv6_routing (uint8_t nh, uint8_t len, uint8_t rtype, uint8_t segments, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a version 6 RFC 2460 Internet Protocol (IP) routing header\&. This function is special in that it uses the payload interface to include the 'type-specific data'; that is the routing information\&. Most often this will be a number of 128-bit IPv6 addresses\&. The application programmer will build a byte string of IPv6 address and pass them to the function using the payload interface\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fInh\fP next header
+.br
+\fIlen\fP length of the header in 8-byte octets not including the first 8 octets
+.br
+\fIrtype\fP routing header type
+.br
+\fIsegments\fP number of routing segments that follow
+.br
+\fIpayload\fP optional payload of routing information
+.br
+\fIpayload_s\fP payload length
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_isl (uint8_t * dhost, uint8_t type, uint8_t user, uint8_t * shost, uint16_t len, const uint8_t * snap, uint16_t vid, uint16_t portindex, uint16_t reserved, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a Cisco Inter-Switch Link (ISL) header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdhost\fP destination address (should be 01:00:0c:00:00)
+.br
+\fItype\fP type of frame
+.br
+\fIuser\fP user defined data
+.br
+\fIshost\fP source mac address
+.br
+\fIlen\fP total length of the encapsulated packet less 18 bytes
+.br
+\fIsnap\fP SNAP information (0xaaaa03 + vendor code)
+.br
+\fIvid\fP 15 bit VLAN ID, 1 bit BPDU or CDP indicator
+.br
+\fIportindex\fP port index
+.br
+\fIreserved\fP used for FDDI and token ring
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_link (const uint8_t * dst, const uint8_t * src, const uint8_t * oui, uint16_t type, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a link layer header for an initialized l\&. The function determines the proper link layer header format from how l was initialized\&. The function current supports Ethernet and Token Ring link layers\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdst\fP the destination MAC address
+.br
+\fIsrc\fP the source MAC address
+.br
+\fIoui\fP Organizationally Unique Identifier (unused for Ethernet)
+.br
+\fItype\fP the upper layer protocol type
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_mpls (uint32_t label, uint8_t experimental, uint8_t bos, uint8_t ttl, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 3032 Multi-Protocol Label Switching (MPLS) header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIlabel\fP 20-bit label value
+.br
+\fIexperimental\fP 3-bit reserved field
+.br
+\fIbos\fP 1-bit bottom of stack identifier
+.br
+\fIttl\fP time to live
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ntp (uint8_t leap_indicator, uint8_t version, uint8_t mode, uint8_t stratum, uint8_t poll, uint8_t precision, uint16_t delay_int, uint16_t delay_frac, uint16_t dispersion_int, uint16_t dispersion_frac, uint32_t reference_id, uint32_t ref_ts_int, uint32_t ref_ts_frac, uint32_t orig_ts_int, uint32_t orig_ts_frac, uint32_t rec_ts_int, uint32_t rec_ts_frac, uint32_t xmt_ts_int, uint32_t xmt_ts_frac, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 958 Network Time Protocol (NTP) header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIleap_indicator\fP the leap indicator
+.br
+\fIversion\fP NTP protocol version
+.br
+\fImode\fP NTP mode
+.br
+\fIstratum\fP stratum
+.br
+\fIpoll\fP polling interval
+.br
+\fIprecision\fP precision
+.br
+\fIdelay_int\fP delay interval
+.br
+\fIdelay_frac\fP delay fraction
+.br
+\fIdispersion_int\fP dispersion interval
+.br
+\fIdispersion_frac\fP dispersion fraction
+.br
+\fIreference_id\fP reference id
+.br
+\fIref_ts_int\fP reference timestamp integer
+.br
+\fIref_ts_frac\fP reference timestamp fraction
+.br
+\fIorig_ts_int\fP original timestamp integer
+.br
+\fIorig_ts_frac\fP original timestamp fraction
+.br
+\fIrec_ts_int\fP receiver timestamp integer
+.br
+\fIrec_ts_frac\fP receiver timestamp fraction
+.br
+\fIxmt_ts_int\fP transmit timestamp integer
+.br
+\fIxmt_ts_frac\fP transmit timestamp integer
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ospfv2 (uint16_t len, uint8_t type, uint32_t rtr_id, uint32_t area_id, uint16_t sum, uint16_t autype, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fIlen\fP
+.br
+\fItype\fP
+.br
+\fIrtr_id\fP
+.br
+\fIarea_id\fP
+.br
+\fIsum\fP
+.br
+\fIautype\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ospfv2_dbd (uint16_t dgram_len, uint8_t opts, uint8_t type, uint32_t seqnum, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdgram_len\fP
+.br
+\fIopts\fP
+.br
+\fItype\fP
+.br
+\fIseqnum\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ospfv2_hello (uint32_t netmask, uint16_t interval, uint8_t opts, uint8_t priority, uint32_t dead_int, uint32_t des_rtr, uint32_t bkup_rtr, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fInetmask\fP
+.br
+\fIinterval\fP
+.br
+\fIopts\fP
+.br
+\fIpriority\fP
+.br
+\fIdead_int\fP
+.br
+\fIdes_rtr\fP
+.br
+\fIbkup_rtr\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa (uint16_t age, uint8_t opts, uint8_t type, uint32_t lsid, uint32_t advrtr, uint32_t seqnum, uint16_t sum, uint16_t len, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fIage\fP
+.br
+\fIopts\fP
+.br
+\fItype\fP
+.br
+\fIlsid\fP
+.br
+\fIadvrtr\fP
+.br
+\fIseqnum\fP
+.br
+\fIsum\fP
+.br
+\fIlen\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa_as (uint32_t nmask, uint32_t metric, uint32_t fwdaddr, uint32_t tag, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fInmask\fP
+.br
+\fImetric\fP
+.br
+\fIfwdaddr\fP
+.br
+\fItag\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa_net (uint32_t nmask, uint32_t rtrid, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fInmask\fP
+.br
+\fIrtrid\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa_rtr (uint16_t flags, uint16_t num, uint32_t id, uint32_t data, uint8_t type, uint8_t tos, uint16_t metric, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fIflags\fP
+.br
+\fInum\fP
+.br
+\fIid\fP
+.br
+\fIdata\fP
+.br
+\fItype\fP
+.br
+\fItos\fP
+.br
+\fImetric\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa_sum (uint32_t nmask, uint32_t metric, uint32_t tos, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fInmask\fP
+.br
+\fImetric\fP
+.br
+\fItos\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsr (uint32_t type, uint32_t lsid, uint32_t advrtr, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP
+.br
+\fIlsid\fP
+.br
+\fIadvrtr\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsu (uint32_t num, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fInum\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_rip (uint8_t cmd, uint8_t version, uint16_t rd, uint16_t af, uint16_t rt, uint32_t addr, uint32_t mask, uint32_t next_hop, uint32_t metric, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a Routing Information Protocol header (RFCs 1058 and 2453)\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIcmd\fP command
+.br
+\fIversion\fP protocol version
+.br
+\fIrd\fP version one: 0, version two: routing domain
+.br
+\fIaf\fP address family
+.br
+\fIrt\fP version one: 0, version two: route tag
+.br
+\fIaddr\fP IPv4 address
+.br
+\fImask\fP version one: 0, version two: subnet mask
+.br
+\fInext_hop\fP version one: 0, version two: next hop address
+.br
+\fImetric\fP routing metric
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_rpc_call (uint32_t rm, uint32_t xid, uint32_t prog_num, uint32_t prog_vers, uint32_t procedure, uint32_t cflavor, uint32_t clength, uint8_t * cdata, uint32_t vflavor, uint32_t vlength, const uint8_t * vdata, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an Remote Procedure Call (Version 2) Call message header as specified in RFC 1831\&. This builder provides the option for specifying the record marking which is required when used with streaming protocols (TCP)\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIrm\fP record marking indicating the position in a stream, 0 otherwise
+.br
+\fIxid\fP transaction identifier used to link calls and replies
+.br
+\fIprog_num\fP remote program specification typically between 0 - 1fffffff
+.br
+\fIprog_vers\fP remote program version specification
+.br
+\fIprocedure\fP procedure to be performed by remote program
+.br
+\fIcflavor\fP authentication credential type
+.br
+\fIclength\fP credential length (should be 0)
+.br
+\fIcdata\fP opaque credential data (currently unused)
+.br
+\fIvflavor\fP authentication verifier type
+.br
+\fIvlength\fP verifier length (should be 0)
+.br
+\fIvdata\fP opaque verifier data (currently unused)
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_sebek (uint32_t magic, uint16_t version, uint16_t type, uint32_t counter, uint32_t time_sec, uint32_t time_usec, uint32_t pid, uint32_t uid, uint32_t fd, uint8_t cmd[SEBEK_CMD_LENGTH], uint32_t length, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a Sebek header\&. The Sebek protocol was designed by the Honeynet Project as a transport mechanism for post-intrusion forensic data\&. More information may be found here: http://www.honeynet.org/papers/sebek.pdf\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fImagic\fP identify packets that should be hidden
+.br
+\fIversion\fP protocol version, currently 1
+.br
+\fItype\fP type of record (read data is type 0, write data is type 1)
+.br
+\fIcounter\fP PDU counter used to identify when packet are lost
+.br
+\fItime_sec\fP seconds since EPOCH according to the honeypot
+.br
+\fItime_usec\fP residual microseconds
+.br
+\fIpid\fP PID
+.br
+\fIuid\fP UID
+.br
+\fIfd\fP FD
+.br
+\fIcmd\fP 12 first characters of the command
+.br
+\fIlength\fP length in bytes of the PDU's body
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_stp_conf (uint16_t id, uint8_t version, uint8_t bpdu_type, uint8_t flags, const uint8_t * root_id, uint32_t root_pc, const uint8_t * bridge_id, uint16_t port_id, uint16_t message_age, uint16_t max_age, uint16_t hello_time, uint16_t f_delay, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IEEE 802\&.1d Spanning Tree Protocol (STP) configuration header\&. STP frames are usually encapsulated inside of an 802\&.2 + 802\&.3 frame combination\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIid\fP protocol id
+.br
+\fIversion\fP protocol version
+.br
+\fIbpdu_type\fP bridge protocol data unit type
+.br
+\fIflags\fP flags
+.br
+\fIroot_id\fP root id
+.br
+\fIroot_pc\fP root path cost
+.br
+\fIbridge_id\fP bridge id
+.br
+\fIport_id\fP port id
+.br
+\fImessage_age\fP message age
+.br
+\fImax_age\fP max age
+.br
+\fIhello_time\fP hello time
+.br
+\fIf_delay\fP forward delay
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_stp_tcn (uint16_t id, uint8_t version, uint8_t bpdu_type, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IEEE 802\&.1d Spanning Tree Protocol (STP) topology change notification header\&. STP frames are usually encapsulated inside of an 802\&.2 + 802\&.3 frame combination\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIid\fP protocol id
+.br
+\fIversion\fP protocol version
+.br
+\fIbpdu_type\fP bridge protocol data unit type
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_tcp (uint16_t sp, uint16_t dp, uint32_t seq, uint32_t ack, uint8_t control, uint16_t win, uint16_t sum, uint16_t urg, uint16_t len, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 793 Transmission Control Protocol (TCP) header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIsp\fP source port
+.br
+\fIdp\fP destination port
+.br
+\fIseq\fP sequence number
+.br
+\fIack\fP acknowledgement number
+.br
+\fIcontrol\fP control flags
+.br
+\fIwin\fP window size
+.br
+\fIsum\fP checksum (0 for libnet to auto-fill)
+.br
+\fIurg\fP urgent pointer
+.br
+\fIlen\fP total length of the TCP packet (for checksum calculation)
+.br
+\fIpayload\fP
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_tcp_options (const uint8_t * options, uint32_t options_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 793 Transmission Control Protocol (TCP) options header\&. The function expects options to be a valid TCP options string of size options_s, which is no larger than 40 bytes (the maximum size of an options string)\&. The function checks to ensure that the packet consists of a TCP header preceded by an IPv4 header, and that the addition of the options string would not result in a packet larger than 65,535 bytes (IPMAXPACKET)\&. The function counts up the number of 32-bit words in the options string and adjusts the TCP header length value as necessary\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIoptions\fP byte string of TCP options
+.br
+\fIoptions_s\fP length of options string
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_token_ring (uint8_t ac, uint8_t fc, const uint8_t * dst, const uint8_t * src, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t * oui, uint16_t type, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a token ring header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIac\fP access control
+.br
+\fIfc\fP frame control
+.br
+\fIdst\fP destination address
+.br
+\fIsrc\fP source address
+.br
+\fIdsap\fP destination service access point
+.br
+\fIssap\fP source service access point
+.br
+\fIcf\fP control field
+.br
+\fIoui\fP Organizationally Unique Identifier
+.br
+\fItype\fP upper layer protocol type
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_udp (uint16_t sp, uint16_t dp, uint16_t len, uint16_t sum, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 768 User Datagram Protocol (UDP) header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIsp\fP source port
+.br
+\fIdp\fP destination port
+.br
+\fIlen\fP total length of the UDP packet
+.br
+\fIsum\fP checksum (0 for libnet to auto-fill)
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_vrrp (uint8_t version, uint8_t type, uint8_t vrouter_id, uint8_t priority, uint8_t ip_count, uint8_t auth_type, uint8_t advert_int, uint16_t sum, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 2338 Virtual Router Redundacy Protool (VRRP) header\&. Use the payload interface to specify address and authentication information\&. To build a 'legal' packet, the destination IPv4 address should be the multicast * address 224\&.0\&.0\&.18, the IP TTL should be set to 255, and the IP protocol should be set to 112\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIversion\fP VRRP version (should be 2)
+.br
+\fItype\fP VRRP packet type (should be 1 -- ADVERTISEMENT)
+.br
+\fIvrouter_id\fP virtual router identification
+.br
+\fIpriority\fP priority (higher numbers indicate higher priority)
+.br
+\fIip_count\fP number of IPv4 addresses contained in this advertisement
+.br
+\fIauth_type\fP type of authentication (0, 1, 2 -- see RFC)
+.br
+\fIadvert_int\fP interval between advertisements
+.br
+\fIsum\fP checksum (0 for libnet to autofill)
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API void libnet_clear_packet (libnet_t * l)"
+Clears the current packet referenced and frees all pblocks\&. Should be called when the programmer want to send a completely new packet of a different type using the same context\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+
+.SS "int libnet_cq_add (libnet_t * l, char * label)"
+[Context Queue] Adds a new context to the libnet context queue\&. If no queue exists, this function will create the queue and add the specified libnet context as the first entry on the list\&. The functions checks to ensure niether l nor label are NULL, and that label doesn't refer to an existing context already in the queue\&. Additionally, l should refer to a libnet context previously initialized with a call to \fBlibnet_init()\fP\&. If the context queue in write locked, this function will fail\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIlabel\fP a canonical name given to recognize the new context, no longer than LIBNET_LABEL_SIZE
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP on success
+.br
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API void libnet_cq_destroy (void)"
+[Context Queue] Destroys the entire context queue, calling \fBlibnet_destroy()\fP on each member context\&.
+.SS "LIBNET_API uint32_t libnet_cq_end_loop (void)"
+[Context Queue]
+.SS "LIBNET_API libnet_t* libnet_cq_find_by_label (char * label)"
+[Context Queue] Locates a libnet context from the queue, indexed by a canonical label\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIlabel\fP canonical label of the libnet context to retrieve
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the expected libnet context
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fINULL\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API const char* libnet_cq_getlabel (libnet_t * l)"
+[Context Queue] Returns the canonical label associated with the context\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+pointer to the libnet context's label
+.RE
+.PP
+
+.SS "LIBNET_API libnet_t* libnet_cq_head (void)"
+[Context Queue] Intiailizes the interator interface and set a write lock on the entire queue\&. This function is intended to be called just prior to interating through the entire list of contexts (with the probable intent of inject a series of packets in rapid succession)\&. This function is often used as per the following:
+.PP
+for (l = \fBlibnet_cq_head()\fP; \fBlibnet_cq_last()\fP; l = \fBlibnet_cq_next()\fP) { \&.\&.\&. }
+.PP
+Much of the time, the application programmer will use the iterator as it is written above; as such, libnet provides a macro to do exactly that, \fBfor_each_context_in_cq(l)\fP\&. Warning: do not call the iterator more than once in a single loop\&.
+.PP
+\fBReturns:\fP
+.RS 4
+the head of the context queue
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_cq_last (void)"
+[Context Queue] Check whether the iterator is at the last context in the queue\&.
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP if at the end of the context queue
+.br
+\fI0\fP otherwise
+.RE
+.PP
+
+.SS "LIBNET_API libnet_t* libnet_cq_next (void)"
+[Context Queue] Get next context from the context queue\&.
+.PP
+\fBReturns:\fP
+.RS 4
+the next context from the context queue
+.RE
+.PP
+
+.SS "LIBNET_API libnet_t* libnet_cq_remove (libnet_t * l)"
+[Context Queue] Removes a specified context from the libnet context queue by specifying the libnet context pointer\&. Note the function will remove the specified context from the context queue and cleanup internal memory from the queue, it is up to the application programmer to free the returned libnet context with a call to \fBlibnet_destroy()\fP\&. Also, as it is not necessary to keep the libnet context pointer when initially adding it to the context queue, most application programmers will prefer to refer to entries on the context queue by canonical name and would use \fBlibnet_cq_remove_by_label()\fP\&. If the context queue is write locked, this function will fail\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the pointer to the removed libnet context
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fINULL\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API libnet_t* libnet_cq_remove_by_label (char * label)"
+[Context Queue] Removes a specified context from the libnet context queue by specifying the canonical name\&. Note the function will remove the specified context from the context queue and cleanup internal memory from the queue, it is up to the application programmer to free the returned libnet context with a call to \fBlibnet_destroy()\fP\&. If the context queue is write locked, this function will fail\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIlabel\fP canonical name of the context to remove
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the pointer to the removed libnet context
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fINULL\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API uint32_t libnet_cq_size (void)"
+[Context Queue] Function returns the number of libnet contexts that are in the queue\&.
+.PP
+\fBReturns:\fP
+.RS 4
+the number of libnet contexts currently in the queue
+.RE
+.PP
+
+.SS "LIBNET_API void libnet_destroy (libnet_t * l)"
+Shuts down the libnet session referenced by l\&. It closes the network interface and frees all internal memory structures associated with l\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+
+.SS "LIBNET_API void libnet_diag_dump_context (libnet_t * l)"
+[Diagnostic] Prints the contents of the given context\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+
+.SS "void libnet_diag_dump_hex (const uint8_t * packet, uint32_t len, int swap, FILE * stream)"
+[Diagnostic] Function prints the contents of the supplied buffer to the supplied stream pointer\&. Will swap endianness based disposition of mode variable\&. Useful to be used in conjunction with the advanced interface and a culled packet\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIpacket\fP the packet to print
+.br
+\fIlen\fP length of the packet in bytes
+.br
+\fIswap\fP 1 to swap byte order, 0 to not\&. Counter-intuitively, it is necessary to swap in order to see the byte order as it is on the wire (this may be a bug)\&.
+.br
+\fIstream\fP a stream pointer to print to
+.RE
+.PP
+
+.SS "LIBNET_API void libnet_diag_dump_pblock (libnet_t * l)"
+[Diagnostic] Prints the contents of every pblock\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+
+.SS "LIBNET_API char* libnet_diag_dump_pblock_type (uint8_t type)"
+[Diagnostic] Returns the canonical name of the pblock type\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP pblock type
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+a string representing the pblock type type
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fIunknown\fP for an unknown value
+.RE
+.PP
+
+.SS "LIBNET_API struct libnet_ether_addr* libnet_get_hwaddr (libnet_t * l)"
+Returns the MAC address for the device libnet was initialized with\&. If libnet was initialized without a device the function will attempt to find one\&. If the function fails and returns NULL a call to \fBlibnet_geterror()\fP will tell you why\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+a pointer to the MAC address or NULL
+.RE
+.PP
+
+.SS "LIBNET_API uint32_t libnet_get_ipaddr4 (libnet_t * l)"
+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
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+a big endian IP address suitable for use in a libnet_build function
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP
+.RE
+.PP
+
+.SS "LIBNET_API struct libnet_in6_addr libnet_get_ipaddr6 (libnet_t * l)"
+Returns the IPv6 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 in6addr_error, a call to libnet_geterrror() will tell you why\&. This function is not yet implemented for Win32 platforms\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fIin6addr_error\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API uint32_t libnet_get_prand (int mod)"
+Generates an unsigned pseudo-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
+\fImod\fP one the of LIBNET_PR* constants
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP on success
+.br
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API const char* libnet_getdevice (libnet_t * l)"
+Returns the canonical name of the device used for packet injection\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the canonical name of the device used for packet injection\&. Note it can be NULL without being an error\&.
+.RE
+.PP
+
+.SS "LIBNET_API char* libnet_geterror (libnet_t * l)"
+Returns the last error set inside of the referenced libnet context\&. This function should be called anytime a function fails or an error condition is detected inside of libnet\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+an error string or NULL if no error has occurred
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_getfd (libnet_t * l)"
+Returns the FILENO of the file descriptor used for packet injection\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the file number of the file descriptor used for packet injection
+.RE
+.PP
+
+.SS "LIBNET_API uint32_t libnet_getgre_length (uint16_t fv)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fIfv\fP see \fBlibnet_build_gre()\fP\&.
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+size
+.RE
+.PP
+\fBSee also:\fP
+.RS 4
+\fBlibnet_build_gre()\fP\&.
+.RE
+.PP
+
+.SS "LIBNET_API uint32_t libnet_getpacket_size (libnet_t * l)"
+Returns the sum of the size of all of the pblocks inside of l (this should be the resulting packet size)\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the size of the packet in l
+.RE
+.PP
+
+.SS "LIBNET_API uint8_t* libnet_getpbuf (libnet_t * l, libnet_ptag_t ptag)"
+Returns the pblock buffer contents for the specified ptag; a subsequent call to \fBlibnet_getpbuf_size()\fP should be made to determine the size of the buffer\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP the ptag reference number
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+a pointer to the pblock buffer or NULL on error
+.RE
+.PP
+
+.SS "LIBNET_API uint32_t libnet_getpbuf_size (libnet_t * l, libnet_ptag_t ptag)"
+Returns the pblock buffer size for the specified ptag; a previous call to \fBlibnet_getpbuf()\fP should be made to pull the actual buffer contents\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP the ptag reference number
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the size of the pblock buffer
+.RE
+.PP
+
+.SS "LIBNET_API uint8_t* libnet_hex_aton (const char * s, int * len)"
+Takes a colon separated hexidecimal address (from the command line) and returns a bytestring suitable for use in a libnet_build function\&. Note this function performs an implicit malloc and the return value should be freed after its use\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIs\fP the string to be parsed
+.br
+\fIlen\fP the resulting size of the returned byte string
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+a byte string or NULL on failure
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_in6_is_error (struct libnet_in6_addr addr)"
+Check a libnet_in6_addr structure for identity with in6addr_error\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIaddr\fP address to check
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP if addr is in6addr_error
+.br
+\fI0\fP if it is not
+.RE
+.PP
+
+.SS "LIBNET_API libnet_t* libnet_init (int injection_type, const char * device, char * err_buf)"
+Creates the libnet environment\&. It initializes the library and returns a libnet context\&. If the injection_type is LIBNET_LINK or LIBNET_LINK_ADV, the function initializes the injection primitives for the link-layer interface enabling the application programmer to build packets starting at the data-link layer (which also provides more granular control over the IP layer)\&. If libnet uses the link-layer and the device argument is non-NULL, the function attempts to use the specified network device for packet injection\&. This is either a canonical string that references the device (such as 'eth0' for a 100MB Ethernet card on Linux or 'fxp0' for a 100MB Ethernet card on OpenBSD) or the dots and decimals representation of the device's IP address (192\&.168\&.0\&.1)\&. If device is NULL, libnet attempts to find a suitable device to use\&. If the injection_type is LIBNET_RAW4 or LIBNET_RAW4_ADV, the function initializes the injection primitives for the IPv4 raw socket interface\&. The final argument, err_buf, should be a buffer of size LIBNET_ERRBUF_SIZE and holds an error message if the function fails\&. This function requires root privileges to execute successfully\&. Upon success, the function returns a valid libnet context for use in later function calls; upon failure, the function returns NULL\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIinjection_type\fP packet injection type (LIBNET_LINK, LIBNET_LINK_ADV, LIBNET_RAW4, LIBNET_RAW4_ADV, LIBNET_RAW6, LIBNET_RAW6_ADV)
+.br
+\fIdevice\fP the interface to use (NULL and libnet will choose one)
+.br
+\fIerr_buf\fP will contain an error message on failure
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+libnet context ready for use or NULL on error\&.
+.RE
+.PP
+
+.SS "LIBNET_API uint32_t libnet_name2addr4 (libnet_t * l, const char * host_name, uint8_t use_name)"
+Takes a dotted decimal string or a canonical DNS name and returns a network byte ordered IPv4 address\&. This may incur a DNS lookup if mode is set to LIBNET_RESOLVE and host_name refers to a canonical DNS name\&. If mode is set to LIBNET_DONT_RESOLVE no DNS lookup will occur\&. The function can fail if DNS lookup fails or if mode is set to LIBNET_DONT_RESOLVE and host_name refers to a canonical DNS name\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIhost_name\fP pointer to a string containing a presentation format host name
+.br
+\fIuse_name\fP LIBNET_RESOLVE or LIBNET_DONT_RESOLVE
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+address in network byte order
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP (2^32 - 1) on error
+.RE
+.PP
+
+.SS "LIBNET_API struct libnet_in6_addr libnet_name2addr6 (libnet_t * l, const char * host_name, uint8_t use_name)"
+Takes a dotted decimal string or a canonical DNS name and returns a network byte ordered IPv6 address\&. This may incur a DNS lookup if mode is set to LIBNET_RESOLVE and host_name refers to a canonical DNS name\&. If mode is set to LIBNET_DONT_RESOLVE no DNS lookup will occur\&. The function can fail if DNS lookup fails or if mode is set to LIBNET_DONT_RESOLVE and host_name refers to a canonical DNS name\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIhost_name\fP pointer to a string containing a presentation format host name
+.br
+\fIuse_name\fP LIBNET_RESOLVE or LIBNET_DONT_RESOLVE
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+network byte ordered IPv6 address structure
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_plist_chain_dump (libnet_plist_t * plist)"
+Runs through the port list and prints the contents of the port list chain list to stdout\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIplist\fP previously created portlist
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP on success
+.br
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API char* libnet_plist_chain_dump_string (libnet_plist_t * plist)"
+Runs through the port list and prints the contents of the port list chain list to string\&. This function uses strdup and is not re-entrant\&. It also has a memory leak and should not really be used\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIplist\fP previously created portlist
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+a printable string containing the port list contents on success or NULL on error
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_plist_chain_free (libnet_plist_t * plist)"
+Frees all memory associated with port list chain\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIplist\fP previously created portlist
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP on success
+.br
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_plist_chain_new (libnet_t * l, libnet_plist_t ** plist, char * token_list)"
+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
+.IP "1." 4
+Upon failure, the function returns -1 and \fBlibnet_geterror()\fP can tell you why\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIplist\fP if successful, will refer to the portlist, if not, NULL
+.br
+\fItoken_list\fP string containing the port list primitive
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP on success
+.br
+\fI-1\fP on failure
+.RE
+.PP
+
+.PP
+
+.SS "LIBNET_API int libnet_plist_chain_next_pair (libnet_plist_t * plist, uint16_t * bport, uint16_t * eport)"
+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
+\fIplist\fP previously created portlist
+.br
+\fIbport\fP will contain the beginning port number or 0
+.br
+\fIeport\fP will contain the ending port number or 0
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP on success
+.br
+\fI0\fP if empty
+.br
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_seed_prand (libnet_t * l)"
+Seeds the pseudo-random number generator\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP on success
+.br
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API void libnet_stats (libnet_t * l, struct libnet_stats * ls)"
+Fills in a libnet_stats structure with packet injection statistics (packets written, bytes written, packet sending errors)\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIls\fP pointer to a libnet statistics structure
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_toggle_checksum (libnet_t * l, libnet_ptag_t ptag, int mode)"
+If a given protocol header is built with the checksum field set to '0', by default libnet will calculate the header checksum prior to injection\&. If the header is set to any other value, by default libnet will not calculate the header checksum\&. To over-ride this behavior, use \fBlibnet_toggle_checksum()\fP\&. Switches auto-checksumming on or off for the specified ptag\&. If mode is set to LIBNET_ON, libnet will mark the specified ptag to calculate a checksum for the ptag prior to injection\&. This assumes that the ptag refers to a protocol that has a checksum field\&. If mode is set to LIBNET_OFF, libnet will clear the checksum flag and no checksum will be computed prior to injection\&. This assumes that the programmer will assign a value (zero or otherwise) to the checksum field\&. Often times this is useful if a precomputed checksum or some other predefined value is going to be used\&. Note that when libnet is initialized with LIBNET_RAW4, the IPv4 header checksum will always be computed by the kernel prior to injection, regardless of what the programmer sets\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP the ptag reference number
+.br
+\fImode\fP LIBNET_ON or LIBNET_OFF
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP on success
+.br
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API const char* libnet_version (void)"
+Returns the version of libnet\&.
+.PP
+\fBReturns:\fP
+.RS 4
+the libnet version
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_write (libnet_t * l)"
+Writes a prebuilt packet to the network\&. The function assumes that l was previously initialized (via a call to \fBlibnet_init()\fP) and that a previously constructed packet has been built inside this context (via one or more calls to the libnet_build* family of functions) and is ready to go\&. Depending on how libnet was initialized, the function will write the packet to the wire either via the raw or link layer interface\&. The function will also bump up the internal libnet stat counters which are retrievable via \fBlibnet_stats()\fP\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the number of bytes written
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SH "SEE ALSO"
+\.IX Header "SEE ALSO"
+libnet(3), libnet\-config(1)
+.SH "AUTHORS"
+.IX Header "AUTHORS"
+The original author of libnet is Mike D. Schiffman.
+.PP
+libnet has been maintained and extensively enhanced since 2009 by Sam Roberts.
+.PP
+It is currently maintained by Ali Abdulkadir and available at
+.PP
+.Vb 1
+\& <https://github.com/sgeto/libnet>
+.Ve
+.SH "BUGS"
+.IX Header "BUGS"
+For bugs, questions, patch submissions, desirable enhancements, etc. see:
+.PP
+.Vb 1
+\& <https://github.com/sgeto/libnet/issues>
+.Ve
+.SH "COPYRIGHT"
+.IX Header "COPYRIGHT"
+libnet is licensed under the 3\-Clause \s-1BSD\s0 License. You can basically
+do whatever you want with it.
+.SH "SEE ALSO"
+\.IX Header "SEE ALSO"
+libnet(3), libnet\-config(1)
+.SH "AUTHORS"
+.IX Header "AUTHORS"
+The original author of libnet is Mike D. Schiffman.
+.PP
+libnet has been maintained and extensively enhanced since 2009 by Sam Roberts.
+.PP
+It is currently maintained by Ali Abdulkadir and available at
+.PP
+.Vb 1
+\& <https://github.com/sgeto/libnet>
+.Ve
+.SH "BUGS"
+.IX Header "BUGS"
+For bugs, questions, patch submissions, desirable enhancements, etc. see:
+.PP
+.Vb 1
+\& <https://github.com/sgeto/libnet/issues>
+.Ve
+.SH "COPYRIGHT"
+.IX Header "COPYRIGHT"
+libnet is licensed under the 3\-Clause \s-1BSD\s0 License. You can basically
+do whatever you want with it.
diff --git a/doc/man/man3/libnet-functions.h.3 b/doc/man/man3/libnet-functions.h.3
new file mode 100644
index 0000000..3c10a7b
--- /dev/null
+++ b/doc/man/man3/libnet-functions.h.3
@@ -0,0 +1,3871 @@
+.TH "libnet-functions.h" 3 "Sat Sep 28 2019" "Version 1.1" "libnet" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+libnet-functions.h \- libnet exported function prototypes
+
+.SH SYNOPSIS
+.br
+.PP
+.SS "Functions"
+
+.in +1c
+.ti -1c
+.RI "LIBNET_API libnet_t * \fBlibnet_init\fP (int injection_type, const char *device, char *err_buf)"
+.br
+.ti -1c
+.RI "LIBNET_API void \fBlibnet_destroy\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API void \fBlibnet_clear_packet\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API void \fBlibnet_stats\fP (libnet_t *l, struct libnet_stats *ls)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_getfd\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API const char * \fBlibnet_getdevice\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API uint8_t * \fBlibnet_getpbuf\fP (libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API uint32_t \fBlibnet_getpbuf_size\fP (libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API char * \fBlibnet_geterror\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API uint32_t \fBlibnet_getpacket_size\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_seed_prand\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API uint32_t \fBlibnet_get_prand\fP (int mod)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_toggle_checksum\fP (libnet_t *l, libnet_ptag_t ptag, int mode)"
+.br
+.ti -1c
+.RI "LIBNET_API char * \fBlibnet_addr2name4\fP (uint32_t in, uint8_t use_name)"
+.br
+.ti -1c
+.RI "LIBNET_API uint32_t \fBlibnet_name2addr4\fP (libnet_t *l, const char *host_name, uint8_t use_name)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_in6_is_error\fP (struct libnet_in6_addr addr)"
+.br
+.ti -1c
+.RI "LIBNET_API struct libnet_in6_addr \fBlibnet_name2addr6\fP (libnet_t *l, const char *host_name, uint8_t use_name)"
+.br
+.ti -1c
+.RI "LIBNET_API void \fBlibnet_addr2name6_r\fP (struct libnet_in6_addr addr, uint8_t use_name, char *host_name, int host_name_len)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_plist_chain_new\fP (libnet_t *l, libnet_plist_t **plist, char *token_list)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_plist_chain_next_pair\fP (libnet_plist_t *plist, uint16_t *bport, uint16_t *eport)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_plist_chain_dump\fP (libnet_plist_t *plist)"
+.br
+.ti -1c
+.RI "LIBNET_API char * \fBlibnet_plist_chain_dump_string\fP (libnet_plist_t *plist)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_plist_chain_free\fP (libnet_plist_t *plist)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_802_1q\fP (const uint8_t *dst, const uint8_t *src, uint16_t tpi, uint8_t priority, uint8_t cfi, uint16_t vlan_id, uint16_t len_proto, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_802_1x\fP (uint8_t eap_ver, uint8_t eap_type, uint16_t length, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_802_2\fP (uint8_t dsap, uint8_t ssap, uint8_t control, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_802_2snap\fP (uint8_t dsap, uint8_t ssap, uint8_t control, uint8_t *oui, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_802_3\fP (const uint8_t *dst, const uint8_t *src, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ethernet\fP (const uint8_t *dst, const uint8_t *src, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_autobuild_ethernet\fP (const uint8_t *dst, uint16_t type, libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_fddi\fP (uint8_t fc, const uint8_t *dst, const uint8_t *src, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t *oui, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_autobuild_fddi\fP (uint8_t fc, const uint8_t *dst, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t *oui, uint16_t type, libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_arp\fP (uint16_t hrd, uint16_t pro, uint8_t hln, uint8_t pln, uint16_t op, const uint8_t *sha, const uint8_t *spa, const uint8_t *tha, const uint8_t *tpa, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_autobuild_arp\fP (uint16_t op, const uint8_t *sha, const uint8_t *spa, const uint8_t *tha, const uint8_t *tpa, libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_tcp\fP (uint16_t sp, uint16_t dp, uint32_t seq, uint32_t ack, uint8_t control, uint16_t win, uint16_t sum, uint16_t urg, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_tcp_options\fP (const uint8_t *options, uint32_t options_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_udp\fP (uint16_t sp, uint16_t dp, uint16_t len, uint16_t sum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_cdp\fP (uint8_t version, uint8_t ttl, uint16_t sum, uint16_t type, uint16_t value_s, const uint8_t *value, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv4_echo\fP (uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv4_mask\fP (uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint32_t mask, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv4_unreach\fP (uint8_t type, uint8_t code, uint16_t sum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv4_redirect\fP (uint8_t type, uint8_t code, uint16_t sum, uint32_t gateway, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv4_timeexceed\fP (uint8_t type, uint8_t code, uint16_t sum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv4_timestamp\fP (uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint32_t otime, uint32_t rtime, uint32_t ttime, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv6_echo\fP (uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv6_unreach\fP (uint8_t type, uint8_t code, uint16_t sum, uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv6_ndp_nsol\fP (uint8_t type, uint8_t code, uint16_t sum, struct libnet_in6_addr target, uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv6_ndp_nadv\fP (uint8_t type, uint8_t code, uint16_t sum, uint32_t flags, struct libnet_in6_addr target, uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_icmpv6_ndp_opt\fP (uint8_t type, uint8_t *option, uint32_t option_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_igmp\fP (uint8_t type, uint8_t reserved, uint16_t sum, uint32_t ip, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ipv4\fP (uint16_t ip_len, uint8_t tos, uint16_t id, uint16_t frag, uint8_t ttl, uint8_t prot, uint16_t sum, uint32_t src, uint32_t dst, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ipv4_options\fP (const uint8_t *options, uint32_t options_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_autobuild_ipv4\fP (uint16_t len, uint8_t prot, uint32_t dst, libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ipv6\fP (uint8_t tc, uint32_t fl, uint16_t len, uint8_t nh, uint8_t hl, struct libnet_in6_addr src, struct libnet_in6_addr dst, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ipv6_frag\fP (uint8_t nh, uint8_t reserved, uint16_t frag, uint32_t id, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ipv6_routing\fP (uint8_t nh, uint8_t len, uint8_t rtype, uint8_t segments, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ipv6_destopts\fP (uint8_t nh, uint8_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ipv6_hbhopts\fP (uint8_t nh, uint8_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_autobuild_ipv6\fP (uint16_t len, uint8_t nh, struct libnet_in6_addr dst, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_isl\fP (uint8_t *dhost, uint8_t type, uint8_t user, uint8_t *shost, uint16_t len, const uint8_t *snap, uint16_t vid, uint16_t portindex, uint16_t reserved, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ipsec_esp_hdr\fP (uint32_t spi, uint32_t seq, uint32_t iv, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ipsec_esp_ftr\fP (uint8_t len, uint8_t nh, int8_t *auth, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ipsec_ah\fP (uint8_t nh, uint8_t len, uint16_t res, uint32_t spi, uint32_t seq, uint32_t auth, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_dnsv4\fP (uint16_t h_len, uint16_t id, uint16_t flags, uint16_t num_q, uint16_t num_anws_rr, uint16_t num_auth_rr, uint16_t num_addi_rr, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_rip\fP (uint8_t cmd, uint8_t version, uint16_t rd, uint16_t af, uint16_t rt, uint32_t addr, uint32_t mask, uint32_t next_hop, uint32_t metric, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_rpc_call\fP (uint32_t rm, uint32_t xid, uint32_t prog_num, uint32_t prog_vers, uint32_t procedure, uint32_t cflavor, uint32_t clength, uint8_t *cdata, uint32_t vflavor, uint32_t vlength, const uint8_t *vdata, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_stp_conf\fP (uint16_t id, uint8_t version, uint8_t bpdu_type, uint8_t flags, const uint8_t *root_id, uint32_t root_pc, const uint8_t *bridge_id, uint16_t port_id, uint16_t message_age, uint16_t max_age, uint16_t hello_time, uint16_t f_delay, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_stp_tcn\fP (uint16_t id, uint8_t version, uint8_t bpdu_type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_token_ring\fP (uint8_t ac, uint8_t fc, const uint8_t *dst, const uint8_t *src, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t *oui, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_autobuild_token_ring\fP (uint8_t ac, uint8_t fc, const uint8_t *dst, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t *oui, uint16_t type, libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_vrrp\fP (uint8_t version, uint8_t type, uint8_t vrouter_id, uint8_t priority, uint8_t ip_count, uint8_t auth_type, uint8_t advert_int, uint16_t sum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_mpls\fP (uint32_t label, uint8_t experimental, uint8_t bos, uint8_t ttl, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ntp\fP (uint8_t leap_indicator, uint8_t version, uint8_t mode, uint8_t stratum, uint8_t poll, uint8_t precision, uint16_t delay_int, uint16_t delay_frac, uint16_t dispersion_int, uint16_t dispersion_frac, uint32_t reference_id, uint32_t ref_ts_int, uint32_t ref_ts_frac, uint32_t orig_ts_int, uint32_t orig_ts_frac, uint32_t rec_ts_int, uint32_t rec_ts_frac, uint32_t xmt_ts_int, uint32_t xmt_ts_frac, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ospfv2\fP (uint16_t len, uint8_t type, uint32_t rtr_id, uint32_t area_id, uint16_t sum, uint16_t autype, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ospfv2_hello\fP (uint32_t netmask, uint16_t interval, uint8_t opts, uint8_t priority, uint32_t dead_int, uint32_t des_rtr, uint32_t bkup_rtr, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "libnet_ptag_t \fBlibnet_build_ospfv2_hello_neighbor\fP (uint32_t netmask, uint16_t interval, uint8_t opts, uint8_t priority, uint32_t dead_int, uint32_t des_rtr, uint32_t bkup_rtr, uint32_t neighbor, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ospfv2_dbd\fP (uint16_t dgram_len, uint8_t opts, uint8_t type, uint32_t seqnum, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ospfv2_lsr\fP (uint32_t type, uint32_t lsid, uint32_t advrtr, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ospfv2_lsu\fP (uint32_t num, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ospfv2_lsa\fP (uint16_t age, uint8_t opts, uint8_t type, uint32_t lsid, uint32_t advrtr, uint32_t seqnum, uint16_t sum, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ospfv2_lsa_rtr\fP (uint16_t flags, uint16_t num, uint32_t id, uint32_t data, uint8_t type, uint8_t tos, uint16_t metric, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ospfv2_lsa_net\fP (uint32_t nmask, uint32_t rtrid, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ospfv2_lsa_sum\fP (uint32_t nmask, uint32_t metric, uint32_t tos, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_ospfv2_lsa_as\fP (uint32_t nmask, uint32_t metric, uint32_t fwdaddr, uint32_t tag, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_data\fP (const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_dhcpv4\fP (uint8_t opcode, uint8_t htype, uint8_t hlen, uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags, uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip, const uint8_t *chaddr, const char *sname, const char *file, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_bootpv4\fP (uint8_t opcode, uint8_t htype, uint8_t hlen, uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags, uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip, const uint8_t *chaddr, const char *sname, const char *file, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API uint32_t \fBlibnet_getgre_length\fP (uint16_t fv)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_gre\fP (uint16_t fv, uint16_t type, uint16_t sum, uint16_t offset, uint32_t key, uint32_t seq, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_egre\fP (uint16_t fv, uint16_t type, uint16_t sum, uint16_t offset, uint32_t key, uint32_t seq, uint16_t len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_gre_sre\fP (uint16_t af, uint8_t offset, uint8_t length, uint8_t *routing, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_gre_last_sre\fP (libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_bgp4_header\fP (uint8_t marker[LIBNET_BGP4_MARKER_SIZE], uint16_t len, uint8_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_bgp4_open\fP (uint8_t version, uint16_t src_as, uint16_t hold_time, uint32_t bgp_id, uint8_t opt_len, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_bgp4_update\fP (uint16_t unfeasible_rt_len, const uint8_t *withdrawn_rt, uint16_t total_path_attr_len, const uint8_t *path_attributes, uint16_t info_len, uint8_t *reachability_info, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_bgp4_notification\fP (uint8_t err_code, uint8_t err_subcode, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_sebek\fP (uint32_t magic, uint16_t version, uint16_t type, uint32_t counter, uint32_t time_sec, uint32_t time_usec, uint32_t pid, uint32_t uid, uint32_t fd, uint8_t cmd[SEBEK_CMD_LENGTH], uint32_t length, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_hsrp\fP (uint8_t version, uint8_t opcode, uint8_t state, uint8_t hello_time, uint8_t hold_time, uint8_t priority, uint8_t group, uint8_t reserved, uint8_t authdata[HSRP_AUTHDATA_LENGTH], uint32_t virtual_ip, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_build_link\fP (const uint8_t *dst, const uint8_t *src, const uint8_t *oui, uint16_t type, const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_ptag_t \fBlibnet_autobuild_link\fP (const uint8_t *dst, const uint8_t *oui, uint16_t type, libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_write\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API uint32_t \fBlibnet_get_ipaddr4\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API struct libnet_in6_addr \fBlibnet_get_ipaddr6\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API struct libnet_ether_addr * \fBlibnet_get_hwaddr\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API uint8_t * \fBlibnet_hex_aton\fP (const char *s, int *len)"
+.br
+.ti -1c
+.RI "LIBNET_API const char * \fBlibnet_version\fP (void)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_adv_cull_packet\fP (libnet_t *l, uint8_t **packet, uint32_t *packet_s)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_adv_cull_header\fP (libnet_t *l, libnet_ptag_t ptag, uint8_t **header, uint32_t *header_s)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_adv_write_link\fP (libnet_t *l, const uint8_t *packet, uint32_t packet_s)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_adv_write_raw_ipv4\fP (libnet_t *l, const uint8_t *packet, uint32_t packet_s)"
+.br
+.ti -1c
+.RI "LIBNET_API void \fBlibnet_adv_free_packet\fP (libnet_t *l, uint8_t *packet)"
+.br
+.ti -1c
+.RI "int \fBlibnet_cq_add\fP (libnet_t *l, char *label)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_t * \fBlibnet_cq_remove\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_t * \fBlibnet_cq_remove_by_label\fP (char *label)"
+.br
+.ti -1c
+.RI "LIBNET_API const char * \fBlibnet_cq_getlabel\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_t * \fBlibnet_cq_find_by_label\fP (char *label)"
+.br
+.ti -1c
+.RI "LIBNET_API void \fBlibnet_cq_destroy\fP (void)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_t * \fBlibnet_cq_head\fP (void)"
+.br
+.ti -1c
+.RI "LIBNET_API int \fBlibnet_cq_last\fP (void)"
+.br
+.ti -1c
+.RI "LIBNET_API libnet_t * \fBlibnet_cq_next\fP (void)"
+.br
+.ti -1c
+.RI "LIBNET_API uint32_t \fBlibnet_cq_size\fP (void)"
+.br
+.ti -1c
+.RI "LIBNET_API uint32_t \fBlibnet_cq_end_loop\fP (void)"
+.br
+.ti -1c
+.RI "LIBNET_API void \fBlibnet_diag_dump_context\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API void \fBlibnet_diag_dump_pblock\fP (libnet_t *l)"
+.br
+.ti -1c
+.RI "LIBNET_API char * \fBlibnet_diag_dump_pblock_type\fP (uint8_t type)"
+.br
+.ti -1c
+.RI "void \fBlibnet_diag_dump_hex\fP (const uint8_t *packet, uint32_t len, int swap, FILE *stream)"
+.br
+.in -1c
+.SH "Detailed Description"
+.PP
+libnet exported function prototypes
+
+
+.SH "Function Documentation"
+.PP
+.SS "LIBNET_API char* libnet_addr2name4 (uint32_t in, uint8_t use_name)"
+Takes a network byte ordered IPv4 address and returns a pointer to either a canonical DNS name (if it has one) or a string of dotted decimals\&. This may incur a DNS lookup if the hostname and mode is set to LIBNET_RESOLVE\&. If mode is set to LIBNET_DONT_RESOLVE, no DNS lookup will be performed and the function will return a pointer to a dotted decimal string\&. The function cannot fail -- if no canonical name exists, it will fall back on returning a dotted decimal string\&. This function is non-reentrant\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIin\fP network byte ordered IPv4 address
+.br
+\fIuse_name\fP LIBNET_RESOLVE or LIBNET_DONT_RESOLVE
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+a pointer to presentation format string
+.RE
+.PP
+
+.SS "LIBNET_API void libnet_addr2name6_r (struct libnet_in6_addr addr, uint8_t use_name, char * host_name, int host_name_len)"
+Should document this baby right here\&.
+.SS "LIBNET_API int libnet_adv_cull_header (libnet_t * l, libnet_ptag_t ptag, uint8_t ** header, uint32_t * header_s)"
+[Advanced Interface] Pulls the header from the specified ptag from the given libnet context\&. This function is part of the advanced interface and is only available when libnet is initialized in advanced mode\&. If the function fails \fBlibnet_geterror()\fP can tell you why\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP the ptag referencing the header to pull
+.br
+\fIheader\fP will contain the header
+.br
+\fIheader_s\fP will contain the header size
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP on success
+.br
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_adv_cull_packet (libnet_t * l, uint8_t ** packet, uint32_t * packet_s)"
+[Advanced Interface] Yanks a prebuilt, wire-ready packet from the given libnet context\&. If libnet was configured to do so (which it is by default) the packet will have all checksums written in\&. This function is part of the advanced interface and is only available when libnet is initialized in advanced mode\&. It is important to note that the function performs an implicit malloc() and a corresponding call to \fBlibnet_adv_free_packet()\fP should be made to free the memory packet occupies\&. If the function fails \fBlibnet_geterror()\fP can tell you why\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIpacket\fP will contain the wire-ready packet
+.br
+\fIpacket_s\fP will contain the packet size
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP on success
+.br
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API void libnet_adv_free_packet (libnet_t * l, uint8_t * packet)"
+[Advanced Interface] Frees the memory allocated when \fBlibnet_adv_cull_packet()\fP is called\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIpacket\fP a pointer to the packet to free
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_adv_write_link (libnet_t * l, const uint8_t * packet, uint32_t packet_s)"
+[Advanced Interface] Writes a packet the network at the link layer\&. This function is useful to write a packet that has been constructed by hand by the application programmer or, more commonly, to write a packet that has been returned by a call to \fBlibnet_adv_cull_packet()\fP\&. This function is part of the advanced interface and is only available when libnet is initialized in advanced mode\&. If the function fails \fBlibnet_geterror()\fP can tell you why\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIpacket\fP a pointer to the packet to inject
+.br
+\fIpacket_s\fP the size of the packet
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the number of bytes written
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_adv_write_raw_ipv4 (libnet_t * l, const uint8_t * packet, uint32_t packet_s)"
+[Advanced Interface] Writes a packet the network at the raw socket layer\&. This function is useful to write a packet that has been constructed by hand by the application programmer or, more commonly, to write a packet that has been returned by a call to \fBlibnet_adv_cull_packet()\fP\&. This function is part of the advanced interface and is only available when libnet is initialized in advanced mode\&. If the function fails \fBlibnet_geterror()\fP can tell you why\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIpacket\fP a pointer to the packet to inject
+.br
+\fIpacket_s\fP the size of the packet
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the number of bytes written
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_autobuild_arp (uint16_t op, const uint8_t * sha, const uint8_t * spa, const uint8_t * tha, const uint8_t * tpa, libnet_t * l)"
+Autouilds an Address Resolution Protocol (ARP) header\&. Depending on the op value, the function builds one of several different types of RFC 826 or RFC 903 RARP packets\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIop\fP ARP operation type
+.br
+\fIsha\fP sender's hardware address
+.br
+\fIspa\fP sender's protocol address
+.br
+\fItha\fP target hardware address
+.br
+\fItpa\fP target protocol address
+.br
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_autobuild_ethernet (const uint8_t * dst, uint16_t type, libnet_t * l)"
+Autobuilds an Ethernet header\&. The RFC 894 Ethernet II header is almost identical to the IEEE 802\&.3 header, with the exception that the field immediately following the source address holds the layer 3 protocol (as opposed to frame's length)\&. You should only use this function when libnet is initialized with the LIBNET_LINK interface\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdst\fP destination ethernet address
+.br
+\fItype\fP upper layer protocol type
+.br
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_autobuild_fddi (uint8_t fc, const uint8_t * dst, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t * oui, uint16_t type, libnet_t * l)"
+Autobuilds a Fiber Distributed Data Interface (FDDI) header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIfc\fP class format and priority
+.br
+\fIdst\fP destination fddi address
+.br
+\fIdsap\fP destination service access point
+.br
+\fIssap\fP source service access point
+.br
+\fIcf\fP cf
+.br
+\fIoui\fP IEEE organizational code
+.br
+\fItype\fP upper layer protocol
+.br
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_autobuild_ipv4 (uint16_t len, uint8_t prot, uint32_t dst, libnet_t * l)"
+Autobuilds a version 4 Internet Protocol (IP) header\&. The function is useful to build an IP header quickly when you do not need a granular level of control\&. The function takes the same len, prot, and dst arguments as \fBlibnet_build_ipv4()\fP\&. The function does not accept a ptag argument, but it does return a ptag\&. In other words, you can use it to build a new IP header but not to modify an existing one\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIlen\fP total length of the IP packet including all subsequent data
+.br
+\fIprot\fP upper layer protocol
+.br
+\fIdst\fP destination IPv4 address (little endian)
+.br
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_autobuild_ipv6 (uint16_t len, uint8_t nh, struct libnet_in6_addr dst, libnet_t * l, libnet_ptag_t ptag)"
+Autobuilds a version 6 RFC 2460 Internet Protocol (IP) header\&. The function is useful to build an IP header quickly when you do not need a granular level of control\&. The function takes the same len, nh, and dst arguments as \fBlibnet_build_ipv4()\fP\&. The function does not accept a ptag argument, but it does return a ptag\&. In other words, you can use it to build a new IP header but not to modify an existing one\&. This function requires \fBlibnet_get_ipaddr6()\fP, which is not yet implemented for Win32 platforms\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIlen\fP length
+.br
+\fInh\fP next header
+.br
+\fIdst\fP destination IPv6 address
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_autobuild_link (const uint8_t * dst, const uint8_t * oui, uint16_t type, libnet_t * l)"
+Automatically builds a link layer header for an initialized l\&. The function determines the proper link layer header format from how l was initialized\&. The function current supports Ethernet and Token Ring link layers\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdst\fP the destination MAC address
+.br
+\fIoui\fP Organizationally Unique Identifier (unused for Ethernet)
+.br
+\fItype\fP the upper layer protocol type
+.br
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_autobuild_token_ring (uint8_t ac, uint8_t fc, const uint8_t * dst, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t * oui, uint16_t type, libnet_t * l)"
+Auto-builds a token ring header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIac\fP access control
+.br
+\fIfc\fP frame control
+.br
+\fIdst\fP destination address
+.br
+\fIdsap\fP destination service access point
+.br
+\fIssap\fP source service access point
+.br
+\fIcf\fP control field
+.br
+\fIoui\fP Organizationally Unique Identifier
+.br
+\fItype\fP upper layer protocol type
+.br
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_802_1q (const uint8_t * dst, const uint8_t * src, uint16_t tpi, uint8_t priority, uint8_t cfi, uint16_t vlan_id, uint16_t len_proto, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.SH "Packet Builder Functions"
+.PP
+The core of libnet is the platform-independent packet-building functionality\&. These functions enable an application programmer to build protocol headers (and data) in a simple and consistent manner without having to worry (too much) about low-level network odds and ends\&. Each libnet_build() function builds a piece of a packet (generally a protocol header)\&. While it is perfectly possible to build an entire, ready-to-transmit packet with a single call to a libnet_build() function, generally more than one builder-class function call is required to construct a full packet\&. A complete wire-ready packet generally consists of more than one piece\&. Every function that builds a protocol header takes a series of arguments roughly corresponding to the header values as they appear on the wire\&. This process is intuitive but often makes for functions with huge prototypes and large stack frames\&. One important thing to note is that you must call these functions in order, corresponding to how they should appear on the wire (from the highest protocol layer on down)\&. This building process is intuitive; it approximates what happens in an operating system kernel\&. In other words, to build a Network Time Protocol (NTP) packet by using the link-layer interface, the application programmer would call the libnet_build() functions in the following order:
+.IP "1." 4
+\fBlibnet_build_ntp()\fP
+.IP "2." 4
+\fBlibnet_build_udp()\fP
+.IP "3." 4
+\fBlibnet_build_ipv4()\fP
+.IP "4." 4
+\fBlibnet_build_ethernet()\fP This ordering is essential for libnet 1\&.1\&.x to properly link together the packet internally (previous libnet versions did not have the requirement)\&.
+.PP
+.SS "The Payload Interface"
+The payload interface specifies an optional way to include data directly after the protocol header in question\&. You can use this function for a variety of purposes, including the following:
+.IP "\(bu" 2
+Including additional or arbitrary protocol header information that is not available from a libnet interface
+.IP "\(bu" 2
+Including a packet payload (data segment)
+.IP "\(bu" 2
+Building another protocol header that is not available from a libnet interface To employ the interface, the application programmer should construct the i payload data and pass a const uint8_t * to this data and its size to the desired libnet_build() function\&. Libnet handles the rest\&.
+.PP
+.PP
+It is important to note that some functions (notably the IPv6 builders) do use the payload interface to specify variable length but ostensibly non-optional data\&. See the individual libnet_build_ipv6*() functions for more information\&.
+.SS "Protocol Tags and Packet Builder Return Values"
+Libnet uses the protocol tag (ptag) to identify individual pieces of a packet after being created\&. A new ptag results every time a libnet_build() function with an empty (0) ptag argument completes successfully\&. This new ptag now refers to the packet piece just created\&. The application programmer's responsibility is to save this value if he or she plans to modify this particular portion later on in the program\&. If the application programmer needs to modify some portion of that particular packet piece again, he or she calls the same libnet_build() function specifying the saved ptag argument\&. Libnet then searches for that packet piece and modifies it rather than creating a new one\&. Upon failure for any reason, libnet_build() functions return -1; \fBlibnet_geterror()\fP tells you why\&. Builds an IEEE 802\&.1q VLAN tagging header\&. Depending on the value of len_proto, the function wraps the 802\&.1q header inside either an IEEE 802\&.3 header or an RFC 894 Ethernet II (DIX) header (both resulting in an 18-byte frame)\&. If len is 1500 or less, most receiving protocol stacks parse the frame as an IEEE 802\&.3 encapsulated frame\&. If len is one of the Ethernet type values, most protocol stacks parse the frame as an RFC 894 Ethernet II encapsulated frame\&. Note the length value is calculated without the 802\&.1q header of 18 bytes\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdst\fP pointer to a six byte source ethernet address
+.br
+\fIsrc\fP pointer to a six byte destination ethernet address
+.br
+\fItpi\fP tag protocol identifier
+.br
+\fIpriority\fP priority
+.br
+\fIcfi\fP canonical format indicator
+.br
+\fIvlan_id\fP vlan identifier
+.br
+\fIlen_proto\fP length (802\&.3) protocol (Ethernet II)
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_802_1x (uint8_t eap_ver, uint8_t eap_type, uint16_t length, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IEEE 802\&.1x extended authentication protocol header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIeap_ver\fP the EAP version
+.br
+\fIeap_type\fP the EAP type
+.br
+\fIlength\fP frame length
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_802_2 (uint8_t dsap, uint8_t ssap, uint8_t control, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IEEE 802\&.2 LLC header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdsap\fP destination service access point
+.br
+\fIssap\fP source service access point
+.br
+\fIcontrol\fP control field
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_802_2snap (uint8_t dsap, uint8_t ssap, uint8_t control, uint8_t * oui, uint16_t type, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IEEE 802\&.2 LLC SNAP header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdsap\fP destination service access point
+.br
+\fIssap\fP source service access point
+.br
+\fIcontrol\fP control field
+.br
+\fIoui\fP Organizationally Unique Identifier
+.br
+\fItype\fP upper layer protocol
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_802_3 (const uint8_t * dst, const uint8_t * src, uint16_t len, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IEEE 802\&.3 header\&. The 802\&.3 header is almost identical to the RFC 894 Ethernet II header, the exception being that the field immediately following the source address holds the frame's length (as opposed to the layer 3 protocol)\&. You should only use this function when libnet is initialized with the LIBNET_LINK interface\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdst\fP destination ethernet address
+.br
+\fIsrc\fP source ethernet address
+.br
+\fIlen\fP frame length sans header
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_arp (uint16_t hrd, uint16_t pro, uint8_t hln, uint8_t pln, uint16_t op, const uint8_t * sha, const uint8_t * spa, const uint8_t * tha, const uint8_t * tpa, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an Address Resolution Protocol (ARP) header\&. Depending on the op value, the function builds one of several different types of RFC 826 or RFC 903 RARP packets\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIhrd\fP hardware address format
+.br
+\fIpro\fP protocol address format
+.br
+\fIhln\fP hardware address length
+.br
+\fIpln\fP protocol address length
+.br
+\fIop\fP ARP operation type
+.br
+\fIsha\fP sender's hardware address
+.br
+\fIspa\fP sender's protocol address
+.br
+\fItha\fP target hardware address
+.br
+\fItpa\fP target protocol address
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_bgp4_header (uint8_t marker[LIBNET_BGP4_MARKER_SIZE], uint16_t len, uint8_t type, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+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
+\fImarker\fP a value the receiver can predict (if the message type is not BGP OPEN, or no authentication is used, these 16 bytes are normally set as all ones)
+.br
+\fIlen\fP total length of the BGP message, including the header
+.br
+\fItype\fP type code of the message (OPEN, UPDATE, NOTIFICATION or KEEPALIVE)
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_bgp4_notification (uint8_t err_code, uint8_t err_subcode, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 1771 Border Gateway Protocol 4 (BGP-4) notification header\&. A NOTIFICATION message is sent when an error condition is detected\&. Specific error information may be passed through the payload interface\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIerr_code\fP type of notification
+.br
+\fIerr_subcode\fP more specific information about the reported error\&.
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_bgp4_open (uint8_t version, uint16_t src_as, uint16_t hold_time, uint32_t bgp_id, uint8_t opt_len, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 1771 Border Gateway Protocol 4 (BGP-4) OPEN header\&. This is the first message sent by each side of a BGP connection\&. The optional parameters options should be constructed using the payload interface (see RFC 1771 for the options structures)\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIversion\fP protocol version (should be set to 4)
+.br
+\fIsrc_as\fP Autonomous System of the sender
+.br
+\fIhold_time\fP used to compute the maximum allowed time between the receipt of KEEPALIVE, and/or UPDATE messages by the sender
+.br
+\fIbgp_id\fP BGP identifier of the sender
+.br
+\fIopt_len\fP total length of the optional parameters field in bytes
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_bgp4_update (uint16_t unfeasible_rt_len, const uint8_t * withdrawn_rt, uint16_t total_path_attr_len, const uint8_t * path_attributes, uint16_t info_len, uint8_t * reachability_info, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 1771 Border Gateway Protocol 4 (BGP-4) update header\&. Update messages are used to transfer routing information between BGP peers\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIunfeasible_rt_len\fP indicates the length of the (next) 'withdrawn routes' field in bytes
+.br
+\fIwithdrawn_rt\fP list of IP addresses prefixes for the routes that are being withdrawn; each IP address prefix is built as a 2-tuple <length (1 byte), prefix (variable)>
+.br
+\fItotal_path_attr_len\fP indicates the length of the (next) 'path attributes' field in bytes
+.br
+\fIpath_attributes\fP each attribute is a 3-tuple <type (2 bytes), length, value>
+.br
+\fIinfo_len\fP indicates the length of the (next) 'network layer reachability information' field in bytes (needed for internal memory size calculation)
+.br
+\fIreachability_info\fP 2-tuples <length (1 byte), prefix (variable)>\&.
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_bootpv4 (uint8_t opcode, uint8_t htype, uint8_t hlen, uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags, uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip, const uint8_t * chaddr, const char * sname, const char * file, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fIopcode\fP
+.br
+\fIhtype\fP
+.br
+\fIhlen\fP
+.br
+\fIhopcount\fP
+.br
+\fIxid\fP
+.br
+\fIsecs\fP
+.br
+\fIflags\fP
+.br
+\fIcip\fP
+.br
+\fIyip\fP
+.br
+\fIsip\fP
+.br
+\fIgip\fP
+.br
+\fIchaddr\fP client hardware address, length is hlen
+.br
+\fIsname\fP server host name, a null terminated string
+.br
+\fIfile\fP boot file name, a null terminated string
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_cdp (uint8_t version, uint8_t ttl, uint16_t sum, uint16_t type, uint16_t value_s, const uint8_t * value, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a Cisco Discovery Protocol (CDP) header\&. Cisco Systems designed CDP to aid in the network management of adjacent Cisco devices\&. The CDP protocol specifies data by using a type/length/value (TLV) setup\&. The first TLV can specified by using the functions type, length, and value arguments\&. To specify additional TLVs, the programmer could either use the payload interface or \fBlibnet_build_data()\fP to construct them\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIversion\fP CDP version
+.br
+\fIttl\fP time to live (time information should be cached by recipient)
+.br
+\fIsum\fP checksum (0 for libnet to autofill)
+.br
+\fItype\fP type of data contained in value
+.br
+\fIvalue_s\fP length of value argument
+.br
+\fIvalue\fP the CDP information string
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_data (const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a generic libnet protocol header\&. This is useful for including an optional payload to a packet that might need to change repeatedly inside of a loop\&. This won't work for TCP or IP payload, they have special types (this is probably a bug)\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_dhcpv4 (uint8_t opcode, uint8_t htype, uint8_t hlen, uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags, uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip, const uint8_t * chaddr, const char * sname, const char * file, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fIopcode\fP
+.br
+\fIhtype\fP
+.br
+\fIhlen\fP
+.br
+\fIhopcount\fP
+.br
+\fIxid\fP
+.br
+\fIsecs\fP
+.br
+\fIflags\fP
+.br
+\fIcip\fP
+.br
+\fIyip\fP
+.br
+\fIsip\fP
+.br
+\fIgip\fP
+.br
+\fIchaddr\fP client hardware address, length is hlen
+.br
+\fIsname\fP server host name, a null terminated string
+.br
+\fIfile\fP boot file name, a null terminated string
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_dnsv4 (uint16_t h_len, uint16_t id, uint16_t flags, uint16_t num_q, uint16_t num_anws_rr, uint16_t num_auth_rr, uint16_t num_addi_rr, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 1035 version 4 DNS header\&. Additional DNS payload information should be specified using the payload interface\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIh_len\fP
+.br
+\fIid\fP DNS packet id
+.br
+\fIflags\fP control flags
+.br
+\fInum_q\fP number of questions
+.br
+\fInum_anws_rr\fP number of answer resource records
+.br
+\fInum_auth_rr\fP number of authority resource records
+.br
+\fInum_addi_rr\fP number of additional resource records
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_egre (uint16_t fv, uint16_t type, uint16_t sum, uint16_t offset, uint32_t key, uint32_t seq, uint16_t len, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+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
+\fIfv\fP the 16 0 to 7: which fields are included in the header (checksum, seq\&. number, key, \&.\&.\&.), bits 8 to 12: flag, bits 13 to 15: version\&.
+.br
+\fItype\fP which protocol is encapsulated (PPP, IP, \&.\&.\&.)
+.br
+\fIsum\fP checksum (0 for libnet to autofill)\&.
+.br
+\fIoffset\fP byte offset from the start of the routing field to the first byte of the SRE
+.br
+\fIkey\fP inserted by the encapsulator to authenticate the source
+.br
+\fIseq\fP sequence number used by the receiver to sort the packets
+.br
+\fIlen\fP size of the GRE packet
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ethernet (const uint8_t * dst, const uint8_t * src, uint16_t type, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an Ethernet header\&. The RFC 894 Ethernet II header is almost identical to the IEEE 802\&.3 header, with the exception that the field immediately following the source address holds the layer 3 protocol (as opposed to frame's length)\&. You should only use this function when libnet is initialized with the LIBNET_LINK interface\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdst\fP destination ethernet address
+.br
+\fIsrc\fP source ethernet address
+.br
+\fItype\fP upper layer protocol type
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_fddi (uint8_t fc, const uint8_t * dst, const uint8_t * src, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t * oui, uint16_t type, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a Fiber Distributed Data Interface (FDDI) header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIfc\fP class format and priority
+.br
+\fIdst\fP destination fddi address
+.br
+\fIsrc\fP source fddi address
+.br
+\fIdsap\fP destination service access point
+.br
+\fIssap\fP source service access point
+.br
+\fIcf\fP cf
+.br
+\fIoui\fP 3 byte IEEE organizational code
+.br
+\fItype\fP upper layer protocol
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_gre (uint16_t fv, uint16_t type, uint16_t sum, uint16_t offset, uint32_t key, uint32_t seq, uint16_t len, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+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
+\fIfv\fP the 16 0 to 7: which fields are included in the header (checksum, seq\&. number, key, \&.\&.\&.), bits 8 to 12: flag, bits 13 to 15: version\&.
+.br
+\fItype\fP which protocol is encapsulated (PPP, IP, \&.\&.\&.)
+.br
+\fIsum\fP checksum (0 for libnet to autofill)\&.
+.br
+\fIoffset\fP byte offset from the start of the routing field to the first byte of the SRE
+.br
+\fIkey\fP inserted by the encapsulator to authenticate the source
+.br
+\fIseq\fP sequence number used by the receiver to sort the packets
+.br
+\fIlen\fP size of the GRE packet
+.br
+\fIpayload\fP
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_gre_last_sre (libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_gre_sre (uint16_t af, uint8_t offset, uint8_t length, uint8_t * routing, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fIaf\fP
+.br
+\fIoffset\fP
+.br
+\fIlength\fP
+.br
+\fIrouting\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_hsrp (uint8_t version, uint8_t opcode, uint8_t state, uint8_t hello_time, uint8_t hold_time, uint8_t priority, uint8_t group, uint8_t reserved, uint8_t authdata[HSRP_AUTHDATA_LENGTH], uint32_t virtual_ip, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a HSRP header\&. HSRP is a Cisco propietary protocol defined in RFC 2281
+.PP
+\fBParameters:\fP
+.RS 4
+\fIversion\fP version of the HSRP messages
+.br
+\fIopcode\fP type of message
+.br
+\fIstate\fP current state of the router
+.br
+\fIhello_time\fP period in seconds between hello messages
+.br
+\fIhold_time\fP seconds that the current hello message is valid
+.br
+\fIpriority\fP priority for the election proccess
+.br
+\fIgroup\fP standby group
+.br
+\fIreserved\fP reserved field
+.br
+\fIauthdata\fP password
+.br
+\fIvirtual_ip\fP virtual ip address
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv4_echo (uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IP version 4 RFC 792 Internet Control Message Protocol (ICMP) echo request/reply header
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP type of ICMP packet (should be ICMP_ECHOREPLY or ICMP_ECHO)
+.br
+\fIcode\fP code of ICMP packet (should be 0)
+.br
+\fIsum\fP checksum (0 for libnet to autofill)
+.br
+\fIid\fP identification number
+.br
+\fIseq\fP packet sequence number
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv4_mask (uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint32_t mask, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IP version 4 RFC 792 Internet Control Message Protocol (ICMP) IP netmask request/reply header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP type of ICMP packet (should be ICMP_MASKREQ or ICMP_MASKREPLY)
+.br
+\fIcode\fP code of ICMP packet (should be 0)
+.br
+\fIsum\fP checksum (0 for libnet to autofill)
+.br
+\fIid\fP identification number
+.br
+\fIseq\fP packet sequence number
+.br
+\fImask\fP subnet mask
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv4_redirect (uint8_t type, uint8_t code, uint16_t sum, uint32_t gateway, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IP version 4 RFC 792 Internet Message Control Protocol (ICMP) redirect header\&. The IP header that caused the error message should be built by a previous call to \fBlibnet_build_ipv4()\fP\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP type of ICMP packet (should be ICMP_REDIRECT)
+.br
+\fIcode\fP code of ICMP packet (should be one of the four redirect codes)
+.br
+\fIsum\fP checksum (0 for libnet to autofill)
+.br
+\fIgateway\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv4_timeexceed (uint8_t type, uint8_t code, uint16_t sum, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IP version 4 RFC 792 Internet Control Message Protocol (ICMP) time exceeded header\&. The IP header that caused the error message should be built by a previous call to \fBlibnet_build_ipv4()\fP\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP type of ICMP packet (should be ICMP_TIMXCEED)
+.br
+\fIcode\fP code of ICMP packet (ICMP_TIMXCEED_INTRANS / ICMP_TIMXCEED_REASS)
+.br
+\fIsum\fP checksum (0 for libnet to autofill)
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv4_timestamp (uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint32_t otime, uint32_t rtime, uint32_t ttime, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IP version 4 RFC 792 Internet Control Message Protocol (ICMP) timestamp request/reply header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP type of ICMP packet (should be ICMP_TSTAMP or ICMP_TSTAMPREPLY)
+.br
+\fIcode\fP code of ICMP packet (should be 0)
+.br
+\fIsum\fP checksum (0 for libnet to autofill)
+.br
+\fIid\fP identification number
+.br
+\fIseq\fP sequence number
+.br
+\fIotime\fP originate timestamp
+.br
+\fIrtime\fP receive timestamp
+.br
+\fIttime\fP transmit timestamp
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv4_unreach (uint8_t type, uint8_t code, uint16_t sum, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IP version 4 RFC 792 Internet Control Message Protocol (ICMP) unreachable header\&. The IP header that caused the error message should be built by a previous call to \fBlibnet_build_ipv4()\fP\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP type of ICMP packet (should be ICMP_UNREACH)
+.br
+\fIcode\fP code of ICMP packet (should be one of the 16 unreachable codes)
+.br
+\fIsum\fP checksum (0 for libnet to autofill)
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv6_echo (uint8_t type, uint8_t code, uint16_t sum, uint16_t id, uint16_t seq, uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IP version 6 RFC 4443 Internet Control Message Protocol (ICMP) echo or echo reply header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP type of ICMP packet (should be ICMP6_ECHO_REQUEST or ICMP6_ECHO_REPLY)
+.br
+\fIcode\fP code of ICMP packet (should be zero)
+.br
+\fIsum\fP checksum (0 for libnet to autofill)
+.br
+\fIid\fP echo id number
+.br
+\fIseq\fP echo sequence number
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv6_ndp_nadv (uint8_t type, uint8_t code, uint16_t sum, uint32_t flags, struct libnet_in6_addr target, uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IP version 6 RFC 2461 Internet Control Message Protocol (ICMP) NDP neighbour advertisement header\&. Could be used with \fBlibnet_build_icmpv6_ndp_opt()\fP and ND_OPT_TARGET_LINKADDR\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP type of ICMP packet (should be ND_NEIGHBOR_ADVERT)
+.br
+\fIcode\fP code of ICMP packet (should be zero)
+.br
+\fIsum\fP checksum (0 for libnet to autofill)
+.br
+\fIflags\fP should be a bitwise or of any applicable ND_NA_FLAG_* flags
+.br
+\fItarget\fP target ipv6 address
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv6_ndp_nsol (uint8_t type, uint8_t code, uint16_t sum, struct libnet_in6_addr target, uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IP version 6 RFC 2461 Internet Control Message Protocol (ICMP) NDP neighbour solicitation header\&. Could be used with \fBlibnet_build_icmpv6_ndp_opt()\fP and ICMPV6_NDP_OPT_SLLA\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP type of ICMP packet (should be ND_NEIGHBOR_SOLICIT)
+.br
+\fIcode\fP code of ICMP packet (should be zero)
+.br
+\fIsum\fP checksum (0 for libnet to autofill)
+.br
+\fItarget\fP target ipv6 address
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv6_ndp_opt (uint8_t type, uint8_t * option, uint32_t option_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds ICMPv6 NDP options\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP one of ND_OPT_* types
+.br
+\fIoption\fP option data
+.br
+\fIoption_s\fP size of option data (will be padded out to an 8-byte boundary)
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_icmpv6_unreach (uint8_t type, uint8_t code, uint16_t sum, uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IP version 6 RFC 4443 Internet Control Message Protocol (ICMP) unreachable header\&. The IP header that caused the error message should be built by a previous call to \fBlibnet_build_ipv6()\fP\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP type of ICMP packet (should be ICMP6_DST_UNREACH)
+.br
+\fIcode\fP code of ICMP packet (should be one of the 5 ICMP6_DST_UNREACH_* codes)
+.br
+\fIsum\fP checksum (0 for libnet to autofill)
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_igmp (uint8_t type, uint8_t reserved, uint16_t sum, uint32_t ip, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 1112 Internet Group Memebership Protocol (IGMP) header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP packet type
+.br
+\fIreserved\fP (should be 0 for IGMPv1)
+.br
+\fIsum\fP checksum (0 for libnet to autofill)
+.br
+\fIip\fP IPv4 address (in standard/network byte order)
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+\fBNote:\fP
+.RS 4
+'reserved' was previously called 'code', which it is not, in any IGMP version\&.
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ipsec_ah (uint8_t nh, uint8_t len, uint16_t res, uint32_t spi, uint32_t seq, uint32_t auth, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an Internet Protocol Security Authentication header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fInh\fP next header
+.br
+\fIlen\fP payload length
+.br
+\fIres\fP reserved
+.br
+\fIspi\fP security parameter index
+.br
+\fIseq\fP sequence number
+.br
+\fIauth\fP authentication data
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ipsec_esp_ftr (uint8_t len, uint8_t nh, int8_t * auth, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an Internet Protocol Security Encapsulating Security Payload footer\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIlen\fP padding length
+.br
+\fInh\fP next header
+.br
+\fIauth\fP authentication data
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ipsec_esp_hdr (uint32_t spi, uint32_t seq, uint32_t iv, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an Internet Protocol Security Encapsulating Security Payload header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIspi\fP security parameter index
+.br
+\fIseq\fP ESP sequence number
+.br
+\fIiv\fP initialization vector
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ipv4 (uint16_t ip_len, uint8_t tos, uint16_t id, uint16_t frag, uint8_t ttl, uint8_t prot, uint16_t sum, uint32_t src, uint32_t dst, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a version 4 RFC 791 Internet Protocol (IP) header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIip_len\fP total length of the IP packet including all subsequent data (subsequent data includes any IP options and IP options padding)
+.br
+\fItos\fP type of service bits
+.br
+\fIid\fP IP identification number
+.br
+\fIfrag\fP fragmentation bits and offset
+.br
+\fIttl\fP time to live in the network
+.br
+\fIprot\fP upper layer protocol
+.br
+\fIsum\fP checksum (0 for libnet to autofill)
+.br
+\fIsrc\fP source IPv4 address (little endian)
+.br
+\fIdst\fP destination IPv4 address (little endian)
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ipv4_options (const uint8_t * options, uint32_t options_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an version 4 Internet Protocol (IP) options header\&. The function expects options to be a valid IP options string of size options_s, no larger than 40 bytes (the maximum size of an options string)\&.
+.PP
+When building a chain, the options must be built, then the IPv4 header\&.
+.PP
+When updating a chain, if the block following the options is an IPv4 header, it's total length and header length will be updated if the options block size changes\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIoptions\fP byte string of IP options (it will be padded up to be an integral multiple of 32-bit words)\&.
+.br
+\fIoptions_s\fP length of options string
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ipv6 (uint8_t tc, uint32_t fl, uint16_t len, uint8_t nh, uint8_t hl, struct libnet_in6_addr src, struct libnet_in6_addr dst, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a version 6 RFC 2460 Internet Protocol (IP) header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItc\fP traffic class
+.br
+\fIfl\fP flow label
+.br
+\fIlen\fP total length of the IP packet
+.br
+\fInh\fP next header
+.br
+\fIhl\fP hop limit
+.br
+\fIsrc\fP source IPv6 address
+.br
+\fIdst\fP destination IPv6 address
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ipv6_destopts (uint8_t nh, uint8_t len, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a version 6 RFC 2460 Internet Protocol (IP) destination options header\&. This function is special in that it uses the payload interface to include the options data\&. The application programmer will build an IPv6 options byte string and pass it to the function using the payload interface\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fInh\fP next header
+.br
+\fIlen\fP length of the header in 8-byte octets not including the first 8 octets
+.br
+\fIpayload\fP options payload
+.br
+\fIpayload_s\fP payload length
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ipv6_frag (uint8_t nh, uint8_t reserved, uint16_t frag, uint32_t id, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a version 6 RFC 2460 Internet Protocol (IP) fragmentation header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fInh\fP next header
+.br
+\fIreserved\fP unused value\&.\&.\&. OR IS IT!
+.br
+\fIfrag\fP fragmentation bits (ala ipv4)
+.br
+\fIid\fP packet identification
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ipv6_hbhopts (uint8_t nh, uint8_t len, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a version 6 RFC 2460 Internet Protocol (IP) hop by hop options header\&. This function is special in that it uses the payload interface to include the options data\&. The application programmer will build an IPv6 hop by hop options byte string and pass it to the function using the payload interface\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fInh\fP next header
+.br
+\fIlen\fP length of the header in 8-byte octets not including the first 8 octets
+.br
+\fIpayload\fP options payload
+.br
+\fIpayload_s\fP payload length
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ipv6_routing (uint8_t nh, uint8_t len, uint8_t rtype, uint8_t segments, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a version 6 RFC 2460 Internet Protocol (IP) routing header\&. This function is special in that it uses the payload interface to include the 'type-specific data'; that is the routing information\&. Most often this will be a number of 128-bit IPv6 addresses\&. The application programmer will build a byte string of IPv6 address and pass them to the function using the payload interface\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fInh\fP next header
+.br
+\fIlen\fP length of the header in 8-byte octets not including the first 8 octets
+.br
+\fIrtype\fP routing header type
+.br
+\fIsegments\fP number of routing segments that follow
+.br
+\fIpayload\fP optional payload of routing information
+.br
+\fIpayload_s\fP payload length
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_isl (uint8_t * dhost, uint8_t type, uint8_t user, uint8_t * shost, uint16_t len, const uint8_t * snap, uint16_t vid, uint16_t portindex, uint16_t reserved, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a Cisco Inter-Switch Link (ISL) header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdhost\fP destination address (should be 01:00:0c:00:00)
+.br
+\fItype\fP type of frame
+.br
+\fIuser\fP user defined data
+.br
+\fIshost\fP source mac address
+.br
+\fIlen\fP total length of the encapuslated packet less 18 bytes
+.br
+\fIsnap\fP SNAP information (0xaaaa03 + vendor code)
+.br
+\fIvid\fP 15 bit VLAN ID, 1 bit BPDU or CDP indicator
+.br
+\fIportindex\fP port index
+.br
+\fIreserved\fP used for FDDI and token ring
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_link (const uint8_t * dst, const uint8_t * src, const uint8_t * oui, uint16_t type, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a link layer header for an initialized l\&. The function determines the proper link layer header format from how l was initialized\&. The function current supports Ethernet and Token Ring link layers\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdst\fP the destination MAC address
+.br
+\fIsrc\fP the source MAC address
+.br
+\fIoui\fP Organizationally Unique Identifier (unused for Ethernet)
+.br
+\fItype\fP the upper layer protocol type
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_mpls (uint32_t label, uint8_t experimental, uint8_t bos, uint8_t ttl, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 3032 Multi-Protocol Label Switching (MPLS) header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIlabel\fP 20-bit label value
+.br
+\fIexperimental\fP 3-bit reserved field
+.br
+\fIbos\fP 1-bit bottom of stack identifier
+.br
+\fIttl\fP time to live
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ntp (uint8_t leap_indicator, uint8_t version, uint8_t mode, uint8_t stratum, uint8_t poll, uint8_t precision, uint16_t delay_int, uint16_t delay_frac, uint16_t dispersion_int, uint16_t dispersion_frac, uint32_t reference_id, uint32_t ref_ts_int, uint32_t ref_ts_frac, uint32_t orig_ts_int, uint32_t orig_ts_frac, uint32_t rec_ts_int, uint32_t rec_ts_frac, uint32_t xmt_ts_int, uint32_t xmt_ts_frac, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 958 Network Time Protocol (NTP) header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIleap_indicator\fP the leap indicator
+.br
+\fIversion\fP NTP protocol version
+.br
+\fImode\fP NTP mode
+.br
+\fIstratum\fP stratum
+.br
+\fIpoll\fP polling interval
+.br
+\fIprecision\fP precision
+.br
+\fIdelay_int\fP delay interval
+.br
+\fIdelay_frac\fP delay fraction
+.br
+\fIdispersion_int\fP dispersion interval
+.br
+\fIdispersion_frac\fP dispersion fraction
+.br
+\fIreference_id\fP reference id
+.br
+\fIref_ts_int\fP reference timestamp integer
+.br
+\fIref_ts_frac\fP reference timestamp fraction
+.br
+\fIorig_ts_int\fP original timestamp integer
+.br
+\fIorig_ts_frac\fP original timestamp fraction
+.br
+\fIrec_ts_int\fP receiver timestamp integer
+.br
+\fIrec_ts_frac\fP reciever timestamp fraction
+.br
+\fIxmt_ts_int\fP transmit timestamp integer
+.br
+\fIxmt_ts_frac\fP transmit timestamp integer
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ospfv2 (uint16_t len, uint8_t type, uint32_t rtr_id, uint32_t area_id, uint16_t sum, uint16_t autype, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fIlen\fP
+.br
+\fItype\fP
+.br
+\fIrtr_id\fP
+.br
+\fIarea_id\fP
+.br
+\fIsum\fP
+.br
+\fIautype\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ospfv2_dbd (uint16_t dgram_len, uint8_t opts, uint8_t type, uint32_t seqnum, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdgram_len\fP
+.br
+\fIopts\fP
+.br
+\fItype\fP
+.br
+\fIseqnum\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ospfv2_hello (uint32_t netmask, uint16_t interval, uint8_t opts, uint8_t priority, uint32_t dead_int, uint32_t des_rtr, uint32_t bkup_rtr, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fInetmask\fP
+.br
+\fIinterval\fP
+.br
+\fIopts\fP
+.br
+\fIpriority\fP
+.br
+\fIdead_int\fP
+.br
+\fIdes_rtr\fP
+.br
+\fIbkup_rtr\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "libnet_ptag_t libnet_build_ospfv2_hello_neighbor (uint32_t netmask, uint16_t interval, uint8_t opts, uint8_t priority, uint32_t dead_int, uint32_t des_rtr, uint32_t bkup_rtr, uint32_t neighbor, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fInetmask\fP
+.br
+\fIinterval\fP
+.br
+\fIopts\fP
+.br
+\fIpriority\fP
+.br
+\fIdead_int\fP
+.br
+\fIdes_rtr\fP
+.br
+\fIbkup_rtr\fP
+.br
+\fIneighbor\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa (uint16_t age, uint8_t opts, uint8_t type, uint32_t lsid, uint32_t advrtr, uint32_t seqnum, uint16_t sum, uint16_t len, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fIage\fP
+.br
+\fIopts\fP
+.br
+\fItype\fP
+.br
+\fIlsid\fP
+.br
+\fIadvrtr\fP
+.br
+\fIseqnum\fP
+.br
+\fIsum\fP
+.br
+\fIlen\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa_as (uint32_t nmask, uint32_t metric, uint32_t fwdaddr, uint32_t tag, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fInmask\fP
+.br
+\fImetric\fP
+.br
+\fIfwdaddr\fP
+.br
+\fItag\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa_net (uint32_t nmask, uint32_t rtrid, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fInmask\fP
+.br
+\fIrtrid\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa_rtr (uint16_t flags, uint16_t num, uint32_t id, uint32_t data, uint8_t type, uint8_t tos, uint16_t metric, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fIflags\fP
+.br
+\fInum\fP
+.br
+\fIid\fP
+.br
+\fIdata\fP
+.br
+\fItype\fP
+.br
+\fItos\fP
+.br
+\fImetric\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsa_sum (uint32_t nmask, uint32_t metric, uint32_t tos, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fInmask\fP
+.br
+\fImetric\fP
+.br
+\fItos\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsr (uint32_t type, uint32_t lsid, uint32_t advrtr, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP
+.br
+\fIlsid\fP
+.br
+\fIadvrtr\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_ospfv2_lsu (uint32_t num, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fInum\fP
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_rip (uint8_t cmd, uint8_t version, uint16_t rd, uint16_t af, uint16_t rt, uint32_t addr, uint32_t mask, uint32_t next_hop, uint32_t metric, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a Routing Information Protocol header (RFCs 1058 and 2453)\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIcmd\fP command
+.br
+\fIversion\fP protocol version
+.br
+\fIrd\fP version one: 0, version two: routing domain
+.br
+\fIaf\fP address family
+.br
+\fIrt\fP version one: 0, version two: route tag
+.br
+\fIaddr\fP IPv4 address
+.br
+\fImask\fP version one: 0, version two: subnet mask
+.br
+\fInext_hop\fP version one: 0, version two: next hop address
+.br
+\fImetric\fP routing metric
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_rpc_call (uint32_t rm, uint32_t xid, uint32_t prog_num, uint32_t prog_vers, uint32_t procedure, uint32_t cflavor, uint32_t clength, uint8_t * cdata, uint32_t vflavor, uint32_t vlength, const uint8_t * vdata, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an Remote Procedure Call (Version 2) Call message header as specified in RFC 1831\&. This builder provides the option for specifying the record marking which is required when used with streaming protocols (TCP)\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIrm\fP record marking indicating the position in a stream, 0 otherwise
+.br
+\fIxid\fP transaction identifier used to link calls and replies
+.br
+\fIprog_num\fP remote program specification typically between 0 - 1fffffff
+.br
+\fIprog_vers\fP remote program version specification
+.br
+\fIprocedure\fP procedure to be performed by remote program
+.br
+\fIcflavor\fP authentication credential type
+.br
+\fIclength\fP credential length (should be 0)
+.br
+\fIcdata\fP opaque credential data (currently unused)
+.br
+\fIvflavor\fP authentication verifier type
+.br
+\fIvlength\fP verifier length (should be 0)
+.br
+\fIvdata\fP opaque verifier data (currently unused)
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_sebek (uint32_t magic, uint16_t version, uint16_t type, uint32_t counter, uint32_t time_sec, uint32_t time_usec, uint32_t pid, uint32_t uid, uint32_t fd, uint8_t cmd[SEBEK_CMD_LENGTH], uint32_t length, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a Sebek header\&. The Sebek protocol was designed by the Honeynet Project as a transport mechanism for post-intrusion forensic data\&. More information may be found here: http://www.honeynet.org/papers/sebek.pdf\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fImagic\fP identify packets that should be hidden
+.br
+\fIversion\fP protocol version, currently 1
+.br
+\fItype\fP type of record (read data is type 0, write data is type 1)
+.br
+\fIcounter\fP PDU counter used to identify when packet are lost
+.br
+\fItime_sec\fP seconds since EPOCH according to the honeypot
+.br
+\fItime_usec\fP residual microseconds
+.br
+\fIpid\fP PID
+.br
+\fIuid\fP UID
+.br
+\fIfd\fP FD
+.br
+\fIcmd\fP 12 first characters of the command
+.br
+\fIlength\fP length in bytes of the PDU's body
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_stp_conf (uint16_t id, uint8_t version, uint8_t bpdu_type, uint8_t flags, const uint8_t * root_id, uint32_t root_pc, const uint8_t * bridge_id, uint16_t port_id, uint16_t message_age, uint16_t max_age, uint16_t hello_time, uint16_t f_delay, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IEEE 802\&.1d Spanning Tree Protocol (STP) configuration header\&. STP frames are usually encapsulated inside of an 802\&.2 + 802\&.3 frame combination\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIid\fP protocol id
+.br
+\fIversion\fP protocol version
+.br
+\fIbpdu_type\fP bridge protocol data unit type
+.br
+\fIflags\fP flags
+.br
+\fIroot_id\fP root id
+.br
+\fIroot_pc\fP root path cost
+.br
+\fIbridge_id\fP bridge id
+.br
+\fIport_id\fP port id
+.br
+\fImessage_age\fP message age
+.br
+\fImax_age\fP max age
+.br
+\fIhello_time\fP hello time
+.br
+\fIf_delay\fP forward delay
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_stp_tcn (uint16_t id, uint8_t version, uint8_t bpdu_type, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an IEEE 802\&.1d Spanning Tree Protocol (STP) topology change notification header\&. STP frames are usually encapsulated inside of an 802\&.2 + 802\&.3 frame combination\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIid\fP protocol id
+.br
+\fIversion\fP protocol version
+.br
+\fIbpdu_type\fP bridge protocol data unit type
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_tcp (uint16_t sp, uint16_t dp, uint32_t seq, uint32_t ack, uint8_t control, uint16_t win, uint16_t sum, uint16_t urg, uint16_t len, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 793 Transmission Control Protocol (TCP) header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIsp\fP source port
+.br
+\fIdp\fP destination port
+.br
+\fIseq\fP sequence number
+.br
+\fIack\fP acknowledgement number
+.br
+\fIcontrol\fP control flags
+.br
+\fIwin\fP window size
+.br
+\fIsum\fP checksum (0 for libnet to autofill)
+.br
+\fIurg\fP urgent pointer
+.br
+\fIlen\fP total length of the TCP packet (for checksum calculation)
+.br
+\fIpayload\fP
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_tcp_options (const uint8_t * options, uint32_t options_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 793 Transmission Control Protocol (TCP) options header\&. The function expects options to be a valid TCP options string of size options_s, which is no larger than 40 bytes (the maximum size of an options string)\&. The function checks to ensure that the packet consists of a TCP header preceded by an IPv4 header, and that the addition of the options string would not result in a packet larger than 65,535 bytes (IPMAXPACKET)\&. The function counts up the number of 32-bit words in the options string and adjusts the TCP header length value as necessary\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIoptions\fP byte string of TCP options
+.br
+\fIoptions_s\fP length of options string
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_token_ring (uint8_t ac, uint8_t fc, const uint8_t * dst, const uint8_t * src, uint8_t dsap, uint8_t ssap, uint8_t cf, const uint8_t * oui, uint16_t type, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds a token ring header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIac\fP access control
+.br
+\fIfc\fP frame control
+.br
+\fIdst\fP destination address
+.br
+\fIsrc\fP source address
+.br
+\fIdsap\fP destination service access point
+.br
+\fIssap\fP source service access point
+.br
+\fIcf\fP control field
+.br
+\fIoui\fP Organizationally Unique Identifier
+.br
+\fItype\fP upper layer protocol type
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_udp (uint16_t sp, uint16_t dp, uint16_t len, uint16_t sum, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 768 User Datagram Protocol (UDP) header\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIsp\fP source port
+.br
+\fIdp\fP destination port
+.br
+\fIlen\fP total length of the UDP packet
+.br
+\fIsum\fP checksum (0 for libnet to autofill)
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API libnet_ptag_t libnet_build_vrrp (uint8_t version, uint8_t type, uint8_t vrouter_id, uint8_t priority, uint8_t ip_count, uint8_t auth_type, uint8_t advert_int, uint16_t sum, const uint8_t * payload, uint32_t payload_s, libnet_t * l, libnet_ptag_t ptag)"
+Builds an RFC 2338 Virtual Router Redundacy Protool (VRRP) header\&. Use the payload interface to specify address and autthentication information\&. To build a 'legal' packet, the destination IPv4 address should be the multicast * address 224\&.0\&.0\&.18, the IP TTL should be set to 255, and the IP protocol should be set to 112\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIversion\fP VRRP version (should be 2)
+.br
+\fItype\fP VRRP packet type (should be 1 -- ADVERTISEMENT)
+.br
+\fIvrouter_id\fP virtual router identification
+.br
+\fIpriority\fP priority (higher numbers indicate higher priority)
+.br
+\fIip_count\fP number of IPv4 addresses contained in this advertisement
+.br
+\fIauth_type\fP type of authentication (0, 1, 2 -- see RFC)
+.br
+\fIadvert_int\fP interval between advertisements
+.br
+\fIsum\fP checksum (0 for libnet to autofill)
+.br
+\fIpayload\fP optional payload or NULL
+.br
+\fIpayload_s\fP payload length or 0
+.br
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP protocol tag to modify an existing header, 0 to build a new one
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+protocol tag value on success
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SS "LIBNET_API void libnet_clear_packet (libnet_t * l)"
+Clears the current packet referenced and frees all pblocks\&. Should be called when the programmer want to send a completely new packet of a different type using the same context\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+
+.SS "int libnet_cq_add (libnet_t * l, char * label)"
+[Context Queue] Adds a new context to the libnet context queue\&. If no queue exists, this function will create the queue and add the specified libnet context as the first entry on the list\&. The functions checks to ensure niether l nor label are NULL, and that label doesn't refer to an existing context already in the queue\&. Additionally, l should refer to a libnet context previously initialized with a call to \fBlibnet_init()\fP\&. If the context queue in write locked, this function will fail\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIlabel\fP a canonical name given to recognize the new context, no longer than LIBNET_LABEL_SIZE
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP on success
+.br
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API void libnet_cq_destroy (void)"
+[Context Queue] Destroys the entire context queue, calling \fBlibnet_destroy()\fP on each member context\&.
+.SS "LIBNET_API uint32_t libnet_cq_end_loop (void)"
+[Context Queue]
+.SS "LIBNET_API libnet_t* libnet_cq_find_by_label (char * label)"
+[Context Queue] Locates a libnet context from the queue, indexed by a canonical label\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIlabel\fP canonical label of the libnet context to retrieve
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the expected libnet context
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fINULL\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API const char* libnet_cq_getlabel (libnet_t * l)"
+[Context Queue] Returns the canonical label associated with the context\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+pointer to the libnet context's label
+.RE
+.PP
+
+.SS "LIBNET_API libnet_t* libnet_cq_head (void)"
+[Context Queue] Intiailizes the interator interface and set a write lock on the entire queue\&. This function is intended to be called just prior to interating through the entire list of contexts (with the probable intent of inject a series of packets in rapid succession)\&. This function is often used as per the following:
+.PP
+for (l = \fBlibnet_cq_head()\fP; \fBlibnet_cq_last()\fP; l = \fBlibnet_cq_next()\fP) { \&.\&.\&. }
+.PP
+Much of the time, the application programmer will use the iterator as it is written above; as such, libnet provides a macro to do exactly that, \fBfor_each_context_in_cq(l)\fP\&. Warning: do not call the iterator more than once in a single loop\&.
+.PP
+\fBReturns:\fP
+.RS 4
+the head of the context queue
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_cq_last (void)"
+[Context Queue] Check whether the iterator is at the last context in the queue\&.
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP if at the end of the context queue
+.br
+\fI0\fP otherwise
+.RE
+.PP
+
+.SS "LIBNET_API libnet_t* libnet_cq_next (void)"
+[Context Queue] Get next context from the context queue\&.
+.PP
+\fBReturns:\fP
+.RS 4
+the next context from the context queue
+.RE
+.PP
+
+.SS "LIBNET_API libnet_t* libnet_cq_remove (libnet_t * l)"
+[Context Queue] Removes a specified context from the libnet context queue by specifying the libnet context pointer\&. Note the function will remove the specified context from the context queue and cleanup internal memory from the queue, it is up to the application programmer to free the returned libnet context with a call to \fBlibnet_destroy()\fP\&. Also, as it is not necessary to keep the libnet context pointer when initially adding it to the context queue, most application programmers will prefer to refer to entries on the context queue by canonical name and would use \fBlibnet_cq_remove_by_label()\fP\&. If the context queue is write locked, this function will fail\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the pointer to the removed libnet context
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fINULL\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API libnet_t* libnet_cq_remove_by_label (char * label)"
+[Context Queue] Removes a specified context from the libnet context queue by specifying the canonical name\&. Note the function will remove the specified context from the context queue and cleanup internal memory from the queue, it is up to the application programmer to free the returned libnet context with a call to \fBlibnet_destroy()\fP\&. If the context queue is write locked, this function will fail\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIlabel\fP canonical name of the context to remove
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the pointer to the removed libnet context
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fINULL\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API uint32_t libnet_cq_size (void)"
+[Context Queue] Function returns the number of libnet contexts that are in the queue\&.
+.PP
+\fBReturns:\fP
+.RS 4
+the number of libnet contexts currently in the queue
+.RE
+.PP
+
+.SS "LIBNET_API void libnet_destroy (libnet_t * l)"
+Shuts down the libnet session referenced by l\&. It closes the network interface and frees all internal memory structures associated with l\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+
+.SS "LIBNET_API void libnet_diag_dump_context (libnet_t * l)"
+[Diagnostic] Prints the contents of the given context\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+
+.SS "void libnet_diag_dump_hex (const uint8_t * packet, uint32_t len, int swap, FILE * stream)"
+[Diagnostic] Function prints the contents of the supplied buffer to the supplied stream pointer\&. Will swap endianness based disposition of mode variable\&. Useful to be used in conjunction with the advanced interface and a culled packet\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIpacket\fP the packet to print
+.br
+\fIlen\fP length of the packet in bytes
+.br
+\fIswap\fP 1 to swap byte order, 0 to not\&. Counter-intuitively, it is necessary to swap in order to see the byte order as it is on the wire (this may be a bug)\&.
+.br
+\fIstream\fP a stream pointer to print to
+.RE
+.PP
+
+.SS "LIBNET_API void libnet_diag_dump_pblock (libnet_t * l)"
+[Diagnostic] Prints the contents of every pblock\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+
+.SS "LIBNET_API char* libnet_diag_dump_pblock_type (uint8_t type)"
+[Diagnostic] Returns the canonical name of the pblock type\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fItype\fP pblock type
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+a string representing the pblock type type
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fIunknown\fP for an unknown value
+.RE
+.PP
+
+.SS "LIBNET_API struct libnet_ether_addr* libnet_get_hwaddr (libnet_t * l)"
+Returns the MAC address for the device libnet was initialized with\&. If libnet was initialized without a device the function will attempt to find one\&. If the function fails and returns NULL a call to \fBlibnet_geterror()\fP will tell you why\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+a pointer to the MAC address or NULL
+.RE
+.PP
+
+.SS "LIBNET_API uint32_t libnet_get_ipaddr4 (libnet_t * l)"
+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
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+a big endian IP address suitable for use in a libnet_build function
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP
+.RE
+.PP
+
+.SS "LIBNET_API struct libnet_in6_addr libnet_get_ipaddr6 (libnet_t * l)"
+Returns the IPv6 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 in6addr_error, a call to libnet_geterrror() will tell you why\&. This function is not yet implemented for Win32 platforms\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fIin6addr_error\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API uint32_t libnet_get_prand (int mod)"
+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
+\fImod\fP one the of LIBNET_PR* constants
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP on success
+.br
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API const char* libnet_getdevice (libnet_t * l)"
+Returns the canonical name of the device used for packet injection\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the canonical name of the device used for packet injection\&. Note it can be NULL without being an error\&.
+.RE
+.PP
+
+.SS "LIBNET_API char* libnet_geterror (libnet_t * l)"
+Returns the last error set inside of the referenced libnet context\&. This function should be called anytime a function fails or an error condition is detected inside of libnet\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+an error string or NULL if no error has occured
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_getfd (libnet_t * l)"
+Returns the FILENO of the file descriptor used for packet injection\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the file number of the file descriptor used for packet injection
+.RE
+.PP
+
+.SS "LIBNET_API uint32_t libnet_getgre_length (uint16_t fv)"
+
+.PP
+\fBParameters:\fP
+.RS 4
+\fIfv\fP see \fBlibnet_build_gre()\fP\&.
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+size
+.RE
+.PP
+\fBSee also:\fP
+.RS 4
+\fBlibnet_build_gre()\fP\&.
+.RE
+.PP
+
+.SS "LIBNET_API uint32_t libnet_getpacket_size (libnet_t * l)"
+Returns the sum of the size of all of the pblocks inside of l (this should be the resuling packet size)\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the size of the packet in l
+.RE
+.PP
+
+.SS "LIBNET_API uint8_t* libnet_getpbuf (libnet_t * l, libnet_ptag_t ptag)"
+Returns the pblock buffer contents for the specified ptag; a subsequent call to \fBlibnet_getpbuf_size()\fP should be made to determine the size of the buffer\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP the ptag reference number
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+a pointer to the pblock buffer or NULL on error
+.RE
+.PP
+
+.SS "LIBNET_API uint32_t libnet_getpbuf_size (libnet_t * l, libnet_ptag_t ptag)"
+Returns the pblock buffer size for the specified ptag; a previous call to \fBlibnet_getpbuf()\fP should be made to pull the actual buffer contents\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP the ptag reference number
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the size of the pblock buffer
+.RE
+.PP
+
+.SS "LIBNET_API uint8_t* libnet_hex_aton (const char * s, int * len)"
+Takes a colon separated hexidecimal address (from the command line) and returns a bytestring suitable for use in a libnet_build function\&. Note this function performs an implicit malloc and the return value should be freed after its use\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIs\fP the string to be parsed
+.br
+\fIlen\fP the resulting size of the returned byte string
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+a byte string or NULL on failure
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_in6_is_error (struct libnet_in6_addr addr)"
+Check a libnet_in6_addr structure for identity with in6addr_error\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIaddr\fP address to check
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP if addr is in6addr_error
+.br
+\fI0\fP if it is not
+.RE
+.PP
+
+.SS "LIBNET_API libnet_t* libnet_init (int injection_type, const char * device, char * err_buf)"
+Creates the libnet environment\&. It initializes the library and returns a libnet context\&. If the injection_type is LIBNET_LINK or LIBNET_LINK_ADV, the function initializes the injection primitives for the link-layer interface enabling the application programmer to build packets starting at the data-link layer (which also provides more granular control over the IP layer)\&. If libnet uses the link-layer and the device argument is non-NULL, the function attempts to use the specified network device for packet injection\&. This is either a canonical string that references the device (such as 'eth0' for a 100MB Ethernet card on Linux or 'fxp0' for a 100MB Ethernet card on OpenBSD) or the dots and decimals representation of the device's IP address (192\&.168\&.0\&.1)\&. If device is NULL, libnet attempts to find a suitable device to use\&. If the injection_type is LIBNET_RAW4 or LIBNET_RAW4_ADV, the function initializes the injection primitives for the IPv4 raw socket interface\&. The final argument, err_buf, should be a buffer of size LIBNET_ERRBUF_SIZE and holds an error message if the function fails\&. This function requires root privileges to execute successfully\&. Upon success, the function returns a valid libnet context for use in later function calls; upon failure, the function returns NULL\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIinjection_type\fP packet injection type (LIBNET_LINK, LIBNET_LINK_ADV, LIBNET_RAW4, LIBNET_RAW4_ADV, LIBNET_RAW6, LIBNET_RAW6_ADV)
+.br
+\fIdevice\fP the interface to use (NULL and libnet will choose one)
+.br
+\fIerr_buf\fP will contain an error message on failure
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+libnet context ready for use or NULL on error\&.
+.RE
+.PP
+
+.SS "LIBNET_API uint32_t libnet_name2addr4 (libnet_t * l, const char * host_name, uint8_t use_name)"
+Takes a dotted decimal string or a canonical DNS name and returns a network byte ordered IPv4 address\&. This may incur a DNS lookup if mode is set to LIBNET_RESOLVE and host_name refers to a canonical DNS name\&. If mode is set to LIBNET_DONT_RESOLVE no DNS lookup will occur\&. The function can fail if DNS lookup fails or if mode is set to LIBNET_DONT_RESOLVE and host_name refers to a canonical DNS name\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIhost_name\fP pointer to a string containing a presentation format host name
+.br
+\fIuse_name\fP LIBNET_RESOLVE or LIBNET_DONT_RESOLVE
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+address in network byte order
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP (2^32 - 1) on error
+.RE
+.PP
+
+.SS "LIBNET_API struct libnet_in6_addr libnet_name2addr6 (libnet_t * l, const char * host_name, uint8_t use_name)"
+Takes a dotted decimal string or a canonical DNS name and returns a network byte ordered IPv6 address\&. This may incur a DNS lookup if mode is set to LIBNET_RESOLVE and host_name refers to a canonical DNS name\&. If mode is set to LIBNET_DONT_RESOLVE no DNS lookup will occur\&. The function can fail if DNS lookup fails or if mode is set to LIBNET_DONT_RESOLVE and host_name refers to a canonical DNS name\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIhost_name\fP pointer to a string containing a presentation format host name
+.br
+\fIuse_name\fP LIBNET_RESOLVE or LIBNET_DONT_RESOLVE
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+network byte ordered IPv6 address structure
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_plist_chain_dump (libnet_plist_t * plist)"
+Runs through the port list and prints the contents of the port list chain list to stdout\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIplist\fP previously created portlist
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP on success
+.br
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API char* libnet_plist_chain_dump_string (libnet_plist_t * plist)"
+Runs through the port list and prints the contents of the port list chain list to string\&. This function uses strdup and is not re-entrant\&. It also has a memory leak and should not really be used\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIplist\fP previously created portlist
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+a printable string containing the port list contents on success or NULL on error
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_plist_chain_free (libnet_plist_t * plist)"
+Frees all memory associated with port list chain\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIplist\fP previously created portlist
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP on success
+.br
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_plist_chain_new (libnet_t * l, libnet_plist_t ** plist, char * token_list)"
+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
+.IP "1." 4
+Upon failure, the function returns -1 and \fBlibnet_geterror()\fP can tell you why\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIplist\fP if successful, will refer to the portlist, if not, NULL
+.br
+\fItoken_list\fP string containing the port list primitive
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP on success
+.br
+\fI-1\fP on failure
+.RE
+.PP
+
+.PP
+
+.SS "LIBNET_API int libnet_plist_chain_next_pair (libnet_plist_t * plist, uint16_t * bport, uint16_t * eport)"
+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
+\fIplist\fP previously created portlist
+.br
+\fIbport\fP will contain the beginning port number or 0
+.br
+\fIeport\fP will contain the ending port number or 0
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP on success
+.br
+\fI0\fP if empty
+.br
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_seed_prand (libnet_t * l)"
+Seeds the psuedo-random number generator\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP on success
+.br
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API void libnet_stats (libnet_t * l, struct libnet_stats * ls)"
+Fills in a libnet_stats structure with packet injection statistics (packets written, bytes written, packet sending errors)\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIls\fP pointer to a libnet statistics structure
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_toggle_checksum (libnet_t * l, libnet_ptag_t ptag, int mode)"
+If a given protocol header is built with the checksum field set to '0', by default libnet will calculate the header checksum prior to injection\&. If the header is set to any other value, by default libnet will not calculate the header checksum\&. To over-ride this behavior, use \fBlibnet_toggle_checksum()\fP\&. Switches auto-checksumming on or off for the specified ptag\&. If mode is set to LIBNET_ON, libnet will mark the specificed ptag to calculate a checksum for the ptag prior to injection\&. This assumes that the ptag refers to a protocol that has a checksum field\&. If mode is set to LIBNET_OFF, libnet will clear the checksum flag and no checksum will be computed prior to injection\&. This assumes that the programmer will assign a value (zero or otherwise) to the checksum field\&. Often times this is useful if a precomputed checksum or some other predefined value is going to be used\&. Note that when libnet is initialized with LIBNET_RAW4, the IPv4 header checksum will always be computed by the kernel prior to injection, regardless of what the programmer sets\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.br
+\fIptag\fP the ptag reference number
+.br
+\fImode\fP LIBNET_ON or LIBNET_OFF
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI1\fP on success
+.br
+\fI-1\fP on failure
+.RE
+.PP
+
+.SS "LIBNET_API const char* libnet_version (void)"
+Returns the version of libnet\&.
+.PP
+\fBReturns:\fP
+.RS 4
+the libnet version
+.RE
+.PP
+
+.SS "LIBNET_API int libnet_write (libnet_t * l)"
+Writes a prebuilt packet to the network\&. The function assumes that l was previously initialized (via a call to \fBlibnet_init()\fP) and that a previously constructed packet has been built inside this context (via one or more calls to the libnet_build* family of functions) and is ready to go\&. Depending on how libnet was initialized, the function will write the packet to the wire either via the raw or link layer interface\&. The function will also bump up the internal libnet stat counters which are retrievable via \fBlibnet_stats()\fP\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIl\fP pointer to a libnet context
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the number of bytes written
+.RE
+.PP
+\fBReturn values:\fP
+.RS 4
+\fI-1\fP on error
+.RE
+.PP
+
+.SH "Author"
+.PP
+Generated automatically by Doxygen for libnet from the source code\&.
diff --git a/doc/man/man3/libnet-macros.3 b/doc/man/man3/libnet-macros.3
new file mode 100644
index 0000000..af572bd
--- /dev/null
+++ b/doc/man/man3/libnet-macros.3
@@ -0,0 +1,127 @@
+.TH "LIBNET-MACROS" 3 "Wed Apr 26 2017" "libnet-1.2-rc3" "libnet Programmers Guide" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+libnet-macros.h \- libnet macros and symbolic constants
+
+.SH SYNOPSIS
+.br
+.PP
+.SS "Macros"
+
+.in +1c
+.ti -1c
+.RI "#define \fBLIBNET_DONT_RESOLVE\fP 0"
+.br
+.ti -1c
+.RI "#define \fBLIBNET_RESOLVE\fP 1"
+.br
+.ti -1c
+.RI "#define \fBLIBNET_ON\fP 0"
+.br
+.ti -1c
+.RI "#define \fBLIBNET_OFF\fP 1"
+.br
+.ti -1c
+.RI "#define \fBIN6ADDR_ERROR_INIT\fP"
+.br
+.ti -1c
+.RI "#define \fBLIBNET_PR2\fP 0"
+.br
+.ti -1c
+.RI "#define \fBLIBNET_MAX_PACKET\fP 0xffff"
+.br
+.ti -1c
+.RI "#define \fBLIBNET_ERRBUF_SIZE\fP 0x100"
+.br
+.ti -1c
+.RI "#define \fBLIBNET_MAXOPTION_SIZE\fP 0x28"
+.br
+.ti -1c
+.RI "#define \fBfor_each_context_in_cq\fP(l) for (l = \fBlibnet_cq_head\fP(); \fBlibnet_cq_last\fP(); l = \fBlibnet_cq_next\fP())"
+.br
+.in -1c
+.SH "Detailed Description"
+.PP
+libnet macros and symbolic constants
+
+
+.SH "Macro Definition Documentation"
+.PP
+.SS "#define for_each_context_in_cq(l) for (l = \fBlibnet_cq_head\fP(); \fBlibnet_cq_last\fP(); l = \fBlibnet_cq_next\fP())"
+Provides an interface to iterate through the context queue of libnet contexts\&. Before calling this macro, be sure to set the queue using \fBlibnet_cq_head()\fP\&.
+.SS "#define IN6ADDR_ERROR_INIT"
+\fBValue:\fP
+.PP
+.nf
+{ { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
+ 0xff, 0xff } } }
+.fi
+IPv6 error code
+.SS "#define LIBNET_DONT_RESOLVE 0"
+Used for libnet's name resolution functions, specifies that no DNS lookups should be performed and the IP address should be kept in numeric form\&.
+.SS "#define LIBNET_ERRBUF_SIZE 0x100"
+The libnet error buffer is 256 bytes long\&.
+.SS "#define LIBNET_MAX_PACKET 0xffff"
+The biggest an IP packet can be -- 65,535 bytes\&.
+.SS "#define LIBNET_MAXOPTION_SIZE 0x28"
+IP and TCP options can be up to 40 bytes long\&.
+.SS "#define LIBNET_OFF 1"
+Used several places, to specify 'on' or 'one'
+.SS "#define LIBNET_ON 0"
+Used several places, to specify 'on' or 'one'
+.SS "#define LIBNET_PR2 0"
+Used for \fBlibnet_get_prand()\fP to specify function disposition
+.SS "#define LIBNET_RESOLVE 1"
+Used for libnet's name resolution functions, specifies that a DNS lookup can be performed if needed to resolve the IP address to a canonical form\&.
+.SH "SEE ALSO"
+\.IX Header "SEE ALSO"
+libnet(3), libnet\-config(1)
+.SH "AUTHORS"
+.IX Header "AUTHORS"
+The original author of libnet is Mike D. Schiffman.
+.PP
+libnet has been maintained and extensively enhanced since 2009 by Sam Roberts.
+.PP
+It is currently maintained by Ali Abdulkadir and available at
+.PP
+.Vb 1
+\& <https://github.com/sgeto/libnet>
+.Ve
+.SH "BUGS"
+.IX Header "BUGS"
+For bugs, questions, patch submissions, desirable enhancements, etc. see:
+.PP
+.Vb 1
+\& <https://github.com/sgeto/libnet/issues>
+.Ve
+.SH "COPYRIGHT"
+.IX Header "COPYRIGHT"
+libnet is licensed under the 3\-Clause \s-1BSD\s0 License. You can basically
+do whatever you want with it.
+.SH "SEE ALSO"
+\.IX Header "SEE ALSO"
+libnet(3), libnet\-config(1)
+.SH "AUTHORS"
+.IX Header "AUTHORS"
+The original author of libnet is Mike D. Schiffman.
+.PP
+libnet has been maintained and extensively enhanced since 2009 by Sam Roberts.
+.PP
+It is currently maintained by Ali Abdulkadir and available at
+.PP
+.Vb 1
+\& <https://github.com/sgeto/libnet>
+.Ve
+.SH "BUGS"
+.IX Header "BUGS"
+For bugs, questions, patch submissions, desirable enhancements, etc. see:
+.PP
+.Vb 1
+\& <https://github.com/sgeto/libnet/issues>
+.Ve
+.SH "COPYRIGHT"
+.IX Header "COPYRIGHT"
+libnet is licensed under the 3\-Clause \s-1BSD\s0 License. You can basically
+do whatever you want with it.
diff --git a/doc/man/man3/libnet-macros.h.3 b/doc/man/man3/libnet-macros.h.3
new file mode 100644
index 0000000..bbe12a4
--- /dev/null
+++ b/doc/man/man3/libnet-macros.h.3
@@ -0,0 +1,80 @@
+.TH "libnet-macros.h" 3 "Sat Sep 28 2019" "Version 1.1" "libnet" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+libnet-macros.h \- libnet macros and symbolic constants
+
+.SH SYNOPSIS
+.br
+.PP
+.SS "Macros"
+
+.in +1c
+.ti -1c
+.RI "#define \fBLIBNET_DONT_RESOLVE\fP 0"
+.br
+.ti -1c
+.RI "#define \fBLIBNET_RESOLVE\fP 1"
+.br
+.ti -1c
+.RI "#define \fBLIBNET_ON\fP 0"
+.br
+.ti -1c
+.RI "#define \fBLIBNET_OFF\fP 1"
+.br
+.ti -1c
+.RI "#define \fBIN6ADDR_ERROR_INIT\fP"
+.br
+.ti -1c
+.RI "#define \fBLIBNET_PR2\fP 0"
+.br
+.ti -1c
+.RI "#define \fBLIBNET_MAX_PACKET\fP 0xffff"
+.br
+.ti -1c
+.RI "#define \fBLIBNET_ERRBUF_SIZE\fP 0x100"
+.br
+.ti -1c
+.RI "#define \fBLIBNET_MAXOPTION_SIZE\fP 0x28"
+.br
+.ti -1c
+.RI "#define \fBfor_each_context_in_cq\fP(l) for (l = \fBlibnet_cq_head\fP(); \fBlibnet_cq_last\fP(); l = \fBlibnet_cq_next\fP())"
+.br
+.in -1c
+.SH "Detailed Description"
+.PP
+libnet macros and symbolic constants
+
+
+.SH "Macro Definition Documentation"
+.PP
+.SS "#define for_each_context_in_cq(l) for (l = \fBlibnet_cq_head\fP(); \fBlibnet_cq_last\fP(); l = \fBlibnet_cq_next\fP())"
+Provides an interface to iterate through the context queue of libnet contexts\&. Before calling this macro, be sure to set the queue using \fBlibnet_cq_head()\fP\&.
+.SS "#define IN6ADDR_ERROR_INIT"
+\fBValue:\fP
+.PP
+.nf
+{ { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
+ 0xff, 0xff } } }
+.fi
+IPv6 error code
+.SS "#define LIBNET_DONT_RESOLVE 0"
+Used for libnet's name resolution functions, specifies that no DNS lookups should be performed and the IP address should be kept in numeric form\&.
+.SS "#define LIBNET_ERRBUF_SIZE 0x100"
+The libnet error buffer is 256 bytes long\&.
+.SS "#define LIBNET_MAX_PACKET 0xffff"
+The biggest an IP packet can be -- 65,535 bytes\&.
+.SS "#define LIBNET_MAXOPTION_SIZE 0x28"
+IP and TCP options can be up to 40 bytes long\&.
+.SS "#define LIBNET_OFF 1"
+Used several places, to specify 'on' or 'one'
+.SS "#define LIBNET_ON 0"
+Used several places, to specify 'on' or 'one'
+.SS "#define LIBNET_PR2 0"
+Used for \fBlibnet_get_prand()\fP to specify function disposition
+.SS "#define LIBNET_RESOLVE 1"
+Used for libnet's name resolution functions, specifies that a DNS lookup can be performed if needed to resolve the IP address to a canonical form\&.
+.SH "Author"
+.PP
+Generated automatically by Doxygen for libnet from the source code\&.
diff --git a/doc/man/man3/libnet.3 b/doc/man/man3/libnet.3
new file mode 100644
index 0000000..46bfd8b
--- /dev/null
+++ b/doc/man/man3/libnet.3
@@ -0,0 +1,197 @@
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+. ds C`
+. ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{
+. if \nF \{
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. if !\nF==2 \{
+. nr % 0
+. nr F 2
+. \}
+. \}
+.\}
+.rr rF
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "LIBNET 3"
+.TH LIBNET 3 "Wed Apr 26 2017" "libnet-1.2-rc3" "libnet Programmers Guide"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+libnet \- A C library for packet creation and injection
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+\&\fB#include <libnet.h>\fR
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+libnet is a packet assembly library that provides a portable interface for
+packet creation and injection.
+.PP
+It is a high-level \s-1API\s0 that allows an application programmer to construct and
+inject network packets. libnet provides a simplified interface for low-level
+network packet shaping, handling and injection.
+.PP
+libnet hides much of the tedium of packet creation from the application
+programmer such as multiplexing, buffer management, arcane packet header
+information, byte-ordering, OS-dependent issues, and much more. libnet features
+portable packet creation interfaces at the \s-1IP\s0 and link layer, as well
+as a host of supplementary and complementary 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 (\fItraceroute\fR\|(8) and \fIping\fR\|(8) were easily rewritten using libnet and \fIpcap\fR\|(3).
+.PP
+When building applications with libnet, the \fIlibnet\-config\fR\|(1) script or the \fIpkg\-config\fR\|(1) program can be used to return the compiler and linker flags
+of the installed libnet library as well as give other useful information.
+.PP
+\&\fB\s-1NOTE\s0\fR: If you are writing your application with libnet, include \fIlibnet.h\fR,
+which will include any additional header for you, rather than including
+\&\fIlibnet/libnet\-functions.h\fR, \fIlibnet/libnet\-macros.h\fR or any of the others.
+.SH "BACKWARDS COMPATIBILITY"
+.IX Header "BACKWARDS COMPATIBILITY"
+Your old code (circa libnet \fB1.0.x\fR) \s-1WILL NOT WORK\s0 with libnet> \fB>=1.1.x\fR.
+See \fBdoc/MIGRATION\fR for easy steps on porting your old code.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fIlibnet\-config\fR\|(1), \fIlibnet\-functions\fR\|(3), \fIlibnet\-macros\fR\|(3)
+.SH "AUTHORS"
+.IX Header "AUTHORS"
+The original author of libnet is Mike D. Schiffman.
+.PP
+libnet has been maintained and extensively enhanced since 2009 by Sam Roberts.
+.PP
+It is currently maintained by Ali Abdulkadir and available at
+.PP
+.Vb 1
+\& <https://github.com/sgeto/libnet>
+.Ve
+.SH "BUGS"
+.IX Header "BUGS"
+For bugs, questions, patch submissions, desirable enhancements, etc. see:
+.PP
+.Vb 1
+\& <https://github.com/sgeto/libnet/issues>
+.Ve
+.SH "COPYRIGHT"
+.IX Header "COPYRIGHT"
+libnet is licensed under the 3\-Clause \s-1BSD\s0 License. You can basically
+do whatever you want with it.
diff --git a/include/Makefile.am b/include/Makefile.am
index b396dd5..ae5543d 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,9 +1,9 @@
-# $Id: Makefile.am,v 1.1.1.1 2003/06/26 21:55:10 route Exp $
-
-include $(top_srcdir)/Makefile.am.common
-
-nodist_include_HEADERS = libnet.h
-
-EXTRA_DIST = bpf.h gnuc.h ifaddrlist.h
-
-SUBDIRS = libnet
+nobase_include_HEADERS = libnet.h \
+ libnet/libnet-asn1.h \
+ libnet/libnet-functions.h \
+ libnet/libnet-headers.h \
+ libnet/libnet-macros.h \
+ libnet/libnet-structures.h \
+ libnet/libnet-types.h
+
+EXTRA_DIST = bpf.h gnuc.h ifaddrlist.h config.h
diff --git a/include/libnet.h.in b/include/libnet.h.in
index a063cc6..a99f9ed 100644
--- a/include/libnet.h.in
+++ b/include/libnet.h.in
@@ -1,7 +1,7 @@
/*
- * $Id: libnet.h.in,v 1.5 2004/01/17 07:51:19 mike Exp $
- *
+ * libnet
* libnet.h - Network routine library header file
+ * @configure_input@
*
* Copyright (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com>
* All rights reserved.
@@ -31,80 +31,89 @@
#ifndef __LIBNET_H
#define __LIBNET_H
+
/**
* @file libnet.h
- * @brief toplevel libnet header file
- */
-
-/**
- * @mainpage Libnet Packet Assembly Library
+ * @brief Top-level libnet header file
+ *
+ * @details This section doesn't contain any details about libnet.h.
+ *
+ * If you're wondering why, then that's mostly because libnet.h isn't
+ * where the action takes place. In fact, no action at all. Okay, maybe a
+ * little. But definitely not enough worth a separate man page or a detailed
+ * description. The real action goes down in some of the other files this file
+ * includes.
+ *
+ * Which probably makes you wonder why, of all libnet*.h headers this file
+ * includes, only libnet-functions.h and libnet-macros.h are documented.
+ * My friend, you're not alone in your marveling.
+ *
+ * You see, the guy who wrote them (Mike D. Schiffman) is gone, and the guy
+ * after him (Sam Roberts) didn't had much time left at the end of the day
+ * after bug fixing the living hell out of the source.
+ *
+ * And if you're wondering why the rest of libnet's documentation is either
+ * full of holes or nonexistent, then (a) good question; and (b) see the
+ * previous paragraph.
*
- * @section intro Overview
+ * Is this a sinking ship? Well, I can't answer that right now. What I can say
+ * is that it's just us now. So, "Lets (try to) make libnet great again"!
*
- * Libnet is a high-level API (toolkit) allowing the application programmer to
- * construct and inject network packets. It provides a portable and simplified
- * interface for low-level network packet shaping, handling and injection.
- * Libnet hides much of the tedium of packet creation from the application
- * programmer such as multiplexing, buffer management, arcane packet header
- * information, byte-ordering, OS-dependent issues, and much more. Libnet
- * features portable packet creation interfaces at the IP layer and link layer,
- * as well as a host of supplementary and complementary 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
- * <a href="www.tcpdump.org">libpcap</a>).
- */
+ * Sincerely,
+ *
+ * Ali Abdulkadir
+ */
#ifdef __cplusplus
extern "C" {
#endif
+ /*
+ * TODO move the stuff we ALWAYS need out of the DOXYGEN ifndef block
+ * and minimize their redundancies (see doc/TODO)
+ */
+#ifndef DOXYGEN_SHOULD_SKIP_THIS // mess
#include <stdio.h>
#include <string.h>
-#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
#include <stdlib.h>
-#if !defined(__WIN32__)
-# include <sys/ioctl.h>
-#endif /* __WIN32__ */
-
-#if defined(HAVE_SYS_SOCKIO_H) && !defined(SIOCGIFADDR)
-# include <sys/sockio.h>
-#endif
-
#include <sys/stat.h>
#include <sys/types.h>
#include <ctype.h>
-#if !defined(__WIN32__)
-# include <sys/socket.h>
-# include <net/if.h>
-#else /* __WIN32__ */
-# if (__CYGWIN__)
-# include <sys/socket.h>
-# endif
-# include <ws2tcpip.h>
-# include <windows.h>
-# include <winsock2.h>
-#endif /* __WIN32__ */
+#include <errno.h>
+#include <stdarg.h>
+
+#if !defined(_MSC_VER)
+#include <unistd.h>
+#endif
-#if !(__linux__) && !(__WIN32__) && !(__APPLE__) && !(__CYGWIN__) && !(__GNU__)
-#else /* __linux__ */
-# if (HAVE_NET_ETHERNET_H)
-# include <net/ethernet.h>
-# endif /* HAVE_NET_ETHERNET_H */
-#endif /* __linux__ */
+#if defined(HAVE_SYS_SOCKIO_H) && !defined(SIOCGIFADDR)
+#include <sys/sockio.h>
+#endif
#if !defined(__WIN32__)
-# include <arpa/inet.h>
-# include <sys/time.h>
-# include <netdb.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <net/if.h>
+#include <arpa/inet.h>
+#include <sys/time.h>
+#include <netdb.h>
+#else /* __WIN32__ */
+#if (__CYGWIN__)
+#include <sys/socket.h>
+#endif
+#include <stdint.h>
+#include <ws2tcpip.h>
+#include <windows.h>
+#include <winsock2.h>
#endif /* __WIN32__ */
-#include <errno.h>
-#include <stdarg.h>
+#if (HAVE_NET_ETHERNET_H)
+#include <net/ethernet.h>
+#endif /* HAVE_NET_ETHERNET_H */
#define LIBNET_VERSION "@PACKAGE_VERSION@"
@@ -113,6 +122,7 @@ extern "C" {
#ifndef LIBNET_API
#define LIBNET_API
#endif
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
#include "./libnet/libnet-types.h"
#include "./libnet/libnet-macros.h"
@@ -127,4 +137,4 @@ extern "C" {
#endif /* __LIBNET_H */
-/* EOF */
+/* EOF */ \ No newline at end of file
diff --git a/include/libnet/libnet-functions.h b/include/libnet/libnet-functions.h
index cd4596f..ba3bcd4 100644
--- a/include/libnet/libnet-functions.h
+++ b/include/libnet/libnet-functions.h
@@ -1,6 +1,5 @@
/*
- * $Id: libnet-functions.h,v 1.43 2004/11/09 07:05:07 mike Exp $
- *
+ * libnet
* libnet-functions.h - function prototypes
*
* Copyright (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com>
@@ -141,7 +140,7 @@ libnet_getpbuf_size(libnet_t *l, libnet_ptag_t ptag);
* function should be called anytime a function fails or an error condition
* is detected inside of libnet.
* @param l pointer to a libnet context
- * @return an error string or NULL if no error has occured
+ * @return an error string or NULL if no error has occurred
*/
LIBNET_API
char *
@@ -149,7 +148,7 @@ libnet_geterror(libnet_t *l);
/**
* Returns the sum of the size of all of the pblocks inside of l (this should
- * be the resuling packet size).
+ * be the resulting packet size).
* @param l pointer to a libnet context
* @return the size of the packet in l
*/
@@ -158,7 +157,7 @@ uint32_t
libnet_getpacket_size(libnet_t *l);
/**
- * Seeds the psuedo-random number generator.
+ * Seeds the pseudo-random number generator.
* @param l pointer to a libnet context
* @retval 1 on success
* @retval -1 on failure
@@ -168,7 +167,7 @@ int
libnet_seed_prand(libnet_t *l);
/**
- * Generates an unsigned psuedo-random value within the range specified by
+ * Generates an unsigned pseudo-random value within the range specified by
* mod.
* LIBNET_PR2 0 - 1
* LIBNET_PR8 0 - 255
@@ -191,7 +190,7 @@ libnet_get_prand(int mod);
* header is set to any other value, by default libnet will not calculate the
* header checksum. To over-ride this behavior, use libnet_toggle_checksum().
* Switches auto-checksumming on or off for the specified ptag. If mode is set
- * to LIBNET_ON, libnet will mark the specificed ptag to calculate a checksum
+ * to LIBNET_ON, libnet will mark the specified ptag to calculate a checksum
* for the ptag prior to injection. This assumes that the ptag refers to a
* protocol that has a checksum field. If mode is set to LIBNET_OFF, libnet
* will clear the checksum flag and no checksum will be computed prior to
@@ -651,7 +650,7 @@ const uint8_t *tpa, libnet_t *l);
* @param ack acknowledgement number
* @param control control flags
* @param win window size
- * @param sum checksum (0 for libnet to autofill)
+ * @param sum checksum (0 for libnet to auto-fill)
* @param urg urgent pointer
* @param len total length of the TCP packet (for checksum calculation)
* @param payload
@@ -693,7 +692,7 @@ libnet_ptag_t ptag);
* @param sp source port
* @param dp destination port
* @param len total length of the UDP packet
- * @param sum checksum (0 for libnet to autofill)
+ * @param sum checksum (0 for libnet to auto-fill)
* @param payload optional payload or NULL
* @param payload_s payload length or 0
* @param l pointer to a libnet context
@@ -715,7 +714,7 @@ const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
* interface or libnet_build_data() to construct them.
* @param version CDP version
* @param ttl time to live (time information should be cached by recipient)
- * @param sum checksum (0 for libnet to autofill)
+ * @param sum checksum (0 for libnet to auto-fill)
* @param type type of data contained in value
* @param value_s length of value argument
* @param value the CDP information string
@@ -737,7 +736,7 @@ libnet_t *l, libnet_ptag_t ptag);
* echo request/reply header
* @param type type of ICMP packet (should be ICMP_ECHOREPLY or ICMP_ECHO)
* @param code code of ICMP packet (should be 0)
- * @param sum checksum (0 for libnet to autofill)
+ * @param sum checksum (0 for libnet to auto-fill)
* @param id identification number
* @param seq packet sequence number
* @param payload optional payload or NULL
@@ -758,7 +757,7 @@ libnet_t *l, libnet_ptag_t ptag);
* IP netmask request/reply header.
* @param type type of ICMP packet (should be ICMP_MASKREQ or ICMP_MASKREPLY)
* @param code code of ICMP packet (should be 0)
- * @param sum checksum (0 for libnet to autofill)
+ * @param sum checksum (0 for libnet to auto-fill)
* @param id identification number
* @param seq packet sequence number
* @param mask subnet mask
@@ -781,7 +780,7 @@ uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
* built by a previous call to libnet_build_ipv4().
* @param type type of ICMP packet (should be ICMP_UNREACH)
* @param code code of ICMP packet (should be one of the 16 unreachable codes)
- * @param sum checksum (0 for libnet to autofill)
+ * @param sum checksum (0 for libnet to auto-fill)
* @param payload optional payload or NULL
* @param payload_s payload length or 0
* @param l pointer to a libnet context
@@ -800,7 +799,7 @@ const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
* built by a previous call to libnet_build_ipv4().
* @param type type of ICMP packet (should be ICMP_REDIRECT)
* @param code code of ICMP packet (should be one of the four redirect codes)
- * @param sum checksum (0 for libnet to autofill)
+ * @param sum checksum (0 for libnet to auto-fill)
* @param gateway
* @param payload optional payload or NULL
* @param payload_s payload length or 0
@@ -821,7 +820,7 @@ libnet_ptag_t ptag);
* built by a previous call to libnet_build_ipv4().
* @param type type of ICMP packet (should be ICMP_TIMXCEED)
* @param code code of ICMP packet (ICMP_TIMXCEED_INTRANS / ICMP_TIMXCEED_REASS)
- * @param sum checksum (0 for libnet to autofill)
+ * @param sum checksum (0 for libnet to auto-fill)
* @param payload optional payload or NULL
* @param payload optional payload or NULL
* @param payload_s payload length or 0
@@ -840,7 +839,7 @@ const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
* timestamp request/reply header.
* @param type type of ICMP packet (should be ICMP_TSTAMP or ICMP_TSTAMPREPLY)
* @param code code of ICMP packet (should be 0)
- * @param sum checksum (0 for libnet to autofill)
+ * @param sum checksum (0 for libnet to auto-fill)
* @param id identification number
* @param seq sequence number
* @param otime originate timestamp
@@ -864,7 +863,7 @@ const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
* echo or echo reply header.
* @param type type of ICMP packet (should be ICMP6_ECHO_REQUEST or ICMP6_ECHO_REPLY)
* @param code code of ICMP packet (should be zero)
- * @param sum checksum (0 for libnet to autofill)
+ * @param sum checksum (0 for libnet to auto-fill)
* @param id echo id number
* @param seq echo sequence number
* @param payload optional payload or NULL
@@ -885,7 +884,7 @@ libnet_ptag_t libnet_build_icmpv6_echo(uint8_t type, uint8_t code, uint16_t
* built by a previous call to libnet_build_ipv6().
* @param type type of ICMP packet (should be ICMP6_DST_UNREACH)
* @param code code of ICMP packet (should be one of the 5 ICMP6_DST_UNREACH_* codes)
- * @param sum checksum (0 for libnet to autofill)
+ * @param sum checksum (0 for libnet to auto-fill)
* @param payload optional payload or NULL
* @param payload_s payload length or 0
* @param l pointer to a libnet context
@@ -904,7 +903,7 @@ uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
* libnet_build_icmpv6_ndp_opt() and ICMPV6_NDP_OPT_SLLA.
* @param type type of ICMP packet (should be ND_NEIGHBOR_SOLICIT)
* @param code code of ICMP packet (should be zero)
- * @param sum checksum (0 for libnet to autofill)
+ * @param sum checksum (0 for libnet to auto-fill)
* @param target target ipv6 address
* @param payload optional payload or NULL
* @param payload_s payload length or 0
@@ -924,7 +923,7 @@ libnet_ptag_t libnet_build_icmpv6_ndp_nsol(uint8_t type, uint8_t code,
* libnet_build_icmpv6_ndp_opt() and ND_OPT_TARGET_LINKADDR.
* @param type type of ICMP packet (should be ND_NEIGHBOR_ADVERT)
* @param code code of ICMP packet (should be zero)
- * @param sum checksum (0 for libnet to autofill)
+ * @param sum checksum (0 for libnet to auto-fill)
* @param flags should be a bitwise or of any applicable ND_NA_FLAG_* flags
* @param target target ipv6 address
* @param payload optional payload or NULL
@@ -954,10 +953,10 @@ libnet_ptag_t libnet_build_icmpv6_ndp_opt(uint8_t type, uint8_t* option,
uint32_t option_s, libnet_t* l, libnet_ptag_t ptag);
/**
- * Builds an RFC 1112 Internet Group Memebership Protocol (IGMP) header.
+ * Builds an RFC 1112 Internet Group Membership Protocol (IGMP) header.
* @param type packet type
* @param reserved (should be 0 for IGMPv1)
- * @param sum checksum (0 for libnet to autofill)
+ * @param sum checksum (0 for libnet to auto-fill)
* @param ip IPv4 address (in standard/network byte order)
* @param payload optional payload or NULL
* @param payload_s payload length or 0
@@ -983,7 +982,7 @@ const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
* @param frag fragmentation bits and offset
* @param ttl time to live in the network
* @param prot upper layer protocol
- * @param sum checksum (0 for libnet to autofill)
+ * @param sum checksum (0 for libnet to auto-fill)
* @param src source IPv4 address (little endian)
* @param dst destination IPv4 address (little endian)
* @param payload optional payload or NULL
@@ -1173,7 +1172,7 @@ libnet_t *l, libnet_ptag_t ptag);
* @param type type of frame
* @param user user defined data
* @param shost source mac address
- * @param len total length of the encapuslated packet less 18 bytes
+ * @param len total length of the encapsulated packet less 18 bytes
* @param snap SNAP information (0xaaaa03 + vendor code)
* @param vid 15 bit VLAN ID, 1 bit BPDU or CDP indicator
* @param portindex port index
@@ -1422,7 +1421,7 @@ libnet_t *l);
/**
* Builds an RFC 2338 Virtual Router Redundacy Protool (VRRP) header. Use the
- * payload interface to specify address and autthentication information. To
+ * payload interface to specify address and authentication information. To
* build a "legal" packet, the destination IPv4 address should be the multicast * address 224.0.0.18, the IP TTL should be set to 255, and the IP protocol
* should be set to 112.
* @param version VRRP version (should be 2)
@@ -1484,7 +1483,7 @@ libnet_ptag_t ptag);
* @param orig_ts_int original timestamp integer
* @param orig_ts_frac original timestamp fraction
* @param rec_ts_int receiver timestamp integer
- * @param rec_ts_frac reciever timestamp fraction
+ * @param rec_ts_frac receiver timestamp fraction
* @param xmt_ts_int transmit timestamp integer
* @param xmt_ts_frac transmit timestamp integer
* @param payload optional payload or NULL
@@ -1803,7 +1802,7 @@ libnet_getgre_length(uint16_t fv);
* @param fv the 16 0 to 7: which fields are included in the header (checksum,
* seq. number, key, ...), bits 8 to 12: flag, bits 13 to 15: version.
* @param type which protocol is encapsulated (PPP, IP, ...)
- * @param sum checksum (0 for libnet to autofill).
+ * @param sum checksum (0 for libnet to auto-fill).
* @param offset byte offset from the start of the routing field to the first byte of the SRE
* @param key inserted by the encapsulator to authenticate the source
* @param seq sequence number used by the receiver to sort the packets
@@ -1831,7 +1830,7 @@ const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
* header.
* @param fv the 16 0 to 7: which fields are included in the header (checksum, seq. number, key, ...), bits 8 to 12: flag, bits 13 to 15: version.
* @param type which protocol is encapsulated (PPP, IP, ...)
- * @param sum checksum (0 for libnet to autofill).
+ * @param sum checksum (0 for libnet to auto-fill).
* @param offset byte offset from the start of the routing field to the first byte of the SRE
* @param key inserted by the encapsulator to authenticate the source
* @param seq sequence number used by the receiver to sort the packets
@@ -1999,14 +1998,14 @@ uint32_t uid, uint32_t fd, uint8_t cmd[SEBEK_CMD_LENGTH], uint32_t length,
const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag);
/**
- * Builds a HSRP header. HSRP is a Cisco propietary protocol defined in
+ * Builds a HSRP header. HSRP is a Cisco proprietary protocol defined in
* RFC 2281
* @param version version of the HSRP messages
* @param opcode type of message
* @param state current state of the router
* @param hello_time period in seconds between hello messages
* @param hold_time seconds that the current hello message is valid
- * @param priority priority for the election proccess
+ * @param priority priority for the election process
* @param group standby group
* @param reserved reserved field
* @param authdata password
@@ -2484,7 +2483,7 @@ libnet_do_checksum(libnet_t *l, uint8_t *iphdr, int protocol, int h_len);
* IP (TCP, UDP, IGMP, ICMP, etc...) checksums usually need information from
* the IP header to construct the "pseudo header", this function takes a
* pointer to that header, the buffer boundaries, the "h_len" (see pblock_t for
- * a description, it is increasinly unused, though, and I'm trying to remove it
+ * a description, it is increasingly unused, though, and I'm trying to remove it
* altogether), and the protocol number for the protocol that is to be
* checksummed.
*
@@ -2569,9 +2568,9 @@ libnet_pblock_delete(libnet_t *l, libnet_pblock_t *p);
/*
* [Internal]
- * Function updates the pblock meta-inforation. Internally it updates the
+ * Function updates the pblock meta-information. Internally it updates the
* ptag with a monotonically increasing variable kept in l. This way each
- * pblock has a succesively increasing ptag identifier.
+ * pblock has a successively increasing ptag identifier.
*/
LIBNET_API
libnet_ptag_t
@@ -2623,7 +2622,7 @@ libnet_pblock_coalesce(libnet_t *l, uint8_t **packet, uint32_t *size);
#if !(__WIN32__)
/*
* [Internal]
- * By testing if we can retrieve the FLAGS of an iface
+ * By testing if we can retrieve the FLAGS of an interface
* we can know if it exists or not and if it is up.
*/
int
diff --git a/include/libnet/libnet-headers.h b/include/libnet/libnet-headers.h
index e1076e9..7250e17 100644
--- a/include/libnet/libnet-headers.h
+++ b/include/libnet/libnet-headers.h
@@ -1,5 +1,4 @@
/*
- * $Id: libnet-headers.h,v 1.15 2004/11/09 07:05:07 mike Exp $
*
* libnet-headers.h - Network routine library headers header file
*
@@ -212,7 +211,7 @@ struct libnet_arp_hdr
#define ARPHRD_IPSEC 31 /* IPsec tunnel */
uint16_t ar_pro; /* format of protocol address */
uint8_t ar_hln; /* length of hardware address */
- uint8_t ar_pln; /* length of protocol addres */
+ uint8_t ar_pln; /* length of protocol address */
uint16_t ar_op; /* operation type */
#define ARPOP_REQUEST 1 /* req to resolve address */
#define ARPOP_REPLY 2 /* resp to previous request */
@@ -314,7 +313,7 @@ struct libnet_bgp4_notification_hdr
struct libnet_cdp_hdr
{
uint8_t cdp_version; /* version (should always be 0x01) */
- uint8_t cdp_ttl; /* time reciever should hold info in this packet */
+ uint8_t cdp_ttl; /* time receiver should hold info in this packet */
uint16_t cdp_sum; /* checksum */
uint16_t cdp_type; /* type */
#define LIBNET_CDP_DEVID 0x1 /* device id */
@@ -507,7 +506,9 @@ struct libnet_ethernet_hdr
#ifndef ETHERTYPE_IP
#define ETHERTYPE_IP 0x0800 /* IP protocol */
#endif
+#ifndef ETHERTYPE_IPV6
#define ETHERTYPE_IPV6 0x86dd /* IPv6 protocol */
+#endif
#ifndef ETHERTYPE_ARP
#define ETHERTYPE_ARP 0x0806 /* addr. resolution protocol */
#endif
diff --git a/include/libnet/libnet-structures.h b/include/libnet/libnet-structures.h
index 1a9e6b6..000e21b 100644
--- a/include/libnet/libnet-structures.h
+++ b/include/libnet/libnet-structures.h
@@ -1,6 +1,4 @@
/*
- * $Id: libnet-structures.h,v 1.19 2004/11/09 07:05:07 mike Exp $
- *
* libnet-structures.h - Network routine library structures header file
*
* Copyright (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com>
@@ -32,7 +30,7 @@
#ifndef __LIBNET_STRUCTURES_H
#define __LIBNET_STRUCTURES_H
-#if ((__WIN32__) && !(__CYGWIN__))
+#if ((_WIN32) && !(__CYGWIN__))
#include "Packet32.h"
#endif
@@ -41,7 +39,7 @@ typedef struct libnet_port_list_chain libnet_plist_t;
struct libnet_port_list_chain
{
uint16_t node; /* node number */
- uint16_t bport; /* beggining port */
+ uint16_t bport; /* beginning port */
uint16_t eport; /* terminating port */
uint8_t id; /* global array offset */
libnet_plist_t *next; /* next node in the list */
@@ -51,15 +49,9 @@ struct libnet_port_list_chain
/* libnet statistics structure */
struct libnet_stats
{
-#if (!defined(__WIN32__) || (__CYGWIN__))
- uint64_t packets_sent; /* packets sent */
- uint64_t packet_errors; /* packets errors */
- uint64_t bytes_written; /* bytes written */
-#else
- __int64 packets_sent; /* packets sent */
- __int64 packet_errors; /* packets errors */
- __int64 bytes_written; /* bytes written */
-#endif
+ __int64_t packets_sent; /* packets sent */
+ __int64_t packet_errors; /* packets errors */
+ __int64_t bytes_written; /* bytes written */
};
@@ -185,7 +177,7 @@ typedef struct libnet_protocol_block libnet_pblock_t;
*/
struct libnet_context
{
-#if ((__WIN32__) && !(__CYGWIN__))
+#if ((_WIN32) && !(__CYGWIN__))
SOCKET fd;
LPADAPTER lpAdapter;
#else
@@ -259,4 +251,4 @@ typedef struct _libnet_context_queue_descriptor libnet_cqd_t;
#endif /* __LIBNET_STRUCTURES_H */
-/* EOF */
+/* EOF */ \ No newline at end of file
diff --git a/libnet.pc.in b/libnet.pc.in
index bc05249..028d7cb 100644
--- a/libnet.pc.in
+++ b/libnet.pc.in
@@ -5,7 +5,9 @@ includedir=@includedir@
Name: @PACKAGE@
Version: @VERSION@
-Description: portable framework for low-level network packet construction
+Description: Portable Packet Construction and Injection API
+URL: @PACKAGE_URL@
+
Requires:
Libs: -L${libdir} -lnet @LTLIBINTL@
Cflags: -I${includedir}
diff --git a/m4/ax_check_link_flag.m4 b/m4/ax_check_link_flag.m4
new file mode 100644
index 0000000..819409a
--- /dev/null
+++ b/m4/ax_check_link_flag.m4
@@ -0,0 +1,74 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
+#
+# DESCRIPTION
+#
+# Check whether the given FLAG works with the linker or gives an error.
+# (Warnings, however, are ignored)
+#
+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+# success/failure.
+#
+# If EXTRA-FLAGS is defined, it is added to the linker's default flags
+# when the check is done. The check is thus made with the flags: "LDFLAGS
+# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
+# issue an error when a bad flag is given.
+#
+# INPUT gives an alternative input source to AC_LINK_IFELSE.
+#
+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+# 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 3 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, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 5
+
+AC_DEFUN([AX_CHECK_LINK_FLAG],
+[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
+AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
+ ax_check_save_flags=$LDFLAGS
+ LDFLAGS="$LDFLAGS $4 $1"
+ AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
+ [AS_VAR_SET(CACHEVAR,[yes])],
+ [AS_VAR_SET(CACHEVAR,[no])])
+ LDFLAGS=$ax_check_save_flags])
+AS_VAR_IF(CACHEVAR,yes,
+ [m4_default([$2], :)],
+ [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl AX_CHECK_LINK_FLAGS
diff --git a/m4/shell.m4 b/m4/shell.m4
new file mode 100644
index 0000000..ff5cf1a
--- /dev/null
+++ b/m4/shell.m4
@@ -0,0 +1,97 @@
+# Check for a working shell.
+
+# Copyright (C) 2000-2001, 2007, 2009-2017 Free Software Foundation, Inc.
+# 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 3, 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.
+
+# AC_PROG_SHELL
+# -------------
+# Check for a working (i.e. POSIX-compatible) shell.
+# Written by Paul Eggert <eggert@twinsun.com>,
+# from an idea suggested by Albert Chin-A-Young <china@thewrittenword.com>.
+AC_DEFUN([AC_PROG_SHELL],
+ [AC_MSG_CHECKING([for a POSIX-compliant shell])
+ AC_CACHE_VAL(ac_cv_path_shell,
+ [ac_command='
+ # Test the noclobber option, using the portable POSIX.2 syntax.
+ set -C
+ rm -f conftest.c
+ >conftest.c || exit
+ >|conftest.c || exit
+ !>conftest.c || exit
+ # Test that $(...) works.
+ test "$(expr 3 + 4)" -eq 7 || exit
+ '
+ # Solaris 11 /bin/sh (AT&T Research) 93u 2011-02-08 has a file
+ # descriptor bug that breaks zgrep and is hard to test for
+ # directly. At some point $(...) is reading a pipe from the
+ # subshell, but the pipe is also open in the parent shell, so
+ # the read deadlocks. Prefer some other shell if available.
+ ac_maybe_solaris_sh_bug='test "${.sh.version}"'
+
+ ac_cv_path_shell=no
+
+ case $SHELL in
+ /*)
+ rm -f conftest.c
+ if ("$SHELL" -c "$ac_command") 2>/dev/null; then
+ "$SHELL" -c "$ac_maybe_solaris_sh_bug" 2>/dev/null ||
+ ac_cv_path_shell=$SHELL
+ fi
+ esac
+
+ case $ac_cv_path_shell in
+ no)
+ # Prefer shells that are more likely to be installed in the
+ # same place on all hosts of this platform. Therefore, prefer
+ # shells in /bin and /usr/bin to shells in the installer's
+ # PATH. Also, loop through PATH first and then through
+ # shells, since less-"nice" shells in /bin and /usr/bin are
+ # more likely to be installed than "nicer" shells elsewhere.
+ ac_break_if_good_shell=:
+ as_save_IFS=$IFS; IFS=:
+ for as_dir in /bin /usr/bin $PATH
+ do
+ IFS=$as_save_IFS
+ case $as_dir in
+ /*)
+ for ac_base in sh bash ksh sh5; do
+ rm -f conftest.c
+ if ("$as_dir/$ac_base" -c "$ac_command") 2>/dev/null; then
+ if "$as_dir/$ac_base" -c "$ac_maybe_solaris_sh_bug" 2>/dev/null
+ then
+ test "$ac_cv_path_shell" = no
+ else
+ ac_break_if_good_shell=break
+ :
+ fi && ac_cv_path_shell=$as_dir/$ac_base
+ $ac_break_if_good_shell
+ fi
+ done
+ $ac_break_if_good_shell
+ esac
+ done
+ rm -f conftest.c
+ esac])
+ AC_MSG_RESULT($ac_cv_path_shell)
+ SHELL=$ac_cv_path_shell
+ if test "$SHELL" = no; then
+ SHELL=/bin/sh
+ AC_MSG_WARN([using $SHELL, even though it does not conform to POSIX])
+ fi
+ if "$SHELL" -c "$ac_maybe_solaris_sh_bug" 2>/dev/null; then
+ AC_MSG_WARN([using $SHELL, even though it may have file descriptor bugs])
+ fi
+ AC_SUBST(SHELL)])
diff --git a/msvcbuild.bat b/msvcbuild.bat
index 5284e64..2a5ee3d 100644
--- a/msvcbuild.bat
+++ b/msvcbuild.bat
@@ -1,15 +1,52 @@
-@rem Script to build libnet under "Visual Studio .NET Command Prompt".
+@echo off
+
+@rem Script to build libnet with MSVC.
@rem Dependencies are:
-@rem winpcap, specifically, the winpcap developer pack
+@rem winpcap, specifically, the winpcap developer pack
+@rem We assume WpdPack\ and libnet-master\ to have the same path,
+@rem and that this script is executed from either a VS2015 Developer Command Prompt
+@rem or an elevated Command Prompt.
+:start
+@if "%1" == "" goto x86
@setlocal
-@set MYCOMPILE=cl /nologo /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE
+@set userinput=%1
+@if not "%1"=="x86" @if not "%1"=="x64" @if not "%1"=="x86_x64" goto usage
+@if "%1"=="x86" goto x86
+@if "%1"=="x64" goto x64
+@if "%1"=="x86_x64" goto x86_x64
+@endlocal
+
+:x86
+if not exist "%VCINSTALLDIR%bin\vcvars32.bat" goto path
+call "%VCINSTALLDIR%bin\vcvars32.bat"
+goto msvcbuild32
+
+:x64
+if not exist "%VCINSTALLDIR%bin\amd64\vcvars64.bat" goto path
+call "%VCINSTALLDIR%bin\amd64\vcvars64.bat"
+goto msvcbuild64
+
+:x86_x64
+if not exist "%VCINSTALLDIR%vcvarsall.bat" goto path
+call "%VCINSTALLDIR%vcvarsall.bat" x86_amd64
+goto msvcbuild64
+
+:msvcbuild32
+@echo on
+@setlocal
+@set MYCOMPILE=cl /nologo /MD /O2 /W4 /c /D_CRT_SECURE_NO_DEPRECATE /Fowin32\
@set MYLINK=link /nologo
@set MYMT=mt /nologo
+@set VERSION=1.2
@rem relative to C code in src/
@set WINPCAP=..\..\..\WpdPack
+if not exist "src\win32\" mkdir "src\win32\"
+
+if not exist "lib\x86\" mkdir "lib\x86\"
+
copy win32\libnet.h include\
copy win32\stdint.h include\libnet\
copy win32\config.h include\
@@ -17,10 +54,73 @@ copy win32\getopt.h include\
cd src
%MYCOMPILE% /I..\include /I%WINPCAP%\Include libnet_a*.c libnet_build_*.c libnet_c*.c libnet_dll.c libnet_error.c libnet_i*.c libnet_link_win32.c libnet_p*.c libnet_raw.c libnet_resolve.c libnet_version.c libnet_write.c
-%MYLINK% /DLL /libpath:%WINPCAP%\Lib /out:libnet.dll *.obj Advapi32.lib
+%MYLINK% /DLL /libpath:%WINPCAP%\Lib /out:..\lib\x86\libnet%VERSION%.dll win32\*.obj Advapi32.lib
if exist libnet.dll.manifest^
%MYMT% -manifest libnet.dll.manifest -outputresource:libnet.dll;2
cd ..
exit /b %errorlevel%
+:msvcbuild64
+@echo on
+@setlocal
+@set MYCOMPILE=cl /nologo /MD /O2 /W4 /c /D_CRT_SECURE_NO_DEPRECATE /Fowin64\
+@set MYLINK=link /nologo
+@set MYMT=mt /nologo
+@set VERSION=1.2
+
+@rem relative to C code in src/
+@set WINPCAP=..\..\..\WpdPack
+
+if not exist "src\win64\" mkdir "src\win64\"
+
+if not exist "lib\x64\" mkdir "lib\x64\"
+
+copy win32\libnet.h include\
+copy win32\stdint.h include\libnet\
+copy win32\config.h include\
+copy win32\getopt.h include\
+
+cd src
+%MYCOMPILE% /I..\include /I%WINPCAP%\Include libnet_a*.c libnet_build_*.c libnet_c*.c libnet_dll.c libnet_error.c libnet_i*.c libnet_link_win32.c libnet_p*.c libnet_raw.c libnet_resolve.c libnet_version.c libnet_write.c
+%MYLINK% /DLL /libpath:%WINPCAP%\Lib\x64 /out:..\lib\x64\libnet%VERSION%.dll win64\*.obj Advapi32.lib
+if exist libnet.dll.manifest^
+ %MYMT% -manifest libnet.dll.manifest -outputresource:libnet.dll;2
+cd ..
+
+exit /b %errorlevel%
+
+:usage
+echo Invalid option "%*". The correct usage is:
+echo %0 [option]
+echo :
+echo where [option] is: x86 ^| x64 ^| x86_x64
+echo :
+echo The script will verify and set the appropriate environment variables.
+echo If no options are provided, x86 is assumed.
+echo :
+echo Usage examples:
+echo %0 x86
+echo %0 x64
+echo %0 x86_x64
+echo :
+echo If your build computer is 32-bit and you want to build for 64-bit
+echo (aka Cross), choose "x86_x64"
+echo :
+echo Please make sure Visual Studio or the C++ Build SKU is installed,
+echo and that this script is executed from a Developer Command Prompt.
+echo :
+goto end
+
+:path
+call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat"
+if not exist "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat" goto fail
+goto start
+
+:fail
+echo Visual Studio or the C++ Build SKU do not seem to be installed.
+echo Please Install either of them or try to executed this script
+echo from a Developer Command Prompt.
+goto end
+
+:end \ No newline at end of file
diff --git a/sample/Makefile.am b/sample/Makefile.am
index 62d1ab5..79460d1 100644
--- a/sample/Makefile.am
+++ b/sample/Makefile.am
@@ -1,4 +1,3 @@
-# $Id: Makefile.am,v 1.6 2004/11/09 07:05:07 mike Exp $
#
# Libnet automake information file
# Copyright (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com>
@@ -6,80 +5,117 @@
#
# Process this file with automake to produce a Makefile.in script.
-include $(top_srcdir)/Makefile.am.common
+samples = arp \
+ bgp4_hdr \
+ bgp4_open \
+ bgp4_update \
+ bgp4_notification \
+ cdp \
+ dhcp_discover \
+ dns \
+ dot1x \
+ fddi_tcp1 \
+ fddi_tcp2 \
+ get_addr \
+ gre \
+ hsrp \
+ icmp_echo_cq \
+ icmp_redirect \
+ icmp_timeexceed \
+ icmp_timestamp \
+ icmp6_echoreq \
+ icmp_unreach \
+ icmp6_unreach \
+ ieee \
+ ip_link \
+ ip_raw \
+ isl \
+ mpls \
+ ntp \
+ ospf_hello \
+ ospf_lsa \
+ ping_of_death \
+ rpc_tcp \
+ rpc_udp \
+ synflood \
+ synflood6 \
+ sebek \
+ smurf \
+ stp \
+ synflood6_frag \
+ tcp1 \
+ tcp2 \
+ tftp \
+ udp1 \
+ udp2 \
+ test_ipv4 \
+ test_ipv6_icmpv4 \
+ test_ipv4_options \
+ tring_tcp1 \
+ tring_tcp2
-samples = arp cdp dhcp_discover get_addr icmp_timestamp icmp_unreach \
- ieee isl ntp ospf_hello ospf_lsa ping_of_death stp synflood \
- tcp1 tcp2 udp1 udp2 synflood6 \
- icmp6_echoreq \
- icmp6_unreach \
- icmp_echo_cq \
- smurf dot1x dns rpc_tcp rpc_udp mpls icmp_timeexceed \
- fddi_tcp1 fddi_tcp2 tring_tcp1 tring_tcp2 icmp_redirect \
- bgp4_hdr bgp4_open bgp4_update bgp4_notification gre \
- synflood6_frag tftp ip_link ip_raw sebek hsrp \
- test_ipv4 test_ipv6_icmpv4 test_ipv4_options
-if INSTALL_SAMPLES
-bin_PROGRAMS = $(samples)
-else
noinst_PROGRAMS = $(samples)
-endif
-arp_SOURCES = arp.c
-cdp_SOURCES = cdp.c
-dot1x_SOURCES = dot1x.c
-dhcp_discover_SOURCES = dhcp_discover.c
-dns_SOURCES = dns.c
-fddi_tcp1_SOURCES = fddi_tcp1.c
-fddi_tcp2_SOURCES = fddi_tcp2.c
-tring_tcp1_SOURCES = tring_tcp1.c
-tring_tcp2_SOURCES = tring_tcp2.c
-get_addr_SOURCES = get_addr.c
-icmp_echo_cq_SOURCES = icmp_echo_cq.c
-icmp_redirect_SOURCES = icmp_redirect.c
-icmp_timestamp_SOURCES = icmp_timestamp.c
-icmp_timeexceed_SOURCES = icmp_timeexceed.c
-icmp_unreach_SOURCES = icmp_unreach.c
-ieee_SOURCES = ieee.c
-isl_SOURCES = isl.c
-ntp_SOURCES = ntp.c
-ospf_hello_SOURCES = ospf_hello.c
-ospf_lsa_SOURCES = ospf_lsa.c
-ping_of_death_SOURCES = ping_of_death.c
-mpls_SOURCES = mpls.c
-rpc_tcp_SOURCES = rpc_tcp.c
-rpc_udp_SOURCES = rpc_udp.c
-stp_SOURCES = stp.c
-synflood_SOURCES = synflood.c
-tcp1_SOURCES = tcp1.c
-tcp2_SOURCES = tcp2.c
-tftp_SOURCES = tftp.c
-udp1_SOURCES = udp1.c
-udp2_SOURCES = udp2.c
-icmp6_echoreq_SOURCES = icmp6_echoreq.c
-icmp6_unreach_SOURCES = icmp6_unreach.c
-smurf_SOURCES = smurf.c
-synflood6_SOURCES = synflood6.c
-synflood6_frag_SOURCES = synflood6_frag.c
-bgp4_hdr_SOURCES = bgp4_hdr.c
-bgp4_open_SOURCES = bgp4_open.c
-bgp4_update_SOURCES = bgp4_update.c
+arp_SOURCES = arp.c
+bgp4_hdr_SOURCES = bgp4_hdr.c
+bgp4_open_SOURCES = bgp4_open.c
+bgp4_update_SOURCES = bgp4_update.c
bgp4_notification_SOURCES = bgp4_notification.c
-gre_SOURCES = gre.c
-ip_raw_SOURCES = ip_raw.c
-ip_link_SOURCES = ip_link.c
-sebek_SOURCES = sebek.c
-hsrp_SOURCES = hsrp.c
-test_ipv4_SOURCES = test_ipv4.c
+cdp_SOURCES = cdp.c
+dot1x_SOURCES = dot1x.c
+dhcp_discover_SOURCES = dhcp_discover.c
+dns_SOURCES = dns.c
+fddi_tcp1_SOURCES = fddi_tcp1.c
+fddi_tcp2_SOURCES = fddi_tcp2.c
+get_addr_SOURCES = get_addr.c
+gre_SOURCES = gre.c
+hsrp_SOURCES = hsrp.c
+icmp_echo_cq_SOURCES = icmp_echo_cq.c
+icmp_redirect_SOURCES = icmp_redirect.c
+icmp_timestamp_SOURCES = icmp_timestamp.c
+icmp_timeexceed_SOURCES = icmp_timeexceed.c
+icmp_unreach_SOURCES = icmp_unreach.c
+icmp6_echoreq_SOURCES = icmp6_echoreq.c
+icmp6_unreach_SOURCES = icmp6_unreach.c
+ieee_SOURCES = ieee.c
+ip_raw_SOURCES = ip_raw.c
+ip_link_SOURCES = ip_link.c
+isl_SOURCES = isl.c
+mpls_SOURCES = mpls.c
+ntp_SOURCES = ntp.c
+ospf_hello_SOURCES = ospf_hello.c
+ospf_lsa_SOURCES = ospf_lsa.c
+ping_of_death_SOURCES = ping_of_death.c
+rpc_tcp_SOURCES = rpc_tcp.c
+rpc_udp_SOURCES = rpc_udp.c
+sebek_SOURCES = sebek.c
+smurf_SOURCES = smurf.c
+stp_SOURCES = stp.c
+synflood_SOURCES = synflood.c
+synflood6_SOURCES = synflood6.c
+synflood6_frag_SOURCES = synflood6_frag.c
+tcp1_SOURCES = tcp1.c
+tcp2_SOURCES = tcp2.c
+test_ipv4_SOURCES = test_ipv4.c
test_ipv4_options_SOURCES = test_ipv4_options.c
-test_ipv6_icmpv4_SOURCES = test_ipv6_icmpv4.c
+test_ipv6_icmpv4_SOURCES = test_ipv6_icmpv4.c
+tftp_SOURCES = tftp.c
+tring_tcp1_SOURCES = tring_tcp1.c
+tring_tcp2_SOURCES = tring_tcp2.c
+udp1_SOURCES = udp1.c
+udp2_SOURCES = udp2.c
-EXTRA_DIST = libnet_test.h
+LDADD = $(top_builddir)/src/libnet.la
-LDADD = $(top_builddir)/src/libnet.la
-
-EXTRA_DIST += arp-new.c win32/arp/arp.vcproj win32/cdp/cdp.vcproj \
- win32/dhcp_discover/dhcp_discover.vcproj win32/dns/dns.vcproj \
- win32/get_addr/get_addr.vcproj win32/getopt.c \
- win32/icmp_echo_cq/icmp_echo_cq.vcproj win32/tcp1/tcp1.vcproj \
- win32/udp1/dns.vcproj win32/udp1/udp1.vcproj
+EXTRA_DIST = libnet_test.h \
+ arp-new.c \
+ win32/getopt.c \
+ win32/arp/arp.vcproj \
+ win32/cdp/cdp.vcproj \
+ win32/dhcp_discover/dhcp_discover.vcproj \
+ win32/dns/dns.vcproj \
+ win32/get_addr/get_addr.vcproj \
+ win32/icmp_echo_cq/icmp_echo_cq.vcproj \
+ win32/tcp1/tcp1.vcproj \
+ win32/udp1/dns.vcproj \
+ win32/udp1/udp1.vcproj
diff --git a/sample/dns.c b/sample/dns.c
index 6ec4e16..169f332 100644
--- a/sample/dns.c
+++ b/sample/dns.c
@@ -60,7 +60,7 @@ main(int argc, char *argv[])
printf("libnet 1.1 packet shaping: DNSv4[raw]\n");
/*
- * Initialize the library. Root priviledges are required.
+ * Initialize the library. Root privileges are required.
*/
l = libnet_init(
LIBNET_RAW4, /* injection type */
diff --git a/sample/isl.c b/sample/isl.c
index ab5cf3e..278359d 100644
--- a/sample/isl.c
+++ b/sample/isl.c
@@ -73,7 +73,7 @@ main(int argc, char *argv[])
}
/*
- * Initialize the library. Root priviledges are required.
+ * Initialize the library. Root privileges are required.
*/
l = libnet_init(
LIBNET_LINK, /* injection type */
diff --git a/sample/libnet_test.h b/sample/libnet_test.h
index 00e6c54..e7d2323 100644
--- a/sample/libnet_test.h
+++ b/sample/libnet_test.h
@@ -1,6 +1,4 @@
/*
- * $Id: libnet_test.h,v 1.3 2004/01/29 21:17:16 mike Exp $
- *
* libnet_test.h
*
* Copyright (c) 1998 - 2001 Mike D. Schiffman <mike@infonexus.com>
@@ -15,8 +13,7 @@
#include "../include/libnet.h"
-#if (_WIN32) || (__CYGWIN__)
-#else
+#if !defined(__WIN32__)
# include <netinet/in.h>
#endif
@@ -44,21 +41,23 @@ u_char org_code[3] = {0x00, 0x00, 0x00};
void usage(char *);
#if defined(__WIN32__)
-#include <getopt.h>
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#ifndef _WIN32
-#include <sys/time.h>
-#endif
-#if defined(__GNUC__) /* mingw compiler */
-extern __attribute__((dllimport)) char *optarg;
-#else /* assume msvc */
-#ifndef _WIN32
-extern __dllspec(dllimport) char *optarg;
-#endif
-#endif
+ #include <getopt.h> /* For non-MingW, this is a local libnet/win32/getopt.h */
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+
+ #ifndef _MSC_VER
+ #include <sys/time.h>
+ #endif
+
+// FIXME: weido... see #define LIBNET_API __declspec(dllexport) in win32/libnet.h...
+//#if defined(__GNUC__) /* mingw compiler */
+//extern __attribute__((dllimport)) char *optarg;
+//#else /* assume msvc */
+//extern __dllspec(dllimport) char *optarg;
+//#endif
+
#endif /* __WIN32__ */
#endif /* __LIBNET_TEST_H */
-/* EOF */
+/* EOF */ \ No newline at end of file
diff --git a/sample/test_ipv6_icmpv4.c b/sample/test_ipv6_icmpv4.c
index 704c5ac..03c2222 100644
--- a/sample/test_ipv6_icmpv4.c
+++ b/sample/test_ipv6_icmpv4.c
@@ -33,8 +33,11 @@
#include "./libnet_test.h"
#include <assert.h>
-
+#ifdef _WIN32
+#include <winsock2.h>
+#else
#include <netinet/in.h>
+#endif
static void print_pblocks(libnet_t* l)
{
diff --git a/scripts/Build b/scripts/Build
index 8d3eb22..fd0f385 100755
--- a/scripts/Build
+++ b/scripts/Build
@@ -2,7 +2,6 @@
set -e
-make -C doc doc
-make
-make dist && mv libnet-1*.tar.gz ..
-
+make V=1
+make -C ../lua
+make distcheck V=1 && mv libnet-1*.tar.gz libnet-1*.zip ..
diff --git a/scripts/Clean b/scripts/Clean
index 39eff15..68f75bb 100755
--- a/scripts/Clean
+++ b/scripts/Clean
@@ -2,7 +2,7 @@
set -x
-git clean -x -d
+git clean -x -d -f
(cd /usr/local/stow && sudo stow -D libnet)
diff --git a/scripts/Package b/scripts/Package
index babd2be..f7f20b8 100755
--- a/scripts/Package
+++ b/scripts/Package
@@ -1,7 +1,10 @@
+#!/bin/sh
+
+# run this script as root
set -x
-V=$(git describe --tags| sed -es/libnet-//)
+V=$(git describe | sed -es/libnet-//)
D=$(date --rfc-822)
rm -rf debian
@@ -9,5 +12,5 @@ cp -r ../debian ./
sed -es"/VERSION/$V/" -es"/DATE/$D/" < ../debian/changelog > debian/changelog
cat debian/changelog
-dpkg-buildpackage -b -us -uc -rfakeroot -i -I.swp
+dpkg-buildpackage -b -us -uc -i -I.swp
diff --git a/scripts/Prepare b/scripts/Prepare
index d5458bb..871c03a 100755
--- a/scripts/Prepare
+++ b/scripts/Prepare
@@ -5,5 +5,13 @@ set -e
sh ./autogen.sh
-CFLAGS="-O0 -g -Wall" ./configure --with-pic --enable-dependency-tracking --enable-shared=yes
+CFLAGS="-O0 -g -Wall --coverage" ./configure
+# NOTES:
+
+# Coverage data matches the source files more closely if you do not optimize.
+
+# --coverage
+# This option is used to compile and link code instrumented for coverage
+# analysis. The option is a synonym for -fprofile-arcs -ftest-coverage
+# (when compiling) and -lgcov (when linking).
diff --git a/scripts/Push b/scripts/Push
deleted file mode 100755
index b2b2e5c..0000000
--- a/scripts/Push
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-V=$(git describe --tags)
-F="../$V.tar.gz ../README.txt"
-
-scp $F ras_u_ras_t@frs.sourceforge.net:/home/frs/project/libnet-dev/
-
diff --git a/src/Makefile.am b/src/Makefile.am
index f2874a5..d9cadd0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,3 @@
-# $Id: Makefile.am,v 1.6 2004/11/09 07:05:07 mike Exp $
#
# Libnet automake information file
# Copyright (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com>
@@ -6,9 +5,8 @@
#
# Process this file with automake to produce a Makefile.in script.
-include $(top_srcdir)/Makefile.am.common
-
EXTRA_DIST = libnet_dll.c common.h
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(builddir)/../include
lib_LTLIBRARIES = libnet.la
@@ -65,7 +63,8 @@ libnet_la_LIBADD = @LTLIBOBJS@
# Note: this version-info should NOT simply be the version of the libnet
# package. See:
-# http://www.sourceware.org/autobook/autobook/autobook_91.html
+# https://www.sourceware.org/autobook/autobook/autobook_61.html#Library-Versioning
+# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
# for the rules.
#
# Summary:
@@ -91,9 +90,22 @@ libnet_la_LIBADD = @LTLIBOBJS@
# 1.1.2.1-fork is 5:0:4
# 1.1.3 will be 6:0:5 -> new interfaces, backwards compatible
# 1.1.4 was 6:0:5 -> probably an error on my part
-# 1.1.5 is 7:0:6 -> new APIs, backwards compat
-# 1.1.6 is 8:0:7 -> new APIs, backwards compat
+# 1.1.5 is 7:0:6 -> new APIs, backwards compatible
+# 1.1.6 is 8:0:7 -> new APIs, backwards compatible
# 1.2 is 9:0:0 -> new APIs, removed __libnet_print_vers (internal, should not have been used, but linkable) APIs
libnet_la_LDFLAGS = -version-info 9:0:0
+## Windows stuff
+
+if WIN32
+libnet_la_LDFLAGS += -no-undefined
+# don't do any of this if we're not building shared libnet
+if COND_SHARED
+libnet_la_SOURCES += libnet_dll_info.rc
+libnet_la_LDFLAGS += -Wl,--output-def, -Wl,libnet-9.def
+
+.rc.lo:
+ $(AM_V_GEN)$(LIBTOOL) --mode=compile --silent $(WINDRES) $< -o $@
+endif
+endif \ No newline at end of file
diff --git a/src/common.h b/src/common.h
index 358db77..32b36cd 100644
--- a/src/common.h
+++ b/src/common.h
@@ -29,15 +29,28 @@
#if (_WIN32) || (__CYGWIN__)
-/* MSVC warns about snprintf */
-#define _CRT_SECURE_NO_WARNINGS
+ /* MSVC warns about snprintf */
+ #define _CRT_SECURE_NO_WARNINGS
+ /* don't pull in pcap/bpf.h */
+ #define PCAP_DONT_INCLUDE_PCAP_BPF_H
+ #include <pcap/pcap.h>
+
+ /* don't pull in Packet32's locol bpf definitions */
+ // #define BPF_MAJOR_VERSION
+ #include <Packet32.h>
+ #include <malloc.h> /* alloca() */
+
+#ifdef __MINGW32__
+ #include <ntddndis.h>
#else
+ #include <Ntddndis.h>
+#endif
-#include <assert.h>
+#else
+#include <assert.h>
#include <sys/types.h>
-
#include <netinet/in.h>
/* TODO - should ../include/gnuc.h be included here? */
@@ -46,7 +59,7 @@
#endif
-#include "../include/config.h"
+#include <config.h>
#include "../include/libnet.h"
/* IPPROTO_ and sockaddr_ definitions are here. They are often
@@ -55,4 +68,4 @@
*/
#ifndef IPPROTO_MH
#define IPPROTO_MH 135 /* IPv6 mobility header */
-#endif
+#endif \ No newline at end of file
diff --git a/src/libnet-9.def b/src/libnet-9.def
new file mode 100644
index 0000000..746eb8e
--- /dev/null
+++ b/src/libnet-9.def
@@ -0,0 +1,176 @@
+EXPORTS
+ all_lists @1 DATA
+ gethostbyname2 @2
+ in6addr_error @3 DATA
+ libnet_addr2name4 @4
+ libnet_addr2name4_r @5
+ libnet_addr2name6_r @6
+ libnet_adv_cull_header @7
+ libnet_adv_cull_packet @8
+ libnet_adv_free_packet @9
+ libnet_adv_write_link @10
+ libnet_adv_write_raw_ipv4 @11
+ libnet_autobuild_arp @12
+ libnet_autobuild_ethernet @13
+ libnet_autobuild_fddi @14
+ libnet_autobuild_ipv4 @15
+ libnet_autobuild_ipv6 @16
+ libnet_autobuild_link @17
+ libnet_autobuild_token_ring @18
+ libnet_build_802_1q @19
+ libnet_build_802_1x @20
+ libnet_build_802_2 @21
+ libnet_build_802_2snap @22
+ libnet_build_802_3 @23
+ libnet_build_arp @24
+ libnet_build_asn1_bitstring @25
+ libnet_build_asn1_header @26
+ libnet_build_asn1_int @27
+ libnet_build_asn1_length @28
+ libnet_build_asn1_null @29
+ libnet_build_asn1_objid @30
+ libnet_build_asn1_sequence @31
+ libnet_build_asn1_string @32
+ libnet_build_asn1_uint @33
+ libnet_build_bgp4_header @34
+ libnet_build_bgp4_notification @35
+ libnet_build_bgp4_open @36
+ libnet_build_bgp4_update @37
+ libnet_build_bootpv4 @38
+ libnet_build_cdp @39
+ libnet_build_cdp_value @40
+ libnet_build_data @41
+ libnet_build_dhcpv4 @42
+ libnet_build_dnsv4 @43
+ libnet_build_egre @44
+ libnet_build_ethernet @45
+ libnet_build_fddi @46
+ libnet_build_gre @47
+ libnet_build_gre_last_sre @48
+ libnet_build_gre_sre @49
+ libnet_build_hsrp @50
+ libnet_build_icmpv4_echo @51
+ libnet_build_icmpv4_mask @52
+ libnet_build_icmpv4_redirect @53
+ libnet_build_icmpv4_timeexceed @54
+ libnet_build_icmpv4_timestamp @55
+ libnet_build_icmpv4_unreach @56
+ libnet_build_icmpv6 @57
+ libnet_build_icmpv6_common @58
+ libnet_build_icmpv6_echo @59
+ libnet_build_icmpv6_ndp_nadv @60
+ libnet_build_icmpv6_ndp_nsol @61
+ libnet_build_icmpv6_ndp_opt @62
+ libnet_build_icmpv6_unreach @63
+ libnet_build_igmp @64
+ libnet_build_ipsec_ah @65
+ libnet_build_ipsec_esp_ftr @66
+ libnet_build_ipsec_esp_hdr @67
+ libnet_build_ipv4 @68
+ libnet_build_ipv4_options @69
+ libnet_build_ipv6 @70
+ libnet_build_ipv6_destopts @71
+ libnet_build_ipv6_frag @72
+ libnet_build_ipv6_hbhopts @73
+ libnet_build_ipv6_routing @74
+ libnet_build_isl @75
+ libnet_build_link @76
+ libnet_build_mpls @77
+ libnet_build_ntp @78
+ libnet_build_ospfv2 @79
+ libnet_build_ospfv2_dbd @80
+ libnet_build_ospfv2_hello @81
+ libnet_build_ospfv2_lsa @82
+ libnet_build_ospfv2_lsa_as @83
+ libnet_build_ospfv2_lsa_net @84
+ libnet_build_ospfv2_lsa_rtr @85
+ libnet_build_ospfv2_lsa_sum @86
+ libnet_build_ospfv2_lsr @87
+ libnet_build_ospfv2_lsu @88
+ libnet_build_rip @89
+ libnet_build_rpc_call @90
+ libnet_build_sebek @91
+ libnet_build_snmp @92
+ libnet_build_stp_conf @93
+ libnet_build_stp_tcn @94
+ libnet_build_tcp @95
+ libnet_build_tcp_options @96
+ libnet_build_token_ring @97
+ libnet_build_udp @98
+ libnet_build_vrrp @99
+ libnet_clear_packet @100
+ libnet_close_link_interface @101
+ libnet_close_raw4 @102
+ libnet_close_raw6 @103
+ libnet_compute_crc @104
+ libnet_cq_add @105
+ libnet_cq_destroy @106
+ libnet_cq_end_loop @107
+ libnet_cq_find_by_label @108
+ libnet_cq_getlabel @109
+ libnet_cq_head @110
+ libnet_cq_last @111
+ libnet_cq_next @112
+ libnet_cq_remove @113
+ libnet_cq_remove_by_label @114
+ libnet_cq_size @115
+ libnet_destroy @116
+ libnet_diag_dump_context @117
+ libnet_diag_dump_hex @118
+ libnet_diag_dump_pblock @119
+ libnet_diag_dump_pblock_type @120
+ libnet_do_checksum @121
+ libnet_get_hwaddr @122
+ libnet_get_ipaddr4 @123
+ libnet_get_ipaddr6 @124
+ libnet_get_prand @125
+ libnet_getdevice @126
+ libnet_geterror @127
+ libnet_getfd @128
+ libnet_getgre_length @129
+ libnet_getpacket_size @130
+ libnet_getpbuf @131
+ libnet_getpbuf_size @132
+ libnet_hex_aton @133
+ libnet_ifaddrlist @134
+ libnet_in6_is_error @135
+ libnet_in_cksum @136
+ libnet_inet_checksum @137
+ libnet_init @138
+ libnet_ip_check @139
+ libnet_name2addr4 @140
+ libnet_name2addr6 @141
+ libnet_open_link @142
+ libnet_open_raw4 @143
+ libnet_open_raw6 @144
+ libnet_pblock_append @145
+ libnet_pblock_coalesce @146
+ libnet_pblock_delete @147
+ libnet_pblock_find @148
+ libnet_pblock_insert_before @149
+ libnet_pblock_new @150
+ libnet_pblock_p2p @151
+ libnet_pblock_probe @152
+ libnet_pblock_record_ip_offset @153
+ libnet_pblock_setflags @154
+ libnet_pblock_swap @155
+ libnet_pblock_update @156
+ libnet_plist_chain_dump @157
+ libnet_plist_chain_dump_string @158
+ libnet_plist_chain_free @159
+ libnet_plist_chain_new @160
+ libnet_plist_chain_next_pair @161
+ libnet_seed_prand @162
+ libnet_select_device @163
+ libnet_stats @164
+ libnet_toggle_checksum @165
+ libnet_version @166
+ libnet_win32_build_fake_ethernet @167
+ libnet_win32_build_fake_token @168
+ libnet_win32_get_remote_mac @169
+ libnet_win32_read_arp_table @170
+ libnet_win32_write_raw_ipv4 @171
+ libnet_write @172
+ libnet_write_link @173
+ libnet_write_raw_ipv4 @174
+ libnet_write_raw_ipv6 @175
diff --git a/src/libnet_dll_info.rc b/src/libnet_dll_info.rc
new file mode 100644
index 0000000..23f20f3
--- /dev/null
+++ b/src/libnet_dll_info.rc
@@ -0,0 +1,59 @@
+/*
+ *
+ * libnet
+ * libnet_dll_info.rc - DLL version-information resource
+ *
+ * Copyright (c) 2017 Ali Abdulkadir <autostart.ini@gmail.com>
+ *
+ * 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.
+ *
+ */
+
+ /*
+ * FIXME all this needs to be manually updated. Unless someone bothers to
+ * update libnet_version.c...
+ */
+
+#include <winver.h>
+
+ VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,2,0,0
+ PRODUCTVERSION 1,2,0,0
+ FILEFLAGSMASK 0x3fL
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE VFT2_DRV_NETWORK
+ FILEFLAGS 0
+ BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "Comments", "Provided under a BSD-Style License\0"
+ VALUE "CompanyName", "https://github.com/sgeto/libnet\0"
+ VALUE "FileDescription", "Portable Packet Construction and Injection API\0"
+ VALUE "FileVersion", "1,2,0,0"
+ VALUE "InternalName", "Libnet\0"
+ VALUE "LegalCopyright", "Copyright (c) The libnet Developer Community.\0"
+ VALUE "LegalTrademarks", "\0"
+ VALUE "OriginalFilename", "libnet-9.dll\0"
+ VALUE "ProductName", "libnet\0"
+ VALUE "ProductVersion", "1.2-rc3"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0, 1200
+ END
+ END
+ /* EOF */ \ No newline at end of file
diff --git a/src/libnet_link_bpf.c b/src/libnet_link_bpf.c
index 3743c83..fbdb642 100644
--- a/src/libnet_link_bpf.c
+++ b/src/libnet_link_bpf.c
@@ -46,7 +46,7 @@
#include <net/if_types.h>
#include "../include/gnuc.h"
-#include <bpf.h>
+#include "../include/bpf.h"
#ifdef HAVE_OS_PROTO_H
#include "../include/os-proto.h"
diff --git a/src/libnet_link_none.c b/src/libnet_link_none.c
index 8be5fb4..faf7bff 100644
--- a/src/libnet_link_none.c
+++ b/src/libnet_link_none.c
@@ -16,7 +16,7 @@
* 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:
+ * features or use of this software display the following acknowledgment:
* ``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
diff --git a/src/libnet_link_win32.c b/src/libnet_link_win32.c
index 738b10b..5f89680 100644
--- a/src/libnet_link_win32.c
+++ b/src/libnet_link_win32.c
@@ -1,6 +1,4 @@
/*
- * $Id: libnet_link_win32.c,v 1.16 2004/02/18 18:19:00 mike Exp $
- *
* libnet
* libnet_link_win32.c - low-level win32 libwpcap routines
*
@@ -32,21 +30,78 @@
*
*/
-/* MSVC warns about snprintf. This needs to be defined before the declaration of _snprintf is seen. */
-#define _CRT_SECURE_NO_WARNINGS
-
/* Libnet's unnamespaced ICMP6_ macros stomp on the enumerated versions of
these names in the MS headers, so pre-include this header. */
+
#include <winsock2.h>
#include <iphlpapi.h> /* From the Microsoft Platform SDK */
+#include <iprtrmib.h>
+#include <assert.h>
#include "common.h"
-#include <winsock2.h>
-#include <assert.h>
-#include <Packet32.h>
-#include <Ntddndis.h>
-#include "iprtrmib.h"
+/*
+ * These are the types that are the same on all platforms, and that
+ * have been defined by <net/bpf.h> for ages.
+ */
+
+#ifndef DLT_NULL
+#define DLT_NULL 0 /* BSD loopback encapsulation */
+#endif
+
+#ifndef DLT_EN10MB
+#define DLT_EN10MB 1 /* Ethernet (10Mb) */
+#endif
+
+#ifndef DLT_EN3MB
+#define DLT_EN3MB 2 /* Experimental Ethernet (3Mb) */
+#endif
+
+#ifndef DLT_AX25
+#define DLT_AX25 3 /* Amateur Radio AX.25 */
+#endif
+
+#ifndef DLT_PRONET
+#define DLT_PRONET 4 /* Proteon ProNET Token Ring */
+#endif
+
+#ifndef DLT_CHAOS
+#define DLT_CHAOS 5 /* Chaos */
+#endif
+
+#ifndef DLT_IEEE802
+#define DLT_IEEE802 6 /* 802.5 Token Ring */
+#endif
+
+#ifndef DLT_ARCNET
+#define DLT_ARCNET 7 /* ARCNET, with BSD-style header */
+#endif
+
+#ifndef DLT_SLIP
+#define DLT_SLIP 8 /* Serial Line IP */
+#endif
+
+#ifndef DLT_PPP
+#define DLT_PPP 9 /* Point-to-point Protocol */
+#endif
+
+#ifndef DLT_FDDI
+#define DLT_FDDI 10 /* FDDI */
+#endif
+
+/*
+ * These are types that are different on some platforms, and that
+ * have been defined by <net/bpf.h> for ages. We use #ifdefs to
+ * detect the BSDs that define them differently from the traditional
+ * libpcap <net/bpf.h>
+ *
+ * XXX - DLT_ATM_RFC1483 is 13 in BSD/OS, and DLT_RAW is 14 in BSD/OS,
+ * but I don't know what the right #define is for BSD/OS.
+ */
+
+#ifndef DLT_ATM_RFC1483
+#define DLT_ATM_RFC1483 11 /* LLC-encapsulated ATM */
+#endif
int
libnet_open_link(libnet_t *l)
@@ -55,9 +110,9 @@ libnet_open_link(libnet_t *l)
NetType IFType;
if (l == NULL)
- {
+ {
return (-1);
- }
+ }
if (l->device == NULL)
{
@@ -75,10 +130,10 @@ libnet_open_link(libnet_t *l)
dwErrorCode=GetLastError();
snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
"%s(): unable to open the driver, error Code : %lx",
- __func__, dwErrorCode);
+ __func__, dwErrorCode);
return (-1);
}
-
+
/* increase the send buffer */
PacketSetBuff(l->lpAdapter, 512000);
@@ -144,29 +199,18 @@ libnet_close_link_interface(libnet_t *l)
}
int
-libnet_write_link(libnet_t *l, const uint8_t *packet, uint32_t size)
+libnet_write_link(libnet_t *l, const uint8_t *data, uint32_t size)
{
- LPPACKET lpPacket;
- DWORD BytesTransfered;
+ PACKET pkt;
+ DWORD BytesTransfered = -1;
- BytesTransfered = -1;
+ /* Packet* arguments aren't const, but aren't actually modified.
+ */
+ PacketInitPacket(&pkt, (PVOID)data, size);
- if ((lpPacket = PacketAllocatePacket()) == NULL)
- {
- snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
- "%s(): failed to allocate the LPPACKET structure", __func__);
- return (-1);
- }
- /* FIXME Packet* arguments aren't const, are they actually modified? That would be a problem, we can't modify our input */
- PacketInitPacket(lpPacket, packet, size);
+ if (PacketSendPacket(l->lpAdapter, &pkt, TRUE))
+ BytesTransfered = size;
- /* PacketSendPacket returns a BOOLEAN */
- if(PacketSendPacket(l->lpAdapter, lpPacket, TRUE))
- {
- BytesTransfered = size;
- }
-
- PacketFreePacket(lpPacket);
return (BytesTransfered);
}
@@ -177,18 +221,18 @@ libnet_get_hwaddr(libnet_t *l)
ULONG IoCtlBufferLength = (sizeof(PACKET_OID_DATA) + sizeof(ULONG) - 1);
PPACKET_OID_DATA OidData;
-
+
int i = 0;
if (l == NULL)
- {
+ {
return (NULL);
- }
+ }
if (l->device == NULL)
- {
+ {
if (libnet_select_device(l) == -1)
- {
+ {
snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
"%s(): can't figure out a device to use", __func__);
return (NULL);
@@ -196,7 +240,7 @@ libnet_get_hwaddr(libnet_t *l)
}
OidData = (struct _PACKET_OID_DATA *) malloc(IoCtlBufferLength);
-
+
if (OidData == NULL)
{
snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
@@ -206,13 +250,13 @@ libnet_get_hwaddr(libnet_t *l)
if (l->link_type == DLT_IEEE802)
{
- OidData->Oid = OID_802_5_CURRENT_ADDRESS;
+ OidData->Oid = OID_802_5_CURRENT_ADDRESS;
}
else
{
- OidData->Oid = OID_802_3_CURRENT_ADDRESS;
+ OidData->Oid = OID_802_3_CURRENT_ADDRESS;
}
-
+
OidData->Length = 6;
if((PacketRequest(l->lpAdapter, FALSE, OidData)) == FALSE)
{
@@ -243,12 +287,12 @@ libnet_win32_get_remote_mac(libnet_t *l, DWORD DestIP)
static BYTE bcastmac[]= {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
BYTE *MAC = libnet_win32_read_arp_table(DestIP);
-
+
if (MAC==NULL)
{
memset(pulMac, 0xff, sizeof (pulMac));
memset(&sin, 0, sizeof(sin));
-
+
if((hr = SendARP (DestIP, 0, pulMac, &ulLen)) != NO_ERROR)
{
*(int32_t *)&sin.sin_addr = DestIP;
@@ -272,7 +316,7 @@ libnet_win32_get_remote_mac(libnet_t *l, DWORD DestIP)
return(bcastmac); /* ff:ff:ff:ff:ff:ff */
}
}
-
+
pbHexMac = (PBYTE) pulMac;
return (pbHexMac);
@@ -286,26 +330,23 @@ libnet_win32_get_remote_mac(libnet_t *l, DWORD DestIP)
BYTE * libnet_win32_read_arp_table(DWORD DestIP)
{
static BYTE buffMAC[6];
- BOOL fOrder=TRUE;
- BYTE *MAC=NULL;
- DWORD status, i, ci;
-
- PMIB_IPNETTABLE pIpNetTable = NULL;
+ BOOL fOrder = TRUE;
+ DWORD status;
+
+ MIB_IPNETTABLE *pIpNetTable = NULL;
DWORD Size = 0;
-
- memset(buffMAC, 0, sizeof(buffMAC));
- if((status = GetIpNetTable(pIpNetTable, &Size, fOrder)) == ERROR_INSUFFICIENT_BUFFER)
+ memset(buffMAC, 0, sizeof(buffMAC));
+ status = GetIpNetTable(NULL, &Size, fOrder);
+ if (status == ERROR_INSUFFICIENT_BUFFER)
{
- pIpNetTable = (PMIB_IPNETTABLE) malloc(Size);
- assert(pIpNetTable);
+ pIpNetTable = alloca(Size);
status = GetIpNetTable(pIpNetTable, &Size, fOrder);
}
- if(status == NO_ERROR)
+ if (status == NO_ERROR)
{
- /* set current interface */
- ci = pIpNetTable->table[0].dwIndex;
+ DWORD i, ci = pIpNetTable->table[0].dwIndex; /* set current interface */
for (i = 0; i < pIpNetTable->dwNumEntries; ++i)
{
@@ -315,23 +356,10 @@ BYTE * libnet_win32_read_arp_table(DWORD DestIP)
if(pIpNetTable->table[i].dwAddr == DestIP) /* found IP in arp cache */
{
memcpy(buffMAC, pIpNetTable->table[i].bPhysAddr, sizeof(buffMAC));
- free(pIpNetTable);
return buffMAC;
- }
+ }
}
-
- if (pIpNetTable)
- free (pIpNetTable);
- return(NULL);
}
- else
- {
- if (pIpNetTable)
- {
- free (pIpNetTable);
- }
- MAC=NULL;
- }
return(NULL);
}
diff --git a/src/libnet_prand.c b/src/libnet_prand.c
index d62a24c..915a4d6 100644
--- a/src/libnet_prand.c
+++ b/src/libnet_prand.c
@@ -1,6 +1,4 @@
/*
- * $Id: libnet_prand.c,v 1.7 2004/01/28 19:45:00 mike Exp $
- *
* libnet
* libnet_prand.c - pseudo-random number generation
*
@@ -29,24 +27,33 @@
* SUCH DAMAGE.
*
*/
-
+
#include "common.h"
+#ifdef _WIN32
+#include <wincrypt.h>
+#include <time.h>
+
+#else
+#include <sys/time.h> /* gettimeofday() */
+#endif
+
+
int
libnet_seed_prand(libnet_t *l)
{
- #if !(__WIN32__)
+#ifndef WIN32
struct timeval seed;
- #endif
+#endif
if (l == NULL)
- {
+ {
return (-1);
- }
+ }
- #if __WIN32__
+#ifdef WIN32
srand((unsigned)time(NULL));
- #else
+#else
if (gettimeofday(&seed, NULL) == -1)
{
snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
@@ -58,7 +65,7 @@ libnet_seed_prand(libnet_t *l)
* More entropy then just seeding with time(2).
*/
srandom((unsigned)(seed.tv_sec ^ seed.tv_usec));
- #endif
+#endif
return (1);
}
@@ -71,17 +78,16 @@ uint32_t
libnet_get_prand(int mod)
{
uint32_t n; /* 0 to 4,294,967,295 */
-#ifndef _WIN32
+#ifndef WIN32
n = random();
#else
- HCRYPTPROV hProv = 0;
- CryptAcquireContext(&hProv,
- 0, 0, PROV_RSA_FULL,
- CRYPT_VERIFYCONTEXT);
-
- CryptGenRandom(hProv,
- sizeof(n), (BYTE*)&n);
- CryptReleaseContext(hProv, 0);
+ HCRYPTPROV hProv = 0;
+
+ CryptAcquireContext(&hProv,
+ 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT);
+
+ CryptGenRandom(hProv, sizeof(n), (BYTE*)&n);
+ CryptReleaseContext(hProv, 0);
#endif
switch (mod)
{
@@ -101,4 +107,4 @@ libnet_get_prand(int mod)
return (0); /* NOTTREACHED */
}
-/* EOF */
+/* EOF */ \ No newline at end of file
diff --git a/src/libnet_resolve.c b/src/libnet_resolve.c
index a654520..2f9040b 100644
--- a/src/libnet_resolve.c
+++ b/src/libnet_resolve.c
@@ -1,6 +1,4 @@
/*
- * $Id: libnet_resolve.c,v 1.21 2004/11/09 07:05:07 mike Exp $
- *
* libnet
* libnet_resolve.c - various name resolution type routines
*
diff --git a/src/libnet_write.c b/src/libnet_write.c
index 5c447ae..f9a60e8 100644
--- a/src/libnet_write.c
+++ b/src/libnet_write.c
@@ -1,12 +1,10 @@
/*
- * $Id: libnet_write.c,v 1.14 2004/11/09 07:05:07 mike Exp $
- *
* libnet
* libnet_write.c - writes a prebuilt packet to the network
*
* Copyright (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com>
* All rights reserved.
- * win32 specific code
+ * win32 specific code
* Copyright (c) 2002 - 2003 Roberto Larcher <roberto.larcher@libero.it>
*
* Redistribution and use in source and binary forms, with or without
@@ -34,11 +32,6 @@
#include "common.h"
-#if (_WIN32) || (__CYGWIN__)
-#include "packet32.h"
-#include "Ntddndis.h"
-#endif
-
int
libnet_write(libnet_t *l)
{
@@ -47,7 +40,7 @@ libnet_write(libnet_t *l)
uint8_t *packet = NULL;
if (l == NULL)
- {
+ {
return (-1);
}
@@ -120,9 +113,9 @@ done:
#if defined (__WIN32__)
libnet_ptag_t
-libnet_win32_build_fake_ethernet(uint8_t *dst, uint8_t *src, uint16_t type,
-const uint8_t *payload, uint32_t payload_s, uint8_t *packet, libnet_t *l,
-libnet_ptag_t ptag)
+libnet_win32_build_fake_ethernet (uint8_t *dst, uint8_t *src, uint16_t type,
+ const uint8_t *payload, uint32_t payload_s,
+ uint8_t *packet, libnet_t *l, libnet_ptag_t ptag)
{
struct libnet_ethernet_hdr eth_hdr;
@@ -131,7 +124,7 @@ libnet_ptag_t ptag)
return (-1);
}
- memset(&eth_hdr, 0, sizeof(eth_hdr));
+ memset(&eth_hdr, 0, sizeof(eth_hdr));
eth_hdr.ether_type = htons(type);
memcpy(eth_hdr.ether_dhost, dst, ETHER_ADDR_LEN); /* destination address */
memcpy(eth_hdr.ether_shost, src, ETHER_ADDR_LEN); /* source address */
@@ -149,28 +142,28 @@ libnet_ptag_t ptag)
}
libnet_ptag_t
-libnet_win32_build_fake_token(uint8_t *dst, uint8_t *src, uint16_t type,
-const uint8_t *payload, uint32_t payload_s, uint8_t *packet, libnet_t *l,
-libnet_ptag_t ptag)
+libnet_win32_build_fake_token (uint8_t *dst, uint8_t *src, uint16_t type,
+ const uint8_t *payload, uint32_t payload_s,
+ uint8_t *packet, libnet_t *l, libnet_ptag_t ptag)
{
struct libnet_token_ring_hdr token_ring_hdr;
-
+
if (!packet)
{
return (-1);
}
- memset(&token_ring_hdr, 0, sizeof(token_ring_hdr));
+ memset(&token_ring_hdr, 0, sizeof(token_ring_hdr));
token_ring_hdr.token_ring_access_control = 0x10;
token_ring_hdr.token_ring_frame_control = 0x40;
token_ring_hdr.token_ring_llc_dsap = 0xaa;
token_ring_hdr.token_ring_llc_ssap = 0xaa;
token_ring_hdr.token_ring_llc_control_field = 0x03;
token_ring_hdr.token_ring_type = htons(type);
- memcpy(token_ring_hdr.token_ring_dhost, dst, ETHER_ADDR_LEN);
- memcpy(token_ring_hdr.token_ring_shost, libnet_get_hwaddr(l),
- ETHER_ADDR_LEN);
-
+ memcpy(token_ring_hdr.token_ring_dhost, dst, ETHER_ADDR_LEN);
+ memcpy(token_ring_hdr.token_ring_shost, libnet_get_hwaddr(l),
+ ETHER_ADDR_LEN);
+
if (payload && payload_s)
{
/*
@@ -185,45 +178,38 @@ libnet_ptag_t ptag)
int
libnet_win32_write_raw_ipv4(libnet_t *l, const uint8_t *payload, uint32_t payload_s)
-{
+{
static BYTE dst[ETHER_ADDR_LEN];
static BYTE src[ETHER_ADDR_LEN];
-
- uint8_t *packet = NULL;
+
+ uint8_t *packet;
uint32_t packet_s;
- LPPACKET lpPacket = NULL;
- DWORD remoteip = 0;
- DWORD BytesTransfered;
+ DWORD remoteip = 0;
NetType type;
struct libnet_ipv4_hdr *ip_hdr = NULL;
-
+
memset(dst, 0, sizeof(dst));
memset(src, 0, sizeof(src));
packet_s = payload_s + l->link_offset;
- packet = (uint8_t *)malloc(packet_s);
- if (packet == NULL)
- {
- snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
- "%s(): failed to allocate packet", __func__);
- return (-1);
- }
- /* FIXME all the return paths below, except the last, leak 'packet' */
+ packet = (uint8_t*) alloca(packet_s);
- /* we have to do the IP checksum */
- /* FIXME MSVC warning is correct, checksum modifies its input. Fix is to build checksum inside the allocated 'packet' */
- if (libnet_inet_checksum(l, payload, IPPROTO_IP, LIBNET_IPV4_H, payload, payload+payload_s) == -1)
+ /* we have to do the IP checksum
+ * FIXME: warning is correct, checksum modifies its input.
+ * Fix is to build checksum inside the allocated 'packet'
+ */
+ if (libnet_inet_checksum(l, (uint8_t*)payload, IPPROTO_IP, LIBNET_IPV4_H, payload, payload+payload_s) == -1)
{
/* error msg set in libnet_do_checksum */
return (-1);
- }
+ }
/* MACs, IPs and other stuff... */
ip_hdr = (struct libnet_ipv4_hdr *)payload;
memcpy(src, libnet_get_hwaddr(l), sizeof(src));
remoteip = ip_hdr->ip_dst.S_un.S_addr;
-
+
/* check if the remote station is the local station */
if (remoteip == libnet_get_ipaddr4(l))
{
@@ -235,7 +221,7 @@ libnet_win32_write_raw_ipv4(libnet_t *l, const uint8_t *payload, uint32_t payloa
}
PacketGetNetType(l->lpAdapter, &type);
-
+
switch(type.LinkType)
{
case NdisMedium802_3:
@@ -256,29 +242,8 @@ libnet_win32_write_raw_ipv4(libnet_t *l, const uint8_t *payload, uint32_t payloa
"%s(): network type (%d) is not supported", __func__,
type.LinkType);
return (-1);
- break;
- }
-
- BytesTransfered = -1;
- if ((lpPacket = PacketAllocatePacket()) == NULL)
- {
- snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
- "%s(): failed to allocate the LPPACKET structure", __func__);
- return (-1);
- }
-
- PacketInitPacket(lpPacket, packet, packet_s);
-
- /* PacketSendPacket returns a BOOLEAN */
- if (PacketSendPacket(l->lpAdapter, lpPacket, TRUE))
- {
- BytesTransfered = packet_s;
}
-
- PacketFreePacket(lpPacket);
- free(packet);
-
- return (BytesTransfered);
+ return libnet_write_link (l, packet, packet_s);
}
int
@@ -304,9 +269,9 @@ libnet_write_raw_ipv4(libnet_t *l, const uint8_t *packet, uint32_t size)
struct libnet_ipv4_hdr *ip_hdr;
if (l == NULL)
- {
+ {
return (-1);
- }
+ }
ip_hdr = (struct libnet_ipv4_hdr *)packet;
@@ -314,7 +279,7 @@ libnet_write_raw_ipv4(libnet_t *l, const uint8_t *packet, uint32_t size)
/*
* For link access, we don't need to worry about the inconsistencies of
* certain BSD kernels. However, raw socket nuances abound. Certain
- * BSD implmentations require the ip_len and ip_off fields to be in host
+ * BSD implementations require the ip_len and ip_off fields to be in host
* byte order.
*/
ip_hdr->ip_len = FIX(ip_hdr->ip_len);
@@ -324,30 +289,6 @@ libnet_write_raw_ipv4(libnet_t *l, const uint8_t *packet, uint32_t size)
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = ip_hdr->ip_dst.s_addr;
-#if (__WIN32__)
- /* set port for TCP */
- /*
- * XXX - should first check to see if there's a pblock for a TCP
- * header, if not we can use a dummy value for the port.
- */
- if (ip_hdr->ip_p == 6)
- {
- struct libnet_tcp_hdr *tcph_p =
- (struct libnet_tcp_hdr *)(packet + (ip_hdr->ip_hl << 2));
- sin.sin_port = tcph_p->th_dport;
- }
- /* set port for UDP */
- /*
- * XXX - should first check to see if there's a pblock for a UDP
- * header, if not we can use a dummy value for the port.
- */
- else if (ip_hdr->ip_p == 17)
- {
- struct libnet_udp_hdr *udph_p =
- (struct libnet_udp_hdr *)(packet + (ip_hdr->ip_hl << 2));
- sin.sin_port = udph_p->uh_dport;
- }
-#endif /* __WIN32__ */
c = sendto(l->fd, packet, size, 0, (struct sockaddr *)&sin,
sizeof(sin));
@@ -359,15 +300,9 @@ libnet_write_raw_ipv4(libnet_t *l, const uint8_t *packet, uint32_t size)
if (c != size)
{
-#if !(__WIN32__)
snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
"%s(): %d bytes written (%s)", __func__, c,
strerror(errno));
-#else /* __WIN32__ */
- snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
- "%s(): %d bytes written (%d)", __func__, c,
- WSAGetLastError());
-#endif /* !__WIN32__ */
}
return (c);
}
@@ -375,20 +310,19 @@ libnet_write_raw_ipv4(libnet_t *l, const uint8_t *packet, uint32_t size)
int
libnet_write_raw_ipv6(libnet_t *l, const uint8_t *packet, uint32_t size)
{
+ int c = -1;
+
#if defined HAVE_SOLARIS && !defined HAVE_SOLARIS_IPV6
snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, "%s(): no IPv6 support",
__func__, strerror(errno));
- return (-1);
-}
#else
- int c;
struct sockaddr_in6 sin;
struct libnet_ipv6_hdr *ip_hdr;
if (l == NULL)
- {
+ {
return (-1);
- }
+ }
ip_hdr = (struct libnet_ipv6_hdr *)packet;
@@ -396,22 +330,16 @@ libnet_write_raw_ipv6(libnet_t *l, const uint8_t *packet, uint32_t size)
sin.sin6_family = AF_INET6;
memcpy(sin.sin6_addr.s6_addr, ip_hdr->ip_dst.libnet_s6_addr,
sizeof(ip_hdr->ip_dst.libnet_s6_addr));
-
+
c = sendto(l->fd, packet, size, 0, (struct sockaddr *)&sin, sizeof(sin));
if (c != size)
{
-#if !(__WIN32__)
snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
"%s(): %d bytes written (%s)", __func__, c,
strerror(errno));
-#else /* __WIN32__ */
- snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
- "%s(): %d bytes written (%d)", __func__, c,
- WSAGetLastError());
-#endif /* !__WIN32__ */
}
+#endif /* HAVE_SOLARIS && !HAVE_SOLARIS_IPV6 */
return (c);
}
-#endif
-#endif
-/* EOF */
+#endif /* __WIN32__ */
+/* EOF */ \ No newline at end of file
diff --git a/win32/Makefile.am b/win32/Makefile.am
index af3b0a8..8772069 100644
--- a/win32/Makefile.am
+++ b/win32/Makefile.am
@@ -1,2 +1,2 @@
-EXTRA_DIST = getopt.h libnet.h config.h stdint.h
+EXTRA_DIST = getopt.h libnet.h config.h stdint.h wpdpack
diff --git a/win32/libnet.h b/win32/libnet.h
index 18a5d6c..05a6bf9 100644
--- a/win32/libnet.h
+++ b/win32/libnet.h
@@ -74,7 +74,7 @@ extern "C" {
#define __FUNCTION__ __FILE__
#endif
-/* the following is only supported by MSVC and not by MinGW/MSys environements */
+/* the following is only supported by MSVC and not by MinGW/MSys environments */
#ifdef _MSC_VER
#pragma comment (lib,"ws2_32") /* Winsock 2 */
#pragma comment (lib,"iphlpapi") /* IP Helper */
diff --git a/win32/wpdpack/Include/Packet32.h b/win32/wpdpack/Include/Packet32.h
new file mode 100644
index 0000000..64be055
--- /dev/null
+++ b/win32/wpdpack/Include/Packet32.h
@@ -0,0 +1,359 @@
+/*
+ * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
+ * Copyright (c) 2005 - 2007 CACE Technologies, Davis (California)
+ * All rights reserved.
+ *
+ * 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. Neither the name of the Politecnico di Torino, CACE Technologies
+ * 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 COPYRIGHT HOLDERS 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 COPYRIGHT
+ * OWNER 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.
+ *
+ */
+
+/** @ingroup packetapi
+ * @{
+ */
+
+/** @defgroup packet32h Packet.dll definitions and data structures
+ * Packet32.h contains the data structures and the definitions used by packet.dll.
+ * The file is used both by the Win9x and the WinNTx versions of packet.dll, and can be included
+ * by the applications that use the functions of this library
+ * @{
+ */
+
+#ifndef __PACKET32
+#define __PACKET32
+
+#include <winsock2.h>
+
+#ifdef HAVE_AIRPCAP_API
+#include <airpcap.h>
+#else
+#if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_)
+#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_
+typedef struct _AirpcapHandle *PAirpcapHandle;
+#endif /* AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ */
+#endif /* HAVE_AIRPCAP_API */
+
+#ifdef HAVE_DAG_API
+#include <dagc.h>
+#endif /* HAVE_DAG_API */
+
+// Working modes
+#define PACKET_MODE_CAPT 0x0 ///< Capture mode
+#define PACKET_MODE_STAT 0x1 ///< Statistical mode
+#define PACKET_MODE_MON 0x2 ///< Monitoring mode
+#define PACKET_MODE_DUMP 0x10 ///< Dump mode
+#define PACKET_MODE_STAT_DUMP MODE_DUMP | MODE_STAT ///< Statistical dump Mode
+
+
+/// Alignment macro. Defines the alignment size.
+#define Packet_ALIGNMENT sizeof(int)
+/// Alignment macro. Rounds up to the next even multiple of Packet_ALIGNMENT.
+#define Packet_WORDALIGN(x) (((x)+(Packet_ALIGNMENT-1))&~(Packet_ALIGNMENT-1))
+
+#define NdisMediumNull -1 ///< Custom linktype: NDIS doesn't provide an equivalent
+#define NdisMediumCHDLC -2 ///< Custom linktype: NDIS doesn't provide an equivalent
+#define NdisMediumPPPSerial -3 ///< Custom linktype: NDIS doesn't provide an equivalent
+#define NdisMediumBare80211 -4 ///< Custom linktype: NDIS doesn't provide an equivalent
+#define NdisMediumRadio80211 -5 ///< Custom linktype: NDIS doesn't provide an equivalent
+#define NdisMediumPpi -6 ///< Custom linktype: NDIS doesn't provide an equivalent
+
+// Loopback behaviour definitions
+#define NPF_DISABLE_LOOPBACK 1 ///< Drop the packets sent by the NPF driver
+#define NPF_ENABLE_LOOPBACK 2 ///< Capture the packets sent by the NPF driver
+
+/*!
+ \brief Network type structure.
+
+ This structure is used by the PacketGetNetType() function to return information on the current adapter's type and speed.
+*/
+typedef struct NetType
+{
+ UINT LinkType; ///< The MAC of the current network adapter (see function PacketGetNetType() for more information)
+ ULONGLONG LinkSpeed; ///< The speed of the network in bits per second
+}NetType;
+
+
+//some definitions stolen from libpcap
+
+#ifndef BPF_MAJOR_VERSION
+
+/*!
+ \brief A BPF pseudo-assembly program.
+
+ The program will be injected in the kernel by the PacketSetBPF() function and applied to every incoming packet.
+*/
+struct bpf_program
+{
+ UINT bf_len; ///< Indicates the number of instructions of the program, i.e. the number of struct bpf_insn that will follow.
+ struct bpf_insn *bf_insns; ///< A pointer to the first instruction of the program.
+};
+
+/*!
+ \brief A single BPF pseudo-instruction.
+
+ bpf_insn contains a single instruction for the BPF register-machine. It is used to send a filter program to the driver.
+*/
+struct bpf_insn
+{
+ USHORT code; ///< Instruction type and addressing mode.
+ UCHAR jt; ///< Jump if true
+ UCHAR jf; ///< Jump if false
+ int k; ///< Generic field used for various purposes.
+};
+
+/*!
+ \brief Structure that contains a couple of statistics values on the current capture.
+
+ It is used by packet.dll to return statistics about a capture session.
+*/
+struct bpf_stat
+{
+ UINT bs_recv; ///< Number of packets that the driver received from the network adapter
+ ///< from the beginning of the current capture. This value includes the packets
+ ///< lost by the driver.
+ UINT bs_drop; ///< number of packets that the driver lost from the beginning of a capture.
+ ///< Basically, a packet is lost when the the buffer of the driver is full.
+ ///< In this situation the packet cannot be stored and the driver rejects it.
+ UINT ps_ifdrop; ///< drops by interface. XXX not yet supported
+ UINT bs_capt; ///< number of packets that pass the filter, find place in the kernel buffer and
+ ///< thus reach the application.
+};
+
+/*!
+ \brief Packet header.
+
+ This structure defines the header associated with every packet delivered to the application.
+*/
+struct bpf_hdr
+{
+ struct timeval bh_tstamp; ///< The timestamp associated with the captured packet.
+ ///< It is stored in a TimeVal structure.
+ UINT bh_caplen; ///< Length of captured portion. The captured portion <b>can be different</b>
+ ///< from the original packet, because it is possible (with a proper filter)
+ ///< to instruct the driver to capture only a portion of the packets.
+ UINT bh_datalen; ///< Original length of packet
+ USHORT bh_hdrlen; ///< Length of bpf header (this struct plus alignment padding). In some cases,
+ ///< a padding could be added between the end of this structure and the packet
+ ///< data for performance reasons. This filed can be used to retrieve the actual data
+ ///< of the packet.
+};
+
+/*!
+ \brief Dump packet header.
+
+ This structure defines the header associated with the packets in a buffer to be used with PacketSendPackets().
+ It is simpler than the bpf_hdr, because it corresponds to the header associated by WinPcap and libpcap to a
+ packet in a dump file. This makes straightforward sending WinPcap dump files to the network.
+*/
+struct dump_bpf_hdr{
+ struct timeval ts; ///< Time stamp of the packet
+ UINT caplen; ///< Length of captured portion. The captured portion can smaller than the
+ ///< the original packet, because it is possible (with a proper filter) to
+ ///< instruct the driver to capture only a portion of the packets.
+ UINT len; ///< Length of the original packet (off wire).
+};
+
+
+#endif
+
+struct bpf_stat;
+
+#define DOSNAMEPREFIX TEXT("Packet_") ///< Prefix added to the adapters device names to create the WinPcap devices
+#define MAX_LINK_NAME_LENGTH 64 //< Maximum length of the devices symbolic links
+#define NMAX_PACKET 65535
+
+/*!
+ \brief Addresses of a network adapter.
+
+ This structure is used by the PacketGetNetInfoEx() function to return the IP addresses associated with
+ an adapter.
+*/
+typedef struct npf_if_addr {
+ struct sockaddr_storage IPAddress; ///< IP address.
+ struct sockaddr_storage SubnetMask; ///< Netmask for that address.
+ struct sockaddr_storage Broadcast; ///< Broadcast address.
+}npf_if_addr;
+
+
+#define ADAPTER_NAME_LENGTH 256 + 12 ///< Maximum length for the name of an adapter. The value is the same used by the IP Helper API.
+#define ADAPTER_DESC_LENGTH 128 ///< Maximum length for the description of an adapter. The value is the same used by the IP Helper API.
+#define MAX_MAC_ADDR_LENGTH 8 ///< Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API.
+#define MAX_NETWORK_ADDRESSES 16 ///< Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API.
+
+
+typedef struct WAN_ADAPTER_INT WAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API
+typedef WAN_ADAPTER *PWAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API
+
+#define INFO_FLAG_NDIS_ADAPTER 0 ///< Flag for ADAPTER_INFO: this is a traditional ndis adapter
+#define INFO_FLAG_NDISWAN_ADAPTER 1 ///< Flag for ADAPTER_INFO: this is a NdisWan adapter, and it's managed by WANPACKET
+#define INFO_FLAG_DAG_CARD 2 ///< Flag for ADAPTER_INFO: this is a DAG card
+#define INFO_FLAG_DAG_FILE 6 ///< Flag for ADAPTER_INFO: this is a DAG file
+#define INFO_FLAG_DONT_EXPORT 8 ///< Flag for ADAPTER_INFO: when this flag is set, the adapter will not be listed or openend by winpcap. This allows to prevent exporting broken network adapters, like for example FireWire ones.
+#define INFO_FLAG_AIRPCAP_CARD 16 ///< Flag for ADAPTER_INFO: this is an airpcap card
+#define INFO_FLAG_NPFIM_DEVICE 32
+
+/*!
+ \brief Describes an opened network adapter.
+
+ This structure is the most important for the functioning of packet.dll, but the great part of its fields
+ should be ignored by the user, since the library offers functions that avoid to cope with low-level parameters
+*/
+typedef struct _ADAPTER {
+ HANDLE hFile; ///< \internal Handle to an open instance of the NPF driver.
+ CHAR SymbolicLink[MAX_LINK_NAME_LENGTH]; ///< \internal A string containing the name of the network adapter currently opened.
+ int NumWrites; ///< \internal Number of times a packets written on this adapter will be repeated
+ ///< on the wire.
+ HANDLE ReadEvent; ///< A notification event associated with the read calls on the adapter.
+ ///< It can be passed to standard Win32 functions (like WaitForSingleObject
+ ///< or WaitForMultipleObjects) to wait until the driver's buffer contains some
+ ///< data. It is particularly useful in GUI applications that need to wait
+ ///< concurrently on several events. In Windows NT/2000 the PacketSetMinToCopy()
+ ///< function can be used to define the minimum amount of data in the kernel buffer
+ ///< that will cause the event to be signalled.
+
+ UINT ReadTimeOut; ///< \internal The amount of time after which a read on the driver will be released and
+ ///< ReadEvent will be signaled, also if no packets were captured
+ CHAR Name[ADAPTER_NAME_LENGTH];
+ PWAN_ADAPTER pWanAdapter;
+ UINT Flags; ///< Adapter's flags. Tell if this adapter must be treated in a different way, using the Netmon API or the dagc API.
+
+#ifdef HAVE_AIRPCAP_API
+ PAirpcapHandle AirpcapAd;
+#endif // HAVE_AIRPCAP_API
+
+#ifdef HAVE_NPFIM_API
+ void* NpfImHandle;
+#endif // HAVE_NPFIM_API
+
+#ifdef HAVE_DAG_API
+ dagc_t *pDagCard; ///< Pointer to the dagc API adapter descriptor for this adapter
+ PCHAR DagBuffer; ///< Pointer to the buffer with the packets that is received from the DAG card
+ struct timeval DagReadTimeout; ///< Read timeout. The dagc API requires a timeval structure
+ unsigned DagFcsLen; ///< Length of the frame check sequence attached to any packet by the card. Obtained from the registry
+ DWORD DagFastProcess; ///< True if the user requests fast capture processing on this card. Higher level applications can use this value to provide a faster but possibly unprecise capture (for example, libpcap doesn't convert the timestamps).
+#endif // HAVE_DAG_API
+} ADAPTER, *LPADAPTER;
+
+/*!
+ \brief Structure that contains a group of packets coming from the driver.
+
+ This structure defines the header associated with every packet delivered to the application.
+*/
+typedef struct _PACKET {
+ HANDLE hEvent; ///< \deprecated Still present for compatibility with old applications.
+ OVERLAPPED OverLapped; ///< \deprecated Still present for compatibility with old applications.
+ PVOID Buffer; ///< Buffer with containing the packets. See the PacketReceivePacket() for
+ ///< details about the organization of the data in this buffer
+ UINT Length; ///< Length of the buffer
+ DWORD ulBytesReceived; ///< Number of valid bytes present in the buffer, i.e. amount of data
+ ///< received by the last call to PacketReceivePacket()
+ BOOLEAN bIoComplete; ///< \deprecated Still present for compatibility with old applications.
+} PACKET, *LPPACKET;
+
+/*!
+ \brief Structure containing an OID request.
+
+ It is used by the PacketRequest() function to send an OID to the interface card driver.
+ It can be used, for example, to retrieve the status of the error counters on the adapter, its MAC address,
+ the list of the multicast groups defined on it, and so on.
+*/
+struct _PACKET_OID_DATA {
+ ULONG Oid; ///< OID code. See the Microsoft DDK documentation or the file ntddndis.h
+ ///< for a complete list of valid codes.
+ ULONG Length; ///< Length of the data field
+ UCHAR Data[1]; ///< variable-lenght field that contains the information passed to or received
+ ///< from the adapter.
+};
+typedef struct _PACKET_OID_DATA PACKET_OID_DATA, *PPACKET_OID_DATA;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @}
+ */
+
+/*
+BOOLEAN QueryWinPcapRegistryStringA(CHAR *SubKeyName,
+ CHAR *Value,
+ UINT *pValueLen,
+ CHAR *DefaultVal);
+
+BOOLEAN QueryWinPcapRegistryStringW(WCHAR *SubKeyName,
+ WCHAR *Value,
+ UINT *pValueLen,
+ WCHAR *DefaultVal);
+*/
+
+//---------------------------------------------------------------------------
+// EXPORTED FUNCTIONS
+//---------------------------------------------------------------------------
+
+PCHAR PacketGetVersion();
+PCHAR PacketGetDriverVersion();
+BOOLEAN PacketSetMinToCopy(LPADAPTER AdapterObject,int nbytes);
+BOOLEAN PacketSetNumWrites(LPADAPTER AdapterObject,int nwrites);
+BOOLEAN PacketSetMode(LPADAPTER AdapterObject,int mode);
+BOOLEAN PacketSetReadTimeout(LPADAPTER AdapterObject,int timeout);
+BOOLEAN PacketSetBpf(LPADAPTER AdapterObject,struct bpf_program *fp);
+BOOLEAN PacketSetLoopbackBehavior(LPADAPTER AdapterObject, UINT LoopbackBehavior);
+INT PacketSetSnapLen(LPADAPTER AdapterObject,int snaplen);
+BOOLEAN PacketGetStats(LPADAPTER AdapterObject,struct bpf_stat *s);
+BOOLEAN PacketGetStatsEx(LPADAPTER AdapterObject,struct bpf_stat *s);
+BOOLEAN PacketSetBuff(LPADAPTER AdapterObject,int dim);
+BOOLEAN PacketGetNetType (LPADAPTER AdapterObject,NetType *type);
+LPADAPTER PacketOpenAdapter(PCHAR AdapterName);
+BOOLEAN PacketSendPacket(LPADAPTER AdapterObject,LPPACKET pPacket,BOOLEAN Sync);
+INT PacketSendPackets(LPADAPTER AdapterObject,PVOID PacketBuff,ULONG Size, BOOLEAN Sync);
+LPPACKET PacketAllocatePacket(void);
+VOID PacketInitPacket(LPPACKET lpPacket,PVOID Buffer,UINT Length);
+VOID PacketFreePacket(LPPACKET lpPacket);
+BOOLEAN PacketReceivePacket(LPADAPTER AdapterObject,LPPACKET lpPacket,BOOLEAN Sync);
+BOOLEAN PacketSetHwFilter(LPADAPTER AdapterObject,ULONG Filter);
+BOOLEAN PacketGetAdapterNames(PTSTR pStr,PULONG BufferSize);
+BOOLEAN PacketGetNetInfoEx(PCHAR AdapterName, npf_if_addr* buffer, PLONG NEntries);
+BOOLEAN PacketRequest(LPADAPTER AdapterObject,BOOLEAN Set,PPACKET_OID_DATA OidData);
+HANDLE PacketGetReadEvent(LPADAPTER AdapterObject);
+BOOLEAN PacketSetDumpName(LPADAPTER AdapterObject, void *name, int len);
+BOOLEAN PacketSetDumpLimits(LPADAPTER AdapterObject, UINT maxfilesize, UINT maxnpacks);
+BOOLEAN PacketIsDumpEnded(LPADAPTER AdapterObject, BOOLEAN sync);
+BOOL PacketStopDriver();
+VOID PacketCloseAdapter(LPADAPTER lpAdapter);
+BOOLEAN PacketStartOem(PCHAR errorString, UINT errorStringLength);
+BOOLEAN PacketStartOemEx(PCHAR errorString, UINT errorStringLength, ULONG flags);
+PAirpcapHandle PacketGetAirPcapHandle(LPADAPTER AdapterObject);
+
+//
+// Used by PacketStartOemEx
+//
+#define PACKET_START_OEM_NO_NETMON 0x00000001
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //__PACKET32
diff --git a/win32/wpdpack/Include/Win32-Extensions.h b/win32/wpdpack/Include/Win32-Extensions.h
new file mode 100644
index 0000000..ad3be25
--- /dev/null
+++ b/win32/wpdpack/Include/Win32-Extensions.h
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
+ * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
+ * All rights reserved.
+ *
+ * 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. Neither the name of the Politecnico di Torino, CACE Technologies
+ * 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 COPYRIGHT HOLDERS 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 COPYRIGHT
+ * OWNER 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.
+ *
+ */
+
+#ifndef __WIN32_EXTENSIONS_H__
+#define __WIN32_EXTENSIONS_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Definitions */
+
+/*!
+ \brief A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit().
+*/
+struct pcap_send_queue
+{
+ u_int maxlen; ///< Maximum size of the the queue, in bytes. This variable contains the size of the buffer field.
+ u_int len; ///< Current size of the queue, in bytes.
+ char *buffer; ///< Buffer containing the packets to be sent.
+};
+
+typedef struct pcap_send_queue pcap_send_queue;
+
+/*!
+ \brief This typedef is a support for the pcap_get_airpcap_handle() function
+*/
+#if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_)
+#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_
+typedef struct _AirpcapHandle *PAirpcapHandle;
+#endif
+
+#define BPF_MEM_EX_IMM 0xc0
+#define BPF_MEM_EX_IND 0xe0
+
+/*used for ST*/
+#define BPF_MEM_EX 0xc0
+#define BPF_TME 0x08
+
+#define BPF_LOOKUP 0x90
+#define BPF_EXECUTE 0xa0
+#define BPF_INIT 0xb0
+#define BPF_VALIDATE 0xc0
+#define BPF_SET_ACTIVE 0xd0
+#define BPF_RESET 0xe0
+#define BPF_SET_MEMORY 0x80
+#define BPF_GET_REGISTER_VALUE 0x70
+#define BPF_SET_REGISTER_VALUE 0x60
+#define BPF_SET_WORKING 0x50
+#define BPF_SET_ACTIVE_READ 0x40
+#define BPF_SET_AUTODELETION 0x30
+#define BPF_SEPARATION 0xff
+
+/* Prototypes */
+pcap_send_queue* pcap_sendqueue_alloc(u_int memsize);
+
+void pcap_sendqueue_destroy(pcap_send_queue* queue);
+
+int pcap_sendqueue_queue(pcap_send_queue* queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data);
+
+u_int pcap_sendqueue_transmit(pcap_t *p, pcap_send_queue* queue, int sync);
+
+HANDLE pcap_getevent(pcap_t *p);
+
+struct pcap_stat *pcap_stats_ex(pcap_t *p, int *pcap_stat_size);
+
+int pcap_setuserbuffer(pcap_t *p, int size);
+
+int pcap_live_dump(pcap_t *p, char *filename, int maxsize, int maxpacks);
+
+int pcap_live_dump_ended(pcap_t *p, int sync);
+
+int pcap_offline_filter(struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data);
+
+int pcap_start_oem(char* err_str, int flags);
+
+PAirpcapHandle pcap_get_airpcap_handle(pcap_t *p);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //__WIN32_EXTENSIONS_H__
diff --git a/win32/wpdpack/Include/bittypes.h b/win32/wpdpack/Include/bittypes.h
new file mode 100644
index 0000000..558a0b5
--- /dev/null
+++ b/win32/wpdpack/Include/bittypes.h
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 1999 WIDE Project.
+ * All rights reserved.
+ *
+ * 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. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+#ifndef _BITTYPES_H
+#define _BITTYPES_H
+
+#ifndef HAVE_U_INT8_T
+
+#if SIZEOF_CHAR == 1
+typedef unsigned char u_int8_t;
+typedef signed char int8_t;
+#elif SIZEOF_INT == 1
+typedef unsigned int u_int8_t;
+typedef signed int int8_t;
+#else /* XXX */
+#error "there's no appropriate type for u_int8_t"
+#endif
+#define HAVE_U_INT8_T 1
+#define HAVE_INT8_T 1
+
+#endif /* HAVE_U_INT8_T */
+
+#ifndef HAVE_U_INT16_T
+
+#if SIZEOF_SHORT == 2
+typedef unsigned short u_int16_t;
+typedef signed short int16_t;
+#elif SIZEOF_INT == 2
+typedef unsigned int u_int16_t;
+typedef signed int int16_t;
+#elif SIZEOF_CHAR == 2
+typedef unsigned char u_int16_t;
+typedef signed char int16_t;
+#else /* XXX */
+#error "there's no appropriate type for u_int16_t"
+#endif
+#define HAVE_U_INT16_T 1
+#define HAVE_INT16_T 1
+
+#endif /* HAVE_U_INT16_T */
+
+#ifndef HAVE_U_INT32_T
+
+#if SIZEOF_INT == 4
+typedef unsigned int u_int32_t;
+typedef signed int int32_t;
+#elif SIZEOF_LONG == 4
+typedef unsigned long u_int32_t;
+typedef signed long int32_t;
+#elif SIZEOF_SHORT == 4
+typedef unsigned short u_int32_t;
+typedef signed short int32_t;
+#else /* XXX */
+#error "there's no appropriate type for u_int32_t"
+#endif
+#define HAVE_U_INT32_T 1
+#define HAVE_INT32_T 1
+
+#endif /* HAVE_U_INT32_T */
+
+#ifndef HAVE_U_INT64_T
+#if SIZEOF_LONG_LONG == 8
+typedef unsigned long long u_int64_t;
+typedef long long int64_t;
+#elif defined(_MSC_EXTENSIONS)
+typedef unsigned _int64 u_int64_t;
+typedef _int64 int64_t;
+#elif SIZEOF_INT == 8
+typedef unsigned int u_int64_t;
+#elif SIZEOF_LONG == 8
+typedef unsigned long u_int64_t;
+#elif SIZEOF_SHORT == 8
+typedef unsigned short u_int64_t;
+#else /* XXX */
+#error "there's no appropriate type for u_int64_t"
+#endif
+
+#endif /* HAVE_U_INT64_T */
+
+#ifndef PRId64
+#ifdef _MSC_EXTENSIONS
+#define PRId64 "I64d"
+#else /* _MSC_EXTENSIONS */
+#define PRId64 "lld"
+#endif /* _MSC_EXTENSIONS */
+#endif /* PRId64 */
+
+#ifndef PRIo64
+#ifdef _MSC_EXTENSIONS
+#define PRIo64 "I64o"
+#else /* _MSC_EXTENSIONS */
+#define PRIo64 "llo"
+#endif /* _MSC_EXTENSIONS */
+#endif /* PRIo64 */
+
+#ifndef PRIx64
+#ifdef _MSC_EXTENSIONS
+#define PRIx64 "I64x"
+#else /* _MSC_EXTENSIONS */
+#define PRIx64 "llx"
+#endif /* _MSC_EXTENSIONS */
+#endif /* PRIx64 */
+
+#ifndef PRIu64
+#ifdef _MSC_EXTENSIONS
+#define PRIu64 "I64u"
+#else /* _MSC_EXTENSIONS */
+#define PRIu64 "llu"
+#endif /* _MSC_EXTENSIONS */
+#endif /* PRIu64 */
+
+#endif /* _BITTYPES_H */
diff --git a/win32/wpdpack/Include/ip6_misc.h b/win32/wpdpack/Include/ip6_misc.h
new file mode 100644
index 0000000..562fa61
--- /dev/null
+++ b/win32/wpdpack/Include/ip6_misc.h
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 1993, 1994, 1997
+ * The Regents of the University of California. All rights reserved.
+ *
+ * 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.
+ *
+ * @(#) $Header: /tcpdump/master/libpcap/Win32/Include/ip6_misc.h,v 1.5 2006-01-22 18:02:18 gianluca Exp $ (LBL)
+ */
+
+/*
+ * This file contains a collage of declarations for IPv6 from FreeBSD not present in Windows
+ */
+
+#include <winsock2.h>
+
+#include <ws2tcpip.h>
+
+#ifndef __MINGW32__
+#define IN_MULTICAST(a) IN_CLASSD(a)
+#endif
+
+#define IN_EXPERIMENTAL(a) ((((u_int32_t) (a)) & 0xf0000000) == 0xf0000000)
+
+#define IN_LOOPBACKNET 127
+
+#if defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF)
+/* IPv6 address */
+struct in6_addr
+ {
+ union
+ {
+ u_int8_t u6_addr8[16];
+ u_int16_t u6_addr16[8];
+ u_int32_t u6_addr32[4];
+ } in6_u;
+#define s6_addr in6_u.u6_addr8
+#define s6_addr16 in6_u.u6_addr16
+#define s6_addr32 in6_u.u6_addr32
+#define s6_addr64 in6_u.u6_addr64
+ };
+
+#define IN6ADDR_ANY_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+#define IN6ADDR_LOOPBACK_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }
+#endif /* __MINGW32__ */
+
+
+#if (defined _MSC_VER) || (defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF))
+typedef unsigned short sa_family_t;
+#endif
+
+
+#if defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF)
+
+#define __SOCKADDR_COMMON(sa_prefix) \
+ sa_family_t sa_prefix##family
+
+/* Ditto, for IPv6. */
+struct sockaddr_in6
+ {
+ __SOCKADDR_COMMON (sin6_);
+ u_int16_t sin6_port; /* Transport layer port # */
+ u_int32_t sin6_flowinfo; /* IPv6 flow information */
+ struct in6_addr sin6_addr; /* IPv6 address */
+ };
+
+#define IN6_IS_ADDR_V4MAPPED(a) \
+ ((((u_int32_t *) (a))[0] == 0) && (((u_int32_t *) (a))[1] == 0) && \
+ (((u_int32_t *) (a))[2] == htonl (0xffff)))
+
+#define IN6_IS_ADDR_MULTICAST(a) (((u_int8_t *) (a))[0] == 0xff)
+
+#define IN6_IS_ADDR_LINKLOCAL(a) \
+ ((((u_int32_t *) (a))[0] & htonl (0xffc00000)) == htonl (0xfe800000))
+
+#define IN6_IS_ADDR_LOOPBACK(a) \
+ (((u_int32_t *) (a))[0] == 0 && ((u_int32_t *) (a))[1] == 0 && \
+ ((u_int32_t *) (a))[2] == 0 && ((u_int32_t *) (a))[3] == htonl (1))
+#endif /* __MINGW32__ */
+
+#define ip6_vfc ip6_ctlun.ip6_un2_vfc
+#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow
+#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen
+#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt
+#define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim
+#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim
+
+#define nd_rd_type nd_rd_hdr.icmp6_type
+#define nd_rd_code nd_rd_hdr.icmp6_code
+#define nd_rd_cksum nd_rd_hdr.icmp6_cksum
+#define nd_rd_reserved nd_rd_hdr.icmp6_data32[0]
+
+/*
+ * IPV6 extension headers
+ */
+#define IPPROTO_HOPOPTS 0 /* IPv6 hop-by-hop options */
+#define IPPROTO_IPV6 41 /* IPv6 header. */
+#define IPPROTO_ROUTING 43 /* IPv6 routing header */
+#define IPPROTO_FRAGMENT 44 /* IPv6 fragmentation header */
+#define IPPROTO_ESP 50 /* encapsulating security payload */
+#define IPPROTO_AH 51 /* authentication header */
+#define IPPROTO_ICMPV6 58 /* ICMPv6 */
+#define IPPROTO_NONE 59 /* IPv6 no next header */
+#define IPPROTO_DSTOPTS 60 /* IPv6 destination options */
+#define IPPROTO_PIM 103 /* Protocol Independent Multicast. */
+
+#define IPV6_RTHDR_TYPE_0 0
+
+/* Option types and related macros */
+#define IP6OPT_PAD1 0x00 /* 00 0 00000 */
+#define IP6OPT_PADN 0x01 /* 00 0 00001 */
+#define IP6OPT_JUMBO 0xC2 /* 11 0 00010 = 194 */
+#define IP6OPT_JUMBO_LEN 6
+#define IP6OPT_ROUTER_ALERT 0x05 /* 00 0 00101 */
+
+#define IP6OPT_RTALERT_LEN 4
+#define IP6OPT_RTALERT_MLD 0 /* Datagram contains an MLD message */
+#define IP6OPT_RTALERT_RSVP 1 /* Datagram contains an RSVP message */
+#define IP6OPT_RTALERT_ACTNET 2 /* contains an Active Networks msg */
+#define IP6OPT_MINLEN 2
+
+#define IP6OPT_BINDING_UPDATE 0xc6 /* 11 0 00110 */
+#define IP6OPT_BINDING_ACK 0x07 /* 00 0 00111 */
+#define IP6OPT_BINDING_REQ 0x08 /* 00 0 01000 */
+#define IP6OPT_HOME_ADDRESS 0xc9 /* 11 0 01001 */
+#define IP6OPT_EID 0x8a /* 10 0 01010 */
+
+#define IP6OPT_TYPE(o) ((o) & 0xC0)
+#define IP6OPT_TYPE_SKIP 0x00
+#define IP6OPT_TYPE_DISCARD 0x40
+#define IP6OPT_TYPE_FORCEICMP 0x80
+#define IP6OPT_TYPE_ICMP 0xC0
+
+#define IP6OPT_MUTABLE 0x20
+
+
+#if defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF)
+#ifndef EAI_ADDRFAMILY
+struct addrinfo {
+ int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
+ int ai_family; /* PF_xxx */
+ int ai_socktype; /* SOCK_xxx */
+ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
+ size_t ai_addrlen; /* length of ai_addr */
+ char *ai_canonname; /* canonical name for hostname */
+ struct sockaddr *ai_addr; /* binary address */
+ struct addrinfo *ai_next; /* next structure in linked list */
+};
+#endif
+#endif /* __MINGW32__ */
diff --git a/win32/wpdpack/Include/pcap-bpf.h b/win32/wpdpack/Include/pcap-bpf.h
new file mode 100644
index 0000000..5fe129d
--- /dev/null
+++ b/win32/wpdpack/Include/pcap-bpf.h
@@ -0,0 +1,47 @@
+/*-
+ * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
+ * The Regents of the University of California. All rights reserved.
+ *
+ * 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.
+ *
+ * @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.50 2007/04/01 21:43:55 guy Exp $ (LBL)
+ */
+
+/*
+ * For backwards compatibility.
+ *
+ * Note to OS vendors: do NOT get rid of this file! Some applications
+ * might expect to be able to include <pcap-bpf.h>.
+ */
+#include <pcap/bpf.h>
diff --git a/win32/wpdpack/Include/pcap-namedb.h b/win32/wpdpack/Include/pcap-namedb.h
new file mode 100644
index 0000000..80a2f00
--- /dev/null
+++ b/win32/wpdpack/Include/pcap-namedb.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 1994, 1996
+ * The Regents of the University of California. All rights reserved.
+ *
+ * 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 Computer Systems
+ * Engineering Group at Lawrence Berkeley Laboratory.
+ * 4. Neither the name of the University nor of the Laboratory 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.
+ *
+ * @(#) $Header: /tcpdump/master/libpcap/pcap-namedb.h,v 1.13 2006/10/04 18:13:32 guy Exp $ (LBL)
+ */
+
+/*
+ * For backwards compatibility.
+ *
+ * Note to OS vendors: do NOT get rid of this file! Some applications
+ * might expect to be able to include <pcap-namedb.h>.
+ */
+#include <pcap/namedb.h>
diff --git a/win32/wpdpack/Include/pcap-stdinc.h b/win32/wpdpack/Include/pcap-stdinc.h
new file mode 100644
index 0000000..bfc1ae0
--- /dev/null
+++ b/win32/wpdpack/Include/pcap-stdinc.h
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2002 - 2005 NetGroup, Politecnico di Torino (Italy)
+ * Copyright (c) 2005 - 2009 CACE Technologies, Inc. Davis (California)
+ * All rights reserved.
+ *
+ * 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. Neither the name of the Politecnico di Torino 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 COPYRIGHT HOLDERS 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 COPYRIGHT
+ * OWNER 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.
+ *
+ * @(#) $Header: /tcpdump/master/libpcap/pcap-stdinc.h,v 1.10.2.1 2008-10-06 15:38:39 gianluca Exp $ (LBL)
+ */
+
+#define SIZEOF_CHAR 1
+#define SIZEOF_SHORT 2
+#define SIZEOF_INT 4
+#ifndef _MSC_EXTENSIONS
+#define SIZEOF_LONG_LONG 8
+#endif
+
+/*
+ * Avoids a compiler warning in case this was already defined
+ * (someone defined _WINSOCKAPI_ when including 'windows.h', in order
+ * to prevent it from including 'winsock.h')
+ */
+#ifdef _WINSOCKAPI_
+#undef _WINSOCKAPI_
+#endif
+#include <winsock2.h>
+
+#include <fcntl.h>
+
+#include "bittypes.h"
+#include <time.h>
+#include <io.h>
+
+#ifndef __MINGW32__
+#include "IP6_misc.h"
+#endif
+
+#define caddr_t char*
+
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#define vsnprintf _vsnprintf
+#define strdup _strdup
+#endif
+
+#define inline __inline
+
+#ifdef __MINGW32__
+#include <stdint.h>
+#else /*__MINGW32__*/
+/* MSVC compiler */
+#ifndef _UINTPTR_T_DEFINED
+#ifdef _WIN64
+typedef unsigned __int64 uintptr_t;
+#else
+typedef _W64 unsigned int uintptr_t;
+#endif
+#define _UINTPTR_T_DEFINED
+#endif
+
+#ifndef _INTPTR_T_DEFINED
+#ifdef _WIN64
+typedef __int64 intptr_t;
+#else
+typedef _W64 int intptr_t;
+#endif
+#define _INTPTR_T_DEFINED
+#endif
+
+#endif /*__MINGW32__*/
diff --git a/win32/wpdpack/Include/pcap.h b/win32/wpdpack/Include/pcap.h
new file mode 100644
index 0000000..935f949
--- /dev/null
+++ b/win32/wpdpack/Include/pcap.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 1993, 1994, 1995, 1996, 1997
+ * The Regents of the University of California. All rights reserved.
+ *
+ * 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 Computer Systems
+ * Engineering Group at Lawrence Berkeley Laboratory.
+ * 4. Neither the name of the University nor of the Laboratory 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.
+ *
+ * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.59 2006/10/04 18:09:22 guy Exp $ (LBL)
+ */
+
+/*
+ * For backwards compatibility.
+ *
+ * Note to OS vendors: do NOT get rid of this file! Many applications
+ * expect to be able to include <pcap.h>, and at least some of them
+ * go through contortions in their configure scripts to try to detect
+ * OSes that have "helpfully" moved pcap.h to <pcap/pcap.h> without
+ * leaving behind a <pcap.h> file.
+ */
+#include <pcap/pcap.h>
diff --git a/win32/wpdpack/Include/pcap/bluetooth.h b/win32/wpdpack/Include/pcap/bluetooth.h
new file mode 100644
index 0000000..7bf65df
--- /dev/null
+++ b/win32/wpdpack/Include/pcap/bluetooth.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2006 Paolo Abeni (Italy)
+ * All rights reserved.
+ *
+ * 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. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT
+ * OWNER 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.
+ *
+ * bluetooth data struct
+ * By Paolo Abeni <paolo.abeni@email.it>
+ *
+ * @(#) $Header: /tcpdump/master/libpcap/pcap/bluetooth.h,v 1.1 2007/09/22 02:10:17 guy Exp $
+ */
+
+#ifndef _PCAP_BLUETOOTH_STRUCTS_H__
+#define _PCAP_BLUETOOTH_STRUCTS_H__
+
+/*
+ * Header prepended libpcap to each bluetooth h:4 frame.
+ * fields are in network byte order
+ */
+typedef struct _pcap_bluetooth_h4_header {
+ u_int32_t direction; /* if first bit is set direction is incoming */
+} pcap_bluetooth_h4_header;
+
+
+#endif
diff --git a/win32/wpdpack/Include/pcap/bpf.h b/win32/wpdpack/Include/pcap/bpf.h
new file mode 100644
index 0000000..9f4ca33
--- /dev/null
+++ b/win32/wpdpack/Include/pcap/bpf.h
@@ -0,0 +1,934 @@
+/*-
+ * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
+ * The Regents of the University of California. All rights reserved.
+ *
+ * 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.
+ *
+ * @(#)bpf.h 7.1 (Berkeley) 5/7/91
+ *
+ * @(#) $Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.19.2.8 2008-09-22 20:16:01 guy Exp $ (LBL)
+ */
+
+/*
+ * This is libpcap's cut-down version of bpf.h; it includes only
+ * the stuff needed for the code generator and the userland BPF
+ * interpreter, and the libpcap APIs for setting filters, etc..
+ *
+ * "pcap-bpf.c" will include the native OS version, as it deals with
+ * the OS's BPF implementation.
+ *
+ * XXX - should this all just be moved to "pcap.h"?
+ */
+
+#ifndef BPF_MAJOR_VERSION
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* BSD style release date */
+#define BPF_RELEASE 199606
+
+#ifdef MSDOS /* must be 32-bit */
+typedef long bpf_int32;
+typedef unsigned long bpf_u_int32;
+#else
+typedef int bpf_int32;
+typedef u_int bpf_u_int32;
+#endif
+
+/*
+ * Alignment macros. BPF_WORDALIGN rounds up to the next
+ * even multiple of BPF_ALIGNMENT.
+ */
+#ifndef __NetBSD__
+#define BPF_ALIGNMENT sizeof(bpf_int32)
+#else
+#define BPF_ALIGNMENT sizeof(long)
+#endif
+#define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1))
+
+#define BPF_MAXBUFSIZE 0x8000
+#define BPF_MINBUFSIZE 32
+
+/*
+ * Structure for "pcap_compile()", "pcap_setfilter()", etc..
+ */
+struct bpf_program {
+ u_int bf_len;
+ struct bpf_insn *bf_insns;
+};
+
+/*
+ * Struct return by BIOCVERSION. This represents the version number of
+ * the filter language described by the instruction encodings below.
+ * bpf understands a program iff kernel_major == filter_major &&
+ * kernel_minor >= filter_minor, that is, if the value returned by the
+ * running kernel has the same major number and a minor number equal
+ * equal to or less than the filter being downloaded. Otherwise, the
+ * results are undefined, meaning an error may be returned or packets
+ * may be accepted haphazardly.
+ * It has nothing to do with the source code version.
+ */
+struct bpf_version {
+ u_short bv_major;
+ u_short bv_minor;
+};
+/* Current version number of filter architecture. */
+#define BPF_MAJOR_VERSION 1
+#define BPF_MINOR_VERSION 1
+
+/*
+ * Data-link level type codes.
+ *
+ * Do *NOT* add new values to this list without asking
+ * "tcpdump-workers@lists.tcpdump.org" for a value. Otherwise, you run
+ * the risk of using a value that's already being used for some other
+ * purpose, and of having tools that read libpcap-format captures not
+ * being able to handle captures with your new DLT_ value, with no hope
+ * that they will ever be changed to do so (as that would destroy their
+ * ability to read captures using that value for that other purpose).
+ */
+
+/*
+ * These are the types that are the same on all platforms, and that
+ * have been defined by <net/bpf.h> for ages.
+ */
+#define DLT_NULL 0 /* BSD loopback encapsulation */
+#define DLT_EN10MB 1 /* Ethernet (10Mb) */
+#define DLT_EN3MB 2 /* Experimental Ethernet (3Mb) */
+#define DLT_AX25 3 /* Amateur Radio AX.25 */
+#define DLT_PRONET 4 /* Proteon ProNET Token Ring */
+#define DLT_CHAOS 5 /* Chaos */
+#define DLT_IEEE802 6 /* 802.5 Token Ring */
+#define DLT_ARCNET 7 /* ARCNET, with BSD-style header */
+#define DLT_SLIP 8 /* Serial Line IP */
+#define DLT_PPP 9 /* Point-to-point Protocol */
+#define DLT_FDDI 10 /* FDDI */
+
+/*
+ * These are types that are different on some platforms, and that
+ * have been defined by <net/bpf.h> for ages. We use #ifdefs to
+ * detect the BSDs that define them differently from the traditional
+ * libpcap <net/bpf.h>
+ *
+ * XXX - DLT_ATM_RFC1483 is 13 in BSD/OS, and DLT_RAW is 14 in BSD/OS,
+ * but I don't know what the right #define is for BSD/OS.
+ */
+#define DLT_ATM_RFC1483 11 /* LLC-encapsulated ATM */
+
+#ifdef __OpenBSD__
+#define DLT_RAW 14 /* raw IP */
+#else
+#define DLT_RAW 12 /* raw IP */
+#endif
+
+/*
+ * Given that the only OS that currently generates BSD/OS SLIP or PPP
+ * is, well, BSD/OS, arguably everybody should have chosen its values
+ * for DLT_SLIP_BSDOS and DLT_PPP_BSDOS, which are 15 and 16, but they
+ * didn't. So it goes.
+ */
+#if defined(__NetBSD__) || defined(__FreeBSD__)
+#ifndef DLT_SLIP_BSDOS
+#define DLT_SLIP_BSDOS 13 /* BSD/OS Serial Line IP */
+#define DLT_PPP_BSDOS 14 /* BSD/OS Point-to-point Protocol */
+#endif
+#else
+#define DLT_SLIP_BSDOS 15 /* BSD/OS Serial Line IP */
+#define DLT_PPP_BSDOS 16 /* BSD/OS Point-to-point Protocol */
+#endif
+
+/*
+ * 17 is used for DLT_OLD_PFLOG in OpenBSD;
+ * OBSOLETE: DLT_PFLOG is 117 in OpenBSD now as well. See below.
+ * 18 is used for DLT_PFSYNC in OpenBSD; don't use it for anything else.
+ */
+
+#define DLT_ATM_CLIP 19 /* Linux Classical-IP over ATM */
+
+/*
+ * Apparently Redback uses this for its SmartEdge 400/800. I hope
+ * nobody else decided to use it, too.
+ */
+#define DLT_REDBACK_SMARTEDGE 32
+
+/*
+ * These values are defined by NetBSD; other platforms should refrain from
+ * using them for other purposes, so that NetBSD savefiles with link
+ * types of 50 or 51 can be read as this type on all platforms.
+ */
+#define DLT_PPP_SERIAL 50 /* PPP over serial with HDLC encapsulation */
+#define DLT_PPP_ETHER 51 /* PPP over Ethernet */
+
+/*
+ * The Axent Raptor firewall - now the Symantec Enterprise Firewall - uses
+ * a link-layer type of 99 for the tcpdump it supplies. The link-layer
+ * header has 6 bytes of unknown data, something that appears to be an
+ * Ethernet type, and 36 bytes that appear to be 0 in at least one capture
+ * I've seen.
+ */
+#define DLT_SYMANTEC_FIREWALL 99
+
+/*
+ * Values between 100 and 103 are used in capture file headers as
+ * link-layer types corresponding to DLT_ types that differ
+ * between platforms; don't use those values for new DLT_ new types.
+ */
+
+/*
+ * This value was defined by libpcap 0.5; platforms that have defined
+ * it with a different value should define it here with that value -
+ * a link type of 104 in a save file will be mapped to DLT_C_HDLC,
+ * whatever value that happens to be, so programs will correctly
+ * handle files with that link type regardless of the value of
+ * DLT_C_HDLC.
+ *
+ * The name DLT_C_HDLC was used by BSD/OS; we use that name for source
+ * compatibility with programs written for BSD/OS.
+ *
+ * libpcap 0.5 defined it as DLT_CHDLC; we define DLT_CHDLC as well,
+ * for source compatibility with programs written for libpcap 0.5.
+ */
+#define DLT_C_HDLC 104 /* Cisco HDLC */
+#define DLT_CHDLC DLT_C_HDLC
+
+#define DLT_IEEE802_11 105 /* IEEE 802.11 wireless */
+
+/*
+ * 106 is reserved for Linux Classical IP over ATM; it's like DLT_RAW,
+ * except when it isn't. (I.e., sometimes it's just raw IP, and
+ * sometimes it isn't.) We currently handle it as DLT_LINUX_SLL,
+ * so that we don't have to worry about the link-layer header.)
+ */
+
+/*
+ * Frame Relay; BSD/OS has a DLT_FR with a value of 11, but that collides
+ * with other values.
+ * DLT_FR and DLT_FRELAY packets start with the Q.922 Frame Relay header
+ * (DLCI, etc.).
+ */
+#define DLT_FRELAY 107
+
+/*
+ * OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except
+ * that the AF_ type in the link-layer header is in network byte order.
+ *
+ * DLT_LOOP is 12 in OpenBSD, but that's DLT_RAW in other OSes, so
+ * we don't use 12 for it in OSes other than OpenBSD.
+ */
+#ifdef __OpenBSD__
+#define DLT_LOOP 12
+#else
+#define DLT_LOOP 108
+#endif
+
+/*
+ * Encapsulated packets for IPsec; DLT_ENC is 13 in OpenBSD, but that's
+ * DLT_SLIP_BSDOS in NetBSD, so we don't use 13 for it in OSes other
+ * than OpenBSD.
+ */
+#ifdef __OpenBSD__
+#define DLT_ENC 13
+#else
+#define DLT_ENC 109
+#endif
+
+/*
+ * Values between 110 and 112 are reserved for use in capture file headers
+ * as link-layer types corresponding to DLT_ types that might differ
+ * between platforms; don't use those values for new DLT_ types
+ * other than the corresponding DLT_ types.
+ */
+
+/*
+ * This is for Linux cooked sockets.
+ */
+#define DLT_LINUX_SLL 113
+
+/*
+ * Apple LocalTalk hardware.
+ */
+#define DLT_LTALK 114
+
+/*
+ * Acorn Econet.
+ */
+#define DLT_ECONET 115
+
+/*
+ * Reserved for use with OpenBSD ipfilter.
+ */
+#define DLT_IPFILTER 116
+
+/*
+ * OpenBSD DLT_PFLOG; DLT_PFLOG is 17 in OpenBSD, but that's DLT_LANE8023
+ * in SuSE 6.3, so we can't use 17 for it in capture-file headers.
+ *
+ * XXX: is there a conflict with DLT_PFSYNC 18 as well?
+ */
+#ifdef __OpenBSD__
+#define DLT_OLD_PFLOG 17
+#define DLT_PFSYNC 18
+#endif
+#define DLT_PFLOG 117
+
+/*
+ * Registered for Cisco-internal use.
+ */
+#define DLT_CISCO_IOS 118
+
+/*
+ * For 802.11 cards using the Prism II chips, with a link-layer
+ * header including Prism monitor mode information plus an 802.11
+ * header.
+ */
+#define DLT_PRISM_HEADER 119
+
+/*
+ * Reserved for Aironet 802.11 cards, with an Aironet link-layer header
+ * (see Doug Ambrisko's FreeBSD patches).
+ */
+#define DLT_AIRONET_HEADER 120
+
+/*
+ * Reserved for Siemens HiPath HDLC.
+ */
+#define DLT_HHDLC 121
+
+/*
+ * This is for RFC 2625 IP-over-Fibre Channel.
+ *
+ * This is not for use with raw Fibre Channel, where the link-layer
+ * header starts with a Fibre Channel frame header; it's for IP-over-FC,
+ * where the link-layer header starts with an RFC 2625 Network_Header
+ * field.
+ */
+#define DLT_IP_OVER_FC 122
+
+/*
+ * This is for Full Frontal ATM on Solaris with SunATM, with a
+ * pseudo-header followed by an AALn PDU.
+ *
+ * There may be other forms of Full Frontal ATM on other OSes,
+ * with different pseudo-headers.
+ *
+ * If ATM software returns a pseudo-header with VPI/VCI information
+ * (and, ideally, packet type information, e.g. signalling, ILMI,
+ * LANE, LLC-multiplexed traffic, etc.), it should not use
+ * DLT_ATM_RFC1483, but should get a new DLT_ value, so tcpdump
+ * and the like don't have to infer the presence or absence of a
+ * pseudo-header and the form of the pseudo-header.
+ */
+#define DLT_SUNATM 123 /* Solaris+SunATM */
+
+/*
+ * Reserved as per request from Kent Dahlgren <kent@praesum.com>
+ * for private use.
+ */
+#define DLT_RIO 124 /* RapidIO */
+#define DLT_PCI_EXP 125 /* PCI Express */
+#define DLT_AURORA 126 /* Xilinx Aurora link layer */
+
+/*
+ * Header for 802.11 plus a number of bits of link-layer information
+ * including radio information, used by some recent BSD drivers as
+ * well as the madwifi Atheros driver for Linux.
+ */
+#define DLT_IEEE802_11_RADIO 127 /* 802.11 plus radiotap radio header */
+
+/*
+ * Reserved for the TZSP encapsulation, as per request from
+ * Chris Waters <chris.waters@networkchemistry.com>
+ * TZSP is a generic encapsulation for any other link type,
+ * which includes a means to include meta-information
+ * with the packet, e.g. signal strength and channel
+ * for 802.11 packets.
+ */
+#define DLT_TZSP 128 /* Tazmen Sniffer Protocol */
+
+/*
+ * BSD's ARCNET headers have the source host, destination host,
+ * and type at the beginning of the packet; that's what's handed
+ * up to userland via BPF.
+ *
+ * Linux's ARCNET headers, however, have a 2-byte offset field
+ * between the host IDs and the type; that's what's handed up
+ * to userland via PF_PACKET sockets.
+ *
+ * We therefore have to have separate DLT_ values for them.
+ */
+#define DLT_ARCNET_LINUX 129 /* ARCNET */
+
+/*
+ * Juniper-private data link types, as per request from
+ * Hannes Gredler <hannes@juniper.net>. The DLT_s are used
+ * for passing on chassis-internal metainformation such as
+ * QOS profiles, etc..
+ */
+#define DLT_JUNIPER_MLPPP 130
+#define DLT_JUNIPER_MLFR 131
+#define DLT_JUNIPER_ES 132
+#define DLT_JUNIPER_GGSN 133
+#define DLT_JUNIPER_MFR 134
+#define DLT_JUNIPER_ATM2 135
+#define DLT_JUNIPER_SERVICES 136
+#define DLT_JUNIPER_ATM1 137
+
+/*
+ * Apple IP-over-IEEE 1394, as per a request from Dieter Siegmund
+ * <dieter@apple.com>. The header that's presented is an Ethernet-like
+ * header:
+ *
+ * #define FIREWIRE_EUI64_LEN 8
+ * struct firewire_header {
+ * u_char firewire_dhost[FIREWIRE_EUI64_LEN];
+ * u_char firewire_shost[FIREWIRE_EUI64_LEN];
+ * u_short firewire_type;
+ * };
+ *
+ * with "firewire_type" being an Ethernet type value, rather than,
+ * for example, raw GASP frames being handed up.
+ */
+#define DLT_APPLE_IP_OVER_IEEE1394 138
+
+/*
+ * Various SS7 encapsulations, as per a request from Jeff Morriss
+ * <jeff.morriss[AT]ulticom.com> and subsequent discussions.
+ */
+#define DLT_MTP2_WITH_PHDR 139 /* pseudo-header with various info, followed by MTP2 */
+#define DLT_MTP2 140 /* MTP2, without pseudo-header */
+#define DLT_MTP3 141 /* MTP3, without pseudo-header or MTP2 */
+#define DLT_SCCP 142 /* SCCP, without pseudo-header or MTP2 or MTP3 */
+
+/*
+ * DOCSIS MAC frames.
+ */
+#define DLT_DOCSIS 143
+
+/*
+ * Linux-IrDA packets. Protocol defined at http://www.irda.org.
+ * Those packets include IrLAP headers and above (IrLMP...), but
+ * don't include Phy framing (SOF/EOF/CRC & byte stuffing), because Phy
+ * framing can be handled by the hardware and depend on the bitrate.
+ * This is exactly the format you would get capturing on a Linux-IrDA
+ * interface (irdaX), but not on a raw serial port.
+ * Note the capture is done in "Linux-cooked" mode, so each packet include
+ * a fake packet header (struct sll_header). This is because IrDA packet
+ * decoding is dependant on the direction of the packet (incomming or
+ * outgoing).
+ * When/if other platform implement IrDA capture, we may revisit the
+ * issue and define a real DLT_IRDA...
+ * Jean II
+ */
+#define DLT_LINUX_IRDA 144
+
+/*
+ * Reserved for IBM SP switch and IBM Next Federation switch.
+ */
+#define DLT_IBM_SP 145
+#define DLT_IBM_SN 146
+
+/*
+ * Reserved for private use. If you have some link-layer header type
+ * that you want to use within your organization, with the capture files
+ * using that link-layer header type not ever be sent outside your
+ * organization, you can use these values.
+ *
+ * No libpcap release will use these for any purpose, nor will any
+ * tcpdump release use them, either.
+ *
+ * Do *NOT* use these in capture files that you expect anybody not using
+ * your private versions of capture-file-reading tools to read; in
+ * particular, do *NOT* use them in products, otherwise you may find that
+ * people won't be able to use tcpdump, or snort, or Ethereal, or... to
+ * read capture files from your firewall/intrusion detection/traffic
+ * monitoring/etc. appliance, or whatever product uses that DLT_ value,
+ * and you may also find that the developers of those applications will
+ * not accept patches to let them read those files.
+ *
+ * Also, do not use them if somebody might send you a capture using them
+ * for *their* private type and tools using them for *your* private type
+ * would have to read them.
+ *
+ * Instead, ask "tcpdump-workers@lists.tcpdump.org" for a new DLT_ value,
+ * as per the comment above, and use the type you're given.
+ */
+#define DLT_USER0 147
+#define DLT_USER1 148
+#define DLT_USER2 149
+#define DLT_USER3 150
+#define DLT_USER4 151
+#define DLT_USER5 152
+#define DLT_USER6 153
+#define DLT_USER7 154
+#define DLT_USER8 155
+#define DLT_USER9 156
+#define DLT_USER10 157
+#define DLT_USER11 158
+#define DLT_USER12 159
+#define DLT_USER13 160
+#define DLT_USER14 161
+#define DLT_USER15 162
+
+/*
+ * For future use with 802.11 captures - defined by AbsoluteValue
+ * Systems to store a number of bits of link-layer information
+ * including radio information:
+ *
+ * http://www.shaftnet.org/~pizza/software/capturefrm.txt
+ *
+ * but it might be used by some non-AVS drivers now or in the
+ * future.
+ */
+#define DLT_IEEE802_11_RADIO_AVS 163 /* 802.11 plus AVS radio header */
+
+/*
+ * Juniper-private data link type, as per request from
+ * Hannes Gredler <hannes@juniper.net>. The DLT_s are used
+ * for passing on chassis-internal metainformation such as
+ * QOS profiles, etc..
+ */
+#define DLT_JUNIPER_MONITOR 164
+
+/*
+ * Reserved for BACnet MS/TP.
+ */
+#define DLT_BACNET_MS_TP 165
+
+/*
+ * Another PPP variant as per request from Karsten Keil <kkeil@suse.de>.
+ *
+ * This is used in some OSes to allow a kernel socket filter to distinguish
+ * between incoming and outgoing packets, on a socket intended to
+ * supply pppd with outgoing packets so it can do dial-on-demand and
+ * hangup-on-lack-of-demand; incoming packets are filtered out so they
+ * don't cause pppd to hold the connection up (you don't want random
+ * input packets such as port scans, packets from old lost connections,
+ * etc. to force the connection to stay up).
+ *
+ * The first byte of the PPP header (0xff03) is modified to accomodate
+ * the direction - 0x00 = IN, 0x01 = OUT.
+ */
+#define DLT_PPP_PPPD 166
+
+/*
+ * Names for backwards compatibility with older versions of some PPP
+ * software; new software should use DLT_PPP_PPPD.
+ */
+#define DLT_PPP_WITH_DIRECTION DLT_PPP_PPPD
+#define DLT_LINUX_PPP_WITHDIRECTION DLT_PPP_PPPD
+
+/*
+ * Juniper-private data link type, as per request from
+ * Hannes Gredler <hannes@juniper.net>. The DLT_s are used
+ * for passing on chassis-internal metainformation such as
+ * QOS profiles, cookies, etc..
+ */
+#define DLT_JUNIPER_PPPOE 167
+#define DLT_JUNIPER_PPPOE_ATM 168
+
+#define DLT_GPRS_LLC 169 /* GPRS LLC */
+#define DLT_GPF_T 170 /* GPF-T (ITU-T G.7041/Y.1303) */
+#define DLT_GPF_F 171 /* GPF-F (ITU-T G.7041/Y.1303) */
+
+/*
+ * Requested by Oolan Zimmer <oz@gcom.com> for use in Gcom's T1/E1 line
+ * monitoring equipment.
+ */
+#define DLT_GCOM_T1E1 172
+#define DLT_GCOM_SERIAL 173
+
+/*
+ * Juniper-private data link type, as per request from
+ * Hannes Gredler <hannes@juniper.net>. The DLT_ is used
+ * for internal communication to Physical Interface Cards (PIC)
+ */
+#define DLT_JUNIPER_PIC_PEER 174
+
+/*
+ * Link types requested by Gregor Maier <gregor@endace.com> of Endace
+ * Measurement Systems. They add an ERF header (see
+ * http://www.endace.com/support/EndaceRecordFormat.pdf) in front of
+ * the link-layer header.
+ */
+#define DLT_ERF_ETH 175 /* Ethernet */
+#define DLT_ERF_POS 176 /* Packet-over-SONET */
+
+/*
+ * Requested by Daniele Orlandi <daniele@orlandi.com> for raw LAPD
+ * for vISDN (http://www.orlandi.com/visdn/). Its link-layer header
+ * includes additional information before the LAPD header, so it's
+ * not necessarily a generic LAPD header.
+ */
+#define DLT_LINUX_LAPD 177
+
+/*
+ * Juniper-private data link type, as per request from
+ * Hannes Gredler <hannes@juniper.net>.
+ * The DLT_ are used for prepending meta-information
+ * like interface index, interface name
+ * before standard Ethernet, PPP, Frelay & C-HDLC Frames
+ */
+#define DLT_JUNIPER_ETHER 178
+#define DLT_JUNIPER_PPP 179
+#define DLT_JUNIPER_FRELAY 180
+#define DLT_JUNIPER_CHDLC 181
+
+/*
+ * Multi Link Frame Relay (FRF.16)
+ */
+#define DLT_MFR 182
+
+/*
+ * Juniper-private data link type, as per request from
+ * Hannes Gredler <hannes@juniper.net>.
+ * The DLT_ is used for internal communication with a
+ * voice Adapter Card (PIC)
+ */
+#define DLT_JUNIPER_VP 183
+
+/*
+ * Arinc 429 frames.
+ * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
+ * Every frame contains a 32bit A429 label.
+ * More documentation on Arinc 429 can be found at
+ * http://www.condoreng.com/support/downloads/tutorials/ARINCTutorial.pdf
+ */
+#define DLT_A429 184
+
+/*
+ * Arinc 653 Interpartition Communication messages.
+ * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
+ * Please refer to the A653-1 standard for more information.
+ */
+#define DLT_A653_ICM 185
+
+/*
+ * USB packets, beginning with a USB setup header; requested by
+ * Paolo Abeni <paolo.abeni@email.it>.
+ */
+#define DLT_USB 186
+
+/*
+ * Bluetooth HCI UART transport layer (part H:4); requested by
+ * Paolo Abeni.
+ */
+#define DLT_BLUETOOTH_HCI_H4 187
+
+/*
+ * IEEE 802.16 MAC Common Part Sublayer; requested by Maria Cruz
+ * <cruz_petagay@bah.com>.
+ */
+#define DLT_IEEE802_16_MAC_CPS 188
+
+/*
+ * USB packets, beginning with a Linux USB header; requested by
+ * Paolo Abeni <paolo.abeni@email.it>.
+ */
+#define DLT_USB_LINUX 189
+
+/*
+ * Controller Area Network (CAN) v. 2.0B packets.
+ * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
+ * Used to dump CAN packets coming from a CAN Vector board.
+ * More documentation on the CAN v2.0B frames can be found at
+ * http://www.can-cia.org/downloads/?269
+ */
+#define DLT_CAN20B 190
+
+/*
+ * IEEE 802.15.4, with address fields padded, as is done by Linux
+ * drivers; requested by Juergen Schimmer.
+ */
+#define DLT_IEEE802_15_4_LINUX 191
+
+/*
+ * Per Packet Information encapsulated packets.
+ * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
+ */
+#define DLT_PPI 192
+
+/*
+ * Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header;
+ * requested by Charles Clancy.
+ */
+#define DLT_IEEE802_16_MAC_CPS_RADIO 193
+
+/*
+ * Juniper-private data link type, as per request from
+ * Hannes Gredler <hannes@juniper.net>.
+ * The DLT_ is used for internal communication with a
+ * integrated service module (ISM).
+ */
+#define DLT_JUNIPER_ISM 194
+
+/*
+ * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
+ * nothing); requested by Mikko Saarnivala <mikko.saarnivala@sensinode.com>.
+ */
+#define DLT_IEEE802_15_4 195
+
+/*
+ * Various link-layer types, with a pseudo-header, for SITA
+ * (http://www.sita.aero/); requested by Fulko Hew (fulko.hew@gmail.com).
+ */
+#define DLT_SITA 196
+
+/*
+ * Various link-layer types, with a pseudo-header, for Endace DAG cards;
+ * encapsulates Endace ERF records. Requested by Stephen Donnelly
+ * <stephen@endace.com>.
+ */
+#define DLT_ERF 197
+
+/*
+ * Special header prepended to Ethernet packets when capturing from a
+ * u10 Networks board. Requested by Phil Mulholland
+ * <phil@u10networks.com>.
+ */
+#define DLT_RAIF1 198
+
+/*
+ * IPMB packet for IPMI, beginning with the I2C slave address, followed
+ * by the netFn and LUN, etc.. Requested by Chanthy Toeung
+ * <chanthy.toeung@ca.kontron.com>.
+ */
+#define DLT_IPMB 199
+
+/*
+ * Juniper-private data link type, as per request from
+ * Hannes Gredler <hannes@juniper.net>.
+ * The DLT_ is used for capturing data on a secure tunnel interface.
+ */
+#define DLT_JUNIPER_ST 200
+
+/*
+ * Bluetooth HCI UART transport layer (part H:4), with pseudo-header
+ * that includes direction information; requested by Paolo Abeni.
+ */
+#define DLT_BLUETOOTH_HCI_H4_WITH_PHDR 201
+
+/*
+ * AX.25 packet with a 1-byte KISS header; see
+ *
+ * http://www.ax25.net/kiss.htm
+ *
+ * as per Richard Stearn <richard@rns-stearn.demon.co.uk>.
+ */
+#define DLT_AX25_KISS 202
+
+/*
+ * LAPD packets from an ISDN channel, starting with the address field,
+ * with no pseudo-header.
+ * Requested by Varuna De Silva <varunax@gmail.com>.
+ */
+#define DLT_LAPD 203
+
+/*
+ * Variants of various link-layer headers, with a one-byte direction
+ * pseudo-header prepended - zero means "received by this host",
+ * non-zero (any non-zero value) means "sent by this host" - as per
+ * Will Barker <w.barker@zen.co.uk>.
+ */
+#define DLT_PPP_WITH_DIR 204 /* PPP - don't confuse with DLT_PPP_WITH_DIRECTION */
+#define DLT_C_HDLC_WITH_DIR 205 /* Cisco HDLC */
+#define DLT_FRELAY_WITH_DIR 206 /* Frame Relay */
+#define DLT_LAPB_WITH_DIR 207 /* LAPB */
+
+/*
+ * 208 is reserved for an as-yet-unspecified proprietary link-layer
+ * type, as requested by Will Barker.
+ */
+
+/*
+ * IPMB with a Linux-specific pseudo-header; as requested by Alexey Neyman
+ * <avn@pigeonpoint.com>.
+ */
+#define DLT_IPMB_LINUX 209
+
+/*
+ * FlexRay automotive bus - http://www.flexray.com/ - as requested
+ * by Hannes Kaelber <hannes.kaelber@x2e.de>.
+ */
+#define DLT_FLEXRAY 210
+
+/*
+ * Media Oriented Systems Transport (MOST) bus for multimedia
+ * transport - http://www.mostcooperation.com/ - as requested
+ * by Hannes Kaelber <hannes.kaelber@x2e.de>.
+ */
+#define DLT_MOST 211
+
+/*
+ * Local Interconnect Network (LIN) bus for vehicle networks -
+ * http://www.lin-subbus.org/ - as requested by Hannes Kaelber
+ * <hannes.kaelber@x2e.de>.
+ */
+#define DLT_LIN 212
+
+/*
+ * X2E-private data link type used for serial line capture,
+ * as requested by Hannes Kaelber <hannes.kaelber@x2e.de>.
+ */
+#define DLT_X2E_SERIAL 213
+
+/*
+ * X2E-private data link type used for the Xoraya data logger
+ * family, as requested by Hannes Kaelber <hannes.kaelber@x2e.de>.
+ */
+#define DLT_X2E_XORAYA 214
+
+/*
+ * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
+ * nothing), but with the PHY-level data for non-ASK PHYs (4 octets
+ * of 0 as preamble, one octet of SFD, one octet of frame length+
+ * reserved bit, and then the MAC-layer data, starting with the
+ * frame control field).
+ *
+ * Requested by Max Filippov <jcmvbkbc@gmail.com>.
+ */
+#define DLT_IEEE802_15_4_NONASK_PHY 215
+
+
+/*
+ * DLT and savefile link type values are split into a class and
+ * a member of that class. A class value of 0 indicates a regular
+ * DLT_/LINKTYPE_ value.
+ */
+#define DLT_CLASS(x) ((x) & 0x03ff0000)
+
+/*
+ * NetBSD-specific generic "raw" link type. The class value indicates
+ * that this is the generic raw type, and the lower 16 bits are the
+ * address family we're dealing with. Those values are NetBSD-specific;
+ * do not assume that they correspond to AF_ values for your operating
+ * system.
+ */
+#define DLT_CLASS_NETBSD_RAWAF 0x02240000
+#define DLT_NETBSD_RAWAF(af) (DLT_CLASS_NETBSD_RAWAF | (af))
+#define DLT_NETBSD_RAWAF_AF(x) ((x) & 0x0000ffff)
+#define DLT_IS_NETBSD_RAWAF(x) (DLT_CLASS(x) == DLT_CLASS_NETBSD_RAWAF)
+
+
+/*
+ * The instruction encodings.
+ */
+/* instruction classes */
+#define BPF_CLASS(code) ((code) & 0x07)
+#define BPF_LD 0x00
+#define BPF_LDX 0x01
+#define BPF_ST 0x02
+#define BPF_STX 0x03
+#define BPF_ALU 0x04
+#define BPF_JMP 0x05
+#define BPF_RET 0x06
+#define BPF_MISC 0x07
+
+/* ld/ldx fields */
+#define BPF_SIZE(code) ((code) & 0x18)
+#define BPF_W 0x00
+#define BPF_H 0x08
+#define BPF_B 0x10
+#define BPF_MODE(code) ((code) & 0xe0)
+#define BPF_IMM 0x00
+#define BPF_ABS 0x20
+#define BPF_IND 0x40
+#define BPF_MEM 0x60
+#define BPF_LEN 0x80
+#define BPF_MSH 0xa0
+
+/* alu/jmp fields */
+#define BPF_OP(code) ((code) & 0xf0)
+#define BPF_ADD 0x00
+#define BPF_SUB 0x10
+#define BPF_MUL 0x20
+#define BPF_DIV 0x30
+#define BPF_OR 0x40
+#define BPF_AND 0x50
+#define BPF_LSH 0x60
+#define BPF_RSH 0x70
+#define BPF_NEG 0x80
+#define BPF_JA 0x00
+#define BPF_JEQ 0x10
+#define BPF_JGT 0x20
+#define BPF_JGE 0x30
+#define BPF_JSET 0x40
+#define BPF_SRC(code) ((code) & 0x08)
+#define BPF_K 0x00
+#define BPF_X 0x08
+
+/* ret - BPF_K and BPF_X also apply */
+#define BPF_RVAL(code) ((code) & 0x18)
+#define BPF_A 0x10
+
+/* misc */
+#define BPF_MISCOP(code) ((code) & 0xf8)
+#define BPF_TAX 0x00
+#define BPF_TXA 0x80
+
+/*
+ * The instruction data structure.
+ */
+struct bpf_insn {
+ u_short code;
+ u_char jt;
+ u_char jf;
+ bpf_u_int32 k;
+};
+
+/*
+ * Macros for insn array initializers.
+ */
+#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k }
+#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k }
+
+#if __STDC__ || defined(__cplusplus)
+extern int bpf_validate(const struct bpf_insn *, int);
+extern u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int);
+#else
+extern int bpf_validate();
+extern u_int bpf_filter();
+#endif
+
+/*
+ * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST).
+ */
+#define BPF_MEMWORDS 16
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/win32/wpdpack/Include/pcap/namedb.h b/win32/wpdpack/Include/pcap/namedb.h
new file mode 100644
index 0000000..9002c75
--- /dev/null
+++ b/win32/wpdpack/Include/pcap/namedb.h
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 1994, 1996
+ * The Regents of the University of California. All rights reserved.
+ *
+ * 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 Computer Systems
+ * Engineering Group at Lawrence Berkeley Laboratory.
+ * 4. Neither the name of the University nor of the Laboratory 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.
+ *
+ * @(#) $Header: /tcpdump/master/libpcap/pcap/namedb.h,v 1.1 2006/10/04 18:09:22 guy Exp $ (LBL)
+ */
+
+#ifndef lib_pcap_namedb_h
+#define lib_pcap_namedb_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * As returned by the pcap_next_etherent()
+ * XXX this stuff doesn't belong in this interface, but this
+ * library already must do name to address translation, so
+ * on systems that don't have support for /etc/ethers, we
+ * export these hooks since they'll
+ */
+struct pcap_etherent {
+ u_char addr[6];
+ char name[122];
+};
+#ifndef PCAP_ETHERS_FILE
+#define PCAP_ETHERS_FILE "/etc/ethers"
+#endif
+struct pcap_etherent *pcap_next_etherent(FILE *);
+u_char *pcap_ether_hostton(const char*);
+u_char *pcap_ether_aton(const char *);
+
+bpf_u_int32 **pcap_nametoaddr(const char *);
+#ifdef INET6
+struct addrinfo *pcap_nametoaddrinfo(const char *);
+#endif
+bpf_u_int32 pcap_nametonetaddr(const char *);
+
+int pcap_nametoport(const char *, int *, int *);
+int pcap_nametoportrange(const char *, int *, int *, int *);
+int pcap_nametoproto(const char *);
+int pcap_nametoeproto(const char *);
+int pcap_nametollc(const char *);
+/*
+ * If a protocol is unknown, PROTO_UNDEF is returned.
+ * Also, pcap_nametoport() returns the protocol along with the port number.
+ * If there are ambiguous entried in /etc/services (i.e. domain
+ * can be either tcp or udp) PROTO_UNDEF is returned.
+ */
+#define PROTO_UNDEF -1
+
+/* XXX move these to pcap-int.h? */
+int __pcap_atodn(const char *, bpf_u_int32 *);
+int __pcap_atoin(const char *, bpf_u_int32 *);
+u_short __pcap_nametodnaddr(const char *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/win32/wpdpack/Include/pcap/pcap.h b/win32/wpdpack/Include/pcap/pcap.h
new file mode 100644
index 0000000..ad8fc40
--- /dev/null
+++ b/win32/wpdpack/Include/pcap/pcap.h
@@ -0,0 +1,407 @@
+/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */
+/*
+ * Copyright (c) 1993, 1994, 1995, 1996, 1997
+ * The Regents of the University of California. All rights reserved.
+ *
+ * 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 Computer Systems
+ * Engineering Group at Lawrence Berkeley Laboratory.
+ * 4. Neither the name of the University nor of the Laboratory 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.
+ *
+ * @(#) $Header: /tcpdump/master/libpcap/pcap/pcap.h,v 1.4.2.11 2008-10-06 15:38:39 gianluca Exp $ (LBL)
+ */
+
+#ifndef lib_pcap_pcap_h
+#define lib_pcap_pcap_h
+
+#if defined(WIN32)
+ #include <pcap-stdinc.h>
+#elif defined(MSDOS)
+ #include <sys/types.h>
+ #include <sys/socket.h> /* u_int, u_char etc. */
+#else /* UN*X */
+ #include <sys/types.h>
+ #include <sys/time.h>
+#endif /* WIN32/MSDOS/UN*X */
+
+#ifndef PCAP_DONT_INCLUDE_PCAP_BPF_H
+#include <pcap/bpf.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef HAVE_REMOTE
+ // We have to define the SOCKET here, although it has been defined in sockutils.h
+ // This is to avoid the distribution of the 'sockutils.h' file around
+ // (for example in the WinPcap developer's pack)
+ #ifndef SOCKET
+ #ifdef WIN32
+ #define SOCKET unsigned int
+ #else
+ #define SOCKET int
+ #endif
+ #endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define PCAP_VERSION_MAJOR 2
+#define PCAP_VERSION_MINOR 4
+
+#define PCAP_ERRBUF_SIZE 256
+
+/*
+ * Compatibility for systems that have a bpf.h that
+ * predates the bpf typedefs for 64-bit support.
+ */
+#if BPF_RELEASE - 0 < 199406
+typedef int bpf_int32;
+typedef u_int bpf_u_int32;
+#endif
+
+typedef struct pcap pcap_t;
+typedef struct pcap_dumper pcap_dumper_t;
+typedef struct pcap_if pcap_if_t;
+typedef struct pcap_addr pcap_addr_t;
+
+/*
+ * The first record in the file contains saved values for some
+ * of the flags used in the printout phases of tcpdump.
+ * Many fields here are 32 bit ints so compilers won't insert unwanted
+ * padding; these files need to be interchangeable across architectures.
+ *
+ * Do not change the layout of this structure, in any way (this includes
+ * changes that only affect the length of fields in this structure).
+ *
+ * Also, do not change the interpretation of any of the members of this
+ * structure, in any way (this includes using values other than
+ * LINKTYPE_ values, as defined in "savefile.c", in the "linktype"
+ * field).
+ *
+ * Instead:
+ *
+ * introduce a new structure for the new format, if the layout
+ * of the structure changed;
+ *
+ * send mail to "tcpdump-workers@lists.tcpdump.org", requesting
+ * a new magic number for your new capture file format, and, when
+ * you get the new magic number, put it in "savefile.c";
+ *
+ * use that magic number for save files with the changed file
+ * header;
+ *
+ * make the code in "savefile.c" capable of reading files with
+ * the old file header as well as files with the new file header
+ * (using the magic number to determine the header format).
+ *
+ * Then supply the changes as a patch at
+ *
+ * http://sourceforge.net/projects/libpcap/
+ *
+ * so that future versions of libpcap and programs that use it (such as
+ * tcpdump) will be able to read your new capture file format.
+ */
+struct pcap_file_header {
+ bpf_u_int32 magic;
+ u_short version_major;
+ u_short version_minor;
+ bpf_int32 thiszone; /* gmt to local correction */
+ bpf_u_int32 sigfigs; /* accuracy of timestamps */
+ bpf_u_int32 snaplen; /* max length saved portion of each pkt */
+ bpf_u_int32 linktype; /* data link type (LINKTYPE_*) */
+};
+
+/*
+ * Macros for the value returned by pcap_datalink_ext().
+ *
+ * If LT_FCS_LENGTH_PRESENT(x) is true, the LT_FCS_LENGTH(x) macro
+ * gives the FCS length of packets in the capture.
+ */
+#define LT_FCS_LENGTH_PRESENT(x) ((x) & 0x04000000)
+#define LT_FCS_LENGTH(x) (((x) & 0xF0000000) >> 28)
+#define LT_FCS_DATALINK_EXT(x) ((((x) & 0xF) << 28) | 0x04000000)
+
+typedef enum {
+ PCAP_D_INOUT = 0,
+ PCAP_D_IN,
+ PCAP_D_OUT
+} pcap_direction_t;
+
+/*
+ * Generic per-packet information, as supplied by libpcap.
+ *
+ * The time stamp can and should be a "struct timeval", regardless of
+ * whether your system supports 32-bit tv_sec in "struct timeval",
+ * 64-bit tv_sec in "struct timeval", or both if it supports both 32-bit
+ * and 64-bit applications. The on-disk format of savefiles uses 32-bit
+ * tv_sec (and tv_usec); this structure is irrelevant to that. 32-bit
+ * and 64-bit versions of libpcap, even if they're on the same platform,
+ * should supply the appropriate version of "struct timeval", even if
+ * that's not what the underlying packet capture mechanism supplies.
+ */
+struct pcap_pkthdr {
+ struct timeval ts; /* time stamp */
+ bpf_u_int32 caplen; /* length of portion present */
+ bpf_u_int32 len; /* length this packet (off wire) */
+};
+
+/*
+ * As returned by the pcap_stats()
+ */
+struct pcap_stat {
+ u_int ps_recv; /* number of packets received */
+ u_int ps_drop; /* number of packets dropped */
+ u_int ps_ifdrop; /* drops by interface XXX not yet supported */
+#ifdef HAVE_REMOTE
+ u_int ps_capt; /* number of packets that are received by the application; please get rid off the Win32 ifdef */
+ u_int ps_sent; /* number of packets sent by the server on the network */
+ u_int ps_netdrop; /* number of packets lost on the network */
+#endif /* HAVE_REMOTE */
+};
+
+#ifdef MSDOS
+/*
+ * As returned by the pcap_stats_ex()
+ */
+struct pcap_stat_ex {
+ u_long rx_packets; /* total packets received */
+ u_long tx_packets; /* total packets transmitted */
+ u_long rx_bytes; /* total bytes received */
+ u_long tx_bytes; /* total bytes transmitted */
+ u_long rx_errors; /* bad packets received */
+ u_long tx_errors; /* packet transmit problems */
+ u_long rx_dropped; /* no space in Rx buffers */
+ u_long tx_dropped; /* no space available for Tx */
+ u_long multicast; /* multicast packets received */
+ u_long collisions;
+
+ /* detailed rx_errors: */
+ u_long rx_length_errors;
+ u_long rx_over_errors; /* receiver ring buff overflow */
+ u_long rx_crc_errors; /* recv'd pkt with crc error */
+ u_long rx_frame_errors; /* recv'd frame alignment error */
+ u_long rx_fifo_errors; /* recv'r fifo overrun */
+ u_long rx_missed_errors; /* recv'r missed packet */
+
+ /* detailed tx_errors */
+ u_long tx_aborted_errors;
+ u_long tx_carrier_errors;
+ u_long tx_fifo_errors;
+ u_long tx_heartbeat_errors;
+ u_long tx_window_errors;
+ };
+#endif
+
+/*
+ * Item in a list of interfaces.
+ */
+struct pcap_if {
+ struct pcap_if *next;
+ char *name; /* name to hand to "pcap_open_live()" */
+ char *description; /* textual description of interface, or NULL */
+ struct pcap_addr *addresses;
+ bpf_u_int32 flags; /* PCAP_IF_ interface flags */
+};
+
+#define PCAP_IF_LOOPBACK 0x00000001 /* interface is loopback */
+
+/*
+ * Representation of an interface address.
+ */
+struct pcap_addr {
+ struct pcap_addr *next;
+ struct sockaddr *addr; /* address */
+ struct sockaddr *netmask; /* netmask for that address */
+ struct sockaddr *broadaddr; /* broadcast address for that address */
+ struct sockaddr *dstaddr; /* P2P destination address for that address */
+};
+
+typedef void (*pcap_handler)(u_char *, const struct pcap_pkthdr *,
+ const u_char *);
+
+/*
+ * Error codes for the pcap API.
+ * These will all be negative, so you can check for the success or
+ * failure of a call that returns these codes by checking for a
+ * negative value.
+ */
+#define PCAP_ERROR -1 /* generic error code */
+#define PCAP_ERROR_BREAK -2 /* loop terminated by pcap_breakloop */
+#define PCAP_ERROR_NOT_ACTIVATED -3 /* the capture needs to be activated */
+#define PCAP_ERROR_ACTIVATED -4 /* the operation can't be performed on already activated captures */
+#define PCAP_ERROR_NO_SUCH_DEVICE -5 /* no such device exists */
+#define PCAP_ERROR_RFMON_NOTSUP -6 /* this device doesn't support rfmon (monitor) mode */
+#define PCAP_ERROR_NOT_RFMON -7 /* operation supported only in monitor mode */
+#define PCAP_ERROR_PERM_DENIED -8 /* no permission to open the device */
+#define PCAP_ERROR_IFACE_NOT_UP -9 /* interface isn't up */
+
+/*
+ * Warning codes for the pcap API.
+ * These will all be positive and non-zero, so they won't look like
+ * errors.
+ */
+#define PCAP_WARNING 1 /* generic warning code */
+#define PCAP_WARNING_PROMISC_NOTSUP 2 /* this device doesn't support promiscuous mode */
+
+char *pcap_lookupdev(char *);
+int pcap_lookupnet(const char *, bpf_u_int32 *, bpf_u_int32 *, char *);
+
+pcap_t *pcap_create(const char *, char *);
+int pcap_set_snaplen(pcap_t *, int);
+int pcap_set_promisc(pcap_t *, int);
+int pcap_can_set_rfmon(pcap_t *);
+int pcap_set_rfmon(pcap_t *, int);
+int pcap_set_timeout(pcap_t *, int);
+int pcap_set_buffer_size(pcap_t *, int);
+int pcap_activate(pcap_t *);
+
+pcap_t *pcap_open_live(const char *, int, int, int, char *);
+pcap_t *pcap_open_dead(int, int);
+pcap_t *pcap_open_offline(const char *, char *);
+#if defined(WIN32)
+pcap_t *pcap_hopen_offline(intptr_t, char *);
+#if !defined(LIBPCAP_EXPORTS)
+#define pcap_fopen_offline(f,b) \
+ pcap_hopen_offline(_get_osfhandle(_fileno(f)), b)
+#else /*LIBPCAP_EXPORTS*/
+static pcap_t *pcap_fopen_offline(FILE *, char *);
+#endif
+#else /*WIN32*/
+pcap_t *pcap_fopen_offline(FILE *, char *);
+#endif /*WIN32*/
+
+void pcap_close(pcap_t *);
+int pcap_loop(pcap_t *, int, pcap_handler, u_char *);
+int pcap_dispatch(pcap_t *, int, pcap_handler, u_char *);
+const u_char*
+ pcap_next(pcap_t *, struct pcap_pkthdr *);
+int pcap_next_ex(pcap_t *, struct pcap_pkthdr **, const u_char **);
+void pcap_breakloop(pcap_t *);
+int pcap_stats(pcap_t *, struct pcap_stat *);
+int pcap_setfilter(pcap_t *, struct bpf_program *);
+int pcap_setdirection(pcap_t *, pcap_direction_t);
+int pcap_getnonblock(pcap_t *, char *);
+int pcap_setnonblock(pcap_t *, int, char *);
+int pcap_inject(pcap_t *, const void *, size_t);
+int pcap_sendpacket(pcap_t *, const u_char *, int);
+const char *pcap_statustostr(int);
+const char *pcap_strerror(int);
+char *pcap_geterr(pcap_t *);
+void pcap_perror(pcap_t *, char *);
+int pcap_compile(pcap_t *, struct bpf_program *, const char *, int,
+ bpf_u_int32);
+int pcap_compile_nopcap(int, int, struct bpf_program *,
+ const char *, int, bpf_u_int32);
+void pcap_freecode(struct bpf_program *);
+int pcap_offline_filter(struct bpf_program *, const struct pcap_pkthdr *,
+ const u_char *);
+int pcap_datalink(pcap_t *);
+int pcap_datalink_ext(pcap_t *);
+int pcap_list_datalinks(pcap_t *, int **);
+int pcap_set_datalink(pcap_t *, int);
+void pcap_free_datalinks(int *);
+int pcap_datalink_name_to_val(const char *);
+const char *pcap_datalink_val_to_name(int);
+const char *pcap_datalink_val_to_description(int);
+int pcap_snapshot(pcap_t *);
+int pcap_is_swapped(pcap_t *);
+int pcap_major_version(pcap_t *);
+int pcap_minor_version(pcap_t *);
+
+/* XXX */
+FILE *pcap_file(pcap_t *);
+int pcap_fileno(pcap_t *);
+
+pcap_dumper_t *pcap_dump_open(pcap_t *, const char *);
+pcap_dumper_t *pcap_dump_fopen(pcap_t *, FILE *fp);
+FILE *pcap_dump_file(pcap_dumper_t *);
+long pcap_dump_ftell(pcap_dumper_t *);
+int pcap_dump_flush(pcap_dumper_t *);
+void pcap_dump_close(pcap_dumper_t *);
+void pcap_dump(u_char *, const struct pcap_pkthdr *, const u_char *);
+
+int pcap_findalldevs(pcap_if_t **, char *);
+void pcap_freealldevs(pcap_if_t *);
+
+const char *pcap_lib_version(void);
+
+/* XXX this guy lives in the bpf tree */
+u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int);
+int bpf_validate(const struct bpf_insn *f, int len);
+char *bpf_image(const struct bpf_insn *, int);
+void bpf_dump(const struct bpf_program *, int);
+
+#if defined(WIN32)
+
+/*
+ * Win32 definitions
+ */
+
+int pcap_setbuff(pcap_t *p, int dim);
+int pcap_setmode(pcap_t *p, int mode);
+int pcap_setmintocopy(pcap_t *p, int size);
+
+#ifdef WPCAP
+/* Include file with the wpcap-specific extensions */
+#include <Win32-Extensions.h>
+#endif /* WPCAP */
+
+#define MODE_CAPT 0
+#define MODE_STAT 1
+#define MODE_MON 2
+
+#elif defined(MSDOS)
+
+/*
+ * MS-DOS definitions
+ */
+
+int pcap_stats_ex (pcap_t *, struct pcap_stat_ex *);
+void pcap_set_wait (pcap_t *p, void (*yield)(void), int wait);
+u_long pcap_mac_packets (void);
+
+#else /* UN*X */
+
+/*
+ * UN*X definitions
+ */
+
+int pcap_get_selectable_fd(pcap_t *);
+
+#endif /* WIN32/MSDOS/UN*X */
+
+#ifdef HAVE_REMOTE
+/* Includes most of the public stuff that is needed for the remote capture */
+#include <remote-ext.h>
+#endif /* HAVE_REMOTE */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/win32/wpdpack/Include/pcap/sll.h b/win32/wpdpack/Include/pcap/sll.h
new file mode 100644
index 0000000..e9d5452
--- /dev/null
+++ b/win32/wpdpack/Include/pcap/sll.h
@@ -0,0 +1,129 @@
+/*-
+ * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
+ * The Regents of the University of California. All rights reserved.
+ *
+ * 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.
+ *
+ * @(#) $Header: /tcpdump/master/libpcap/pcap/sll.h,v 1.2.2.1 2008-05-30 01:36:06 guy Exp $ (LBL)
+ */
+
+/*
+ * For captures on Linux cooked sockets, we construct a fake header
+ * that includes:
+ *
+ * a 2-byte "packet type" which is one of:
+ *
+ * LINUX_SLL_HOST packet was sent to us
+ * LINUX_SLL_BROADCAST packet was broadcast
+ * LINUX_SLL_MULTICAST packet was multicast
+ * LINUX_SLL_OTHERHOST packet was sent to somebody else
+ * LINUX_SLL_OUTGOING packet was sent *by* us;
+ *
+ * a 2-byte Ethernet protocol field;
+ *
+ * a 2-byte link-layer type;
+ *
+ * a 2-byte link-layer address length;
+ *
+ * an 8-byte source link-layer address, whose actual length is
+ * specified by the previous value.
+ *
+ * All fields except for the link-layer address are in network byte order.
+ *
+ * DO NOT change the layout of this structure, or change any of the
+ * LINUX_SLL_ values below. If you must change the link-layer header
+ * for a "cooked" Linux capture, introduce a new DLT_ type (ask
+ * "tcpdump-workers@lists.tcpdump.org" for one, so that you don't give it
+ * a value that collides with a value already being used), and use the
+ * new header in captures of that type, so that programs that can
+ * handle DLT_LINUX_SLL captures will continue to handle them correctly
+ * without any change, and so that capture files with different headers
+ * can be told apart and programs that read them can dissect the
+ * packets in them.
+ */
+
+#ifndef lib_pcap_sll_h
+#define lib_pcap_sll_h
+
+/*
+ * A DLT_LINUX_SLL fake link-layer header.
+ */
+#define SLL_HDR_LEN 16 /* total header length */
+#define SLL_ADDRLEN 8 /* length of address field */
+
+struct sll_header {
+ u_int16_t sll_pkttype; /* packet type */
+ u_int16_t sll_hatype; /* link-layer address type */
+ u_int16_t sll_halen; /* link-layer address length */
+ u_int8_t sll_addr[SLL_ADDRLEN]; /* link-layer address */
+ u_int16_t sll_protocol; /* protocol */
+};
+
+/*
+ * The LINUX_SLL_ values for "sll_pkttype"; these correspond to the
+ * PACKET_ values on Linux, but are defined here so that they're
+ * available even on systems other than Linux, and so that they
+ * don't change even if the PACKET_ values change.
+ */
+#define LINUX_SLL_HOST 0
+#define LINUX_SLL_BROADCAST 1
+#define LINUX_SLL_MULTICAST 2
+#define LINUX_SLL_OTHERHOST 3
+#define LINUX_SLL_OUTGOING 4
+
+/*
+ * The LINUX_SLL_ values for "sll_protocol"; these correspond to the
+ * ETH_P_ values on Linux, but are defined here so that they're
+ * available even on systems other than Linux. We assume, for now,
+ * that the ETH_P_ values won't change in Linux; if they do, then:
+ *
+ * if we don't translate them in "pcap-linux.c", capture files
+ * won't necessarily be readable if captured on a system that
+ * defines ETH_P_ values that don't match these values;
+ *
+ * if we do translate them in "pcap-linux.c", that makes life
+ * unpleasant for the BPF code generator, as the values you test
+ * for in the kernel aren't the values that you test for when
+ * reading a capture file, so the fixup code run on BPF programs
+ * handed to the kernel ends up having to do more work.
+ *
+ * Add other values here as necessary, for handling packet types that
+ * might show up on non-Ethernet, non-802.x networks. (Not all the ones
+ * in the Linux "if_ether.h" will, I suspect, actually show up in
+ * captures.)
+ */
+#define LINUX_SLL_P_802_3 0x0001 /* Novell 802.3 frames without 802.2 LLC header */
+#define LINUX_SLL_P_802_2 0x0004 /* 802.2 frames (not D/I/X Ethernet) */
+
+#endif
diff --git a/win32/wpdpack/Include/pcap/usb.h b/win32/wpdpack/Include/pcap/usb.h
new file mode 100644
index 0000000..adcd19c
--- /dev/null
+++ b/win32/wpdpack/Include/pcap/usb.h
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2006 Paolo Abeni (Italy)
+ * All rights reserved.
+ *
+ * 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. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT
+ * OWNER 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.
+ *
+ * Basic USB data struct
+ * By Paolo Abeni <paolo.abeni@email.it>
+ *
+ * @(#) $Header: /tcpdump/master/libpcap/pcap/usb.h,v 1.6 2007/09/22 02:06:08 guy Exp $
+ */
+
+#ifndef _PCAP_USB_STRUCTS_H__
+#define _PCAP_USB_STRUCTS_H__
+
+/*
+ * possible transfer mode
+ */
+#define URB_TRANSFER_IN 0x80
+#define URB_ISOCHRONOUS 0x0
+#define URB_INTERRUPT 0x1
+#define URB_CONTROL 0x2
+#define URB_BULK 0x3
+
+/*
+ * possible event type
+ */
+#define URB_SUBMIT 'S'
+#define URB_COMPLETE 'C'
+#define URB_ERROR 'E'
+
+/*
+ * USB setup header as defined in USB specification.
+ * Appears at the front of each packet in DLT_USB captures.
+ */
+typedef struct _usb_setup {
+ u_int8_t bmRequestType;
+ u_int8_t bRequest;
+ u_int16_t wValue;
+ u_int16_t wIndex;
+ u_int16_t wLength;
+} pcap_usb_setup;
+
+
+/*
+ * Header prepended by linux kernel to each event.
+ * Appears at the front of each packet in DLT_USB_LINUX captures.
+ */
+typedef struct _usb_header {
+ u_int64_t id;
+ u_int8_t event_type;
+ u_int8_t transfer_type;
+ u_int8_t endpoint_number;
+ u_int8_t device_address;
+ u_int16_t bus_id;
+ char setup_flag;/*if !=0 the urb setup header is not present*/
+ char data_flag; /*if !=0 no urb data is present*/
+ int64_t ts_sec;
+ int32_t ts_usec;
+ int32_t status;
+ u_int32_t urb_len;
+ u_int32_t data_len; /* amount of urb data really present in this event*/
+ pcap_usb_setup setup;
+} pcap_usb_header;
+
+
+#endif
diff --git a/win32/wpdpack/Include/pcap/vlan.h b/win32/wpdpack/Include/pcap/vlan.h
new file mode 100644
index 0000000..b0cb794
--- /dev/null
+++ b/win32/wpdpack/Include/pcap/vlan.h
@@ -0,0 +1,46 @@
+/*-
+ * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
+ * The Regents of the University of California. All rights reserved.
+ *
+ * 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.
+ *
+ * @(#) $Header: /tcpdump/master/libpcap/pcap/vlan.h,v 1.1.2.2 2008-08-06 07:45:59 guy Exp $
+ */
+
+#ifndef lib_pcap_vlan_h
+#define lib_pcap_vlan_h
+
+struct vlan_tag {
+ u_int16_t vlan_tpid; /* ETH_P_8021Q */
+ u_int16_t vlan_tci; /* VLAN TCI */
+};
+
+#define VLAN_TAG_LEN 4
+
+#endif
diff --git a/win32/wpdpack/Include/remote-ext.h b/win32/wpdpack/Include/remote-ext.h
new file mode 100644
index 0000000..35a2fff
--- /dev/null
+++ b/win32/wpdpack/Include/remote-ext.h
@@ -0,0 +1,444 @@
+/*
+ * Copyright (c) 2002 - 2003
+ * NetGroup, Politecnico di Torino (Italy)
+ * All rights reserved.
+ *
+ * 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. Neither the name of the Politecnico di Torino 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 COPYRIGHT HOLDERS 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 COPYRIGHT
+ * OWNER 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.
+ *
+ */
+
+
+#ifndef __REMOTE_EXT_H__
+#define __REMOTE_EXT_H__
+
+
+#ifndef HAVE_REMOTE
+#error Please do not include this file directly. Just define HAVE_REMOTE and then include pcap.h
+#endif
+
+// Definition for Microsoft Visual Studio
+#if _MSC_VER > 1000
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*!
+ \file remote-ext.h
+
+ The goal of this file it to include most of the new definitions that should be
+ placed into the pcap.h file.
+
+ It includes all new definitions (structures and functions like pcap_open().
+ Some of the functions are not really a remote feature, but, right now,
+ they are placed here.
+*/
+
+
+
+// All this stuff is public
+/*! \addtogroup remote_struct
+ \{
+*/
+
+
+
+
+/*!
+ \brief Defines the maximum buffer size in which address, port, interface names are kept.
+
+ In case the adapter name or such is larger than this value, it is truncated.
+ This is not used by the user; however it must be aware that an hostname / interface
+ name longer than this value will be truncated.
+*/
+#define PCAP_BUF_SIZE 1024
+
+
+/*! \addtogroup remote_source_ID
+ \{
+*/
+
+
+/*!
+ \brief Internal representation of the type of source in use (file,
+ remote/local interface).
+
+ This indicates a file, i.e. the user want to open a capture from a local file.
+*/
+#define PCAP_SRC_FILE 2
+/*!
+ \brief Internal representation of the type of source in use (file,
+ remote/local interface).
+
+ This indicates a local interface, i.e. the user want to open a capture from
+ a local interface. This does not involve the RPCAP protocol.
+*/
+#define PCAP_SRC_IFLOCAL 3
+/*!
+ \brief Internal representation of the type of source in use (file,
+ remote/local interface).
+
+ This indicates a remote interface, i.e. the user want to open a capture from
+ an interface on a remote host. This does involve the RPCAP protocol.
+*/
+#define PCAP_SRC_IFREMOTE 4
+
+/*!
+ \}
+*/
+
+
+
+/*! \addtogroup remote_source_string
+
+ The formats allowed by the pcap_open() are the following:
+ - file://path_and_filename [opens a local file]
+ - rpcap://devicename [opens the selected device devices available on the local host, without using the RPCAP protocol]
+ - rpcap://host/devicename [opens the selected device available on a remote host]
+ - rpcap://host:port/devicename [opens the selected device available on a remote host, using a non-standard port for RPCAP]
+ - adaptername [to open a local adapter; kept for compability, but it is strongly discouraged]
+ - (NULL) [to open the first local adapter; kept for compability, but it is strongly discouraged]
+
+ The formats allowed by the pcap_findalldevs_ex() are the following:
+ - file://folder/ [lists all the files in the given folder]
+ - rpcap:// [lists all local adapters]
+ - rpcap://host:port/ [lists the devices available on a remote host]
+
+ Referring to the 'host' and 'port' paramters, they can be either numeric or literal. Since
+ IPv6 is fully supported, these are the allowed formats:
+
+ - host (literal): e.g. host.foo.bar
+ - host (numeric IPv4): e.g. 10.11.12.13
+ - host (numeric IPv4, IPv6 style): e.g. [10.11.12.13]
+ - host (numeric IPv6): e.g. [1:2:3::4]
+ - port: can be either numeric (e.g. '80') or literal (e.g. 'http')
+
+ Here you find some allowed examples:
+ - rpcap://host.foo.bar/devicename [everything literal, no port number]
+ - rpcap://host.foo.bar:1234/devicename [everything literal, with port number]
+ - rpcap://10.11.12.13/devicename [IPv4 numeric, no port number]
+ - rpcap://10.11.12.13:1234/devicename [IPv4 numeric, with port number]
+ - rpcap://[10.11.12.13]:1234/devicename [IPv4 numeric with IPv6 format, with port number]
+ - rpcap://[1:2:3::4]/devicename [IPv6 numeric, no port number]
+ - rpcap://[1:2:3::4]:1234/devicename [IPv6 numeric, with port number]
+ - rpcap://[1:2:3::4]:http/devicename [IPv6 numeric, with literal port number]
+
+ \{
+*/
+
+
+/*!
+ \brief String that will be used to determine the type of source in use (file,
+ remote/local interface).
+
+ This string will be prepended to the interface name in order to create a string
+ that contains all the information required to open the source.
+
+ This string indicates that the user wants to open a capture from a local file.
+*/
+#define PCAP_SRC_FILE_STRING "file://"
+/*!
+ \brief String that will be used to determine the type of source in use (file,
+ remote/local interface).
+
+ This string will be prepended to the interface name in order to create a string
+ that contains all the information required to open the source.
+
+ This string indicates that the user wants to open a capture from a network interface.
+ This string does not necessarily involve the use of the RPCAP protocol. If the
+ interface required resides on the local host, the RPCAP protocol is not involved
+ and the local functions are used.
+*/
+#define PCAP_SRC_IF_STRING "rpcap://"
+
+/*!
+ \}
+*/
+
+
+
+
+
+/*!
+ \addtogroup remote_open_flags
+ \{
+*/
+
+/*!
+ \brief Defines if the adapter has to go in promiscuous mode.
+
+ It is '1' if you have to open the adapter in promiscuous mode, '0' otherwise.
+ Note that even if this parameter is false, the interface could well be in promiscuous
+ mode for some other reason (for example because another capture process with
+ promiscuous mode enabled is currently using that interface).
+ On on Linux systems with 2.2 or later kernels (that have the "any" device), this
+ flag does not work on the "any" device; if an argument of "any" is supplied,
+ the 'promisc' flag is ignored.
+*/
+#define PCAP_OPENFLAG_PROMISCUOUS 1
+
+/*!
+ \brief Defines if the data trasfer (in case of a remote
+ capture) has to be done with UDP protocol.
+
+ If it is '1' if you want a UDP data connection, '0' if you want
+ a TCP data connection; control connection is always TCP-based.
+ A UDP connection is much lighter, but it does not guarantee that all
+ the captured packets arrive to the client workstation. Moreover,
+ it could be harmful in case of network congestion.
+ This flag is meaningless if the source is not a remote interface.
+ In that case, it is simply ignored.
+*/
+#define PCAP_OPENFLAG_DATATX_UDP 2
+
+
+/*!
+ \brief Defines if the remote probe will capture its own generated traffic.
+
+ In case the remote probe uses the same interface to capture traffic and to send
+ data back to the caller, the captured traffic includes the RPCAP traffic as well.
+ If this flag is turned on, the RPCAP traffic is excluded from the capture, so that
+ the trace returned back to the collector is does not include this traffic.
+*/
+#define PCAP_OPENFLAG_NOCAPTURE_RPCAP 4
+
+/*!
+ \brief Defines if the local adapter will capture its own generated traffic.
+
+ This flag tells the underlying capture driver to drop the packets that were sent by itself.
+ This is usefult when building applications like bridges, that should ignore the traffic
+ they just sent.
+*/
+#define PCAP_OPENFLAG_NOCAPTURE_LOCAL 8
+
+/*!
+ \brief This flag configures the adapter for maximum responsiveness.
+
+ In presence of a large value for nbytes, WinPcap waits for the arrival of several packets before
+ copying the data to the user. This guarantees a low number of system calls, i.e. lower processor usage,
+ i.e. better performance, which is good for applications like sniffers. If the user sets the
+ PCAP_OPENFLAG_MAX_RESPONSIVENESS flag, the capture driver will copy the packets as soon as the application
+ is ready to receive them. This is suggested for real time applications (like, for example, a bridge)
+ that need the best responsiveness.*/
+#define PCAP_OPENFLAG_MAX_RESPONSIVENESS 16
+
+/*!
+ \}
+*/
+
+
+/*!
+ \addtogroup remote_samp_methods
+ \{
+*/
+
+/*!
+ \brief No sampling has to be done on the current capture.
+
+ In this case, no sampling algorithms are applied to the current capture.
+*/
+#define PCAP_SAMP_NOSAMP 0
+
+/*!
+ \brief It defines that only 1 out of N packets must be returned to the user.
+
+ In this case, the 'value' field of the 'pcap_samp' structure indicates the
+ number of packets (minus 1) that must be discarded before one packet got accepted.
+ In other words, if 'value = 10', the first packet is returned to the caller, while
+ the following 9 are discarded.
+*/
+#define PCAP_SAMP_1_EVERY_N 1
+
+/*!
+ \brief It defines that we have to return 1 packet every N milliseconds.
+
+ In this case, the 'value' field of the 'pcap_samp' structure indicates the 'waiting
+ time' in milliseconds before one packet got accepted.
+ In other words, if 'value = 10', the first packet is returned to the caller; the next
+ returned one will be the first packet that arrives when 10ms have elapsed.
+*/
+#define PCAP_SAMP_FIRST_AFTER_N_MS 2
+
+/*!
+ \}
+*/
+
+
+/*!
+ \addtogroup remote_auth_methods
+ \{
+*/
+
+/*!
+ \brief It defines the NULL authentication.
+
+ This value has to be used within the 'type' member of the pcap_rmtauth structure.
+ The 'NULL' authentication has to be equal to 'zero', so that old applications
+ can just put every field of struct pcap_rmtauth to zero, and it does work.
+*/
+#define RPCAP_RMTAUTH_NULL 0
+/*!
+ \brief It defines the username/password authentication.
+
+ With this type of authentication, the RPCAP protocol will use the username/
+ password provided to authenticate the user on the remote machine. If the
+ authentication is successful (and the user has the right to open network devices)
+ the RPCAP connection will continue; otherwise it will be dropped.
+
+ This value has to be used within the 'type' member of the pcap_rmtauth structure.
+*/
+#define RPCAP_RMTAUTH_PWD 1
+
+/*!
+ \}
+*/
+
+
+
+
+/*!
+
+ \brief This structure keeps the information needed to autheticate
+ the user on a remote machine.
+
+ The remote machine can either grant or refuse the access according
+ to the information provided.
+ In case the NULL authentication is required, both 'username' and
+ 'password' can be NULL pointers.
+
+ This structure is meaningless if the source is not a remote interface;
+ in that case, the functions which requires such a structure can accept
+ a NULL pointer as well.
+*/
+struct pcap_rmtauth
+{
+ /*!
+ \brief Type of the authentication required.
+
+ In order to provide maximum flexibility, we can support different types
+ of authentication based on the value of this 'type' variable. The currently
+ supported authentication methods are defined into the
+ \link remote_auth_methods Remote Authentication Methods Section\endlink.
+
+ */
+ int type;
+ /*!
+ \brief Zero-terminated string containing the username that has to be
+ used on the remote machine for authentication.
+
+ This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication
+ and it can be NULL.
+ */
+ char *username;
+ /*!
+ \brief Zero-terminated string containing the password that has to be
+ used on the remote machine for authentication.
+
+ This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication
+ and it can be NULL.
+ */
+ char *password;
+};
+
+
+/*!
+ \brief This structure defines the information related to sampling.
+
+ In case the sampling is requested, the capturing device should read
+ only a subset of the packets coming from the source. The returned packets depend
+ on the sampling parameters.
+
+ \warning The sampling process is applied <strong>after</strong> the filtering process.
+ In other words, packets are filtered first, then the sampling process selects a
+ subset of the 'filtered' packets and it returns them to the caller.
+*/
+struct pcap_samp
+{
+ /*!
+ Method used for sampling. Currently, the supported methods are listed in the
+ \link remote_samp_methods Sampling Methods Section\endlink.
+ */
+ int method;
+
+ /*!
+ This value depends on the sampling method defined. For its meaning, please check
+ at the \link remote_samp_methods Sampling Methods Section\endlink.
+ */
+ int value;
+};
+
+
+
+
+//! Maximum lenght of an host name (needed for the RPCAP active mode)
+#define RPCAP_HOSTLIST_SIZE 1024
+
+
+/*!
+ \}
+*/ // end of public documentation
+
+
+// Exported functions
+
+
+
+/** \name New WinPcap functions
+
+ This section lists the new functions that are able to help considerably in writing
+ WinPcap programs because of their easiness of use.
+ */
+//\{
+pcap_t *pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf);
+int pcap_createsrcstr(char *source, int type, const char *host, const char *port, const char *name, char *errbuf);
+int pcap_parsesrcstr(const char *source, int *type, char *host, char *port, char *name, char *errbuf);
+int pcap_findalldevs_ex(char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf);
+struct pcap_samp *pcap_setsampling(pcap_t *p);
+
+//\}
+// End of new winpcap functions
+
+
+
+/** \name Remote Capture functions
+ */
+//\{
+SOCKET pcap_remoteact_accept(const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf);
+int pcap_remoteact_list(char *hostlist, char sep, int size, char *errbuf);
+int pcap_remoteact_close(const char *host, char *errbuf);
+void pcap_remoteact_cleanup();
+//\}
+// End of remote capture functions
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
+
diff --git a/win32/wpdpack/Lib/Packet.lib b/win32/wpdpack/Lib/Packet.lib
new file mode 100644
index 0000000..81618bc
--- /dev/null
+++ b/win32/wpdpack/Lib/Packet.lib
Binary files differ
diff --git a/win32/wpdpack/Lib/libpacket.a b/win32/wpdpack/Lib/libpacket.a
new file mode 100644
index 0000000..29b2f75
--- /dev/null
+++ b/win32/wpdpack/Lib/libpacket.a
Binary files differ
diff --git a/win32/wpdpack/Lib/libwpcap.a b/win32/wpdpack/Lib/libwpcap.a
new file mode 100644
index 0000000..c0ce148
--- /dev/null
+++ b/win32/wpdpack/Lib/libwpcap.a
Binary files differ
diff --git a/win32/wpdpack/Lib/wpcap.lib b/win32/wpdpack/Lib/wpcap.lib
new file mode 100644
index 0000000..f832e04
--- /dev/null
+++ b/win32/wpdpack/Lib/wpcap.lib
Binary files differ
diff --git a/win32/wpdpack/Lib/x64/Packet.lib b/win32/wpdpack/Lib/x64/Packet.lib
new file mode 100644
index 0000000..30c1540
--- /dev/null
+++ b/win32/wpdpack/Lib/x64/Packet.lib
Binary files differ
diff --git a/win32/wpdpack/Lib/x64/libpacket.a b/win32/wpdpack/Lib/x64/libpacket.a
new file mode 100644
index 0000000..64fa551
--- /dev/null
+++ b/win32/wpdpack/Lib/x64/libpacket.a
Binary files differ
diff --git a/win32/wpdpack/Lib/x64/libwpcap.a b/win32/wpdpack/Lib/x64/libwpcap.a
new file mode 100644
index 0000000..06a7b63
--- /dev/null
+++ b/win32/wpdpack/Lib/x64/libwpcap.a
Binary files differ
diff --git a/win32/wpdpack/Lib/x64/wpcap.lib b/win32/wpdpack/Lib/x64/wpcap.lib
new file mode 100644
index 0000000..d5559f8
--- /dev/null
+++ b/win32/wpdpack/Lib/x64/wpcap.lib
Binary files differ
diff --git a/win32/wpdpack/README b/win32/wpdpack/README
new file mode 100644
index 0000000..cb0839a
--- /dev/null
+++ b/win32/wpdpack/README
@@ -0,0 +1,7 @@
+WinPcap is unmaintained. The WinPcap Developer's Pack (http://www.winpcap.org/devel.htm) is not only behind WinPcap (last version of WinPcap was 4.1.3, the Developer's Pack is still at 4.1.2) it also only offers 32 bit GCC-compatible libraries.
+Namely `libpacket.a` and `libwpcap.a`.
+
+Libraries (and include files) in this directory have been patched and compiled by me for use with libnet, or whatever else you might want to use them for. If you rather compile the libraries yourself, source code and build instructions are available at
+https://github.com/sgeto/winpcap
+
+Drivers and DLLs can be found at http://www.winpcap.org
diff --git a/win32/wpdpack/license.txt b/win32/wpdpack/license.txt
new file mode 100644
index 0000000..257535d
--- /dev/null
+++ b/win32/wpdpack/license.txt
@@ -0,0 +1,78 @@
+Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy).
+Copyright (c) 2005 - 2010 CACE Technologies, Davis (California).
+Copyright (c) 2010 - 2015 Riverbed Technology, San Francisco (California).
+All rights reserved.
+
+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. Neither the name of the Politecnico di Torino, CACE Technologies, Riverbed Technology nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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.
+
+This product includes software developed by the University of California, Lawrence Berkeley Laboratory and its contributors.
+This product includes software developed by the Kungliga Tekniska Högskolan and its contributors.
+This product includes software developed by Yen Yen Lim and North Dakota State University.
+
+------------------------------------------
+Portions Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 The Regents of the University of California. All rights reserved.
+
+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 INSTITUTE 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.
+------------------------------------------
+Portions Copyright (c) 1983 Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms are permitted provided that the above copyright notice and this paragraph are duplicated in all such forms and that any documentation, advertising materials, and other materials related to such distribution and use acknowledge that the software was developed by the University of California, Berkeley. The name of the University may not 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 MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+------------------------------------------
+Portions Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan (Royal Institute of Technology, Stockholm, Sweden). All rights reserved.
+
+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 Kungliga Tekniska Högskolan 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 INSTITUTE 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 INSTITUTE 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.
+------------------------------------------
+Portions Copyright (c) 1997 Yen Yen Lim and North Dakota State University. All rights reserved.
+
+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 Yen Yen Lim and North Dakota State University"
+4. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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.
+------------------------------------------
+Portions Copyright (c) 1993 by Digital Equipment Corporation.
+
+Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies, and that the name of Digital Equipment Corporation not be used in advertising or publicity pertaining to distribution of the document or software without specific, written prior permission.
+THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
+------------------------------------------
+Portions Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project. All rights reserved.
+
+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. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+------------------------------------------
+Portions Copyright (c) 1996 Juniper Networks, Inc. All rights reserved.
+
+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. The name of Juniper Networks may not 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.
+------------------------------------------
+Portions Copyright (c) 2001 Daniel Hartmeier All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+- 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 COPYRIGHT HOLDERS AND CONTRIBUTOR "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 COPYRIGHT HOLDERS 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.
+------------------------------------------
+Portions Copyright 1989 by Carnegie Mellon.
+
+Permission to use, copy, modify, and distribute this program for any purpose and without fee is hereby granted, provided that this copyright and permission notice appear on all copies and supporting documentation, the name of Carnegie Mellon not be used in advertising or publicity pertaining to distribution of the program without specific prior permission, and notice be given in supporting documentation that copying and distribution is by permission of Carnegie Mellon and Stanford University. Carnegie Mellon makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.