Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Mar 2014 20:07:07 +0200
From:      clutton <clutton@zoho.com>
To:        Warner Losh <imp@bsdimp.com>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>, freebsd-drivers@freebsd.org
Subject:   Re: Reading burned-in NIC MAC address from the user space.
Message-ID:  <1394129227.732.37.camel@eva02>
In-Reply-To: <10C93415-7C49-459E-921E-EE358C3B886C@bsdimp.com>
References:  <1394115222.8935.17.camel@eva02> <10C93415-7C49-459E-921E-EE358C3B886C@bsdimp.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Thu, 2014-03-06 at 08:35 -0700, Warner Losh wrote:
> On Mar 6, 2014, at 7:13 AM, clutton <clutton@zoho.com> wrote:
> 
> > Hi lists.
> > 
> > I'm porting a GNU macchanger to the FreeBSD. Everything has almost done,
> > except restoring the mac to the original one.
> > 
> > The Linux users can exploit ioctl with SIOCETHTOOL pointing to a proper
> > ifreq(ETHTOOL_GPERMADDR), I have no idea how to do this using FreeBSD,
> > is it even possible?
> 
> I’d check the source for ifconfig.
> 
> 	ifconfig ep0 link 1:2:3:4:5:6
> 
> does the trick…
> 
> Warner

No, it doesn't. It does the different trick :)
You misunderstood the question. I don't asked how to set the mac
address. The question is how to read burned in mac address from user
space. ifconfig is not capable doing such a thing.

As I can see the drivers read MAC from EEPROM using different ways. Is
there any interface to this low level work?

WHY:
The GNU macchanger has very nice option "--permanent Reset to original,
permanent hardware MAC". This is only one thing I haven't ported yet.

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)

iQIcBAABAgAGBQJTGLlKAAoJECNkWbjnbjuiVd8P/34603BFhHxwebsc4U23X/50
SE/okC2F1GsXujVNmcyaoU0EbfDkIsduivuitaVx1wDQjoEnnRXUvxyZTJpe0Umh
Imcw8bBueoqEBfrYJU8yr/ZoRGDCmGrXvkXOzTtx+b8JIlVex2X0A1dJrLgMa1AK
W0zHw6Uv08PTMSj6JNOgcOnYkQYtvAxXvrnS9EfFsMpkJh1h9xdQCfvqsKURZ2l6
wzBYTbbfaX5ijNXnevaPBfej3AWrDbRzLOou0RprMoRwk0QlsYdMMx/V5KEIwxdo
mDKAeIKLqv3VVWYlEiXOKcwF6yFKP+llz5lanMd1UJtb1aOqRV6IzD+X4546lAiq
32Ke7YpxPmnygV7bJBzS1XrtJX34QTQE8aBAAAb3ijtbGyC0TX5Vjd361pmVLwGi
cR0Tnp6pxdzi4eYWfVZBN+pwaaPd6YQyqdf6PunDqLYF7SNjMQdr7vtEETi55ufs
L+SpY2GLgfo6RbvR7I8WsbjrIaLTTJOrLMNnf9xykxyLgehbzoNgSFaKod0fU2ci
1GYS5Yol5r3M3KVU7fI6k2JXXaoHUX4znGfqg1HliPkdV4nFNd8hcqOxtwS5uLrY
HlsvIbfuMMAXn9t639OR9LgCEoxhP0F9sFep6uJx/pGBqc1991X7xE/bkFtRXzgg
RBkC0y7X41cGeXq0Ot+P
=2Vq5
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1394129227.732.37.camel>