Reading burned-in NIC MAC address from the user space.
clutton
clutton at zoho.com
Thu Mar 6 18:42:34 UTC 2014
On Thu, 2014-03-06 at 11:16 -0700, Warner Losh wrote:
> On Mar 6, 2014, at 11:07 AM, clutton <clutton at zoho.com> wrote:
>
> > On Thu, 2014-03-06 at 08:35 -0700, Warner Losh wrote:
> >> On Mar 6, 2014, at 7:13 AM, clutton <clutton at 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.
>
> ifconfig foo0 | grep link
>
> is the usual answer here :)
>
> > 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.
>
> so you want to be able to ask the driver for the original mac address?
>
> Warner
Exactly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freebsd.org/pipermail/freebsd-drivers/attachments/20140306/b88f3590/attachment.sig>
More information about the freebsd-drivers
mailing list