コード例 #1
0
/*****************************************************************************
 Function Name   : NAS_EMM_TcSendDataInd
 Description     : 向TC发送ID_EMM_ETC_DATA_IND消息
 Input           : None
 Output          : None
 Return          : VOS_VOID

 History         :
    1.lihong00150010      2009-10-16  Draft Enact

*****************************************************************************/
VOS_VOID  NAS_EMM_TcSendDataInd
(
    const NAS_EMM_CN_MSGCON_STRU       *pstTcMsg
)
{
    EMM_ETC_DATA_IND_STRU               *pEmmTcDataIndMsg = VOS_NULL_PTR;
    VOS_UINT32                          ulTcMsgLen;
    VOS_UINT32                          ulDataIndLenNoHeader;


    ulTcMsgLen                          = pstTcMsg->ulMsgLen;
    ulDataIndLenNoHeader                = NAS_EMM_CountTcDataIndLen(ulTcMsgLen);


    /*申请消息内存*/
    if (ulTcMsgLen < 4)
    {
        pEmmTcDataIndMsg = (VOS_VOID *)NAS_LMM_ALLOC_MSG(sizeof(EMM_ETC_DATA_IND_STRU));

    }
    else
    {
        pEmmTcDataIndMsg = (VOS_VOID *)NAS_LMM_ALLOC_MSG(
                               ulDataIndLenNoHeader + NAS_EMM_LEN_VOS_MSG_HEADER);
    }

    /*判断申请结果,若失败打印错误并退出*/
    if (NAS_EMM_NULL_PTR == pEmmTcDataIndMsg)
    {
        /*打印错误*/
        NAS_EMM_ATTACH_LOG_ERR("NAS_EMM_TcSendDataInd: MSG ALLOC ERR!");
        return;

    }

    /*构造ID_EMM_ETC_DATA_IND消息*/
    /*填充消息头*/
    NAS_EMM_COMP_AD_TC_MSG_HEADER(pEmmTcDataIndMsg, ulDataIndLenNoHeader);

    /*填充消息ID*/
    pEmmTcDataIndMsg->ulMsgId         = ID_EMM_ETC_DATA_IND;

    /*填充消息内容*/
    pEmmTcDataIndMsg->stTcMsg.ulTcMsgSize = pstTcMsg->ulMsgLen;

    NAS_LMM_MEM_CPY(                 pEmmTcDataIndMsg->stTcMsg.aucTcMsg,
                                     pstTcMsg->aucMsg,
                                     pstTcMsg->ulMsgLen);

    /*向TC发送ID_EMM_ETC_DATA_IND消息*/
    NAS_LMM_SEND_MSG(                   pEmmTcDataIndMsg);

    /* 打印发送消息 */
    NAS_EMM_ATTACH_LOG_NORM("NAS_EMM_TcSendDataInd:NORM:Send ID_EMM_ETC_DATA_IND!");
}
コード例 #2
0
VOS_VOID    NAS_EMM_EsmSendDataInd (const NAS_EMM_CN_MSGCON_STRU *pstEsmBearerReq)
{
    EMM_ESM_DATA_IND_STRU                *pEmmEsmBearerReqMsg;
    VOS_UINT32                          ulEsmMsgLen;
    VOS_UINT32                          ulDataIndLenNoHeader;


    ulEsmMsgLen                          = pstEsmBearerReq->ulMsgLen;
    ulDataIndLenNoHeader                = NAS_EMM_CountEsmDataIndLen(ulEsmMsgLen);


    /*申请消息内存*/
    if (ulEsmMsgLen < 4)
    {
        pEmmEsmBearerReqMsg = (VOS_VOID *)NAS_LMM_ALLOC_MSG(sizeof(EMM_ESM_DATA_IND_STRU));

    }
    else
    {
        pEmmEsmBearerReqMsg = (VOS_VOID *)NAS_LMM_ALLOC_MSG(
                                  ulDataIndLenNoHeader + NAS_EMM_LEN_VOS_MSG_HEADER);
    }

    /*判断申请结果,若失败打印错误并退出*/
    if (NAS_EMM_NULL_PTR == pEmmEsmBearerReqMsg)
    {
        /*打印错误*/
        NAS_EMM_ATTACH_LOG_ERR("NAS_EMM_EsmSendDataInd: MSG ALLOC ERR!");
        return;

    }

    /*构造ID_EMM_ESM_DATA_IND消息*/
    /*填充消息头*/
    NAS_EMM_COMP_AD_ESM_MSG_HEADER(pEmmEsmBearerReqMsg, ulDataIndLenNoHeader);

    /*填充消息ID*/
    pEmmEsmBearerReqMsg->ulMsgId         = ID_EMM_ESM_DATA_IND;

    /*填充消息内容*/
    pEmmEsmBearerReqMsg->stEsmMsg.ulEsmMsgSize = pstEsmBearerReq->ulMsgLen;

    NAS_LMM_MEM_CPY(                 pEmmEsmBearerReqMsg->stEsmMsg.aucEsmMsg,
                                     pstEsmBearerReq->aucMsg,
                                     pstEsmBearerReq->ulMsgLen);

    /*向ESM发送ID_EMM_ESM_DATA_IND消息*/
    NAS_LMM_SEND_MSG(                   pEmmEsmBearerReqMsg);

    return;

}
コード例 #3
0
/*****************************************************************************
 Function Name   : NAS_LMM_SmsSendDataInd
 Description     : 向SMS发送ID_LMM_SMS_DATA_IND
 Input           :
 Output          :
 Return          : 处理结果
 History         :
    1.FTY         2011-11-16  Draft Enact
    2.sunbing     2011-12-30  修改消息长度
*****************************************************************************/
VOS_VOID NAS_LMM_SndLmmSmsDataInd(const VOS_UINT8* aucMsg,VOS_UINT32 ulMsgLen)
{
    LMM_SMS_DATA_IND_STRU                  *pLmmSmsDataInd      = NAS_EMM_NULL_PTR;
    VOS_UINT32                              ulTmpLength         = 0;

    if( 0 == ulMsgLen)
    {
        NAS_EMM_PUBU_LOG_WARN("NAS_LMM_SndLmmSmsDataInd: WARNING: Msg Length is zero");
        return ;
    }
    else if(ulMsgLen > NAS_EMM_4BYTES_LEN)
    {
        ulTmpLength = ulMsgLen - NAS_EMM_4BYTES_LEN ;
        pLmmSmsDataInd = (VOS_VOID*)NAS_LMM_ALLOC_MSG(sizeof(LMM_SMS_DATA_IND_STRU) + ulTmpLength);
    }
    else/*如果长度小于NAS_EMM_4BYTES_LEN,分配的空间等于NAS_EMM_4BYTES_LEN*/
    {
        ulTmpLength = 0;
        pLmmSmsDataInd = (VOS_VOID*)NAS_LMM_ALLOC_MSG(sizeof(LMM_SMS_DATA_IND_STRU));
    }

    /*判断申请结果,若失败打印错误并退出*/
    if (NAS_EMM_NULL_PTR == pLmmSmsDataInd)
    {
        /*打印错误*/
        NAS_EMM_PUBU_LOG_ERR("NAS_LMM_SmsSendDataInd: MSG ALLOC ERR!");
        return ;
    }

    /*构造ID_EMM_ESM_DATA_IND消息*/
    /*填充消息头*/
    NAS_LMM_COMP_SMS_MSG_HEADER(pLmmSmsDataInd,
                                (sizeof(LMM_SMS_DATA_IND_STRU)+ ulTmpLength)-NAS_EMM_LEN_VOS_MSG_HEADER);
    /*填充消息ID*/
    pLmmSmsDataInd->ulMsgId = ID_LMM_SMS_DATA_IND;

    /*填充消息内容*/
    pLmmSmsDataInd->ulOpId = 0;
    pLmmSmsDataInd->stSmsMsg.ulSmsMsgSize = ulMsgLen;

    /*lint -e669*/
    NAS_LMM_MEM_CPY(pLmmSmsDataInd->stSmsMsg.aucSmsMsg,aucMsg,ulMsgLen);/*lint !e669 !e670*/
    /*lint +e669*/

    /*向SMS发送ID_LMM_SMS_DATA_IND消息*/
    NAS_LMM_SEND_MSG(pLmmSmsDataInd);

}
コード例 #4
0
/*lint -e960*/
VOS_VOID    NAS_EMM_EsmSendEstCnf (EMM_ESM_ATTACH_STATUS_ENUM_UINT32 ucEstRst)
{
    EMM_ESM_EST_CNF_STRU                 *pEmmEsmEstCnfMsg;


    /*申请消息内存*/
    pEmmEsmEstCnfMsg   = (VOS_VOID *)NAS_LMM_ALLOC_MSG(sizeof(EMM_ESM_EST_CNF_STRU));

    /*判断申请结果,若失败打印错误并退出*/
    if (NAS_EMM_NULL_PTR == pEmmEsmEstCnfMsg)
    {
        /*打印错误*/
        NAS_EMM_ATTACH_LOG_ERR("NAS_EMM_EsmSendEstCnf: MSG ALLOC ERR!");
        return;

    }

    /*构造ID_EMM_ESM_EST_CNF消息*/
    /*填充消息头*/
    NAS_EMM_COMP_AD_ESM_MSG_HEADER(      pEmmEsmEstCnfMsg,
                                         (sizeof(EMM_ESM_EST_CNF_STRU)-
                                          NAS_EMM_LEN_VOS_MSG_HEADER));

    /*填充消息ID*/
    pEmmEsmEstCnfMsg->ulMsgId            = ID_EMM_ESM_EST_CNF;

    /*填充消息内容*/
    pEmmEsmEstCnfMsg->ulEstRst           = ucEstRst;

    /*向ESM发送ID_EMM_ESM_EST_CNF消息*/
    NAS_LMM_SEND_MSG(                   pEmmEsmEstCnfMsg);

    return;

}
コード例 #5
0
VOS_VOID    NAS_EMM_PUB_SendEsmExportCtx(VOS_VOID)
{
    EMM_ESM_EXPORT_CTX_IND_STRU                *pstEsmExportCtx = NAS_EMM_NULL_PTR;

    /* 打印进入该函数*/
    vos_printf("NAS_EMM_PUB_SendEsmExportCtx is entered.");

    /* 申请DOPRA消息 */
    pstEsmExportCtx  = (VOS_VOID *)NAS_LMM_ALLOC_MSG(sizeof(EMM_ESM_EXPORT_CTX_IND_STRU));

    if(NAS_EMM_NULL_PTR == pstEsmExportCtx)
    {
        return;
    }

    /* 填充给ESM的DOPRA头 */
    NAS_EMM_COMP_ESM_MSG_HEADER(pstEsmExportCtx, sizeof(EMM_ESM_EXPORT_CTX_IND_STRU) -
                                        NAS_EMM_LEN_VOS_MSG_HEADER);

    /* 填充消息ID */
    pstEsmExportCtx->ulMsgId             = ID_EMM_ESM_REPLAY_EXPORT_CTX_IND;

    /* 填充消息内容  */



    /* 发送DOPRA消息 */
    NAS_LMM_SEND_MSG(pstEsmExportCtx);

    return;

}
コード例 #6
0
/*lint -e961*/
VOS_VOID  NAS_LMM_SndLmmSmsEstCnf( VOS_VOID )
{
    LMM_SMS_EST_CNF_STRU            *pLmmSmsEstCnfMsg;

    /*申请消息内存*/
    pLmmSmsEstCnfMsg = (VOS_VOID *)NAS_LMM_ALLOC_MSG(sizeof(LMM_SMS_EST_CNF_STRU));

    /*判断申请结果,若失败打印错误并退出*/
    if (NAS_EMM_NULL_PTR == pLmmSmsEstCnfMsg)
    {
        /*打印错误*/
        NAS_EMM_PUBU_LOG_ERR("NAS_LMM_SndLmmSmsEstCnf: MSG ALLOC ERR!");
        return;
    }

    NAS_LMM_MEM_SET(pLmmSmsEstCnfMsg,0,sizeof(LMM_SMS_EST_CNF_STRU));

    /* 打包消息头 */
    NAS_LMM_COMP_SMS_MSG_HEADER( pLmmSmsEstCnfMsg,
                                 sizeof(LMM_SMS_EST_CNF_STRU)-NAS_EMM_LEN_VOS_MSG_HEADER);

    /*填充消息ID*/
    pLmmSmsEstCnfMsg->ulMsgId          = ID_LMM_SMS_EST_CNF;

    /*填充消息内容*/
    pLmmSmsEstCnfMsg->ulOpId           = 0;

    NAS_LMM_SEND_MSG(pLmmSmsEstCnfMsg);
}
コード例 #7
0
/*****************************************************************************
 Function Name   : NAS_LMM_SndLmmSmsErrInd
 Description     : 发送消息通知SMS模块,没有链路透传SMS消息
 Input           : VOS_VOID
 Output          : None
 Return          : VOS_VOID

 History         :
    1.sunbing 49683      2011-11-3  Draft Enact

*****************************************************************************/
VOS_VOID  NAS_LMM_SndLmmSmsErrInd(LMM_SMS_ERR_CAUSE_ENUM_UINT32  enErrCause)
{
    LMM_SMS_ERR_IND_STRU            *pLmmSmsErrIndMsg;

    /*申请消息内存*/
    pLmmSmsErrIndMsg = (VOS_VOID *)NAS_LMM_ALLOC_MSG(sizeof(LMM_SMS_ERR_IND_STRU));

    /*判断申请结果,若失败打印错误并退出*/
    if (NAS_EMM_NULL_PTR == pLmmSmsErrIndMsg)
    {
        /*打印错误*/
        NAS_EMM_PUBU_LOG_ERR("NAS_LMM_SndLmmSmsErrInd: MSG ALLOC ERR!");
        return;
    }

    NAS_LMM_MEM_SET(pLmmSmsErrIndMsg,0,sizeof(LMM_SMS_ERR_IND_STRU));

    /* 打包消息头 */
    NAS_LMM_COMP_SMS_MSG_HEADER( pLmmSmsErrIndMsg,
                                 sizeof(LMM_SMS_ERR_IND_STRU)-NAS_EMM_LEN_VOS_MSG_HEADER);

    /*填充消息ID*/
    pLmmSmsErrIndMsg->ulMsgId          = ID_LMM_SMS_ERR_IND;

    /*填充消息内容*/
    pLmmSmsErrIndMsg->ulOpId           = 0;

    pLmmSmsErrIndMsg->enErrCause       = enErrCause;


    NAS_LMM_SEND_MSG(pLmmSmsErrIndMsg);

}
コード例 #8
0
VOS_VOID    NAS_EMM_SER_SendRabmReestInd(EMM_ERABM_REEST_STATE_ENUM_UINT32
                                                                enRabmReestState)
{
    EMM_ERABM_REEST_IND_STRU             *pRabmReestIndMsg    = NAS_EMM_NULL_PTR;

    NAS_EMM_SER_LOG_INFO("NAS_EMM_SER_SendRabmReestInd is entered.");

    /* 申请DOPRA消息 */
    pRabmReestIndMsg = (VOS_VOID *)NAS_LMM_ALLOC_MSG(sizeof(EMM_ERABM_REEST_IND_STRU));

    if(NAS_EMM_NULL_PTR == pRabmReestIndMsg)
    {
        NAS_EMM_SER_LOG_ERR( "NAS_EMM_SER_SendRabmReestInd: MSG ALLOC ERR !!");
        return;
    }

    /* 填写EMM_ERABM_REEST_IND 的DOPRA消息头 */
    EMM_COMP_ERABM_MSG_HEADER(pRabmReestIndMsg, sizeof(EMM_ERABM_REEST_IND_STRU) -
                                        EMM_LEN_VOS_MSG_HEADER);

    /* 填写EMM_ERABM_REEST_IND 的消息ID标识 */
    pRabmReestIndMsg->ulMsgId           = ID_EMM_ERABM_REEST_IND;

    /* 构造EMM_ERABM_REEST_IND 中的重建状态 */
    pRabmReestIndMsg->enReEstState      = enRabmReestState;

    /* 发送消息(Send the msg of) EMM_ERABM_REEST_IND */
    NAS_LMM_SEND_MSG(                   pRabmReestIndMsg);

    return;

}
コード例 #9
0
VOS_VOID NAS_EMM_SendEsmDeactNonEmcBearInd( VOS_VOID )
{
    EMM_ESM_DEACT_NON_EMC_BEARER_IND_STRU *pstDeactNonEmerBearInd = NAS_EMM_NULL_PTR;

    /* 打印进入该函数, INFO_LEVEL */
    NAS_EMM_SECU_LOG_INFO( "NAS_EMM_SendEsmDeactNonEmcBearInd is entered.");

    /* 申请DOPRA消息 */
    pstDeactNonEmerBearInd = (VOS_VOID *)NAS_LMM_ALLOC_MSG(sizeof(EMM_ESM_DEACT_NON_EMC_BEARER_IND_STRU));

    if(NAS_EMM_NULL_PTR == pstDeactNonEmerBearInd)
    {
        return;
    }

    /* 填写DOPRA消息头 */
    NAS_EMM_SET_SECU_ESM_MSG_HEADER(pstDeactNonEmerBearInd, sizeof(EMM_ESM_DEACT_NON_EMC_BEARER_IND_STRU) -
                                        NAS_EMM_VOS_HEADER_LEN);

    /* 填写消息ID标识 */
    pstDeactNonEmerBearInd->ulMsgId    = ID_EMM_ESM_DEACT_NON_EMC_BEARER_IND;

    /* 发送消息*/
    NAS_LMM_SEND_MSG(pstDeactNonEmerBearInd);

    return;
}
コード例 #10
0
/*lint -e960*/
VOS_VOID    NAS_EMM_SendRejEventToSTK(VOS_UINT8 ucCauseCode,
                                      LNAS_STK_UPDATE_TYPE_ENUM_UINT8          enUpdateType)
{
    LNAS_STK_NETWORK_REJECTION_EVENT_STRU       *pEmmNetworkRejectMsg;
    NAS_MM_PLMN_ID_STRU     *pEmmPlmnID;
    NAS_MM_TAC_STRU         *pEmmTac;

    NAS_EMM_ATTACH_LOG_NORM("NAS_EMM_SendRejEventToSTK is entered");
    /*申请消息内存*/
    pEmmNetworkRejectMsg   = (VOS_VOID *)NAS_LMM_ALLOC_MSG(sizeof(LNAS_STK_NETWORK_REJECTION_EVENT_STRU));

    /*判断申请结果,若失败打印错误并退出*/
    if (NAS_EMM_NULL_PTR == pEmmNetworkRejectMsg)
    {
        /*打印错误*/
        NAS_EMM_ATTACH_LOG_ERR("NAS_EMM_SendRejEventToSTK: MSG ALLOC ERR!");
        return;

    }

    /*构造ID_LNAS_STK_NETWORK_REJECTION_EVENT消息*/
    /*填充消息头*/
    NAS_EMM_STK_MSG_HEADER(      pEmmNetworkRejectMsg,
                                 (sizeof(LNAS_STK_NETWORK_REJECTION_EVENT_STRU)-
                                  NAS_EMM_LEN_VOS_MSG_HEADER));

    /*填充消息ID*/
    pEmmNetworkRejectMsg->ulMsgName = ID_LNAS_STK_NETWORK_REJECTION_EVENT;

    /*填充消息内容*/
    pEmmNetworkRejectMsg->stNetworkRejectionEvent.ucCauseCode = ucCauseCode;

    /*填充消息plmn*/
    pEmmPlmnID = NAS_LMM_GetEmmInfoPresentPlmnAddr();
    pEmmNetworkRejectMsg->stNetworkRejectionEvent.stTaiInfo.stCurPlmnID.aucPlmnId[0] =
        pEmmPlmnID->aucPlmnId[0];
    pEmmNetworkRejectMsg->stNetworkRejectionEvent.stTaiInfo.stCurPlmnID.aucPlmnId[1] =
        pEmmPlmnID->aucPlmnId[1];
    pEmmNetworkRejectMsg->stNetworkRejectionEvent.stTaiInfo.stCurPlmnID.aucPlmnId[2] =
        pEmmPlmnID->aucPlmnId[2];

    /*填充消息TAC*/
    pEmmTac = NAS_LMM_GetEmmInfoPresentTacAddr();
    pEmmNetworkRejectMsg->stNetworkRejectionEvent.stTaiInfo.stTac.ucTac    = pEmmTac->ucTac;
    pEmmNetworkRejectMsg->stNetworkRejectionEvent.stTaiInfo.stTac.ucTacCnt = pEmmTac->ucTacCnt;

    /*填充消息enUpdateAttachType*/
    pEmmNetworkRejectMsg->stNetworkRejectionEvent.enUpdateAttachType = enUpdateType;

    /*向stk发送rejection消息*/
    NAS_LMM_SEND_MSG(pEmmNetworkRejectMsg);

    return;
}
コード例 #11
0
/*lint -e960*/
VOS_VOID    NAS_EMM_EsmSendPdnConnInd(VOS_UINT32 ulCid)
{
    EMM_ESM_PDN_CON_IND_STRU             *pEmmEsmPdnIndMsg;


    /*申请消息内存*/
    pEmmEsmPdnIndMsg = (VOS_VOID *)NAS_LMM_ALLOC_MSG(sizeof(EMM_ESM_PDN_CON_IND_STRU));

    /*判断申请结果,若失败退出*/
    if (NAS_EMM_NULL_PTR == pEmmEsmPdnIndMsg)
    {
        return;
    }

    /*构造ID_EMM_ESM_PDN_CON_IND消息*/
    /*填充消息头*/
    NAS_EMM_COMP_AD_ESM_MSG_HEADER(      pEmmEsmPdnIndMsg,
                                        (sizeof(EMM_ESM_PDN_CON_IND_STRU)-
                                        NAS_EMM_LEN_VOS_MSG_HEADER));

    /*填充消息ID*/
    pEmmEsmPdnIndMsg->ulMsgId            = ID_EMM_ESM_PDN_CON_IND;

    /*填充消息内容*/
    pEmmEsmPdnIndMsg->ulCId              = ulCid;

    if(MMC_LMM_ATT_REASON_HANDOVER == NAS_LMM_GetEmmInfoMmcAttachReason())
    {
        pEmmEsmPdnIndMsg->enPdnReqType = EMM_ESM_PDN_CON_REQ_TYPE_HANDOVER;
    }
    else
    {
        pEmmEsmPdnIndMsg->enPdnReqType = EMM_ESM_PDN_CON_REQ_TYPE_INITIAL;
    }

    /*向ESM发送ID_EMM_ESM_PDN_CON_IND消息*/
    NAS_LMM_SEND_MSG(                   pEmmEsmPdnIndMsg);

    return;


}
コード例 #12
0
VOS_VOID    NAS_EMM_PUB_SendEsmStatusInd
(
    VOS_UINT32  ulATTACHStatus
)
{
    EMM_ESM_STATUS_IND_STRU                *pstsmstatusInd = NAS_EMM_NULL_PTR;

    /* 打印进入该函数*/
    NAS_EMM_PUBU_LOG1_NORM("NAS_EMM_PUB_SendEsmStatusInd is entered.", ulATTACHStatus);

    /* 申请DOPRA消息 */
    pstsmstatusInd  = (VOS_VOID *)NAS_LMM_ALLOC_MSG(sizeof(EMM_ESM_STATUS_IND_STRU));

    if(NAS_EMM_NULL_PTR == pstsmstatusInd)
    {
        return;
    }

    /* 填充给ESM的DOPRA头 */
    NAS_EMM_COMP_ESM_MSG_HEADER(pstsmstatusInd, sizeof(EMM_ESM_STATUS_IND_STRU) -
                                        NAS_EMM_LEN_VOS_MSG_HEADER);

    /* 填充消息ID */
    pstsmstatusInd->ulMsgId             = ID_EMM_ESM_STATUS_IND;

    /* 填充消息内容 -- stATTACHStatus */
    pstsmstatusInd->enEMMStatus         = ulATTACHStatus;

    /*clear global:EpsContextStatusChange*/
    if(ulATTACHStatus == EMM_ESM_ATTACH_STATUS_DETACHED)
    {
        NAS_EMM_GetEpsContextStatusChange() = NAS_EMM_EPS_BEARER_STATUS_NOCHANGE;
    }

    /* 发送DOPRA消息 */
    NAS_LMM_SEND_MSG(pstsmstatusInd);

    return;

}