modules/er/er_aspects.h

/* [<][>]
[^][v][top][bottom][index][help] */

FUNCTIONS

This source file includes following functions.
  1. EXTINI
  2. EXTINI

   1 /***************************************
   2   $Revision: 1.17 $
   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 
 100   /* Query command */
 101  ASP_QC_BUILD = 0x800000 ,    /* query preparation */
 102 
 103   /* Threads */
 104  ASP_TH_NEW = 0x800000 ,    /* new thread */
 105   
 106   /* Sockets */
 107  ASP_SK_GEN = 0x000100 ,    /* general aspect */
 108  ASP_SK_WRIT = 0x000001 ,    /* writing functions; buffer printed too */
 109 
 110   /* Protocol whois */
 111  ASP_PW_CONN = 0x001000 ,    /* connection opened */
 112   
 113   /* Protocol whois - aspects for INFO (log) messages */
 114  ASP_PW_I_PASSUN = 0x010000 ,    /* unauthorised address passing */
 115  ASP_PW_I_QRYLOG = 0x100000 ,    /* log query after it's been processed */
 116  ASP_PW_I_DENTRY = 0x200000 ,    /* log connection from a denied host */
 117                 
 118  ASP_SQ_QRYTIME = 0x000100 ,     /* log the query,result and time it took */
 119  ASP_SQ_ABORT = 0x001000 ,    /* aborting a sql connection */  
 120 
 121  ASP_PM_INPUT = 0x000010 ,    /* log the query */
 122  ASP_PM_ERESP = 0x000001 ,    /* print server error responses */
 123 
 124   /* MIME Parser module */
 125  ASP_MM_GEN = 0x000100 ,     /* General aspect */
 126 
 127   /* Main server (sv) */
 128  ASP_SV_PORT = 0x000100 ,    /* listing ports */
 129 
 130   /* UD - core update process */
 131  ASP_UD_SQL = 0x000010 ,     /* print SQL queries */
 132  ASP_UD_OBJ = 0x000100 ,     /* trace object update process */
 133  ASP_UD_UPDLOG = 0x001000 ,     /* print summary information */
 134 
 135   /* Access control */
 136  ASP_AC_DECAY = 0x000100 ,    /* decaying process */
 137  ASP_AC_I_PERMBAN = 0x002000 ,    /* a permanent ban was set */
 138 
 139   /* Protocol Config */
 140  ASP_PC_I_SESSION = 0x000100 ,    /* session event: log on, log off, auth fail */
 141  ASP_PC_I_COMMAND = 0x000200 ,    /* command executed */
 142 
 143   /* UP - dbupdate module */
 144  ASP_UP_FILE = 0x000001 ,      /* File related */
 145  ASP_UP_GEN = 0x000010 ,      /* General */
 146 
 147 ASP_NONE = 0
 148 
 149 } er_aspect_en;
 150 
 151 EXTDEF
 152 er_aspstr_t er_asparr[]
 153 #ifdef ER_IMPL
 154  = {
 155 
 156  { FAC_RX, "RX_NODCRE_GEN", ASP_RX_NODCRE_GEN  },
 157  { FAC_RX, "RX_NODCRE_DET", ASP_RX_NODCRE_DET  },
 158  { FAC_RX, "RX_STKBLD_GEN", ASP_RX_STKBLD_GEN  },
 159  { FAC_RX, "RX_STKBLD_DET", ASP_RX_STKBLD_DET  },
 160  { FAC_RX, "RX_SRCH_GEN", ASP_RX_SRCH_GEN  },
 161  { FAC_RX, "RX_SRCH_DET", ASP_RX_SRCH_DET  },
 162  { FAC_RX, "RX_TREE_GEN", ASP_RX_TREE_GEN  },
 163  { FAC_RX, "RX_TREE_DET", ASP_RX_TREE_DET  },
 164  { FAC_RX, "RX_TREE_WALK", ASP_RX_TREE_WALK  },
 165  { FAC_RP, "RP_PACK_DET", ASP_RP_PACK_DET  },
 166  { FAC_RP, "RP_TREE_DET", ASP_RP_TREE_DET  },
 167  { FAC_RP, "RP_LOAD_GEN", ASP_RP_LOAD_GEN  },
 168  { FAC_RP, "RP_LOAD_DET", ASP_RP_LOAD_DET  },
 169  { FAC_RP, "RP_SRCH_DATA", ASP_RP_SRCH_DATA  },
 170  { FAC_RP, "RP_SRCH_DET", ASP_RP_SRCH_DET  },
 171  { FAC_RP, "RP_SRCH_GEN", ASP_RP_SRCH_GEN  },
 172  { FAC_QI, "QI_LAST_DET", ASP_QI_LAST_DET  },
 173  { FAC_QI, "QI_SKIP", ASP_QI_SKIP  },
 174  { FAC_QI, "QI_REF_DET", ASP_QI_REF_DET  },
 175  { FAC_QI, "QI_REF_GEN", ASP_QI_REF_GEN  },
 176  { FAC_QI, "QI_COLL_DET", ASP_QI_COLL_DET  },
 177  { FAC_QI, "QI_COLL_GEN", ASP_QI_COLL_GEN  },
 178  { FAC_QC, "QC_BUILD", ASP_QC_BUILD  },
 179  { FAC_TH, "TH_NEW", ASP_TH_NEW  },
 180  { FAC_SK, "SK_GEN", ASP_SK_GEN  },
 181  { FAC_SK, "SK_WRIT", ASP_SK_WRIT  },
 182  { FAC_PW, "PW_CONN", ASP_PW_CONN  },
 183  { FAC_PW, "PW_I_PASSUN", ASP_PW_I_PASSUN  },
 184  { FAC_PW, "PW_I_QRYLOG", ASP_PW_I_QRYLOG  },
 185  { FAC_PW, "PW_I_DENTRY", ASP_PW_I_DENTRY  },
 186  { FAC_SQ, "SQ_QRYTIME", ASP_SQ_QRYTIME  },
 187  { FAC_SQ, "SQ_ABORT", ASP_SQ_ABORT  },
 188  { FAC_PM, "PM_INPUT", ASP_PM_INPUT  },
 189  { FAC_PM, "PM_ERESP", ASP_PM_ERESP  },
 190  { FAC_MM, "MM_GEN", ASP_MM_GEN  },
 191  { FAC_SV, "SV_PORT", ASP_SV_PORT  },
 192  { FAC_UD, "UD_SQL", ASP_UD_SQL  },
 193  { FAC_UD, "UD_OBJ", ASP_UD_OBJ  },
 194  { FAC_UD, "UD_UPDLOG", ASP_UD_UPDLOG  },
 195  { FAC_AC, "AC_DECAY", ASP_AC_DECAY  },
 196  { FAC_AC, "AC_I_PERMBAN", ASP_AC_I_PERMBAN  },
 197  { FAC_PC, "PC_I_SESSION", ASP_PC_I_SESSION  },
 198  { FAC_PC, "PC_I_COMMAND", ASP_PC_I_COMMAND  },
 199  { FAC_UP, "UP_FILE", ASP_UP_FILE  },
 200  { FAC_UP, "UP_GEN", ASP_UP_GEN  },
 201  /* m4 - paste the definitions here */
 202 
 203    {FAC_NONE, NULL, 0} 
 204 }
 205 #endif /* ER_IMPL */
 206 ; 
 207 
 208 
 209 unsigned int ER_aspval(char *key);

/* [<][>][^][v][top][bottom][index][help] */