示例#1
0
VOS_UINT32  NAS_EMM_IsBearIsrActBefore
(
    VOS_UINT32      ulEpsId
)
{
    VOS_UINT32                              ulRslt;
    #ifndef __PS_WIN32_RECUR__
    ulRslt = NAS_MML_IsPsBearerExistBeforeIsrAct((VOS_UINT8)ulEpsId);

    NAS_LMM_PUBM_LOG1_INFO("NAS_EMM_IsBearIsrActBefore:ulRslt = ",ulRslt);

    NAS_LMM_LogIsBearIsrActBeforeInfo(ulRslt);

    #else
    ulRslt = Stub_NAS_MML_IsPsBearerExistBeforeIsrAct();
    #endif

    if (VOS_TRUE == ulRslt)
    {
        return NAS_EMM_SUCC;
    }
    else
    {
        return NAS_EMM_FAIL;
    }
}
/*****************************************************************************
 Function Name   : NAS_LMM_ReadLteUsimFile
 Description     : 读取LTE自己的个文件:
                    6FE3    NAS_USIM_FILE_ID_EPS_LOC_INFO
                    6FE4    NAS_USIM_FILE_ID_SEC_CONTEXT
                    安全上下文文件和GUTI应该是同时存在的,有GUTI就应该有安全,有
                    安全,就应该有GUTI;

 Input           : None
 Output          : None
 Return          : VOS_UINT32

 History         :
    1.HanLufeng 41410      2011-2-23  Draft Enact

*****************************************************************************/
VOS_VOID  NAS_LMM_ReadLteUsimFile( VOS_VOID )
{

    VOS_UINT32 ulRslt;
    VOS_UINT32 ulReadHardUsimFileNum = NAS_LMM_SERTAB_SUPPORT_NONE;

    /*6F78    NAS_USIM_FILE_ID_AC_CLASS */
    ulRslt = NAS_EMM_ReadAccClassMask();
    if (NAS_LMM_ERR_CODE_HARD_USIM == ulRslt)
    {   /* 返回值  意味着读硬SUIM卡 */

        ulReadHardUsimFileNum++;
    }


    /*6FE3 安全上下文和 PS_LOC*/
    ulRslt = NAS_LMM_ReadUsimEmmInfoFile();
    if(NAS_LMM_ERR_CODE_HARD_USIM == ulRslt)
    {   /* 返回值 NAS_LMM_SIM_SRV_AVAILABLE 意味着读硬SUIM卡 */

        ulReadHardUsimFileNum++;
        ulReadHardUsimFileNum++;
    }


    NAS_LMM_PUBM_LOG1_INFO("NAS_LMM_ReadUsimOptFile: ulReadHardUsimFileNum = ",
                                        ulReadHardUsimFileNum);


    return;

}
示例#3
0
VOS_UINT32  NAS_EMM_IsBearIsrActAfter(VOS_VOID)
{
    VOS_UINT32                          ulRslt;
    #ifndef __PS_WIN32_RECUR__
    ulRslt = NAS_MML_IsPsBearerAfterIsrActExist();

    NAS_LMM_LogIsBearIsrActAfterInfo(ulRslt);

    NAS_LMM_PUBM_LOG1_INFO("NAS_EMM_IsBearIsrActAfter:ulRslt = ",ulRslt);
    #else
    ulRslt = Stub_NAS_MML_IsPsBearerAfterIsrActExist();
    #endif
    if (VOS_TRUE == ulRslt)
    {
        return NAS_EMM_SUCC;
    }
    else
    {
        return NAS_EMM_FAIL;
    }
}
示例#4
0
VOS_UINT32  NAS_EMM_MsgPreProcess(  NAS_EMM_EVENT_TYPE_ENUM_UINT32      ulEt,
                                    MsgBlock                           *pMsg )
{
    VOS_UINT32                          ulRet;
    LRRC_LMM_DATA_IND_STRU               *pstTmpRcvMsg       = NAS_EMM_NULL_PTR;
    VOS_UINT8                          *pRcvMsg            = NAS_EMM_NULL_PTR;
    VOS_UINT8                           ucPD               = NAS_EMM_NULL;
    VOS_UINT8                           ucAirMsg           = NAS_EMM_NULL;
    VOS_UINT8                           ucKeyEvent         = NAS_EMM_NULL;
    NAS_LMM_FSM_STATE_STRU              *pstFsmCtx          = NAS_LMM_NULL_PTR;

    ulRet = NAS_LMM_MSG_DISCARD;

    /*结构化消息,取出消息体*/
    pstTmpRcvMsg = (LRRC_LMM_DATA_IND_STRU*)pMsg;
    pRcvMsg      = pstTmpRcvMsg->stNasMsg.aucNasMsg;

    if(ID_LRRC_LMM_DATA_IND == pstTmpRcvMsg->enMsgId)
    {
        /*取出PD*/
        ucPD = pRcvMsg[NAS_EMM_NULL]& EMM_CN_MSG_PDMASK;

        /* 如果是ESM消息直接上报ESM */
        if  (EMM_CN_MSG_PD_ESM == ucPD)
        {
            /* 转发给ESM消息 */
            NAS_EMM_EsmSendDataInd((NAS_EMM_CN_MSGCON_STRU *)&(pstTmpRcvMsg->stNasMsg));
            return  NAS_LMM_MSG_HANDLED;
        }
        /* 如果是TC消息直接上报TC */
        if  (EMM_CN_MSG_PD_TC == ucPD)
        {
            /* 转发给TC消息 */
            NAS_EMM_TcSendDataInd((NAS_EMM_CN_MSGCON_STRU *)&(pstTmpRcvMsg->stNasMsg));
            return  NAS_LMM_MSG_HANDLED;
        }

        /*空口消息上报*/
        if(EMM_CN_MSG_PD_EMM == ucPD)
        {
            NAS_LMM_FindAirMsgId(pRcvMsg[NAS_LMM_CN_MSG_MT_POS], &ucAirMsg, &ucKeyEvent);

            NAS_LMM_SendOmtAirMsg(NAS_EMM_OMT_AIR_MSG_DOWN,
                                        ucAirMsg,
                                        (NAS_MSG_STRU*)&(pstTmpRcvMsg->stNasMsg));

            if (NAS_EMM_NULL != ucKeyEvent)
            {
                NAS_LMM_SendOmtKeyEvent(ucKeyEvent);
            }

            NAS_LMM_MEM_SET(&g_stCnDecodeMsgStru, 0, sizeof(NAS_EMM_CN_MSG_STRU));

            ulRet = NAS_EMM_DecodeCnMsg(pMsg, &g_stCnDecodeMsgStru);

            if(NAS_EMM_FAIL == ulRet )
            {/* 若解码出错,打印报警 */

                NAS_LMM_PUBM_LOG1_ERR("NAS_EMM_MsgProcessInFsm, ulEventType = ", ulEt);

                /*发送EMM STATUS, 接收到不识别的消息 */
                NAS_EMM_SendMsgEmmStatus( NAS_LMM_CAUSE_MSG_NONEXIST_NOTIMPLEMENTE );
                return NAS_LMM_MSG_HANDLED;
            }

            /* 对EMM INFO 和 EMM STATUS 进行处理 */
            ulRet = NAS_EMM_PreProcMsgDataInd();
            return  ulRet;

        }

        ulRet                       = NAS_LMM_MSG_DISCARD;
    }

    /* SM异常消息的处理*/
    if(ID_EMM_ESM_REL_REQ == pstTmpRcvMsg->enMsgId)
    {

        /* 获取状态机地址,用于取状态 */
        pstFsmCtx = NAS_LMM_GetCurFsmAddr(NAS_LMM_PARALLEL_FSM_EMM);

        switch(pstFsmCtx->enMainState)
        {
            case EMM_MS_REG:
            case EMM_MS_REG_INIT:
            case EMM_MS_TAU_INIT:
            case EMM_MS_SER_INIT:
                 NAS_EMM_SmRabmAbnarmalProc();
                 break;
            default:
                 NAS_LMM_PUBM_LOG1_INFO("current MS discard abnormal MSG=========>>>>",
                                        pstTmpRcvMsg->enMsgId);
                 break;
        }
        ulRet                           = NAS_LMM_MSG_HANDLED;
    }

    return  ulRet;
}