misc: Ignore files generated by cscope/ctags

Add the index files generated by cscope and ctags to .gitignore.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
mac802.11: only wait for nl ack if unfinished

Jon reported that the setup via netlink of a raw 802.11 mon
device fails with:

  root~/gencfg# trafgen --in beacon.cfg --rfraw --out wlan0
  Waiting for netlink ack failed!

Let us only wait for it, if really needed.

Reported-by: Jon Schipp <jonschipp@gmail.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
trafgen: Remove unnecessary reinitialization of icmp packet

The entire packet is zeroed using memset() three lines above, thus there
is no need to set icmp->code and icmp->checksum to 0 explicitely again.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
tprintf: Rename parameter to avoid shadowing global declaration

The tprintf module already uses a static variable named 'buffer', thus
rename the parameter to avoid a name clash. Found by compiling with
-Wshadow.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
mausezahn: do not show version in prompt

Do not show the old mausezahn version in the prompt, since
we use a different versioning scheme.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
man: mausezahn: add howto for interactive mode

It is quite useful to have an initial walkthrough for the interactive
mode documented, so add a first version of this [1] into the man page.

  [1] original here: http://pub.netsniff-ng.org/docs/Mausezahn

Formatting still needs to be fixed up in follow-up commits.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
man: mausezahn: minor updates all over

This patch escapes all '\' chars so that they get recognized. Also,
we add a short note at the end of the NOTE section to point to the
netsniff-ng(8) man page regarding tuning hints.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
man: curvetun: add option and usage example section

This patch implements the option and usage examples of curvetun.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
man: curvetun: finish up initial draft of curvetun

Initial draft of curvetun manpage. Follow-up commits may come to fix
formating errors and the like.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
curvetun: use free instead of xfree

Only use xfree where it makes sense, here not really.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
docs: minor: Add missing word 'it'

Signed-off-by: Jon Schipp <jonschipp@gmail.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
man: netsniff-ng: edits to the netsniff-ng man page

Various edits all over.

Signed-off-by: Jon Schipp <jonschipp@gmail.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
docs: minor: say it's staging area, not a branch

The extra branch is history for a while now, it's an internal staging
area instead.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
man: astraceroute: minor edits all over

Some minor edits all over the place.

Signed-off-by: Jon Schipp <jonschipp@gmail.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
bpfc: allow bpf programs to be passed to cpp

This patch allows bpf programs to be passed to the C preprocessor
before handing over to bpfc. Example:

  #define ETH_P_IP        0x800

  ldh [12]
  jne #ETH_P_IP, drop
  ldb [23]
  jneq #6, drop
  ldh [20]
  jset #0x1fff, drop
  ldxb 4 * ([14] & 0xf)
  ldh [x + 14]
  jeq #0x16, pass
  ldh [x + 16]
  jne #0x16, drop
  pass: ret #-1
  drop: ret #0

Compile with: bpfc -i foo -p

Suggested-by: John Lange <JLange@trendium.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
bpfc: minor: do a line-break before 80-column

Just a minor cosmetic fix.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
make: include build name

Include long version string into tools when called with --version.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
man: trafgen: corrections and various edits to manual page

Signed-off-by: Jon Schipp <jonschipp@gmail.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
misc: fix some minor compile warnings all over

Some regarding unused parameter, some regarding signed/unsigned
comparison.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
make: minor update in cflags

Add -z relro for linking, move --param ssp-buffer-size=4 to stack
protector flag, and more.

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