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.
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.
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.
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.
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.
25 * Sun Microsystems, Inc.
27 * Mountain View, California 94043
29 * $FreeBSD: src/include/rpcsvc/nis_db.h,v 1.5 1999/08/27 23:45:09 peter Exp $
30 * $DragonFly: src/include/rpcsvc/nis_db.h,v 1.2 2003/06/17 04:25:58 dillon Exp $
34 * Copyright (c) 1991, by Sun Microsystems Inc.
38 * This header file defines the interface to the NIS database. All
39 * implementations of the database must export at least these routines.
40 * They must also follow the conventions set herein. See the implementors
41 * guide for specific semantics that are required.
44 #ifndef _RPCSVC_NIS_DB_H
45 #define _RPCSVC_NIS_DB_H
48 /* From: #pragma ident "@(#)nis_db.h 1.8 94/05/03 SMI" */
51 * Note: although the version of <rpcsvc/nis_db.h> shipped with Solaris
52 * 2.5/2.5.x is actually older than this one (according to the ident
53 * string), it contains changes and a few added functions. Those changes
54 * have been hand merged into this file to bring it up to date.
58 #include <rpcsvc/nis.h>
75 typedef enum db_status db_status;
86 typedef enum db_action db_action;
88 typedef entry_obj *entry_object_p;
91 u_int db_next_desc_len;
92 char *db_next_desc_val;
97 db_next_desc nextinfo;
100 entry_object_p *objects_val;
104 typedef struct db_result db_result;
107 * Prototypes for the database functions.
112 extern bool_t db_initialize(char *);
113 #ifdef ORIGINAL_DECLS
114 extern bool_t db_create_table(char *, table_obj *);
115 extern bool_t db_destroy_table(char *);
117 extern db_status db_create_table(char *, table_obj *);
118 extern db_status db_destroy_table(char *);
120 extern db_result *db_first_entry(char *, int, nis_attr *);
121 extern db_result *db_next_entry(char *, db_next_desc *);
122 extern db_result *db_reset_next_entry(char *, db_next_desc *);
123 extern db_result *db_list_entries(char *, int, nis_attr *);
124 extern db_result *db_add_entry(char *, int, nis_attr *, entry_obj *);
125 extern db_result *db_remove_entry(char *, int, nis_attr *);
126 extern db_status db_checkpoint(char *);
127 extern db_status db_standby(char *);
128 #ifndef ORIGINAL_DECLS
129 extern db_status db_table_exists(char *);
130 extern db_status db_unload_table(char *);
131 extern void db_free_result(db_result *);
134 #else /* Non-prototype definitions */
136 extern bool_t db_initialize();
137 #ifdef ORIGINAL_DECLS
138 extern bool_t db_create_table();
139 extern bool_t db_destroy_table();
141 extern db_status db_create_table();
142 extern db_status db_destroy_table();
144 extern db_result *db_first_entry();
145 extern db_result *db_next_entry();
146 extern db_result *db_reset_next_entry();
147 extern db_result *db_list_entries();
148 extern db_result *db_add_entry();
149 extern db_result *db_remove_entry();
150 extern db_status db_checkpoint();
151 extern db_status db_standby();
152 #ifndef ORIGINAL_DECLS
153 extern db_status db_table_exists();
154 extern db_status db_unload_table();
155 extern void db_free_result();
157 #endif /* __STDC__ */
163 #endif /* _RPCSVC_NIS_DB_H */