[comp.unix.ultrix] Interface hardware addresses on Ultrix 4.x

jt@mentat.COM (Jerry Toporek) (03/25/91)

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.

Any suggestions will be greatly appreciated.  Thanks...

jt

-- 
Jerry Toporek ========================  `` ''  ===============================
jt@mentat.com                          < @ @ >          Mentat Inc.
uunet!mentat.com!jt                     ( > )           1020 Pico Blvd Suite B
(213)452-5666                            \~/            Santa Monica, CA 90405

mogul@pa.dec.com (Jeffrey Mogul) (04/02/91)

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