lkml.org 
[lkml]   [2008]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Get physical MAC address
On Mon, Dec 31, 2007 at 12:39:11PM +0700, Theewara Vorakosit wrote:
> Hello,
>
> I get MAC address from ioctl. However, ifconfig can change this MAC
> address. Can I get a real physical MAC address of the NIC?

yes. It's ETHTOOL_GPERMADDR to the ethtool ioctl.

case ETHTOOL_GPERMADDR:
rc = ethtool_get_perm_addr(dev, useraddr);
break;

When the driver is first loaded, before ifconfig can change the MAC
address, the existing (permanent) MAC address is stored away, able to
be retrieved via this ioctl. Jon Wetzel, a Dell intern of a few
summers ago, wrote the code and was able to have it included.

Thanks,
Matt

--
Matt Domsch
Linux Technology Strategist, Dell Office of the CTO
linux.dell.com & www.dell.com/linux


\
 
 \ /
  Last update: 2008-01-02 06:01    [W:0.067 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site