Re: mac address from nic

From: Dances With Crows (danSPANceswitTRAPhcrows_at_gmail.com)
Date: 04/13/05


Date: Wed, 13 Apr 2005 10:35:32 -0500

On Wed, 13 Apr 2005 16:48:56 +0200, Måns Rullgård staggered into the
Black Sun and said:
> "Martin" <martin.lavergne@elytra.com> writes:
>> Would anyone have ideas how to query a PCI NIC for its MAC address
>> directly?
> ioctl(sock, SIOCGIFADDR, ...);

This may not be as "direct" as the OP wants, but it's the standard way
to get a MAC address from a NIC under Linux. The only more direct way
involves poking the bits directly from the NIC module. Martin, you do
*not* want to go there; there are over 100 NICs that are supported by
Linux and they all have the relevant code in their modules already.

>> To be done is such a way that it cannot be spoofed?
> Impossible.

Not impossible; just insanely difficult and probably not worth it.

> Are you trying to create some kind of license enforcement
> scheme?

His motivations were never specified. I think Martin has just not
given the problem enough thought.

> Give up. All you can accomplish there, is to irritate your honest
> customers, and delay the pirates a few minutes.

Aye.

-- 
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin /    mail: TRAP + SPAN don't belong
http://www.brainbench.com     /                Hire me! 
-----------------------------/ http://crow202.dyndns.org/~mhgraham/resume


Relevant Pages

  • Re: Cannot Ping Beyond Default Gateway & DHCP Server
    ... That computer has two ethernet NICs: one from Intel, and one from Linksys. ... He says he has never had to change a MAC nor tell the home office to change one. ... My assumption now is that this MAC control is occurring in the cable modem, and that clearing it with power off causes it to loose its previously-stored value. ... Network Diagnostics shows pings to his IP, Default Gateway, and DHCP Server work, but pings to DNS servers fail. ...
    (microsoft.public.windowsxp.network_web)
  • Re: nic issue on Debian Lenny
    ... Then it just lost network ... First of all, when you say that you have "two onboard nics", I ... Usually, if a machine has two ethernet adapters, ... MAC address built-in to it. ...
    (Debian-User)
  • Re: Mac 10.4 OS on G5
    ... I called into the SBS Team Support yesterday because I was getting bombared ... changed before the Mac problem begin. ... the dual NICs on the server from teaming as Load Balance to Fault Tolerance ...
    (microsoft.public.windows.server.sbs)
  • Re: nic issue on Debian Lenny
    ... First of all, when you say that you have "two onboard nics", I ... interpret that to mean that there are two network adapters built-in ...  Usually, if a machine has two ethernet adapters, ... MAC address built-in to it. ...
    (Debian-User)
  • Re: RIS, same GUID, duplicates, Dell GX60s
    ... Hence the requirement of the RIS boot disk. ... At this stage, it can't find it, so decides to get the MAC ... > these nics part of the motherboard or pci devices? ...
    (microsoft.public.windowsxp.setup_deployment)