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