]> git.ipfire.org Git - thirdparty/glibc.git/blob - nis/rpcsvc/nislib.h
Update.
[thirdparty/glibc.git] / nis / rpcsvc / nislib.h
1 /* Copyright (C) 1997 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If not,
17 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
19
20 #ifndef __RPCSVC_NISLIB_H__
21 #define __RPCSVC_NISLIB_H__
22
23 #include <features.h>
24
25 __BEGIN_DECLS
26
27 /*
28 ** nis_names
29 */
30 extern nis_result *nis_lookup __P ((__const nis_name, const u_long));
31 extern nis_result *nis_add __P ((__const nis_name, const nis_object *));
32 extern nis_result *nis_remove __P ((__const nis_name, const nis_object *));
33 extern nis_result *nis_modify __P ((__const nis_name, const nis_object *));
34 /*
35 ** nis_table
36 */
37 extern nis_result *nis_list __P ((__const nis_name, const u_long,
38 int (*)(__const nis_name,
39 __const nis_object *,
40 __const void *), __const void *));
41 extern nis_result *nis_add_entry __P ((__const nis_name, __const nis_object *,
42 __const u_long));
43 extern nis_result *nis_modify_entry __P ((__const nis_name,
44 __const nis_object *,
45 __const u_long));
46 extern nis_result *nis_remove_entry __P ((__const nis_name,
47 __const nis_object *,
48 __const u_long));
49 extern nis_result *nis_first_entry __P ((__const nis_name));
50 extern nis_result *nis_next_entry __P ((__const nis_name, __const netobj *));
51 /*
52 ** nis_server
53 */
54 extern nis_error nis_mkdir __P ((__const nis_name, __const nis_server *));
55 extern nis_error nis_rmdir __P ((__const nis_name, __const nis_server *));
56 extern nis_error nis_servstate __P ((__const nis_server *, __const nis_tag *,
57 __const int, nis_tag **));
58 extern nis_error nis_stats __P ((__const nis_server *, __const nis_tag *,
59 __const int, nis_tag **));
60 extern void nis_freetags __P ((nis_tag *, __const int));
61 extern nis_server **nis_getservlist __P ((__const nis_name));
62 extern void nis_freeservlist __P ((nis_server **));
63 /*
64 ** nis_subr
65 */
66 extern nis_name nis_leaf_of __P ((__const nis_name));
67 extern nis_name nis_leaf_of_r __P ((__const nis_name, char *, size_t));
68 extern nis_name nis_name_of __P ((__const nis_name));
69 extern nis_name nis_name_of_r __P ((__const nis_name, char *, size_t));
70 extern nis_name nis_domain_of __P ((__const nis_name));
71 extern nis_name nis_domain_of_r __P ((__const nis_name, char *, size_t));
72 extern nis_name *nis_getnames __P ((__const nis_name));
73 extern void nis_freenames __P ((nis_name *));
74 extern name_pos nis_dir_cmp __P ((nis_name, nis_name));
75 extern nis_object *nis_clone_object __P ((__const nis_object *, nis_object *));
76 extern void nis_destroy_object __P ((nis_object *));
77 extern void nis_print_object __P ((__const nis_object *));
78 /*
79 ** nis_local_names
80 */
81 extern nis_name nis_local_group __P ((void));
82 extern nis_name nis_local_directory __P ((void));
83 extern nis_name nis_local_principal __P ((void));
84 extern nis_name nis_local_host __P ((void));
85 /*
86 ** nis_error
87 */
88 extern const char *nis_sperrno __P ((__const nis_error));
89 extern void nis_perror __P ((__const nis_error, __const char *));
90 extern void nis_lerror __P ((__const nis_error, __const char *));
91 extern char *nis_sperror __P ((__const nis_error, __const char *));
92 extern char *nis_sperror_r __P ((__const nis_error, __const char *,
93 char *, size_t));
94 /*
95 ** nis_groups
96 */
97 extern bool_t nis_ismember __P ((__const nis_name, __const nis_name));
98 extern nis_error nis_addmember __P ((__const nis_name, __const nis_name));
99 extern nis_error nis_removemember __P ((__const nis_name, __const nis_name));
100 extern nis_error nis_creategroup __P ((__const nis_name, __const u_long));
101 extern nis_error nis_destroygroup __P ((__const nis_name));
102 extern void nis_print_group_entry __P ((__const nis_name));
103 extern nis_error nis_verifygroup __P ((__const nis_name));
104 /*
105 ** nis_ping
106 */
107 extern void nis_ping __P ((__const nis_name, __const u_long,
108 __const nis_object *));
109 extern nis_result *nis_checkpoint __P ((__const nis_name));
110
111 /*
112 ** nis_print (XXX INTERNAL FUNCTIONS, SHOULD NOT BE USED !!)
113 */
114 extern void nis_print_result __P ((__const nis_result *));
115 extern void nis_print_rights __P ((__const u_long));
116 extern void nis_print_directory __P ((__const directory_obj *));
117 extern void nis_print_group __P ((__const group_obj *));
118 extern void nis_print_table __P ((__const table_obj *));
119 extern void nis_print_link __P ((__const link_obj *));
120 extern void nis_print_entry __P ((__const entry_obj *));
121 /*
122 ** nis_file (XXX INTERNAL FUNCTIONS, SHOULD NOT BE USED !!)
123 */
124 extern directory_obj *readColdStartFile __P ((void));
125 extern bool_t writeColdStartFile __P ((__const directory_obj *));
126 extern nis_object *nis_read_obj __P ((__const char *));
127 extern bool_t nis_write_obj __P ((__const char *, __const nis_object *));
128 /*
129 ** nis_clone - (XXX INTERNAL FUNCTIONS, SHOULD NOT BE USED !!)
130 */
131
132 extern directory_obj *nis_clone_directory __P ((__const directory_obj *,
133 directory_obj *));
134 extern group_obj *nis_clone_group __P ((__const group_obj *, group_obj *));
135 extern table_obj *nis_clone_table __P ((__const table_obj *, table_obj *));
136 extern entry_obj *nis_clone_entry __P ((__const entry_obj *, entry_obj *));
137 extern link_obj *nis_clone_link __P ((__const link_obj *, link_obj *));
138 extern objdata *nis_clone_objdata __P ((__const objdata *, objdata *));
139 extern nis_result *nis_clone_result __P ((__const nis_result *, nis_result *));
140 /*
141 ** nis_free - nis_freeresult
142 */
143 extern void nis_freeresult __P ((nis_result *));
144 /* (XXX INTERNAL FUNCTIONS, SHOULD NOT BE USED !!) */
145 extern void nis_free_attr __P ((nis_attr *));
146 extern void nis_free_request __P ((ib_request *));
147 extern void nis_free_endpoints __P ((endpoint *, int));
148 extern void nis_free_servers __P ((nis_server *, int));
149 extern void nis_free_directory __P ((directory_obj *));
150 extern void nis_free_group __P ((group_obj *));
151 extern void nis_free_table __P ((table_obj *));
152 extern void nis_free_entry __P ((entry_obj *));
153 extern void nis_free_link __P ((link_obj *));
154 extern void nis_free_object __P ((nis_object *));
155
156 /* This is the SUN definition, but I don't know for what we need
157 the directory_obj parameter */
158 /* extern fd_result *nis_finddirectory __P ((directory_obj *, nis_name)); */
159 extern fd_result *__nis_finddirectory __P ((nis_name));
160 extern int __start_clock(int);
161 extern u_long __stop_clock(int);
162
163 __END_DECLS
164
165 #endif /* __RPCSVC_NISLIB_H__ */