modules/er/er_aspects.h
/* [<][>][^][v][top][bottom][index][help] */
FUNCTIONS
This source file includes following functions.
- EXTINI
- EXTINI
1 /***************************************
2 $Revision: 1.21 $
3
4 Error reporting (er) er_aspects.{m4,h} - definition of error aspects
5 for the error reporting module
6
7 Status: NOT REVUED, TESTED,
8
9 Design and implementation by: Marek Bukowy
10
11 ******************/ /******************
12 Copyright (c) 1999 RIPE NCC
13
14 All Rights Reserved
15
16 Permission to use, copy, modify, and distribute this software and its
17 documentation for any purpose and without fee is hereby granted,
18 provided that the above copyright notice appear in all copies and that
19 both that copyright notice and this permission notice appear in
20 supporting documentation, and that the name of the author not be
21 used in advertising or publicity pertaining to distribution of the
22 software without specific, written prior permission.
23
24 THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
25 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL
26 AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
27 DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
28 AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
29 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
30 ***************************************/
31
32 /*
33 NOTE: modify the m4 file only, do not change the resulting .h !!!
34 */
35
36 #include "erroutines.h"
37
38 typedef struct {
39 er_fac_code_t f;
40 char *n;
41 int v;
42 } er_aspstr_t;
43
44 #ifdef ER_IMPL
45 #define EXTDEF
46 #define EXTINI(a,b) a = b;
/* [<][>][^][v][top][bottom][index][help] */
47 #else
48 #define EXTDEF extern
49 #define EXTINI(a,b) extern a;
/* [<][>][^][v][top][bottom][index][help] */
50 #endif
51
52 /* m4 macro: #define a symbol and put its string version into the array
53 at the same time. The string version will have "ASP_" cut off if
54 the string begins with it. The #defines are diverted to stream 9, so
55 they appear later in the output (outside the /endif block)
56 */
57
58
59
60 typedef enum {
61
62 /* 0x20000000 - 0x01000000 are reserved for global tags */
63
64 /* RADIX: */
65 ASP_RX_NODCRE_GEN = 0x000080 , /* general node creation tag */
66 ASP_RX_NODCRE_DET = 0x000040 , /* also details on node creation */
67
68 ASP_RX_STKBLD_GEN = 0x000020 , /* general stack building */
69 ASP_RX_STKBLD_DET = 0x000010 , /* also detailed stack building */
70
71 ASP_RX_SRCH_GEN = 0x000800 , /* search */
72 ASP_RX_SRCH_DET = 0x000400 ,
73
74 ASP_RX_TREE_GEN = 0x002000 , /* general tree/forest administration */
75 ASP_RX_TREE_DET = 0x001000 , /* detailed */
76
77 ASP_RX_TREE_WALK = 0x000001 ,
78
79
80 /* Radix payload */
81 ASP_RP_PACK_DET = 0x000100 , /* pack conversion */
82 ASP_RP_TREE_DET = 0x001000 , /* finding tree in forest */
83 ASP_RP_LOAD_GEN = 0x010000 , /* loading of trees */
84 ASP_RP_LOAD_DET = 0x000010 , /* loading of trees - detailed */
85 ASP_RP_SRCH_DATA = 0x000040 , /* search - display 'immediate data' */
86 ASP_RP_SRCH_DET = 0x004000 , /* search - detailed */
87 ASP_RP_SRCH_GEN = 0x040000 , /* search - general */
88
89
90 /* Query instructions */
91 ASP_QI_LAST_DET = 0x000010 , /* ids of the objects from the LAST table */
92 ASP_QI_SKIP = 0x004000 , /* query skipped */
93
94 ASP_QI_REF_DET = 0x010000 , /* referral, detailed */
95 ASP_QI_REF_GEN = 0x020000 , /* referral */
96
97 ASP_QI_COLL_DET = 0x100000 , /* id collection (exec. of subqueries) */
98 ASP_QI_COLL_GEN = 0x200000 , /* query list */
99 ASP_QI_WATCH = 0x080000 , /* watchdog */
100
101 /* Query command */
102 ASP_QC_BUILD = 0x800000 , /* query preparation */
103
104 /* Threads */
105 ASP_TH_NEW = 0x800000 , /* new thread */
106
107 /* Sockets */
108 ASP_SK_GEN = 0x000100 , /* general aspect */
109 ASP_SK_WRIT = 0x000001 , /* writing functions; buffer printed too */
110 ASP_SK_WATCH = 0x000800 , /* watchdog */
111
112 /* Protocol whois */
113 ASP_PW_CONN = 0x001000 , /* connection opened */
114
115 /* Protocol whois - aspects for INFO (log) messages */
116 ASP_PW_I_PASSUN = 0x010000 , /* unauthorised address passing */
117 ASP_PW_I_QRYLOG = 0x100000 , /* log query after it's been processed */
118 ASP_PW_I_DENTRY = 0x200000 , /* log connection from a denied host */
119
120 ASP_SQ_QRYTIME = 0x000100 , /* log the query,result and time it took */
121 ASP_SQ_ABORT = 0x001000 , /* aborting a sql connection */
122
123 ASP_PM_INPUT = 0x000010 , /* log the query */
124 ASP_PM_ERESP = 0x000001 , /* print server error responses */
125
126 /* MIME Parser module */
127 ASP_MM_GEN = 0x000100 , /* General aspect */
128 ASP_MM_SEC = 0x001000 , /* Security-related aspect */
129
130 /* Main server (sv) */
131 ASP_SV_PORT = 0x000100 , /* listing ports */
132
133 /* UD - core update process */
134 ASP_UD_SQL = 0x000010 , /* print SQL queries */
135 ASP_UD_OBJ = 0x000100 , /* trace object update process */
136 ASP_UD_UPDLOG = 0x001000 , /* print summary information */
137
138 /* Access control */
139 ASP_AC_DECAY = 0x000100 , /* decaying process */
140 ASP_AC_PRUNE_DET = 0x000010 , /* pruning the access tree, detailed */
141 ASP_AC_I_PERMBAN = 0x002000 , /* a permanent ban was set */
142
143 /* Protocol Config */
144 ASP_PC_I_SESSION = 0x000100 , /* session event: log on, log off, auth fail */
145 ASP_PC_I_COMMAND = 0x000200 , /* command executed */
146
147 /* UP - dbupdate module */
148 ASP_UP_FILE = 0x000001 , /* File related */
149 ASP_UP_GEN = 0x000010 , /* General */
150
151 /* Public Authentication (GPG) module */
152 ASP_PA_GEN = 0x000100 , /* General aspect */
153
154 /* utility module */
155 ASP_UT_MEM = 0x00000001 ,
156
157 ASP_NONE = 0
158
159 } er_aspect_en;
160
161 EXTDEF
162 er_aspstr_t er_asparr[]
163 #ifdef ER_IMPL
164 = {
165
166 { FAC_RX, "RX_NODCRE_GEN", ASP_RX_NODCRE_GEN },
167 { FAC_RX, "RX_NODCRE_DET", ASP_RX_NODCRE_DET },
168 { FAC_RX, "RX_STKBLD_GEN", ASP_RX_STKBLD_GEN },
169 { FAC_RX, "RX_STKBLD_DET", ASP_RX_STKBLD_DET },
170 { FAC_RX, "RX_SRCH_GEN", ASP_RX_SRCH_GEN },
171 { FAC_RX, "RX_SRCH_DET", ASP_RX_SRCH_DET },
172 { FAC_RX, "RX_TREE_GEN", ASP_RX_TREE_GEN },
173 { FAC_RX, "RX_TREE_DET", ASP_RX_TREE_DET },
174 { FAC_RX, "RX_TREE_WALK", ASP_RX_TREE_WALK },
175 { FAC_RP, "RP_PACK_DET", ASP_RP_PACK_DET },
176 { FAC_RP, "RP_TREE_DET", ASP_RP_TREE_DET },
177 { FAC_RP, "RP_LOAD_GEN", ASP_RP_LOAD_GEN },
178 { FAC_RP, "RP_LOAD_DET", ASP_RP_LOAD_DET },
179 { FAC_RP, "RP_SRCH_DATA", ASP_RP_SRCH_DATA },
180 { FAC_RP, "RP_SRCH_DET", ASP_RP_SRCH_DET },
181 { FAC_RP, "RP_SRCH_GEN", ASP_RP_SRCH_GEN },
182 { FAC_QI, "QI_LAST_DET", ASP_QI_LAST_DET },
183 { FAC_QI, "QI_SKIP", ASP_QI_SKIP },
184 { FAC_QI, "QI_REF_DET", ASP_QI_REF_DET },
185 { FAC_QI, "QI_REF_GEN", ASP_QI_REF_GEN },
186 { FAC_QI, "QI_COLL_DET", ASP_QI_COLL_DET },
187 { FAC_QI, "QI_COLL_GEN", ASP_QI_COLL_GEN },
188 { FAC_QI, "QI_WATCH", ASP_QI_WATCH },
189 { FAC_QC, "QC_BUILD", ASP_QC_BUILD },
190 { FAC_TH, "TH_NEW", ASP_TH_NEW },
191 { FAC_SK, "SK_GEN", ASP_SK_GEN },
192 { FAC_SK, "SK_WRIT", ASP_SK_WRIT },
193 { FAC_SK, "SK_WATCH", ASP_SK_WATCH },
194 { FAC_PW, "PW_CONN", ASP_PW_CONN },
195 { FAC_PW, "PW_I_PASSUN", ASP_PW_I_PASSUN },
196 { FAC_PW, "PW_I_QRYLOG", ASP_PW_I_QRYLOG },
197 { FAC_PW, "PW_I_DENTRY", ASP_PW_I_DENTRY },
198 { FAC_SQ, "SQ_QRYTIME", ASP_SQ_QRYTIME },
199 { FAC_SQ, "SQ_ABORT", ASP_SQ_ABORT },
200 { FAC_PM, "PM_INPUT", ASP_PM_INPUT },
201 { FAC_PM, "PM_ERESP", ASP_PM_ERESP },
202 { FAC_MM, "MM_GEN", ASP_MM_GEN },
203 { FAC_MM, "MM_SEC", ASP_MM_SEC },
204 { FAC_SV, "SV_PORT", ASP_SV_PORT },
205 { FAC_UD, "UD_SQL", ASP_UD_SQL },
206 { FAC_UD, "UD_OBJ", ASP_UD_OBJ },
207 { FAC_UD, "UD_UPDLOG", ASP_UD_UPDLOG },
208 { FAC_AC, "AC_DECAY", ASP_AC_DECAY },
209 { FAC_AC, "AC_PRUNE_DET", ASP_AC_PRUNE_DET },
210 { FAC_AC, "AC_I_PERMBAN", ASP_AC_I_PERMBAN },
211 { FAC_PC, "PC_I_SESSION", ASP_PC_I_SESSION },
212 { FAC_PC, "PC_I_COMMAND", ASP_PC_I_COMMAND },
213 { FAC_UP, "UP_FILE", ASP_UP_FILE },
214 { FAC_UP, "UP_GEN", ASP_UP_GEN },
215 { FAC_PA, "PA_GEN", ASP_PA_GEN },
216 { FAC_UT, "UT_MEM", ASP_UT_MEM },
217 /* m4 - paste the definitions here */
218
219 {FAC_NONE, NULL, 0}
220 }
221 #endif /* ER_IMPL */
222 ;
223
224
225 unsigned int ER_aspval(char *key);