1 | /*************************************** 2 | $Revision: 1.8 $ 3 | 4 | Error reporting (er) erroutines.h - definition of error reporting aspects. 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 | /* define a list of aspects for debugging. 32 | 33 | Generally, the aspects for different facilities can have the same values 34 | and generally, the values don't matter. 35 | 36 | But a good practice is to give lowe values to the messages 37 | that are more detailed and appear more often. 38 | 39 | The top 0xFF000000 bits are reserved for special codes common to all 40 | facilities, such as circular buffer. 41 | */ 42 | 43 | typedef enum { 44 | /* Global */ 45 | 46 | ASP_CIRC_BUF = 0x40000000, /* write also into the circular buffer */ 47 | /* 0x20000000 - 0x01000000 are reserved for global tags */ 48 | 49 | /* RADIX: */ 50 | ASP_RX_NODCRE_GEN = 0x000080, /* general node creation tag */ 51 | ASP_RX_NODCRE_DET = 0x000040, /* also details on node creation */ 52 | ASP_RX_NODCRE_BOT = 0x0000C0, /* both general and detailed */ 53 | 54 | ASP_RX_STKBLD_GEN = 0x000020, /* general stack building */ 55 | ASP_RX_STKBLD_DET = 0x000010, /* also detailed stack building */ 56 | ASP_RX_STKBLD_BOT = 0x000030, /* both general and detailed */ 57 | 58 | ASP_RX_SRCH_GEN = 0x000800, /* search */ 59 | ASP_RX_SRCH_DET = 0x000400, 60 | ASP_RX_SRCH_BOT = 0x000C00, 61 | 62 | ASP_RX_TREE_GEN = 0x002000, /* general tree/forest administration */ 63 | ASP_RX_TREE_DET = 0x001000, /* detailed */ 64 | ASP_RX_TREE_BOT = 0x003000, /* both general and detailed */ 65 | 66 | ASP_RX_TREE_WALK = 0x000001, 67 | 68 | 69 | /* Radix payload */ 70 | ASP_RP_PACK_DET = 0x000100, /* pack conversion */ 71 | ASP_RP_TREE_DET = 0x001000, /* finding tree in forest */ 72 | ASP_RP_LOAD_GEN = 0x010000, /* loading of trees */ 73 | ASP_RP_LOAD_DET = 0x000010, /* loading of trees - detailed */ 74 | ASP_RP_SRCH_DATA = 0x000040, /* search - display 'immediate data' */ 75 | ASP_RP_SRCH_DET = 0x004000, /* search - detailed */ 76 | ASP_RP_SRCH_GEN = 0x040000, /* search - general */ 77 | 78 | 79 | /* Query instructions */ 80 | ASP_QI_LAST_DET = 0x001000, /* ids of the objects from the LAST table */ 81 | ASP_QI_SKIP = 0x004000, /* query skipped */ 82 | 83 | ASP_QI_REF_DET = 0x010000, /* referral, detailed */ 84 | ASP_QI_REF_GEN = 0x020000, /* referral */ 85 | 86 | ASP_QI_COLL_DET = 0x100000, /* id collection (exec. of subqueries) */ 87 | ASP_QI_COLL_GEN = 0x200000, /* query list */ 88 | 89 | /* Query command */ 90 | ASP_QC_BUILD = 0x800000, /* query preparation */ 91 | 92 | /* Threads */ 93 | ASP_TH_NEW = 0x800000, /* new thread */ 94 | 95 | /* Sockets */ 96 | ASP_SK_GEN = 0x000100, /* general aspect */ 97 | ASP_SK_WRIT = 0x000001, /* writing functions; buffer printed too */ 98 | 99 | /* Protocol whois */ 100 | ASP_PW_CONN = 0x001000, /* connection opened */ 101 | 102 | 103 | /* Protocol whois - aspects for INFO (log) messages */ 104 | ASP_PWI_PASSUN = 0x010000, /* unauthorised address passing */ 105 | ASP_PWI_QRYLOG = 0x100000, /* log query after it's been processed */ 106 | ASP_PWI_DENTRY = 0x200000, /* log connection from a denied host */ 107 | 108 | ASP_SQ_QRYTIME = 0x000100, /* log the query,result and time it took */ 109 | ASP_SQ_ABORT = 0x001000 /* aborting a sql connection */ 110 | } er_asp_t;