⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 au_opr.cpp

📁 map协议源代码
💻 CPP
📖 第 1 页 / 共 5 页
字号:
/*******************************************************************

        Name:   acc_cfg.c

        Type:   C source file

        Desc:   C source code for initialize protocol stack

        File:   acc_cfg.c

        Sid:    acc_cfg.c - 09/27/2001

        Created by:     shu.bu

**********************************************************/
#if 0
#include "cp_global.h"
#endif

#include "envopt.h"        /* environment options */
#include "envdep.h"        /* environment dependent */
#include "envind.h"        /* environment independent */
#include "gen.h"           /* general layer */
#include "cm5.h"
#include "ssi.h"
#include "lma.h"
#include "cm_err.h"
#include "stu.h"
#include "cm_hash.h"
#include "mat.h"
#include "cm_ss7.h"

#include "ma.h"

#include "gen.x"
#include "cm5.x"
#include "ssi.x"
#include "cm_ss7.x"
#include "cm_lib.x"
#include "stu.x"
#include "lma.x"
#include "cm_hash.x"
#include "mat.x"

#include "ma.x"

#ifdef CP_CMS
#include "lha_app.h"
#endif

#include "au.h"
#include "au_opr.h"
#include "au_dlg.h"
#if 0
#include "stack_cfg.h"
#endif
Swtch pSwtch = LMA_VER2P;


PUBLIC S16 maAccUpdExtContSeq
                 ARGS((MaExtContSeq *evt ));

PUBLIC S16 maAccUpdTknStrS(U8 verFlg, TknStrS *ptr, U8 len, Data val);
PUBLIC S16 maAccUpdTknU8(U8 verFlg, TknU8 *ptr, U8 val);

/*
*
*       Fun:   maAccUpdTknStr4
*
*       Desc:  Fill a token string of size 64 bytes with passed parameter
*              values
*
*       Ret:   ROK     - test case passed
*              RFAILED - test case failed
*
*       Notes: 
*
*       File:  au_opr.c
*
*/

#ifdef ANSI
PUBLIC S16 maAccUpdTknStr4
(
U8      verFlg,   /* version Flag */
TknStr4 *ptr,     /* Pointer to the structure */
U8       len,     /* length to be filled */
Data     val      /* byte to be repetitively filled in */
)
#else
PUBLIC S16 maAccUpdTknStr4(verFlg,ptr, len, val)
U8      verFlg;   /* version flag */
TknStr4 *ptr;     /* Pointer to the structure */
U8       len;     /* length to be filled */
Data     val;     /* byte to be repetitively filled in */
#endif
{
   U8      i;     /* counter */

   TRC2(maAccUpdTknStr4)

   if (!(IS_VER_EQUAL(pSwtch,verFlg)))
   {
      /* This field is not applicable to the protocol swtch */
      ptr->pres = FALSE;
      RETVALUE(RFAILED);
   }
   /* make the element as present */
   ptr->pres = TRUE;

/* The follwoing lines has been removed to suppress */
/* warnings with gcc 3.2.2 */
/*   if (len > 255)                */
/*   {                             */
/*      RETVALUE(RFAILED);         */
/*   }                             */
/*   else                          */
/*   {                             */
      ptr->len = (U8) len;      
/*   }                             */

   for(i=0; i < len; i++)
   {
      ptr->val[i] = val;
   }

   RETVALUE(ROK);

} /* end of maAccUpdTknStr4 */

/*
*
*       Fun:   maAccUpdTknStrE
*
*       Desc:  Fill a token string of size 64 bytes with passed parameter
*              values
*
*       Ret:   ROK     - test case passed
*              RFAILED - test case failed
*
*       Notes: 
*
*       File:  au_opr.c
*
*/
#ifdef ANSI
PUBLIC S16 maAccUpdTknStrE
(
U8      verFlg,   /* version Flag */
TknStrE *ptr,     /* Pointer to the structure */
U8       len,     /* length to be filled */
Data     val      /* byte to be repetitively filled in */
)
#else
PUBLIC S16 maAccUpdTknStrE(verFlg,ptr, len, val)
U8      verFlg;   /* version flag */
TknStrE *ptr;     /* Pointer to the structure */
U8       len;     /* length to be filled */
Data     val;     /* byte to be repetitively filled in */
#endif
{
   U8      i;     /* counter */

   TRC2(maAccUpdTknStrE)

   if (!(IS_VER_EQUAL(pSwtch,verFlg)))
   {
      /* This field is not applicable to the protocol swtch */
      ptr->pres = FALSE;
      RETVALUE(RFAILED);
   }
   /* make the element as present */
   ptr->pres = TRUE;

/* The follwoing lines has been removed to suppress */
/* warnings with gcc 3.2.2 */
/*   if (len > 255)                */
/*   {                             */
/*      RETVALUE(RFAILED);         */
/*   }                             */
/*   else                          */
/*   {                             */
      ptr->len = (U8) len;      
/*   }                             */

   for(i=0; i < len; i++)
   {
      ptr->val[i] = val;
   }

   RETVALUE(ROK);

} /* end of maAccUpdTknStrE */


/* Public Declarations */
S16 dispBanner()
{
    AUACC_PRINT("\n\n\n\n\n\n");
    AUACC_PRINT("            -------------------MAP TCAP SCCP M3UA SCTP------------------\n\n\n");

    return(ROK);
}


/*
 * Function name: maFillAcn
 * Des:           Fill ACN for according operation
 * Return Value : ROK or RFAILED
 */
S16 auFillAcn(U8 opCode, MaApConName *acn, MaApConName *altAcn, U8 *oprClass, U8 *maVer, Swtch maSwtch)
{

   U8 cntxt;
   U8 ver;
   U8 altCntxt;
   U8 altVer;

   cntxt = ver = altCntxt = altVer = 0;
   acn->pres = TRUE;
   acn->len = 8;
   acn->val[0] = 0;
   acn->val[1] = 4;
   acn->val[2] = 0;
   acn->val[3] = 0;
   acn->val[4] = 1;
   acn->val[5] = 0;

   altAcn->pres = FALSE;
   altAcn->len = 0;
   altAcn->val[0] = 0;
   altAcn->val[1] = 4;
   altAcn->val[2] = 0;
   altAcn->val[3] = 0;
   altAcn->val[4] = 1;
   altAcn->val[5] = 0;

   switch(opCode)

   {

#if (MAP_MSC || MAP_VLR)  /*  B Interface */
   case MA_DET_IMSI:         /* MaDetIMSI */
   {
      *maVer   = LMA_VER1;
      *oprClass = MA_OPRCLASS4;
      RETVALUE(RFAILED);
   }

   case MA_TRACESUBSACTV:    /* MaTrSubsActv */
   {
      cntxt = MA_HO_CONTROL_AC;
      ver   = (U8)maSwtch;
      *maVer   = LMA_VER1;
      *oprClass = MA_OPRCLASS4;
      break;
   }
#endif

#if MAP_VLR                   /*  G Interface */
   case MA_SNDID:             /* MaSendId */
   {
      cntxt = MA_INTVLRINFO_RET_AC;
      ver   = (U8)maSwtch;
      *maVer   = LMA_VER1;
      *oprClass = MA_OPRCLASS1;
      break;
   }
#endif


#if MAP_MSC
   case MA_NOTEINTERHO:      /* MaNotInterHo */
   {
      cntxt = MA_HO_CONTROL_AC;
      ver   = (U8)maSwtch;
      *maVer   = LMA_VER1;
      *oprClass = MA_OPRCLASS4;
      break;
   }
   case MA_PER_HO:           /* MaPerHo */
   case MA_PER_SUBSHO:       /* MaPerSubHo */
   {
      cntxt = MA_HO_CONTROL_AC;
      ver   = (U8)maSwtch;
      *maVer   = LMA_VER1;
      *oprClass = MA_OPRCLASS1;
      break;
   }
   case MA_SNDENDSIG:        /* MaSndEndSig */
   {
      cntxt = MA_HO_CONTROL_AC;
      ver   = (U8)maSwtch;
      *maVer   = LMA_VER_ALL;
/* modified by Bruce for MAPE 2003/6/19 */
      *oprClass = MA_OPRCLASS1;
      break;
   }
   case MA_PRE_HO:           /* MaPreHo */
   case MA_PRE_SUBSHO:       /* MaPreSubHo */
   {
      cntxt = MA_HO_CONTROL_AC;
      ver   = (U8)maSwtch;
      *maVer   = LMA_VER2AND2P;
      *oprClass = MA_OPRCLASS1;
      break;
   }
   case MA_PROCACCSIG:       /* MaProcAccSig */
   case MA_FWDACCSIG:        /* MaFwdAccSig */
   {
      cntxt = MA_HO_CONTROL_AC;
      ver   = (U8)maSwtch;
      *maVer   = LMA_VER_ALL;
      *oprClass = MA_OPRCLASS4;
      break;
   }
   case MA_RESCALLHANDL:     /* MaResCallHandl */
   {
      cntxt = MA_CALL_CNTRL_TRANS_AC;
      ver   = (U8)maSwtch;
      *maVer   = LMA_VER2P;
      *oprClass = MA_OPRCLASS1;
      break;
   }
   case MA_SND_GRPCALLENDSIG: /* MaSndGrpCallEndSig */
   {
      cntxt = MA_GRP_CALL_CNTRL_AC;
      ver   = (U8)maSwtch;
      *maVer   = LMA_VER2P;
      *oprClass = MA_OPRCLASS3;
      break;
   }
   case MA_PREP_GRPCALL:     /* MaPrepGrpCall */
   {
      cntxt = MA_GRP_CALL_CNTRL_AC;
      ver   = (U8)maSwtch;
      *maVer   = LMA_VER2P;
      *oprClass = MA_OPRCLASS1;
      break;
   }
   case MA_PRO_GRPCALLSIG:   /* MaProGrpCallSig */
   case MA_FWD_GRPCALLSIG:   /* MaFwdGrpCallSig */
   {
      cntxt = MA_GRP_CALL_CNTRL_AC;
      ver   = (U8)maSwtch;
      *maVer   = LMA_VER2P;
      *oprClass = MA_OPRCLASS4;
      break;
   }
   case MA_PROV_SIWFS_NMB:   /* MaProvSiwfsNmb */
   case MA_SIWFS_SIGMOD:     /* MaSiwfsSigMod */
   {
      cntxt = MA_SIWFS_ALLOC_AC;
      ver   = (U8)maSwtch;
      *maVer   = LMA_VER2P;
      *oprClass = MA_OPRCLASS1;
      break;
   }
#endif

#if (MAP_MSC || MAP_VLR || MAP_HLR || MAP_GSN)
   case MA_SMRDY:            /* MaRdySM */
   {
      cntxt = MA_MWD_MNGMT_AC;
      ver   = (U8)maSwtch;
      *maVer   = LMA_VER2AND2P;
      *oprClass = MA_OPRCLASS1;
      break;
   }
   case MA_PROVROAMNMB:      /* MaRoamNmb  */
   {
      cntxt = MA_ROAM_NMB_ENQUIRY_AC;
      ver   = (U8)maSwtch;
      *maVer   = LMA_VER_ALL;
      *oprClass = MA_OPRCLASS1;
      break;
   }
#if 0   
/* added by Bruce for smart call in 12/2/2004 begin 3G00007112*/
   case MA_PRVROAMNMB_FORWYCF:      /* MaRoamNmb  */
   {
      cntxt = MA_ROAM_NMB_ENQUIRY_AC;
      ver   = (U8)maSwtch;
      *maVer   = LMA_VER_ALL;
      *oprClass = MA_OPRCLASS1;
      break;
   }
/* added by Bruce for smart call in 12/2/2004 end 3G00007112*/
#endif
   
#endif /* MAP_MSC || MAP_VLR || MAP_HLR || MAP_GSN */

#if (MAP_MSC || MAP_VLR || MAP_HLR)  /* D Interface */
   case MA_REGSS:            /* MaRegSS */
   case MA_ERASESS:          /* MaEraseSS */
   case MA_ACTVSS:           /* MaActvSS */
   case MA_DACTVSS:          /* MaDactvSS */
   case MA_INTERSS:          /* MaInterSS */
   case MA_REGPASSWD:        /* MaRegPasswd */
   case MA_GETPASSWD:        /* MaGetPasswd */
   {
      cntxt = MA_NETFUNC_SS_AC;
      ver   = (U8)maSwtch;
      *maVer   = LMA_VER_ALL;
      *oprClass = MA_OPRCLASS1;
      break;
   }
   case MA_PROCUSSREQ:       /* MaProcUSSReq */
   case MA_USSREQ:           /* MaUSSReq */
   case MA_USSNOTIFY:        /* MaUSSNotify */
   {
      cntxt = MA_NETWORK_USS_AC;
      ver   = (U8)maSwtch;
      *maVer   = LMA_VER2AND2P;
      *oprClass = MA_OPRCLASS1;
      break;
   }
   case MA_PROCUSSDATA:      /* MaProcUSSDat */
   {
      cntxt = MA_NETFUNC_SS_AC;
      ver   = (U8)maSwtch;
      *maVer   = LMA_VER_ALL;
      *oprClass = MA_OPRCLASS1;
      break;
   }
#endif /* MAP_MSC || MAP_VLR || MAP_HLR */

#if ( MAP_VLR || MAP_HLR)  /* D Interface */
   case MA_UPLOC:            /* MaUpLoc */
   {
      cntxt = MA_NETWORK_LOCUP_AC;
      ver   = (U8)maSwtch;
      *maVer   = LMA_VER_ALL;
      *oprClass = MA_OPRCLASS1;
      break;
   }
#endif

#if ( MAP_VLR || MAP_HLR)  /* D Interface */
   case MA_SNDPARAM:         /* MaSndParam */
   {
      cntxt = MA_NETFUNC_SS_AC;
      ver   = (U8)maSwtch;
      *maVer   = LMA_VER_ALL;
      *oprClass = MA_OPRCLASS1;
      break;
   }
   case MA_RESTOREDATA:      /* MaRestDat */
   {
      cntxt = MA_NETWORK_LOCUP_AC;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -