Source File modules/er/er_facilities.h

    1    | /***************************************
    2    |   $Revision: 1.16 $
    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   | /*
    32   | NOTE:  modify the m4 file only, do not change the resulting .h !!!
    33   | */
    34   |
    35   | /* this #include is just for cxref to not get lost completely :-) */
    36   | #include <erroutines.h>
    37   |
    38   | /* this is the file for adding new facilities.
    39   |    This requires three steps:
    40   |    1. Prepare and  a file with your error messages (see other files).
    41   |       Please follow the filename convention er_??_errors.c
    42   |    2. Declare your facility number in the enum (before the FAC_LAST)
    43   |
    44   |    only when that's ready (for not to prevent other people from working)
    45   |
    46   |    3. Add your facility to the facility table, using the GLUP macro
    47   | 	(it takes a two-letter code and a description of the facility).
    48   | 	This will add a pointer to the module-specific error table
    49   | 	to the global table.
    50   | */
    51   |
    52   | /* m4 macro */
    53   |
    54   |
    55   |
    56   |
    57   |
    58   |
    59   |
    60   |
    61   | typedef enum {
    62   | 	FAC_NONE=0,
    63   | 	 FAC_RX   ,
    64   | 	 FAC_ER    ,
    65   | 	 FAC_IP   ,
    66   | 	 FAC_UP    ,
    67   | 	 FAC_UT    ,
    68   | 	 FAC_WH    ,
    69   | 	 FAC_RP   ,
    70   | 	 FAC_QI   ,
    71   | 	 FAC_QC   ,
    72   | 	 FAC_PW   ,
    73   | 	 FAC_SK   ,
    74   | 	 FAC_TH   ,
    75   | 	 FAC_SQ   ,
    76   | 	 FAC_PM   ,
    77   | 	 FAC_MM   ,
    78   | 	 FAC_SV   ,
    79   | 	 FAC_AC   ,
    80   | 	 FAC_UD   ,
    81   | 	 FAC_PA   ,
    82   | 	 FAC_PC   ,
    83   | 	FAC_LAST
    84   | } er_fac_code_t;
    85   |
    86   | /* paste the "include"s here. This will define error codes. */
    87   | #include "er_RX_errors.h"
    88   | #include "er_ER_errors.h"
    89   | #include "er_IP_errors.h"
    90   | #include "er_UP_errors.h"
    91   | #include "er_UT_errors.h"
    92   | #include "er_WH_errors.h"
    93   | #include "er_RP_errors.h"
    94   | #include "er_QI_errors.h"
    95   | #include "er_QC_errors.h"
    96   | #include "er_PW_errors.h"
    97   | #include "er_SK_errors.h"
    98   | #include "er_TH_errors.h"
    99   | #include "er_SQ_errors.h"
    100  | #include "er_PM_errors.h"
    101  | #include "er_MM_errors.h"
    102  | #include "er_SV_errors.h"
    103  | #include "er_AC_errors.h"
    104  | #include "er_UD_errors.h"
    105  | #include "er_PA_errors.h"
    106  | #include "er_PC_errors.h"
    107  |
    108  |
    109  | #ifndef ER_IMPL
    110  | /* just a declaration for modules using this */
    111  | extern er_fac_t er_fac_err[];
    112  | #else
    113  |   er_fac_t 	er_fac_err[] = {
    114  | /*    {FAC_NONE}, */
    115  | DEFFAC(RX,"radix tree indexing for IP/route objects"),
    116  | DEFFAC(ER,"error system"),
    117  | DEFFAC(IP,"IP conversion library"),
    118  | DEFFAC(UP,"upper update layer"),
    119  | DEFFAC(UT,"general utilities and wrappers"),
    120  | DEFFAC(WH,"embedded whois client"),
    121  | DEFFAC(RP,"radix tree payload functions"),
    122  | DEFFAC(QI,"query execution"),
    123  | DEFFAC(QC,"query preparation"),
    124  | DEFFAC(PW,"protocol whois"),
    125  | DEFFAC(SK,"socket communication"),
    126  | DEFFAC(TH,"thread handling"),
    127  | DEFFAC(SQ,"SQL interface"),
    128  | DEFFAC(PM,"protocol mirror"),
    129  | DEFFAC(MM,"MIME parser"),
    130  | DEFFAC(SV,"main server functions"),
    131  | DEFFAC(AC,"access control"),
    132  | DEFFAC(UD,"core update process"),
    133  | DEFFAC(PA,"GPG authentication"),
    134  | DEFFAC(PC,"Protocol config"),
    135  |
    136  |     {FAC_LAST}
    137  |   };
    138  | #endif /* ER_IMPL */
    139  |