teredo: update protocol decoding.

This patch fixes an error in pointer arythmetic and add some
comments to increase maintanability of the code. It also
simplify the decoding code as a careful RFC reading indicate
that if we discard packet containing an authentication field,
it is only possible to have a single origin indication field.
Add separate libhtp query string normalization function and configuration toggles for it.
Use new libhtp query string normalization. Bug #739.
pcap: set snaplen to MTU if available.

Main objective of this patch is to use a dynamic snaplen to avoid
to truncate packet at the currently fixed snaplen.

It set snaplen to MTU length if the MTU can be retrieved. If not, it
does not set the snaplen which results in using a 65535 snaplen.

libpcap is trying to use mmaped capture and setup the ring by using buffer_size
as the total memory. It also use "rounded" snaplen as frame size. So if we set
snaplen to MTU when available we are optimal regarding the building of the ring.
pcap: add 'promisc' YAML configuration variable

This patch adds a promisc variable to pcap configuration. It is
used to decided if interface is switched to promiscuous mode.
log-pcap: don't limit snaplen.
pfring: delete unused define.
pcap: add snaplen YAML variable

This patch introduces 'snaplen' a new YAML variable in the pcap section.
It can be set per-interface to force pcap capture snaplen. If not set
it defaults to interface MTU if MTU can be known via a ioctl call and to
full capture if not.
fix(more like a feature update) for bug #708.

Add support for flowint based sig ordering.
Added host buffer allowance and stream configuration for Napatech 3GD

Added a napatech section in the yaml configuration.
	hba - host buffer allowance
	use-all-streams - whether all streams should be used
	streams - list of stream numbers to use when use-all-streams is no

The source-napatech.* files were modified to support the host buffer allowance configuration.
The runmode-napatech.c file was modified to support both the host buffer allowance configuration and stream configuration

Signed-off-by: Matt Keeler <mk@npulsetech.com>
Add support for a new keyword to inspect http_host header.

The corresponding content keyword would now be - http_host.
The corresponding pcre modifier would be W.
Add support for the new keyword - http_raw_host header.

The corresponding pcre modifier would be 'Z'.
code cleanup + unittests added against http_host and http_raw_host keywords,
against various combinations of hostname in uri and host header.
configure: update htp version dependancy
Workaround function missing in libhtp include

As reported in bug #688, htp_config_set_path_decode_u_encoding
function is not included in libhtp header before 0.3.0. Result
is that suricata compilation fail with an external htp library.
The following patch detect the issue and adds the missing
declaration.
Fix build with old pcap library.

Pcap snaplen related modification broke compilation of Suricata for
system having old pcap library. This patch fixes the issue and allow
old pcap library to honour the snaplen value.
sigorder cleaned up.
cocci test: add sizeof test

This patch adds a new semantic patch taken from
http://coccinellery.org/. This patch tests if a sizeof take size
of pointer and not of pointed value.
cuda: fix invalid use of sizeof
unix socket: implement command-list command