Back to index

openldap  2.4.31
proto-ldap.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 2003-2012 The OpenLDAP Foundation.
00005  * All rights reserved.
00006  *
00007  * Redistribution and use in source and binary forms, with or without
00008  * modification, are permitted only as authorized by the OpenLDAP
00009  * Public License.
00010  *
00011  * A copy of this license is available in the file LICENSE in the
00012  * top-level directory of the distribution or, alternatively, at
00013  * <http://www.OpenLDAP.org/license.html>.
00014  */
00015 /* ACKNOWLEDGEMENTS:
00016  * This work was initially developed by the Howard Chu for inclusion
00017  * in OpenLDAP Software and subsequently enhanced by Pierangelo
00018  * Masarati.
00019  */
00020 
00021 #ifndef PROTO_LDAP_H
00022 #define PROTO_LDAP_H
00023 
00024 LDAP_BEGIN_DECL
00025 
00026 extern BI_init                     ldap_back_initialize;
00027 extern BI_open                     ldap_back_open;
00028 
00029 extern BI_db_init           ldap_back_db_init;
00030 extern BI_db_open           ldap_back_db_open;
00031 extern BI_db_close          ldap_back_db_close;
00032 extern BI_db_destroy        ldap_back_db_destroy;
00033 
00034 extern BI_op_bind           ldap_back_bind;
00035 extern BI_op_search         ldap_back_search;
00036 extern BI_op_compare        ldap_back_compare;
00037 extern BI_op_modify         ldap_back_modify;
00038 extern BI_op_modrdn         ldap_back_modrdn;
00039 extern BI_op_add            ldap_back_add;
00040 extern BI_op_delete         ldap_back_delete;
00041 extern BI_op_abandon        ldap_back_abandon;
00042 extern BI_op_extended              ldap_back_extended;
00043 
00044 extern BI_connection_destroy       ldap_back_conn_destroy;
00045 
00046 extern BI_entry_get_rw             ldap_back_entry_get;
00047 
00048 void ldap_back_release_conn_lock( ldapinfo_t *li, ldapconn_t **lcp, int dolock );
00049 #define ldap_back_release_conn(li, lc) ldap_back_release_conn_lock((li), &(lc), 1)
00050 int ldap_back_dobind( ldapconn_t **lcp, Operation *op, SlapReply *rs, ldap_back_send_t sendok );
00051 int ldap_back_retry( ldapconn_t **lcp, Operation *op, SlapReply *rs, ldap_back_send_t sendok );
00052 int ldap_back_map_result( SlapReply *rs );
00053 int ldap_back_op_result( ldapconn_t *lc, Operation *op, SlapReply *rs,
00054        ber_int_t msgid, time_t timeout, ldap_back_send_t sendok );
00055 int ldap_back_cancel( ldapconn_t *lc, Operation *op, SlapReply *rs, ber_int_t msgid, ldap_back_send_t sendok );
00056 
00057 int ldap_back_init_cf( BackendInfo *bi );
00058 int ldap_pbind_init_cf( BackendInfo *bi );
00059 
00060 extern int ldap_back_conndn_cmp( const void *c1, const void *c2);
00061 extern int ldap_back_conn_cmp( const void *c1, const void *c2);
00062 extern int ldap_back_conndn_dup( void *c1, void *c2 );
00063 extern void ldap_back_conn_free( void *c );
00064 
00065 extern ldapconn_t * ldap_back_conn_delete( ldapinfo_t *li, ldapconn_t *lc );
00066 
00067 extern int ldap_back_conn2str( const ldapconn_base_t *lc, char *buf, ber_len_t buflen );
00068 extern int ldap_back_connid2str( const ldapconn_base_t *lc, char *buf, ber_len_t buflen );
00069 
00070 extern int
00071 ldap_back_proxy_authz_ctrl(
00072               Operation     *op,
00073               SlapReply     *rs,
00074               struct berval *bound_ndn,
00075               int           version,
00076               slap_idassert_t      *si,
00077               LDAPControl   *ctrl );
00078 
00079 extern int
00080 ldap_back_controls_add(
00081               Operation     *op,
00082               SlapReply     *rs,
00083               ldapconn_t    *lc,
00084               LDAPControl   ***pctrls );
00085 
00086 extern int
00087 ldap_back_controls_free( Operation *op, SlapReply *rs, LDAPControl ***pctrls );
00088 
00089 extern void
00090 ldap_back_quarantine(
00091        Operation     *op,
00092        SlapReply     *rs );
00093 
00094 #ifdef LDAP_BACK_PRINT_CONNTREE
00095 extern void
00096 ldap_back_print_conntree( ldapinfo_t *li, char *msg );
00097 #endif /* LDAP_BACK_PRINT_CONNTREE */
00098 
00099 extern void slap_retry_info_destroy( slap_retry_info_t *ri );
00100 extern int slap_retry_info_parse( char *in, slap_retry_info_t *ri,
00101        char *buf, ber_len_t buflen );
00102 extern int slap_retry_info_unparse( slap_retry_info_t *ri, struct berval *bvout );
00103 
00104 extern int slap_idassert_authzfrom_parse_cf( const char *fname, int lineno, const char *arg, slap_idassert_t *si );
00105 extern int slap_idassert_passthru_parse_cf( const char *fname, int lineno, const char *arg, slap_idassert_t *si );
00106 extern int slap_idassert_parse_cf( const char *fname, int lineno, int argc, char *argv[], slap_idassert_t *si );
00107 
00108 extern int chain_initialize( void );
00109 extern int pbind_initialize( void );
00110 #ifdef SLAP_DISTPROC
00111 extern int distproc_initialize( void );
00112 #endif
00113 
00114 extern int ldap_back_monitor_db_init( BackendDB *be );
00115 extern int ldap_back_monitor_db_open( BackendDB *be );
00116 extern int ldap_back_monitor_db_close( BackendDB *be );
00117 extern int ldap_back_monitor_db_destroy( BackendDB *be );
00118 
00119 extern LDAP_REBIND_PROC            ldap_back_default_rebind;
00120 extern LDAP_URLLIST_PROC    ldap_back_default_urllist;
00121 
00122 LDAP_END_DECL
00123 
00124 #endif /* PROTO_LDAP_H */