From 2353678647ef764e4b1346384ef68d7b106804c4 Mon Sep 17 00:00:00 2001 From: Sang Seok Lim Date: Wed, 27 Oct 2004 19:53:26 +0000 Subject: [PATCH] Header file for component.c --- servers/slapd/asn.h | 67 --------------------------------------- servers/slapd/component.h | 38 ++++++++++++++++++++++ 2 files changed, 38 insertions(+), 67 deletions(-) delete mode 100644 servers/slapd/asn.h create mode 100644 servers/slapd/component.h diff --git a/servers/slapd/asn.h b/servers/slapd/asn.h deleted file mode 100644 index 43f566ad8b..0000000000 --- a/servers/slapd/asn.h +++ /dev/null @@ -1,67 +0,0 @@ -/* asn.h -- Component Filter Match Routines */ -/* $OpenLDAP$ */ -/* This work is part of OpenLDAP Software . - * - * Copyright 2003-2004 The OpenLDAP Foundation. - * 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 - * . - */ - -#ifdef LDAP_COMP_MATCH -#ifndef _H_ASN -#define _H_ASN - -#define NUM_ENCODING_TYPE 2 - -typedef enum { ASN_BASIC, ASN_COMPOSITE } AsnType; - -typedef enum AsnTypeId { - BASICTYPE_BOOLEAN, /* 1 */ - BASICTYPE_INTEGER, - BASICTYPE_BITSTRING, - BASICTYPE_OCTETSTRING, - BASICTYPE_NULL, - BASICTYPE_OID, - BASICTYPE_REAL, - BASICTYPE_ENUMERATED, - BASICTYPE_NUMERIC_STR, - BASICTYPE_PRINTABLE_STR, - BASICTYPE_UNIVERSAL_STR, - BASICTYPE_IA5_STR, - BASICTYPE_BMP_STR, - BASICTYPE_UTF8_STR, - BASICTYPE_UTCTIME, - BASICTYPE_GENERALIZEDTIME, - BASICTYPE_GRAPHIC_STR, - BASICTYPE_VISIBLE_STR, - BASICTYPE_GENERAL_STR, - BASICTYPE_OBJECTDESCRIPTOR, - BASICTYPE_VIDEOTEX_STR, - BASICTYPE_T61_STR, - BASICTYPE_OCTETCONTAINING, - BASICTYPE_BITCONTAINING, - BASICTYPE_RELATIVE_OID, /* 25 */ - BASICTYPE_ANY, /* 25 */ - /* Embedded Composite Types*/ - COMPOSITE_ASN1_TYPE, - /* A New ASN.1 types including type reference */ - RDNSequence, - RelativeDistinguishedName, - TelephoneNumber, - FacsimileTelephoneNumber_telephoneNumber, - DirectoryString, - /* Newly Defined ASN.1 Type, Manually registered */ - ASN_COMP_CERTIFICATE, - /* ASN.1 Type End */ - ASNTYPE_END -} AsnTypeId; -#endif -#endif diff --git a/servers/slapd/component.h b/servers/slapd/component.h new file mode 100644 index 0000000000..e7ce72e957 --- /dev/null +++ b/servers/slapd/component.h @@ -0,0 +1,38 @@ +#ifndef _H_SLAPD_COMPONENT +#define _H_SLAPD_COMPONENT + +#include "portable.h" +#include +#include +#include "ldap_pvt.h" +#include "lutil.h" +#include +#include "slap.h" + +typedef enum {ASN_BASIC, ASN_COMPOSITE } AsnType; +/* + * 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 + +#endif -- 2.39.5