Jump to content
3 posts in this topic

Recommended Posts

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

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...