dissector: ip_authentication_hdr: Remove trailing whitespaces

Remove two trailing whitespaces on emtpy lines.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
dissector: ip_ipv6_mobility_hdr: NULL check before dereference

Check return value of pkt_pull before dereferencing it. This was
discovered by the coverity scanner.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
flowtop: Use size of destination buffer in memcpy

The coverity scanner found the macro used as argument to sizeof
suspicious. Use sizeof the destination buffer instead.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
dissector: lldp: NULL check before dereference

Check return value of pkt_pull before dereferencing it (even though we
check the packet length before and pkt_pull _should_ never return NULL).
This was discovered by the coverity scanner.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
geoip: Don't leak file/socket descriptor in error case

In certain error cases, the file/socket descriptors are not closed
in geoip_get_database(). This was discovered by the coverity scanner.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
xmalloc: Make xfree a two part macro/inline

This way the coverity scanner will no longer complain about dereference
before NULL checks right before xfree().

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
dissector: igmp: Fix erroneous null pointer check

We need to break if we get NULL from pkt_pull() but the actual check was
inverted. This was discovered by the coverity scanner.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
xutils: Make set_nonblocking() void

The return values is always 0 and it is never checked anyhow, so make
the function void.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
vim: add bpf syntax highlighting file

This is a revised, simple syntax highlighting file for the bpf language.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
trafgen: lexer: return original string if no shellcode

When do not detect any shellcode, make sure we return the original
string only.

Reported-by: Jon Schipp <jonschipp@gmail.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
ring: break out timestamping since not directly related

Break out the timestamping part of the ring.h file, since it's not
directly related to the {t,r}x_ring. Also inlining doesn't make
sense here.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
zsh: add netsniff-ng zsh auto completion support

Hideo Hattori wrote a set of auto completion scripts for zsh that
support netsniff-ng tools. Big thanks for that! Follow-up commits
still need to address updated command-line options.

Signed-off-by: Hideo Hattori <hhatto.jp@gmail.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
staging: add mausezahn staging directory

After some back and forth, we decided that it is easier to maintain
mausezahn in a staging directory until it is fully reworked and
cleaned up to be ready to be fully integrated. This way, it is better
than having it in a separate branch, and we can also accept patches
from outside more easily. Also, while at it, fix up some function
mismatches with libcli.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
docs: update install document to current repo status

mausezahn dependencies and build options were not yet documented.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
man: minor fixups in flowtop's man page

Some fixups in flowtop's man page.

Signed-off-by: Jon Schipp <jonschipp@gmail.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
build: remove some unused stuff and clean up a bit

Remove some variables that are unused, but set. Also reorder and
comment some other sections.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
docs: add note about zsh and vim files

At least mention their existance in the INSTALL file.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
build: install man pages

Now that we have some man-pages, let them be installed via normal
``make install'' call.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
man: add mausezahn man-page

Add the mausezahn man-page that is modified on top of the original
man-page by Herbert Haas.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>