]> git.sur5r.net Git - openldap/blob - servers/slurpd/globals.h
Initial revision
[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
14 /*
15  * globals.h - definition of structure holding global data.
16  */
17
18 #include "slurp.h"
19
20 typedef struct globals {
21     /* Thread ID for file manager thread */
22     pthread_t fm_tid;
23     /* The name of the slapd config file (which is also our config file) */
24     char *slapd_configfile;
25     /* How long the master slurpd sleeps when there's no work to do */
26     int no_work_interval;
27     /* We keep running until slurpd_shutdown is nonzero.  HUP signal set this */
28     int slurpd_shutdown;
29     /* Number of replicas we're servicing */
30     int num_replicas;
31     /* Array of pointers to replica info */
32     Ri **replicas;
33     /* Directory where our replica files are written/read */
34     char *slurpd_rdir;
35     /* Name of slurpd status file (timestamp of last replog */
36     char slurpd_status_file[ MAXPATHLEN ];
37     /* Name of the replication log slapd is writing (and we are reading) */
38     char slapd_replogfile[ MAXPATHLEN ];
39     /* Name of local copy of replogfile we maintain */
40     char slurpd_replogfile[ MAXPATHLEN ];
41     /* Non-zero if we were given a replog file to process on command-line */
42     int one_shot_mode;
43     /* Name of program */
44     char *myname;
45     /* Current offset into slurpd replica logfile */
46     off_t srpos;
47     /* mutex to serialize access to reject file */
48     pthread_mutex_t rej_mutex;
49     /* pointer to status struct */
50     St  *st;
51     /* Pointer to replication queue */
52     Rq *rq;
53 #ifdef KERBEROS
54     /* Default name of kerberos srvtab file */
55     char *default_srvtab;
56 #endif /* KERBEROS */
57 #if defined( THREAD_SUNOS4_LWP )
58     tl_t *tsl_list;
59     mon_t tsl_mon;
60 #endif /* THREAD_SUNOS4_LWP */
61 } Globals;
62
63
64 extern Globals *sglob;