1999-09-09 03:06:24 +08:00
|
|
|
/* $OpenLDAP$ */
|
1998-08-09 08:43:13 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 1996 Regents of the University of Michigan.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms are permitted
|
|
|
|
* provided that this notice is preserved and that due credit is given
|
|
|
|
* to the University of Michigan at Ann Arbor. The name of the University
|
|
|
|
* may not be used to endorse or promote products derived from this
|
|
|
|
* software without specific prior written permission. This software
|
|
|
|
* is provided ``as is'' without express or implied warranty.
|
|
|
|
*/
|
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
#ifndef SLURPD_GLOBALS_H
|
|
|
|
#define SLURPD_GLOBALS_H 1
|
1998-08-09 08:43:13 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* globals.h - definition of structure holding global data.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "slurp.h"
|
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
LDAP_BEGIN_DECL
|
|
|
|
|
1998-08-09 08:43:13 +08:00
|
|
|
typedef struct globals {
|
|
|
|
/* Thread ID for file manager thread */
|
1999-01-28 12:34:55 +08:00
|
|
|
ldap_pvt_thread_t fm_tid;
|
1998-08-09 08:43:13 +08:00
|
|
|
/* The name of the slapd config file (which is also our config file) */
|
|
|
|
char *slapd_configfile;
|
|
|
|
/* How long the master slurpd sleeps when there's no work to do */
|
|
|
|
int no_work_interval;
|
|
|
|
/* We keep running until slurpd_shutdown is nonzero. HUP signal set this */
|
1998-12-21 02:16:03 +08:00
|
|
|
sig_atomic_t slurpd_shutdown;
|
1998-08-09 08:43:13 +08:00
|
|
|
/* Number of replicas we're servicing */
|
|
|
|
int num_replicas;
|
|
|
|
/* Array of pointers to replica info */
|
|
|
|
Ri **replicas;
|
|
|
|
/* Directory where our replica files are written/read */
|
|
|
|
char *slurpd_rdir;
|
|
|
|
/* Name of slurpd status file (timestamp of last replog */
|
|
|
|
char slurpd_status_file[ MAXPATHLEN ];
|
|
|
|
/* Name of the replication log slapd is writing (and we are reading) */
|
|
|
|
char slapd_replogfile[ MAXPATHLEN ];
|
|
|
|
/* Name of local copy of replogfile we maintain */
|
|
|
|
char slurpd_replogfile[ MAXPATHLEN ];
|
|
|
|
/* Non-zero if we were given a replog file to process on command-line */
|
|
|
|
int one_shot_mode;
|
1999-09-05 04:24:40 +08:00
|
|
|
/* Non-zero if we should not detach the process */
|
|
|
|
int no_detach;
|
1998-08-09 08:43:13 +08:00
|
|
|
/* Name of program */
|
|
|
|
char *myname;
|
|
|
|
/* Current offset into slurpd replica logfile */
|
|
|
|
off_t srpos;
|
|
|
|
/* mutex to serialize access to reject file */
|
1999-01-28 12:34:55 +08:00
|
|
|
ldap_pvt_thread_mutex_t rej_mutex;
|
1998-08-09 08:43:13 +08:00
|
|
|
/* pointer to status struct */
|
|
|
|
St *st;
|
|
|
|
/* Pointer to replication queue */
|
|
|
|
Rq *rq;
|
1998-10-25 09:41:42 +08:00
|
|
|
#ifdef HAVE_KERBEROS
|
1998-08-09 08:43:13 +08:00
|
|
|
/* Default name of kerberos srvtab file */
|
|
|
|
char *default_srvtab;
|
1998-10-25 09:41:42 +08:00
|
|
|
#endif /* HAVE_KERBEROS */
|
1998-08-09 08:43:13 +08:00
|
|
|
} Globals;
|
|
|
|
|
|
|
|
|
|
|
|
extern Globals *sglob;
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
LDAP_END_DECL
|
|
|
|
|
|
|
|
#endif /* SLURPD_GLOBALS_H */
|