Specifications

58 System Software Diagnostics Guide — September 2006
Tracing Multiple ISDN Trunks Using Global Call
Sample application code
Note: The following sample code was written for an application running on a system in which an Intel
NetStructure DMT160TEC board was used as the network interface, an Intel NetStructure
DMV2400A board was used as a play/record resource board, and the boards were connected via a
CT Bus.
#include <stdio.h>
#include <srllib.h>
#include <gclib.h>
#include <gcerr.h>
LINEDEV bdev; /* board level device number */
int rc; /* Return code */
int value; /* value to be for specified parameter */
GC_INFO gc_error_info; /* GlobalCall error information data */
char devname[30]; /* Board/Trunk device name */
main()
{
/* Open a trunk device */
/* Start Tracing */
.
.
/* Call Control activity, tracing captured */
.
.
.
/* Stop Tracing */
rc = gc_StopTrace(bdev);
if(rc != GC_SUCCESS) {
/* Process the error */
gc_ErrorInfo( &gc_error_info );
printf ("Error: gc_StopTrace() on devname: %s, GC ErrorValue: 0x%hx - %s,
CCLibID: %i - %s, CC ErrorValue: 0x%lx - %s\n",
devname, gc_error_info.gcValue, gc_error_info.gcMsg,
gc_error_info.ccLibId, gc_error_info.ccLibName,
gc_error_info.ccValue, gc_error_info.ccMsg);
return (gc_error_info.gcValue);
} else {
/* Continue */
}
}
9.5 Reporting Trace Data via GCEV_TRACEDATA
The GCEV_TRACEDATA event is an unsolicited event used to notify the user application of the
availability of tracing data. The user application should call gc_StartTrace( ) successfully to
enable receiving tracing data. The trace data is associated with the GCEV_TRACEDATA event via
the GC_TRACEDATA data structure, which includes sequence number, data size, and data buffer.
This data structure can be obtained by casting extevtdatap of METAEVENT. A proper result value
is also associated with GCEV_TRACEDATA, which can be obtained via the gc_ResultInfo( )
function.
The data structure GC_TRACEDATA associated with the GCEV_TRACEDATA event is defined in
gclib.h:
#define GCVAL_TRACEDATA_SIZE2048 /* Maximum data size of tracing data */