3 * Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved.
5 * SPDX-License-Identifier: BSD-2-Clause
7 *---------------------------------------------------------------------------*/
14 /*---------------------------------------------------------------------------*
15 * structure of the header at the beginning of every trace mbuf
16 *---------------------------------------------------------------------------*/
18 uint32_t length
; /* length of the following mbuf */
19 uint32_t unit
; /* controller unit number */
20 uint32_t type
; /* type of channel */
21 #define TRC_CH_I 0 /* Layer 1 INFO's */
22 #define TRC_CH_D 1 /* D channel */
23 #define TRC_CH_B1 2 /* B1 channel */
24 #define TRC_CH_B2 3 /* B2 channel */
25 int32_t dir
; /* direction */
26 #define FROM_TE 0 /* user -> network */
27 #define FROM_NT 1 /* network -> user */
28 uint32_t trunc
; /* # of truncated bytes (frame > MCLBYTES) */
29 uint32_t count
; /* frame count for this unit/type */
30 uint32_t ts_sec
; /* timestamp seconds */
31 uint32_t ts_usec
; /* timestamp microseconds */
34 #define INFO0 0 /* layer 1 */
42 /*---------------------------------------------------------------------------*
43 * ioctl via /dev/i4btrc device(s):
44 * get/set current trace flag settings
45 *---------------------------------------------------------------------------*/
47 #define I4B_TRC_GET _IOR('T', 0, int) /* get trace settings */
48 #define I4B_TRC_SET _IOW('T', 1, int) /* set trace settings */
50 #define TRACE_OFF 0x00 /* tracing off */
51 #define TRACE_I 0x01 /* trace L1 INFO's on */
52 #define TRACE_D_TX 0x02 /* trace D channel on */
53 #define TRACE_D_RX 0x04 /* trace D channel on */
54 #define TRACE_B_TX 0x08 /* trace B channel on */
55 #define TRACE_B_RX 0x10 /* trace B channel on */
58 int32_t rxunit
; /* unit # for rx frames */
59 int32_t rxflags
; /* d and/or b channel */
60 int32_t txunit
; /* unit # for tx frames */
61 int32_t txflags
; /* d and/or b channel */
64 #define I4B_TRC_SETA _IOW('T', 2, i4b_trace_setupa_t) /* set analyze mode */
65 #define I4B_TRC_RESETA _IOW('T', 3, int) /* reset analyze mode */
67 #endif /* _I4B_TRACE_H_ */