All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Domsch <Matt_Domsch@dell.com>
To: Theewara Vorakosit <thvo@hpcnc.cpe.ku.ac.th>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Get physical MAC address
Date: Tue, 1 Jan 2008 22:58:00 -0600	[thread overview]
Message-ID: <20080102045800.GC10762@auslistsprd01.us.dell.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0712311233290.17732-100000@hpcnc.cpe.ku.ac.th>

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

  parent reply	other threads:[~2008-01-02  4:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-31  5:39 Get physical MAC address Theewara Vorakosit
2008-01-01 23:07 ` Bernd Petrovitsch
2008-01-02  2:12   ` Stephen Hemminger
2008-01-02  2:42 ` Jon Masters
2008-01-02  3:12   ` Kyle Moffett
2008-01-02  4:58 ` Matt Domsch [this message]
2008-01-02  9:31   ` Bernd Petrovitsch
     [not found] <9Gmk2-1M1-5@gated-at.bofh.it>
2007-12-31 11:11 ` Bodo Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080102045800.GC10762@auslistsprd01.us.dell.com \
    --to=matt_domsch@dell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thvo@hpcnc.cpe.ku.ac.th \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.