4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * db_mindex_c.x
23 *
24 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
25 * Use is subject to license terms.
26 */
27
28 #if RPC_HDR
29 %#ifndef _DB_MINDEX_H
30 %#define _DB_MINDEX_H
31
32 #ifdef USINGC
33 %#include "db_vers_c.h"
34 %#include "db_table_c.h"
35 %#include "db_index_entry_c.h"
36 %#include "db_index_c.h"
37 %#include "db_scheme_c.h"
38 %#include "db_query_c.h"
39 #else
40 %#include "db_vers.h"
41 %#include "db_table.h"
42 %#include "db_index_entry.h"
43 %#include "db_index.h"
44 %#include "db_scheme.h"
45 %#include "db_query.h"
46 #endif /* USINGC */
47 %#include "ldap_parse.h"
72 db_table *table;
73 db_scheme *scheme;
74 __nisdb_ptr_t objPath;
75 __nisdb_flag_t noWriteThrough;
76 __nisdb_flag_t noLDAPquery;
77 __nisdb_flag_t initialLoad;
78 __nisdb_ptr_t dbptr;
79 __nisdb_rwlock_t mindex_rwlock;
80 };
81 typedef struct db_mindex * db_mindex_p;
82
83 typedef string strP<>;
84
85 struct xdr_nis_object_s {
86 int xversion;
87 nis_object *obj;
88 strP dirEntry<>;
89 };
90 typedef struct xdr_nis_object_s xdr_nis_object_t;
91
92 %extern bool_t xdr_nis_object();
93 #endif /* USINGC */
94 #endif /* RPC_HDR */
95
96 #ifndef USINGC
97 #ifdef RPC_HDR
98 %
99 %struct xdr_nis_object_s {
100 % int version;
101 % nis_object *obj;
102 % struct {
103 % uint_t dirEntry_len;
104 % char **dirEntry_val;
105 % } dirEntry;
106 %};
107 %typedef struct xdr_nis_object_s xdr_nis_object_t;
108 %
109 %extern bool_t xdr_nis_object();
110 %
111 %class db_mindex {
112 % vers rversion;
113 %// int num_indices;
114 %// db_index * indices; /* indices[num_indices] */
115 % struct {
116 % int indices_len;
117 % db_index *indices_val;
118 % } indices;
119 % db_table *table;
120 % db_scheme *scheme;
121 % __nisdb_ptr_t objPath;
122 % __nisdb_flag_t noWriteThrough;
123 % __nisdb_flag_t noLDAPquery;
124 % __nisdb_flag_t initialLoad;
125 % __nisdb_ptr_t dbptr;
126 % STRUCTRWLOCK(mindex);
127 %
128 %/* Return a list of index_entries that satsify the given query 'q'.
129 % Return the size of the list in 'count'. Return NULL if list is empty.
130 % Return in 'valid' FALSE if query is not well formed. */
|
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * db_mindex_c.x
23 *
24 * Copyright 2015 Gary Mills
25 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
27 */
28
29 #if RPC_XDR
30 %#include "ldap_xdr.h"
31 %#include "nis_clnt.h"
32 #endif /* RPC_XDR */
33
34 #if RPC_HDR
35 %#ifndef _DB_MINDEX_H
36 %#define _DB_MINDEX_H
37
38 #ifdef USINGC
39 %#include "db_vers_c.h"
40 %#include "db_table_c.h"
41 %#include "db_index_entry_c.h"
42 %#include "db_index_c.h"
43 %#include "db_scheme_c.h"
44 %#include "db_query_c.h"
45 #else
46 %#include "db_vers.h"
47 %#include "db_table.h"
48 %#include "db_index_entry.h"
49 %#include "db_index.h"
50 %#include "db_scheme.h"
51 %#include "db_query.h"
52 #endif /* USINGC */
53 %#include "ldap_parse.h"
78 db_table *table;
79 db_scheme *scheme;
80 __nisdb_ptr_t objPath;
81 __nisdb_flag_t noWriteThrough;
82 __nisdb_flag_t noLDAPquery;
83 __nisdb_flag_t initialLoad;
84 __nisdb_ptr_t dbptr;
85 __nisdb_rwlock_t mindex_rwlock;
86 };
87 typedef struct db_mindex * db_mindex_p;
88
89 typedef string strP<>;
90
91 struct xdr_nis_object_s {
92 int xversion;
93 nis_object *obj;
94 strP dirEntry<>;
95 };
96 typedef struct xdr_nis_object_s xdr_nis_object_t;
97
98 #endif /* USINGC */
99 #endif /* RPC_HDR */
100
101 #ifndef USINGC
102 #ifdef RPC_HDR
103 %
104 %struct xdr_nis_object_s {
105 % int version;
106 % nis_object *obj;
107 % struct {
108 % uint_t dirEntry_len;
109 % char **dirEntry_val;
110 % } dirEntry;
111 %};
112 %typedef struct xdr_nis_object_s xdr_nis_object_t;
113 %
114 %class db_mindex {
115 % vers rversion;
116 %// int num_indices;
117 %// db_index * indices; /* indices[num_indices] */
118 % struct {
119 % int indices_len;
120 % db_index *indices_val;
121 % } indices;
122 % db_table *table;
123 % db_scheme *scheme;
124 % __nisdb_ptr_t objPath;
125 % __nisdb_flag_t noWriteThrough;
126 % __nisdb_flag_t noLDAPquery;
127 % __nisdb_flag_t initialLoad;
128 % __nisdb_ptr_t dbptr;
129 % STRUCTRWLOCK(mindex);
130 %
131 %/* Return a list of index_entries that satsify the given query 'q'.
132 % Return the size of the list in 'count'. Return NULL if list is empty.
133 % Return in 'valid' FALSE if query is not well formed. */
|