]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/tools/mimic.c
Sync with HEAD
[openldap] / servers / slapd / tools / mimic.c
index afd13883896f66f914be7ce26db65530858952b7..2c9cd1c364ef1e98e9f6f8b7138a31b3e72d54c3 100644 (file)
@@ -1,8 +1,24 @@
 /* $OpenLDAP$ */
-/*
- * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2003 The OpenLDAP Foundation.
+ * Portions Copyright 1998-2003 Kurt D. Zeilenga.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
+ */
+/* ACKNOWLEDGEMENTS:
+ * This work was initially developed by Kurt Zeilenga for inclusion
+ * in OpenLDAP Software.
  */
+
+
 /*
  * Mimic unused interfaces of slapd...
  * needed for linking.
@@ -13,6 +29,8 @@
 
 #include "../slap.h"
 
+#include "ldap_rq.h"
+
 /* needed by WIN32 and back-monitor */
 time_t starttime;
 
@@ -22,7 +40,7 @@ const char Versionstr[] = "";
 /* bogus ../results.c */
 int str2result(
        char* s,
-       int *code, 
+       int *code,
        char **matched,
        char **info )
 {
@@ -31,100 +49,67 @@ int str2result(
 }
 
 void
-send_ldap_disconnect(
-    Connection *conn,
-    Operation  *op,
-    ber_int_t  err,
-    const char *text
+send_ldap_disconnect( Operation        *op, SlapReply *rs )
+{
+       assert(0);
+}
+
+int
+slap_null_cb(
+    Operation  *op, SlapReply *rs
 )
 {
        assert(0);
 }
 
 void
-send_ldap_extended(
-    Connection *conn,
-    Operation  *op,
-    ber_int_t  err,
-    const char *matched,
-    const char *text,
-       BerVarray refs,
-    const char *rspoid,
-       struct berval *rspdata,
-       LDAPControl **ctrls
+slap_send_ldap_extended(
+    Operation  *op, SlapReply *rs
 )
 {
        assert(0);
 }
 
 void
-send_ldap_sasl(
-    Connection *conn,
-    Operation  *op,
-    ber_int_t  err,
-    const char *matched,
-    const char *text,
-       BerVarray refs,
-       LDAPControl **ctrls,
-       struct berval *cred
+slap_send_ldap_intermediate_resp(
+       Operation *op, SlapReply *rs
 )
 {
        assert(0);
 }
 
 void
-send_ldap_result(
-       Connection  *conn, 
-       Operation   *op,
-       ber_int_t     err,
-       const char    *matched,
-       const char    *text,
-       BerVarray refs,
-       LDAPControl **ctrls
-)        
+send_ldap_sasl( Operation *op, SlapReply *rs )
 {
        assert(0);
 }
 
 void
-send_search_result(
-       Connection  *conn, 
-       Operation   *op,
-       ber_int_t     err,
-       const char    *matched,
-       const char    *text,
-       BerVarray refs,
-       LDAPControl **ctrls,
-       int             nentries
-)        
+slap_send_ldap_result( Operation *op, SlapReply *rs )
 {
        assert(0);
 }
 
 int
-send_search_entry(
-       Backend *be,
-       Connection  *conn, 
-       Operation   *op,
-       Entry   *e,
-       AttributeName   *attrs,
-       int             attrsonly,
-       LDAPControl **ctrls
-)        
+slap_send_search_entry( Operation *op, SlapReply *rs )
 {
        assert(0);
        return -1;
 }
 
-int send_search_reference(
-       Backend *be,
-       Connection  *conn, 
-       Operation   *op,
-       Entry   *e,
-       BerVarray       refs,
-       LDAPControl **ctrls,
-       BerVarray       *v2refs
-)
+int
+slap_send_search_reference( Operation *op, SlapReply *rs )
+{
+       assert(0);
+       return -1;
+}
+
+int slap_read_controls(
+       Operation *op,
+       SlapReply *rs,
+       Entry *e,
+       const struct berval *oid,
+       LDAPControl **c )
 {
        assert(0);
        return -1;
@@ -140,29 +125,41 @@ int slap_sasl_destroy(void)
        return LDAP_SUCCESS;
 }
 
-int slap_sasl_setpass(
-       Connection      *conn,
-       Operation       *op,
-       const char      *reqoid,
-       struct berval   *reqdata,
-       char            **rspoid,
-       struct berval   **rspdata,
-       LDAPControl     *** rspctrls,
-       const char      **text )
+int slap_sasl_setpass( Operation *op, SlapReply *rs )
 {
        return LDAP_SUCCESS;
 }
 
-char * slap_sasl_secprops( const char *in )
+int slap_sasl_config(
+       int cargc,
+       char **cargv,
+       char *line,
+       const char *fname,
+       int lineno )
 {
-       return NULL;
+       return LDAP_SUCCESS;
+}
+
+
+int connection_client_setup(
+       ber_socket_t s,
+       Listener *l,
+       ldap_pvt_thread_start_t *func,
+       void *arg )
+{
+       assert(0);
+       return 0;
 }
 
-int slap_sasl_regexp_config( const char *match, const char *replace )
+void connection_client_enable( ber_socket_t s )
 {
-       return(0);
+       assert(0);
 }
 
+void connection_client_stop( ber_socket_t s )
+{
+       assert(0);
+}
 
 void connection2anonymous( Connection *c )
 {
@@ -197,8 +194,7 @@ const char * connection_state2str( int state )
        return NULL;
 }
 
-void replog( Backend *be, Operation *op,
-       struct berval *dn, struct berval *ndn, void *change)
+void replog( Operation *op )
 {
        assert(0);
 }
@@ -239,7 +235,7 @@ int read_root_dse_file ( const char *file )
 }
 
 Attribute *
-slap_operational_subschemaSubentry( void )
+slap_operational_subschemaSubentry( Backend *be )
 {
        return NULL;
 }
@@ -256,3 +252,63 @@ slapd_get_listeners(void)
        return NULL;
 }
 
+int
+slap_modrdn2mods(
+       Operation       *op, SlapReply *rs,
+       Entry           *e,
+       LDAPRDN         oldrdn,
+       LDAPRDN         newrdn,
+       Modifications   **pmod )
+{
+       return 0;
+}
+
+int slap_sasl_getdn( Connection *conn, Operation *op, char *id, int len,
+       char *user_realm, struct berval *dn, int flags )
+{
+       return -1;
+}
+
+int slap_sasl_authorized( Operation *op,
+       struct berval *authcDN, struct berval *authzDN )
+{
+       return -1;
+}
+
+int root_dse_info( Connection *conn, Entry **entry, const char **text )
+{
+       return -1;
+}
+
+int slap_entry2mods( Entry *e, Modifications **mods, const char **text,
+                                        char *textbuf, size_t textlen )
+{
+       return -1;
+}
+
+volatile sig_atomic_t slapd_abrupt_shutdown;
+
+int slap_mods_check( Modifications *ml, int update, const char **text,
+               char *textbuf, size_t textlen, void *ctx )
+{
+       return -1;
+}
+
+int slap_mods2entry( Modifications *mods, Entry **e, int repl_user,
+               int dup, const char **text, char *textbuf, size_t textlen )
+{
+       return -1;
+}
+
+int slap_mods_opattrs( Operation *op, Modifications *mods,
+               Modifications **modtail, const char **text,
+               char *textbuf, size_t textlen )
+{
+       return -1;
+}
+
+int slap_parse_user( struct berval *id, struct berval *user,
+               struct berval *realm, struct berval *mech )
+{
+       return -1;
+}