1    | /***************************************
2    |   $Revision: 1.9 $
3    | 
4    |   Error reporting (er) er_facilities.h - list of facilities (modules)
5    | 
6    |   Status: NOT REVUED, TESTED, 
7    | 
8    |   Design and implementation by: Marek Bukowy
9    | 
10   |   ******************/ /******************
11   |   Copyright (c) 1999                              RIPE NCC
12   |  
13   |   All Rights Reserved
14   |   
15   |   Permission to use, copy, modify, and distribute this software and its
16   |   documentation for any purpose and without fee is hereby granted,
17   |   provided that the above copyright notice appear in all copies and that
18   |   both that copyright notice and this permission notice appear in
19   |   supporting documentation, and that the name of the author not be
20   |   used in advertising or publicity pertaining to distribution of the
21   |   software without specific, written prior permission.
22   |   
23   |   THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
24   |   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL
25   |   AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
26   |   DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
27   |   AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
28   |   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
29   |   ***************************************/
30   | 
31   | /* this #include is just for cxref to not get lost completely :-) */
32   | #include <erroutines.h>
33   | 
34   | /* this is the file for adding new facilities.
35   |    This requires three steps:
36   |    1. Prepare and include a file with your error messages (see other files).
37   | 	Please follow the filename convention er_??_errors.c 
38   |    2. Declare your facility number in the enum (before the FAC_LAST)
39   | 
40   |    only when that's ready (for not to prevent other people from working)
41   | 
42   |    3. Add your facility to the facility table, using the DEFFAC macro
43   | 	(it takes a two-letter code and a description of the facility).
44   | 	This will add a pointer to the module-specific error table
45   | 	to the global table.
46   | 
47   |    Order of codes in enum does NOT have to match the order of DEFFAC's.
48   | */
49   | 
50   | typedef enum {
51   | 	FAC_NONE=0,
52   | 	FAC_RX, 
53   | 	FAC_IP,
54   | 	FAC_ER,
55   | 	FAC_UP,
56   | 	FAC_UT,
57   | 	FAC_WH,
58   | 	FAC_RP,
59   | 	FAC_QI,
60   | 	FAC_QC,
61   | 	FAC_PW,
62   | 	FAC_SK,
63   | 	FAC_TH,
64   | 	FAC_SQ,
65   | 	FAC_PM,
66   | 	FAC_LAST
67   | } er_fac_code_t;
68   | 
69   | /* user code for each facility. 
70   | (kept in other files for easy maintenance) */
71   | 
72   | #include "er_ER_errors.h"
73   | #include "er_IP_errors.h"
74   | #include "er_RX_errors.h"
75   | #include "er_UP_errors.h"
76   | #include "er_UT_errors.h"
77   | #include "er_WH_errors.h"
78   | #include "er_RP_errors.h"
79   | #include "er_QI_errors.h"
80   | #include "er_QC_errors.h"
81   | #include "er_PW_errors.h"
82   | #include "er_SK_errors.h"
83   | #include "er_TH_errors.h"
84   | #include "er_SQ_errors.h"
85   | #include "er_PM_errors.h"
86   | /* so much for user code */
87   | 
88   | #ifndef ER_IMPL
89   | /* just a declaration for modules using this */
90   | #include "erroutines.h"
91   | extern er_main_t er_main_err[];
92   | #else 
93   |   er_main_t 	er_main_err[] = {
94   | 	DEFFAC(RX, "radix tree indexing for IP/route objects"),
95   | 	DEFFAC(IP, "IP conversion library"),
96   | 	DEFFAC(ER, "error system") ,
97   | 	DEFFAC(UP, "upper update layer") ,
98   | 	DEFFAC(UT, "general utilities and wrappers") ,
99   | 	DEFFAC(WH, "embedded whois client") ,
100  | 	DEFFAC(RP, "radix tree payload functions"),
101  | 	DEFFAC(QI, "query execution"),
102  | 	DEFFAC(QC, "query preparation"),
103  | 	DEFFAC(PW, "protocol whois"),
104  | 	DEFFAC(SK, "socket communication"),
105  | 	DEFFAC(TH, "thread handling"),
106  | 	DEFFAC(SQ, "SQL interface"),
107  | 	DEFFAC(PM, "protocol mirror"),
108  | 	{FAC_NONE}
109  |   };
110  | #endif /* ER_IMPL */
111  |