Parsing of AIBs

Description

Upon receiving a message that contains an AIB, such as XL_DS0StatusChange, it is possible to get the Span and Channel by using the sk_getAIB* routines.

Code Example

int genericHandler(SK_Event *evt, void *tag) {

MsgStruct *msg = evt->IncomingMsg;

 

SK_MSG_SWITCH(msg) {

/* Print info about any DS0 status change */

CASE_DS0StatusChange(ds0) {

printf("DS0 Stat Change, Span:%d, Chan:%d,

Stat:%d, Purge:%X\n",

sk_getAIBSpan(ds0->AddrInfo),

sk_getAIBChannel(ds0->AddrInfo),

ds0->ChannelStatus,

ds0->PurgeStatus);

return OK;

}

 

CASE_default {

printf("Unknown message\n");

return OK;

}

} SK_END_SWITCH;

}