]> git.sur5r.net Git - openldap/blob - servers/slapd/component.h
fix messages
[openldap] / servers / slapd / component.h
1 #ifndef _H_SLAPD_COMPONENT
2 #define _H_SLAPD_COMPONENT
3
4 #include "portable.h"
5 #include <ac/string.h>
6 #include <ac/socket.h>
7 #include <ldap_pvt.h>
8 #include "lutil.h"
9 #include <ldap.h>
10 #include "slap.h"
11
12 typedef enum { ASN_BASIC, ASN_COMPOSITE } AsnType;
13 /*
14  * Decoder Modes
15  * Different operation is required to handle Decoding(2), Extracted Component
16  * decoding(0), ANY DEFINED TYPe(2)
17  * b0 : Component Alloc(yes)
18  *      Constructed type : Component Alloc (Yes)
19  *      Primitive type : Component Alloc (Yes)
20  *      set to mode 2 in inner decoders
21  * b1 : Component Alloc (No)
22  *      Constructed type : Component Alloc (No)
23  *      Primitive type : Component Alloc (No)
24  *      set to mode 2 in inner decoders
25  * b2 : Default Mode
26  *      Constructed type : Component Alloc (Yes)
27  *      Primitive type : Component Alloc (No)
28  * in addition to above modes, the 4th bit has special meaning,
29  * b4 : if the 4th bit is clear, DecxxxContent is called
30  * b4 : if the 4th bit is set, Decxxx is called, then it is cleared.
31  */
32 #define DEC_ALLOC_MODE_0        0x01
33 #define DEC_ALLOC_MODE_1        0x02
34 #define DEC_ALLOC_MODE_2        0x04
35 #define CALL_TAG_DECODER        0x08
36 #define CALL_CONTENT_DECODER    ~0x08
37 /*
38  * For Attribute Aliasing
39  */
40 #define MAX_ALIASING_ENTRY 128
41 typedef struct comp_attribute_aliasing {
42         AttributeDescription*   aa_aliasing_ad;
43         AttributeDescription*   aa_aliased_ad;
44         ComponentFilter*        aa_cf;
45         MatchingRule*           aa_mr;
46         char*                   aa_cf_str;
47 } AttributeAliasing;
48                                                                                  
49 typedef struct comp_matchingrule_aliasing {
50         MatchingRule*   mra_aliasing_attr;
51         MatchingRule*   mra_aliased_attr;
52         AttributeDescription*   mra_attr;
53         ComponentFilter*        mra_cf;
54         MatchingRule*           mra_mr;
55         char*                   aa_cf_str;
56 } MatchingRuleAliasing;
57
58 #endif