File: globals.h

package info (click to toggle)
openldap2 2.0.23-6.3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 7,816 kB
  • ctags: 6,366
  • sloc: ansic: 86,391; sh: 9,816; makefile: 1,270; cpp: 1,107; sql: 838; php: 700; perl: 134; tcl: 40
file content (71 lines) | stat: -rw-r--r-- 2,431 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* $OpenLDAP: pkg/ldap/servers/slurpd/globals.h,v 1.6.8.2 2000/06/13 17:57:41 kurt Exp $ */
/*
 * 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.
 */

#ifndef SLURPD_GLOBALS_H
#define SLURPD_GLOBALS_H 1

/*
 * globals.h - definition of structure holding global data.
 */

#include "slurp.h"

LDAP_BEGIN_DECL

typedef struct globals {
    /* Thread ID for file manager thread */
    ldap_pvt_thread_t fm_tid;
    /* 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 */
    sig_atomic_t slurpd_shutdown;
    /* 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;
    /* Non-zero if we should not detach the process */
    int no_detach;
    /* Name of program */
    char *myname;
    /* Current offset into slurpd replica logfile */
    off_t srpos;
    /* mutex to serialize access to reject file */
    ldap_pvt_thread_mutex_t rej_mutex;
    /* pointer to status struct */
    St	*st;
    /* Pointer to replication queue */
    Rq *rq;
#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
    /* Default name of kerberos srvtab file */
    char *default_srvtab;
#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND */
} Globals;


extern Globals *sglob;

LDAP_END_DECL

#endif /* SLURPD_GLOBALS_H */