]> git.sur5r.net Git - openldap/blob - servers/slurpd/globals.h
MegaCommit of locking update.
[openldap] / servers / slurpd / globals.h
1 /*
2  * Copyright (c) 1996 Regents of the University of Michigan.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms are permitted
6  * provided that this notice is preserved and that due credit is given
7  * to the University of Michigan at Ann Arbor. The name of the University
8  * may not be used to endorse or promote products derived from this
9  * software without specific prior written permission. This software
10  * is provided ``as is'' without express or implied warranty.
11  */
12
13 #ifndef SLURPD_GLOBALS_H
14 #define SLURPD_GLOBALS_H 1
15
16 /*
17  * globals.h - definition of structure holding global data.
18  */
19
20 #include "slurp.h"
21
22 LDAP_BEGIN_DECL
23
24 typedef struct globals {
25     /* Thread ID for file manager thread */
26     ldap_pvt_thread_t fm_tid;
27     /* The name of the slapd config file (which is also our config file) */
28     char *slapd_configfile;
29     /* How long the master slurpd sleeps when there's no work to do */
30     int no_work_interval;
31     /* We keep running until slurpd_shutdown is nonzero.  HUP signal set this */
32     int slurpd_shutdown;
33     /* Number of replicas we're servicing */
34     int num_replicas;
35     /* Array of pointers to replica info */
36     Ri **replicas;
37     /* Directory where our replica files are written/read */
38     char *slurpd_rdir;
39     /* Name of slurpd status file (timestamp of last replog */
40     char slurpd_status_file[ MAXPATHLEN ];
41     /* Name of the replication log slapd is writing (and we are reading) */
42     char slapd_replogfile[ MAXPATHLEN ];
43     /* Name of local copy of replogfile we maintain */
44     char slurpd_replogfile[ MAXPATHLEN ];
45     /* Non-zero if we were given a replog file to process on command-line */
46     int one_shot_mode;
47     /* Name of program */
48     char *myname;
49     /* Current offset into slurpd replica logfile */
50     off_t srpos;
51     /* mutex to serialize access to reject file */
52     ldap_pvt_thread_mutex_t rej_mutex;
53     /* pointer to status struct */
54     St  *st;
55     /* Pointer to replication queue */
56     Rq *rq;
57 #ifdef HAVE_KERBEROS
58     /* Default name of kerberos srvtab file */
59     char *default_srvtab;
60 #endif /* HAVE_KERBEROS */
61 #if defined( HAVE_LWP )  && !defined( HAVE_THR )
62     tl_t *tsl_list;
63     mon_t tsl_mon;
64 #endif /* THREAD_SUNOS4_LWP */
65 } Globals;
66
67
68 extern Globals *sglob;
69
70 LDAP_END_DECL
71
72 #endif /* SLURPD_GLOBALS_H */