You are here: SwitchKit® Development Environment - TCAP Interface User’s Guide > 7 SKTAL Sample Application > Step Two - Initializing SKTAL and registering SSN
Step Two - Initializing SKTAL and registering SSN
The API function described in this section initalizes TAL and registers with LLC for use of a particular stack/SSN.
// Initialize TAL layer. TAL initialization is done once
// at application startup.
ret = sktal_initializeTCAP()
if (ret != SK_OK)
{
fprintf(stderr, "Error initializing TCAP: %s\n", sk_errorText(ret));
skts_destroyConnection(CONN_ID);
return (SKTAL_EINVALIDARGS);
}
// register SSN with TCAP
// LOCAL_NODE - value created during configuration
// STACK_ID - Stack Id for the stack instance created during
// configuration.
// CONN_ID - Same as created in step one.
// LOCAL_PC - Local Point Code for stack instance.
// LOCAL_SSN - local subsyatem number for stack instance.
// newDialogue - Deafult Handler for handling new
// TCAP Transaction messages.
// instance - instance value returned after registeration is successful.
// This instance value is used while sending and receiving TCAP
// dialogues and components.
ret = sktal_registerTCAPSSNHandler (LOCAL_NODE, STACK_ID,
LOCAL_PC, LOCAL_SSN,
newDialogue, &instance, CONN_ID);
if (ret != SK_OK)
{
fprintf(stderr, "Error registering handler: %s\n", sk_errorText(ret));
skts_destroyConnection(CONN_ID);