4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
25 * Copyright (c) 1991,1997-1998 by Sun Microsystems, Inc.
26 * All rights reserved.
30 * This header file defines the interface to the NIS database. All
31 * implementations of the database must export at least these routines.
32 * They must also follow the conventions set herein. See the implementors
33 * guide for specific semantics that are required.
36 #ifndef _RPCSVC_NIS_DB_H
37 #define _RPCSVC_NIS_DB_H
40 #include <rpcsvc/nis.h>
57 typedef enum db_status db_status
;
68 typedef enum db_action db_action
;
70 typedef entry_obj
*entry_object_p
;
73 uint_t db_next_desc_len
;
74 char *db_next_desc_val
;
79 db_next_desc nextinfo
;
82 entry_object_p
*objects_val
;
86 typedef struct db_result db_result
;
89 * Prototypes for the database functions.
92 extern bool_t
db_initialize(char *);
93 extern db_status
db_create_table(char *, table_obj
*);
94 extern db_status
db_destroy_table(char *);
95 extern db_result
*db_first_entry(char *, int, nis_attr
*);
96 extern db_result
*db_next_entry(char *, db_next_desc
*);
97 extern db_result
*db_reset_next_entry(char *, db_next_desc
*);
98 extern db_result
*db_list_entries(char *, int, nis_attr
*);
99 extern db_result
*db_add_entry(char *, int, nis_attr
*, entry_obj
*);
100 extern db_result
*db_remove_entry(char *, int, nis_attr
*);
101 extern db_status
db_checkpoint(char *);
102 extern db_status
db_standby(char *);
103 extern db_status
db_table_exists(char *);
104 extern db_status
db_unload_table(char *);
105 extern void db_free_result(db_result
*);
111 #endif /* _RPCSVC_NIS_DB_H */