If you have clearly defined address range in terms of subnet mask, then you can easily check if
if ip-addr & subnet-mask == subnet-addr ip-addr belongs to the network else ip-addr does not belong to the network
All ip-addr, subnet-mask and subnet-addr have to be defined in hex.
Amitay.
On Thu, 2004-07-08 at 15:55, praveen shinde wrote:
Hello friends,
I have to check, in a C program (under linux),whether an ip address belongs to a particular range of addresses.
Is there any function or library in C to do so.
Thanks in advance, Praveen Shinde.
__________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail
Amitay.