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

📄 ma_acc3.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 for support routines to fill various 
               events at the interface for acceptance testing.
               This is the version used for the MAP software
               test sample.
 
     File:     ma_acc3.c
  
     Sid:      ma_acc3.c@@/main/9 - Fri Sep 16 02:35:31 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 */
#ifdef MA_FTHA
#include "sht.h"
#endif /* MA_FTHA */
#include "lma.h"           /* layer management interface */
#include "ma_acc.h"        /* acceptance test defines */
#include "ma.h"
#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
 
 
/* 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"
#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

/* local defines */
#define MA_ACC_SPARE1  0   /* spare value for initialization purposes only */ 
 
/* Global Variable */
 
EXTERN MaAccCb   maAccCb;   /* MAP Acceptance Test control block */
EXTERN MaAllSSEv maInvoke;  /* Global Invoke Structure */
EXTERN MaAllSSEv maRetRslt; /* Global Return Result  Structure */
EXTERN MaUsrErr  maUsrErr;  /* Global Return Result  Structure */
EXTERN U8        maAccMaFillExtCont;  /* Fill ExtCont selector */

/* profiles for SCCP addresses for the acceptance testing */
SpAddr maAccAddrs[MA_ACC_MAX_ADDR] = 
{
   {  /* first address */
#ifdef CMSS7_SPHDROPT
      0,                             /* SCCP header filling options */
#endif
      TRUE,                          /* present */
      SW_ANSI,                       /* switch type */
      TRUE,                          /* sub-service fmald present */
      INAT_IND,                      /* international network */
      TRUE,                          /* international indication */
      RTE_GT ,                       /* route based on SSN */
      TRUE,                          /* point code present */
      TRUE,                          /* SSN present */
      SS_MAP,                       /* sub-system number */
      0xA5A5A5,                      /* point code */
      {
         GTFRMT_2,                   /* Global title is not present */
         {
            {0x09,},                 /* translation type */
         },
         {
            4,                       /* GT address information */
            {0x59, 0xf3, 0x60, 0x00} /* self PLMN-ID */
         },
      },
   },
   {  /* second address */
#ifdef CMSS7_SPHDROPT
      0,                             /* SCCP header filling options */
#endif
      TRUE,                          /* present */
      SW_ANSI,                       /* switch type */
      TRUE,                          /* sub-service fmald present */
      INAT_IND,                      /* international network */
      TRUE,                          /* international indication */
      RTE_GT,                        /* route based on SSN */
      TRUE,                          /* point code present */
      TRUE,                          /* SSN present */
      SS_MAP,                        /* sub-system number */
      0x5A5A5A,                      /* point code */
      {
         GTFRMT_2,                   /* Global title is not present */
         {
            {0x09,},                 /* translation type */
         },
         {
            4,                       /* GT address information */
            {0x60, 0x53, 0x61, 0x00} /* dest PLMN-ID */
         },
      },
   },
};


SpAddr maAccAddrs1[MA_ACC_MAX_ADDR] = 
{
   {  /* first address */
#ifdef CMSS7_SPHDROPT
      0,                             /* SCCP header filling options */
#endif
      TRUE,                          /* present */
      SW_ANSI,                       /* switch type */
      TRUE,                          /* sub-service fmald present */
      INAT_IND,                      /* international network */
      TRUE,                          /* international indication */
      RTE_GT ,                       /* route based on SSN */
      TRUE,                          /* point code present */
      TRUE,                          /* SSN present */
      SS_MAP,                       /* sub-system number */
      0xA5A5A5,                      /* point code */
      {
         GTFRMT_2,                   /* Global title is not present */
         {
            {0x09,},                 /* translation type */
         },
         {
            4,                       /* GT address information */
            {0x59, 0xf3, 0x60, 0x00} /* self PLMN-ID */
         },
      },
   },
   {  /* second address */
#ifdef CMSS7_SPHDROPT
      0,                             /* SCCP header filling options */
#endif
      TRUE,                          /* present */
      SW_ANSI,                       /* switch type */
      TRUE,                          /* sub-service fmald present */
      INAT_IND,                      /* international network */
      TRUE,                          /* international indication */
      RTE_GT,                        /* route based on SSN */
      TRUE,                          /* point code present */
      TRUE,                          /* SSN present */
      SS_MAP,                        /* sub-system number */
      0x5A5A5A,                      /* point code */
      {
         GTFRMT_2,                   /* Global title is not present */
         {
            {0x09,},                 /* translation type */
         },
         {
            4,                       /* GT address information */
            {0x06, 0x53, 0x61, 0x00} /* dest PLMN-ID */
         },
      },
   },
};


MaApConName maAccACNs[6] = /* one Sample Acn  */
{
   {
      TRUE,
      8,
      MA_ACC_SPARE1,
#ifdef ALIGN_64BIT
      MA_ACC_SPARE1,
      {0, 4, 0, 0, 1, 0, MA_GPRS_UPLOC_AC, LMA_VER2P,
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#else
      {0, 4, 0, 0, 1, 0, MA_GPRS_UPLOC_AC, LMA_VER2P,
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#endif
   },
   {
      TRUE,
      8,
      MA_ACC_SPARE1,
#ifdef ALIGN_64BIT
      MA_ACC_SPARE1,
      {0, 4, 0, 0, 1, 0, MA_NETWORK_LOCUP_AC, LMA_VER2P,
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#else
      {0, 4, 0, 0, 1, 0, MA_NETWORK_LOCUP_AC, LMA_VER2P,
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#endif
   },
   {
      TRUE,
      8,
      MA_ACC_SPARE1,
#ifdef ALIGN_64BIT
      MA_ACC_SPARE1,
      {0, 4, 0, 0, 1, 0, MA_INFO_RET_AC, LMA_VER2P,
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#else
      {0, 4, 0, 0, 1, 0, MA_INFO_RET_AC, LMA_VER2P,
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#endif
   },
   {
      TRUE,
      8,
      MA_ACC_SPARE1,
#ifdef ALIGN_64BIT
      MA_ACC_SPARE1,
      {0, 4, 0, 0, 1, 0, MA_RESET_AC, LMA_VER2,
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#else
      {0, 4, 0, 0, 1, 0, MA_RESET_AC, LMA_VER2,
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#endif
   },
   {
      TRUE,
      8,
      MA_ACC_SPARE1,
#ifdef ALIGN_64BIT
      MA_ACC_SPARE1,
      {0, 4, 0, 0, 1, 0, MA_HO_CONTROL_AC, LMA_VER2,
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#else
      {0, 4, 0, 0, 1, 0, MA_HO_CONTROL_AC, LMA_VER2,
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#endif
   },
   {
      TRUE,
      8,
      MA_ACC_SPARE1,
#ifdef ALIGN_64BIT
      MA_ACC_SPARE1,
      {0, 4, 0, 0, 1, 0, MA_NETFUNC_SS_AC, LMA_VER2,
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#else
      {0, 4, 0, 0, 1, 0, MA_NETFUNC_SS_AC, LMA_VER2,
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#endif
   }
};

/*
*
*       Fun:   maBldStr
*
*       Desc:  This function  builds the string
*
*       Ret:   ROK
*
*       Notes: None
*
*       File:  ma_acc3.c
*
*/
 
#ifdef ANSI
PUBLIC S16 maBldStr
(
TknStrS  *tknStr,
S8       *string
)
#else
PUBLIC S16 maBldStr (tknStr, string)
TknStrS  *tknStr;
S8       *string;
#endif
{
  U8 count;
 
  TRC2(maBldStr)
  if (*string == '\0')
  {
     tknStr->len = 0;
     RETVALUE(ROK);;
  }
  for(count=0;*string && count < (U8)(MF_SIZE_TKNSTRS +3);string++)
      tknStr->val[count++] = (U8)(*string);
  tknStr->len = (U8)(count);
  RETVALUE(ROK);
} /* maBldStr  */


/*
*
*       Fun:        maAccOpenDlg
*
*       Desc:       This is a common routine to open a dialogue for all
*                   invokes.
*            
*       Ret:        Void.
*              
*       Notes:      None.
*
*       File:       ma_acc3.c
*
*/
#ifdef ANSI
PUBLIC Void maAccOpenDlg

⌨️ 快捷键说明

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