-   Programming (
-   -   Multiple addresses for a single NIC (

grub 07-15-2003 07:50 AM

Multiple addresses for a single NIC
I am having one network card, which is aliased for 4 different ip addresses.
How can I get the details of all the ip addressess using my C program.

Presently for eth0 if I do a ioctl, it returns one ipaddress. How to get the details about other ip address.


shishir 08-04-2003 02:24 AM

try using ioctl with SIOCGICONF....flag and get the information of the interface in the structure ..struct ifreq ..

open a socket and pass the fd to ioctl...with the aformentioned flag ..should work

All times are GMT -5. The time now is 07:21 AM.