source: trunk/include/sh_cat.h@ 507

Last change on this file since 507 was 481, checked in by katerina, 9 years ago

Enhancements and fixes for tickets #374, #375, #376, #377, #378, and #379.

File size: 5.7 KB
Line 
1
2#ifndef SH_CAT_H
3#define SH_CAT_H
4
5typedef struct foo_cat_entry {
6 unsigned long id;
7 unsigned long priority;
8 unsigned long class;
9 const char * format;
10} cat_entry;
11
12extern cat_entry msg_cat[];
13
14extern const char * class_cat[];
15
16#define AUD 0
17#define PANIC 1
18#define RUN 2
19#define FIL 3
20#define TCP 4
21#define ERR 5
22#define STAMP 6
23#define ENET 7
24#define EINPUT 8
25#define EVENT 9
26#define START 10
27#define LOGKEY 11
28#define OTHER_CLA ((1 << RUN)|(1 << FIL)|(1 << TCP))
29#define RUN_NEW ((1 << RUN)|(1 << EVENT)|(1 << START)|(1 << LOGKEY))
30#define FIL_NEW ((1 << FIL)|(1 << EVENT))
31#define ERROR_CLA ((1 << ERR)|(1 << PANIC)|(1 << ENET)|(1 << EINPUT))
32
33#define SH_CLA_RAW_MAX 12
34#define SH_CLA_MAX 16
35
36
37#if 0
38enum {
39 SH_CLA_AUD = (1 << 0),
40 SH_CLA_PANIC = (1 << 1),
41 SH_CLA_RUN = (1 << 2),
42 SH_CLA_FIL = (1 << 3),
43 SH_CLA_TCP = (1 << 4),
44 SH_CLA_ERR = (1 << 5),
45 SH_CLA_STAMP = (1 << 6),
46 SH_CLA_ENET = (1 << 7),
47 SH_CLA_EINPUT = (1 << 8)
48};
49#endif
50
51enum {
52 MSG_EXIT_ABORTS,
53 MSG_START_SRV,
54
55 MSG_EXIT_ABORT1,
56 MSG_EXIT_NORMAL,
57 MSG_START_KEY_MAIL,
58 MSG_START_KEY,
59 MSG_START_0H,
60 MSG_START_1H,
61 MSG_START_2H,
62 MSG_START_GH,
63 MSG_START_GH2,
64 MSG_SUSPEND,
65
66 MSG_MLOCK,
67 MSG_W_SIG,
68 MSG_W_CHDIR,
69
70 MSG_MOD_FAIL,
71 MSG_MOD_OK,
72 MSG_MOD_EXEC,
73
74 MSG_RECONF,
75 MSG_CHECK_0,
76 MSG_CHECK_1,
77 MSG_CHECK_2,
78 MSG_STAMP,
79
80 MSG_D_START,
81 MSG_D_DSTART,
82 MSG_D_FAIL,
83 MSG_D_DELTAOK,
84 MSG_D_DELTAFAIL,
85
86#ifndef HAVE_URANDOM
87 MSG_ENSTART,
88 MSG_ENEXEC,
89 MSG_ENFAIL,
90 MSG_ENTOUT,
91 MSG_ENCLOS,
92 MSG_ENCLOS1,
93 MSG_ENREAD,
94#endif
95
96#ifdef SH_USE_SUIDCHK
97 MSG_SUID_POLICY,
98 MSG_SUID_FOUND,
99 MSG_SUID_SUMMARY,
100 MSG_SUID_QREPORT,
101 MSG_SUID_ERROR,
102#endif
103
104#ifdef SH_USE_UTMP
105 MSG_UT_CHECK,
106
107 MSG_UT_LG1X,
108 MSG_UT_LG2X,
109 MSG_UT_LG3X,
110
111 MSG_UT_LG1A,
112 MSG_UT_LG1B,
113
114 MSG_UT_LG2A,
115 MSG_UT_LG2B,
116
117 MSG_UT_LG3A,
118 MSG_UT_LG3B,
119 MSG_UT_LG3C,
120 MSG_UT_ROT,
121
122 MSG_UT_BAD,
123 MSG_UT_FIRST,
124 MSG_UT_OUTLIER,
125#endif
126
127#ifdef SH_USE_PROCESSCHECK
128 MSG_PCK_CHECK,
129 MSG_PCK_OK,
130 MSG_PCK_P_HIDDEN,
131 MSG_PCK_HIDDEN,
132 MSG_PCK_FAKE,
133 MSG_PCK_MISS,
134#endif
135
136#ifdef SH_USE_PORTCHECK
137 MSG_PORT_MISS,
138 MSG_PORT_NEW,
139 MSG_PORT_RESTART,
140 MSG_PORT_NEWPORT,
141#endif
142
143#ifdef SH_USE_MOUNTS
144 MSG_MNT_CHECK,
145 MSG_MNT_MEMLIST,
146 MSG_MNT_MNTMISS,
147 MSG_MNT_OPTMISS,
148#endif
149
150#ifdef SH_USE_USERFILES
151 MSG_USERFILES_SUMMARY,
152#endif
153
154#ifdef USE_LOGFILE_MONITOR
155 MSG_LOGMON_CHKS,
156 MSG_LOGMON_CHKE,
157 MSG_LOGMON_MISS,
158 MSG_LOGMON_EOPEN,
159 MSG_LOGMON_EREAD,
160 MSG_LOGMON_REP,
161 MSG_LOGMON_SUM,
162 MSG_LOGMON_COR,
163 MSG_LOGMON_MARK,
164 MSG_LOGMON_BURST,
165#endif
166
167#ifdef USE_REGISTRY_CHECK
168 MSG_REG_MISS,
169 MSG_REG_NEW,
170 MSG_REG_CHANGE,
171#endif
172
173#if defined(SH_WITH_CLIENT) || defined(SH_STANDALONE)
174
175 MSG_FI_TOOLATE,
176 MSG_FI_CSUM,
177 MSG_FI_DSUM,
178 MSG_FI_CHK,
179 MSG_FI_NULL,
180 MSG_FI_FAIL,
181 MSG_FI_GLOB,
182 MSG_FI_COLL,
183 MSG_FI_DOUBLE,
184 MSG_FI_2LONG,
185 MSG_FI_2LONG2,
186 MSG_FI_NOPATH,
187 MSG_FI_DLNK,
188 MSG_FI_RDLNK,
189 MSG_FI_NOGRP,
190 MSG_FI_NOUSR,
191 MSG_FI_STAT,
192 MSG_FI_OBSC,
193 MSG_FI_OBSC2,
194 MSG_FI_LIST,
195 MSG_FI_LLNK,
196 MSG_FI_MISS,
197 /* #ifdef SH_USE_XML */
198 MSG_FI_MISS2,
199 MSG_FI_ADD2,
200 /* #endif */
201 MSG_FI_ADD,
202 MSG_FI_CHAN,
203 MSG_FI_NODIR,
204 MSG_FI_DBEX,
205#endif
206
207 MSG_TCP_NETRP,
208
209#ifndef SH_STANDALONE
210#ifdef INET_SYSLOG
211 MSG_INET_SYSLOG,
212 MSG_ERR_SYSLOG,
213#endif
214
215 MSG_TCP_MISMATCH,
216 MSG_TCP_MISENC,
217 MSG_TCP_NONAME,
218 MSG_TCP_UNEXP,
219 MSG_TCP_EFIL,
220 MSG_TCP_NOCONF,
221 MSG_TCP_NOAUTH,
222 MSG_TCP_CONF,
223 MSG_TCP_AUTH,
224 MSG_TCP_FOK,
225 MSG_TCP_FBAD,
226 MSG_TCP_ECONN,
227 MSG_TCP_EZERO,
228 MSG_TCP_EBGN,
229
230 MSG_TCP_CREG,
231 MSG_TCP_FAUTH,
232 MSG_TCP_TIMOUT,
233
234 MSG_TCP_RESCLT,
235 MSG_TCP_RESPEER,
236 MSG_TCP_LOOKERS,
237 MSG_TCP_LOOKUP,
238
239 MSG_TCP_TIMEXC,
240 MSG_TCP_NOCLT,
241 MSG_TCP_BADCONN,
242 MSG_TCP_FFILE ,
243 MSG_TCP_NFILE ,
244 MSG_TCP_FINV ,
245 MSG_TCP_OKFILE,
246 MSG_TCP_OKMSG,
247 MSG_TCP_MSG,
248 MSG_TCP_NEW,
249 MSG_TCP_ILL,
250 MSG_TCP_SYNC,
251 MSG_TCP_RESET,
252 MSG_TCP_CNEW,
253 MSG_E_HTML,
254#endif
255
256
257 MSG_E_AUTH,
258 MSG_ACCESS,
259 MSG_TRUST,
260 MSG_NOACCESS,
261 MSG_P_NODATA,
262
263
264#ifndef MEM_DEBUG
265 MSG_E_MNULL,
266 MSG_E_MMEM,
267#else
268 MSG_MSTAMP,
269 MSG_MSTAMP2,
270 MSG_E_MNULL,
271 MSG_E_MMEM,
272 MSG_E_MREC,
273 MSG_E_MOVER,
274 MSG_E_MUNDER,
275 MSG_E_NOTFREE,
276#endif
277
278 MSG_E_TRUST,
279 MSG_E_HASH,
280 MSG_E_ACCESS,
281 MSG_E_READ,
282 MSG_E_NOTREG,
283 MSG_E_TIMEOUT,
284 MSG_NODEV,
285 MSG_LOCKED,
286 MSG_PIDFILE,
287 MSG_NOEXEC,
288 MSG_ES_ENT,
289 MSG_ES_KEY1,
290 MSG_ES_KEY2,
291 MSG_E_GPG,
292 MSG_E_GPG_FP,
293 MSG_E_GPG_CHK,
294 MSG_E_SUBGEN,
295 MSG_E_SUBGPATH,
296 MSG_E_UNLNK,
297 MSG_E_REGEX,
298 MSG_E_OPENDIR,
299 MSG_E_TRUST1,
300 MSG_E_TRUST2,
301 MSG_E_PWNULL,
302 MSG_E_PWLONG,
303 MSG_E_GRNULL,
304
305 MSG_E_NET,
306 MSG_E_NETST,
307 MSG_E_NETST1,
308 MSG_E_NLOST,
309 MSG_E_NEST,
310
311 MSG_EINVALHEAD,
312 MSG_EINVALCONF,
313 MSG_EINVALS,
314 MSG_EINVALL,
315 MSG_EINVALD,
316 MSG_EINVALDD,
317
318 MSG_SRV_FAIL,
319 MSG_QUEUE_FULL,
320
321 MSG_AUD_OPEN,
322 MSG_AUD_DUP,
323 MSG_AUD_PIPE,
324 MSG_AUD_FORK,
325 MSG_AUD_EXIT,
326 MSG_AUD_SETUID,
327 MSG_AUD_SETGID,
328 MSG_AUD_UTIME,
329 MSG_AUD_EXEC,
330 MSG_AUD_CHDIR,
331 MSG_AUD_UNLINK,
332 MSG_AUD_KILL,
333
334 MSG_ERR_OPEN,
335 MSG_ERR_DUP,
336 MSG_ERR_PIPE,
337 MSG_ERR_FORK,
338 MSG_ERR_SETUID,
339 MSG_ERR_SETGID,
340 MSG_ERR_UTIME,
341 MSG_ERR_EXEC,
342 MSG_ERR_CHDIR,
343 MSG_ERR_UNLINK,
344 MSG_ERR_KILL,
345
346 MSG_ERR_SIGACT,
347 MSG_ERR_CONNECT,
348 MSG_ERR_ACCEPT,
349 MSG_ERR_LSTAT,
350 MSG_ERR_FSTAT,
351 MSG_ERR_STAT,
352 MSG_ERR_FCNTL
353};
354
355#endif
Note: See TracBrowser for help on using the repository browser.