Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

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

Reply
 
Thread Tools Display Modes
  #1  
Old 11-27-2004, 09:44 AM
Default How to tell if an IP address belongs to a host?



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


Rennie deGraaf
Reply With Quote
Reply

Tags
address, belongs, host

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
Forum Jump


All times are GMT. The time now is 02:14 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.