]> andersk Git - moira.git/blob - dbck/dbck.h
second code style cleanup: void/void * usage, proper #includes. try to
[moira.git] / dbck / dbck.h
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
13 #define MODE_ASK 1
14 #define MODE_NO 2
15 #define MODE_PREEN 3
16 #define MODE_YES 4
17
18 extern int debug, mode, fast, dcmenable, warn;
19 extern struct hash *users, *machines, *clusters, *lists;
20 extern struct hash *filesys, *nfsphys, *strings, *subnets, *string_dups;
21
22 #define MAX_ID_VALUE 32765
23 #define MIN_ID_VALUE 100
24
25 #define dprintf if (debug) printf
26
27 struct user {
28   char login[9];
29   char potype;
30   char *fullname;
31   int status;
32   int users_id;
33   int pobox_id;
34   int comment;
35   int modby;
36   int fmodby;
37   int pmodby;
38   int sigwho;
39 };
40
41 struct machine {
42   char name[33];
43   char owner_type;
44   int owner_id;
45   int snet_id;
46   int mach_id;
47   int clucount;
48   int acomment;
49   int ocomment;
50   int creator;
51   int modby;
52 };
53
54 struct subnet {
55   char name[33];
56   char owner_type;
57   int owner_id;
58   int snet_id;
59   int modby;
60 };
61
62 struct cluster {
63   char name[33];
64   int clu_id;
65   int modby;
66 };
67
68 struct list {
69   char name[33];
70   char acl_type;
71   int list_id;
72   int  acl_id;
73   int members;
74 };
75
76 struct string {
77   char *name;
78   int string_id;
79   int refc;
80 };
81
82 struct filesys {
83   char name[33];
84   char dir[81];
85   char type;
86   int filsys_id;
87   int mach_id;
88   int owner;
89   int owners;
90   int phys_id;
91 };
92
93 struct nfsphys {
94   char dir[33];
95   int mach_id;
96   int nfsphys_id;
97   int allocated;
98   int count;
99 };
100
101 void dbmserr(void);
102 void out_of_mem(char *msg);
103 void cleanup(void);
104
105 void modified(char *table);
106
107 void phase1(void);
108 void phase2(void);
109 void phase3(void);
110 void phase4(void);
111 void count_only_setup(void);
112
113 /* prototypes from fix.pc */
114 void generic_delete(struct save_queue *sq, int (*pfunc)(void *), char *table,
115                     char *idfield, int preen);
116 void single_delete(char *table, char *idfield, int id);
117 void zero_fix(char *tbl, char *zrfield, char *idfield, int id);
118 int single_fix(char *msg, int preen);
119 void generic_fix(struct save_queue *sq, int (*pfunc)(void *), char *msg,
120                  void (*ffunc)(void *), int preen);
121 int prompt(char *msg);
122 int set_next_object_id(char *object, char *tablename);
123 int generic_fix_id(char *tbl, char *idfield, char *txtfield,
124                    int oldid, char *name);
125
126 /* prototypes from phase3.pc */
127 struct string *string_check(int id);
This page took 0.043804 seconds and 5 git commands to generate.