Return to BSD News archive
#! rnews 3471 bsd Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!wabbit.its.uow.edu.au!news.ci.com.au!newshost.telstra.net!act.news.telstra.net!psgrain!news.uoregon.edu!newsfeed.orst.edu!news.PEAK.ORG!engr.orst.edu!rutgers!news.columbia.edu!sol.ctr.columbia.edu!news.msfc.nasa.gov!elroy.jpl.nasa.gov!swrinde!cssun.mathcs.emory.edu!gatech!news.mathworks.com!news.kei.com!nntp.coast.net!torn!news.unb.ca!usenet From: Peter Howlett <Peter.Howlett@ASG.unb.ca> Newsgroups: comp.unix.questions,comp.unix.bsd,comp.unix.internals,comp.sys.sun.apps,alt.unix.wizards,can.sun-stroke,alt.sys.sun Subject: Re: Interface MAC address SunOS 4.1.3 Date: Fri, 15 Mar 1996 23:40:45 +0000 Organization: Atlantic Systems Group Lines: 52 Message-ID: <3149FFFD.41C67EA6@ASG.unb.ca> References: <4ia1rs$1j1@sol.sun.csd.unb.ca> <p4trqukut.fsf@lpbcsun.lpbc.jussieu.fr> <DoC1x4.A7x@mail.auburn.edu> NNTP-Posting-Host: bunny.asg.unb.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.0 (X11; I; FreeBSD 2.1.0-RELEASE i386) Xref: euryale.cc.adfa.oz.au comp.unix.questions:78982 comp.unix.bsd:16774 comp.unix.internals:9928 comp.sys.sun.apps:12821 alt.unix.wizards:3359 alt.sys.sun:10115 Doug Hughes wrote: > > In article <p4trqukut.fsf@lpbcsun.lpbc.jussieu.fr>, slt@lpbcsun.lpbc.jussieu.fr (Stephane Tsacas) writes: > |> I've got it... : > |> adb -k /vmunix /dev/mem > |> physmem 3fb1 > |> le_softc/X > |> _le_softc: > |> _le_softc: ff005000 > |> 0xff005000+0t112/X > |> 0xff005070: 8002071 > |> 0xff005074: d5010000 > |> > |> First component of struct le_softc is a struct arpcom which starts by: > |> struct arpcom { > |> struct ifnet ac_if; /* network-visible interface */ > |> struct ether_addr ac_enaddr; /* ethernet hardware address */ > |> struct in_addr ac_ipaddr; /* copy of ip address- XXX */ > |> ... > |> > |> and sizeof(struct ifnet) = 112 > |> > |> Don't ask me if the machine has more than one interface... > > Luckily, on Suns, there is only 1 MAC for all ethernets. The mac is > stored in nvram on the motherboard, so you don't have to worry about this. > (or unluckily, depending on your point of view) Actually, upon looking at TCP/IP illustrated Vol 2 (which SunOS obviously is not quite the same as, but close to) the le_softc struct is a wonderful place to find the forbidden fruit of the ifnet struct (wish there was an ioctl for this...) arpcom would be great to since it comes right after le_softc. But, as was mentioned in a previous post, what if there are more than one ethernet card in this SunOS machine I am working on? Is there a separate le_softc for each card? (I am on a Sparc 20 clone AXIL with le0 and le1) Turns out, I got a mail message from a fellow who mentioned the sysinfo program from usc.edu which tells just about everything there is to know about a SunOS, Solaris, HPUX, AIX, IRIX machine. It's quite impressive although I have not actually traced to find out how it gets the MAC address yet. (Seems to probe the prom directly?) Many thanks for the responses.... -------------------------------------------------------------------- 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 ID: 60F2EEC1 Fax: (506) 453-5004