File indexing completed on 2025-01-17 09:55:46
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #ifndef _LDAP_SCHEMA_H
0022 #define _LDAP_SCHEMA_H 1
0023
0024 #include <ldap_cdefs.h>
0025
0026 LDAP_BEGIN_DECL
0027
0028
0029
0030 #define LDAP_SCHERR_OUTOFMEM 1
0031 #define LDAP_SCHERR_UNEXPTOKEN 2
0032 #define LDAP_SCHERR_NOLEFTPAREN 3
0033 #define LDAP_SCHERR_NORIGHTPAREN 4
0034 #define LDAP_SCHERR_NODIGIT 5
0035 #define LDAP_SCHERR_BADNAME 6
0036 #define LDAP_SCHERR_BADDESC 7
0037 #define LDAP_SCHERR_BADSUP 8
0038 #define LDAP_SCHERR_DUPOPT 9
0039 #define LDAP_SCHERR_EMPTY 10
0040 #define LDAP_SCHERR_MISSING 11
0041 #define LDAP_SCHERR_OUT_OF_ORDER 12
0042
0043 typedef struct ldap_schema_extension_item {
0044 char *lsei_name;
0045 char **lsei_values;
0046 } LDAPSchemaExtensionItem;
0047
0048 typedef struct ldap_syntax {
0049 char *syn_oid;
0050 char **syn_names;
0051 char *syn_desc;
0052 LDAPSchemaExtensionItem **syn_extensions;
0053 } LDAPSyntax;
0054
0055 typedef struct ldap_matchingrule {
0056 char *mr_oid;
0057 char **mr_names;
0058 char *mr_desc;
0059 int mr_obsolete;
0060 char *mr_syntax_oid;
0061 LDAPSchemaExtensionItem **mr_extensions;
0062 } LDAPMatchingRule;
0063
0064 typedef struct ldap_matchingruleuse {
0065 char *mru_oid;
0066 char **mru_names;
0067 char *mru_desc;
0068 int mru_obsolete;
0069 char **mru_applies_oids;
0070 LDAPSchemaExtensionItem **mru_extensions;
0071 } LDAPMatchingRuleUse;
0072
0073 typedef struct ldap_attributetype {
0074 char *at_oid;
0075 char **at_names;
0076 char *at_desc;
0077 int at_obsolete;
0078 char *at_sup_oid;
0079 char *at_equality_oid;
0080 char *at_ordering_oid;
0081 char *at_substr_oid;
0082 char *at_syntax_oid;
0083 int at_syntax_len;
0084 int at_single_value;
0085 int at_collective;
0086 int at_no_user_mod;
0087 int at_usage;
0088
0089 LDAPSchemaExtensionItem **at_extensions;
0090 } LDAPAttributeType;
0091
0092 typedef struct ldap_objectclass {
0093 char *oc_oid;
0094 char **oc_names;
0095 char *oc_desc;
0096 int oc_obsolete;
0097 char **oc_sup_oids;
0098 int oc_kind;
0099 char **oc_at_oids_must;
0100 char **oc_at_oids_may;
0101 LDAPSchemaExtensionItem **oc_extensions;
0102 } LDAPObjectClass;
0103
0104 typedef struct ldap_contentrule {
0105 char *cr_oid;
0106 char **cr_names;
0107 char *cr_desc;
0108 char **cr_sup_oids;
0109 int cr_obsolete;
0110 char **cr_oc_oids_aux;
0111 char **cr_at_oids_must;
0112 char **cr_at_oids_may;
0113 char **cr_at_oids_not;
0114 LDAPSchemaExtensionItem **cr_extensions;
0115 } LDAPContentRule;
0116
0117 typedef struct ldap_nameform {
0118 char *nf_oid;
0119 char **nf_names;
0120 char *nf_desc;
0121 int nf_obsolete;
0122 char *nf_objectclass;
0123 char **nf_at_oids_must;
0124 char **nf_at_oids_may;
0125 LDAPSchemaExtensionItem **nf_extensions;
0126 } LDAPNameForm;
0127
0128 typedef struct ldap_structurerule {
0129 int sr_ruleid;
0130 char **sr_names;
0131 char *sr_desc;
0132 int sr_obsolete;
0133 char *sr_nameform;
0134 int sr_nsup_ruleids;
0135 int *sr_sup_ruleids;
0136 LDAPSchemaExtensionItem **sr_extensions;
0137 } LDAPStructureRule;
0138
0139
0140
0141
0142 #define LDAP_SCHEMA_NO 0
0143 #define LDAP_SCHEMA_YES 1
0144
0145 #define LDAP_SCHEMA_USER_APPLICATIONS 0
0146 #define LDAP_SCHEMA_DIRECTORY_OPERATION 1
0147 #define LDAP_SCHEMA_DISTRIBUTED_OPERATION 2
0148 #define LDAP_SCHEMA_DSA_OPERATION 3
0149
0150 #define LDAP_SCHEMA_ABSTRACT 0
0151 #define LDAP_SCHEMA_STRUCTURAL 1
0152 #define LDAP_SCHEMA_AUXILIARY 2
0153
0154
0155
0156
0157
0158 #define LDAP_SCHEMA_ALLOW_NONE 0x00U
0159 #define LDAP_SCHEMA_ALLOW_NO_OID 0x01U
0160 #define LDAP_SCHEMA_ALLOW_QUOTED 0x02U
0161 #define LDAP_SCHEMA_ALLOW_DESCR 0x04U
0162 #define LDAP_SCHEMA_ALLOW_DESCR_PREFIX 0x08U
0163 #define LDAP_SCHEMA_ALLOW_OID_MACRO 0x10U
0164 #define LDAP_SCHEMA_ALLOW_OUT_OF_ORDER_FIELDS 0x20U
0165 #define LDAP_SCHEMA_ALLOW_ALL 0x3fU
0166 #define LDAP_SCHEMA_SKIP 0x80U
0167
0168
0169 LDAP_F( LDAP_CONST char * )
0170 ldap_syntax2name LDAP_P((
0171 LDAPSyntax * syn ));
0172
0173 LDAP_F( LDAP_CONST char * )
0174 ldap_matchingrule2name LDAP_P((
0175 LDAPMatchingRule * mr ));
0176
0177 LDAP_F( LDAP_CONST char * )
0178 ldap_matchingruleuse2name LDAP_P((
0179 LDAPMatchingRuleUse * mru ));
0180
0181 LDAP_F( LDAP_CONST char * )
0182 ldap_attributetype2name LDAP_P((
0183 LDAPAttributeType * at ));
0184
0185 LDAP_F( LDAP_CONST char * )
0186 ldap_objectclass2name LDAP_P((
0187 LDAPObjectClass * oc ));
0188
0189 LDAP_F( LDAP_CONST char * )
0190 ldap_contentrule2name LDAP_P((
0191 LDAPContentRule * cr ));
0192
0193 LDAP_F( LDAP_CONST char * )
0194 ldap_nameform2name LDAP_P((
0195 LDAPNameForm * nf ));
0196
0197 LDAP_F( LDAP_CONST char * )
0198 ldap_structurerule2name LDAP_P((
0199 LDAPStructureRule * sr ));
0200
0201 LDAP_F( void )
0202 ldap_syntax_free LDAP_P((
0203 LDAPSyntax * syn ));
0204
0205 LDAP_F( void )
0206 ldap_matchingrule_free LDAP_P((
0207 LDAPMatchingRule * mr ));
0208
0209 LDAP_F( void )
0210 ldap_matchingruleuse_free LDAP_P((
0211 LDAPMatchingRuleUse * mr ));
0212
0213 LDAP_F( void )
0214 ldap_attributetype_free LDAP_P((
0215 LDAPAttributeType * at ));
0216
0217 LDAP_F( void )
0218 ldap_objectclass_free LDAP_P((
0219 LDAPObjectClass * oc ));
0220
0221 LDAP_F( void )
0222 ldap_contentrule_free LDAP_P((
0223 LDAPContentRule * cr ));
0224
0225 LDAP_F( void )
0226 ldap_nameform_free LDAP_P((
0227 LDAPNameForm * nf ));
0228
0229 LDAP_F( void )
0230 ldap_structurerule_free LDAP_P((
0231 LDAPStructureRule * sr ));
0232
0233 LDAP_F( LDAPStructureRule * )
0234 ldap_str2structurerule LDAP_P((
0235 LDAP_CONST char * s,
0236 int * code,
0237 LDAP_CONST char ** errp,
0238 LDAP_CONST unsigned flags ));
0239
0240 LDAP_F( LDAPNameForm * )
0241 ldap_str2nameform LDAP_P((
0242 LDAP_CONST char * s,
0243 int * code,
0244 LDAP_CONST char ** errp,
0245 LDAP_CONST unsigned flags ));
0246
0247 LDAP_F( LDAPContentRule * )
0248 ldap_str2contentrule LDAP_P((
0249 LDAP_CONST char * s,
0250 int * code,
0251 LDAP_CONST char ** errp,
0252 LDAP_CONST unsigned flags ));
0253
0254 LDAP_F( LDAPObjectClass * )
0255 ldap_str2objectclass LDAP_P((
0256 LDAP_CONST char * s,
0257 int * code,
0258 LDAP_CONST char ** errp,
0259 LDAP_CONST unsigned flags ));
0260
0261 LDAP_F( LDAPAttributeType * )
0262 ldap_str2attributetype LDAP_P((
0263 LDAP_CONST char * s,
0264 int * code,
0265 LDAP_CONST char ** errp,
0266 LDAP_CONST unsigned flags ));
0267
0268 LDAP_F( LDAPSyntax * )
0269 ldap_str2syntax LDAP_P((
0270 LDAP_CONST char * s,
0271 int * code,
0272 LDAP_CONST char ** errp,
0273 LDAP_CONST unsigned flags ));
0274
0275 LDAP_F( LDAPMatchingRule * )
0276 ldap_str2matchingrule LDAP_P((
0277 LDAP_CONST char * s,
0278 int * code,
0279 LDAP_CONST char ** errp,
0280 LDAP_CONST unsigned flags ));
0281
0282 LDAP_F( LDAPMatchingRuleUse * )
0283 ldap_str2matchingruleuse LDAP_P((
0284 LDAP_CONST char * s,
0285 int * code,
0286 LDAP_CONST char ** errp,
0287 LDAP_CONST unsigned flags ));
0288
0289 LDAP_F( char * )
0290 ldap_structurerule2str LDAP_P((
0291 LDAPStructureRule * sr ));
0292
0293 LDAP_F( struct berval * )
0294 ldap_structurerule2bv LDAP_P((
0295 LDAPStructureRule * sr, struct berval *bv ));
0296
0297 LDAP_F( char * )
0298 ldap_nameform2str LDAP_P((
0299 LDAPNameForm * nf ));
0300
0301 LDAP_F( struct berval * )
0302 ldap_nameform2bv LDAP_P((
0303 LDAPNameForm * nf, struct berval *bv ));
0304
0305 LDAP_F( char * )
0306 ldap_contentrule2str LDAP_P((
0307 LDAPContentRule * cr ));
0308
0309 LDAP_F( struct berval * )
0310 ldap_contentrule2bv LDAP_P((
0311 LDAPContentRule * cr, struct berval *bv ));
0312
0313 LDAP_F( char * )
0314 ldap_objectclass2str LDAP_P((
0315 LDAPObjectClass * oc ));
0316
0317 LDAP_F( struct berval * )
0318 ldap_objectclass2bv LDAP_P((
0319 LDAPObjectClass * oc, struct berval *bv ));
0320
0321 LDAP_F( char * )
0322 ldap_attributetype2str LDAP_P((
0323 LDAPAttributeType * at ));
0324
0325 LDAP_F( struct berval * )
0326 ldap_attributetype2bv LDAP_P((
0327 LDAPAttributeType * at, struct berval *bv ));
0328
0329 LDAP_F( char * )
0330 ldap_syntax2str LDAP_P((
0331 LDAPSyntax * syn ));
0332
0333 LDAP_F( struct berval * )
0334 ldap_syntax2bv LDAP_P((
0335 LDAPSyntax * syn, struct berval *bv ));
0336
0337 LDAP_F( char * )
0338 ldap_matchingrule2str LDAP_P((
0339 LDAPMatchingRule * mr ));
0340
0341 LDAP_F( struct berval * )
0342 ldap_matchingrule2bv LDAP_P((
0343 LDAPMatchingRule * mr, struct berval *bv ));
0344
0345 LDAP_F( char * )
0346 ldap_matchingruleuse2str LDAP_P((
0347 LDAPMatchingRuleUse * mru ));
0348
0349 LDAP_F( struct berval * )
0350 ldap_matchingruleuse2bv LDAP_P((
0351 LDAPMatchingRuleUse * mru, struct berval *bv ));
0352
0353 LDAP_F( char * )
0354 ldap_scherr2str LDAP_P((
0355 int code )) LDAP_GCCATTR((const));
0356
0357 LDAP_END_DECL
0358
0359 #endif
0360