Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to tell if an IP address belongs to a host?

Reply
Thread Tools Display Modes

How to tell if an IP address belongs to a host?

 
 
Rennie deGraaf
Guest
Posts: n/a

 
      11-27-2004, 08:44 AM
From within a C program, what is the best way to determine if a
particular IP address belongs to the host the program is running on?
The host may be a router, so it can have an arbitrary number of
interfaces and IP addresses, and it might not use DNS. The program runs
as root, so I can use weird low-level kernel interfaces if necessary.

If possible, I need this to work on both Linux 2.4 and Linux 2.6, but
other systems aren't important at the momment.

Rennie
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculate if an IP belongs to a subnet Sashi Linux Networking 4 04-16-2007 11:22 AM
One host taking over the IP address of another noone Linux Networking 1 11-19-2004 09:04 AM
ICS Host Address Geoff Lane Windows Networking 5 10-02-2003 10:32 PM
ICS Host Address Geoff Lane Home Networking 1 10-02-2003 11:05 AM
ICS Host Address Geoff Lane Linux Networking 2 10-02-2003 10:49 AM



1 2 3 4 5 6 7 8 9 10 11