Re: Get mac address of physical NIC card from firmware
Re: Get mac address of physical NIC card from firmware
- Subject: Re: Get mac address of physical NIC card from firmware
- From: Prashant Saxena <email@hidden>
- Date: Wed, 27 Apr 2011 18:13:28 +0530 (IST)
Hi,
I made this new tool to get various info of all the ethernet adapters available.
The source code as well as an executable is attached here with. I have few
questions:
1. For compiling and linking, I am using simple "gcc macinfo.c -macinfo"
command. I am on Intel and I need to make this tool
universal(support on both architecture (Intel and PPC) as well as support for
64Bit). What additional flags I have to specify to do so?
2. On linux platform to get the the name of the adapter (device name) and it's
vendor, I am reading byte code of device name and it's vendor name from various
files in /sys/class/net/<adapter> directory. Later this byte code is matched
using pci.ids file.
How do I get these byte codes of vendor and device name on os x?
3. How do I differentiate between wired and wireless(airport) adapter?
4. On linux, I am using 'ethtool' api to get the mac address from firmware. How
do I get mac address on mac from firmware?
I have no idea if 'ethtool' api is going to work or not? Any thing specific on
Mac?
Finally I am requesting to users of this list to do couple of simple tests and
let me know the output produced. I don't have Mac
hardware with wireless adapter although I am planning to buy a Mac mini
shortly...;-)
Make sure that you have a machine with two adapters, wired and wireless. If you
have any virtual adapters installed then it would
be an added advantage.
1. Make wired adapter active and run the tool
2. Disable wired adapter and active wireless(airport) adapter and run the tool
again.
Check in both cases;
a) Is it showing the adapter which is not active?
b) Order of adapters info is always same or it's getting changed based on
current connection?
c) Is it showing virtual adapters also?
d) What's the value of 'physical' field in output when adapter is virtual?
e) What's the value of 'physical' field in output when adapter is wired or
wireless?
I would really appreciate if some one can do these tests and send me the
updates.
Best Regards
Prashant
Attachment:
macinfo.zip
Description: Zip archive
_______________________________________________
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