Get mac address of physical NIC card from firmware & physical/virtual ethernet identification.
Get mac address of physical NIC card from firmware & physical/virtual ethernet identification.
- Subject: Get mac address of physical NIC card from firmware & physical/virtual ethernet identification.
- From: Prashant Saxena <email@hidden>
- Date: Fri, 08 Apr 2011 12:24:00 +0530 (IST)
Hi,
I am new to Mac world.
I need a small console based program that prints the mac address of physical
ethernet adapter from it's firmware. I need this utility for appliance
activation. I have tried several example but none of them is flawless, The
easiest method I have found is to parse the output of "ifconfig" command but it
has also some drawbacks.
More description:
1. Firstly program should differentiate between physical and virtual adapters.
Physical means installed on board(wired or wireless) or installed additionally.
Virtual adapters are those created by VPN or created by virtualization apps such
as VirtualBox/VMWare etc. I am not interested in virtual ones.
2. In case of more them one physical adapters(wired and wireless), it should
print the mac address and description(name & vendor) of both/all adapters.
3. If media is disconnected then also it should be able to read the mac address
and description(name, vendor) of card.
4. This one is bit complex. On *nix mac address can easily be changed but AFAIK
the universal mac address (mac address burned inside ROM) can't be changed.
There is command line tool "ethtool" is available that reads the mac address
from ROM. I have heard that there are some issues with ethtool as it is limited
to use only two types of drivers.
I tried this example:
http://developer.apple.com/library/mac/#samplecode/GetPrimaryMACAddress/Introduction/Intro.html
but it's not satisfying the requirements.
I would appreciate if someone point me out the right direction to solve the
problem. I am new to Linux world.
Thanks
Prashant
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden