• 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: accessing netinfo db from cocoa?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: accessing netinfo db from cocoa?


  • Subject: Re: accessing netinfo db from cocoa?
  • From: Michael Watson <email@hidden>
  • Date: Sun, 31 Aug 2008 18:19:59 -0400

If you want to do it fast, without shell output parsing, and in a way that will work on 10.4 *and* 10.5, use the Directory Services C API. The downside is that it's more complex than many of the Cocoa APIs you're likely used to.

Docs:

<http://developer.apple.com/documentation/Networking/Conceptual/Open_Directory/Introduction/chapter_1_section_1.html >

<http://developer.apple.com/documentation/Networking/Reference/Open_Directory_Ref/Reference/reference.html >

Lots of source to learn from (the dscl sources are a good place to look for examples):

http://www.opensource.apple.com/darwinsource/Current/DSTools-112/


-- m-s

On 31 Aug, 2008, at 10:43, Jaime Magiera wrote:


On Aug 31, 2008, at 4:57 AM, Kieren Eaton wrote:

Hi,

I am trying to find a way to access the netinfo DB from cocoa. Specifically the sharing (AFP, SMB, etc).
Pointers or ideas are much appreciated.


Hello,

Quick question: Are you using Leopard or Tiger machines? On Tiger, you can run the commands "niultil" or "nicl" to query the NetInfo database from your application. Note that in Leopard, Netinfo has been completely deprecated in favor of a local LDAP database. So, if you are using Leopard, run the command "dscl" from your application. In either case, you'll have to parse the command results in your app.

On Tiger, the path you want to query is...

/config/SharePoints/

On Leopard, the path you want to query is...

/Local/Default/SharePoints

hope that helps,

Jaime Magiera

Sensory Research
http://www.sensoryresearch.net

_______________________________________________

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:
@bungie.org


This email sent to email@hidden

_______________________________________________

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


References: 
 >accessing netinfo db from cocoa? (From: Kieren Eaton <email@hidden>)
 >Re: accessing netinfo db from cocoa? (From: Jaime Magiera <email@hidden>)

  • Prev by Date: Re: App names
  • Next by Date: Re: App names
  • Previous by thread: Re: accessing netinfo db from cocoa?
  • Next by thread: Re: accessing netinfo db from cocoa?
  • Index(es):
    • Date
    • Thread