📄 layer4.c
字号:
RETVALUE(ROK);
}
/* Check If the request is to be loopbacked then push the request on the
component queue */
if (maAccCb.curTst.loopBack)
{
/* If corrupt flag is true for the current test then corrupt the
specified byte */
if (maAccCb.curTst.cptFlag)
{
/* Introduce new cconditions for 4.4.1 testcases */
switch(maAccCb.curTst.id)
{
case MA_TSTID_482:
compEv->stInvokeId.octet = MA_ACC_INVKID_1;
maAccCb.curTst.cptFlag = FALSE;
break;
case MA_TSTID_483:
case MA_TSTID_484:
compEv->stInvokeId.octet = MA_ACC_INVKID_2;
maAccCb.curTst.cptFlag = FALSE;
break;
case MA_TSTID_489:
compEv->stOpCode.string[0] = MA_ACC_ST_OPCODE;
maAccCb.curTst.cptFlag = FALSE;
break;
case MA_TSTID_514:
#ifdef MA_ASN_NO_INDEF_LEN
#ifdef MAP_REL5
SRepMsg(0xa0,cpBuf,6);
#else
SRepMsg(0xa0,cpBuf,5);
#endif
maAccCb.curTst.cptFlag = FALSE;
break;
#endif
case MA_TSTID_498:
#ifdef MA_ASN_NO_INDEF_LEN
maAccCb.curTst.idx = (maAccCb.pSwtch == LMA_VER2P)?(6):(4);
SRepMsg(0xa0,cpBuf,(MsgLen)maAccCb.curTst.idx);
#else
SRepMsg(0xa0,cpBuf,4);
#endif
maAccCb.curTst.cptFlag = FALSE;
break;
case MA_TSTID_491:
compEv->stErrorCode.string[0] = MA_SYS_FAILURE;
maAccCb.curTst.cptFlag = FALSE;
break;
/* Modify the tag and the length to simulate the incorrect syntax */
case MA_TSTID_516:
#ifdef MA_ASN_NO_INDEF_LEN
SRepMsg(maAccCb.curTst.data, cpBuf, (MsgLen)5);
#else
SRepMsg(maAccCb.curTst.data, cpBuf, (MsgLen)maAccCb.curTst.idx);
#endif
break;
case MA_TSTID_490:
SRepMsg(maAccCb.curTst.data, cpBuf, (MsgLen)maAccCb.curTst.idx);
break;
case MA_TSTID_608:
{
U8 array[100];
S32 i;
/* remove IV form security header */
if (compEv->stCompType == STU_INVOKE)
{
(Void)SRemPreMsgMult(array, (MsgLen)17, cpBuf);
(Void)SRemPreMsgMult(NULLP, (MsgLen)16, cpBuf);
for (i = 16; i >= 0; i--)
{
(Void)SAddPreMsg(array[i], cpBuf);
}
SPrntMsg(cpBuf, 0, 0);
maAccCb.curTst.cptFlag = FALSE;
}
}
break;
case MA_TSTID_609:
{
Data array[100];
S32 i;
/* remove IV form security header */
if (compEv->stCompType == STU_RET_RES_L)
{
(Void)SRemPreMsgMult(array, (MsgLen)17, cpBuf);
(Void)SRemPreMsgMult(NULLP, (MsgLen)16, cpBuf);
for (i = 16; i >= 0; i--)
{
(Void)SAddPreMsg(array[i], cpBuf);
}
SPrntMsg(cpBuf, 0, 0);
maAccCb.curTst.cptFlag = FALSE;
}
}
break;
default:
if(compEv->stCompType == STU_RET_ERR)
{
compEv->stErrorCode.string[0]= MAT_INV_USR_ERRVAL;
}
else if(cpBuf)
{
SRepMsg(maAccCb.curTst.data, cpBuf,(MsgLen)maAccCb.curTst.idx);
/* Now reset the corrupt flag */
maAccCb.curTst.cptFlag = FALSE;
}
}
maAccCb.curTst.cptFlag = FALSE;
}
(Void) maAccPushCmpQ(compEv, cpBuf, dlgIdx);
}
else if (cpBuf)
{
(Void) SPutMsg(cpBuf);
}
RETVALUE(ROK);
} /* StUiStuCmpReq */
/*
*
* Fun: StUiStuSteReq
*
* Desc: This function is used by TCAP layer to indicate to its peer
* for SSN state change. The rqeuest is passed on to SSCP.
*
* Ret: ROK - ok
*
* Notes: None
*
* File: layer4.c
*
*/
#ifdef ANSI
PUBLIC S16 StUiStuSteReq
(
Pst *pst, /* Post structure */
SpId spId, /* service user id */
CmSS7SteMgmt *steMgmt /* State managemnet */
)
#else
PUBLIC S16 StUiStuSteReq(pst, spId, steMgmt)
Pst *pst; /* Post structure */
SpId spId; /* service user id */
CmSS7SteMgmt *steMgmt; /* State managemnet */
#endif
{
#ifdef STUV2
StMgmntParam mgmntParam;
#endif /* STUV2 */
TRC2(StUiStuSteReq)
/* Check If the request is to be loopbacked */
if (maAccCb.curTst.loopBack)
{
/* Swap the post structure to send the indication back to TCAP */
maSwapPst(pst);
/* Change the spId to inject the indication at another SAP */
if (maAccSwapSpId(&spId) != ROK)
{
RETVALUE(RFAILED);
}
#ifdef STUV2
if (maAccCb.defMgmtParam == TRUE)
{
mgmntParam.sccpState = MAT_DEF_SCCP_STATE;
mgmntParam.ril = MAT_DEF_RIL;
}
else
{
mgmntParam.sccpState = maAccCb.curTstSccpState;
mgmntParam.ril = maAccCb.curTstRil;
}
(Void) StUiStuSteInd(&maAccCb.liPst, spId, steMgmt,&mgmntParam);
#else
(Void) StUiStuSteInd(&maAccCb.liPst, spId, steMgmt);
#endif /* STUV2 */
}
RETVALUE(ROK);
} /* StUiStuSteReq */
/*
*
* Fun: StUiStuSteRsp
*
* Desc: This function is used by TCAP layer to indicate to its peer
* for SSN state change. The rqeuest is passed on to SSCP.
*
* Ret: ROK - ok
*
* Notes: None
*
* File: layer4.c
*
*/
#ifdef ANSI
PUBLIC S16 StUiStuSteRsp
(
Pst *pst, /* Post structure */
SpId spId, /* service user id */
CmSS7SteMgmt *steMgmt /* State managemnet */
)
#else
PUBLIC S16 StUiStuSteRsp(pst, spId, steMgmt)
Pst *pst; /* Post structure */
SpId spId; /* service user id */
CmSS7SteMgmt *steMgmt; /* State managemnet */
#endif
{
#ifdef STUV2
StMgmntParam mgmntParam;
#endif /* STUV2 */
TRC2(StUiStuSteRsp)
/* Check If the request is to be loopbacked */
if (maAccCb.curTst.loopBack)
{
/* Swap the post structure to send the indication back to TCAP */
maSwapPst(pst);
/* Change the suId to inject the indication at another SAP */
if (maAccSwapSpId(&spId) != ROK)
{
RETVALUE(RFAILED);
}
#ifdef STUV2
if (maAccCb.defMgmtParam == TRUE)
{
mgmntParam.sccpState = MAT_DEF_SCCP_STATE;
mgmntParam.ril = MAT_DEF_RIL;
}
else
{
mgmntParam.sccpState = maAccCb.curTstSccpState;
mgmntParam.ril = maAccCb.curTstRil;
}
(Void) StUiStuSteCfm(&maAccCb.liPst, spId, steMgmt,&mgmntParam);
#else
(Void) StUiStuSteCfm(&maAccCb.liPst, spId, steMgmt);
#endif
}
RETVALUE(ROK);
} /* StUiStuSteRsp */
/*
*
* Fun: Activate Task - initialize
*
* Desc: Invoked by system services to initialize a task.
*
* Ret: ROK - ok
*
* Notes: None
*
* File: layer4.c
*
*/
#ifdef SS_MULTIPLE_PROCS
#ifdef ANSI
PUBLIC S16 stActvInit
(
ProcId procId, /* proc Id */
Ent ent, /* entity */
Inst inst, /* instance */
Region region, /* region */
Reason reason, /* reason */
void **xxCb
)
#else
PUBLIC S16 stActvInit(procId, ent, inst, region, reason, xxCb)
ProcId procId; /* proc Id */
Ent ent; /* entity */
Inst inst; /* instance */
Region region; /* region */
Reason reason; /* reason */
void **xxCb;
#endif
#else
#ifdef ANSI
PUBLIC S16 stActvInit
(
Ent ent, /* entity */
Inst inst, /* instance */
Region region, /* region */
Reason reason /* reason */
)
#else
PUBLIC S16 stActvInit(ent, inst, region, reason)
Ent ent; /* entity */
Inst inst; /* instance */
Region region; /* region */
Reason reason; /* reason */
#endif
#endif
{
TRC3(stActvInit)
UNUSED(ent);
UNUSED(inst);
UNUSED(region);
UNUSED(reason);
RETVALUE(ROK);
} /* end of stActvInit */
#endif
/********************************************************************30**
End of file: layer4.c@@/main/9 - Fri Sep 16 02:41:26 2005
*********************************************************************31*/
/********************************************************************40**
Notes:
*********************************************************************41*/
/********************************************************************50**
*********************************************************************51*/
/********************************************************************60**
Revision history:
*********************************************************************61*/
/********************************************************************80**
version pat init description
----------- ----- ---- ------------------------------------------------
*********************************************************************81*/
/********************************************************************80**
version pat init description
----------- ----- ---- ------------------------------------------------
1.1 --- aa 1. initial release
*********************************************************************81*/
/********************************************************************90**
ver pat init description
----------- -------- ---- -----------------------------------------------
1.2 --- aa 1. Removed the include files which are not used
1.3 --- ssk 1. Added phase 2+ variant
/main/4 --- ssk 1. update for MAP 1.5 release.
--- jie 1. Rolling Upgrade compliance.
/main/5 --- ssk 1. update for MAP 1.6 release.
--- jie 1. Change for 2002/09 rel99/rel4 release.
/main/6 --- jie 1. update for MAP 1.7 release.
ma001.107 jie 1. Addition for definite length encoding
ma005.107 ssk 1. Changes for flexibly fine tuning the
priority and class per TCAP message.
/main/8 --- cp 1. Removed STU2 flag
/main/9 --- st 1. Updated for MAP sotware release 2.3
ma002.203 dv 1. Introduced SS_MULTIPLE_PROCS to aid
in internal testing.
*********************************************************************91*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -