Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!pa.dec.com!mogul From: mogul@pa.dec.com (Jeffrey Mogul) Newsgroups: comp.unix.ultrix Subject: Re: Interface hardware addresses on Ultrix 4.x Message-ID: <1991Apr2.022412.24260@pa.dec.com> Date: 2 Apr 91 02:24:12 GMT References: <367@mentat.COM> Sender: news@pa.dec.com (News) Organization: DEC Western Research Lines: 22 In article <367@mentat.COM> jt@mentat.UUCP (Jerry Toporek) writes: >Our implementation of Streams for Ultrix 4.x includes a driver shim which >provides an interface between DLPI and the BSD-style network interfaces. >It works fine, except for one small flaw which I haven't been able to >resolve. > >The driver needs to find the hardware address associated with a particular >interface. I have looked at ifp->if_addr and found only sa_family == AF_INET >and all zeros in sa_data. In ifp->if_addrlist, there is a single entry for >AF_INET, with the expected IP address supplied. I don't see anywhere else >to look. In the 4.xBSD networking tradition, upon which Ultrix is based, the physical-layer address is not stored in the "struct ifnet" record. In Ultrix (and probably other BSD-based systems), the address is stored in each driver's private data structures. Ultrix drivers support the SIOCRPHYSADDR ioctl. I suspect it would not be hard for your code to issue this ioctl, even from within the kernel, to obtain the physical address. -Jeff