1 /*********************************************************** Copyright IBM Corporation 1987 2 3 All Rights Reserved 4 5 Permission to use, copy, modify, and distribute this software and its 6 documentation for any purpose and without fee is hereby granted, 7 provided that the above copyright notice appear in all copies and that 8 both that copyright notice and this permission notice appear in 9 supporting documentation, and that the name of IBM not be 10 used in advertising or publicity pertaining to distribution of the 11 software without specific, written prior permission. 12 13 IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 14 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 15 IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 16 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 17 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 18 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 19 SOFTWARE. 20 21 ******************************************************************/ 22 23 /* 24 * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison 25 */ 26 /* 27 * $Header: argo_debug.h,v 4.6 88/07/19 15:53:40 hagens Exp $ 28 * $Source: /usr/argo/sys/netiso/RCS/argo_debug.h,v $ 29 * @(#)argo_debug.h 7.2 (Berkeley) 04/22/89 30 */ 31 #ifndef __ARGO_DEBUG__ 32 #define __ARGO_DEBUG__ 33 34 #define dump_buf(a, b) Dump_buf((caddr_t)(a), (int)(b)) 35 36 /*********************************************** 37 * Lint stuff 38 **********************************************/ 39 #if defined(lint) 40 /* 41 * lint can't handle the flaky vacuous definitions 42 * of IFDEBUG, ENDDEBUG, etc. 43 */ 44 #endif defined(lint) 45 46 /*********************************************** 47 * DEBUG ON: 48 **********************************************/ 49 #ifndef ARGO_DEBUG 50 #define ARGO_DEBUG 51 #endif ARGO_DEBUG 52 53 54 #ifdef ARGO_DEBUG 55 /* 56 #ifndef TPPT 57 #define TPPT 58 #endif TPPT 59 60 #ifndef TP_PERF_MEAS 61 #define TP_PERF_MEAS 62 #endif TP_PERF_MEAS 63 */ 64 65 unsigned char argo_debug[128]; 66 67 #define IFDEBUG(ascii) \ 68 if(argo_debug[ascii]) { 69 #define ENDDEBUG ; } 70 71 #else ARGO_DEBUG 72 73 /*********************************************** 74 * DEBUG OFF: 75 **********************************************/ 76 77 #ifndef STAR 78 #define STAR * 79 #endif STAR 80 #define IFDEBUG(ascii) //*beginning of comment*/STAR 81 #define ENDDEBUG STAR/*end of comment*// 82 83 #endif ARGO_DEBUG 84 85 /*********************************************** 86 * ASSERT 87 **********************************************/ 88 #ifdef ARGO_DEBUG 89 90 #ifndef lint 91 #define ASSERT(phrase) \ 92 if( !(phrase) ) printf("ASSERTION NOT VALID at line %d file %s\n",__LINE__,__FILE__) 93 #else lint 94 #define ASSERT(phrase) /* phrase */ 95 #endif lint 96 97 #else ARGO_DEBUG 98 99 #define ASSERT(phrase) /* phrase */ 100 101 #endif ARGO_DEBUG 102 103 104 /*********************************************** 105 * CLNP DEBUG OPTIONS 106 **********************************************/ 107 #define D_INPUT '\1' 108 /* clnp input */ 109 #define D_OUTPUT '\2' 110 /* clnp output */ 111 #define D_ROUTE '\3' 112 /* clnp routing */ 113 #define D_CTLINPUT '\4' 114 /* clnp control input */ 115 #define D_CTLOUTPUT '\5' 116 /* clnp control output */ 117 #define D_OPTIONS '\6' 118 /* clnp options */ 119 #define D_IOCTL '\7' 120 /* iso ioctls */ 121 #define D_ETHER '\10' 122 /* clnp over ethernet */ 123 #define D_TOKEN '\11' 124 /* clnp over token ring */ 125 #define D_ADCOM '\12' 126 /* clnp over the adcom */ 127 #define D_ISO '\13' 128 /* iso address family */ 129 #define D_FORWARD '\14' 130 /* clnp forwarding */ 131 #define D_DUMPOUT '\15' 132 /* dump clnp outgoing packets */ 133 #define D_DUMPIN '\16' 134 /* dump clnp input packets */ 135 #define D_DISCARD '\17' 136 /* debug clnp packet discard/er function */ 137 #define D_FRAG '\20' 138 /* clnp fragmentation */ 139 #define D_REASS '\21' 140 /* clnp reassembly */ 141 142 char *clnp_iso_addrp(); 143 144 /*********************************************** 145 * ESIS DEBUG OPTIONS 146 **********************************************/ 147 #define D_ESISOUTPUT '\30' 148 #define D_ESISINPUT '\31' 149 #define D_SNPA '\32' 150 151 /*********************************************** 152 * EON DEBUG OPTION 153 **********************************************/ 154 #define D_EON '\57' 155 156 /*********************************************** 157 * CONS DEBUG OPTIONS 158 **********************************************/ 159 160 #define D_ECNWORK '\60' 161 #define D_ECNOUT '\61' 162 #define D_ECNFIN '\62' 163 #define D_ECNDWN '\63' 164 #define D_ECNUTIL '\64' 165 166 #define D_INCOMING '\70' 167 #define D_CDATA '\71' 168 #define D_CFIND '\72' 169 #define D_CDUMP_REQ '\73' 170 #define D_CADDR '\74' 171 #define D_CCONS '\75' 172 #define D_CCONN '\76' 173 174 175 /*********************************************** 176 * TP DEBUG OPTIONS 177 **********************************************/ 178 179 #define D_SETPARAMS '\137' 180 #define D_RTT '\140' 181 182 #define D_ACKRECV '\141' 183 #define D_ACKSEND '\142' 184 #define D_CONN '\143' 185 #define D_CREDIT '\144' 186 #define D_DATA '\145' 187 #define D_DRIVER '\146' 188 189 #define D_EMIT '\147' 190 #define D_ERROR_EMIT '\150' 191 #define D_TPINPUT '\151' 192 #define D_INDICATION '\152' 193 #define D_CHKSUM '\153' 194 195 #define D_RENEG '\154' 196 #define D_PERF_MEAS '\155' 197 #define D_MBUF_MEAS '\156' 198 #define D_RTC '\157' 199 #define D_SB '\160' 200 201 #define D_DISASTER_CHECK '\161' 202 #define D_REQUEST '\162' 203 #define D_STASH '\163' 204 #define D_NEWSOCK '\164' 205 #define D_TIMER '\165' 206 207 #define D_TPIOCTL '\166' 208 #define D_SIZE_CHECK '\167' 209 #define D_2ER '\170' 210 #define D_DISASTER_CHECK_W '\171' 211 212 #define D_XPD '\172' 213 #define D_SYSCALL '\173' 214 #define D_DROP '\174' 215 #define D_ZDREF '\175' 216 #define D_TPISO '\176' 217 #define D_QUENCH '\177' 218 219 void dump_mbuf(); 220 221 /*********************************************** 222 * New mbuf types for debugging w/ netstat -m 223 * This messes up 4.4 malloc for now. need bigger 224 * mbtypes array for now. 225 **********************************************/ 226 #ifdef notdef 227 228 #define TPMT_DATA 0x21 229 #define TPMT_RCVRTC 0x42 230 #define TPMT_SNDRTC 0x41 231 #define TPMT_TPHDR 0x22 232 #define TPMT_IPHDR 0x32 233 #define TPMT_SONAME 0x28 234 #define TPMT_EOT 0x40 235 #define TPMT_XPD 0x44 236 #define TPMT_PCB 0x23 237 #define TPMT_PERF 0x45 238 239 #else ARGO_DEBUG 240 241 #define TPMT_DATA MT_DATA 242 #define TPMT_RCVRTC MT_DATA 243 #define TPMT_SNDRTC MT_DATA 244 #define TPMT_IPHDR MT_HEADER 245 #define TPMT_TPHDR MT_HEADER 246 #define TPMT_SONAME MT_SONAME 247 /* MT_EOT and MT_XPD are defined in tp_param.h */ 248 #define TPMT_XPD MT_OOBDATA 249 #define TPMT_PCB MT_PCB 250 #define TPMT_PERF MT_PCB 251 252 #endif ARGO_DEBUG 253 254 #endif __ARGO_DEBUG__ 255