Annotation of 43BSDReno/sys/netiso/tp_trace.h, revision 1.1.1.1

1.1       root        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:  * ARGO TP
                     29:  *
                     30:  * $Header: tp_trace.h,v 5.1 88/10/12 12:21:51 root Exp $
                     31:  * $Source: /usr/argo/sys/netiso/RCS/tp_trace.h,v $
                     32:  *     @(#)tp_trace.h  7.3 (Berkeley) 8/29/89 *
                     33:  *
                     34:  * 
                     35:  * Definitions needed for the protocol trace mechanism.
                     36:  */
                     37: 
                     38: #ifndef __TP_TRACE__
                     39: #define __TP_TRACE__
                     40: 
                     41: #ifdef TPPT
                     42: 
                     43: #define TPPTsendack    1
                     44: #define TPPTgotack     2
                     45: #define TPPTXack       3
                     46: #define TPPTgotXack    4
                     47: #define TPPTack                5
                     48: #define TPPTindicate   6
                     49: #define TPPTusrreq     7
                     50: #define TPPTmisc       8
                     51: #define TPPTpcb                9
                     52: #define TPPTref                10
                     53: #define TPPTtpduin     11
                     54: #define TPPTparam      12
                     55: #define TPPTertpdu     13
                     56: #define TPPTdriver     14
                     57: #define TPPTtpduout    15
                     58: 
                     59: #include "../netiso/tp_pcb.h"
                     60: 
                     61: /* this #if is to avoid lint */
                     62: 
                     63: #if  defined(TP_TRACEFILE)||!defined(KERNEL)
                     64: 
                     65: #include "../netiso/tp_tpdu.h"
                     66: 
                     67: #define TPTRACE_STRLEN 50
                     68: 
                     69: 
                     70: /* for packet tracing */
                     71: struct tp_timeval {
                     72:        SeqNum  tptv_seq;
                     73:        u_int tptv_kind;
                     74:        u_int tptv_window;
                     75:        u_int tptv_size;
                     76: };
                     77: 
                     78: struct tp_Trace {
                     79:        u_int   tpt_event;
                     80:        u_int   tpt_arg;
                     81:        u_int   tpt_arg2;
                     82:        int     tpt_tseq;
                     83:        struct timeval  tpt_time;
                     84:        union {
                     85:                struct inpcb    tpt_Inpcb; /* protocol control block */
                     86:                struct tp_ref   tpt_Ref; /* ref part of pcb */
                     87:                struct tpdu     tpt_Tpdu; /* header*/
                     88:                struct tp_param tpt_Param; /* ?? bytes, make sure < 128??*/
                     89:                struct tp_timeval tpt_Time;
                     90:                struct {
                     91:                        u_int tptm_2;
                     92:                        u_int tptm_3;
                     93:                        u_int tptm_4;
                     94:                        u_int tptm_5;
                     95:                        char tpt_Str[TPTRACE_STRLEN];
                     96:                        u_int tptm_1;
                     97:                } tptmisc;
                     98:                u_char                  tpt_Ertpdu; /* use rest of structure */
                     99:        } tpt_stuff;
                    100: };
                    101: #define tpt_inpcb tpt_stuff.tpt_Inpcb
                    102: #define tpt_pcb tpt_stuff.tpt_Pcb
                    103: #define tpt_ref tpt_stuff.tpt_Ref
                    104: #define tpt_tpdu tpt_stuff.tpt_Tpdu
                    105: #define tpt_param tpt_stuff.tpt_Param
                    106: #define tpt_ertpdu tpt_stuff.tpt_Ertpdu
                    107: #define tpt_str tpt_stuff.tptmisc.tpt_Str
                    108: #define tpt_m1 tpt_stuff.tptmisc.tptm_1
                    109: #define tpt_m2 tpt_stuff.tptmisc.tptm_2
                    110: #define tpt_m3 tpt_stuff.tptmisc.tptm_3
                    111: #define tpt_m4 tpt_stuff.tptmisc.tptm_4
                    112: #define tpt_m5 tpt_stuff.tptmisc.tptm_5
                    113: 
                    114: #define tpt_seq tpt_stuff.tpt_Time.tptv_seq
                    115: #define tpt_kind tpt_stuff.tpt_Time.tptv_kind
                    116: #define tpt_window tpt_stuff.tpt_Time.tptv_window
                    117: #define tpt_size tpt_stuff.tpt_Time.tptv_size
                    118: 
                    119: #define TPTRACEN 300
                    120: int tp_Tracen = 0;
                    121: struct tp_Trace tp_Trace[TPTRACEN];
                    122: 
                    123: #endif defined(TP_TRACEFILE)||!defined(KERNEL)
                    124: 
                    125: extern u_char  tp_traceflags[];
                    126: 
                    127: #define IFTRACE(ascii)\
                    128:        if(tp_traceflags[ascii]) {
                    129: /* 
                    130:  * for some reason lint complains about tp_param being undefined no
                    131:  * matter where or how many times I define it.
                    132:  */
                    133: 
                    134: 
                    135: #define ENDTRACE  }
                    136: 
                    137: #define tptrace(A,B,C,D,E,F) \
                    138:        tpTrace((struct tp_pcb *)0,\
                    139:        (u_int)(A),(u_int)(B),(u_int)(C),(u_int)(D),(u_int)(E),(u_int)(F))
                    140: 
                    141: #define tptraceTPCB(A,B,C,D,E,F) \
                    142:        tpTrace(tpcb,\
                    143:        (u_int)(A),(u_int)(B),(u_int)(C),(u_int)(D),(u_int)(E),(u_int)(F))
                    144: 
                    145: extern void tpTrace();
                    146: 
                    147: #else  TPPT
                    148: 
                    149: /***********************************************
                    150:  * NO TPPT TRACE STUFF
                    151:  **********************************************/
                    152: 
                    153: #ifndef STAR
                    154: #define STAR *
                    155: #endif STAR
                    156: #define IFTRACE(ascii)  //*beginning of comment*/STAR
                    157: #define ENDTRACE        STAR/*end of comment*//
                    158: 
                    159: #endif TPPT
                    160: 
                    161: #endif __TP_TRACE__

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.