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

📄 ma_acc1.c

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

                         (c) COPYRIGHT 1989-2005 by 
                         Continuous Computing Corporation.
                         All rights reserved.

     This software is confidential and proprietary to Continuous Computing 
     Corporation (CCPU).  No part of this software may be reproduced,
     stored, transmitted, disclosed or used in any form or by any means
     other than as expressly provided by the written Software License 
     Agreement between CCPU and its licensee.

     CCPU warrants that for a period, as provided by the written
     Software License Agreement between CCPU and its licensee, this
     software will perform substantially to CCPU specifications as
     published at the time of shipment, exclusive of any updates or 
     upgrades, and the media used for delivery of this software will be 
     free from defects in materials and workmanship.  CCPU also warrants 
     that has the corporate authority to enter into and perform under the   
     Software License Agreement and it is the copyright owner of the software 
     as originally delivered to its licensee.

     CCPU MAKES NO OTHER WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
     WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY OR FITNESS FOR
     A PARTICULAR PURPOSE WITH REGARD TO THIS SOFTWARE, SERVICE OR ANY RELATED
     MATERIALS.

     IN NO EVENT SHALL CCPU BE LIABLE FOR ANY INDIRECT, SPECIAL,
     CONSEQUENTIAL DAMAGES, OR PUNITIVE DAMAGES IN CONNECTION WITH OR ARISING
     OUT OF THE USE OF, OR INABILITY TO USE, THIS SOFTWARE, WHETHER BASED
     ON BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE), PRODUCT
     LIABILITY, OR OTHERWISE, AND WHETHER OR NOT IT HAS BEEN ADVISED
     OF THE POSSIBILITY OF SUCH DAMAGE.

                       Restricted Rights Legend

     This software and all related materials licensed hereby are
     classified as "restricted computer software" as defined in clause
     52.227-19 of the Federal Acquisition Regulation ("FAR") and were
     developed entirely at private expense for nongovernmental purposes,
     are commercial in nature and have been regularly used for
     nongovernmental purposes, and, to the extent not published and
     copyrighted, are trade secrets and confidential and are provided
     with all rights reserved under the copyright laws of the United
     States.  The government's rights to the software and related
     materials are limited and restricted as provided in clause
     52.227-19 of the FAR.

                    IMPORTANT LIMITATION(S) ON USE

     The use of this software is limited to the use set
     forth in the written Software License Agreement between CCPU and
     its Licensee. Among other things, the use of this software
     may be limited to a particular type of Designated Equipment, as 
     defined in such Software License Agreement.
     Before any installation, use or transfer of this software, please
     consult the written Software License Agreement or contact CCPU at
     the location set forth below in order to confirm that you are
     engaging in a permissible use of the software.

                    Continuous Computing Corporation
                    9380, Carroll Park Drive
                    San Diego, CA-92121, USA

                    Tel: +1 (858) 882 8800
                    Fax: +1 (858) 777 3388

                    Email: support@trillium.com
                    Web: http://www.ccpu.com

*********************************************************************17*/

/********************************************************************20**
  
     Name:     MAP - Acceptance Test
 
     Type:     C source file
  
     Desc:     C source code used to initialize, run and test the
               MAP software in a TRILLIUM development environment.
               This is the version used for the MAP software
               test sample.

     File:     ma_acc1.c
  
     Sid:      ma_acc1.c@@/main/8 - Fri Sep 16 02:34:59 2005
   
     Prg:      ssk
  
*********************************************************************21*/
  
  
/* header include files (.h) */
#include "envopt.h"        /* environment options */
#include "envdep.h"        /* environment dependent */
#include "envind.h"        /* environment independent */
#include "gen.h"           /* general layer */
#include "ssi.h"           /* system services */
#include "cm5.h"
#include "cm_ss7.h"
#include "cm_err.h"        /* common error */
#include "stu.h"           /* tcap upper interface */
#include "mat.h"           /* inap upper interface */
#include "lma.h"           /* layer management interface */
#ifdef MA_FTHA
#include "sht.h"           /* SHT interface */
#endif /* MA_FTHA */
#include "ma_acc.h"        /* acceptance test defines */
#include "ma.h"
#include "ma_err.h"        /* error defines */
#include "ma_mf.h"
#ifdef ZJ
#include "cm_ftha.h"       /* Common FTHA */
#include "cm_pftha.h"      /* Common PSF defines */
#include "cm_psfft.h"
#include "cm_tupsf.h"      /* Common TCAP user PSF */
#include "zj_acc.h"        /* PSF Acceptance Test */
#include "lzj.h"
#endif

#ifdef STMA 
#include "spt.h"           /* sccp layer */
#include "lst.h"           /* layer management, TCAP */
#include "st.h"            /* tcap */
#include "st_err.h"        /* tcap error */
#include "st_mf.h"         /* message function defines */
#include "st_acc.h"        /* tcap acceptance */
#endif /* STMA */

 

/* header/extern include files (.x) */

#include "gen.x"           /* general layer */
#include "ssi.x"           /* system services */
#include "cm5.x"
#include "cm_ss7.x"        /* Common */
#include "cm_lib.x"        /* Common library headers */
#include "stu.x"           /* tcap upper interface */
#include "lma.x"           /* layer management interface */
#include "mat.x"           /* inap upper interface */
#ifdef MA_FTHA
#include "sht.x"           /* SHT interface */
#endif /* MA_FTHA */
#ifdef ZJ
#include "cm_ftha.x"       /* Common FTHA */
#include "cm_pftha.x"      /* Common PSF defines */
#include "cm_psfft.x"
#include "cm_tupsf.x"      /* Common TCAP user PSF */
#endif
#include "ma.x"
#include "ma_acc.x"        /* acceptance test defines */
#ifdef ZJ
#include "lzj.x"
#include "zj.x"
#include "zj_acc.x"
#endif

#ifdef STMA 
#include "lst.x"           /* Layer management, TCAP */
#include "spt.x"           /* Sccp layer             */
#include "st_mf.x"         /* message function       */
#include "st_acc.x" 
#endif /* STMA */


/* ma002.203 : Addition. Addnl support to aid in internal testing */
#ifdef SS_MULTIPLE_PROCS
EXTERN   U16 maNumCallsToInit;
#endif
/* Global Variable */

PUBLIC MaAccCb     maAccCb;   /* MAP Acceptance Test control block */
PUBLIC MaAllSSEv   maInvoke;  /* Global Invoke Structure */
PUBLIC MaAllSSEv   maRetRslt; /* Global Return Result  Structure */
PUBLIC MaUsrErr    maUsrErr;  /* Global user error structure */
PUBLIC U8          maAccOprCode; /* Sample Operation code       */
PUBLIC Bool        maAccMandExit;  /* Fill Mandatory fields       */
PUBLIC Bool        maAccOptExit;   /* Fill optional fields        */
PUBLIC Bool        maAccException; /* Fill Exceptions             */
PUBLIC U8          maAccMaUiSel;   /* upper layer selector from map */
PUBLIC U8          maAccAuUiSel;   /* upper layer selector from map */
PUBLIC U8          maAccMaLiSel;   /* upper layer selector from map */
PUBLIC U8          maAccStLiSel;   /* upper layer selector from map */
PUBLIC U8          maAccMaMiSel;   /* upper layer selector from map */
PUBLIC U8          maAccSmMiSel;   /* upper layer selector from map */
#ifdef MA_RUG
PUBLIC CmIntfVer   maAccLMIntfVer = LMAIFVER; /* LM interface version */
PUBLIC CmIntfVer   maAccUIntfVer  = MATIFVER; /* Upper interface version */
PUBLIC CmIntfVer   maAccLIntfVer  = STUIFVER; /* Lower interface version */
PUBLIC Bool        maAccRemIntf   = TRUE;     /* Remote interface version */
#endif /* MA_RUG */
#ifdef ZJ
PUBLIC U8          maAccMaZjMiSel;   /* layer manager selector from PSF map */
PUBLIC U8          maAccSmZjMiSel;   /* layer manager selector from PSF map */
#endif
PUBLIC U8          maAccMaFillExtCont = 0;    /* fill extCont selector   */
PUBLIC U16         maAccTestCaseNmb = 0;
#if (MAP_SEC && LMAV2)
PUBLIC U16         maAccNmbPlanCase = 0;
#endif

#if (MATV2 || STUV2)
PUBLIC TknU8       impBgn;         /* Importance */
PUBLIC TknU8       impCont;        /* Importance */
PUBLIC TknU8       impEnd;         /* Importance */
PUBLIC TknU8       impAbrt;        /* Importance */
#endif

#ifdef MATV3
PUBLIC TknU8       maPriorBgn;         /* Importance */
PUBLIC TknU8       maPriorCont;        /* Importance */
PUBLIC TknU8       maPriorEnd;         /* Importance */
PUBLIC TknU8       maPriorAbrt;        /* Importance */
PUBLIC TknU8       pClassBgn;         /* protocol class */
PUBLIC TknU8       pClassCont;        /* protocol class */
PUBLIC TknU8       pClassEnd;         /* protocol class */
PUBLIC TknU8       pClassAbrt;        /* protocol class */
#endif

EXTERN SpAddr    maAccAddrs[];
EXTERN MaApConName    maAccACNs[];

/* Acceptance Test LM message receive queue */
PUBLIC  Queue    *maAccLmRxQ = &maAccCb.lmRxQ;

/* Forward declarations */
#ifdef MA_ACC_CMD_LINE
PRIVATE  U32   maAtoi ARGS((S8 *inp));
#endif /* MA_ACC_CMD_LINE */

#ifdef MA_ACC_CMD_LINE
PRIVATE  Void  maAccParseCmdLine ARGS((Void));
PRIVATE  Void  maAccUsage ARGS((Void));
#endif
PUBLIC   S16   maInitAccCb       ARGS((Void));

#ifdef SS_MULTIPLE_PROCS
EXTERN  S16   maPermTskInit     ARGS((ProcId procId,
                                   Ent     ent,
                                   Inst    inst,
                                   Region  region,
                                   Reason  reason,
                                   void **xxCb));
#else
EXTERN  S16   maPermTskInit     ARGS((Ent     ent,
                                   Inst    inst,
                                   Region  region,
                                   Reason  reason));
#endif

PUBLIC   S16   maDispBanner      ARGS((Void));

PUBLIC   S16   maDispTstInfo     ARGS((U16              tstId));

PUBLIC   S16   maAccCfgMaTst     ARGS((Void));

#ifdef STMA
PUBLIC  S16 stmaAccGenCfg ARGS(( U8      sel,
                                 U32     loDlgId,
                                 U32     hiDlgId,
                                 Bool    bitMapFlag,
                                 TranId  transId
                              ));

PUBLIC  S16 stmaAccTUSapCfg ARGS(( U8      sel,
                                   SuId    suId, 
                                   Swtch   swtch,
                                   U32     loDlgId,
                                   U32     hiDlgId,  
                                   TranId  transId ));
EXTERN StAccCb stAccCb; 
#endif /* STMA */

#ifdef XWEXT
EXTERN S16 maTstEncDec(void);
#endif

/*
*
*       Fun:   maAccChkErr    
*
*       Desc:  This function checks the err.code for a given operation code.  
*
*       Ret:   ROK 
*
*       Notes: None 
*
*       File:  ma_acc1.c
*
*/
  
#ifdef ANSI
PUBLIC S16 maAccChkErr 
(
U8    oprCode,          /* Operation Code */
U8    errCode,          /* Error Code */
U8    maVer         /* Map Version */
)
#else
PUBLIC S16 maAccChkErr (oprCode, errCode, maVer)
U8    oprCode;          /* Operation Code */
U8    errCode;          /* Error Code */
U8    maVer;            /* Map Version */
#endif
{

  TRC3(maAccChkErr)
  switch (oprCode)
  {
#if (MAP_MSC || MAP_VLR || MAP_HLR)
   case MAT_REGSS:
     switch(errCode)
     {
        default:
          RETVALUE(STU_UNREC_ERROR);
        case MAT_SYS_FAILURE:
        case MAT_DATA_MISSING:
        case MAT_UNX_DATA_VALUE:
        case MAT_BEAR_NOT_PROV:
        case MAT_TELE_NOT_PROV:
        case MAT_ILLEGAL_SS_OPR:
        case MAT_SS_STATUS_ERR:
        case MAT_SS_INCOMP_ERR:
          break;  
        case MAT_UNK_SUBS:
        case MAT_SS_SUBSVIOL_ERR:
          if (maVer !=  LMA_VER1)
          {
             RETVALUE(STU_UNREC_ERROR);
          }
          break;
        case MAT_CALL_BARRED:
          if (maVer == LMA_VER1)
          {
             RETVALUE(STU_UNREC_ERROR);
          }
          break;
     }
     break;

   case MAT_ERASESS:
     switch(errCode)
     {
        default:
          RETVALUE(STU_UNREC_ERROR);
        case MAT_SYS_FAILURE:
        case MAT_UNX_DATA_VALUE:
        case MAT_ILLEGAL_SS_OPR:
        case MAT_SS_STATUS_ERR:
           break; 
        case MAT_SS_INCOMP_ERR:
           if (maVer !=  LMA_VER2)
           {
              RETVALUE(STU_UNREC_ERROR);
           }
           break;  
        case MAT_SS_SUBSVIOL_ERR:
        case MAT_UNK_SUBS:
          if (maVer != LMA_VER1)
          {
            RETVALUE(STU_UNREC_ERROR);
          }
          break;
        case MAT_BEAR_NOT_PROV:
        case MAT_TELE_NOT_PROV:
        case MAT_DATA_MISSING:
        case MAT_CALL_BARRED:
          if (maVer == LMA_VER1)
          {
            RETVALUE(STU_UNREC_ERROR);
          }
          break;
     }
     break;
   case MAT_ACTVSS:
     switch(errCode)
     {
        default:
            RETVALUE(STU_UNREC_ERROR);
        case MAT_SYS_FAILURE:
        case MAT_UNX_DATA_VALUE:
        case MAT_ILLEGAL_SS_OPR:
        case MAT_SS_STATUS_ERR:
        case MAT_SS_SUBSVIOL_ERR:
        case MAT_SS_INCOMP_ERR:
        case MAT_NEG_PWCHK:
          break;  
        case MAT_UNK_SUBS:
          if (maVer != LMA_VER1)
          {
            RETVALUE(STU_UNREC_ERROR);
          }
          break;
        case MAT_BEAR_NOT_PROV:
        case MAT_TELE_NOT_PROV:
        case MAT_DATA_MISSING:
        case MAT_CALL_BARRED:
        case MAT_NMB_PW_VIOL:
          if (maVer == LMA_VER1)
          {
            RETVALUE(STU_UNREC_ERROR);
          }
          break;
     }
     break;
   case MAT_DACTVSS:
     switch(errCode)
     {
        default:
            RETVALUE(STU_UNREC_ERROR);
        case MAT_SYS_FAILURE:
        case MAT_UNX_DATA_VALUE:
        case MAT_ILLEGAL_SS_OPR:
        case MAT_SS_STATUS_ERR:
        case MAT_SS_SUBSVIOL_ERR:
        case MAT_NEG_PWCHK:
           break;  
        case MAT_UNK_SUBS:
           if(maVer != LMA_VER1)
           {
              RETVALUE(STU_UNREC_ERROR);
           }
          break;
        case MAT_BEAR_NOT_PROV:
        case MAT_TELE_NOT_PROV:
        case MAT_DATA_MISSING:
        case MAT_CALL_BARRED:
        case MAT_NMB_PW_VIOL:
           if (maVer == LMA_VER1)
           {
              RETVALUE(STU_UNREC_ERROR);
           }
          break;
     }
     break;
   case MAT_INTERSS:
     switch(errCode)
     {
        default:
            RETVALUE(STU_UNREC_ERROR);
        case MAT_SYS_FAILURE:
        case MAT_UNX_DATA_VALUE:
        case MAT_ILLEGAL_SS_OPR:
        case MAT_SS_NOT_AVAIL:
           break;
        case MAT_UNK_SUBS:
           if(maVer != LMA_VER1)
           {
              RETVALUE(STU_UNREC_ERROR);
           }
          break;
        case MAT_BEAR_NOT_PROV:
        case MAT_TELE_NOT_PROV:
        case MAT_DATA_MISSING:
        case MAT_CALL_BARRED:
        case MAT_NMB_PW_VIOL:
           if (maVer == LMA_VER1)
           {
              RETVALUE(STU_UNREC_ERROR);
           }
          break;
     }
     break;
   case MAT_REGPASSWD:
     switch(errCode)
     {
        default:
            RETVALUE(STU_UNREC_ERROR);
        case MAT_SYS_FAILURE:
        case MAT_UNX_DATA_VALUE:
        case MAT_SS_SUBSVIOL_ERR:
        case MAT_PASSWD_REG_ERR:
        case MAT_NEG_PWCHK:
          break;  
        case MAT_DATA_MISSING:
        case MAT_CALL_BARRED:
        case MAT_NMB_PW_VIOL:
          if (maVer == LMA_VER1)
          {
            RETVALUE(STU_UNREC_ERROR);
          }
          break;
     }
     break;
   case MAT_GETPASSWD:
     break;
   case MAT_PROCUSSDATA:
     switch(errCode)
     {
        default:
            RETVALUE(STU_UNREC_ERROR);
        case MAT_SYS_FAILURE:
        case MAT_UNX_DATA_VALUE:
          break;
     }
     break;
   case MAT_PROCUSSREQ:
     switch(errCode)
     {
        default:
            RETVALUE(STU_UNREC_ERROR);
        case MAT_SYS_FAILURE:
        case MAT_UNX_DATA_VALUE:
        case MAT_DATA_MISSING:
        case MAT_CALL_BARRED:
        case MAT_UNK_ALPHABET:
          break;
     }

⌨️ 快捷键说明

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