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