]> git.sur5r.net Git - openldap/blob - servers/slurpd/proto-slurp.h
Happy new year!
[openldap] / servers / slurpd / proto-slurp.h
1 /* $OpenLDAP$ */
2 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
3  *
4  * Copyright 1998-2006 The OpenLDAP Foundation.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted only as authorized by the OpenLDAP
9  * Public License.
10  *
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>.
14  */
15 /* Portions Copyright (c) 1996 Regents of the University of Michigan.  
16  * All rights reserved.
17  *
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.
24  */
25 /* ACKNOWLEDGEMENTS:
26  * This work was originally developed by the University of Michigan
27  * (as part of U-MICH LDAP).
28  */
29
30 #ifndef _PROTO_SLURP
31 #define _PROTO_SLURP
32
33 #include <ldap_cdefs.h>
34
35 struct globals;
36
37 /* admin.c */
38 RETSIGTYPE do_admin     LDAP_P((int sig));
39
40 /* args.c */
41 int doargs      LDAP_P((int argc, char **argv, struct globals *g));
42
43 /* ch_malloc.c */
44 #ifdef CSRIMALLOC
45 #define ch_malloc malloc
46 #define ch_realloc realloc
47 #define ch_calloc calloc
48 #define ch_strdup strdup
49 #define ch_free free
50 #else
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));
56 #endif
57
58 /* config.c */
59 int slurpd_read_config  LDAP_P((char *fname));
60
61 extern char *slurpd_pid_file;
62 extern char *slurpd_args_file;
63
64 /* ch_malloc.c */
65 void ch_free LDAP_P(( void *p ));
66
67 /* fm.c */
68 void *fm        LDAP_P((void *arg));
69 RETSIGTYPE do_nothing   LDAP_P((int i));
70 RETSIGTYPE slurp_set_shutdown LDAP_P((int));
71
72 /* globals.c */
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));
78
79 /* ldap_op.c */
80 int do_ldap     LDAP_P((Ri *ri, Re *re, char **errmsg, int *errfree));
81
82 /* lock.c */
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));
87
88 /* reject.c */
89 void write_reject       LDAP_P((Ri *ri, Re *re, int lderr, char *errmsg));
90
91 /* replica.c */
92 int start_replica_thread        LDAP_P((Ri *ri));
93
94 /* replog.c */
95 int copy_replog LDAP_P((char *src, char *dst));
96 int file_nonempty       LDAP_P((char *filename));
97
98 /* sanity.c */
99 int sanity      LDAP_P((void));
100
101 /* st.c */
102 int St_init     LDAP_P((St **st));
103
104 /* tsleep.c */
105 int tsleep      LDAP_P((time_t interval));
106 #if defined( HAVE_LWP )
107 void start_lwp_scheduler LDAP_P(( void ));
108 #endif
109
110 /*main.c */
111 extern const char Versionstr[];
112
113 #endif /* _PROTO_SLURP */