Follow us on...
Follow us on Twitter Follow us on Facebook
Register
Results 1 to 6 of 6

Thread: netinfo

  1. #1
    WeeZer51402's Avatar
    WeeZer51402 is offline Registered User
    Join Date
    Dec 2002
    Location
    Lost in my own unintelligible ramblings
    Posts
    475
    Thanks
    0
    Thanked 0 Times in 0 Posts

    netinfo

    does anybody know the function calls to create/append/delete properties and directories in the netinfo database?
    ON THE WAY:
    15" PB 1.67|100|1024 --- 10.4
    ------------------------------------------
    17" iMac G5 1.8|80|512|BT --- 10.3.9
    FrankenMac G4 500|55|640 --- 10.3.9
    PowerMac 9600 300|4|512 --- 1.2
    eMachine 500is 500|4.3|196 --- OpenStep 4.2
    Server 2.3|260|512 --- FedoraCore

  2. #2
    Darkshadow's Avatar
    Darkshadow is offline wandering shadow
    Join Date
    Jul 2001
    Location
    DE, USA
    Posts
    1,532
    Thanks
    0
    Thanked 1 Time in 1 Post
    Are you talking about in the terminal? If so, then the command for that is niutil. Also related are nidump (which will print out the stuff in the NetInfo domain), niload (you can use it to load properties from a file), nifind (can use it to find instances of a property), and nigrep (can use it to search with regular expressions).

    I have to say though, it's a lot easier to use the NetInfo application in /Applications/Utilities to mess with all of that than using the command line programs.
    I am but a lonely shadow,
    Doomed forever to roam and wander.
    But if you allow me to pause before I must go,
    I'll spin you tales of mystery and wonder.


    Site: Night Productions

  3. #3
    WeeZer51402's Avatar
    WeeZer51402 is offline Registered User
    Join Date
    Dec 2002
    Location
    Lost in my own unintelligible ramblings
    Posts
    475
    Thanks
    0
    Thanked 0 Times in 0 Posts
    oh sorry, i didnt specify, no i meant in c...sorry about that.
    ON THE WAY:
    15" PB 1.67|100|1024 --- 10.4
    ------------------------------------------
    17" iMac G5 1.8|80|512|BT --- 10.3.9
    FrankenMac G4 500|55|640 --- 10.3.9
    PowerMac 9600 300|4|512 --- 1.2
    eMachine 500is 500|4.3|196 --- OpenStep 4.2
    Server 2.3|260|512 --- FedoraCore

  4. #4
    Darkshadow's Avatar
    Darkshadow is offline wandering shadow
    Join Date
    Jul 2001
    Location
    DE, USA
    Posts
    1,532
    Thanks
    0
    Thanked 1 Time in 1 Post
    Ah, that makes a little more sense.

    man netinfo

    ...

    #include <netinfo/ni.h>

    ...however, I don't know which library you need to link against for it. It seems that all of these libraries have something of it, yet I'm not sure which specific one you need to link against:

    /usr/lib/libc.dylib
    /usr/lib/libinfo.dylib (most likely one, to me)
    /usr/lib/libkvm.dylib
    /usr/lib/libm.dylib
    /usr/lib/libpthread.dylib
    /usr/lib/libSystem.B.dylib
    /usr/lib/libSystem.B_debug.dylib
    /usr/lib/libSystem.B_profile.dylib

    (I got those by grepping through /usr/lib, with searches of the different functions declared in the netinfo includes...all of those kept popping up as matches.)
    I am but a lonely shadow,
    Doomed forever to roam and wander.
    But if you allow me to pause before I must go,
    I'll spin you tales of mystery and wonder.


    Site: Night Productions

  5. #5
    WeeZer51402's Avatar
    WeeZer51402 is offline Registered User
    Join Date
    Dec 2002
    Location
    Lost in my own unintelligible ramblings
    Posts
    475
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok i found somemore info at apples developer site but what i want this program to do is to create afp share points which needs to be done through netinfo but i need someone that knows about the netinfo c functions so i dont trash my system(ill probably set up a system to just do this with and save a backup copy of the netinfo database on the cd so i can just restore it if i do trash it) but if anyone has used <netinfo/ni.h> before please give me a heads up about what im getting into.
    ON THE WAY:
    15" PB 1.67|100|1024 --- 10.4
    ------------------------------------------
    17" iMac G5 1.8|80|512|BT --- 10.3.9
    FrankenMac G4 500|55|640 --- 10.3.9
    PowerMac 9600 300|4|512 --- 1.2
    eMachine 500is 500|4.3|196 --- OpenStep 4.2
    Server 2.3|260|512 --- FedoraCore

  6. #6
    Darkshadow's Avatar
    Darkshadow is offline wandering shadow
    Join Date
    Jul 2001
    Location
    DE, USA
    Posts
    1,532
    Thanks
    0
    Thanked 1 Time in 1 Post
    I haven't ever used the netinfo stuff, but it doesn't seem too bad. The header file & the man page together seem pretty good at stepping through what is needed.

    One thing I do know, you'll have to be root or use sudo (or if you're making a Cocoa program, use the Security framework) to be able to change anything in the netinfo domain.
    I am but a lonely shadow,
    Doomed forever to roam and wander.
    But if you allow me to pause before I must go,
    I'll spin you tales of mystery and wonder.


    Site: Night Productions

 

 

Similar Threads

  1. NetInfo problem & Print to a postcript file
    By MERLIN_ti in forum Mac OS X System & Mac Software
    Replies: 2
    Last Post: June 21st, 2002, 06:51 AM
  2. NetInfo Manager and nibindd
    By ShowMe in forum Mac OS X System & Mac Software
    Replies: 2
    Last Post: March 29th, 2002, 12:43 AM
  3. 10.1 breaks NetInfo Manager
    By slur in forum Mac OS X System & Mac Software
    Replies: 1
    Last Post: October 5th, 2001, 02:00 PM
  4. Can a NetInfo Domain be setup w/o OSX Server???
    By hfastedge in forum Mac OS X System & Mac Software
    Replies: 6
    Last Post: October 1st, 2001, 12:25 AM
  5. NetInfo Manager hosed
    By scruffy in forum Mac OS X System & Mac Software
    Replies: 0
    Last Post: April 28th, 2001, 01:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •