Specifications
System Software Diagnostics Guide — September 2006 57
Tracing Multiple ISDN Trunks Using Global Call
#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 */
sprintf(dename, ":N_dtiB1:P_isdn");
if(gc_OpenEx(&bdev, devname, EV_SYNC, &ldev) != GC_SUCCESS)
{
/* Process the error as decided earlier */
gc_ErrorInfo( &gc_error_info );
printf ("Error: gc_OpenEx() 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);
}
rc = gc_StartTrace(bdev, NULL);
if (rc != GC_SUCCESS)
{
/* Process the error */
gc_ErrorInfo( &gc_error_info );
printf ("Error: gc_StartTrace() 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.4 Disabling Tracing Using gc_StopTrace( )
The gc_StopTrace( ) function stops the logging of debug information for a specific line device that
was started using gc_StartTrace( ).
To use this feature, the line device must be the handle for a trunk or virtual board. After the
gc_StopTrace( ) function returns success, the application may be notified of the availability of the
last remaining trace data via GCEV_TRACEDATA.










