home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.ultrix
- Path: sparky!uunet!gatech!bloom-beacon!bloom-picayune.mit.edu!news.mit.edu!brian
- From: brian@kokom.mit.edu (Brian McAllister)
- Subject: Re: How to get phys-addr of ln0 if DECnet is running ?
- In-Reply-To: brian@kokom.mit.edu's message of Sat, 15 Aug 1992 00:19:51 GMT
- Message-ID: <BRIAN.92Aug17161206@kokom.mit.edu>
- Sender: news@athena.mit.edu (News system)
- Nntp-Posting-Host: kokom.mit.edu
- Organization: Bates LINAC, MIT
- References: <BRIAN.92Aug14191951@kokom.mit.edu>
- Date: Mon, 17 Aug 1992 21:12:06 GMT
- Lines: 31
-
- In article <BRIAN.92Aug14191951@kokom.mit.edu> brian@kokom.mit.edu (Brian McAllister) writes:
-
- >> Normally, if one wishes to get the physical address of the ethernet
- >> interface, one can do something like this:
- >>
- >> ioctl(socket_id, SIOCRPHYSADDR, &ifreq_struct);
- >>
- >> When DECnet is running, it changes the physical address to one that
- >> reflects the DECnet address of the system. However, the system call
- >> given above still returns the original address of the controller,
- >> which is useless.
-
- >> So: How does one get the real address when DECnet is running ?
-
- Well, the answer is to use the right struct in the ioctl, that is to
- use an ifdevea struct instead of an ifreq (see <net/if.h>). This
- returns the hardware address and the current physical address, in easy
- to use form. It would be nice if the Ultrix man pages told you this.
-
- Thanks to the following people for their help :
-
- hooft@prl.philips.nl (Van Hooft PJG)
- rob@icarus.ssd.loral.com (Rob Riepel)
- dietrich@dxsw01.cern.ch (Dietrich Wiegandt)
- chmr@edvz.tu-graz.ac.at (Christoph Robitschko)
-
- - brian
- --
- ----
- Brian McAllister Internet: mcallister@mit.edu
- BITNET: BRIAN@MITBATES
-