html: minor thx in faq
[netsniff-ng.git] / INSTALL
blob3f3ff6f1f03fd84ef0caa5248ddfa2c539a7dc1d
1 Currently only operating systems running on Linux kernels with
2 CONFIG_PACKET_MMAP enabled. This feature can be found even back to the days of
3 2.4 kernels. Most operating systems ship pre-compiled kernels that have this
4 config option enabled and even the latest kernel versions got rid of this
5 option and have this functionality already built-in. However, we recommend a
6 kernel >= 2.6.31, because the TX_RING is officially integrated since then.
8 netsniff-ng has been successfully tested on x86 and x86_64. Please drop
9 us a short mail, if it runs successfully on hardware other than that.
11 What libraries / tools are required?
13  - glibc (all)
14  - cmake (all)
15  - libpthread (curvetun, netsniff-ng, flowtop)
16  - libncurses (ifpps, flowtop)
17  - libGeoIP and its database (ashunt, flowtop)
18  - flex, bison (bpfc, trafgen)
19  - ntpd [or equivalent] (curvetun)
20  - libnacl (curvetun)
21  - libnetfilter-conntrack (flowtop)
22  - liburcu (flowtop)
23  - libcli (trafgen)
24  - libnl (netsniff-ng, trafgen)
26 It is common, that these libraries are shipped as distribution packages
27 for an easy installation. We try to keep this as minimal as possible.
29 For downloading the latest GeoIP database, you can use the script that
30 is located at scripts/geoip-database-update.
32 The installation process done by cmake is fairly simple:
34   $ cd netsniff-ng/src/
35   $ mkdir build
36   $ cd build
37   $ cmake ..
38   $ make
39   # make install
41 Man pages are generated out of the corresponding source files by cmake.
42 They are written in POD format as a C header comment within those files.
43 For this, you need the tool pod2man which is distributed with Perl and
44 should therefore be available on most systems.
46 To uninstall, simply remove all files refered in install_manifest.txt
48 For bpfc, we also have a Vim syntax highlighting file. Have a look at
49 scripts/bpf.vim for installation instructions.
51 In order to build curvetun, libnacl must be built first. A helper script
52 called build_nacl.sh is there to facilitate this process. If you want to
53 build NaCl in the directory ~/nacl, the script should be called this way:
55   $ cd src/curvetun
56   $ ./build_nacl.sh ~/nacl
58 This gives an initial output such as "Building NaCl for arch amd64 on host
59 fuuubar (grab a coffee, this takes a while) ...". If the automatically
60 detected architecture (such as amd64) is not the one you intend to compile
61 for, then edit the (cc="gcc") variable within the build_nacl.sh script to
62 your cross compiler.
64 If NaCl already has been built on the target, it is quicker to use nacl_path.sh
65 this way:
67   $ cd src/curvetun
68   $ ./nacl_path.sh ~/nacl/build/include/x86 ~/nacl/build/lib/x86
70 When done, netsniff-ng build infrastructure will read nacl_path.cmake to get
71 the needed paths to NaCl.
73 For using TUN/TAP devices as a user, e.g. create a file called
74 src/50-tuntap.rules in /etc/udev/rules.d/ with:
75 KERNEL=="tun", NAME="net/%k", GROUP="netdev", MODE="0660", OPTIONS+="ignore_remove"
76  and restart the udev daemon. Add yourself to the "netdev" group.
78 NOTES
80 If you are a package distribution maintainer, have a look at the patch set under
81 contrib/patches which makes packaging a little easier for you.
83 The following warnings can be seen when compiling bpfc with flex 2.5.35 and
84 bison 2.4.1:
85  - redundant redeclaration of ‘isatty’
86  - cannot optimize loop, the loop counter may overflow
88 Those two warnings occur on generated C code produced by flex and bison
89 and there is no possibility on our side to fix them.
91 Similar to that, gcc will throw a warning on strchr(3) which is a false
92 positive (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36513) from glibc:
93  - warning: logical ‘&&’ with non-zero constant will always evaluate as true