CIDR: integration of fresh code from libcidr. Now supports IPv6.

Signed-off-by: Philippe DENIEL <philippe.deniel@cea.fr>