]> andersk Git - moira.git/blame_incremental - dbck/dbck.h
Some globals that really should be wrapped in
[moira.git] / dbck / dbck.h
... / ...
CommitLineData
1/* $Header$
2 *
3 * Declarations for Moira database consistancy checker
4 *
5 * (c) Copyright 1988 by the Massachusetts Institute of Technology.
6 * For copying and distribution information, please see the file
7 * <mit-copyright.h>.
8 */
9
10#include <mit-copyright.h>
11#include <moira_site.h>
12#include <moira_schema.h>
13
14#define MODE_ASK 1
15#define MODE_NO 2
16#define MODE_PREEN 3
17#define MODE_YES 4
18
19extern int debug, mode, fast, dcmenable, warn;
20extern struct hash *users, *machines, *clusters, *lists, *printservers;
21extern struct hash *filesys, *nfsphys, *strings, *subnets, *string_dups;
22
23#define MAX_ID_VALUE 32765
24#define MIN_ID_VALUE 100
25
26#define dprintf if (debug) printf
27
28struct user {
29 char login[USERS_LOGIN_SIZE];
30 char potype;
31 char *fullname;
32 int status;
33 int users_id;
34 int pobox_id;
35 int comment;
36 int modby;
37 int fmodby;
38 int pmodby;
39 int sigwho;
40};
41
42struct machine {
43 char name[MACHINE_NAME_SIZE];
44 char owner_type;
45 int owner_id;
46 int snet_id;
47 int mach_id;
48 int clucount;
49 int acomment;
50 int ocomment;
51 int creator;
52 int modby;
53};
54
55struct subnet {
56 char name[SUBNET_NAME_SIZE];
57 char owner_type;
58 int owner_id;
59 int snet_id;
60 int modby;
61};
62
63struct cluster {
64 char name[CLUSTERS_NAME_SIZE];
65 int clu_id;
66 int modby;
67};
68
69struct list {
70 char name[LIST_NAME_SIZE];
71 char acl_type;
72 char memacl_type;
73 int list_id;
74 int acl_id;
75 int memacl_id;
76 int modby;
77 int members;
78};
79
80struct string {
81 char *name;
82 int string_id;
83 int refc;
84};
85
86struct filesys {
87 char name[FILESYS_LABEL_SIZE];
88 char dir[FILESYS_NAME_SIZE];
89 char type;
90 int filsys_id;
91 int mach_id;
92 int owner;
93 int owners;
94 int phys_id;
95};
96
97struct nfsphys {
98 char dir[NFSPHYS_DIR_SIZE];
99 int mach_id;
100 int nfsphys_id;
101 int allocated;
102 int modby;
103 int count;
104};
105
106struct printserver {
107 int mach_id;
108 int printer_types;
109 char owner_type;
110 int owner_id;
111 int lpc_acl;
112 int modby;
113};
114
115void dbmserr(void);
116void out_of_mem(char *msg);
117void cleanup(void);
118
119void modified(char *table);
120
121void phase1(void);
122void phase2(void);
123void phase3(void);
124void phase4(void);
125void count_only_setup(void);
126
127/* prototypes from fix.pc */
128void generic_delete(struct save_queue *sq, int (*pfunc)(void *), char *table,
129 char *idfield, int preen);
130void single_delete(char *table, char *idfield, int id);
131void zero_fix(char *tbl, char *zrfield, char *idfield, int id);
132int single_fix(char *msg, int preen);
133void generic_fix(struct save_queue *sq, int (*pfunc)(void *), char *msg,
134 void (*ffunc)(void *), int preen);
135int prompt(char *msg);
136int set_next_object_id(char *object, char *tablename);
137int generic_fix_id(char *tbl, char *idfield, char *txtfield,
138 int oldid, char *name);
139
140/* prototypes from phase3.pc */
141struct string *string_check(int id);
This page took 0.03169 seconds and 5 git commands to generate.