VOS_VOID  NAS_ERABM_RcvRabmEmmRrcConRelInd( VOS_VOID )
{
    VOS_UINT32                          ulEpsbId = NAS_ERABM_NULL;

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

    NAS_ERABM_TimerStop( NAS_ERABM_WAIT_RB_RESUME_TIMER);

    NAS_ERABM_TimerStop( NAS_ERABM_WAIT_RB_REEST_TIMER);

    NAS_ERABM_SetEmmSrState(NAS_ERABM_SERVICE_STATE_TERMIN);

    /*停止建立等待定时器*/
    NAS_ERABM_TimerStop(NAS_ERABM_WAIT_EPSB_ACT_TIMER);

    /*清除等待承载建立标识 */
    NAS_ERABM_SetWaitEpsBActSign(NAS_ERABM_NOT_WAIT_EPSB_ACT_MSG);


    /* 如果在正常模式下 */
    if (NAS_ERABM_MODE_TYPE_NORMAL == NAS_ERABM_GetMode())
    {
        /* 通知L2释放缓存的数据包 */
        /*APPITF_FreeAllofRabmBuf();*/

        /* 异系统切换成功后,RRC会上报链路释放清DRB,但此场景不能通知CDS清缓存 */
        if (NAS_ERABM_L_MODE_STATUS_NORMAL == NAS_ERABM_GetLModeStatus())
        {
            /* (1)如果当前有上行Pending 标识,即有数据缓存,则给CDS发释放缓存 */
            /* (2)存在已激活DRB,则给CDS发释放缓存 */
            if((EMM_ERABM_UP_DATA_PENDING == NAS_ERABM_GetUpDataPending())
               || ((NAS_ERABM_FAILURE == NAS_ERABM_IsAllActtiveBearerWithoutDrb())
                    && (NAS_ERABM_NULL != NAS_ERABM_GetActiveEpsBearerNum())))
            {
                /* 通知CDS释放缓存的数据包 */
                NAS_ERABM_SndErabmCdsFreeBuffDataInd();

                /* 清除上行数据阻塞标志 */
                NAS_ERABM_SetUpDataPending(EMM_ERABM_NO_UP_DATA_PENDING);
            }
        }

    }
    else  /*环回模式下不清理缓存,保持原上行数据Pending状态*/
    {
        NAS_ERABM_INFO_LOG("NAS_ERABM_RcvRabmEmmRrcConRelInd: Do not release buffer .");
    }

    /* 释放所有RB */
    for (ulEpsbId = NAS_ERABM_MIN_EPSB_ID; ulEpsbId<= NAS_ERABM_MAX_EPSB_ID; ulEpsbId++)
    {
        NAS_ERABM_RcvRbRelease(ulEpsbId);
    }

    return;
}
/*****************************************************************************
 Function Name   : NAS_ERABM_RcvCdsErabmServiceNotify
 Description     : ERABM模块CDS_ERABM_SERVICE_NOTIFY消息分发处理
 Input           : CDS_ERABM_SERVICE_NOTIFY_STRU *pRcvMsg-----------消息指针
 Output          : VOS_VOID
 Return          : VOS_VOID

 History         :
     1.lihong00150010      2011-12-06  Draft Enact
     2.lihong00150010      2012-12-14  Modify:Emergency

*****************************************************************************/
VOS_VOID  NAS_ERABM_RcvCdsErabmServiceNotify
(
    const CDS_ERABM_SERVICE_NOTIFY_STRU    *pRcvMsg
)
{
    /*打印进入该函数*/
    NAS_ERABM_INFO_LOG("NAS_ERABM_RcvCdsErabmServiceNotify is entered.");

    (VOS_VOID)pRcvMsg;

    /* 承载没有对应的DRB的场景下,并且定时器没有启动时,向EMM发起请求 */
    if (NAS_ERABM_SUCCESS == NAS_ERABM_IsAllActtiveBearerWithoutDrb())
    {
        if(NAS_ERABM_TIMER_STATE_STOPED != NAS_ERABM_IsTimerRunning(NAS_ERABM_WAIT_RB_REEST_TIMER))
        {
            NAS_ERABM_NORM_LOG("NAS_ERABM_RcvCdsErabmServiceNotify:Reest timer started!" );
            return ;
        }

        /*发送EMM_ERABM_REEST_REQ消息后,设置服务请求启动*/
        NAS_ERABM_SetEmmSrState(NAS_ERABM_SERVICE_STATE_INIT);
		/* lihong00150010 emergency tau&service begin */
        if (VOS_TRUE == NAS_ERABM_IsEmcService(pRcvMsg->ucRabId))
        {
            NAS_ERABM_SndRabmEmmReestReq(VOS_TRUE);

            NAS_ERABM_TimerStart(   NAS_ERABM_WAIT_RB_REEST_LENGTH,
                                    NAS_ERABM_WAIT_RB_REEST_TIMER,
                                    VOS_TRUE);
        }
        else
        {
            NAS_ERABM_SndRabmEmmReestReq(VOS_FALSE);

            NAS_ERABM_TimerStart(   NAS_ERABM_WAIT_RB_REEST_LENGTH,
                                    NAS_ERABM_WAIT_RB_REEST_TIMER,
                                    VOS_FALSE);
        }
		/* lihong00150010 emergency tau&service end */
    }
    else
    {
        NAS_ERABM_NORM_LOG("NAS_ERABM_RcvCdsErabmServiceNotify:Already in Connect state!" );
        NAS_ERABM_SetEmmSrState(NAS_ERABM_SERVICE_STATE_TERMIN);

        /* 通知CDS启动二次过滤 */
        NAS_ERABM_SndErabmCdsSndBuffDataInd(CDS_ERABM_SEND_BUFF_DATA_ALLOWED_TYPE_SERVICE_SUCC);
    }
}
/*lint -e961*/
VOS_VOID NAS_ERABM_TcMsgDistr( VOS_VOID *pRcvMsg )
{
    PS_MSG_HEADER_STRU         *pEmmMsg = VOS_NULL_PTR;

    pEmmMsg = (PS_MSG_HEADER_STRU*)pRcvMsg;

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

    /*根据消息名,调用相应的消息处理函数*/
    switch (pEmmMsg->ulMsgName)
    {
        /*如果收到的是ID_ETC_ERABM_ACTIVATE_TEST_MODE消息*/
        case ID_ETC_ERABM_ACTIVATE_TEST_MODE:
            NAS_ERABM_RcvRabmTcActTestMode();
            break;

        /*如果收到的是ID_ETC_ERABM_DEACTIVATE_TEST_MODE消息*/
        case ID_ETC_ERABM_DEACTIVATE_TEST_MODE:
            NAS_ERABM_RcvRabmTcDeactTestMode();
            break;

        /*如果收到的是ID_ETC_ERABM_REL_REQ消息*/
        case ID_ETC_ERABM_REL_REQ:
            NAS_ERABM_RcvRabmTcRelReq();
            break;

        /*如果收到的是ID_ETC_ERABM_SUSPEND_RSP消息*/
        case ID_ETC_ERABM_SUSPEND_RSP:
            NAS_ERABM_NORM_LOG("NAS_ERABM_TcMsgDistr:receive ID_ETC_ERABM_SUSPEND_RSP!");
            break;

        /*如果收到的是ID_ETC_ERABM_RESUME_RSP消息*/
        case ID_ETC_ERABM_RESUME_RSP:
            NAS_ERABM_NORM_LOG("NAS_ERABM_TcMsgDistr:receive ID_ETC_ERABM_RESUME_RSP!");
            break;

        default:
            NAS_ERABM_WARN_LOG("NAS_ERABM_TcMsgDistr:WARNING:TC->RABM Message name non-existent!");
            break;
    }
}
/*****************************************************************************
 Function Name   : NAS_ERABM_RcvRabmTcRelReq
 Description     : 收到TC模块REL REQ消息处理函数
 Input           : None
 Output          : None
 Return          : VOS_VOID

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

*****************************************************************************/
VOS_VOID  NAS_ERABM_RcvRabmTcRelReq( VOS_VOID )
{
    VOS_UINT32 ulLoop = NAS_ERABM_NULL;

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

    /* 通知CDS RAB RELEASE */
    for (ulLoop = NAS_ERABM_MIN_EPSB_ID; ulLoop <= NAS_ERABM_MAX_EPSB_ID; ulLoop++)
    {
        if (NAS_ERABM_EPSB_ACTIVE == NAS_ERABM_GetEpsbStateInfo(ulLoop))
        {
            /* 给CDS发送CDS_ERABM_RAB_RELEASE_IND */
            NAS_ERABM_SndErabmCdsRabReleaseInd(ulLoop);
        }
    }

    /*释放所有资源,回到开机初始化后的状态*/
    NAS_ERABM_ClearRabmResource();

    /*根据TFT和承载信息更新IP Filter到硬件加速器*/
    if(PS_FAIL == NAS_ERABM_IpfConfigUlFilter())
    {
        NAS_ERABM_ERR_LOG("NAS_ERABM_EsmMsgDistr: IPF Update IP Filter Failed.");
    }

    /*根据TFT和承载信息更新IP Filter到CDS*/
    if(PS_FAIL == NAS_ERABM_CdsConfigUlFilter())
    {
        NAS_ERABM_ERR_LOG("NAS_ERABM_EsmMsgDistr: CDS Update IP Filter Failed.");
    }

    #if 0
    /* 配置下行TFT信息 */
    if(PS_FAIL == NAS_ERABM_IpfConfigDlFilter())
    {
        NAS_ERABM_ERR_LOG("NAS_ERABM_RcvRabmEmmResumeInd: Update DL IP Filter Failed.");
    }
    #endif
}
VOS_VOID NAS_ERABM_EmmMsgDistr( VOS_VOID *pRcvMsg )
{
    PS_MSG_HEADER_STRU         *pEmmMsg = VOS_NULL_PTR;

    pEmmMsg = (PS_MSG_HEADER_STRU*)pRcvMsg;

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

    /*根据消息名,调用相应的消息处理函数*/
    switch (pEmmMsg->ulMsgName)
    {
        /*如果收到的是EMM_ERABM_REEST_IND消息,调用NAS_ERABM_RcvRabmEmmReest_Ind函数*/
        case ID_EMM_ERABM_REEST_IND:
            NAS_ERABM_RcvRabmEmmReestInd((EMM_ERABM_REEST_IND_STRU*)pRcvMsg);
            break;

        /*如果收到的是EMM_ERABM_REL_IND消息,调用NAS_ERABM_RcvRabmEmmRelInd函数*/
        case ID_EMM_ERABM_REL_IND:
            NAS_ERABM_RcvRabmEmmRelInd();
            break;

        case ID_EMM_ERABM_RRC_CON_REL_IND:
            NAS_ERABM_RcvRabmEmmRrcConRelInd();
            break;

        case ID_EMM_ERABM_SUSPEND_IND:
            NAS_ERABM_RcvRabmEmmSuspendInd( (EMM_ERABM_SUSPEND_IND_STRU *) pRcvMsg );
            break;

        case ID_EMM_ERABM_RESUME_IND:
            NAS_ERABM_RcvRabmEmmResumeInd( (EMM_ERABM_RESUME_IND_STRU *) pRcvMsg );
            break;

        default:
            NAS_ERABM_WARN_LOG("NAS_ERABM_EmmMsgDistr:WARNING:EMM->RABM Message name non-existent!");
            break;
    }
}
VOS_VOID NAS_ERABM_CdsMsgDistr( VOS_VOID *pRcvMsg )
{
    PS_MSG_HEADER_STRU                 *pSmMsg;

    pSmMsg = (PS_MSG_HEADER_STRU*)pRcvMsg;

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

    /*根据消息名,调用相应的消息处理函数*/
    switch (pSmMsg->ulMsgName)
    {
        /*如果收到的是CDS_ERABM_SERVICE_NOTIFY消息,调用NAS_ERABM_RcvCdsErabmServiceNotify函数*/
        case ID_CDS_ERABM_SERVICE_NOTIFY:
            NAS_ERABM_RcvCdsErabmServiceNotify((CDS_ERABM_SERVICE_NOTIFY_STRU *) pRcvMsg);
            break;

        default:
            NAS_ERABM_WARN_LOG("NAS_ERABM_CdsMsgDistr:WARNING:CDS->ERABM Message name non-existent!");
            break;
    }

    return;
}
VOS_VOID NAS_ERABM_ClearRabmResource( VOS_VOID )
{
    VOS_UINT8                     ucTimerIndex  = NAS_ERABM_NULL;
    VOS_UINT32                    ulLoop        = NAS_ERABM_NULL;
    VOS_UINT32                    ulEpsbId      = NAS_ERABM_NULL;
    APP_ESM_IP_ADDR_STRU        *pstPdnAddr    = VOS_NULL_PTR;

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

    /* 停止已经启动的定时器 */
    for (ucTimerIndex = 0; ucTimerIndex < NAS_NAS_ERABM_TIMER_NAME_BUTT; ucTimerIndex++)
    {
        NAS_ERABM_TimerStop(ucTimerIndex);
    }
    /* 如果存在激活承载,则通知CDS释放缓存的数据包,加上此判断是为了避免重复
       通知CDS释放缓存数据包 */
    if (0 != NAS_ERABM_GetActiveEpsBearerNum())
    {
        /* 通知CDS释放缓存的数据包 */
        NAS_ERABM_SndErabmCdsFreeBuffDataInd();
    }
    /*初始化RABM实体*/
    NAS_ERABM_MEM_SET((VOS_VOID*)NAS_ERABM_Entity(), NAS_ERABM_NULL, sizeof(NAS_ERABM_ENTITY_STRU));

    /* 初始化RABM统计信息 */
    NAS_ERABM_DebugInit();

    /*设置SERVICE流程没有启动状态*/
    NAS_ERABM_SetEmmSrState(NAS_ERABM_SERVICE_STATE_TERMIN);

    /*设置RABM没有等待EPS承载激活消息*/
    NAS_ERABM_SetWaitEpsBActSign(NAS_ERABM_NOT_WAIT_EPSB_ACT_MSG);

    /*设置RRC请求建立RB的个数为0*/
    NAS_ERABM_SetRbNumInfo(0);

    /*设置唯一激活且没有TFT的承载号为NAS_ERABM_ILL_EPSB_ID*/
    NAS_ERABM_GetOnlyActiveAndNoUlTftEpsbId() = NAS_ERABM_ILL_EPSB_ID;

    /*设置不存在上行数据阻塞*/
    NAS_ERABM_SetUpDataPending(EMM_ERABM_NO_UP_DATA_PENDING);

    /*初始化EPS承载列表*/
    for (ulEpsbId = NAS_ERABM_MIN_EPSB_ID; ulEpsbId <= NAS_ERABM_MAX_EPSB_ID; ulEpsbId++)
    {
        pstPdnAddr = NAS_ERABM_GetEpsbPdnAddr(ulEpsbId);
        NAS_ERABM_SetEpsbIdInfo(ulEpsbId, ulEpsbId);
        NAS_ERABM_SetEpsbRbIdInfo(ulEpsbId, NAS_ERABM_ILL_RB_ID);
        NAS_ERABM_SetRbStateInfo(ulEpsbId, NAS_ERABM_RB_DISCONNECTED);
        NAS_ERABM_MEM_SET(pstPdnAddr, NAS_ERABM_NULL, sizeof(APP_ESM_IP_ADDR_STRU));
        NAS_ERABM_ClearEpsbResource(ulEpsbId);
    }

    /*初始化RB建立临时表信息*/
    for (ulLoop = 0; ulLoop < NAS_ERABM_MAX_EPSB_NUM; ulLoop++)
    {
        NAS_ERABM_SetRbSetupEpsbIdInfo(ulLoop, NAS_ERABM_ILL_EPSB_ID);
        NAS_ERABM_SetRbSetupRbIdInfo(ulLoop, NAS_ERABM_ILL_RB_ID);
    }

    /*初始化RABM灌包相关信息*/
    NAS_ERABM_StAppDataBitIpv4(NAS_ERABM_OP_FALSE);
    NAS_ERABM_StAppDataBitIpv6(NAS_ERABM_OP_FALSE);
    NAS_ERABM_SetAppDataRmtPortIpv4(NAS_ERABM_NULL);
    NAS_ERABM_SetAppDataRmtPortIpv6(NAS_ERABM_NULL);
    NAS_ERABM_SetAppDataOperateType(APP_ERABM_DATA_TRANS_OPERATE_BUTT);
    NAS_ERABM_MEM_SET(NAS_ERABM_GetAppDataRemoteIpv4Addr(), NAS_ERABM_NULL,\
             sizeof(NAS_ERABM_GetAppDataRemoteIpv4Addr())/sizeof(VOS_UINT8));
    NAS_ERABM_MEM_SET(NAS_ERABM_GetAppDataRemoteIpv6Addr(), NAS_ERABM_NULL,\
             sizeof(NAS_ERABM_GetAppDataRemoteIpv6Addr())/sizeof(VOS_UINT8));

    NAS_ERABM_MEM_SET(NAS_ERABM_GET_IP_HEADER_BUFFER(), NAS_ERABM_NULL, NAS_ERABM_IP_HEADER_BUFFER_LEN);

    NAS_ERABM_MEM_SET(  NAS_ERABM_GetIpv4SegBuffAddr(),
                        NAS_ERABM_NULL,
                        sizeof(NAS_ERABM_IPV4_SEGMENT_BUFF_STRU));

    /* 清空下行FILTER配置 */
    NAS_ERABM_MEM_SET(   NAS_ERABM_IPF_GET_DL_FILTER_PTR(0),
                        NAS_ERABM_NULL,
                        (NAS_ERABM_IPF_MAX_DL_FILTER * sizeof(IPF_FILTER_CONFIG_S)));
    NAS_ERABM_IPF_SET_DL_FILTER_NUM(0);

    /* 初始化上行NDIS Filter有效 */
    NAS_ERABM_SetUlNdisFilterValidFlag(NAS_ERABM_UL_NDIS_FILTER_INVALID);
}
VOS_VOID NAS_ERABM_Init(VOS_VOID)
{
    VOS_UINT8                     ucTimerIndex  = 0;
    VOS_UINT32                    ulEpsbId      = 0;
    VOS_UINT32                    ulLoop        = 0;
    APP_ESM_IP_ADDR_STRU         *pstPdnAddr    = VOS_NULL_PTR;

    /*打印进入该函数*/
    NAS_ERABM_INFO_LOG("NAS_ERABM                          START INIT...");

    /*初始化RABM实体*/
    NAS_ERABM_MEM_SET((VOS_VOID*)NAS_ERABM_Entity(), NAS_ERABM_NULL, sizeof(NAS_ERABM_ENTITY_STRU));

    /* 初始化RABM统计信息 */
    NAS_ERABM_DebugInit();

    /*设置SERVICE流程没有启动状态*/
    NAS_ERABM_SetEmmSrState(NAS_ERABM_SERVICE_STATE_TERMIN);

    /*设置RABM没有等待EPS承载激活消息*/
    NAS_ERABM_SetWaitEpsBActSign(NAS_ERABM_NOT_WAIT_EPSB_ACT_MSG);

    /*设置L MODE的状态为SUSPENDED*/
    NAS_ERABM_SetLModeStatus(NAS_ERABM_L_MODE_STATUS_SUSPENDED);

    /*设置RRC请求建立RB的个数为0*/
    NAS_ERABM_SetRbNumInfo(0);

    /*设置唯一激活且没有TFT的承载号为NAS_ERABM_ILL_EPSB_ID*/
    NAS_ERABM_GetOnlyActiveAndNoUlTftEpsbId() = NAS_ERABM_ILL_EPSB_ID;

    /*设置不存在上行数据阻塞*/
    NAS_ERABM_SetUpDataPending(EMM_ERABM_NO_UP_DATA_PENDING);

    /*初始化定时器信息*/
    for ( ucTimerIndex = 0; ucTimerIndex < NAS_NAS_ERABM_TIMER_NAME_BUTT; ucTimerIndex++ )
    {
        NAS_ERABM_TimerStop(ucTimerIndex);
    }

    /*初始化EPS承载列表*/
    for (ulEpsbId = NAS_ERABM_MIN_EPSB_ID; ulEpsbId <= NAS_ERABM_MAX_EPSB_ID; ulEpsbId++)
    {
        pstPdnAddr = NAS_ERABM_GetEpsbPdnAddr(ulEpsbId);
        NAS_ERABM_SetEpsbIdInfo(ulEpsbId, ulEpsbId);
        NAS_ERABM_SetEpsbRbIdInfo(ulEpsbId, NAS_ERABM_ILL_RB_ID);
        NAS_ERABM_SetRbStateInfo(ulEpsbId, NAS_ERABM_RB_DISCONNECTED);
        NAS_ERABM_MEM_SET(pstPdnAddr, NAS_ERABM_NULL, sizeof(APP_ESM_IP_ADDR_STRU));
        NAS_ERABM_ClearEpsbResource(ulEpsbId);
    }

    /*初始化RB建立临时表信息*/
    for (ulLoop = 0; ulLoop < NAS_ERABM_MAX_EPSB_NUM; ulLoop++)
    {
        NAS_ERABM_SetRbSetupEpsbIdInfo(ulLoop, NAS_ERABM_ILL_EPSB_ID);
        NAS_ERABM_SetRbSetupRbIdInfo(ulLoop, NAS_ERABM_ILL_RB_ID);
    }

    /*初始化RABM灌包相关信息*/
    NAS_ERABM_StAppDataBitIpv4(NAS_ERABM_OP_FALSE);
    NAS_ERABM_StAppDataBitIpv6(NAS_ERABM_OP_FALSE);
    NAS_ERABM_SetAppDataRmtPortIpv4(NAS_ERABM_NULL);
    NAS_ERABM_SetAppDataRmtPortIpv6(NAS_ERABM_NULL);
    NAS_ERABM_SetAppDataOperateType(APP_ERABM_DATA_TRANS_OPERATE_BUTT);
    NAS_ERABM_MEM_SET(NAS_ERABM_GetAppDataRemoteIpv4Addr(), NAS_ERABM_NULL,\
                sizeof(NAS_ERABM_GetAppDataRemoteIpv4Addr())/sizeof(VOS_UINT8));
    NAS_ERABM_MEM_SET(NAS_ERABM_GetAppDataRemoteIpv6Addr(), NAS_ERABM_NULL,\
                sizeof(NAS_ERABM_GetAppDataRemoteIpv6Addr())/sizeof(VOS_UINT8));

    NAS_ERABM_MEM_SET(NAS_ERABM_GET_IP_HEADER_BUFFER(), NAS_ERABM_NULL, NAS_ERABM_IP_HEADER_BUFFER_LEN);

    NAS_ERABM_MEM_SET(  NAS_ERABM_GetIpv4SegBuffAddr(),
                        NAS_ERABM_NULL,
                        sizeof(NAS_ERABM_IPV4_SEGMENT_BUFF_STRU));

    #if 0
    /* 初始化下行IP需要使用的IP Filter定义 */
    NAS_ERABM_IpfDefDlFilter();
    #endif

    /* 初始化上行NDIS Filter有效 */
    NAS_ERABM_SetUlNdisFilterValidFlag(NAS_ERABM_UL_NDIS_FILTER_INVALID);

    /* 初始化上行NDIS需要使用的IP Filter定义 */
    NAS_ERABM_IpfUlNdisFilterInit();

    /* 初始化IPF统计信息 */
    NAS_ERABM_IpfOmInit();
}
VOS_VOID NAS_ERABM_TimerStart
(
    VOS_UINT32                          ulTimerLen,
    NAS_ERABM_TIMER_NAME_ENUM_UINT8     enTimerName,
    VOS_UINT32                          ulTimerPara
)
{
    NAS_ERABM_START_TIMER_STRU       *pstTimerInfo = VOS_NULL_PTR;

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

    /*获取RABM实体中的定时器结构地址指针*/
    pstTimerInfo = NAS_ERABM_GetRbTimer(enTimerName);

    if ( VOS_NULL_PTR == pstTimerInfo )
    {
        NAS_ERABM_WARN_LOG("NAS_ERABM_TimerStart: pstStateTimer NULL.");
        return ;
    }

    /*判断定时器是否打开,打开则关闭*/
    if (VOS_NULL_PTR != pstTimerInfo->stHTimer)
    {
        if (VOS_OK != PS_STOP_REL_TIMER(&(pstTimerInfo->stHTimer)))
        {
            NAS_ERABM_ERR_LOG("NAS_ERABM_TimerStart: start reltimer error1 ");
            return;
        }

        NAS_ERABM_LOG1("(TimerType) Timer not close!", (VOS_INT32)enTimerName);
    }

    if(NAS_ERABM_NULL == ulTimerLen)
    {
        NAS_ERABM_WARN_LOG("NAS_ERABM_TimerStart:WARN: TimerLen = 0");
        return;
    }
	/* lihong00150010 emergency tau&service begin */
    /*设定定时器LENGTH和NAME,打开失败则报警返回*/
    if (VOS_OK !=
            PS_START_REL_TIMER(&(pstTimerInfo->stHTimer),PS_PID_RABM,
                                ulTimerLen,(VOS_UINT32)enTimerName, ulTimerPara,
                                VOS_RELTIMER_NOLOOP))
    {
        NAS_ERABM_WARN_LOG("NAS_ERABM_TimerStart:WARN: start reltimer error2");
        return;
    }
	/* lihong00150010 emergency tau&service end */

    /*钩出当前的定时器信息 */
    NAS_ERABM_SndOmErabmTimerStatus(NAS_ERABM_TIMER_RUNNING, enTimerName, ulTimerLen);


    /*更新定时器开启信息和定时器类别*/
    pstTimerInfo->enName   = enTimerName;

    /*根据定时器的不同类型,打印相应信息*/
    switch (enTimerName)
    {
        case NAS_ERABM_WAIT_EPSB_ACT_TIMER:
            NAS_ERABM_NORM_LOG("NAS_ERABM_TimerStart:NORM:RABM TimerStart: NAS_ERABM_RB_WAIT_EPSB_ACT_TIMER");
            break;

        case NAS_ERABM_WAIT_RB_REEST_TIMER:
            NAS_ERABM_NORM_LOG("NAS_ERABM_TimerStart:NORM:RABM TimerStart: NAS_ERABM_WAIT_RB_REEST_TIMER");
            break;

        case NAS_ERABM_WAIT_RB_RESUME_TIMER:
            NAS_ERABM_NORM_LOG("NAS_ERABM_TimerStart:NORM:RABM TimerStart: NAS_ERABM_WAIT_RB_RESUME_TIMER");
            break;

        case NAS_ERABM_WAIT_TC_FREE_BUFFER_TIMER:
            NAS_ERABM_NORM_LOG("NAS_ERABM_TimerStart:NORM:RABM TimerStart: NAS_ERABM_WAIT_TC_FREE_BUFFER_TIMER");
            break;

        default:
            NAS_ERABM_ERR_LOG("NAS_ERABM_TimerStart:ERROR: start unreasonable reltimer.");
            break;
    }
}
/*lint -e961*/
VOS_VOID  NAS_ERABM_RcvRabmEmmReestInd(const EMM_ERABM_REEST_IND_STRU *pRcvMsg )
{
    if (NAS_ERABM_L_MODE_STATUS_NORMAL != NAS_ERABM_GetLModeStatus())
    {
        NAS_ERABM_WARN_LOG("NAS_ERABM_RcvRabmEmmReestInd:Rabm is already suspended!");
        return ;
    }

    switch(pRcvMsg->enReEstState)
    {
        /*case EMM_ERABM_REEST_STATE_SUCC:*/
        case EMM_ERABM_REEST_STATE_FAIL:

            /*打印进入该函数*/
            NAS_ERABM_LOG1("NAS_ERABM_RcvRabmEmmReestInd: receive Emm Reset result: .",
                          pRcvMsg->enReEstState);
            /*SERVICE流程结束*,停止定时器*/
            NAS_ERABM_TimerStop(NAS_ERABM_WAIT_RB_REEST_TIMER);
            NAS_ERABM_SetEmmSrState(NAS_ERABM_SERVICE_STATE_TERMIN);
            /* 如果在正常模式下 */
            if (NAS_ERABM_MODE_TYPE_NORMAL == NAS_ERABM_GetMode())
            {
                /* 通知L2释放缓存的数据包 */
                /*APPITF_FreeAllofRabmBuf();*/

                /* 通知CDS释放缓存的数据包 */
                NAS_ERABM_SndErabmCdsFreeBuffDataInd();

                /* 清除上行数据阻塞标志*/
                NAS_ERABM_SetUpDataPending(EMM_ERABM_NO_UP_DATA_PENDING);
            }
            else if (NAS_ERABM_TIMER_STATE_STOPED == NAS_ERABM_IsTimerRunning(NAS_ERABM_WAIT_TC_FREE_BUFFER_TIMER))
            /*环回模式下不清理缓存,保持原上行数据Pending状态*/
            {
                NAS_ERABM_INFO_LOG("NAS_ERABM_RcvRabmEmmReestInd: NAS_ERABM_WAIT_TC_FREE_BUFFER_TIMER start.");
                /* lihong00150010 emergency tau&service begin */
                NAS_ERABM_TimerStart(   NAS_ERABM_WAIT_TC_FREE_BUFFER_LENGTH,
                                        NAS_ERABM_WAIT_TC_FREE_BUFFER_TIMER,
                                        NAS_ERABM_WAIT_TC_FREE_BUFFER_TIMER);
            }   /* lihong00150010 emergency tau&service end */
            else
            {
                NAS_ERABM_INFO_LOG("NAS_ERABM_RcvRabmEmmReestInd: NAS_ERABM_WAIT_TC_FREE_BUFFER_TIMER is running.");
            }
            break;

        case EMM_ERABM_REEST_STATE_INITIATE:

            /*打印进入该函数*/
            NAS_ERABM_INFO_LOG("NAS_ERABM_RcvRabmEmmReestInd: receive EMM_ERABM_REEST_STATE_INITIATE .");
            /*SERVICE流程启动,启动定时器*/
            if (NAS_ERABM_SERVICE_STATE_TERMIN == NAS_ERABM_GetEmmSrState())
            {/* lihong00150010 emergency tau&service begin */
                NAS_ERABM_TimerStart(   NAS_ERABM_WAIT_RB_REEST_LENGTH,
                                        NAS_ERABM_WAIT_RB_REEST_TIMER,
                                        VOS_FALSE);
                NAS_ERABM_SetEmmSrState(NAS_ERABM_SERVICE_STATE_INIT);
            }/* lihong00150010 emergency tau&service end */
            break;

        default:
            NAS_ERABM_WARN_LOG("NAS_ERABM_RcvRabmEmmReestInd:WARNNING: EstState illegal!");
            break;
    }
}