redjack/libcork — pull request #3 by johnzachary (2012-03-04 14:02:57+00:00)
Title: Enhanced CIDR block error checking for IPv4

This pull-request includes three new functions in libcork:

1. cork_ip_is_valid_network(), which is a wrapper for next two functions

2. cork_ipv4_is_valid_network() checks that an IPv4 address and CIDR block are properly bit aligned. It also checks that a CIDR block is <= 32.

3. cork_ipv6_is_valid_network() only checks that the CIDR block is <= 128. *The bit alignment has not yet been implemented.*