netsniff-ng: Move function scope variables

Move some variables from the function scipe to the block where they're
used solely.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
ring: Merge common ring_{rx,tx} initialization into own function

Instead of having to perform the individual steps to initialize a ring
and open coding them in multiple places, provide convenience functions
to do all at once. This has the nice side effect of allowing to make
most of these *_{rx,tx}_ring() functions static in their respective
module.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
bpf: Zero out socket filter in bpf_parse_rules()

Instead of memsetting the struct sock_filter every time before we call
bpf_parse_rules(), do it there directly.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Merge remote-tracking branch 'upstream/master'