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

This is a discussion on How to tell if an IP address belongs to a host? within the Linux Networking forums, part of the Linux Forums category; From within a C program, what is the best way to determine if a particular IP address belongs to the ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-27-2004
Rennie deGraaf
 
Posts: n/a
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
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

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



All times are GMT +1. The time now is 07:20 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0