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