You are here: SwitchKit® Development Environment - TCAP Interface User’s Guide > 7 SKTAL Sample Application > Step One - Creating a connection with LLC using SwitchKit APIs

Step One - Creating a connection with LLC using SwitchKit APIs

The API function described in this section allows you to create a connection with the LLC using SwitchKit APIs.

Important! Before you begin using this sample application, you must set environment variables. See Environment Variables for Sample Applications.

Application Code

connect()

{

int ret;

/* create the connection */

connection = skts_createConnectionWithID(CONN_ID, CONN_LABEL, CONN_NAME,

SKTAL_FALSE,

PRI_IP, PRI_PORT,

BACK_IP, BACK_PORT);

if (ret == 0)

{

fprintf(stderr, "Error connecting to switch\n");

return (SKTAL_EINVALIDARGS);

}

return (SKTAL_SUCCESS);

}

Internet Protocol. Part of the TCP/IP family of protocols used to route messages and tracks the addresses of nodes.