2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
26 * NetInfo library entry points
27 * Copyright (C) 1989 by NeXT, Inc.
42 #include <netinfo/ni_prot.h>
43 #include <netinfo/nibind_prot.h>
44 typedef const char *ni_name_const
;
45 #include <netinfo/ni_util.h>
48 * Define some shortcuts
50 #define ninl_len ni_namelist_len
51 #define ninl_val ni_namelist_val
53 #define nipl_len ni_proplist_len
54 #define nipl_val ni_proplist_val
56 #define niil_len ni_idlist_len
57 #define niil_val ni_idlist_val
59 #define niel_len ni_entrylist_len
60 #define niel_val ni_entrylist_val
62 #define nipll_len ni_proplist_list_len
63 #define nipll_val ni_proplist_list_val
66 * Arg struct for ni_fancyopen
68 typedef struct ni_fancyopenargs
{
69 int rtimeout
; /* read timeout - 0 for default */
70 int wtimeout
; /* write timeout - 0 for default */
71 int abort
; /* give up on timeout or failure? */
72 int needwrite
; /* need to do writes on this handle? */
76 void *ni_new(void *, const char *);
77 void *ni_connect(struct sockaddr_in
*, const char *);
78 ni_status
ni_addrtag(void *, struct sockaddr_in
*, ni_name
*);
80 const char *ni_error(ni_status
);
82 ni_status
ni_statistics(void *, ni_proplist
*);
83 ni_status
ni_root(void *, ni_id
*);
84 ni_status
ni_self(void *, ni_id
*);
85 ni_status
ni_parent(void *, ni_id
*, ni_index
*);
87 ni_status
ni_create(void *, ni_id
*, ni_proplist
, ni_id
*, ni_index
);
88 ni_status
ni_destroy(void *, ni_id
*, ni_id
);
90 ni_status
ni_read(void *, ni_id
*, ni_proplist
*);
91 ni_status
ni_write(void *, ni_id
*, ni_proplist
);
93 ni_status
ni_children(void *, ni_id
*, ni_idlist
*);
94 ni_status
ni_list(void *, ni_id
*, ni_name_const
, ni_entrylist
*);
95 ni_status
ni_listall(void *, ni_id
*, ni_proplist_list
*);
96 ni_status
ni_lookup(void *, ni_id
*, ni_name_const
, ni_name_const
,
98 ni_status
ni_lookupread(void *, ni_id
*, ni_name_const
, ni_name_const
,
100 ni_status
ni_lookupprop(void *, ni_id
*, ni_name_const
, ni_namelist
*);
101 ni_status
ni_renameprop(void *, ni_id
*, ni_index
, ni_name_const
);
102 ni_status
ni_listprops(void *, ni_id
*, ni_namelist
*);
104 ni_status
ni_createprop(void *, ni_id
*, ni_property
, ni_index
);
105 ni_status
ni_destroyprop(void *, ni_id
*, ni_index
);
106 ni_status
ni_readprop(void *, ni_id
*, ni_index
, ni_namelist
*);
107 ni_status
ni_writeprop(void *, ni_id
*, ni_index
, ni_namelist
);
109 ni_status
ni_createname(void *, ni_id
*, ni_index
, ni_name_const
, ni_index
);
110 ni_status
ni_destroyname(void *, ni_id
*, ni_index
, ni_index
);
111 ni_status
ni_readname(void *, ni_id
*, ni_index
, ni_index
, ni_name
*);
112 ni_status
ni_writename(void *, ni_id
*, ni_index
, ni_index
, ni_name_const
);
114 ni_status
ni_pathsearch(void *, ni_id
*, ni_name_const
);
115 ni_status
ni_open(void *, ni_name_const
, void **);
116 ni_status
ni_fancyopen(void *, ni_name_const
, void **, ni_fancyopenargs
*);
118 ni_status
ni_pwdomain(void *, ni_name
*);
120 ni_status
ni_resync(void *);
122 ni_status
ni_setuser(void *, ni_name_const
);
123 ni_status
ni_setpassword(void *, ni_name_const
);
124 void ni_setreadtimeout(void *, int);
125 void ni_setwritetimeout(void *, int);
126 void ni_setabort(void *, int);
127 void ni_needwrite(void *, int);