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