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);

}