Table of Contents Index NMS Glossary Previous Page Next Page (Page 4 of 6 in this chapter) Version


isdnSetMsgCapture

Description

Sends tracing messages to the oammon or the agmon monitor screen from the selected ISDN entity on the board associated with the specified context.

Prototype

DWORD isdnSetMsgCapture ( CTAHD ctahd,
DWORD enable,
DWORD nai,
char *entity_id_string
DWORD nfas_group)

ctahd Context handle associated with a D channel, returned by ctaCreateContext.

enable Toggle for tracing: 1 causes tracing messages to be generated by the ISDN protocol entity named by entity_id_string. 0 disables tracing.

nai Network access identifier on which to enable or disable tracing.

entity_id_string The NULL-terminated string of one-character names of ISDN protocol entities for which tracing is either enabled or disabled according to the enable parameter. The entity names are defined by the isdntype.h include file.

nfas_group NFAS group number. This parameter is only used if duplicate NAI values are defined in the configuration. Otherwise, it is recommended to set nfas_group to the NAI used to set the capture mask.

Return Values

Events

Details

This function enables or disables tracing of messages generated by the ISDN protocol entities named by the entity_id_string. The board is implied by the specified ctahd.

When the entity_id_string contains the string * (an asterisk), all entities are affected. By default, tracing is enabled for all entities.

In order for messages to be sent to the monitor screen, the flag passed to oamtrace (formerly agtrace) must be set to 0x801000.

For configurations where all NAI values are unique, it is recommended to set nfas_group to 0.

Example

#define TRACE_ENABLE   1
#define TRACE_DISABLE 0

DWORD mySetTrace( CTAHD ctahd, DWORD enable, char *list )
{
DWORD ret;
CTA_EVENT event;
char errortext[40];

ret = isdnSetMsgCapture( ctahd, enable, 0, trace_list, 0 );
if( ret != SUCCESS)
{
ctaGetText(ctahd, ret, errortext, 40);
printf("TRACE_FAIL: %s\n", errrortext);
return MY_ERROR_TRACE_FAILED;
}

myWaitForEvent( ctahd, &event)
if( event.value != SUCCESS)
{
ctaGetText(ctahd, event.value, errortext, 40);
printf("TRACE_FAIL: %s\n", errortext);
return MY_ERROR_TRACE_FAILED;
}
}


void do_trace (CTAHD ctahd)
{
char trace_list[20];

/*
** Disable all tracing first
*/
mySetTrace( ctahd, TRACE_DISABLE, "*" );

/*
** Enable tracing for Call control layer and the application
*/
sprintf(trace_list, "%c%c", ENT_CC, ENT_API );
mySetTrace( porthd, TRACE_ENABLE, trace_list );
}


Table of Contents Index NMS Glossary Previous Page Next Page (Page 4 of 6 in this chapter) Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2001, Natural MicroSystems, Inc. All rights reserved.