/*lint -e960*/
VOS_VOID LNAS_DEBUG_GetUeIpInfo
(
    LPS_LNAS_UE_IP_INFO_STRU           *pstUeIpInfo
)
{
    VOS_UINT32                          ulCnt               = NAS_ESM_NULL;
    NAS_ESM_EPSB_CNTXT_INFO_STRU       *pstEpsbCntxtInfo    = VOS_NULL_PTR;
    VOS_UINT32                          ulActDftBearNum     = NAS_ESM_NULL;

    for (ulCnt = NAS_ESM_NULL; ulCnt < NAS_ESM_MAX_EPSB_NUM; ulCnt++)
    {
        /*获取对应EpsbCntxtTbl表地址*/
        pstEpsbCntxtInfo = NAS_ESM_GetEpsbCntxtInfoAddr(ulCnt);

        if (NAS_ESM_BEARER_STATE_ACTIVE != pstEpsbCntxtInfo->enBearerCntxtState)
        {
            continue;
        }

        if (PS_FALSE == NAS_ESM_IsDefaultEpsBearerType(pstEpsbCntxtInfo->enBearerCntxtType))
        {
            continue;
        }

        pstUeIpInfo->astUeIpInfo[ulActDftBearNum].ucPndId   = (VOS_UINT8)ulCnt;
        pstUeIpInfo->astUeIpInfo[ulActDftBearNum].enIpType  = pstEpsbCntxtInfo->stPdnAddrInfo.ucIpType;
        NAS_ESM_MEM_CPY(    pstUeIpInfo->astUeIpInfo[ulActDftBearNum].aucIpv4Addr,
                            pstEpsbCntxtInfo->stPdnAddrInfo.aucIpV4Addr,
                            LPS_OM_IPV4_ADDR_LEN);

        NAS_ESM_MEM_CPY(    pstUeIpInfo->astUeIpInfo[ulActDftBearNum].aucIpv6Addr,
                            pstEpsbCntxtInfo->stPdnAddrInfo.aucIpV6Addr,
                            LPS_OM_IPV6_ADDR_LEN);

        ulActDftBearNum++;
    }

    pstUeIpInfo->ulPdnNum = ulActDftBearNum;

    return;
}
Esempio n. 2
0
VOS_VOID NAS_ESM_InitEpsbCntxtInfo(VOS_UINT32 ulEpsbId)
{
    NAS_ESM_EPSB_CNTXT_INFO_STRU       *pstEpsbInfo         = VOS_NULL_PTR;

    pstEpsbInfo = NAS_ESM_GetEpsbCntxtInfoAddr(ulEpsbId);

    NAS_ESM_MEM_SET(pstEpsbInfo,
                    NAS_ESM_NULL,
                    sizeof(NAS_ESM_EPSB_CNTXT_INFO_STRU));

    pstEpsbInfo->bitOpCId             = NAS_ESM_OP_FALSE;
    pstEpsbInfo->bitOpApn             = NAS_ESM_OP_FALSE;
    pstEpsbInfo->bitOpPco             = NAS_ESM_OP_FALSE;
    pstEpsbInfo->bitOpPdnAddr         = NAS_ESM_OP_FALSE;
    pstEpsbInfo->bitOpEpsQos          = NAS_ESM_OP_FALSE;
    pstEpsbInfo->bitOpEsmCause        = NAS_ESM_OP_FALSE;
    pstEpsbInfo->bitOpApnAmbr         = NAS_ESM_OP_FALSE;
    pstEpsbInfo->bitOpGateWayAddrInfo = NAS_ESM_OP_FALSE;
    pstEpsbInfo->ulEpsbId             = ulEpsbId;
    pstEpsbInfo->enBearerCntxtType    = NAS_ESM_BEARER_TYPE_DEFAULT;
    pstEpsbInfo->enBearerCntxtState   = NAS_ESM_BEARER_STATE_INACTIVE;
    pstEpsbInfo->ulLinkedEpsbId       = NAS_ESM_UNASSIGNED_EPSB_ID;
}