• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
what to do with MAC address...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

what to do with MAC address...


  • Subject: what to do with MAC address...
  • From: "Jon C. Munson II" <email@hidden>
  • Date: Thu, 19 Feb 2009 13:26:29 -0500
  • Organization: JTA Enterprises LLC

Namaste!

Per Apple's GetPrimaryMACAddress sample (found in Technical Note TN1103), I
can obtain a MAC address for a given Mac.

However, when I try to output that address to the screen, I get nothing.

So, my issue is, what do I do with the return value found inside that sample
so that it is output in the "standard" format of a MAC address?

The return value from IO Kit is a UInt8 struct which is filled with the
bytes of the MAC address.

I need to convert that to an NSString.  Which I did using
stringWithUTF8Format - the raw conversion works fine.  However, due to the
actual characters in the string, the return string isn't valid.

I'm guessing I need to do some further conversion prior to passing back the
actual string, but not sure what, nor how.  It looks preliminarily to me
that I need to change the UInt8 byte array to an array that contains the hex
values of said bytes - is that correct?  If so, how do I do that (as simple
as obtaining the character codes?)?  I know that may be a noob question, but
I'm not usually delving into the lower levels of such stuff so I don't
remember - sorry!

Thanks!!!

Peace, Love, and Light,

/s/ Jon C. Munson II



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: what to do with MAC address...
      • From: Volker in Lists <email@hidden>
  • Prev by Date: Re: Running out of memory on stack in C++ routine invoked within Cocoa NSOperation
  • Next by Date: Re: Running out of memory on stack in C++ routine invoked within Cocoa NSOperation
  • Previous by thread: How to make a token field that only accepts numbers: NSTokenField with NSNumberFormatter?
  • Next by thread: Re: what to do with MAC address...
  • Index(es):
    • Date
    • Thread