*BSD News Article 63632


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!howland.reston.ans.net!torn!news.unb.ca!opie!phowlett
From: phowlett@opie.ASG.unb.ca (Peter Howlett)
Newsgroups: comp.unix.questions,comp.unix.bsd,comp.unix.internals,comp.sys.sun.apps,alt.unix.wizards,can.sun-stroke,alt.sys.sun
Subject: Interface MAC address SunOS 4.1.3
Date: 14 Mar 1996 21:08:12 GMT
Organization: University of New Brunswick
Lines: 21
Message-ID: <4ia1rs$1j1@sol.sun.csd.unb.ca>
NNTP-Posting-Host: opie.asg.unb.ca
Summary: MAC Address of ethernet interface on SunOS 4.1.3
Keywords: Address MAC ethernet interface SunOS 4.1.3
X-Newsreader: TIN [version 1.2 PL2]
Xref: euryale.cc.adfa.oz.au comp.unix.questions:78832 comp.unix.bsd:16771 comp.unix.internals:9897 comp.sys.sun.apps:12790 alt.unix.wizards:3321 alt.sys.sun:10106

Trying to get the hardware address of le0 on a SunOS 4.1.3
machine. On the BSD machines, using SIOCGIFCONF I get the
the ifconf buffer with the SIOCGCONF ioctl. Some of the 
returned ifreq's in the ifconf buffer have the

   ifr_addr.sa_family == AF_INET 

and some have

   ifr_addr.sa_family == AF_LINK

This is great for Net/FreeBSD, the sa_data contains the MAC,
but the SunOS box only returns AF_INET ifreq's in the buffer.
Hmmmm. so how do I get the ethernet MAC address of an interface
out of the !@#$% SunOS kernel? Any pointers greatly appreciated...

--------------------------------------------------------------------
Peter Howlett				Atlantic Systems Group
E-Mail: Peter.Howlett@ASG.unb.ca	Fredericton, N.B. Canada
http://www.ASG.unb.ca/personal/ph.html	Phone: (506) 447-3050
PGP Key available			Fax:   (506) 453-5004