process.c: usleep random delay unicast only

The unicast only mode wasn't waiting the random delay.  This adds
the wait as a usleep.  I don't particularly like usleeping in code
that could otherwise be doing something else, but this is the simplest
way to conform to the spec regarding random delay.
process.c: no usleep

usleep was reported as a security issue.  I don't like usleeping in
a network process for other reasons.  This commit removes the usleep
making the UnicastOnly radvd option non-rfc complient.  To really
fix the issue, a queue of ra send requests is needed.
better check for sysctl() availability

As it was mentioned before some Linux ports are dropping sysctl support.
This is intentional move and in future versions of Linux kernel this system
call will eventually go away. As a good alternative one may and should use
procfs (/proc/sys).

Currently we chech if corresponding header "sys/sysctl.h" exists.
But the problem happens if libc in use still installs "sys/sysctl.h" header
while provides no implementation for it.

This is exactly the case with uClibc and probably other implementations of libc.
But if we check for existing "sysctl" symbol in libc we're golden at least in
compile-time because libc provides some stub at least.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
radvd.8.man: remove not regarding sysctl

The man page notes that radvd will not start if forwarding is not
enabled.  This hasn't been true for a while, so it's time to remove
the note.
Merge pull request #37 from abrodkin/master

better check for sysctl() availability
test/check.c: fix --mode arg
Merge remote-tracking branch 'origin/master'
Revert "better check for sysctl() availability"

This reverts commit 2b09fdf64a5f4eb1db940c21fa65c016176a1f79.
gram.y: add search_prefix_list function

This function searches the prefix list for an existing prefix.  It's
use to prevent the same prefix from being added to the list more than
once.
move search_prefix_list from gram.y to interface.c

search_prefix_list will need to be called from netlink.c when an
interfaces gets a new address.  The goal is to prevent duplicate
prefixes in the interface list.
interface.c: split out free_prefix_list

The prefix list from the interface is going to be used to generate
a new list of prefixes to send in an advert.  As such, it makes
since to reuse a common free_prefix_list function to clean up both
the iface->prefix list and the prefix list generated in send.c.
send.c: add build_prefix_list function

This function is currently only coping the prefix list, but is soon
going to be taking over the auto-prefix "::/64" code in gram.y.
gram.y: remove prefix/autoselect code

This code doesn't belong in the config file parse.  It should be
much simpler to configure auto-selected prefixes outside of a parser.
gram.y: add todo comment on linked list
gram.y: move if6to4 code to send.c
gram.y: move if6 code to send.c
gram.y: move get_prefix6 to send.c
gram.y: move ::/64 auto-prefix code to send.c
gram.y: move helper functions to send.c

also sort prototypes in send.c
gram.y: cleanup/indent code