Vikat Posted May 3, 2011 Share Posted May 3, 2011 Hi, OS X 10.5.5 Leopard Intel I am a newbie on OS X. Writing a small tool to get various info about all the ethernet adapters installed. Last thing left is to get vendor id and device id. I can see this using IORegExplorar but I don't want to go that way. I have tried several command line tools but I am not getting the vendor and device id. Parsing the output of 'ioreg' command is difficult as you have to do forward and backward processing of lines which I think could lead to wrong result. In utility->Network Utility you can see the vendor and device name associated with an adapter. BTW, has anyone tried to get the mac address of an ethernet adapter from firmware? permanent one? Any pointers? Cheers Prashant Quote Link to comment https://www.insanelymac.com/forum/topic/256214-get-ethernet-vendor-and-device-id/ Share on other sites More sharing options...
Gringo Vermelho Posted May 3, 2011 Share Posted May 3, 2011 Ask how they did it: http://www.insanelymac.com/forum/index.php?showtopic=219584 Have you considered using LSPCI? Quote Link to comment https://www.insanelymac.com/forum/topic/256214-get-ethernet-vendor-and-device-id/#findComment-1678393 Share on other sites More sharing options...
Vikat Posted May 4, 2011 Author Share Posted May 4, 2011 Well, I have decided to go for a simple solution and that is to parse the output of "ioreg -l" command using "popen". It's working fine. Couple of questions to lock the solution. I am on OS X 10.5.5 Leopard Intel and using xcode314_2809. To make this utility universal as well as support on both (32-64bit) architecture, I am using this command: gcc -mmacosx-version-min=10.3 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -arch ppc64 -arch x86_64 -o tool tool.c Is it OK? or am I missing something? I need to know if "ioreg" command is available of OS X 10.3 as well as on latest versions 10.6 and later? Is it possible to use some flags along with "ioreg -l" to strip down search only on ethernet adapter area? Cheers Prashant Quote Link to comment https://www.insanelymac.com/forum/topic/256214-get-ethernet-vendor-and-device-id/#findComment-1678791 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.