Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obtaining Ethernet MAC address



On May 5, 2005, at 5:45 PM, Carl Smith wrote:
Is it possible using the classes in the example link below to also
obtain the 'Name' of the ethernet card, i.e. as in the Systems/Network
panel as "Airport",
"Built-in Ethernet" and so on?

And in conjunction, is there some way, to distiguish between the cards
and if they are wireless or not?

Unfortunately, there isn't a good one-stop-shopping approach to present an interface selector (which is what it sounds like you want to do). The same is true for wired-vs-wireless. As for builtin-vs- addin, you can look for the "IOBuiltin" property in any instance of IONetworkInterface (The constant is defined in Kernel.framework/ Headers/IOKit/network/IONetworkInterface.h)


Our UI has some of the details hardwired, and has to collect the rest from a variety of APIs. Human-readable device names is something we hope to address in a future release, but for now, you'll probably have to use hard-coded logic to assign a name to each device you find. I do not believe we have a sample of that, but I'm sure I'll be corrected if I'm wrong ;-)
- Dean




Thanks Carl

-----Original Message-----
From: darwin-drivers-bounces+csmith=email@hidden
[mailto:darwin-drivers-bounces +csmith=email@hidden]
On Behalf Of Carl Smith
Sent: Thursday, May 05, 2005 8:35 PM
To: Dean Reece
Cc: email@hidden
Subject: RE: Obtaining Ethernet MAC address


Wow that was fast. Great Thanks Dean,

"> Is the code for the Systems/Network panel open code?
Nope, sorry." :((

Carl

-----Original Message-----
From: Dean Reece [mailto:email@hidden]
Sent: Thursday, May 05, 2005 8:34 PM
To: Carl Smith
Cc: Darwin Drivers Mailing List
Subject: Re: Obtaining Ethernet MAC address

On May 5, 2005, at 5:29 PM, Carl Smith wrote:

I wonder if someone could point me in the right direction as to be
able to add code to my userland or driver, if need be, apps to be
able to obtain the hardware MAC address of the inserted Ethernet
cards. Pretty much the same way it is done from Systems/Network
panel in the OS X?

Have a look at http://developer.apple.com/samplecode/
GetPrimaryMACAddress/listing1.html
It does exactly what you want.

Is the code for the Systems/Network panel open code?

Nope, sorry.

Cheers,
- Dean
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-drivers mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-drivers/csmith% 40fortresst
ech.com


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-drivers mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-drivers/email@hidden

This email sent to email@hidden
References: 
 >FW: Obtaining Ethernet MAC address (From: "Carl Smith" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.