source: rtems/cpukit/librpc/include/rpcsvc/nis_db.h @ f26145b

4.104.114.84.95
Last change on this file since f26145b was df49c60, checked in by Joel Sherrill <joel.sherrill@…>, on 06/12/00 at 15:00:15

Merged from 4.5.0-beta3a

  • Property mode set to 100644
File size: 4.4 KB
Line 
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 * $FreeBSD: src/include/rpcsvc/nis_db.h,v 1.5 1999/08/27 23:45:09 peter Exp $
30 */
31
32/*
33 * Copyright (c) 1991, by Sun Microsystems Inc.
34 */
35
36/*
37 * This header file defines the interface to the NIS database. All
38 * implementations of the database must export at least these routines.
39 * They must also follow the conventions set herein. See the implementors
40 * guide for specific semantics that are required.
41 */
42
43#ifndef _RPCSVC_NIS_DB_H
44#define _RPCSVC_NIS_DB_H
45
46
47/* From: #pragma ident  "@(#)nis_db.h   1.8     94/05/03 SMI" */
48
49/*
50 * Note: although the version of <rpcsvc/nis_db.h> shipped with Solaris
51 * 2.5/2.5.x is actually older than this one (according to the ident
52 * string), it contains changes and a few added functions. Those changes
53 * have been hand merged into this file to bring it up to date.
54 */
55
56#include <rpc/rpc.h>
57#include <rpcsvc/nis.h>
58
59#ifdef  __cplusplus
60extern "C" {
61#endif
62
63enum db_status {
64        DB_SUCCESS = 0,
65        DB_NOTFOUND = 1,
66        DB_NOTUNIQUE = 2,
67        DB_BADTABLE = 3,
68        DB_BADQUERY = 4,
69        DB_BADOBJECT = 5,
70        DB_MEMORY_LIMIT = 6,
71        DB_STORAGE_LIMIT = 7,
72        DB_INTERNAL_ERROR = 8
73};
74typedef enum db_status db_status;
75
76enum db_action {
77        DB_LOOKUP = 0,
78        DB_REMOVE = 1,
79        DB_ADD = 2,
80        DB_FIRST = 3,
81        DB_NEXT = 4,
82        DB_ALL = 5,
83        DB_RESET_NEXT = 6
84};
85typedef enum db_action db_action;
86
87typedef entry_obj *entry_object_p;
88
89typedef struct {
90        u_int db_next_desc_len;
91        char *db_next_desc_val;
92} db_next_desc;
93
94struct db_result {
95        db_status status;
96        db_next_desc nextinfo;
97        struct {
98                u_int objects_len;
99                entry_object_p *objects_val;
100        } objects;
101        long ticks;
102};
103typedef struct db_result db_result;
104
105/*
106 * Prototypes for the database functions.
107 */
108
109#if (__STDC__)
110
111extern bool_t db_initialize(char *);
112#ifdef ORIGINAL_DECLS
113extern bool_t db_create_table(char *, table_obj *);
114extern bool_t db_destroy_table(char *);
115#else
116extern db_status db_create_table(char *, table_obj *);
117extern db_status db_destroy_table(char *);
118#endif
119extern db_result *db_first_entry(char *, int, nis_attr *);
120extern db_result *db_next_entry(char *, db_next_desc *);
121extern db_result *db_reset_next_entry(char *, db_next_desc *);
122extern db_result *db_list_entries(char *, int, nis_attr *);
123extern db_result *db_add_entry(char *, int,  nis_attr *, entry_obj *);
124extern db_result *db_remove_entry(char *, int, nis_attr *);
125extern db_status db_checkpoint(char *);
126extern db_status db_standby(char *);
127#ifndef ORIGINAL_DECLS
128extern db_status db_table_exists(char *);
129extern db_status db_unload_table(char *);
130extern void db_free_result(db_result *);
131#endif
132
133#else /* Non-prototype definitions */
134
135extern bool_t db_initialize();
136#ifdef ORIGINAL_DECLS
137extern bool_t db_create_table();
138extern bool_t db_destroy_table();
139#else
140extern db_status db_create_table();
141extern db_status db_destroy_table();
142#endif
143extern db_result *db_first_entry();
144extern db_result *db_next_entry();
145extern db_result *db_reset_next_entry();
146extern db_result *db_list_entries();
147extern db_result *db_add_entry();
148extern db_result *db_remove_entry();
149extern db_status db_checkpoint();
150extern db_status db_standby();
151#ifndef ORIGINAL_DECLS
152extern db_status db_table_exists();
153extern db_status db_unload_table();
154extern void db_free_result();
155#endif
156#endif  /* __STDC__ */
157
158#ifdef __cplusplus
159}
160#endif
161
162#endif  /* _RPCSVC_NIS_DB_H */
Note: See TracBrowser for help on using the repository browser.