00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _LD_CFG_H
00026 #define _LD_CFG_H
00027
00028 #include "ld_fld.h"
00029
00030 #include "../../str.h"
00031 #include <sys/time.h>
00032
00033
00034 #define LD_MAXINT (2147483647)
00035
00036
00037 struct ld_cfg {
00038 str table;
00039 str base;
00040 int scope;
00041 str filter;
00042 str* field;
00043 str* attr;
00044 enum ld_syntax* syntax;
00045 int n;
00046 int sizelimit;
00047 int timelimit;
00048 int chase_references;
00049 int chase_referrals;
00050 struct ld_cfg* next;
00051 };
00052
00053 struct ld_con_info {
00054 str id;
00055 str host;
00056 unsigned int port;
00057 str username;
00058 str password;
00059 int authmech;
00060 int tls;
00061 str ca_list;
00062 str req_cert;
00063 struct ld_con_info* next;
00064 };
00065
00066 struct ld_cfg* ld_find_cfg(str* table);
00067
00068 char* ld_find_attr_name(enum ld_syntax* syntax, struct ld_cfg* cfg, char* fld_name);
00069
00070 struct ld_con_info* ld_find_conn_info(str* conn_id);
00071
00072 int ld_load_cfg(str* filename);
00073
00074 void ld_cfg_free(void);
00075
00076 #endif