• 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
Re: retrieving your IP address
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: retrieving your IP address


  • Subject: Re: retrieving your IP address
  • From: Stéphane Sudre <email@hidden>
  • Date: Wed, 23 Oct 2002 11:20:03 +0200

On Wednesday, October 23, 2002, at 04:06 AM, Kris Amico wrote:

If you don't mind using SystemConfiguration.framework, you could use
SCDynamicStoreCopyValue to get the dictionary at:

State:/Network/Global/IPv4

From that dictionary, grab the service ID at "PrimaryService" and then copy
the dynamic store data at the key:

State:/Network/Service/[your service id]/IPv4

In that dictionary, the IP addresses are stored at "Addresses".

If you want a good look at what information you can get at in the dynamic
store, use SCDynamicStoreCopyKeyList then SCDynamicStoreCopyMultiple and
dump the data somewhere. The cool thing about using SC for this is that you
can register to be notified when the IPv4 information changes so that you
can have the very latest data when, say, the Customer switches to a
different network location.

there is also the scutil tool.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: retrieving your IP address (From: Kris Amico <email@hidden>)

  • Prev by Date: Re: Window Controller not being released.
  • Next by Date: [ANN] Path Finder 2.0
  • Previous by thread: Re: retrieving your IP address
  • Next by thread: Re: retrieving your IP address
  • Index(es):
    • Date
    • Thread