netsniff-ng toolkit


netsniff-ng is a free Linux networking toolkit, a Swiss army knife for your daily Linux network plumbing if you will.

Its gain of performance is reached by zero-copy mechanisms, so that on packet reception and transmission the kernel does not need to copy packets from kernel space to user space and vice versa.

Our toolkit can be used for network development and analysis, debugging, auditing or network reconnaissance.

The netsniff-ng toolkit consists of the following utilities:

Get it via Git:   git clone git://

Note (*): We took over further maintenance and development of mausezahn.

Download and Release Notes

In general, the latest Git development version from our repository can be used as it is considered as quite stable and includes new features.

From time to time we also do stable snapshots from our Git tree and announce it on our mailing list. The current stable release is netsniff-ng-0.5.8.

It can be downloaded from our public directory, from the mirror at, or via Git:

  git clone git://
  cd netsniff-ng
  git checkout v0.5.8

Older releases can also be found in our public directory (mirror) and we also have a source code cross referencer for netsniff-ng's Git tree.

netsniff-ng is open source and released under the GPL version 2.0.

Changelog for v0.5.8-rc5 -> v0.5.8

Tobias Klauser (30):
      trafgen: Don't modify optarg/argv
      build: Use new git repo URL in release announcement message template
      netsniff-ng: Exit gracefully for all possible termination signals
      trafgen: Exit gracefully for all possible termination signals
      astraceroute: Exit gracefully for all possible termination signals
      flowtop: Exit gracefully for all possible termination signals
      ifpps: Exit gracefully for all possible termination signals
      build: Set SHELL make variable to bash if possible
      ring: Get rid of unnecessary wrapper for get_sockopt_tpacket
      dissectors: Get rid of unecessary includes of protos.h
      conf: oui: update oui.conf
      ifpps: Reorder buffer allocation and file opening in stats_proc_interrupts
      dissectors: ethernet: Handle multicast/broadcast addresses properly
      docs: install: Fix a minor typo
      pcap_io: Only check byteswapped linktype if pcap magic is swapped
      astraceroute.zsh: Remove duplicate entry
      zsh: Unify completion help messages for --version and --help
      conf: oui: update oui.conf
      dissector: Get rid of header dependency on pcap_io.h
      man: astraceroute: Fix closing quotation mark
      built_in: Remove unnecessary #include <built_in.h> from several headers
      bpf: Remove unncessary #include <xmalloc.h> from bpf.h
      conf: Use configuration file path from Makefile instead of hardcoded paths
      doc: AUTHORS: Add Oliver Smith to contributors
      ifpps: Fix coding style
      build: Make sure we get the correct previous tag for the changelog
      conf: oui: update oui.conf
      build: Also use proper previous tag for people list
      netsniff-ng: Remove locally declared labels
      netsniff-ng 0.5.8

Christian Wiese (12):
      link: fixed to include <sys/types.h> for caddr_t
      build: add DESTDIR support
      built_in: improved to define DEFFILEMODE if not provided by the libc
      poll: changed to include  instead of 
      doc: add documentation of DESTDIR usage in INSTALL and make help
      doc: fix make help for CROSS_COMPILE option
      built_in: changed to not unconditionally define PAGE_SIZE
      build: curvetun: add NACL_LIB variable to configure to be able to set an alternative lib
      doc: curvetun: add documentation how to use libsodium instead of libnacl
      build: fixed PREFIX usage
      built_in: changed to use RUNTIME_PAGE_SIZE instead of PAGE_SIZE
      built_in: changed RUNTIME_PAGE_SIZE to use sysconf(_SC_PAGE_SIZE) instead of getpagesize()

Daniel Borkmann (7):
      docs: update credits for former maintainership
      trafgen: remove timer-based trigger model
      trafgen: keep a small initial ring buffer size to reduce cache-misses
      pcap_io: fill sll when reading pcap
      dissector: display packet direction for tap'ing on netlink devices (nlmon)
      docs: be more precise on readme with experimental tools
      doc: add Christian to AUTHORS file

Jesper Dangaard Brouer (3):
      build: fix syntax error when detecting SHELL make variable
      ifpps: fix matching wrong interface/device
      trafgen: performance regression at 10G due to smaller ring buffer size

Kartik Mistry (2):
      man: manpage warning fixes
      Typo: longitude

Release Notes

All release notes can be found on github.


netsniff-ng is a fast network analyzer based on packet mmap(2) mechanisms. It can record pcap files to disc, replay them and also do an offline and online analysis. Capturing, analysis or replay of raw 802.11 frames are supported as well. pcap files are also compatible with tcpdump or Wireshark traces. netsniff-ng processes those pcap traces either in scatter-gather I/O or by mmap(2) I/O.

trafgen is a multi-threaded network traffic generator based on packet mmap(2) mechanisms. It has its own flexible, macro-based low-level packet configuration language. Injection of raw 802.11 frames are supported as well. trafgen has a significantly higher speed than mausezahn and comes very close to pktgen, but runs from user space. pcap traces can also be converted into a trafgen packet configuration.

mausezahn is a high-level packet generator that can run on a hardware-software appliance and comes with a Cisco-like CLI. It can craft nearly every possible or impossible packet. Thus, it can be used, for example, to test network behaviour under strange circumstances (stress test, malformed packets) or to test hardware-software appliances for several kind of attacks.

bpfc is a Berkeley Packet Filter (BPF) compiler that understands the original BPF language developed by McCanne and Jacobson. It accepts BPF mnemonics and converts them into kernel/netsniff-ng readable BPF ``opcodes''. It also supports undocumented Linux filter extensions. This can especially be useful for more complicated filters, that high-level filters fail to support.

ifpps is a tool which periodically provides top-like networking and system statistics from the Linux kernel. It gathers statistical data directly from procfs files and does not apply any user space traffic monitoring that would falsify statistics on high packet rates. For wireless, data about link connectivity is provided as well.

flowtop is a top-like connection tracking tool that can run on an end host or router. It is able to present TCP or UDP flows that have been collected by the kernel's netfilter framework. GeoIP and TCP state machine information is displayed. Also, on end hosts flowtop can show PIDs and application names that flows relate to. No user space traffic monitoring is done, thus all data is gathered by the kernel.

curvetun is a lightweight, high-speed ECDH multiuser tunnel for Linux. curvetun uses the Linux TUN/TAP interface and supports {IPv4,IPv6} over {IPv4,IPv6} with UDP or TCP as carrier protocols. Packets are encrypted end-to-end by a symmetric stream cipher (Salsa20) and authenticated by a MAC (Poly1305), where keys have previously been computed with the ECDH key agreement protocol (Curve25519).

astraceroute is an autonomous system (AS) trace route utility. Unlike traceroute or tcptraceroute, it not only display hops, but also their AS information they belong to as well as GeoIP information and other interesting things. On default, it uses a TCP probe packet and falls back to ICMP probes in case no ICMP answer has been received.

Concluding, the toolkit is split into small, useful utilities that are or are not necessarily related to each other. Each program for itself fills a gap as a helper in your daily network debugging, development or audit.

Mailing List

Please post questions and patches to the netsniff-ng mailing list (gmane interface).


The best way to get a good overview of what it is all about and how the tools work is to look into the individual man pages of the toolkit, found in the source code repository. This covers everything you need to know.

If you start each tool with ``--help'', minimal usage examples are provided, too. We also have a frequently asked question page. Moreover, see the Wikipedia article people wrote about netsniff-ng. If all of this is not enough, you can write your question to, or google for it on third party sites or blogs.

Various conference slides from netsniff-ng talks can be found here:


2012: netsniff-ng toolkit partially covered in books:

To dig into the inner workings of the Berkeley Packet Filter architecture, have a look at this. Documentation about the ``packet_mmap'' architecture with ``pf_packet'' sockets for the Linux kernel can be downloaded from under packet_mmap.txt.


Source control

There's a public Git repository at github where you can check out the entire code base. For tamper resistant downloading, clone the Git repository and checkout the corresponding version tag. It can be verified with GPG.


The Git repository of the toolkit is maintained by Tobias Klauser and Daniel Borkmann.


Especially for testing netsniff-ng's protocol dissectors, we have a public archive maintained by Markus Amend with a lot of example pcap files for raw 802.11 frames, VLAN, ICMP, IPv6, MPLS and many other protocols. There's also a dissector fuzzing script in the source repository to test broken or half-broken pcap files. Some usage examples for testing can also be found here.


There is a netsniff-ng frequently asked question site and for participating in development have a look at the documentation and man-page files within the source code. Here is also a FAQ about the GNU GPL version 2, under which netsniff-ng is licensed. For reporting bugs please use our bug tracking system or preferably write an e-mail to our mailing list.


Currently, netsniff-ng is only available for Linux platforms. If you have a port for *BSD, let us know for merging your port into the main source tree. However, please do not port netsniff-ng to Windows or other proprietary junk software! Here is a nice explanation why; we share Felix von Leitner's point of view.

If you think this software is great, then please consider to contribute in one of the following ways:


A mailing list for netsniff-ng moderated, spam free user discussions is open to the public. Simply mail to

There's also an archive at gmane and a searchable archive. We usually track (and then fix) bugs through our mailing list. But we also accept bug reports through our bug tracker.

Before posting questions, have a look at our FAQ.

Git Tree

The netsniff-ng project is always looking for community members interested in contributing. For versioning control, we use Git.

The patch submission process is similar to the one of the Linux kernel. So please respect the kernel's coding guidelines and patch submission procedure.

Send your patches e.g. with git-send-email(1) to or to Tobias and Daniel directly with ``[PATCH]'' as a subject prefix for further review and inclusion.



netsniff-ng is free software and provided in the hope that it is found useful for your daily network plumbing. Suggestions for new features or patch contributions are very welcome and appreciated, drop us a short mail.