misc: move file to source root

Only have Makefile specific folders in the project root where the
binaries are stored, the rest should be part of the repository root.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
oui: minor: rename update file

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
make: rename trafgen stddef.h file

Rename it to not confuse the build with header inclusions.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
bpf_comp: minor: fix linebreak

Add a newline after this long one. Also, after opening braces there
should be no newline.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
man: start man page of astraceroute

Here's at least a start that needs some more details to be filled
out during the next week.

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

Finish writing up the remaining section of the astraceroute man
page.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
docs: install: mention recommended tools

Mention pkg-config and gpg as optional tools for verifying tags resp.
getting build flags. If they are not wanted / present, then relative
Makefiles need to be edited by hand.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
make: force to overwrite symlink

When doing to successive ``make install'' ln will throw an error
that the symlink already exist, so simply force it to overwrite.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
pcap: let netsniff-ng also record pkt timestamp source

With commit [1] in the kernel, we can also store the timestamp
source in the pcap packet header for later analysis. We do this
by splitting the netsniff-ng's u32 ifindex into u16 tsource and
u16 ifindex. Older kernel do not support the timestamp source in
PF_PACKET, so it will stay 0 and is compatible with older
netsniff-ng binaries.

  [1] http://thread.gmane.org/gmane.linux.network/266878/

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
man: add description about different pcap formats

Add a more detailled description of netsniff-ng's -D option into
the man-page.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
pcap_io: minor: fix some quirks

We can just replace int with uin32_t, that's no problem. Also
fix one case where we moved to uint16_t.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
trafgen: lexer: also allow short forms for hex and binary

Also allow for ...

 - hex:		0xff, xff
 - binary:	0b11110000, b11110000

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
man: trafgen: update documentation for hex, bin forms

Also update examples for the man-page.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
docs: minor: fix mentioning of Documentation/

The Documentation/ folder no longer exists. Either everything important
can be found in the man pages or other documentation files. Fix the
mentioning of Documentation/.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
make: allow to overwrite CFLAGS, CCACHE

Allow to define custom compile flags, e.g. ...

  make CFLAGS="-O2 -Wall"

... and also allow to overwrite ccache variable:

  make CCACHE= all

Also do some minor fixes when built with -O2 -Wall.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
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>