2 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 * Copyright 1999-2017 The OpenLDAP Foundation.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted only as authorized by the OpenLDAP
11 * A copy of this license is available in file LICENSE in the
12 * top-level directory of the distribution or, alternatively, at
13 * <http://www.OpenLDAP.org/license.html>.
16 * This work was initially developed by Howard Chu for inclusion
17 * in OpenLDAP Software.
20 #ifndef SLAPD_COMMON_H
21 #define SLAPD_COMMON_H
34 extern struct tester_conn_args * tester_init( const char *pname, tester_t ptype );
35 extern char * tester_uri( char *uri, char *host, int port );
36 extern void tester_error( const char *msg );
37 extern void tester_perror( const char *fname, const char *msg );
38 extern void tester_ldap_error( LDAP *ld, const char *fname, const char *msg );
39 extern int tester_ignore_str2errlist( const char *err );
40 extern int tester_ignore_err( int err );
42 struct tester_conn_args {
58 #ifdef HAVE_CYRUS_SASL
68 #define TESTER_INIT_ONLY (1 << 0)
69 #define TESTER_COMMON_OPTS "CD:d:H:h:L:l:i:O:p:R:U:X:Y:r:t:w:x"
70 #define TESTER_COMMON_HELP \
72 "[-D <dn> [-w <passwd>]] " \
74 "[-H uri | -h <host> [-p port]] " \
77 "[-L <outerloops>] " \
78 "[-r <maxretries>] " \
80 "[-O <SASL secprops>] " \
81 "[-R <SASL realm>] " \
82 "[-U <SASL authcid> [-X <SASL authzid>]] " \
83 "[-x | -Y <SASL mech>] "
85 extern int tester_config_opt( struct tester_conn_args *config, char opt, char *optarg );
86 extern void tester_config_finish( struct tester_conn_args *config );
87 extern void tester_init_ld( LDAP **ldp, struct tester_conn_args *conf, int flags );
91 #endif /* SLAPD_COMMON_H */