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