Annotation of embedaddon/libnet/README.md, revision 1.1.1.1
1.1 misho 1: [![Appveyor Status][]][Appveyor] [![Travis Status][]][Travis] [![CodeDocs Status][]][CodeDocs]
2:
3: Portable Packet Construction and Injection
4: ==========================================
5:
6: Libnet is an API to help with the construction and injection of network
7: packets. It provides a portable framework for low-level network packet
8: writing and handling (use libnet in conjunction with libpcap and you can
9: write some really cool stuff). Libnet includes packet creation at the
10: IP layer and at the link layer as well as a host of supplementary and
11: complementary functionality.
12:
13: Libnet is very handy with which to write network tools and network test
14: code. Some projects, available in Debian/Ubuntu and OpenBSD, using
15: libnet are:
16:
17: - [arping](https://github.com/ThomasHabets/arping)
18: - [ettercap](https://www.ettercap-project.org/)
19: - [ipguard](http://ipguard.deep.perm.ru/)
20: - [isic](http://isic.sourceforge.net/)
21: - [nemesis](https://troglobit.com/projects/nemesis/)
22: - [packit](http://packetfactory.openwall.net/projects/packit/)
23: - [tcptraceroute](https://web.archive.org/web/20130424094134/http://michael.toren.net/code/tcptraceroute/)
24: - [yersinia](https://web.archive.org/web/20180522141004/http://www.yersinia.net/)
25:
26: See the man page and sample test code for more detailed information.
27: Online documentation is available at https://codedocs.xyz/libnet/libnet/
28:
29: > **NOTE:** Legacy code written for *libnet-1.0.x* is unfortunately
30: > **incompatible** with *libnet-1.1.x* and later.
31: > See the [Migration Guide](doc/MIGRATION.md) for porting help.
32:
33:
34: Building
35: --------
36:
37: First download the [latest release][] from GitHub. Libnet employs the
38: [GNU configure and build system][autotools]. The release tarballs and
39: zip files ship with a pre-built `configure` script:
40:
41: tar xf libnet-x.y.z.tar.gz
42: cd libnet-x.y.z/
43: ./configure && make
44: sudo make install
45:
46: To list available options, type <kbd>./configure --help</kbd>
47:
48: ### Building from GIT/GitHub
49:
50: When building from GIT, use <kbd>./autogen.sh</kbd> to generate the
51: `configure` script. For this you need the full suite of the GNU
52: autotools: autoconf (>=2.69), automake (>=1.14), libtool (>=2.4.2).
53:
54: How to install the dependencies varies by system, but on many Debian derived
55: systems, `apt` can be used:
56:
57: sudo apt install autoconf automake libtool
58:
59: ### Building the Documentation
60:
61: To build the documentation (optional) you need doxygen and pod2man:
62:
63: sudo apt install doxygen
64: sudo apt install pod2man || sudo apt install perl
65:
66: For neat graphics in the HTML documentation, also install graphviz.
67: There is also a PDF version of the docs, to build that you need quite a
68: few more packages:
69:
70: sudo apt install texlive-extra-utils texlive-latex-extra \
71: texlive-fonts-recommended latex-xcolor \
72: texlive-font-utils
73:
74: For Microsoft CHM docs you need the HTML Help Workshop, which is part
75: of Visual Studio: http://go.microsoft.com/fwlink/p/?linkid=154968, on
76: UNIX and GNU/Linux systems, see `chmcmd`, which is available in the
77: [FreePascal](http://www.freepascal.org/) suite:
78:
79: sudo apt install fp-utils-3.0.4
80:
81:
82: Using -lnet
83: -----------
84:
85: Libnet is installed as a library and a set of include files. The main
86: include file to use in your program is:
87:
88: #include <libnet.h>
89:
90: To get the correct search paths to both the header and library files,
91: use the standard `pkg-config` tool:
92:
93: $ pkg-config --libs --static --cflags libnet
94: -I/usr/local/include -L/usr/local/lib -lnet
95:
96: The prefix path `/usr/local/` shown here is only the default. Use the
97: `configure` script to select a different prefix when installing libnet.
98:
99: For GNU autotools based projects, use the following in `configure.ac`:
100:
101: # Check for required libraries
102: PKG_CHECK_MODULES([libnet], [libnet >= 1.2])
103:
104: and in your `Makefile.am`:
105:
106: proggy_CFLAGS = $(libnet_CFLAGS)
107: proggy_LDADD = $(libnet_LIBS)
108:
109:
110: Origin & References
111: -------------------
112:
113: Libnet is widely used, but had been unmaintained for a long time and its
114: author unreachable. This version was forked from the 1.1.3 release
115: candidate from [packetfactory.net][origin], bug fixed, developed, and
116: re-released.
117:
118: Use GitHub issues and pull request feature for questions and patches:
119:
120: http://github.com/libnet/libnet
121:
122: Some old docs are available at:
123:
124: http://packetfactory.openwall.net/projects/libnet/index.html
125:
126: -------------------------------------------------------------------------
127: - v1.1 (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com>
128: http://www.packetfactory.net/libnet
129: - v1.1.3 and later (c) 2009 - 2013 Sam Roberts <vieuxtech@gmail.com>
130: http://github.com/libnet/libnet
131: -------------------------------------------------------------------------
132:
133: [latest release]: https://github.com/libnet/libnet/releases
134: [autotools]: https://autotools.io/
135: [origin]: http://packetfactory.openwall.net/projects/libnet/
136: [Appveyor]: https://ci.appveyor.com/project/troglobit/libnet
137: [Appveyor Status]: https://ci.appveyor.com/api/projects/status/fkw05hw8cysfl2p1?svg=true
138: [Travis]: https://travis-ci.org/libnet/libnet
139: [Travis Status]: https://travis-ci.org/libnet/libnet.png?branch=master
140: [CodeDocs]: https://codedocs.xyz/libnet/libnet/
141: [CodeDocs Status]: https://codedocs.xyz/libnet/libnet.svg
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>