2 * Copyright (c) 1996, 2000 Hellmuth Michaelis. All rights reserved.
4 * Copyright (c) 1996 Gary Jennejohn. All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the author nor the names of any co-contributors
16 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission.
18 * 4. Altered versions must be plainly marked as such, and must not be
19 * misrepresented as being the original software and/or documentation.
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 *---------------------------------------------------------------------------
35 * trace.h - header file for isdn trace
36 * ------------------------------------
38 * $Id: trace.h,v 1.2 2002/03/16 17:03:44 martin Exp $
42 * last edit-date: [Sat Jan 6 13:05:40 2001]
44 *---------------------------------------------------------------------------*/
56 #include <sys/types.h>
57 #include <sys/ioctl.h>
60 #include <sys/param.h>
62 #include <netisdn/i4b_ioctl.h>
63 #include <netisdn/i4b_trace.h>
65 #include "pcause_1tr6.h" /* obsolete german national ISDN */
66 #include "pcause_q850.h"
68 #define I4BTRC_DEVICE "/dev/isdntrc" /* trace device file */
69 #define TRACE_FILE_NAME "isdntrace" /* default output filename */
70 #define BIN_FILE_NAME "isdntracebin" /* default binary filename */
72 #define BSIZE 4096 /* read buffer size */
73 #define NCOLS 80 /* screen width */
75 #define RxUDEF 0 /* analyze mode, default unit for receiver side */
76 #define TxUDEF 1 /* analyze mode, default unit for transmitter side */
78 int decode_lapd(char *pbuf
, int n
, unsigned char *buf
, int is_te
, int raw
, int printit
);
79 void decode_q931(char *pbuf
, int n
, int off
, unsigned char *buf
, int raw
);
80 void decode_unknownl3(char *pbuf
, int n
, int off
, unsigned char *buf
, int raw
);
81 void decode_1tr6(char *pbuf
, int n
, int off
, unsigned char *buf
, int raw
);
82 char *print_error(int prot
, unsigned char code
);
83 int q931_facility(char *pbuf
, unsigned char *buf
);
84 int p_q931cause(char *pbuf
, unsigned char *buf
);
85 int p_q931address(char *pbuf
, unsigned char *buf
);
86 int p_q931bc(char *pbuf
, unsigned char *buf
);
87 int p_q931high_compat(char *pbuf
, unsigned char *buf
);
88 int q932_facility(char *pbuf
, unsigned char *buf
);
89 int p_q931user_user(char *pbuf
, unsigned char *buf
);
90 int p_q931notification(char *pbuf
, unsigned char *buf
);
91 int p_q931redir(char *pbuf
, unsigned char *buf
);