: The ioctl call SIOCGIFADDR, when used to get the internet addresss of an
--------
: interface, behaves erradically.
.....
: now, addr.sin_addr.s_addr should be the encoded ethernet address,
--------
Did you specify disired address family?
You program will get hardware ethernet address.
If you want internet address, write ifr.ifr_addr.sa_family = AF_INET.
Alexey Kuznetsov.