configure.sh: support cross compilation with sysroot

SYSROOT points to the path where libs and headers are to be searched
from.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
log: Add BUG_ON helper

We will use it in sockets creating routine.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
net: protocols -- Use ARRAY_SIZE helper

We're looking up over @protocols array so use appropriate
helper here instead of TRINITY_PF_MAX constant.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
net: protocols -- Add lookup_proto helper

We will use it for parsing disabled sockets families as well.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
net: protocols -- Move protocol function declarations to protocols.h

This allows to isolate functions and include the header only where needed.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
params: Add --no_proto|-E option

This option will track the socket families which user
prefer to exclude from testing, for example PF_PACKET
sockets and such.

Note I've had to include net.h in two files only because
TRINITY_PF_MAX is declared there. Maybe it worth to move
this constant to constants.h.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
net: sockets -- Don't generate sockets with disabled protocol families

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>