public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Bernd Petrovitsch <bernd@firmix.at>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Get physical MAC address
Date: Tue, 1 Jan 2008 18:12:12 -0800	[thread overview]
Message-ID: <20080101181212.1e7b5ff0@deepthought> (raw)
In-Reply-To: <1199228848.3912.651.camel@gimli.at.home>

On Wed, 02 Jan 2008 00:07:28 +0100
Bernd Petrovitsch <bernd@firmix.at> wrote:

> On Mon, 2007-12-31 at 12:39 +0700, Theewara Vorakosit wrote:
> [...]
> > I get MAC address from ioctl. However, ifconfig can change this  MAC 
> > address. Can I get a real physical MAC address of the NIC?
> 
> - You can get the initial MAC address right after bootup before anyone
>   changes it.
> - Some (if not many if not all) of the drivers output it on
>   driver initialization time so you could read it from `dmesg` or
>   some /var/log/messages or .....
> There is no "get initial MAC address" ioctl (but it's not that
> complicated to implement it).
> 
> 	Bernd

There is already ethtool interface to get what you want (ETHTOOL_GPERMADDR)


-- 
Stephen Hemminger <stephen.hemminger@vyatta.com>

  reply	other threads:[~2008-01-02  2:14 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 [this message]
2008-01-02  2:42 ` Jon Masters
2008-01-02  3:12   ` Kyle Moffett
2008-01-02  4:58 ` Matt Domsch
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=20080101181212.1e7b5ff0@deepthought \
    --to=shemminger@linux-foundation.org \
    --cc=bernd@firmix.at \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox