[Gllug] Reading MAC addresses

Chris Ball chris at cpan.org
Mon Jul 23 14:07:35 UTC 2001


On Mon, Jul 23, 2001 at 03:01:05PM +0100, Allen Wayne wrote:
> here is a stupid question...does anyone know of a method of reading a
> network card MAC address from code (i.e. C/C++)?

I'd do it using ioctl and SIOCGIFHWADDR. Did you want a cross-platform
method, or one specifically for linux?

~C. 

-- 
Chris Ball.
chris at cpan.org || http://printf.net/
"1 is equal to 2 for sufficiently large values of 1."

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




More information about the GLLUG mailing list