1 /* config.h - configuration abstraction structure */
4 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 * Copyright 1998-2004 The OpenLDAP Foundation.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted only as authorized by the OpenLDAP
13 * A copy of this license is available in the file LICENSE in the
14 * top-level directory of the distribution or, alternatively, at
15 * <http://www.OpenLDAP.org/license.html>.
18 typedef struct config_table_s {
24 unsigned long arg_type;
27 AttributeDescription *ad;
31 #define ARGS_USERLAND 0x0000ffffL
32 #define ARGS_TYPES 0x00ff0000L
33 #define ARGS_POINTER 0x001f0000L
34 #define ARGS_NUMERIC 0x000f0000L
35 #define ARG_INT 0x00010000L
36 #define ARG_LONG 0x00020000L
37 #define ARG_BER_LEN_T 0x00040000L
38 #define ARG_ON_OFF 0x00080000L
39 #define ARG_STRING 0x00100000L
40 #define ARG_BERVAL 0x00200000L /* XXX not yet */
41 #define ARG_EXISTS 0x00400000L /* XXX not yet */
42 #define ARG_IGNORED 0x00800000L
44 #define ARGS_SYNTAX 0xff000000L
45 #define ARG_DB 0x01000000L
46 #define ARG_PRE_DB 0x02000000L
47 #define ARG_PAREN 0x04000000L
48 #define ARG_NONZERO 0x08000000L
49 #define ARG_UNIQUE 0x10000000L /* XXX not yet */
50 #define ARG_SPECIAL 0x20000000L /* one special case */
51 #define ARG_OFFSET 0x40000000L
52 #define ARG_MAGIC 0x80000000L
54 #define ARG_BAD_CONF 0xdead0000L /* overload return values */
55 #define ARG_UNKNOWN 0xc0de0000L
57 typedef struct config_args_s {
65 int value_int; /* parsed first val */
66 long value_long; /* for simple cases */
67 ber_len_t value_ber_t;
69 int emit; /* emit instead of setting */
70 int type; /* ConfigTable.arg_type & ARGS_USERLAND */
75 typedef int (ConfigDriver)(ConfigArgs *c);