lkml.org 
[lkml]   [1996]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: SIOCGIFADDR bug?
Zachary Roger Amsden (amsden+@andrew.cmu.EDU) wrote:

: 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.


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.039 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site