]>
git.saurik.com Git - apple/libinfo.git/blob - netinfo.subproj/ni.h
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7 * Reserved. This file contains Original Code and/or Modifications of
8 * Original Code as defined in and that are subject to the Apple Public
9 * Source License Version 1.1 (the "License"). You may not use this file
10 * except in compliance with the License. Please obtain a copy of the
11 * License at http://www.apple.com/publicsource and read it before using
14 * The Original Code and all software distributed under the License are
15 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
19 * License for the specific language governing rights and limitations
22 * @APPLE_LICENSE_HEADER_END@
25 * NetInfo library entry points
26 * Copyright (C) 1989 by NeXT, Inc.
41 #include <netinfo/ni_prot.h>
42 #include <netinfo/nibind_prot.h>
43 typedef const char *ni_name_const
;
44 #include <netinfo/ni_util.h>
47 * Define some shortcuts
49 #define ninl_len ni_namelist_len
50 #define ninl_val ni_namelist_val
52 #define nipl_len ni_proplist_len
53 #define nipl_val ni_proplist_val
55 #define niil_len ni_idlist_len
56 #define niil_val ni_idlist_val
58 #define niel_len ni_entrylist_len
59 #define niel_val ni_entrylist_val
61 #define nipll_len ni_proplist_list_len
62 #define nipll_val ni_proplist_list_val
65 * Arg struct for ni_fancyopen
67 typedef struct ni_fancyopenargs
{
68 int rtimeout
; /* read timeout - 0 for default */
69 int wtimeout
; /* write timeout - 0 for default */
70 int abort
; /* give up on timeout or failure? */
71 int needwrite
; /* need to do writes on this handle? */
75 void *ni_new(void *, const char *);
76 void *ni_connect(struct sockaddr_in
*, const char *);
77 ni_status
ni_addrtag(void *, struct sockaddr_in
*, ni_name
*);
79 const char *ni_error(ni_status
);
81 ni_status
ni_statistics(void *, ni_proplist
*);
82 ni_status
ni_root(void *, ni_id
*);
83 ni_status
ni_self(void *, ni_id
*);
84 ni_status
ni_parent(void *, ni_id
*, ni_index
*);
86 ni_status
ni_create(void *, ni_id
*, ni_proplist
, ni_id
*, ni_index
);
87 ni_status
ni_destroy(void *, ni_id
*, ni_id
);
89 ni_status
ni_read(void *, ni_id
*, ni_proplist
*);
90 ni_status
ni_write(void *, ni_id
*, ni_proplist
);
92 ni_status
ni_children(void *, ni_id
*, ni_idlist
*);
93 ni_status
ni_list(void *, ni_id
*, ni_name_const
, ni_entrylist
*);
94 ni_status
ni_listall(void *, ni_id
*, ni_proplist_list
*);
95 ni_status
ni_lookup(void *, ni_id
*, ni_name_const
, ni_name_const
,
97 ni_status
ni_lookupread(void *, ni_id
*, ni_name_const
, ni_name_const
,
99 ni_status
ni_lookupprop(void *, ni_id
*, ni_name_const
, ni_namelist
*);
100 ni_status
ni_renameprop(void *, ni_id
*, ni_index
, ni_name_const
);
101 ni_status
ni_listprops(void *, ni_id
*, ni_namelist
*);
103 ni_status
ni_createprop(void *, ni_id
*, ni_property
, ni_index
);
104 ni_status
ni_destroyprop(void *, ni_id
*, ni_index
);
105 ni_status
ni_readprop(void *, ni_id
*, ni_index
, ni_namelist
*);
106 ni_status
ni_writeprop(void *, ni_id
*, ni_index
, ni_namelist
);
108 ni_status
ni_createname(void *, ni_id
*, ni_index
, ni_name_const
, ni_index
);
109 ni_status
ni_destroyname(void *, ni_id
*, ni_index
, ni_index
);
110 ni_status
ni_readname(void *, ni_id
*, ni_index
, ni_index
, ni_name
*);
111 ni_status
ni_writename(void *, ni_id
*, ni_index
, ni_index
, ni_name_const
);
113 ni_status
ni_pathsearch(void *, ni_id
*, ni_name_const
);
114 ni_status
ni_open(void *, ni_name_const
, void **);
115 ni_status
ni_fancyopen(void *, ni_name_const
, void **, ni_fancyopenargs
*);
117 ni_status
ni_pwdomain(void *, ni_name
*);
119 ni_status
ni_resync(void *);
121 ni_status
ni_setuser(void *, ni_name_const
);
122 ni_status
ni_setpassword(void *, ni_name_const
);
123 void ni_setreadtimeout(void *, int);
124 void ni_setwritetimeout(void *, int);
125 void ni_setabort(void *, int);
126 void ni_needwrite(void *, int);