2 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 * Copyright 1998-2004 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>.
15 /* Portions Copyright (c) 1996 Regents of the University of Michigan.
16 * All rights reserved.
18 * Redistribution and use in source and binary forms are permitted
19 * provided that this notice is preserved and that due credit is given
20 * to the University of Michigan at Ann Arbor. The name of the University
21 * may not be used to endorse or promote products derived from this
22 * software without specific prior written permission. This software
23 * is provided ``as is'' without express or implied warranty.
26 * This work was originally developed by the University of Michigan
27 * (as part of U-MICH LDAP).
33 #include <ldap_cdefs.h>
38 RETSIGTYPE do_admin LDAP_P((int sig));
41 int doargs LDAP_P((int argc, char **argv, struct globals *g));
45 #define ch_malloc malloc
46 #define ch_realloc realloc
47 #define ch_calloc calloc
48 #define ch_strdup strdup
51 void *ch_malloc LDAP_P((ber_len_t size));
52 void *ch_realloc LDAP_P((void *block, ber_len_t size));
53 void *ch_calloc LDAP_P((ber_len_t nelem, ber_len_t size));
54 char *ch_strdup LDAP_P((const char *str));
55 void ch_free LDAP_P((void *p));
59 int slurpd_read_config LDAP_P((char *fname));
61 extern char *slurpd_pid_file;
62 extern char *slurpd_args_file;
65 void ch_free LDAP_P(( void *p ));
68 void *fm LDAP_P((void *arg));
69 RETSIGTYPE do_nothing LDAP_P((int i));
70 RETSIGTYPE slurp_set_shutdown LDAP_P((int));
73 extern struct globals *sglob;
74 extern int ldap_syslog;
75 extern int ldap_syslog_level;
76 extern int ldap_debug;
77 extern struct globals *init_globals LDAP_P((void));
80 int do_ldap LDAP_P((Ri *ri, Re *re, char **errmsg, int *errfree));
83 FILE *lock_fopen LDAP_P((const char *fname, const char *type, FILE **lfp));
84 int lock_fclose LDAP_P((FILE *fp, FILE *lfp));
85 int acquire_lock LDAP_P((const char *file, FILE **rfp, FILE **lfp));
86 int relinquish_lock LDAP_P((const char *file, FILE *rfp, FILE *lfp));
89 void write_reject LDAP_P((Ri *ri, Re *re, int lderr, char *errmsg));
92 int start_replica_thread LDAP_P((Ri *ri));
95 int copy_replog LDAP_P((char *src, char *dst));
96 int file_nonempty LDAP_P((char *filename));
99 int sanity LDAP_P((void));
102 int St_init LDAP_P((St **st));
105 int tsleep LDAP_P((time_t interval));
106 #if defined( HAVE_LWP )
107 void start_lwp_scheduler LDAP_P(( void ));
111 extern const char Versionstr[];
113 #endif /* _PROTO_SLURP */