1 | /***************************************
2 | $Revision: 1.7 $
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_LAST
65 | } er_fac_code_t;
66 |
67 | /* user code for each facility.
68 | (kept in other files for easy maintenance) */
69 |
70 | #include "er_ER_errors.h"
71 | #include "er_IP_errors.h"
72 | #include "er_RX_errors.h"
73 | #include "er_UP_errors.h"
74 | #include "er_UT_errors.h"
75 | #include "er_WH_errors.h"
76 | #include "er_RP_errors.h"
77 | #include "er_QI_errors.h"
78 | #include "er_QC_errors.h"
79 | #include "er_PW_errors.h"
80 | #include "er_SK_errors.h"
81 | #include "er_TH_errors.h"
82 |
83 | /* so much for user code */
84 |
85 | #ifndef ER_IMPL
86 | /* just a declaration for modules using this */
87 | #include "erroutines.h"
88 | extern er_main_t er_main_err[];
89 | #else
90 | er_main_t er_main_err[] = {
91 | DEFFAC(RX, "radix tree indexing for IP/route objects"),
92 | DEFFAC(IP, "IP conversion library"),
93 | DEFFAC(ER, "error system") ,
94 | DEFFAC(UP, "upper update layer") ,
95 | DEFFAC(UT, "general utilities and wrappers") ,
96 | DEFFAC(WH, "embedded whois client") ,
97 | DEFFAC(RP, "radix tree payload functions"),
98 | DEFFAC(QI, "query execution"),
99 | DEFFAC(QC, "query preparation"),
100 | DEFFAC(PW, "protocol whois"),
101 | DEFFAC(SK, "socket communication"),
102 | DEFFAC(TH, "thread handling"),
103 | {FAC_NONE}
104 | };
105 | #endif /* ER_IMPL */
106 |