From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10b612,2fc3f745104b78f6 X-Google-Attributes: gid10b612,public X-Google-Thread: 1164f8,2fc3f745104b78f6 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-01-03 06:13:18 PST Xref: gmd.de comp.unix.ultrix:12378 comp.sys.dec:12644 Path: gmd.de!xlink.net!howland.reston.ans.net!gatech!psuvax1!news.cc.swarthmore.edu!hirai From: hirai@cc.swarthmore.edu (Eiji Hirai) Newsgroups: comp.unix.ultrix,comp.sys.dec Subject: Re: How to get ethernet number of a running DECsystem? Date: 3 Jan 1994 14:06:08 GMT Organization: Computing Center, Swarthmore College, Swarthmore, PA, USA Message-ID: <2g98og$4jj@larch.cc.swarthmore.edu> References: NNTP-Posting-Host: gingko.cc.swarthmore.edu Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit hoover@mathematik.uni-bielefeld.de (Uwe Schuerkamp) writes: : can anyone tell me how to determine the physical ethernet address of : an Ultrix host Compile the code below and run it. -- hirai@cc.swarthmore.edu (Eiji Hirai) | Unix Geek for Swarthmore College I don't speak for Swarthmore College | Computing Center, Swarthmore, PA, USA "I post, therefore I am." -Rene Descartes on Usenet /* * Newsgroups: comp.unix.ultrix * From: jm@decuk.uvo.dec.com (John McNulty) * Subject: Re: Help : Copy * Message-ID: <1992Oct16.072054.783@decuk.uvo.dec.com> * Organization: Digital Equipment Co. Ltd * Date: Fri, 16 Oct 1992 07:20:54 GMT */ #include #include #include #include #include int main (int argc, char *argv[]) { int s; struct ifdevea i; if ( argc != 2 ) { fprintf (stderr, "usage: %s interface\n", argv[0]); exit (1); } if ((s = socket (AF_INET, SOCK_STREAM, 0)) == -1) { perror ("socket"); exit (1); } strncpy (i.ifr_name, argv[1], sizeof (i.ifr_name)); if (ioctl (s, SIOCRPHYSADDR, &i) == -1) { perror ("ioctl"); exit (1); } printf ("%s: %x-%x-%x-%x-%x-%x\n", i.ifr_name, i.default_pa[0], i.default_pa[1], i.default_pa[2], i.default_pa[3], i.default_pa[4], i.default_pa[5]); exit (0); }