2 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 * Copyright 1998-2005 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).
30 #ifndef SLURPD_GLOBALS_H
31 #define SLURPD_GLOBALS_H 1
34 * globals.h - definition of structure holding global data.
41 typedef struct globals {
42 /* Thread ID for file manager thread */
43 ldap_pvt_thread_t fm_tid;
44 /* pipe/socket used to wake manager from signal handler */
46 /* The name of the slapd config file (which is also our config file) */
47 char *slapd_configfile;
48 /* How long the master slurpd sleeps when there's no work to do */
50 /* We keep running until slurpd_shutdown is nonzero. HUP signal set this */
51 sig_atomic_t slurpd_shutdown;
52 /* Number of replicas we're servicing */
54 /* Array of pointers to replica info */
56 /* Directory where our replica files are written/read */
58 /* Name of slurpd status file (timestamp of last replog */
59 char slurpd_status_file[ MAXPATHLEN ];
60 /* Name of the replication log slapd is writing (and we are reading) */
61 char slapd_replogfile[ MAXPATHLEN ];
62 /* Name of local copy of replogfile we maintain */
63 char slurpd_replogfile[ MAXPATHLEN ];
64 /* Non-zero if we were given a replog file to process on command-line */
66 /* Non-zero if we should not detach the process */
72 /* Current offset into slurpd replica logfile */
74 /* mutex to serialize access to reject file */
75 ldap_pvt_thread_mutex_t rej_mutex;
76 /* pointer to status struct */
78 /* Pointer to replication queue */
80 #ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
81 /* Default name of kerberos srvtab file */
83 #endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND */
84 /* Non-zero if we shall print the version */
89 extern Globals *sglob;
93 #endif /* SLURPD_GLOBALS_H */