[Gllug] Reading MAC addresses

Allen Wayne Wayne.Allen at rhul.ac.uk
Mon Jul 23 14:16:34 UTC 2001



-----Original Message-----
From: Chris Ball [mailto:chris at cpan.org]
Sent: 23 July 2001 15:08
To: gllug at linux.co.uk
Subject: Re: [Gllug] Reading MAC addresses


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?

I'm pushing for linux, but it might have to be cross platform, or at least
DOS. (Sorry for swearing) Its a case of shaking the tree and seeing what
ideas fall out.

Wayne

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




More information about the GLLUG mailing list