bpfc: also allow to load skb len into X

This functionality is available in the kernel, so make it also
available for use in bpfc.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
mausezahn: man: fixed typo and minor sentence edits

That's a first part of the manpage edit for now.

Signed-off-by: Jon Schipp <jonschipp@gmail.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
ifpps: Don't re-initialize stats value index counter in CSV mode

In case we add new stats values, j might be higher already when entering
the loop. As j will have the proper number anyway, there is no point in
re-initializing.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
ifpps: Don't diff tx_bytes twice

It's sufficient to calculate the difference of tx_bytes only once.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
ifpps: Don't calculate diff for stats values not used for relative values

These stats values are not reported anywhere in relative terms, so it
makes no sense to calculate the difference for them.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
ifpps: Report more detailed memory stats and number of total processes

Instead of just giving the percentage of memory usage, report the total,
used, active and inactive memory values. Also report total, free and
cached for swap.

Instead of reporting the memory in the 'sys' line add two new lines for
these reports and use the free space to report the total number of
processes.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
man: ifpps: Reword a few sentences or make them shorter

Fix some minor nits in the description part and remove a superfluous
comma in the description of option -d/--dev.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
ifpps: Rename cpu number parameter to stats_top()

This is not the top number of CPUs but the total number. Rename the
variable to not confuse this.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
ifpps: minor: fix ncurses alignment

Since we've added '+'/'-' for max/min CPU values, we also need to shift
once whitespace to the left to properly align ncurses display again.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
ifpps: Remove unused 'forks' member from struct ifstat

We never use or report it anywhere, so remove it.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
taia: minor: small cleanup and comment

Put a comment there explaining why we randomize atto.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
oui: Make parsing of oui.conf more robust

In the unlikely case of the oui.conf file not conforming to the required
format (e.g. by the user supplying one by himself), we would end up -
in the worst case dereferencing a null pointer, if the condiition
(ptr = strstr(buff, ", ")) is false. Thus make the entire parsing a bit
more robust and just ignore lines not following the required format.

The null pointer dereference was found by the Coverity scanner.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
taia: minor: add comment about window

Add a small comment about the 700ms.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
irq: do not process non-existant irq number of lo

Prevent IRQ affinity restore of lo device, since we do not collect it
and since it doesn't have a IRQ number. This fixes a warning on trafgen
and netsniff-ng when exiting.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
curve: move selftest to own file

Move the curve selftest to its own file.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
keypair: do selftest before generating and verifying keypair

Be paraniod and make a selftest.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
man: improvements to language for astraceroute.8

Signed-off-by: Stephen Wadeley <swadeley@redhat.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
man: improvements to astraceroute.8, inconsistent use of and ''

Signed-off-by: Stephen Wadeley <swadeley@redhat.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
man: astraceroute: minor: remove two trailing whitespaces

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
stun: memset saddr before binding

We need to zero out data before we actually do the bind, otherwise
uninitialized crap can be in saddr.

Found by coverty scanner.

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