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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|