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