Back to index

openldap  2.4.31
proto-back-monitor.h
Go to the documentation of this file.
00001 /* $OpenLDAP$ */
00002 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
00003  *
00004  * Copyright 2001-2012 The OpenLDAP Foundation.
00005  * Portions Copyright 2001-2003 Pierangelo Masarati.
00006  * All rights reserved.
00007  *
00008  * Redistribution and use in source and binary forms, with or without
00009  * modification, are permitted only as authorized by the OpenLDAP
00010  * Public License.
00011  *
00012  * A copy of this license is available in file LICENSE in the
00013  * top-level directory of the distribution or, alternatively, at
00014  * <http://www.OpenLDAP.org/license.html>.
00015  */
00016 /* ACKNOWLEDGEMENTS:
00017  * This work was initially developed by Pierangelo Masarati for inclusion
00018  * in OpenLDAP Software.
00019  */
00020 
00021 #ifndef _PROTO_BACK_MONITOR
00022 #define _PROTO_BACK_MONITOR
00023 
00024 #include <ldap_cdefs.h>
00025 
00026 LDAP_BEGIN_DECL
00027 
00028 /*
00029  * backends
00030  */
00031 int
00032 monitor_subsys_backend_init LDAP_P((
00033        BackendDB            *be,
00034        monitor_subsys_t     *ms ));
00035 
00036 /*
00037  * cache
00038  */
00039 extern int
00040 monitor_cache_cmp LDAP_P((
00041        const void           *c1,
00042        const void           *c2 ));
00043 extern int
00044 monitor_cache_dup LDAP_P((
00045        void                 *c1,
00046        void                 *c2 ));
00047 extern int
00048 monitor_cache_add LDAP_P((
00049        monitor_info_t              *mi,
00050        Entry                *e ));
00051 extern int
00052 monitor_cache_get LDAP_P((
00053        monitor_info_t              *mi,
00054        struct berval        *ndn,
00055        Entry                **ep ));
00056 extern int
00057 monitor_cache_remove LDAP_P((
00058        monitor_info_t              *mi,
00059        struct berval        *ndn,
00060        Entry                **ep ));
00061 extern int
00062 monitor_cache_dn2entry LDAP_P((
00063        Operation            *op,
00064        SlapReply            *rs,
00065        struct berval        *ndn,
00066        Entry                **ep,
00067        Entry                **matched ));
00068 extern int
00069 monitor_cache_lock LDAP_P((
00070        Entry                *e ));
00071 extern int
00072 monitor_cache_release LDAP_P((
00073        monitor_info_t              *mi,
00074        Entry                *e ));
00075 
00076 extern int
00077 monitor_cache_destroy LDAP_P((
00078        monitor_info_t              *mi ));
00079 
00080 extern int
00081 monitor_back_release(
00082        Operation *op,
00083        Entry *e,
00084        int rw );
00085 
00086 /*
00087  * connections
00088  */
00089 extern int
00090 monitor_subsys_conn_init LDAP_P((
00091        BackendDB            *be,
00092        monitor_subsys_t     *ms ));
00093 
00094 /*
00095  * databases 
00096  */
00097 extern int
00098 monitor_subsys_database_init LDAP_P((
00099        BackendDB            *be,
00100        monitor_subsys_t     *ms ));
00101 
00102 /*
00103  * entry
00104  */
00105 extern int
00106 monitor_entry_update LDAP_P((
00107        Operation            *op,
00108        SlapReply            *rs,
00109        Entry                *e ));
00110 extern int
00111 monitor_entry_create LDAP_P((
00112        Operation            *op,
00113        SlapReply            *rs,
00114        struct berval        *ndn,
00115        Entry                *e_parent,
00116        Entry                **ep ));
00117 extern int
00118 monitor_entry_modify LDAP_P((
00119        Operation            *op,
00120        SlapReply            *rs,
00121        Entry                *e ));
00122 extern int
00123 monitor_entry_test_flags LDAP_P((
00124        monitor_entry_t             *mp,
00125        int                  cond ));
00126 extern monitor_entry_t *
00127 monitor_entrypriv_create LDAP_P((
00128        void ));
00129 
00130 extern Entry *
00131 monitor_entry_stub LDAP_P((
00132        struct berval *pdn,
00133        struct berval *pndn,
00134        struct berval *rdn,
00135        ObjectClass          *oc,
00136        monitor_info_t       *mi,
00137        struct berval *create,
00138        struct berval *modify));
00139 
00140 /*
00141  * init
00142  */
00143 extern int
00144 monitor_subsys_is_opened LDAP_P((
00145        void ));
00146 extern int
00147 monitor_back_register_subsys LDAP_P((
00148        monitor_subsys_t     *ms ));
00149 extern int
00150 monitor_back_register_backend LDAP_P((
00151        BackendInfo          *bi ));
00152 extern int
00153 monitor_back_register_database LDAP_P((
00154        BackendDB            *be,
00155        struct berval *ndn ));
00156 extern int
00157 monitor_back_register_overlay_info LDAP_P((
00158        slap_overinst        *on ));
00159 extern int
00160 monitor_back_register_overlay LDAP_P((
00161        BackendDB            *be,
00162        struct slap_overinst *on,
00163        struct berval        *ndn_out ));
00164 extern int
00165 monitor_back_register_backend_limbo LDAP_P((
00166        BackendInfo          *bi ));
00167 extern int
00168 monitor_back_register_database_limbo LDAP_P((
00169        BackendDB            *be,
00170        struct berval        *ndn_out ));
00171 extern int
00172 monitor_back_register_overlay_info_limbo LDAP_P((
00173        slap_overinst        *on ));
00174 extern int
00175 monitor_back_register_overlay_limbo LDAP_P((
00176        BackendDB            *be,
00177        struct slap_overinst *on,
00178        struct berval        *ndn_out ));
00179 extern monitor_subsys_t *
00180 monitor_back_get_subsys LDAP_P((
00181        const char           *name ));
00182 extern monitor_subsys_t *
00183 monitor_back_get_subsys_by_dn LDAP_P((
00184        struct berval        *ndn,
00185        int                  sub ));
00186 extern int
00187 monitor_back_is_configured LDAP_P(( void ));
00188 extern int
00189 monitor_back_register_entry LDAP_P((
00190        Entry                *e,
00191        monitor_callback_t   *cb,
00192        monitor_subsys_t     *mss,
00193        unsigned long        flags ));
00194 extern int
00195 monitor_back_register_entry_parent LDAP_P((
00196        Entry                *e,
00197        monitor_callback_t   *cb,
00198        monitor_subsys_t     *mss,
00199        unsigned long        flags,
00200        struct berval        *base,
00201        int                  scope,
00202        struct berval        *filter ));
00203 extern int
00204 monitor_search2ndn LDAP_P((
00205        struct berval        *base,
00206        int                  scope,
00207        struct berval        *filter,
00208        struct berval        *ndn ));
00209 extern int
00210 monitor_back_register_entry_attrs LDAP_P((
00211        struct berval        *ndn,
00212        Attribute            *a,
00213        monitor_callback_t   *cb,
00214        struct berval        *base,
00215        int                  scope,
00216        struct berval        *filter ));
00217 extern int
00218 monitor_back_register_entry_callback LDAP_P((
00219        struct berval        *ndn,
00220        monitor_callback_t   *cb,
00221        struct berval        *base,
00222        int                  scope,
00223        struct berval        *filter ));
00224 extern int
00225 monitor_back_unregister_entry LDAP_P((
00226        struct berval        *ndn ));
00227 extern int
00228 monitor_back_unregister_entry_parent LDAP_P((
00229        struct berval        *nrdn,
00230        monitor_callback_t   *target_cb,
00231        struct berval        *base,
00232        int                  scope,
00233        struct berval        *filter ));
00234 extern int
00235 monitor_back_unregister_entry_attrs LDAP_P((
00236        struct berval        *ndn,
00237        Attribute            *a,
00238        monitor_callback_t   *cb,
00239        struct berval        *base,
00240        int                  scope,
00241        struct berval        *filter ));
00242 extern int
00243 monitor_back_unregister_entry_callback LDAP_P((
00244        struct berval        *ndn,
00245        monitor_callback_t   *cb,
00246        struct berval        *base,
00247        int                  scope,
00248        struct berval        *filter ));
00249 
00250 /*
00251  * listener
00252  */
00253 extern int
00254 monitor_subsys_listener_init LDAP_P((
00255        BackendDB            *be,
00256        monitor_subsys_t     *ms ));
00257 
00258 /*
00259  * log
00260  */
00261 extern int
00262 monitor_subsys_log_init LDAP_P((
00263        BackendDB            *be,
00264        monitor_subsys_t     *ms ));
00265 
00266 /*
00267  * operations
00268  */
00269 extern int
00270 monitor_subsys_ops_init LDAP_P((
00271        BackendDB            *be,
00272        monitor_subsys_t     *ms ));
00273 
00274 /*
00275  * overlay
00276  */
00277 extern int
00278 monitor_subsys_overlay_init LDAP_P((
00279        BackendDB            *be,
00280        monitor_subsys_t     *ms ));
00281 
00282 /*
00283  * sent
00284  */
00285 extern int
00286 monitor_subsys_sent_init LDAP_P((
00287        BackendDB            *be,
00288        monitor_subsys_t     *ms ));
00289 
00290 /*
00291  * threads
00292  */
00293 extern int
00294 monitor_subsys_thread_init LDAP_P((
00295        BackendDB            *be,
00296        monitor_subsys_t     *ms ));
00297 
00298 /*
00299  * time
00300  */
00301 extern int monitor_subsys_time_init LDAP_P((
00302        BackendDB            *be,
00303        monitor_subsys_t     *ms ));
00304 
00305 /*
00306  * waiters
00307  */
00308 extern int
00309 monitor_subsys_rww_init LDAP_P((
00310        BackendDB            *be,
00311        monitor_subsys_t     *ms ));
00312 
00313 /*
00314  * former external.h
00315  */
00316 
00317 extern BI_init                     monitor_back_initialize;
00318 
00319 extern BI_db_init           monitor_back_db_init;
00320 extern BI_db_open           monitor_back_db_open;
00321 extern BI_config            monitor_back_config;
00322 extern BI_db_destroy        monitor_back_db_destroy;
00323 extern BI_db_config         monitor_back_db_config;
00324 
00325 extern BI_op_search         monitor_back_search;
00326 extern BI_op_compare        monitor_back_compare;
00327 extern BI_op_modify         monitor_back_modify;
00328 extern BI_op_bind           monitor_back_bind;
00329 extern BI_operational              monitor_back_operational;
00330 
00331 LDAP_END_DECL
00332 
00333 #endif /* _PROTO_BACK_MONITOR */
00334