home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / protocol / tcpip / 5171 < prev    next >
Encoding:
Text File  |  1992-11-15  |  1.4 KB  |  42 lines

  1. Newsgroups: comp.protocols.tcp-ip
  2. Path: sparky!uunet!van-bc!skl
  3. From: skl@wimsey.bc.ca (Samuel Lam)
  4. Subject: Re: Getting the ethernet address off (SMC)WD8003E Lan Cards
  5. Reply-To: skl@wimsey.bc.ca (Samuel Lam)
  6. Date: Mon, 16 Nov 1992 09:29:16 GMT
  7. Message-ID: <BxsyCt.2tr@wimsey.bc.ca>
  8. References: <1992Nov16.032841.7572@csc.canberra.edu.au>
  9. Sender: skl@wimsey.bc.ca ( )
  10. Lines: 30
  11.  
  12. In article <1992Nov16.032841.7572@csc.canberra.edu.au>,
  13.  act@softserver.canberra.edu.au (Andrew Turner) wrote:
  14. >Would someone please e-mail a code fragment assembler/pascal/C
  15. >that will return the ethernet address from an WD8003E card.
  16.  
  17.     unsigned int i, sum = 0, io_base = 0x...;
  18.     unsigned char eprom[8];
  19.     ...
  20.     for (i = 0; i < 8; i++)
  21.         sum += (eprom[i] = inportb(io_base + 8 + i));
  22.     sum &= 0x00ff;
  23.     if (sum != 0xff)
  24.         /* checksum failed, possibly no board there */
  25.     else
  26.         printf("MAC address = %02x:%02x:%02x:%02x:%02x:%02x\n",
  27.         eprom[0], eprom[1], eprom[2], eprom[3], eprom[4], eprom[5]);
  28.  
  29. If you use a Packet, NDIS or ODI driver to access your card, you
  30. could also call the driver to query for the MAC address instead of
  31. asking the card directly as in the above.
  32.  
  33. >Technical specs and/or info on where I could get the info would also be
  34. >welcome.
  35.  
  36. SMC/WD provides a driver development kit to those who want to write
  37. codes to talk to the card directly.
  38.  
  39. ...Sam
  40. -- 
  41. <skl@wimsey.bc.ca> -- Connectivity Technology Inc.
  42.