Back to index

openldap  2.4.31
component.h
Go to the documentation of this file.
00001 /* component.h */
00002 /* $OpenLDAP$ */
00003 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
00004  *
00005  * Copyright 2004-2012 The OpenLDAP Foundation.
00006  * Portions Copyright 2004 by IBM Corporation.
00007  * All rights reserved.
00008  *
00009  * Redistribution and use in source and binary forms, with or without
00010  * modification, are permitted only as authorized by the OpenLDAP
00011  * Public License.
00012  *
00013  * A copy of this license is available in the file LICENSE in the
00014  * top-level directory of the distribution or, alternatively, at
00015  * <http://www.OpenLDAP.org/license.html>.
00016  */
00017 
00018 #ifndef _H_SLAPD_COMPONENT
00019 #define _H_SLAPD_COMPONENT
00020 
00021 #include "portable.h"
00022 
00023 #include <ac/string.h>
00024 #include <ac/socket.h>
00025 #include <ldap_pvt.h>
00026 #include "lutil.h"
00027 #include <ldap.h>
00028 #include "slap.h"
00029 
00030 typedef enum { ASN_BASIC, ASN_COMPOSITE } AsnType;
00031 /*
00032  * Decoder Modes
00033  * Different operation is required to handle Decoding(2), Extracted Component
00034  * decoding(0), ANY DEFINED TYPe(2)
00035  * b0 : Component Alloc(yes)
00036  *      Constructed type : Component Alloc (Yes)
00037  *      Primitive type : Component Alloc (Yes)
00038  *      set to mode 2 in inner decoders
00039  * b1 : Component Alloc (No)
00040  *      Constructed type : Component Alloc (No)
00041  *      Primitive type : Component Alloc (No)
00042  *      set to mode 2 in inner decoders
00043  * b2 : Default Mode
00044  *      Constructed type : Component Alloc (Yes)
00045  *      Primitive type : Component Alloc (No)
00046  * in addition to above modes, the 4th bit has special meaning,
00047  * b4 : if the 4th bit is clear, DecxxxContent is called
00048  * b4 : if the 4th bit is set, Decxxx is called, then it is cleared.
00049  */
00050 #define DEC_ALLOC_MODE_0        0x01
00051 #define DEC_ALLOC_MODE_1        0x02
00052 #define DEC_ALLOC_MODE_2        0x04
00053 #define CALL_TAG_DECODER        0x08
00054 #define CALL_CONTENT_DECODER    ~0x08
00055 /*
00056  * For Attribute Aliasing
00057  */
00058 #define MAX_ALIASING_ENTRY 128
00059 typedef struct comp_attribute_aliasing {
00060        AttributeDescription*       aa_aliasing_ad;
00061        AttributeDescription*       aa_aliased_ad;
00062        ComponentFilter*     aa_cf;
00063        MatchingRule*        aa_mr;
00064        char*                aa_cf_str;
00065 } AttributeAliasing;
00066                                                                                  
00067 typedef struct comp_matchingrule_aliasing {
00068        MatchingRule* mra_aliasing_attr;
00069        MatchingRule* mra_aliased_attr;
00070        AttributeDescription*       mra_attr;
00071        ComponentFilter*     mra_cf;
00072        MatchingRule*        mra_mr;
00073        char*                mra_cf_str;
00074 } MatchingRuleAliasing;
00075 
00076 #endif