Date: Thu, 24 Oct 1996 11:17:00 +0200 (MET DST) From: sos@FreeBSD.org To: joerg_wunsch@uriah.heep.sax.de Cc: freebsd-hackers@FreeBSD.org Subject: Re: Linux emulation, gethostid() Message-ID: <199610240917.LAA06746@ra.dkuug.dk> In-Reply-To: <199610240834.KAA02689@uriah.heep.sax.de> from "J Wunsch" at Oct 24, 96 10:34:15 am
next in thread | previous in thread | raw e-mail | index | archive | help
In reply to J Wunsch who wrote: > > As Michael Smith wrote: > > > A linux application calls gethostid() in the Linux C library. _This_ > > funtion then makes the SIOmumbleHWADDR ioctl call to get the ether > > hardware address. > > Ick. I thought they've got a `gethostid()' syscall for this, like > almost any other Unix has. > > > The kernel 'hostid' variable is too short for the ether address, and the > > ether address _is_ visible inside the kernel (if one exists). > > No such thing like `the' ethernet address. By all means, make it > configurable from outside, don't try to grab a particular value inside > the kernel. Otherwise, if the user re-arranges his ethernet cards > etc., he's at a loss. Exactly, the problem is not getting the *HWADDR for a given interface, thats trivial, it more like deciding WHICH interface. This was easy on propietary hw where the interface was on the mainboard, but in a PC almost everything can change. I'd be inclined to implement both the CGIFHWADDR & CSIFHWADDR in the emulator, then you can set it with the prober code, but it has to be a linux bin then :( Maybe we should give our own OS these two.... Or I could just decide to take the hwaddr of the first interface that has one, pretty easy, but it's bound to be bogus one way or another :(. (but I think the whole thing is bogus one way or another) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Soren Schmidt (sos@FreeBSD.org) FreeBSD Core Team So much code to hack -- so little time.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610240917.LAA06746>