configure: minor: Rephrase and reformat some messages

Make sure all messages use a max. text width of 70 characters (in order
for them to be easily pasteable into an email), remove a trailing
whitespace and reword some bits.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
build: minor: Mention proper versioned tag in release announcement

The tags created by the 'release' target have a 'v' prefix, so add it to
the verification command mentioned in the generated release message.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
ring_{rx,tx}: verbose: output version and v3 specific info

Kevin says:

  With netsniff-ng 0.5.8-rc2+, when I run the below packet capture
  session, the output seems to imply that 64K of memory is being
  allocated per frame, which does not look like what I want since my
  interface MTU is only 1500.  This appears to be severely limiting
  the number of frames I can fit into my packet capture ring.

As TPACKET_V3 is used in capturing to pcap files, frames are written
continuously to the ring, thus the above will give a wrong impression
to the user. Therefore, output such information in verbose mode
differently when TPACKET_V3 is being used, as it works block-wise.

Reported-by: Kevin Branch <branchnetconsulting@gmail.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
netsniff-ng 0.5.8-rc3

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
build: announcement: also add v prefix to checkout command

We also need to add a v prefix for the version tag to the checkout
command, as similarly done for the GPG verification.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
oui-update: minor: Fix typo in error message

s/Eror/Error/

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
conf: oui: update oui.conf

Update OUI entries using oui-update.py

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
ifpps: Use unsigned int to store number of cpus

The number of CPUs can never be negative and get_number_cpus() returns
unsigned int too, so consistently conver all variables holding a CPU
number or number of CPUs to type unsigned int.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
ifpps: Don't bug out if interface went down

In case the interface ifpps is running on went down, ifpps bugged out
because the stats didn't look plausible anymore, due to the IRQ count
being reset:

ifpps: ifpps.c:563: stats_diff: Assertion `!((new->irqs[i] - old->irqs[i]) > (new->irqs[i]))' failed

Fix this by setting the difference to 0 in this case. ifpps will thus
display a irqs/t value of 0 instead of bugging out.

This fixes #74.

Reported-by: Jon Schipp <jonschipp@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
ifpps: Skip reading IRQ number from /proc/interrupts

We don't use the IRQ number we read from /proc/interrupts, so just skip
it while reading. This also allows us to drop the irq_nr member from
struct ifstat.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
netsniff-ng: Simplify dump file creation logic

Instead of using goto, just check stats if stat() returned 0 and used
ctx->dump_dir afterwards. This makes the logic a bit easier to follow.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
man: netsniff-ng: add note about netsniff

Add a note to the man-page that there's a other tool that is unrelated
to netsniff-ng.

Signed-off-by: Jon Schipp <jonschipp@gmail.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
netsniff-ng: Remove unnecessary fmemset() of struct stat

The struct stat is filled by the call to stat(2) in the next line, so
there is no need to explicitely set it to 0 before.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Revamped