]> git.sur5r.net Git - openldap/blob - servers/slapd/slapi/slapi.h
9ea45c9f5e0f3c6c51eb706b05bd7014b84de11d
[openldap] / servers / slapd / slapi / slapi.h
1 /*
2  * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
3  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
4  */
5 /*
6  * (C) Copyright IBM Corp. 1997,2002
7  * Redistribution and use in source and binary forms are permitted
8  * provided that this notice is preserved and that due credit is 
9  * given to IBM Corporation. This software is provided ``as is'' 
10  * without express or implied warranty.
11  */
12
13 #ifndef _SLAPI_H
14 #define _SLAPI_H
15
16 #include <ibm_pblock_params.h> 
17
18 typedef struct  slapi_pblock    Slapi_PBlock;
19 typedef struct  slap_entry      Slapi_Entry;
20 typedef struct  slap_attr       Slapi_Attr;
21 typedef Filter                  Slapi_Filter;
22
23 #include <slapi_utils.h>
24 #ifndef NO_PBLOCK_CLASS
25 #include <slapi_pblock.h>
26 #endif /* NO_PBLOCK_CLASS */
27 #include <plugin.h>
28 #include <slapi_ops.h>
29 #if 0 /* unused (yet?) */
30 #include <slapi_cl.h>
31 #endif /* 0 */
32
33 /*
34  * types of plugins
35  */
36 #define SLAPI_PLUGIN_DATABASE           1
37 #define SLAPI_PLUGIN_EXTENDEDOP         2
38 #define SLAPI_PLUGIN_PREOPERATION       3
39 #define SLAPI_PLUGIN_POSTOPERATION      4
40 #define SLAPI_PLUGIN_MATCHINGRULE       5
41 #define SLAPI_PLUGIN_SYNTAX             6
42 #define SLAPI_PLUGIN_AUDIT              7
43
44 #define SLAPI_PLUGIN_EXTENDED_SENT_RESULT       -1
45 #define SLAPI_PLUGIN_EXTENDED_NOT_HANDLED       -2
46
47 #define SLAPI_BACKEND                           130
48 #define SLAPI_CONNECTION                        131
49 #define SLAPI_OPERATION                         132
50 #define SLAPI_REQUESTOR_ISROOT                  133
51 #define SLAPI_BE_MONITORDN                      134
52 #define SLAPI_BE_TYPE                           135
53 #define SLAPI_BE_READONLY                       136
54 #define SLAPI_BE_LASTMOD                        137
55 #define SLAPI_CONN_ID                           139
56
57 #define SLAPI_OPINITIATED_TIME                  140
58 #define SLAPI_REQUESTOR_DN                      141
59 #define SLAPI_REQUESTOR_ISUPDATEDN              142
60 #define SLAPI_CONN_DN                           143
61 #define SLAPI_CONN_AUTHTYPE                     144
62
63 #define SLAPD_AUTH_NONE   "none"
64 #define SLAPD_AUTH_SIMPLE "simple"
65 #define SLAPD_AUTH_SSL    "SSL"
66 #define SLAPD_AUTH_SASL   "SASL "
67
68 #define SLAPI_PLUGIN                            3
69 #define SLAPI_PLUGIN_PRIVATE                    4
70 #define SLAPI_PLUGIN_TYPE                       5
71 #define SLAPI_PLUGIN_ARGV                       6
72 #define SLAPI_PLUGIN_ARGC                       7
73 #define SLAPI_PLUGIN_VERSION                    8
74
75 #define SLAPI_PLUGIN_OPRETURN                   9
76 #define SLAPI_PLUGIN_OBJECT                     10
77 #define SLAPI_PLUGIN_DESTROY_FN                 11
78
79 #define SLAPI_PLUGIN_DESCRIPTION                12
80
81 #define SLAPI_PLUGIN_INTOP_RESULT               15
82 #define SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES       16
83 #define SLAPI_PLUGIN_INTOP_SEARCH_REFERRALS     17
84
85 #define SLAPI_PLUGIN_DB_BIND_FN                 200
86 #define SLAPI_PLUGIN_DB_UNBIND_FN               201
87 #define SLAPI_PLUGIN_DB_SEARCH_FN               202
88 #define SLAPI_PLUGIN_DB_COMPARE_FN              203
89 #define SLAPI_PLUGIN_DB_MODIFY_FN               204
90 #define SLAPI_PLUGIN_DB_MODRDN_FN               205
91 #define SLAPI_PLUGIN_DB_ADD_FN                  206
92 #define SLAPI_PLUGIN_DB_DELETE_FN               207
93 #define SLAPI_PLUGIN_DB_ABANDON_FN              208
94 #define SLAPI_PLUGIN_DB_CONFIG_FN               209
95 #define SLAPI_PLUGIN_CLOSE_FN                   210
96 #define SLAPI_PLUGIN_DB_FLUSH_FN                211
97 #define SLAPI_PLUGIN_START_FN                   212
98 #define SLAPI_PLUGIN_DB_SEQ_FN                  213
99 #define SLAPI_PLUGIN_DB_ENTRY_FN                214
100 #define SLAPI_PLUGIN_DB_REFERRAL_FN             215
101 #define SLAPI_PLUGIN_DB_RESULT_FN               216
102 #define SLAPI_PLUGIN_DB_LDIF2DB_FN              217
103 #define SLAPI_PLUGIN_DB_DB2LDIF_FN              218
104 #define SLAPI_PLUGIN_DB_BEGIN_FN                219
105 #define SLAPI_PLUGIN_DB_COMMIT_FN               220
106 #define SLAPI_PLUGIN_DB_ABORT_FN                221
107 #define SLAPI_PLUGIN_DB_ARCHIVE2DB_FN           222
108 #define SLAPI_PLUGIN_DB_DB2ARCHIVE_FN           223
109 #define SLAPI_PLUGIN_DB_NEXT_SEARCH_ENTRY_FN    224
110 #define SLAPI_PLUGIN_DB_FREE_RESULT_SET_FN      225
111 #define SLAPI_PLUGIN_DB_SIZE_FN                 226
112 #define SLAPI_PLUGIN_DB_TEST_FN                 227
113 #define SLAPI_PLUGIN_DB_NO_ACL                  250
114
115 #define SLAPI_PLUGIN_EXT_OP_FN                  300
116 #define SLAPI_PLUGIN_EXT_OP_OIDLIST             301
117 #define SLAPI_PLUGIN_PRE_BIND_FN                401
118 #define SLAPI_PLUGIN_PRE_UNBIND_FN              402
119 #define SLAPI_PLUGIN_PRE_SEARCH_FN              403
120 #define SLAPI_PLUGIN_PRE_COMPARE_FN             404
121 #define SLAPI_PLUGIN_PRE_MODIFY_FN              405
122 #define SLAPI_PLUGIN_PRE_MODRDN_FN              406
123 #define SLAPI_PLUGIN_PRE_ADD_FN                 407
124 #define SLAPI_PLUGIN_PRE_DELETE_FN              408
125 #define SLAPI_PLUGIN_PRE_ABANDON_FN             409
126 #define SLAPI_PLUGIN_PRE_ENTRY_FN               410
127 #define SLAPI_PLUGIN_PRE_REFERRAL_FN            411
128 #define SLAPI_PLUGIN_PRE_RESULT_FN              412
129 #define SLAPI_PLUGIN_POST_BIND_FN               501
130 #define SLAPI_PLUGIN_POST_UNBIND_FN             502
131 #define SLAPI_PLUGIN_POST_SEARCH_FN             503
132 #define SLAPI_PLUGIN_POST_COMPARE_FN            504
133 #define SLAPI_PLUGIN_POST_MODIFY_FN             505
134 #define SLAPI_PLUGIN_POST_MODRDN_FN             506
135 #define SLAPI_PLUGIN_POST_ADD_FN                507
136 #define SLAPI_PLUGIN_POST_DELETE_FN             508
137 #define SLAPI_PLUGIN_POST_ABANDON_FN            509
138 #define SLAPI_PLUGIN_POST_ENTRY_FN              510
139 #define SLAPI_PLUGIN_POST_REFERRAL_FN           511
140 #define SLAPI_PLUGIN_POST_RESULT_FN             512
141
142 #define SLAPI_PLUGIN_MR_FILTER_CREATE_FN        600
143 #define SLAPI_PLUGIN_MR_INDEXER_CREATE_FN       601
144 #define SLAPI_PLUGIN_MR_FILTER_MATCH_FN         602
145 #define SLAPI_PLUGIN_MR_FILTER_INDEX_FN         603
146 #define SLAPI_PLUGIN_MR_FILTER_RESET_FN         604
147 #define SLAPI_PLUGIN_MR_INDEX_FN                605
148 #define SLAPI_PLUGIN_MR_OID                     610
149 #define SLAPI_PLUGIN_MR_TYPE                    611
150 #define SLAPI_PLUGIN_MR_VALUE                   612
151 #define SLAPI_PLUGIN_MR_VALUES                  613
152 #define SLAPI_PLUGIN_MR_KEYS                    614
153 #define SLAPI_PLUGIN_MR_FILTER_REUSABLE         615
154 #define SLAPI_PLUGIN_MR_QUERY_OPERATOR          616
155 #define SLAPI_PLUGIN_MR_USAGE                   617
156
157 #define SLAPI_OP_LESS                                   1
158 #define SLAPI_OP_LESS_OR_EQUAL                          2
159 #define SLAPI_OP_EQUAL                                  3
160 #define SLAPI_OP_GREATER_OR_EQUAL                       4
161 #define SLAPI_OP_GREATER                                5
162 #define SLAPI_OP_SUBSTRING                              6
163
164 #define SLAPI_PLUGIN_MR_USAGE_INDEX             0
165 #define SLAPI_PLUGIN_MR_USAGE_SORT              1
166
167 #define SLAPI_PLUGIN_SYNTAX_FILTER_AVA          700
168 #define SLAPI_PLUGIN_SYNTAX_FILTER_SUB          701
169 #define SLAPI_PLUGIN_SYNTAX_VALUES2KEYS         702
170 #define SLAPI_PLUGIN_SYNTAX_ASSERTION2KEYS_AVA  703
171 #define SLAPI_PLUGIN_SYNTAX_ASSERTION2KEYS_SUB  704
172 #define SLAPI_PLUGIN_SYNTAX_NAMES               705
173 #define SLAPI_PLUGIN_SYNTAX_OID                 706
174 #define SLAPI_PLUGIN_SYNTAX_FLAGS               707
175 #define SLAPI_PLUGIN_SYNTAX_COMPARE             708
176
177 #define SLAPI_PLUGIN_SYNTAX_FLAG_ORKEYS                 1
178 #define SLAPI_PLUGIN_SYNTAX_FLAG_ORDERING               2
179
180 #define SLAPI_PLUGIN_AUDIT_DATA                 1100
181 #define SLAPI_PLUGIN_AUDIT_FN                   1101
182
183 #define SLAPI_MANAGEDSAIT                       1000
184
185 #define SLAPI_CONFIG_FILENAME                   40
186 #define SLAPI_CONFIG_LINENO                     41
187 #define SLAPI_CONFIG_ARGC                       42
188 #define SLAPI_CONFIG_ARGV                       43
189
190 #define SLAPI_TARGET_DN                         50
191 #define SLAPI_REQCONTROLS                       51
192
193 #define SLAPI_ENTRY_PRE_OP                      52
194 #define SLAPI_ENTRY_POST_OP                     53
195
196 #define SLAPI_RESCONTROLS                       55
197 #define SLAPI_ADD_RESCONTROL                    56
198
199 #define SLAPI_ADD_TARGET                        SLAPI_TARGET_DN
200 #define SLAPI_ADD_ENTRY                         60
201
202 #define SLAPI_BIND_TARGET                       SLAPI_TARGET_DN
203 #define SLAPI_BIND_METHOD                       70
204 #define SLAPI_BIND_CREDENTIALS                  71
205 #define SLAPI_BIND_SASLMECHANISM                72
206 #define SLAPI_BIND_RET_SASLCREDS                73
207
208 #define SLAPI_COMPARE_TARGET                    SLAPI_TARGET_DN
209 #define SLAPI_COMPARE_TYPE                      80
210 #define SLAPI_COMPARE_VALUE                     81
211
212 #define SLAPI_DELETE_TARGET                     SLAPI_TARGET_DN
213
214 #define SLAPI_MODIFY_TARGET                     SLAPI_TARGET_DN
215 #define SLAPI_MODIFY_MODS                       90
216
217 #define SLAPI_MODRDN_TARGET                     SLAPI_TARGET_DN
218 #define SLAPI_MODRDN_NEWRDN                     100
219 #define SLAPI_MODRDN_DELOLDRDN                  101
220 #define SLAPI_MODRDN_NEWSUPERIOR                102
221
222 #define SLAPI_SEARCH_TARGET                     SLAPI_TARGET_DN
223 #define SLAPI_SEARCH_SCOPE                      110
224 #define SLAPI_SEARCH_DEREF                      111
225 #define SLAPI_SEARCH_SIZELIMIT                  112
226 #define SLAPI_SEARCH_TIMELIMIT                  113
227 #define SLAPI_SEARCH_FILTER                     114
228 #define SLAPI_SEARCH_STRFILTER                  115
229 #define SLAPI_SEARCH_ATTRS                      116
230 #define SLAPI_SEARCH_ATTRSONLY                  117
231
232 #define SLAPI_ABANDON_MSGID                     120
233
234 #define SLAPI_SEQ_TYPE                          150
235 #define SLAPI_SEQ_ATTRNAME                      151
236 #define SLAPI_SEQ_VAL                           152
237
238 #define SLAPI_EXT_OP_REQ_OID                    160
239 #define SLAPI_EXT_OP_REQ_VALUE                  161
240 #define SLAPI_EXT_OP_RET_OID                    162
241 #define SLAPI_EXT_OP_RET_VALUE                  163
242
243 #define SLAPI_MR_FILTER_ENTRY                   170     
244 #define SLAPI_MR_FILTER_TYPE                    171
245 #define SLAPI_MR_FILTER_VALUE                   172
246 #define SLAPI_MR_FILTER_OID                     173
247 #define SLAPI_MR_FILTER_DNATTRS                 174
248
249 #define SLAPI_LDIF2DB_FILE                      180
250 #define SLAPI_LDIF2DB_REMOVEDUPVALS             185
251
252 #define SLAPI_DB2LDIF_PRINTKEY                  183
253
254 #define SLAPI_PARENT_TXN                        190
255 #define SLAPI_TXN                               191
256
257 #define SLAPI_SEARCH_RESULT_SET                 193
258 #define SLAPI_SEARCH_RESULT_ENTRY               194
259 #define SLAPI_NENTRIES                          195
260 #define SLAPI_SEARCH_REFERRALS                  196
261
262 #define SLAPI_CHANGENUMBER                      197
263 #define SLAPI_LOG_OPERATION                     198
264
265 #define SLAPI_DBSIZE                            199
266
267 #define SLAPI_LOG_FATAL                         0
268 #define SLAPI_LOG_TRACE                         1
269 #define SLAPI_LOG_PACKETS                       2
270 #define SLAPI_LOG_ARGS                          3
271 #define SLAPI_LOG_CONNS                         4
272 #define SLAPI_LOG_BER                           5
273 #define SLAPI_LOG_FILTER                        6
274 #define SLAPI_LOG_CONFIG                        7
275 #define SLAPI_LOG_ACL                           8
276 #define SLAPI_LOG_SHELL                         9
277 #define SLAPI_LOG_PARSE                         10
278 #define SLAPI_LOG_HOUSE                         11
279 #define SLAPI_LOG_REPL                          12
280 #define SLAPI_LOG_CACHE                         13
281 #define SLAPI_LOG_PLUGIN                        14
282
283 #define SLAPI_OPERATION_BIND                    0x00000001L
284 #define SLAPI_OPERATION_UNBIND                  0x00000002L
285 #define SLAPI_OPERATION_SEARCH                  0x00000004L
286 #define SLAPI_OPERATION_MODIFY                  0x00000008L
287 #define SLAPI_OPERATION_ADD                     0x00000010L
288 #define SLAPI_OPERATION_DELETE                  0x00000020L
289 #define SLAPI_OPERATION_MODDN                   0x00000040L
290 #define SLAPI_OPERATION_MODRDN                  SLAPI_OPERATION_MODDN
291 #define SLAPI_OPERATION_COMPARE                 0x00000080L
292 #define SLAPI_OPERATION_ABANDON                 0x00000100L
293 #define SLAPI_OPERATION_EXTENDED                0x00000200L
294 #define SLAPI_OPERATION_ANY                     0xFFFFFFFFL
295 #define SLAPI_OPERATION_NONE                    0x00000000L
296
297 #endif /* _SLAPI_H */
298