RTEMS: cpukit/librpc/include/rpcsvc/nislib.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
nislib.h
1/*
2 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
3 * unrestricted use provided that this legend is included on all tape
4 * media and as a part of the software program in whole or part. Users
5 * may copy or modify Sun RPC without charge, but are not authorized
6 * to license or distribute it to anyone else except as part of a product or
7 * program developed by the user.
8 *
9 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
10 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
11 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
12 *
13 * Sun RPC is provided with no support and without any obligation on the
14 * part of Sun Microsystems, Inc. to assist in its use, correction,
15 * modification or enhancement.
16 *
17 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
18 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
19 * OR ANY PART THEREOF.
20 *
21 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
22 * or profits or other special, indirect and consequential damages, even if
23 * Sun has been advised of the possibility of such damages.
24 *
25 * Sun Microsystems, Inc.
26 * 2550 Garcia Avenue
27 * Mountain View, California 94043
28 */
29
30/*
31 * Copyright (c) 1991, Sun Microsystems Inc.
32 */
33
34/*
35 * This file contains the interfaces that are visible in the SunOS 5.x
36 * implementation of NIS Plus. When using C++ the defined __cplusplus and
37 * __STDC__ should both be true.
38 */
39
40#ifndef _RPCSVC_NISLIB_H
41#define _RPCSVC_NISLIB_H
42
43/* From: #pragma ident "@(#)nislib.h 1.16 94/05/03 SMI" */
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49 struct signature {
50 int signature_len;
51 char *signature_val;
52};
53
54#ifdef __STDC__
55extern void nis_freeresult(nis_result *);
56extern nis_result * nis_lookup(nis_name, u_long);
57extern nis_result * nis_list(nis_name, u_long,
58 int (*)(nis_name, nis_object *, void *), void *);
59extern nis_result * nis_add(nis_name, nis_object *);
60extern nis_result * nis_remove(nis_name, nis_object *);
61extern nis_result * nis_modify(nis_name, nis_object *);
62
63extern nis_result * nis_add_entry(nis_name, nis_object *, u_long);
64extern nis_result * nis_remove_entry(nis_name, nis_object *, u_long);
65extern nis_result * nis_modify_entry(nis_name, nis_object *, u_long);
66extern nis_result * nis_first_entry(nis_name);
67extern nis_result * nis_next_entry(nis_name, netobj *);
68
69extern nis_error nis_mkdir(nis_name, nis_server *);
70extern nis_error nis_rmdir(nis_name, nis_server *);
71extern name_pos nis_dir_cmp(nis_name, nis_name);
72
73extern nis_name * nis_getnames(nis_name);
74extern void nis_freenames(nis_name *);
75extern nis_name nis_domain_of(nis_name);
76extern nis_name nis_leaf_of(nis_name);
77extern nis_name nis_leaf_of_r(const nis_name, char *, size_t);
78extern nis_name nis_name_of(nis_name);
79extern nis_name nis_local_group(void);
80extern nis_name nis_local_directory(void);
81extern nis_name nis_local_principal(void);
82extern nis_name nis_local_host(void);
83
84extern void nis_destroy_object(nis_object *);
85extern nis_object * nis_clone_object(nis_object *, nis_object *);
86extern void nis_print_object(nis_object *);
87
88extern char * nis_sperrno(nis_error);
89extern void nis_perror(nis_error, char *);
90extern char * nis_sperror(nis_error, char *);
91extern void nis_lerror(nis_error, char *);
92
93extern void nis_print_group_entry(nis_name);
94extern bool_t nis_ismember(nis_name, nis_name);
95extern nis_error nis_creategroup(nis_name, u_long);
96extern nis_error nis_destroygroup(nis_name);
97extern nis_error nis_addmember(nis_name, nis_name);
98extern nis_error nis_removemember(nis_name, nis_name);
99extern nis_error nis_verifygroup(nis_name);
100
101extern void nis_freeservlist(nis_server **);
102extern nis_server ** nis_getservlist(nis_name);
103extern nis_error nis_stats(nis_server *, nis_tag *, int, nis_tag **);
104extern nis_error nis_servstate(nis_server *, nis_tag *, int, nis_tag **);
105extern void nis_freetags(nis_tag *, int);
106
107extern nis_result * nis_checkpoint(nis_name);
108extern void nis_ping(nis_name, u_long, nis_object *);
109
110/*
111 * XXX: PLEASE NOTE THAT THE FOLLOWING FUNCTIONS ARE INTERNAL
112 * TO NIS+ AND SHOULD NOT BE USED BY ANY APPLICATION PROGRAM.
113 * THEIR SEMANTICS AND/OR SIGNATURE CAN CHANGE WITHOUT NOTICE.
114 * SO, PLEASE DO NOT USE THEM. YOU ARE WARNED!!!!
115 */
116
117extern char ** __break_name(nis_name, int *);
118extern int __name_distance(char **, char **);
119extern nis_result * nis_make_error(nis_error, u_long, u_long, u_long, u_long);
120extern nis_attr * __cvt2attr(int *, char **);
121extern void nis_free_request(ib_request *);
122extern nis_error nis_get_request(nis_name, nis_object *, netobj*, ib_request*);
123extern nis_object * nis_read_obj(char *);
124extern int nis_write_obj(char *, nis_object *);
125extern int nis_in_table(nis_name, NIS_HASH_TABLE *, int *);
126extern int nis_insert_item(NIS_HASH_ITEM *, NIS_HASH_TABLE *);
127extern NIS_HASH_ITEM * nis_find_item(nis_name, NIS_HASH_TABLE *);
128extern NIS_HASH_ITEM * nis_remove_item(nis_name, NIS_HASH_TABLE *);
129extern void nis_insert_name(nis_name, NIS_HASH_TABLE *);
130extern void nis_remove_name(nis_name, NIS_HASH_TABLE *);
131extern CLIENT * nis_make_rpchandle(nis_server *, int, u_long, u_long, u_long,
132 int, int);
133extern void * nis_get_static_storage(struct nis_sdata *, u_long, u_long);
134extern char * nis_data(char *);
135extern void nis_print_rights(u_long);
136extern void nis_print_directory(directory_obj *);
137extern void nis_print_group(group_obj *);
138extern void nis_print_table(table_obj *);
139extern void nis_print_link(link_obj *);
140extern void nis_print_entry(entry_obj *);
141extern nis_object * nis_get_object(char *, char *, char *, u_long, u_long,
142 zotypes);
143extern nis_server * __nis_init_callback(CLIENT *,
144 int (*)(nis_name, nis_object *, void *), void *);
145extern int nis_getdtblsize(void);
146extern int __nis_run_callback(netobj *, u_long, struct timeval *, CLIENT *);
147
148extern log_result *nis_dumplog(nis_server *, nis_name, u_long);
149extern log_result *nis_dump(nis_server *, nis_name,
150 int (*)(nis_name, nis_object *, void *));
151
152extern bool_t __do_ismember(nis_name, nis_name,
153 nis_result *(*)(nis_name, u_long));
154extern nis_name __nis_map_group(nis_name);
155extern nis_name __nis_map_group_r(nis_name, char*, size_t);
156
157extern nis_error __nis_CacheBind(char *, directory_obj *);
158extern nis_error __nis_CacheSearch(char *, directory_obj *);
159extern bool_t __nis_CacheRemoveEntry(directory_obj *);
160extern void __nis_CacheRestart(void);
161extern void __nis_CachePrint(void);
162extern void __nis_CacheDumpStatistics(void);
163extern bool_t writeColdStartFile(directory_obj *);
164
165extern CLIENT * __get_ti_clnt(char *, CLIENT *, char **, pid_t *);
166extern int __strcmp_case_insens(char *, char *);
167extern int __strncmp_case_insens(char *, char *);
168
169extern fd_result * nis_finddirectory(directory_obj *, nis_name);
170extern int __start_clock(int);
171extern u_long __stop_clock(int);
172
173/*
174 * This particular function is part of the FreeBSD NIS+ implementation
175 * only. Ideally it should be somewhere else, but it is used by both
176 * rpc.nisd and nis_cachemgr, and there aren't that many headers common
177 * to both programs.
178 */
179
180extern struct signature *__nis_calculate_encrypted_cksum(unsigned char *, unsigned int, char *, int);
181
182#else
183
184/* Non-prototype definitions (old fashioned C) */
185
186extern void nis_freeresult();
187extern nis_result * nis_lookup();
188extern nis_result * nis_list();
189extern nis_result * nis_add();
190extern nis_result * nis_remove();
191extern nis_result * nis_modify();
192
193extern nis_result * nis_add_entry();
194extern nis_result * nis_remove_entry();
195extern nis_result * nis_modify_entry();
196extern nis_result * nis_first_entry();
197extern nis_result * nis_next_entry();
198
199extern nis_error nis_mkdir();
200extern nis_error nis_rmdir();
201extern name_pos nis_dir_cmp();
202
203extern nis_name *nis_getnames();
204extern void nis_freenames();
205extern nis_name nis_domain_of();
206extern nis_name nis_leaf_of();
207extern nis_name nis_leaf_of_r();
208extern nis_name nis_name_of();
209extern nis_name nis_local_group();
210extern nis_name nis_local_directory();
211extern nis_name nis_local_principal();
212extern nis_name nis_local_host();
213
214extern void nis_destroy_object();
215extern nis_object * nis_clone_object();
216extern void nis_print_object();
217
218extern char * nis_sperrno();
219extern void nis_perror();
220extern char * nis_sperror();
221extern void nis_lerror();
222
223extern void nis_print_group_entry();
224extern bool_t nis_ismember();
225extern nis_error nis_creategroup();
226extern nis_error nis_destroygroup();
227extern nis_error nis_addmember();
228extern nis_error nis_removemember();
229extern nis_error nis_verifygroup();
230
231extern void nis_freeservlist();
232extern nis_server ** nis_getservlist();
233extern nis_error nis_stats();
234extern nis_error nis_servstate();
235extern void nis_freetags();
236
237extern nis_result * nis_checkpoint();
238extern void nis_ping();
239
240/*
241 * XXX: PLEASE NOTE THAT THE FOLLOWING FUNCTIONS ARE INTERNAL
242 * TO NIS+ AND SHOULD NOT BE USED BY ANY APPLICATION PROGRAM.
243 * THEIR SEMANTICS AND/OR SIGNATURE CAN CHANGE WITHOUT NOTICE.
244 * SO, PLEASE DO NOT USE THEM. YOU ARE WARNED!!!!
245 */
246extern char ** __break_name();
247extern int __name_distance();
248extern nis_result * nis_make_error();
249extern nis_attr * __cvt2attr();
250extern void nis_free_request();
251extern nis_error nis_get_request();
252extern nis_object * nis_read_obj();
253extern int nis_write_obj();
254extern int nis_in_table();
255extern int nis_insert_item();
256extern NIS_HASH_ITEM * nis_find_item();
257extern NIS_HASH_ITEM * nis_remove_item();
258extern void nis_insert_name();
259extern void nis_remove_name();
260extern CLIENT * nis_make_rpchandle();
261extern void * nis_get_static_storage();
262extern char * nis_data();
263
264extern void nis_print_rights();
265extern void nis_print_directory();
266extern void nis_print_group();
267extern void nis_print_table();
268extern void nis_print_link();
269extern void nis_print_entry();
270extern nis_object * nis_get_object();
271
272extern nis_server * __nis_init_callback();
273extern int nis_getdtblsize();
274extern int __nis_run_callback();
275
276extern log_result * nis_dump();
277extern log_result * nis_dumplog();
278
279extern bool_t __do_ismember();
280extern nis_name __nis_map_group();
281extern nis_name __nis_map_group_r();
282
283
284extern nis_error __nis_CacheBind();
285extern directory_obj * __nis_CacheSearch();
286extern bool_t __nis_CacheRemoveEntry();
287extern void __nis_CacheRestart();
288extern void __nis_CachePrint();
289extern void __nis_CacheDumpStatistics();
290extern bool_t writeColdStartFile();
291
292extern CLIENT * __get_ti_clnt();
293extern int __strcmp_case_insens();
294extern int __strncmp_case_insens();
295
296extern fd_result * nis_finddirectory();
297extern int __start_clock();
298extern u_long __stop_clock();
299
300/*
301 * This particular function is part of the FreeBSD NIS+ implementation
302 * only. Ideally it should be somewhere else, but it is used by both
303 * rpc.nisd and nis_cachemgr, and there aren't that many headers common
304 * to both programs.
305 */
306
307extern struct signature *__nis_calculate_encrypted_cksum();
308
309#endif
310
311#define NUL '\0'
312
313#ifdef __cplusplus
314}
315#endif
316
317#endif /* _RPCSVC_NISLIB_H */
signature
Definition: nislib.h:49