*
* Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved.
*
* SPDX-License-Identifier: BSD-2-Clause
*
*---------------------------------------------------------------------------*/
#ifndef _I4B_TRACE_H_
#define _I4B_TRACE_H_
#include <glib.h>
* structure of the header at the beginning of every trace mbuf
*---------------------------------------------------------------------------*/
typedef struct {
uint32_t length;
uint32_t unit;
uint32_t type;
#define TRC_CH_I 0
#define TRC_CH_D 1
#define TRC_CH_B1 2
#define TRC_CH_B2 3
int32_t dir;
#define FROM_TE 0
#define FROM_NT 1
uint32_t trunc;
uint32_t count;
uint32_t ts_sec;
uint32_t ts_usec;
} i4b_trace_hdr_t;
#define INFO0 0
#define INFO1_8 1
#define INFO1_10 2
#define INFO2 3
#define INFO3 4
#define INFO4_8 5
#define INFO4_10 6
* ioctl via /dev/i4btrc device(s):
* get/set current trace flag settings
*---------------------------------------------------------------------------*/
#define I4B_TRC_GET _IOR('T', 0, int)
#define I4B_TRC_SET _IOW('T', 1, int)
#define TRACE_OFF 0x00
#define TRACE_I 0x01
#define TRACE_D_TX 0x02
#define TRACE_D_RX 0x04
#define TRACE_B_TX 0x08
#define TRACE_B_RX 0x10
typedef struct {
int32_t rxunit;
int32_t rxflags;
int32_t txunit;
int32_t txflags;
} i4b_trace_setupa_t;
#define I4B_TRC_SETA _IOW('T', 2, i4b_trace_setupa_t)
#define I4B_TRC_RESETA _IOW('T', 3, int)
#endif