/*++
*******************************************************************************
* Copyright (c) 1990-98 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 copyrighted work of Digi International	*
* Inc.  Except as permitted by federal law, 17 USC 117, copying is strictly	*
* prohibited.																						*
* 																										*
* Restricted Rights Legend																		*
*																										*
* Use, duplication, or disclosure by the Government is subject to					*
* restrictions set forth in sub-paragraph (c)(1)(ii) of The Rights in			*
* Technical Data and Computer Software clause at DFARS 252.227-7031 or			*
* subparagraphs (c)(1) and (2) of the Commercial Computer Software -				*
* Restricted Rights at 48 CFR 52.227-19, as applicable.								*
*																										*
* Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343				*
*																										*
*******************************************************************************

Module Name:

   dxbdata.h

Abstract:

   Data definitions

Author:

   Michael Zarns

--*/

#ifndef DXBDATA_H
#define DXBDATA_H

//  Perfmon assume that all fields are packed and aligned on DWORD 
//  boundaries. Alpha support may change this assumption so the pack 
//  pragma is used here to insure the DWORD packing assumption remains valid.
#pragma pack (4)


//
//  Extensible Object definitions
//

//  Update the following define when adding an object type.
#define DXB_NUM_PERF_OBJECT_TYPES 3

//----------------------------------------------------------------------------
//
// Each DEFINITION struct defines an object type for perfmon.  The associated 
// DATA struct defines the data associated with that object type.  The fields in
// the DATA struct *must* correlate with the fields in the DEFINITION struct.
//

//
// Adapter data describes overall activity of the dxb-based adapter.  
//

typedef struct DXB_ADAPTER_DEFINITION
{
    PERF_OBJECT_TYPE        Type;
    PERF_COUNTER_DEFINITION Heartbeat;
    PERF_COUNTER_DEFINITION TxQIn;
    PERF_COUNTER_DEFINITION TxQOut;
    PERF_COUNTER_DEFINITION RxQIn;
    PERF_COUNTER_DEFINITION RxQOut;
} DXB_ADAPTER_DEFINITION, *PDXB_ADAPTER_DEFINITION;

typedef struct DXB_ADAPTER_DATA
{
	DWORD Heartbeat;
	DWORD TxQIn;
	DWORD TxQOut;
	DWORD RxQIn;
	DWORD RxQOut;
} DXB_ADAPTER_DATA, *PDXB_ADAPTER_DATA;


//
// CSU data comes from the dxb T1 interface module.  It describes physical line 
// errors such as alarms.  GET_DS1_STATUS and GET_DS1_EXT_STATUS requests are used.
//

typedef struct DXB_CSU_DEFINITION
{
    PERF_OBJECT_TYPE        Type;
    PERF_COUNTER_DEFINITION Los;
    PERF_COUNTER_DEFINITION RedAlarm;
    PERF_COUNTER_DEFINITION YellowAlarm;
    PERF_COUNTER_DEFINITION BlueAlarm;
    PERF_COUNTER_DEFINITION Loopback;
    PERF_COUNTER_DEFINITION ErroredSeconds;
    PERF_COUNTER_DEFINITION UnavailableSeconds;
    PERF_COUNTER_DEFINITION BurstySeconds;
    PERF_COUNTER_DEFINITION SevereSeconds;
    PERF_COUNTER_DEFINITION SevereFramingSeconds;
    PERF_COUNTER_DEFINITION ControlledSlipSeconds;
    PERF_COUNTER_DEFINITION FrameLossCount;
    PERF_COUNTER_DEFINITION DegradedMinutes;
    PERF_COUNTER_DEFINITION LineErroredSeconds;
    PERF_COUNTER_DEFINITION LineCodeViolations;
    PERF_COUNTER_DEFINITION CrcErrors;
} DXB_CSU_DEFINITION, *PDXB_CSU_DEFINITION;

typedef struct DXB_CSU_DATA
{
	DWORD Los;
	DWORD RedAlarm;
	DWORD YellowAlarm;
	DWORD BlueAlarm;
	DWORD Loopback;
	DWORD ErroredSeconds;
	DWORD UnavailableSeconds;
	DWORD BurstySeconds;
	DWORD SevereSeconds;
	DWORD SevereFramingSeconds;
	DWORD ControlledSlipSeconds;
	DWORD FrameLossCount;
	DWORD DegradedMinutes;
	DWORD LineErroredSeconds;
	DWORD LineCodeViolations;
	DWORD CrcErrors;
} DXB_CSU_DATA, *PDXB_CSU_DATA;


//
// Channel data comes from dxb iwan statistics.  It refers to a single timeslot or 
// channel.
//

typedef struct DXB_CHANNEL_DEFINITION
{
    PERF_OBJECT_TYPE        Type;
    PERF_COUNTER_DEFINITION TxOctets;
    PERF_COUNTER_DEFINITION TxGood;
    PERF_COUNTER_DEFINITION TxClass1;
    PERF_COUNTER_DEFINITION TxClass2;
    PERF_COUNTER_DEFINITION TxDef;
    PERF_COUNTER_DEFINITION TxUrun;
    PERF_COUNTER_DEFINITION RxOctets;
    PERF_COUNTER_DEFINITION RxGood;
    PERF_COUNTER_DEFINITION RxErr;
    PERF_COUNTER_DEFINITION RxOrun;
    PERF_COUNTER_DEFINITION RxCrc;
    PERF_COUNTER_DEFINITION RxNoBuf;
    PERF_COUNTER_DEFINITION RxNflow;
    PERF_COUNTER_DEFINITION RxOflow;
    PERF_COUNTER_DEFINITION RxAbort;
} DXB_CHANNEL_DEFINITION, *PDXB_CHANNEL_DEFINITION;

typedef struct DXB_CHANNEL_DATA
{
	DWORD TxOctets;
	DWORD TxGood;
	DWORD TxClass1;
	DWORD TxClass2;
	DWORD TxDef;
	DWORD TxUrun;
	DWORD RxOctets;
	DWORD RxGood;
	DWORD RxErr;
	DWORD RxOrun;
	DWORD RxCrc;
	DWORD RxNoBuf;
	DWORD RxNflow;
	DWORD RxOflow;
	DWORD RxAbort;
} DXB_CHANNEL_DATA, *PDXB_CHANNEL_DATA;

extern DXB_ADAPTER_DEFINITION gAdapterDefinition;
extern DXB_CSU_DEFINITION     gCsuDefinition;
extern DXB_CHANNEL_DEFINITION gChannelDefinition;

#pragma pack ()
#endif
