home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / ultrix / 6272 < prev    next >
Encoding:
Text File  |  1992-08-17  |  1.7 KB  |  45 lines

  1. Newsgroups: comp.unix.ultrix
  2. Path: sparky!uunet!gatech!bloom-beacon!bloom-picayune.mit.edu!news.mit.edu!brian
  3. From: brian@kokom.mit.edu (Brian McAllister)
  4. Subject: Re: How to get phys-addr of ln0 if DECnet is running ?
  5. In-Reply-To: brian@kokom.mit.edu's message of Sat, 15 Aug 1992 00:19:51 GMT
  6. Message-ID: <BRIAN.92Aug17161206@kokom.mit.edu>
  7. Sender: news@athena.mit.edu (News system)
  8. Nntp-Posting-Host: kokom.mit.edu
  9. Organization: Bates LINAC, MIT
  10. References: <BRIAN.92Aug14191951@kokom.mit.edu>
  11. Date: Mon, 17 Aug 1992 21:12:06 GMT
  12. Lines: 31
  13.  
  14. In article <BRIAN.92Aug14191951@kokom.mit.edu> brian@kokom.mit.edu (Brian McAllister) writes:
  15.  
  16. >> Normally, if one wishes to get the physical address of the ethernet
  17. >> interface, one can do something like this:
  18. >>
  19. >>       ioctl(socket_id, SIOCRPHYSADDR, &ifreq_struct);
  20. >>
  21. >> When DECnet is running, it changes the physical address to one that
  22. >> reflects the DECnet address of the system.  However, the system call
  23. >> given above still returns the original address of the controller,
  24. >> which is useless.
  25.  
  26. >> So: How does one get the real address when DECnet is running ?
  27.  
  28. Well, the answer is to use the right struct in the ioctl, that is to
  29. use an ifdevea struct instead of an ifreq (see <net/if.h>).  This
  30. returns the hardware address and the current physical address, in easy
  31. to use form.  It would be nice if the Ultrix man pages told you this.
  32.  
  33. Thanks to the following people for their help :
  34.  
  35.     hooft@prl.philips.nl (Van Hooft PJG)
  36.     rob@icarus.ssd.loral.com (Rob Riepel)
  37.     dietrich@dxsw01.cern.ch (Dietrich Wiegandt)
  38.     chmr@edvz.tu-graz.ac.at (Christoph Robitschko)
  39.  
  40. - brian
  41. --
  42. ----
  43. Brian McAllister       Internet: mcallister@mit.edu
  44.                          BITNET: BRIAN@MITBATES
  45.