I wrote a C function for one of my projects in order to compare an IP
address to a CIDR-style net specification (e.g. 66.54.64.0/19). Thought I'd
post the code here, in case anyone needs it.
It's in the form of a small utility that can be used as a stream filter,
for extracting IPs from a list that match a CIDR specification.
http://www.pc-tools.net/beta/cidr/cidr.c
Cheers,
--
Jem Berkes
http://www.sysdesign.ca/