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.12 2000/02/14 16:25:22 hm Exp $
40 * $FreeBSD: src/usr.sbin/i4b/isdntrace/trace.h,v 1.6.2.1 2001/08/01 17:45:08 obrien Exp $
41 * $DragonFly: src/usr.sbin/i4b/isdntrace/trace.h,v 1.3 2003/08/08 06:18:45 dillon Exp $
43 * last edit-date: [Mon Feb 14 14:43:40 2000]
45 *---------------------------------------------------------------------------*/
57 #include <sys/types.h>
58 #include <sys/ioctl.h>
61 #include <sys/param.h>
63 #include <i4b_machine/i4b_ioctl.h>
64 #include <i4b_machine/i4b_trace.h>
66 #include "pcause_1tr6.h" /* obsolete german national ISDN */
67 #include "pcause_q850.h"
69 #define I4BTRC_DEVICE "/dev/i4btrc" /* trace device file */
70 #define TRACE_FILE_NAME "isdntrace" /* default output filename */
71 #define BIN_FILE_NAME "isdntracebin" /* default binary filename */
73 #define BSIZE 4096 /* read buffer size */
74 #define NCOLS 80 /* screen width */
76 #define RxUDEF 0 /* analyze mode, default unit for receiver side */
77 #define TxUDEF 1 /* analyze mode, default unit for transmitter side */
79 int decode_lapd(char *pbuf
, int n
, unsigned char *buf
, int is_te
, int raw
, int printit
);
80 void decode_q931(char *pbuf
, int n
, int off
, unsigned char *buf
, int raw
);
81 void decode_unknownl3(char *pbuf
, int n
, int off
, unsigned char *buf
, int raw
);
82 void decode_1tr6(char *pbuf
, int n
, int off
, unsigned char *buf
, int raw
);
83 char *print_error(int prot
, unsigned char code
);
84 int q931_facility(char *pbuf
, unsigned char *buf
);
85 int p_q931cause(char *pbuf
, unsigned char *buf
);
86 int p_q931address(char *pbuf
, unsigned char *buf
);
87 int p_q931bc(char *pbuf
, unsigned char *buf
);
88 int p_q931high_compat(char *pbuf
, unsigned char *buf
);
89 int q932_facility(char *pbuf
, unsigned char *buf
);
90 int p_q931user_user(char *pbuf
, unsigned char *buf
);
91 int p_q931notification(char *pbuf
, unsigned char *buf
);
92 int p_q931redir(char *pbuf
, unsigned char *buf
);