lkml.org 
[lkml]   [1999]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ioctl SIOCGIFADDR bug
Hi Alan.

>> My problem turns out to be an apparently undocumented
>> requirement that the family type must be set in the buffer for
>> SIOCGIFADDR to work (but not for the mask or broadcast commands
>> to work) and if you don't (i.e. all bytes 0) it will return the
>> last four bytes of the network card's MAC address but set this
>> byte (the 18th, at offset 17) to 1 which will cause it to work
>> the next time.

> It returns the entire MAC address if you dont. The world has
> been that way since 4.2 BSD at least.

Presumably his MAC address starts with 00:00 and he didn't notice the
difference as a result...

Best wishes from Riley.

+----------------------------------------------------------------------+
| There is something frustrating about the quality and speed of Linux |
| development, ie., the quality is too high and the speed is too high, |
| in other words, I can implement this XXXX feature, but I bet someone |
| else has already done so and is just about to release their patch. |
+----------------------------------------------------------------------+
* ftp://ftp.MemAlpha.cx/pub/rhw/Linux
* http://www.MemAlpha.cx/kernel.versions.html


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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