[Gllug] Reading MAC addresses

Mike Brodbelt mike at coruscant.demon.co.uk
Wed Jul 25 00:04:12 UTC 2001


Nathan Matthews wrote:
> 
> Hmmm, interrupt 21h will be the interrupt to call if any.  I dont think

Not always, by any means. INT21 is serviced by the DOS kernel, which has
really got no clue about such things as network cards. However, if an
NDIS aware driver is installed, various things become possible. Try
looking at http://www.ctyme.com/intr/rb-2823.htm. This might give you
what you're looking for. The MAC Service-Specific Characteristics Table
appears to have a "Physical station address" in it. This will probably
be what you want. To avoid the need for an NDIS driver (or similar)
would require that you read the address from registers on the card
directly. The medthod to do this will likely be different for each
card/chipset, and you would require intimate knowledge of the hardware.
Device drivers provide a nice abstraction layer to hide these sorts of
details from you....

> there is a standard way to read the mac address from a network card.  Dos
> was not network aware, specific network drivers had to be loaded from the
> manufacturer, they worked with direct port reading, writing, not via BIOS at
> all.  

Indeed - the drivers usually had to be told what IRQ line and IO port to
use.

> Correct me if i'm wrong but theres is no 'standard' way to access a
> network card like you can a ps/2 mouse/keyboard vga gfx card etc.  They'll
> be a win32 call under i'm sure.

You're not wrong - that's why there are so many different net card
drivers in the kernel...

Mike.

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list