/*****************************************************************************
 * Copyright (c) 1988-2000 Digi International Inc., All Rights Reserved
 * 
 * This  software  contains  proprietary  and  confidential   information   of
 * Digi International  Inc.   By  accepting  transfer  of this copy, Recipient
 * agrees to retain this software in  confidence,  to  prevent  disclosure  to
 * others,  and  to make no  use of this software other than that for which it
 * was delivered.  This is an unpublished copyright work  Digi   International
 * Inc.    Except   as   permitted   by  federal  law,  17 USC 117, copying is
 * strictly prohibited.
 * 
 * Digi  International  Inc.  CONFIDENTIAL  -   (Digi    International    Inc.
 * Confidential  when   combined   with   the   aggregated  modules  for  this
 * product) OBJECT CODE ONLY SOURCE MATERIALS
 * 
 * (C) COPYRIGHT Digi International Inc. 2000
 * 
 * All Rights Reserved
 * 
 * US   Government   Users   Restricted   Rights   -   Use,   duplication   or
 * disclosure  restricted by GSA ADP Schedule Contract with Digi International
 * Inc.
 * 
 *****************************************************************************/

/*****************************************************************************
 *
 * Copyright (c) 1993 Spider Systems Limited
 *
 * This Source Code is furnished under Licence, and may not be
 * copied or distributed without express written agreement.
 *
 * All rights reserved.  Made in Scotland.
 *
 * Authors: David Fraser
 *
 * isdn_trace.h of snet module
 *
 * SpiderISDN
 * Release 3.0.0 94/12/20
 * 
 * SpiderISDN Release 3 - Official Release.
 *
 *****************************************************************************/
 
/*
 * isdn_trace.h
 *
 *  Trace message declarations.
 */

#define MAX_ISDN_SUBNETS 	10

/*
 *Types of tracing message.
 */
#define	ISDN_TRC_CTL	200		        /* Basic tracing	*/
#define ISDN_LAPD_DAT	(ISDN_TRC_CTL+2)	/* Basic for now	*/
#define ISDN_IL3_DAT	(ISDN_TRC_CTL+4)	/* Basic for now	*/

/*
 * LAPD IOCTL block for TRACEON and TRACEOFF commands
 */
typedef struct lapd_trioc {
	uint8	l_type;
	uint8 	l_all_snworks;
	uint8	l_level;
	uint8	l_spare;
	uint32	l_snid;
	uint32	l_active[MAX_ISDN_SUBNETS + 1];
} lapd_trioc_t;


/*
 * IL3 IOCTL block for TRACEON and TRACEOFF commands
 */
typedef struct il3_trioc {
	uint8	l_type;
	uint8 	l_all_snworks;
	uint8	l_level;
	uint8	l_spare;
	uint32	l_snid;
	uint32	l_active[MAX_ISDN_SUBNETS + 1];
} il3_trioc_t;

/*
 * Formats for control part of trace message.
 */
typedef struct isdn_trc_ctl {
	uint8	l_trc_prim;		/* Trace msg identifier		*/
	uint8	l_trc_spare;		/* Padding			*/
	uint16	l_trc_mid;		/* Id of protocol module	*/
	uint32	l_trc_snid;		/* Subnetwork identifier	*/
	uint8	l_trc_rcv;		/* Msg "direction" indicator	*/
	uint8	l_trc_spare2[3];	/* Padding			*/
	uint32	l_trc_time;		/* Time stamp			*/
	uint16	l_trc_seq;		/* Msg sequence number		*/
} isdn_trc_ctl_t;

/*
 * Generic trace control primitive
 */
typedef union isdn_trc_union {
	uint8		l_trc_prim;	/* Trace msg identifier		*/
	uint8		l_trc_spare3[3];/* Padding			*/
	isdn_trc_ctl_t	l_trc_generic;	/* Basic trace data		*/
} isdn_trc_types_t;
