DTM_TRUNK_STATUS contains current information about alarms, trunk status, and error statistics. The same structure is used for both T1 and E1 trunks. This data can be obtained by a synchronous function call (dtmGetTrunkStatus). The structure is defined as follows:
typedef struct
{
DWORD size; /* size of this structure */
DWORD board; /* board number */
DWORD trunk; /* trunk number */
DTM_TRUNK_STATE state; /* alarms and sync status */
DWORD starttime; /* when counts started (time_t)*/
DWORD slips; /* slips accumulator */
DWORD lineerrors; /* line code violations (BPVs) */
DWORD frameerrors; /* frame bit errors+ CRC errors*/
DWORD es; /* errored seconds accumulator */
DWORD ses; /* severely errored seconds */
DWORD uas; /* unavailable seconds */
} DTM_TRUNK_STATUS;