cc_GetCES( ) retrieves the connection endpoint suffix94
long EventHandler(event)
{int rc;
L2_BLK frame;
unsigned int resultValue;
unsigned char sapi, ces;
int device;
void *datap;
device = sr_getevtdev();
datap = sr_getevtdatap();
...
switch(event)
{case CCEV_D_CHAN_STATUS:
cc_GetSapi(&sapi, datap);
cc_GetCes(&ces, datap);
resultValue = cc_ResultValue(datap);
switch(resultValue & ~(ERR_ISDN_FW))
{case E_LINKUP:
DataLinkState[SAPI_ID][CES_ID] = DATA_LINK_UP;
break;
case E_LINKDOWN:
DataLinkState[SAPI_ID][CES_ID] = DATA_LINK_DOWN;
break;
case E_LINKDISABLED:
DataLinkState[SAPI_ID][CES_ID] = DATA_LINK_DISABLED;
break;
default:
printf("Got a bad result value (0x%X)\n", resultValue);
}
break;
case CCEV_L2FRAME:
if(rc = cc_GetFrame (dev, &frame) == 0)
{sapi = frame.sapi;
ces = frame.ces;
printf("Got a frame of length=%d for Sapi=%d Ces=%d\n", frame.length, sapi,
ces); }
else
printf("cc_GetFrame failed!\n");
break;
...
}
return 0;
}