+struct slap_backend_info {
+ char *bi_type; /* type of backend */
+
+ /*
+ * per backend type routines:
+ * bi_init: called to allocate a backend_info structure,
+ * called once BEFORE configuration file is read.
+ * bi_init() initializes this structure hence is
+ * called directly from be_initialize()
+ * bi_config: called per 'backend' specific option
+ * all such options must before any 'database' options
+ * bi_config() is called only from read_config()
+ * bi_open: called to open each database, called
+ * once AFTER configuration file is read but
+ * BEFORE any bi_db_open() calls.
+ * bi_open() is called from backend_startup()
+ * bi_close: called to close each database, called
+ * once during shutdown after all bi_db_close calls.
+ * bi_close() is called from backend_shutdown()
+ * bi_destroy: called to destroy each database, called
+ * once during shutdown after all bi_db_destroy calls.
+ * bi_destory() is called from backend_destroy()
+ */
+ int (*bi_init) LDAP_P((BackendInfo *bi));
+ int (*bi_config) LDAP_P((BackendInfo *bi,
+ char *fname, int lineno, int argc, char **argv ));
+ int (*bi_open) LDAP_P((BackendInfo *bi));
+ int (*bi_close) LDAP_P((BackendInfo *bi));
+ int (*bi_destroy) LDAP_P((BackendInfo *bi));
+
+ /*
+ * per database routines:
+ * bi_db_init: called to initialize each database,
+ * called upon reading 'database <type>'
+ * called only from backend_db_init()
+ * bi_db_config: called to configure each database,
+ * called per database to handle per database options
+ * called only from read_config()
+ * bi_db_open: called to open each database
+ * called once per database immediately AFTER bi_open()
+ * calls but before daemon startup.
+ * called only by backend_startup()
+ * bi_db_close: called to close each database
+ * called once per database during shutdown but BEFORE
+ * any bi_close call.
+ * called only by backend_shutdown()
+ * bi_db_destroy: called to destroy each database
+ * called once per database during shutdown AFTER all
+ * bi_close calls but before bi_destory calls.
+ * called only by backend_destory()
+ */
+ int (*bi_db_init) LDAP_P((Backend *bd));
+ int (*bi_db_config) LDAP_P((Backend *bd,
+ char *fname, int lineno, int argc, char **argv ));
+ int (*bi_db_open) LDAP_P((Backend *bd));
+ int (*bi_db_close) LDAP_P((Backend *bd));
+ int (*bi_db_destroy) LDAP_P((Backend *db));
+
+ /* LDAP Operations Handling Routines */
+ int (*bi_op_bind) LDAP_P(( BackendDB *bd,