2005-01-20 15:18:28 +08:00
|
|
|
/* component.h */
|
|
|
|
/* $OpenLDAP$ */
|
|
|
|
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
|
|
|
*
|
2021-01-12 03:25:53 +08:00
|
|
|
* Copyright 2004-2021 The OpenLDAP Foundation.
|
2005-01-20 15:18:28 +08:00
|
|
|
* Portions Copyright 2004 by IBM Corporation.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted only as authorized by the OpenLDAP
|
|
|
|
* Public License.
|
|
|
|
*
|
|
|
|
* A copy of this license is available in the file LICENSE in the
|
|
|
|
* top-level directory of the distribution or, alternatively, at
|
|
|
|
* <http://www.OpenLDAP.org/license.html>.
|
|
|
|
*/
|
|
|
|
|
2004-10-28 03:53:26 +08:00
|
|
|
#ifndef _H_SLAPD_COMPONENT
|
|
|
|
#define _H_SLAPD_COMPONENT
|
|
|
|
|
|
|
|
#include "portable.h"
|
2005-01-20 15:18:28 +08:00
|
|
|
|
2004-10-28 03:53:26 +08:00
|
|
|
#include <ac/string.h>
|
|
|
|
#include <ac/socket.h>
|
2004-12-14 00:26:58 +08:00
|
|
|
#include <ldap_pvt.h>
|
2004-10-28 03:53:26 +08:00
|
|
|
#include "lutil.h"
|
|
|
|
#include <ldap.h>
|
|
|
|
#include "slap.h"
|
|
|
|
|
2004-12-14 00:26:58 +08:00
|
|
|
typedef enum { ASN_BASIC, ASN_COMPOSITE } AsnType;
|
2004-10-28 03:53:26 +08:00
|
|
|
/*
|
|
|
|
* Decoder Modes
|
|
|
|
* Different operation is required to handle Decoding(2), Extracted Component
|
|
|
|
* decoding(0), ANY DEFINED TYPe(2)
|
|
|
|
* b0 : Component Alloc(yes)
|
|
|
|
* Constructed type : Component Alloc (Yes)
|
|
|
|
* Primitive type : Component Alloc (Yes)
|
|
|
|
* set to mode 2 in inner decoders
|
|
|
|
* b1 : Component Alloc (No)
|
|
|
|
* Constructed type : Component Alloc (No)
|
|
|
|
* Primitive type : Component Alloc (No)
|
|
|
|
* set to mode 2 in inner decoders
|
|
|
|
* b2 : Default Mode
|
|
|
|
* Constructed type : Component Alloc (Yes)
|
|
|
|
* Primitive type : Component Alloc (No)
|
|
|
|
* in addition to above modes, the 4th bit has special meaning,
|
|
|
|
* b4 : if the 4th bit is clear, DecxxxContent is called
|
|
|
|
* b4 : if the 4th bit is set, Decxxx is called, then it is cleared.
|
|
|
|
*/
|
|
|
|
#define DEC_ALLOC_MODE_0 0x01
|
|
|
|
#define DEC_ALLOC_MODE_1 0x02
|
|
|
|
#define DEC_ALLOC_MODE_2 0x04
|
|
|
|
#define CALL_TAG_DECODER 0x08
|
|
|
|
#define CALL_CONTENT_DECODER ~0x08
|
2004-12-14 00:26:58 +08:00
|
|
|
/*
|
|
|
|
* For Attribute Aliasing
|
|
|
|
*/
|
|
|
|
#define MAX_ALIASING_ENTRY 128
|
|
|
|
typedef struct comp_attribute_aliasing {
|
2005-01-20 15:18:28 +08:00
|
|
|
AttributeDescription* aa_aliasing_ad;
|
|
|
|
AttributeDescription* aa_aliased_ad;
|
|
|
|
ComponentFilter* aa_cf;
|
2004-12-14 00:26:58 +08:00
|
|
|
MatchingRule* aa_mr;
|
|
|
|
char* aa_cf_str;
|
|
|
|
} AttributeAliasing;
|
|
|
|
|
|
|
|
typedef struct comp_matchingrule_aliasing {
|
2005-01-20 15:18:28 +08:00
|
|
|
MatchingRule* mra_aliasing_attr;
|
|
|
|
MatchingRule* mra_aliased_attr;
|
|
|
|
AttributeDescription* mra_attr;
|
|
|
|
ComponentFilter* mra_cf;
|
2004-12-14 00:26:58 +08:00
|
|
|
MatchingRule* mra_mr;
|
2005-01-20 15:18:28 +08:00
|
|
|
char* mra_cf_str;
|
2004-12-14 00:26:58 +08:00
|
|
|
} MatchingRuleAliasing;
|
2004-10-28 03:53:26 +08:00
|
|
|
|
|
|
|
#endif
|