init ems server code
This commit is contained in:
96
plat/xapp/Makefile
Normal file
96
plat/xapp/Makefile
Normal file
@@ -0,0 +1,96 @@
|
||||
|
||||
##----------------------------------------------------------##
|
||||
## ##
|
||||
## Universal Makefile for module Version : V1.4 ##
|
||||
## ##
|
||||
## Created : Wei Liu 07/04/11 ##
|
||||
## Revision: [Last]Wei Liu 07/06/18 ##
|
||||
## ##
|
||||
##----------------------------------------------------------##
|
||||
|
||||
##---------------------------------------------------------------------##
|
||||
##--------------------------------------
|
||||
##
|
||||
## Project correlation(Customer define)
|
||||
##
|
||||
##--------------------------------------
|
||||
|
||||
## MODULE= [Module Name]
|
||||
## TYPE = app/plat => Module Type
|
||||
|
||||
## DBUG_FLAGS_ADD = [Module Define Gcc Flags for Debug ]
|
||||
## DBUG_FLAGS_ADD = [Module Define Gcc Flags for Release]
|
||||
|
||||
## BUILD = lib/exef => Output file format
|
||||
## CFG = debug/release => Build Configuration
|
||||
|
||||
## SRC_PATH = [Source file path]
|
||||
## INC_PATH = [Include file path]
|
||||
## APP_PATH = [App Module path]
|
||||
## PLT_PATH = [Plat Module path]
|
||||
|
||||
## PLT_LIB = [Needed plat lib for Link] => just for test or wxc2main
|
||||
## APP_LIB = [Needed app lib for Link] => just for test or wxc2main
|
||||
## LIB_ADD = [Needed Extend lib for Link] => just for test or wxc2main
|
||||
|
||||
## PLT_LIB e.g. = haepub fsm mng proto kernel aif mgc mgcp sip rtp \
|
||||
## 8ecp bicc smpp xapp tcap mtp3 m2ua \
|
||||
## snmp iptrans debug sccp public
|
||||
##
|
||||
## APP_LIB e.g. = msc vlr ssf hlr ae pps mnp smsc vms aas
|
||||
## LIB_ADD e.g. = -liba3a8 -lm
|
||||
|
||||
## OBJ_ADD = [Extend third party object files needed]
|
||||
## TEST_OBJ_PATH = [module object files Path for test ] => just for test
|
||||
##---------------------------------------------------------------------##
|
||||
|
||||
|
||||
|
||||
MODULE = xapp
|
||||
TYPE = plat
|
||||
|
||||
DBUG_FLAGS_ADD =
|
||||
RELS_FLAGS_ADD =
|
||||
|
||||
##Default commonly as below
|
||||
|
||||
BUILD = lib
|
||||
CFG = debug
|
||||
|
||||
PLT_LIB =
|
||||
APP_LIB =
|
||||
LIB_ADD =
|
||||
|
||||
SRC_PATH = ./src/capp ./src/mapp ./src
|
||||
INC_PATH = ./src/include
|
||||
PLT_PATH = ../../plat
|
||||
APP_PATH = ../../app
|
||||
|
||||
OBJ_ADD =
|
||||
TEST_OBJ_PATH = ../../obj
|
||||
|
||||
##---------------------------------------------------------------------##
|
||||
##--------------------------------------
|
||||
##
|
||||
## Make configuration(Customer define)
|
||||
##
|
||||
##--------------------------------------
|
||||
|
||||
## CCFLAG_SWITCH = on/off => gcc flag show on/off
|
||||
## COVER_NEED = yes/no => PTF cover report needed
|
||||
## COVER_REPORT_PATH = [path ] => PTF cover report path
|
||||
|
||||
CCFLAG_SWITCH = off
|
||||
COVER_NEED =
|
||||
COVER_REPORT_PATH = ./ut/ut_doc/output
|
||||
MAKE_INCLUDE = $(HOME)/ems.git/include
|
||||
|
||||
##---------------------------------------------------------------------##
|
||||
|
||||
|
||||
##--------------------------------------
|
||||
##
|
||||
## include makefile.rules (Do not change)
|
||||
##
|
||||
##--------------------------------------
|
||||
include $(MAKE_INCLUDE)/Makefile.rules
|
||||
8
plat/xapp/conf/cap_acn.conf
Normal file
8
plat/xapp/conf/cap_acn.conf
Normal file
@@ -0,0 +1,8 @@
|
||||
#application context name configure file for CAP
|
||||
total data length=4
|
||||
|
||||
#application context name data
|
||||
No.1:50 00 // gsmSSF to gsmSCF
|
||||
No.2:51 00 // assist handoff gsmSSF to gsmSCF
|
||||
No.3:52 00 // gsmSRF to gsmSCF
|
||||
No.4:128 00 // gsmSRF to gsmSCF
|
||||
36
plat/xapp/conf/cap_operation.conf
Normal file
36
plat/xapp/conf/cap_operation.conf
Normal file
@@ -0,0 +1,36 @@
|
||||
# operation code configure file for CAP
|
||||
total data length=32
|
||||
|
||||
#operation code
|
||||
No.1:00 04 5 // initial DP
|
||||
No.2:16 02 5 // assist request instructions
|
||||
No.3:17 02 20 // establish temporary connection
|
||||
No.4:18 04 5 // disconnect forward connection
|
||||
No.5:19 04 5 // connect to resource
|
||||
No.6:20 04 5 // connect
|
||||
No.7:22 04 5 // release call
|
||||
No.8:23 04 5 // request report BCSM event
|
||||
No.9:24 04 5 // event report BCSM
|
||||
No.10:31 04 5 // continue
|
||||
No.11:33 04 5 // reset timer
|
||||
No.12:34 04 5 // furnish charging information
|
||||
No.13:35 04 5 // apply charging
|
||||
No.14:36 04 5 // apply charging report
|
||||
No.15:44 04 5 // call information report
|
||||
No.16:45 04 5 // call information request
|
||||
No.17:46 04 5 // send charging information
|
||||
No.18:47 04 60 // play announcement
|
||||
No.19:48 01 60 // prompt and collect user information
|
||||
No.20:49 04 5 // specialized resource report
|
||||
No.21:53 04 5 // cancel
|
||||
No.22:55 01 5 // activity test
|
||||
No.23:60 04 5 // initial DPSMS
|
||||
No.24:61 04 5 // Furnishing charging info.SMS
|
||||
No.25:62 04 5 // connect DPSMS
|
||||
No.26:63 04 5 // request SMS event
|
||||
No.27:64 04 5 // event report SMS
|
||||
No.28:65 04 5 // continue SMS
|
||||
No.29:66 04 5 // release DPSMS
|
||||
No.30:67 04 5 // reset timer DPSMS
|
||||
No.31:176 04 5 // VPS to PPS
|
||||
No.32:177 04 5 // PPS to VPS
|
||||
42
plat/xapp/conf/map_acn.conf
Normal file
42
plat/xapp/conf/map_acn.conf
Normal file
@@ -0,0 +1,42 @@
|
||||
#application context name configure file
|
||||
total data length=36
|
||||
|
||||
#application context name data
|
||||
No.1:01 03 // network location update
|
||||
No.2:02 03 // location cancel
|
||||
No.3:03 03 // roaming number enquiry
|
||||
No.4:05 03 // location info retrieval
|
||||
No.5:10 02 // reset context
|
||||
No.6:11 02 // handover control
|
||||
No.7:13 02 // equipment management
|
||||
No.8:14 02 // info retrieval
|
||||
No.9:15 02 // inter VLR info retrieval
|
||||
No.10:16 01 // subscriber data management
|
||||
No.11:17 03 // tracing
|
||||
No.12:18 02 // network functional SS
|
||||
No.13:19 02 // network unstructured SS
|
||||
No.14:20 03 // short message gateway
|
||||
No.15:21 03 // short message MO relay
|
||||
No.16:23 02 // short message alert
|
||||
No.17:24 03 // short message waiting data management
|
||||
No.18:25 03 // mobile terminating short message relay
|
||||
No.19:26 02 // imsi retrieval
|
||||
No.20:27 03 // MS purging
|
||||
No.21:28 03 // subscriber info enquiry
|
||||
No.22:29 03 // any time info enquiry
|
||||
No.23:06 03 // call control transfer
|
||||
No.24:36 03 // invocation notification
|
||||
No.25:12 03 // sIWFS allocation
|
||||
No.26:31 03 // group call control
|
||||
No.27:32 03 // GPRS location update
|
||||
No.28:33 03 // GPRS location info retrieval
|
||||
No.29:34 03 // failure report
|
||||
No.30:35 03 // GPRS notify
|
||||
No.31:07 03 // reporting
|
||||
No.32:08 03 // call completion
|
||||
No.33:200 02 // security triplets (MAP-H defined by Meng Xiaozhen)
|
||||
No.34:201 02 // subscriber interrogate (MAP-H defined by Meng Xiaozhen)
|
||||
No.35:202 02 // HLR subscriber management (MAP-H defined by Meng Xiaozhen)
|
||||
No.36:203 02 // HLR ping AUC (MAP-H defined by Meng Xiaozhen reserved)
|
||||
NO.37:09 01 // Send parameter
|
||||
|
||||
76
plat/xapp/conf/map_operation.conf
Normal file
76
plat/xapp/conf/map_operation.conf
Normal file
@@ -0,0 +1,76 @@
|
||||
# operation code configure file
|
||||
total data length=72
|
||||
|
||||
#operation code
|
||||
No.1:02 01 20 // update location
|
||||
No.2:03 01 10 // cancel location
|
||||
No.3:67 01 20 // purge mobile station
|
||||
No.4:55 01 05 // send identification
|
||||
No.5:68 01 20 // prepare handover
|
||||
No.6:29 03 108000 // send end signal
|
||||
No.7:33 04 05 // process access signalling
|
||||
No.8:34 04 05 // forward access signalling
|
||||
No.9:69 01 20 // prepare subsequent handover
|
||||
No.10:56 01 20 // send authentication info
|
||||
No.11:43 01 20 // check IMEI
|
||||
No.12:07 01 20 // insert subscriber data
|
||||
No.13:08 01 20 // delete subscriber data
|
||||
No.14:37 04 20 // reset
|
||||
No.15:38 04 20 // forward check ss indication
|
||||
No.16:57 01 20 // restore data
|
||||
No.17:50 01 20 // active trace mode
|
||||
No.18:51 01 20 // deactive trace mode
|
||||
No.19:58 01 20 // send imsi
|
||||
No.20:22 01 20 // send routing info
|
||||
No.21:04 01 20 // provide roaming number
|
||||
No.22:06 01 20 // resume call handling
|
||||
No.23:31 01 20 // provide SIWFS number
|
||||
No.24:32 01 20 // SIWFS signalling modify
|
||||
No.25:73 01 20 // set report state
|
||||
No.26:74 01 20 // status report
|
||||
No.27:75 01 60 // remote user free
|
||||
No.28:10 01 20 // register ss
|
||||
No.29:11 01 20 // erase ss
|
||||
No.30:12 01 20 // activate ss
|
||||
No.31:13 01 20 // deactivate ss
|
||||
No.32:14 01 20 // interrogate ss
|
||||
No.33:59 01 600 // process unstructure ss request
|
||||
No.34:60 01 60 // unstructure ss request
|
||||
No.35:61 01 60 // unstructure ss notify
|
||||
No.36:17 01 60 // register password
|
||||
No.37:18 03 20 // get password
|
||||
No.38:76 01 20 // register cc entry
|
||||
No.39:77 01 20 // erase cc entry
|
||||
No.40:45 01 20 // send routing info for sm
|
||||
No.41:46 01 60 // mo forward sm
|
||||
No.42:44 01 60 // mt forward sm
|
||||
No.43:47 01 05 // report sm delivery status
|
||||
No.44:63 04 05 // inform service centre
|
||||
No.45:64 01 05 // alert service center
|
||||
No.46:66 01 05 // ready for sm
|
||||
No.47:70 01 20 // provider subscriber info
|
||||
No.48:71 01 20 // any time interrogation
|
||||
No.49:72 01 20 // ss invocatin notification
|
||||
No.50:39 01 20 // prepare group call
|
||||
No.51:40 03 108000 // send group call end signal
|
||||
No.52:41 04 05 // process group call signalling
|
||||
No.53:42 04 05 // forward group call signalling
|
||||
No.54:23 01 20 // update GPRS location
|
||||
No.55:24 01 20 // send routing info for GPRS
|
||||
No.56:25 01 20 // failure report
|
||||
No.57:26 01 20 // note ms present for GPRS
|
||||
No.58:200 01 05 // security triplets (MAP-H defined by Meng Xiaozhen)
|
||||
No.59:201 01 05 // interrogate subscriber (MAP-H defined by Meng Xiaozhen)
|
||||
No.60:202 01 05 // hlr create subscriber (MAP-H defined by Meng Xiaozhen)
|
||||
No.61:203 01 05 // hlr delete subscriber (MAP-H defined by Meng Xiaozhen)
|
||||
No.62:204 01 05 // hlr ping auc (MAP-H defined by Meng Xiaozhen reserved)
|
||||
No.63:09 01 20 // send parameters
|
||||
No.64:48 01 20 // not subscriber present
|
||||
No.65:19 01 20 // process unstructure SS data
|
||||
No.66:54 01 20 // beging subscriber activity
|
||||
No.67:28 01 20 // perform handover
|
||||
No.68:30 01 20 // perform subsequence handvoer
|
||||
No.69:35 01 20 // note internal handover
|
||||
No.70:54 01 20 // beging subscriber activity
|
||||
No.71:49 01 20 // alert service center without result
|
||||
No.72:52 01 20 // trace subscriber activity
|
||||
39
plat/xapp/src/capp/cap_coding.h
Normal file
39
plat/xapp/src/capp/cap_coding.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/* CAP message coding/decoding head file */
|
||||
/* Written by Liu Zhiguo 2003-08-26 */
|
||||
/* Version 1.0 */
|
||||
/* ------------------------------------- */
|
||||
|
||||
#ifndef _CAP_CODING
|
||||
#define _CAP_CODING
|
||||
|
||||
#ifndef _SRF_RELEVANT
|
||||
#define _SRF_RELEVANT
|
||||
#endif
|
||||
|
||||
int encSubscriberState(u_char sel, char *tagprefix, CapSubscriberState arg, ASN_BUF * asnbuf);
|
||||
int decSubscriberState(char *tagprefix, CapSubscriberState * parg, ASN_BUF * asnbuf);
|
||||
int encExt_BasicServiceCode(u_char sel, char *tagprefix, CapExt_BasicServiceCode arg, ASN_BUF * asnbuf);
|
||||
int decExt_BasicServiceCode(char *tagprefix, CapExt_BasicServiceCode * parg, ASN_BUF * asnbuf);
|
||||
int encLocationInformation(char *tagprefix, CapLocationInformation arg, ASN_BUF * asnbuf);
|
||||
int decLocationInformation(char *tagprefix, CapLocationInformation * parg, ASN_BUF * asnbuf);
|
||||
int encACBCC(struct CapACBCC arg, char *msgbuf, int maxlen);
|
||||
int decACBCC(char *msgbuf, int msglen, CapACBCC * parg);
|
||||
int encLegID(u_char sel, char *tagprefix, CapLegID arg, ASN_BUF * asnbuf);
|
||||
int decLegID(char *tagprefix, CapLegID * parg, ASN_BUF * asnbuf);
|
||||
int encESIBCSM(char *tagprefix, CapESIBCSM arg, ASN_BUF * asnbuf);
|
||||
int decESIBCSM(char *tagprefix, CapESIBCSM * parg, ASN_BUF * asnbuf);
|
||||
int encLocationInformationGPRS(char *tagprefix, CapLocationInformationGPRS arg, ASN_BUF * asnbuf);
|
||||
int decLocationInformationGPRS(char *tagprefix, CapLocationInformationGPRS * parg, ASN_BUF * asnbuf);
|
||||
int encESISMS(char *tagprefix, CapESISMS arg, ASN_BUF * asnbuf);
|
||||
int decESISMS(char *tagprefix, CapESISMS * parg, ASN_BUF * asnbuf);
|
||||
|
||||
#ifdef _SRF_RELEVANT
|
||||
int encServiceInteractionIndicatorsTwo(char *tagprefix, CapServiceInteractionIndicatorsTwo arg, ASN_BUF * asnbuf);
|
||||
int decServiceInteractionIndicatorsTwo(char *tagprefix, CapServiceInteractionIndicatorsTwo * parg, ASN_BUF * asnbuf);
|
||||
int encInformationToSend(char *tagprefix, CapInformationToSend arg, ASN_BUF * asnbuf);
|
||||
int decInformationToSend(char *tagprefix, CapInformationToSend * parg, ASN_BUF * asnbuf);
|
||||
int encCollectedInfo(char *tagprefix, CapCollectedInfo arg, ASN_BUF * asnbuf);
|
||||
int decCollectedInfo(char *tagprefix, CapCollectedInfo * parg, ASN_BUF * asnbuf);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
151
plat/xapp/src/capp/cap_head.h
Normal file
151
plat/xapp/src/capp/cap_head.h
Normal file
@@ -0,0 +1,151 @@
|
||||
#ifndef _CAP_HEAD
|
||||
#define _CAP_HEAD
|
||||
|
||||
#ifndef _SRF_RELEVANT
|
||||
#define _SRF_RELEVANT
|
||||
#endif
|
||||
|
||||
#define CAP_FLAG 0x8a
|
||||
|
||||
#ifndef MAX_ACN_LEN
|
||||
#define MAX_ACN_LEN TCAP_ACN_LEN
|
||||
#endif
|
||||
|
||||
#define TV_SSF 100
|
||||
#define TV_Wait_Open TV_SSF//1s
|
||||
#define TV_Wait_Continue (TV_SSF * 5)//5s
|
||||
#define TV_Wait_Request (TV_SSF * 10)//10s
|
||||
#define TV_Non_User_Interaction (TV_SSF * 30)//30s
|
||||
#define TV_Reset TV_SSF
|
||||
#define TV_Interaction (TV_SSF * 10)//10s
|
||||
#define TV_TCE 12*(TV_SSF*10)
|
||||
#define TV_Pending (TV_SSF * 1/2)
|
||||
|
||||
#define ONE_SECOND_TICKS TV_SSF
|
||||
#define WTRESPONSE_TIMER (10*ONE_SECOND_TICKS) // 10s
|
||||
#define WTSSF_TIMER (11*ONE_SECOND_TICKS) // 11s
|
||||
|
||||
#define minAChBillingChargingLength 5
|
||||
#define maxAChBillingChargingLength 177
|
||||
#define minAttributesLength 2
|
||||
#define maxAttributesLength 10
|
||||
#define maxBearerCapabilityLength 11
|
||||
#define minCallResultLength 12
|
||||
#define maxCallResultLength 24
|
||||
#define minCalledPartyBCDNumberLength 1
|
||||
#define maxCalledPartyBCDNumberLength 41
|
||||
#define minCalledPartyNumberLength 3
|
||||
#define maxCalledPartyNumberLength 12
|
||||
#define minCallingPartyNumberLength 2
|
||||
#define maxCallingPartyNumberLength 10
|
||||
#define minCauseLength 2
|
||||
#define maxCauseLength 2
|
||||
#define minDigitsLength 2
|
||||
#define maxDigitsLength 16
|
||||
#define minFCIBillingChargingDataLength 1
|
||||
#define maxFCIBillingChargingDataLength 40
|
||||
#define minFCIBillingChargingLength 5
|
||||
#define maxFCIBillingChargingLength 49
|
||||
#define minGenericNumberLength 3
|
||||
#define maxGenericNumberLength 11
|
||||
#define minIPSSPCapabilitiesLength 1
|
||||
#define maxIPSSPCapabilitiesLength 4
|
||||
#define minLocationNumberLength 2
|
||||
#define maxLocationNumberLength 10
|
||||
#define minMessageContentLength 1
|
||||
#define maxMessageContentLength 127
|
||||
#define minOriginalCalledPartyIDLength 2
|
||||
#define maxOriginalCalledPartyIDLength 10
|
||||
#define minRedirectingPartyIDLength 2
|
||||
#define maxRedirectingPartyIDLength 10
|
||||
#define minScfIDLength 2
|
||||
#define maxScfIDLength 10
|
||||
#define minSCIBillingChargingLength 4
|
||||
#define maxSCIBillingChargingLength 69
|
||||
#define minTimeAndTimezoneLength 8
|
||||
#define maxTimeAndTimezoneLength 8
|
||||
#define numOfBCSMEvents 10
|
||||
#define numOfExtensions 10
|
||||
#define numOfGenericNumbers 5
|
||||
#define numOfInfoItems 4
|
||||
#define numOfMessageIDs 5
|
||||
|
||||
#define maxIMSILength 8
|
||||
#define maxISDNAddressLength 9
|
||||
#define maxcallReferenceNumberLength 8
|
||||
#define numOfSMSEvents 10
|
||||
#define MAX_EDP_NUM (18+1)
|
||||
#define MAX_DP_NUM 32
|
||||
#define CAP_CONTENT_LEN 256
|
||||
|
||||
//Operation Code
|
||||
#define CAP_MSG_TYPE CAP_FLAG
|
||||
|
||||
#define CAP_O_OPEN 0xff
|
||||
#define CAP_O_END 0xfe
|
||||
#define CAP_O_UABORT 0xfd
|
||||
#define CAP_O_PABORT 0xfc
|
||||
#define CAP_O_NOTICE 0xfb
|
||||
#define CAP_O_DELIMETER 0xfa
|
||||
#define CAP_O_ERROR 0xf0
|
||||
#define CAP_O_LINK 0xef
|
||||
#define CAP_O_REFUSE_AC 0xE0
|
||||
#define CAP_O_AC_ERROR 0xE1
|
||||
#define CAP_OC_Release 0xfe
|
||||
#define CAP_OC_Error 0xf0
|
||||
|
||||
#define CAP_OC_InitialDP 0
|
||||
#define CAP_OC_AssistRequestInstructions 16
|
||||
#define CAP_OC_EstablishTemporaryConnection 17
|
||||
#define CAP_OC_DisconnectForwardConnection 18
|
||||
#define CAP_OC_ConnectToResource 19
|
||||
#define CAP_OC_Connect 20
|
||||
#define CAP_OC_ReleaseCall 22
|
||||
#define CAP_OC_RequestReportBCSMEvent 23
|
||||
#define CAP_OC_EventReportBCSM 24
|
||||
#define CAP_OC_Continue 31
|
||||
#define CAP_OC_ResetTimer 33
|
||||
#define CAP_OC_FurnishChargingInformation 34
|
||||
#define CAP_OC_ApplyCharging 35
|
||||
#define CAP_OC_ApplyChargingReport 36
|
||||
#define CAP_OC_CallInformationReport 44
|
||||
#define CAP_OC_CallInformationRequest 45
|
||||
#define CAP_OC_SendChargingInformation 46
|
||||
#define CAP_OC_PlayAnnouncement 47
|
||||
#define CAP_OC_PromptAndCollectUserInformation 48
|
||||
#define CAP_OC_SpecializedResourceReport 49
|
||||
#define CAP_OC_Cancel 53
|
||||
#define CAP_OC_ActivityTest 55
|
||||
#define CAP_OC_ApplyWarningTone 128 //self define
|
||||
#define CAP_OC_CCF_Continue 129 //self define
|
||||
|
||||
#define CAP_OC_InitialDPSMS 60
|
||||
#define CAP_OC_FurnishChargingInformationSMS 61
|
||||
#define CAP_OC_ConnectSMS 62
|
||||
#define CAP_OC_RequestReportSMSEvent 63
|
||||
#define CAP_OC_EventReportSMS 64
|
||||
#define CAP_OC_ContinueSMS 65
|
||||
#define CAP_OC_ReleaseSMS 66
|
||||
#define CAP_OC_ResetTimerSMS 67
|
||||
|
||||
#ifdef _SRF_RELEVANT
|
||||
//CAP Operation Type
|
||||
#define CAP_REQUEST 0x01
|
||||
#define CAP_INDICATE 0x02
|
||||
#define CAP_RESPONSE 0x03
|
||||
#define CAP_CONFIRM 0x04
|
||||
#endif
|
||||
|
||||
/* defined for VPS interface */
|
||||
#define CAP_OC_VPSOprRequest 0xb0
|
||||
#ifndef _SRF_RELEVANT
|
||||
#define CAP_OC_PlayAnnouncement 0xb1
|
||||
#endif
|
||||
|
||||
#define maxVPSCallingLen 8
|
||||
#define maxVPSCalledLen 16
|
||||
#define maxVPSInfoLen 64
|
||||
|
||||
#define CAP_ACN_VPSREQUEST 0x80
|
||||
|
||||
#endif
|
||||
1513
plat/xapp/src/capp/cap_msg.c
Normal file
1513
plat/xapp/src/capp/cap_msg.c
Normal file
File diff suppressed because it is too large
Load Diff
873
plat/xapp/src/capp/cap_msg.h
Normal file
873
plat/xapp/src/capp/cap_msg.h
Normal file
@@ -0,0 +1,873 @@
|
||||
|
||||
/************************************************/
|
||||
/*Title: smsmsg.h */
|
||||
/*Descr: CAP-DataTypes(ETSI TS 101046 6.3) */
|
||||
/*Author: Liang Hanxi */
|
||||
/*Create: 2002-9-11 */
|
||||
/*Modify: */
|
||||
|
||||
/************************************************/
|
||||
|
||||
#ifndef _CAP_MESSAGE
|
||||
#define _CAP_MESSAGE
|
||||
|
||||
#ifndef _SRF_RELEVANT
|
||||
#define _SRF_RELEVANT
|
||||
#endif
|
||||
|
||||
#define check_bit(flag,pos) ((flag & (1<<pos))==(1<<pos))
|
||||
#define set_bit(flag,pos) (flag=flag | (1<<pos))
|
||||
|
||||
enum _CAP_ERROR
|
||||
{
|
||||
CAP_ERR_TIMEOUT = 0x80,
|
||||
CAP_ERR_CANCELED = 0,
|
||||
CAP_ERR_CANCEL_FAILED = 1,
|
||||
CAP_ERR_ETC_FAILED = 3,
|
||||
CAP_ERR_IMPROPER_CALLER_RESPONSE = 4,
|
||||
CAP_ERR_MISSING_CUSTOMER_RECORD = 6,
|
||||
CAP_ERR_MISSING_PARAMETER = 7,
|
||||
CAP_ERR_PARAMETER_OUT_OF_RANGE = 8,
|
||||
CAP_ERR_REQUESTED_INFO_ERROR = 10,
|
||||
CAP_ERR_SYSTEM_FAILURE = 11,
|
||||
CAP_ERR_TASK_REFUSED = 12,
|
||||
CAP_ERR_UNAVAILABLE_RESOURCE = 13,
|
||||
CAP_ERR_UNEXPECTED_COMPONENT_SEQ = 14,
|
||||
CAP_ERR_UNEXPECTED_DATA_VALUE = 15,
|
||||
CAP_ERR_UNEXPECTED_PARAMETER = 16,
|
||||
CAP_ERR_UNKNOWN_LEGID = 17,
|
||||
}
|
||||
CAP_ERROR;
|
||||
|
||||
enum _CAP_CAUSE
|
||||
{
|
||||
UNALLOCATED_NUMBER = 0x8081,
|
||||
NO_ROUTE = 0x8083,
|
||||
NORMAL_CLEARING = 0x8090,
|
||||
USER_BUSY = 0x8091,
|
||||
NO_USER_RESPONDING = 0x8092,
|
||||
NO_ANSWER = 0x8093,
|
||||
CALL_REJECTED = 0x8095,
|
||||
NUMBER_CHANGED = 0x8096,
|
||||
DESTINATION_OUT_OF_ORDER = 0x809B,
|
||||
ADDRESS_INCOMPLETE = 0x809C,
|
||||
FACILITY_REJECTED = 0x809D,
|
||||
NORMAL_UNSPECIFIED = 0x809F,
|
||||
NO_CIRCUIT_AVAILABLE = 0x80A2,
|
||||
NETWORK_OUT_OF_ORDER = 0x80A6,
|
||||
TEMPORARY_FAILURE = 0x80A9,
|
||||
SWITCHING_EQUIPMENT_CONGESTION = 0x80AA,
|
||||
REQUESTED_CHANNEL_NOT_AVAILBALE = 0x80AC,
|
||||
RESOURCE_UNAVAILABLE = 0x80AF,
|
||||
INCOMING_CALLS_BARRED = 0x80B3,
|
||||
BEARER_CAPABILITY_NOT_AUTHORIZED = 0x80B5,
|
||||
BEARER_CAPABILITY_NOT_PRESENTLY_AVAILABLE = 0x80B6,
|
||||
SERVICE_NOT_AVAILABLE = 0x80BF,
|
||||
BEARER_CAPABILITY_NOT_IMPLEMENTED = 0x80C1,
|
||||
SERVICE_NOT_IMPLEMENTED = 0x80CF,
|
||||
USER_NOT_MEMBER_OF_CUG = 0x80D3,
|
||||
IMCOMPATIBLE_DESTINATION = 0x80D4,
|
||||
INVALID_MESSAGE = 0x80DF,
|
||||
RECOVERY_ON_TIMER_EXPIRY = 0x80E6,
|
||||
PROTOCOL_ERROR = 0x80EF,
|
||||
INTERWORKING_UNSPECIFIED = 0x80FF,
|
||||
}
|
||||
CAP_CAUSE;
|
||||
|
||||
/*************************************/
|
||||
/*InitialDP-------------------------> */
|
||||
|
||||
/*************************************/
|
||||
typedef enum CapEventTypeBCSM
|
||||
{
|
||||
capp_collectedInfo = 2,
|
||||
capp_routeSelectFailure = 4,
|
||||
capp_oBusy = 5,
|
||||
capp_oCalledPartyBusy = 5,
|
||||
capp_oNoAnswer = 6,
|
||||
capp_oAnswer = 7,
|
||||
capp_oDisconnect = 9,
|
||||
capp_oAbandon = 10,
|
||||
capp_termAttemptAuthorized = 12,
|
||||
capp_tBusy = 13,
|
||||
capp_tNoAnswer = 14,
|
||||
capp_tAnswer = 15,
|
||||
capp_tDisconnect = 17,
|
||||
capp_tAbandon = 18,
|
||||
//self define==>
|
||||
Int_Rel = 24,
|
||||
capp_activetest = 25,
|
||||
Int_TCE = 26,
|
||||
Int_ETC_Failed = 27,
|
||||
Int_TC_Released = 28,
|
||||
Int_SRFConnected = 29,
|
||||
Int_CTR_Failed = 30,
|
||||
Int_SRFReleased = 31
|
||||
}
|
||||
CapEventTypeBCSM;
|
||||
|
||||
typedef enum CapNotReachableReason
|
||||
{
|
||||
capp_msPurged = 0,
|
||||
capp_imsiDetached = 1,
|
||||
capp_restrictedArea = 2,
|
||||
capp_notRegistered = 3
|
||||
}
|
||||
CapNotReachableReason;
|
||||
|
||||
typedef enum CapCriticalityType
|
||||
{
|
||||
capp_ignore = 0,
|
||||
capp_abort = 1
|
||||
}
|
||||
CapCriticalityType;
|
||||
|
||||
typedef union CapBearerCapability
|
||||
{ //CAP-DataTypes
|
||||
u8 bearerCap[maxBearerCapabilityLength + 1];
|
||||
}
|
||||
CapBearerCapability;
|
||||
|
||||
typedef struct CapExtensionField
|
||||
{ //CAP-DataTypes
|
||||
u32 type;
|
||||
CapCriticalityType criticality;
|
||||
u8 *value;
|
||||
}
|
||||
CapExtensionField;
|
||||
|
||||
typedef union CapSubscriberState
|
||||
{ //MAP-MS-DataTypes
|
||||
u8 assumedIdle;
|
||||
u8 camelBusy;
|
||||
CapNotReachableReason netDetNotReachable;
|
||||
u8 notProvidedFromVLR;
|
||||
}
|
||||
CapSubscriberState;
|
||||
|
||||
typedef union CapCellIdOrLAI
|
||||
{ //MAP-CH-DataTypes
|
||||
u8 cellIdFixedLength[7 + 1];
|
||||
u8 laiFixedLength[5 + 1];
|
||||
}
|
||||
CapCellIdOrLAI;
|
||||
|
||||
typedef struct CapLocationInformation
|
||||
{ //MAP-MS-DataTypes
|
||||
u32 optional_flag;
|
||||
int ageOfLocationInformation;
|
||||
u8 geographicalInformation[8 + 1];
|
||||
u8 vlr_number[maxISDNAddressLength + 1];
|
||||
u8 locationNumber[maxLocationNumberLength + 1];
|
||||
u8 cellIdOrLAI_ch;
|
||||
CapCellIdOrLAI cellIdOrLAI;
|
||||
}
|
||||
CapLocationInformation;
|
||||
|
||||
typedef union CapExt_BasicServiceCode
|
||||
{ //MAP-CommonDataTypes
|
||||
u8 ext_BearerService[5 + 1];
|
||||
u8 ext_Teleservice[5 + 1];
|
||||
}
|
||||
CapExt_BasicServiceCode;
|
||||
|
||||
typedef struct CapNACarrierInformation
|
||||
{ //CAP-DataTypes
|
||||
u8 naCarrierId[3 + 1];
|
||||
u8 naCICSelectionType;
|
||||
}
|
||||
CapNACarrierInformation;
|
||||
|
||||
typedef struct CapInitialDPArgExtension
|
||||
{
|
||||
u32 optional_flag;
|
||||
CapNACarrierInformation naCarrierInformation;
|
||||
u8 gmscAddress[9 + 1];
|
||||
}
|
||||
CapInitialDPArgExtension;
|
||||
|
||||
typedef struct CapInitialDP //V1 GSM 09.78 18 TS 101 046 V5.0.1 Page 19 //GSM 09.78 version 7.1.0 (2000-07) Page 37
|
||||
{
|
||||
int serviceKey; /*tag 0 */
|
||||
u32 optional_flag;
|
||||
u8 calledPartyNumber[maxCalledPartyNumberLength + 1]; /*Version 1 0[0x01],2 *//*Version 2 *//*0 */
|
||||
u8 callingPartyNumber[maxCallingPartyNumberLength + 1]; /*Version 1 1[0x02],3 *//*Version 2 *//*1 */
|
||||
u8 callingPartysCategory; /*Version 1 2[0x04],5 *//*Version 2 *//*2 */
|
||||
u8 iPSSPCapabilities[maxIPSSPCapabilitiesLength + 1]; /*Version 2 *//*3 */
|
||||
u8 locationNumber[maxLocationNumberLength + 1]; /*Version 1 3[0x08],10 *//*Version 2 *//*4 */
|
||||
u8 originalCalledPartyID[maxOriginalCalledPartyIDLength + 1]; /*Version 1 4[0x10],12 *//*Version 2 *//*5 */
|
||||
// CapExtensionField extensions[numOfExtensions]; /*Version 1 5[0x20],15*/ /*Version 2*//*6*/
|
||||
u8 highLayerCompatibility[2 + 1]; /*Version 1 6[0x40],23 *//*Version 2 *//*7 */
|
||||
u8 additionalCallingPartyNumber[maxDigitsLength + 1]; /*Version 1 7[0x80],25 *//*Version 2 *//*8 */
|
||||
CapBearerCapability bearerCapability; /*Version 1 8[0x100],27 *//*Version 2 *//*9 */
|
||||
CapEventTypeBCSM eventTypeBCSM; /*Version 1 9[0x200],28 *//*Version 2 *//*10 */
|
||||
u8 redirectingPartyID[maxRedirectingPartyIDLength + 1]; /*Version 1 10[0x400],29 *//*Version 2 *//*11 */
|
||||
u8 redirectionInformation[2 + 1]; /*Version 1 11[0x800],30 *//*Version 2 *//*12 */
|
||||
u8 iMSI[maxIMSILength + 1]; /*Version 1 12[0x1000],50 *//*Version 2 *//*13 */
|
||||
u8 subscriberState_ch;
|
||||
CapSubscriberState subscriberState; /*Version 1 13[0x2000],51 *//*Version 2 *//*14 */
|
||||
CapLocationInformation locationInformation; /*Version 1 14[0x4000],52 *//*Version 2 *//*15 */
|
||||
u8 ext_basicServiceCode_ch;
|
||||
CapExt_BasicServiceCode ext_basicServiceCode; /*Version 1 15[0x8000],53 *//*Version 2 *//*16 */
|
||||
u8 callReferenceNumber[maxcallReferenceNumberLength + 1]; /*Version 1 16[0x10000],54 *//*Version 2 *//*17 */
|
||||
|
||||
u8 mscAddress[maxISDNAddressLength + 1]; /*Version 2 *//*18 */
|
||||
u8 calledPartyBCDNumber[maxCalledPartyBCDNumberLength + 1]; /*Version 2 *//*19 */
|
||||
u8 timeAndTimezone[maxTimeAndTimezoneLength + 1]; /*Version 2 *//*20 */
|
||||
u8 gsm_ForwardingPending; /*Version 2 *//*21 */
|
||||
CapInitialDPArgExtension initialDPArgExtension; /*Version 2 *//*22 */
|
||||
}
|
||||
CapInitialDP, *PCapInitialDP;
|
||||
|
||||
/*++++++++++++++++++++++++++ */
|
||||
/*Cancel--------------> */
|
||||
/*++++++++++++++++++++++++++ */
|
||||
typedef struct CapCancel
|
||||
{
|
||||
u8 ch; //ch=0:invokeID;ch=1:allRequest
|
||||
u8 invokeID; //ch=0
|
||||
u8 allRequest; //ch=1
|
||||
}
|
||||
CapCancel, *PCapCancel;
|
||||
|
||||
/*++++++++++++++++++++++++++++++++++++++ */
|
||||
/*ApplyCharging--------------> */
|
||||
/*++++++++++++++++++++++++++++++++++++++ */
|
||||
typedef struct CapReleaseIfDurationExceeded
|
||||
{
|
||||
u8 tone;
|
||||
}
|
||||
CapReleaseIfDurationExceeded;
|
||||
|
||||
typedef struct CapACBCC
|
||||
{ //aChbillingChargingCharacteristics
|
||||
int maxCallPeriodDuration;
|
||||
u32 optional_flag;
|
||||
CapReleaseIfDurationExceeded releaseIfdurationExceeded; /*0 */
|
||||
int tariffSwitchInterval; /*1 */
|
||||
}
|
||||
CapACBCC;
|
||||
|
||||
typedef struct CapApplyCharging
|
||||
{
|
||||
u8 partyToCharge;
|
||||
CapACBCC ACBCC;
|
||||
}
|
||||
CapApplyCharging, *PCapApplyCharging;
|
||||
|
||||
/*************************************/
|
||||
/*Apply Charging Report-------------> */
|
||||
|
||||
/*************************************/
|
||||
typedef struct CapTimeIfTariffSwitch
|
||||
{
|
||||
int timeSinceTariffSwitch;
|
||||
int tariffSwitchInterval;
|
||||
}
|
||||
CapTimeIfTariffSwitch;
|
||||
|
||||
typedef union CAP_TimeInformation
|
||||
{
|
||||
int timeIfNoTariffSwitch;
|
||||
CapTimeIfTariffSwitch timeIfTariffSwitch;
|
||||
}
|
||||
CapTimeInformation;
|
||||
|
||||
typedef struct CAMEL_CallResult
|
||||
{
|
||||
u8 partyToCharge;
|
||||
u8 timeInformation_ch;
|
||||
CapTimeInformation timeInformation;
|
||||
u8 callActive;
|
||||
}
|
||||
CAMEL_CallResult;
|
||||
|
||||
typedef CAMEL_CallResult CapApplyChargingReport;
|
||||
typedef CAMEL_CallResult *PCapApplyChargingReport;
|
||||
|
||||
/*************************************/
|
||||
/*Request Report BCSM Event---------> */
|
||||
|
||||
/*************************************/
|
||||
typedef enum CapMonitorMode
|
||||
{
|
||||
capp_interrupted = 0,
|
||||
capp_notifyAndContinue = 1,
|
||||
capp_transparent = 2
|
||||
}
|
||||
CapMonitorMode;
|
||||
|
||||
typedef union CapLegID
|
||||
{
|
||||
u8 sendingSideID;
|
||||
u8 receivingSideID;
|
||||
}
|
||||
CapLegID;
|
||||
|
||||
typedef union CapDPSpecificCriteria
|
||||
{
|
||||
int applicationTimer;
|
||||
}
|
||||
CapDPSpecificCriteria;
|
||||
|
||||
typedef struct CapBCSMEvent
|
||||
{
|
||||
CapEventTypeBCSM eventTypeBCSM;
|
||||
CapMonitorMode monitorMode;
|
||||
u32 optional_flag;
|
||||
u8 legID_ch;
|
||||
CapLegID legID;
|
||||
CapDPSpecificCriteria dPSpecificCriteria;
|
||||
}
|
||||
CapBCSMEvent;
|
||||
|
||||
typedef struct CapRequestReportBCSMEvent
|
||||
{
|
||||
u8 bcsmEvents_num;
|
||||
CapBCSMEvent bcsmEvents[numOfBCSMEvents];
|
||||
// ExtensionField extensions[numOfExtensions];
|
||||
}
|
||||
CapRequestReportBCSMEvent, *PCapRequestReportBCSMEvent;
|
||||
|
||||
/*************************************/
|
||||
/*Event Report BCSM-----------------> */
|
||||
|
||||
/*************************************/
|
||||
typedef struct CapESIBCSM
|
||||
{ //EventSpecificInformationBCSM
|
||||
u8 infotype;
|
||||
//2:route select failure
|
||||
//3:oCalledPartyBusy
|
||||
//4:oNoAnswer
|
||||
//5:oAnswer
|
||||
//7:oDisconnect
|
||||
//8:tBusy
|
||||
//9:tNoAnswer
|
||||
//10:tAnswer
|
||||
//12:tDisconnect
|
||||
u8 cause[maxCauseLength + 1];
|
||||
//cause[0] as length,if no cause is provided,cause[0]=0,or cause[0]=maxCauseLength(2)
|
||||
u8 callForwarded;
|
||||
//Boolean value(1/0)
|
||||
}
|
||||
CapESIBCSM;
|
||||
|
||||
typedef union CapMiscCallInfo
|
||||
{
|
||||
enum
|
||||
{
|
||||
capp_request = 0,
|
||||
capp_notification = 1
|
||||
}
|
||||
messageType;
|
||||
}
|
||||
CapMiscCallInfo;
|
||||
|
||||
typedef struct CapEventReportBCSM
|
||||
{
|
||||
CapEventTypeBCSM eventTypeBCSM;
|
||||
u_int optional_flag;
|
||||
u8 legID; /*0 */
|
||||
CapESIBCSM eventSpecificInformationBCSM; /*1 */
|
||||
CapMiscCallInfo miscCallInfo; /*2 */
|
||||
}
|
||||
CapEventReportBCSM, *PCapEventReportBCSM;
|
||||
|
||||
/*************************************/
|
||||
/*Furnish Charging Information------> */
|
||||
|
||||
/*************************************/
|
||||
//FCIBCC<==>FCIBillingChargingCharacteristics
|
||||
typedef struct CAP_CAMEL_FCIBCC
|
||||
{
|
||||
u8 freeFormatData[maxFCIBillingChargingDataLength];
|
||||
u8 partyToCharge;
|
||||
}
|
||||
CAMEL_FCIBCC;
|
||||
|
||||
CAMEL_FCIBCC FurnishChargingInformationArg;
|
||||
|
||||
/*************************************/
|
||||
/*ReleaseCall-----------------------> */
|
||||
|
||||
/*************************************/
|
||||
typedef struct CapReleaseCall
|
||||
{
|
||||
u8 cause[maxCauseLength + 1];
|
||||
}
|
||||
CapReleaseCall, *PCapReleaseCall;
|
||||
|
||||
/*************************************/
|
||||
/*InitialDPSMS----------------------> */
|
||||
|
||||
/*************************************/
|
||||
typedef enum CapEventTypeSMS
|
||||
{
|
||||
capp_smsCollectedInfo = 1,
|
||||
capp_osmsFailure = 2,
|
||||
capp_osmsSubmitted = 3,
|
||||
}
|
||||
CapEventTypeSMS;
|
||||
|
||||
typedef struct CapLocationInformationGPRS
|
||||
{ //MAP-MS-DataTypes
|
||||
u32 optional_flag;
|
||||
u8 cellGlobalIdOrServiceAreaIdOrLAI[7 + 1];
|
||||
u8 routeingAreaIdentity[7 + 1];
|
||||
u8 geographicalInformation[8 + 1];
|
||||
u8 sgsn_Number[maxISDNAddressLength + 1];
|
||||
u8 selectedLSAIdentity[3 + 1];
|
||||
u8 sai_Present;
|
||||
}
|
||||
CapLocationInformationGPRS;
|
||||
|
||||
typedef struct CapInitialDPSMS
|
||||
{
|
||||
int serviceKey;
|
||||
u32 optional_flag;
|
||||
u8 destinationSubscriberNumber[maxCalledPartyBCDNumberLength + 1]; /*0 */
|
||||
u8 callingPartyNumber[maxISDNAddressLength + 1]; /*1 */
|
||||
CapEventTypeSMS eventTypeSMS; /*2 */
|
||||
u8 iMSI[maxIMSILength + 1]; /*3 */
|
||||
CapLocationInformation locationInformation; /*4 */
|
||||
CapLocationInformationGPRS locationInformationGPRS; /*5 */
|
||||
u8 sMSCAddress[maxISDNAddressLength + 1]; /*6 */
|
||||
u8 timeAndTimezone[maxTimeAndTimezoneLength + 1]; /*7 */
|
||||
u8 tPShortMessageSubmissionInfo; /*8 */
|
||||
u8 tPProtocolIdentifier; /*9 */
|
||||
u8 tPDataCodingScheme; /*10 */
|
||||
u8 tPValidityPeriod[7 + 1]; /*11 */
|
||||
}
|
||||
CapInitialDPSMS, *PCapInitialDPSMS;
|
||||
|
||||
/*************************************/
|
||||
/*Request Report SMS Event---------> */
|
||||
|
||||
/*************************************/
|
||||
typedef struct CapSMSEvent
|
||||
{
|
||||
CapEventTypeSMS eventTypeSMS;
|
||||
CapMonitorMode monitorMode;
|
||||
}
|
||||
CapSMSEvent;
|
||||
|
||||
typedef struct CapRequestReportSMSEvent
|
||||
{
|
||||
u8 sMSEvents_num;
|
||||
CapSMSEvent sMSEvents[numOfSMSEvents];
|
||||
}
|
||||
CapRequestReportSMSEvent, *PCapRequestReportSMSEvent;
|
||||
|
||||
/*************************************/
|
||||
/*Event Report SMS------------------> */
|
||||
|
||||
/*************************************/
|
||||
typedef enum CapSMSCause
|
||||
{
|
||||
capp_systemFailure = 0,
|
||||
capp_unexpectedDataValue = 1,
|
||||
capp_facilityNotSupported = 2,
|
||||
capp_sMDeliveryFailure = 3,
|
||||
releaseFromRadioInterface = 4,
|
||||
}
|
||||
CapSMSCause;
|
||||
|
||||
typedef struct CapESISMS
|
||||
{ //EventSpecificInformationSMS
|
||||
u8 infotype; //0:o-smsFailureSpecificInfo 1:o-smsSubmittedSpecificInfo
|
||||
u8 cause_flag;
|
||||
CapSMSCause cause;
|
||||
}
|
||||
CapESISMS;
|
||||
|
||||
typedef struct CapEventReportSMS
|
||||
{
|
||||
CapEventTypeSMS eventTypeSMS;
|
||||
u32 optional_flag;
|
||||
CapESISMS eventSpecificInformationSMS; /*0 */
|
||||
CapMiscCallInfo miscCallInfo; /*1 */
|
||||
}
|
||||
CapEventReportSMS, *PCapEventReportSMS;
|
||||
|
||||
/*************************************/
|
||||
/*ReleaseSMS------------------------> */
|
||||
|
||||
/*************************************/
|
||||
typedef struct CapReleaseSMS
|
||||
{
|
||||
u8 cause;
|
||||
}
|
||||
CapReleaseSMS, *PCapReleaseSMS;
|
||||
|
||||
/*************************************/
|
||||
/*ResetTimerSMS------> */
|
||||
|
||||
/*************************************/
|
||||
typedef enum CapTimerID
|
||||
{
|
||||
Cap_Tssf = 0,
|
||||
}
|
||||
CapTimerID;
|
||||
|
||||
typedef struct CapResetTimerSMS
|
||||
{
|
||||
CapTimerID timerID;
|
||||
u_int timerValue;
|
||||
}
|
||||
CapResetTimerSMS;
|
||||
|
||||
typedef struct CapVPSRequest
|
||||
{
|
||||
u8 calling_num[maxVPSCallingLen];
|
||||
u8 called_num[maxVPSCalledLen];
|
||||
}
|
||||
CapVPSRequest;
|
||||
|
||||
typedef struct CapVPSPlayAnnounce
|
||||
{
|
||||
u8 info_len;
|
||||
u8 send_info[maxVPSInfoLen];
|
||||
}
|
||||
CapVPSPlayAnnounce;
|
||||
|
||||
/******************************************/
|
||||
|
||||
/************** SRF Relevant **************/
|
||||
|
||||
/******************************************/
|
||||
#ifdef _SRF_RELEVANT
|
||||
|
||||
/************************/
|
||||
|
||||
/** Common Data Type **/
|
||||
|
||||
/************************/
|
||||
#if 0
|
||||
typedef struct CapNACarrierInformation
|
||||
{
|
||||
u32 optional_flag;
|
||||
u8 naCarrierId[3]; /*0 */
|
||||
u8 naCICSelectionType; /*1 */
|
||||
}
|
||||
CapNACarrierInformation;
|
||||
|
||||
typedef struct CapNA_Info
|
||||
{
|
||||
u32 optional_flag;
|
||||
CapNACarrierInformation naCarrierInformation; /*0 */
|
||||
u8 naOliInfo; /*1 */
|
||||
u8 naChargeNumber[7 + 1]; /*2 */
|
||||
}
|
||||
CapNA_Info;
|
||||
|
||||
typedef struct CapResourceAddress
|
||||
{
|
||||
u8 choice_id;
|
||||
u8 ipRoutingAddress[maxCalledPartyNumberLength + 1]; /*0,0 */
|
||||
u8 none; /*1,3 */
|
||||
}
|
||||
CapResourceAddress;
|
||||
#endif
|
||||
|
||||
typedef struct CapServiceInteractionIndicatorsTwo
|
||||
{
|
||||
u32 optional_flag;
|
||||
u8 bothwayThroughConnectionInd; /*0,2 */
|
||||
}
|
||||
CapServiceInteractionIndicatorsTwo;
|
||||
|
||||
typedef struct CapVariablePart
|
||||
{
|
||||
u32 choice_id;
|
||||
u32 integer; /*0,0 */
|
||||
u8 number[maxDigitsLength + 1]; /*1,1 */
|
||||
u8 time[2]; /*2,2 */
|
||||
u8 date[4]; /*3,3 */
|
||||
u8 price[4]; /*4,4 */
|
||||
}
|
||||
CapVariablePart;
|
||||
|
||||
typedef struct CapMessageID
|
||||
{
|
||||
u8 choice_id;
|
||||
u32 elementaryMessageID; /*0,0 */
|
||||
// text /*1,1*/
|
||||
struct CapElementaryMessageIDs
|
||||
{
|
||||
u8 num;
|
||||
u32 elementaryMessageID[numOfMessageIDs];
|
||||
}
|
||||
elementaryMessageIDs; /*2,29 */
|
||||
struct CapVariableMessage
|
||||
{
|
||||
|
||||
u32 elementaryMessageID; /*-,0*/
|
||||
struct CapVariableParts
|
||||
{
|
||||
u8 num;
|
||||
CapVariablePart variablePart[5];
|
||||
}
|
||||
|
||||
variableParts; /*-,1*/
|
||||
}
|
||||
variableMessage; /*3,30 */
|
||||
}
|
||||
CapMessageID;
|
||||
|
||||
typedef struct CapInbandInfo
|
||||
{
|
||||
|
||||
CapMessageID messageID; /*-,0*/
|
||||
u32 optional_flag;
|
||||
int numberOfRepetitions; /*0,1 */
|
||||
int duration; /*1,2 */
|
||||
int interval; /*2,3 */
|
||||
}
|
||||
CapInbandInfo;
|
||||
|
||||
typedef struct CapTone
|
||||
{
|
||||
|
||||
u32 toneID; /*-,0*/
|
||||
u32 optional_flag;
|
||||
u32 duration; /*0,1 */
|
||||
}
|
||||
CapTone;
|
||||
|
||||
typedef struct CapInformationToSend
|
||||
{
|
||||
u8 choice_id;
|
||||
CapInbandInfo inbandInfo; /*0,0 */
|
||||
CapTone tone; /*1,1 */
|
||||
}
|
||||
CapInformationToSend;
|
||||
|
||||
typedef enum CapErrorTreatment
|
||||
{
|
||||
stdErrorAndInfo = 0,
|
||||
help = 1,
|
||||
repeatPrompt = 2,
|
||||
}
|
||||
CapErrorTreatment;
|
||||
|
||||
typedef struct CapCollectedDigits
|
||||
{
|
||||
|
||||
u8 minimumNbOfDigits; /*-,0*/
|
||||
|
||||
u8 maximumNbOfDigits; /*-,1*/
|
||||
u32 optional_flag;
|
||||
u8 endOfReplyDigit[2 + 1]; /*0,2 */
|
||||
u8 cancelDigit[2 + 1]; /*1,3 */
|
||||
u8 startDigit[2 + 1]; /*2,4 */
|
||||
u8 firstDigitTimeOut; /*3,5 */
|
||||
u8 interDigitTimeOut; /*4,6 */
|
||||
CapErrorTreatment errorTreatment; /*5,7 */
|
||||
u8 interruptableAnnInd; /*6,8 */
|
||||
u8 voiceInformation; /*7,9 */
|
||||
u8 voiceBack; /*8,10 */
|
||||
}
|
||||
CapCollectedDigits;
|
||||
|
||||
typedef struct CapCollectedInfo
|
||||
{
|
||||
u8 choice_id;
|
||||
CapCollectedDigits collectedDigits; /*0,0 */
|
||||
}
|
||||
CapCollectedInfo;
|
||||
|
||||
/************************/
|
||||
|
||||
/** Argument Data Type **/
|
||||
|
||||
/************************/
|
||||
typedef struct CapAssistRequestInstructions
|
||||
{
|
||||
|
||||
u8 correlationID[maxDigitsLength + 1]; /*-,0*/
|
||||
|
||||
u8 iPSSPCapabilities[maxIPSSPCapabilitiesLength + 1]; /*-,2*/
|
||||
}
|
||||
CapAssistRequestInstructions, *PCapAssistRequestInstructions;
|
||||
|
||||
typedef struct CapConnect
|
||||
{
|
||||
u8 destinationRoutingAddress[maxCalledPartyNumberLength + 1]; /*-,0*/
|
||||
u32 optional_flag;
|
||||
u8 alertingPattern[3]; /*Versinon2 0[0x01],1 */
|
||||
u8 originalCalledPartyID[maxOriginalCalledPartyIDLength + 1]; /*Versinon 1 0[0x01],6 *//*Versinon2 1[0x02],6 */
|
||||
// CapExtensionField extensions[numOfExtensions]; /*Versinon 1 1[0x02],10*/ /*Versinon2 2[0x04],10*/
|
||||
u8 callingPartysCategory; /*Versinon 1 4[0x10],28 *//*Versinon2 3[0x08],28 */
|
||||
u8 redirectingPartyID[maxRedirectingPartyIDLength + 1]; /*Versinon 1 5[0x20],29 *//*Versinon2 4[0x10],29 */
|
||||
u8 redirectionInformation[2 + 1]; /*Versinon 1 6[0x40],30 *//*Versinon2 5[0x20],30 */
|
||||
struct
|
||||
{
|
||||
u8 num;
|
||||
u8 genericNumber[numOfGenericNumbers][maxGenericNumberLength + 1];
|
||||
}
|
||||
genericNumbers; /*Versinon2 6[0x40],14 */
|
||||
u8 suppressionOfAnnouncement; /*Versinon 1 7[0x80],55 *//*Versinon2 7[0x80],14 */
|
||||
u8 oCSIApplicable; /*Versinon 1 8[0x100],56 *//*Versinon2 8[0x100],14 */
|
||||
//CapNA_Info na_Info;
|
||||
struct
|
||||
{
|
||||
u8 callingpartyNmuber_len;
|
||||
u8 callingPartyNumber[maxCallingPartyNumberLength]; /*Versinon 1 3[0x08],27 */
|
||||
}
|
||||
callingpartynum; /*Versinon2 9[0x200],57*/
|
||||
}CapConnect, *PCapConnect;
|
||||
|
||||
typedef struct CapConnectToResource
|
||||
{
|
||||
// CapResourceAddress resourceAddress;
|
||||
struct
|
||||
{
|
||||
u8 choice_id;
|
||||
u8 ipRoutingAddress[maxCalledPartyNumberLength + 1]; /*0,0 */
|
||||
u8 none; /*1,3 */
|
||||
}
|
||||
resourceAddress;
|
||||
u32 optional_flag;
|
||||
// CapExtensionField extensions[numOfExtensions]; /*0,4*/
|
||||
CapServiceInteractionIndicatorsTwo serviceInteractionIndicatorsTwo; /*1,7 */
|
||||
}
|
||||
CapConnectToResource, *PCapConnectToResource;
|
||||
|
||||
typedef struct CapDisconnectForwardConnection
|
||||
{
|
||||
}
|
||||
CapDisconnectForwardConnection, *PCapDisconnectForwardConnection;
|
||||
|
||||
typedef struct CapEstablishTemporaryConnection
|
||||
{
|
||||
|
||||
u8 assistingSSPIPRoutingAddress[maxDigitsLength + 1]; /*-,0*/
|
||||
u32 optional_flag;
|
||||
u8 correlationID[maxDigitsLength + 1]; /*0,1 */
|
||||
u8 scfID[maxScfIDLength + 1]; /*1,3 */
|
||||
// CapExtensionField extensions[numOfExtensions]; /*2,4*/
|
||||
CapServiceInteractionIndicatorsTwo serviceInteractionIndicatorsTwo; /*3,7 */
|
||||
// CapNA_Info na_Info; /*4,50*/
|
||||
}
|
||||
CapEstablishTemporaryConnection, *PCapEstablishTemporaryConnection;
|
||||
|
||||
typedef struct CapPlayAnnouncement
|
||||
{
|
||||
|
||||
CapInformationToSend informationToSend; /*-,0*/
|
||||
u32 optional_flag;
|
||||
u8 disconnectFromIPForbidden; /*0,1 */
|
||||
u8 requestAnnouncementComplete; /*1,2 */
|
||||
// CapExtensionField extensions[numOfExtensions]; /*2,3*/
|
||||
}
|
||||
CapPlayAnnouncement, *PCapPlayAnnouncement;
|
||||
|
||||
typedef struct CapPromptAndCollectUserInformation
|
||||
{
|
||||
|
||||
CapCollectedInfo collectedInfo; /*-,0*/
|
||||
u32 optional_flag;
|
||||
u8 disconnectFromIPForbidden; /*0,1 */
|
||||
CapInformationToSend informationToSend; /*1,2 */
|
||||
// CapExtensionField extensions[numOfExtensions]; /*2,3*/
|
||||
|
||||
u8 choice_id;
|
||||
|
||||
u8 digitsResponse[maxDigitsLength + 1]; /*-,0*///CapReceivedInformation
|
||||
}
|
||||
CapPromptAndCollectUserInformation, *PCapPromptAndCollectUserInformation;
|
||||
|
||||
/*typedef union CapReceivedInformation
|
||||
{
|
||||
u8 digitsResponse[maxDigitsLength+1];
|
||||
}CapReceivedInformation; */
|
||||
|
||||
typedef struct CapSpecializedResourceReport
|
||||
{
|
||||
}
|
||||
CapSpecializedResourceReport, *PCapSpecializedResourceReport;
|
||||
|
||||
#endif
|
||||
|
||||
/*************************************/
|
||||
/*Cap Structure---------------------> */
|
||||
|
||||
/*************************************/
|
||||
typedef struct CapArg
|
||||
{
|
||||
u8 ocode;
|
||||
u8 message_flag;
|
||||
u16 port_id;
|
||||
u16 dialogue_id;
|
||||
u8 invoke_id;
|
||||
u8 version;
|
||||
union
|
||||
{
|
||||
CapInitialDP initialDPArg;
|
||||
CapApplyCharging applyChargingArg;
|
||||
CapApplyChargingReport applyChargingReportArg;
|
||||
CapRequestReportBCSMEvent requestReportBCSMEventArg;
|
||||
CapCancel cancelArg;
|
||||
CapEventReportBCSM eventReportBCSMArg;
|
||||
CapReleaseCall releaseCallArg;
|
||||
CapInitialDPSMS initialDPSMSArg;
|
||||
CapRequestReportSMSEvent requestReportSMSEventArg;
|
||||
CapEventReportSMS eventReportSMSArg;
|
||||
CapReleaseSMS releaseSMSArg;
|
||||
CapResetTimerSMS resetTimerArg;
|
||||
CapVPSRequest vpsRequest;
|
||||
CapVPSPlayAnnounce vpsPlayAnnounce;
|
||||
CapAssistRequestInstructions assistRequestInstructionsArg;
|
||||
CapConnect connectArg;
|
||||
//CapConnect_v1 connectArg_v1;
|
||||
CapConnectToResource connectToResourceArg;
|
||||
CapDisconnectForwardConnection disconnectForwardConnectionArg;
|
||||
CapEstablishTemporaryConnection establishTemporaryConnectionArg;
|
||||
CapPlayAnnouncement playAnnouncementArg;
|
||||
CapPromptAndCollectUserInformation promptAndCollectUserInformationArg;
|
||||
//CapReceivedInformation receivedInformationArg; // RR of P&C
|
||||
CapSpecializedResourceReport specializedResourceReportArg;
|
||||
}
|
||||
msg_list;
|
||||
}
|
||||
CapArg, *PCapArg;
|
||||
|
||||
/*
|
||||
typedef struct _CAP_Message
|
||||
{
|
||||
u8 msgLength[2]; // u80 is the higher part
|
||||
u8 msgServiceCode; // fixed as 0xAF
|
||||
u8 port_id[3]; // u8 0 is the higher part,u8 1 is the lower part ,and u8 2 is reserved
|
||||
u8 dialogue_id[3];
|
||||
u8 msgOperaCode; // message type code ,e.g , InitialDP = 0x00
|
||||
u8 msgOperaType; // 1/2/3/4 = request, indicate, response, confirm
|
||||
u8 msgContent[CAP_CONTENT_LEN];
|
||||
// if the message if cap operation ,then the first u8 of msgContent is invoke id
|
||||
}CAP_Message, *PCAP_Message;
|
||||
|
||||
typedef struct DestCriteria
|
||||
{
|
||||
u8 DestNumber[maxISDNAddressLength+1];
|
||||
u8 Type; //0:unknown 1:enable 2:inhibit
|
||||
}DestCriteria;
|
||||
|
||||
typedef struct CapCSI
|
||||
{
|
||||
int ServiceKey;
|
||||
u8 SCFAddress[maxISDNAddressLength+1];
|
||||
u8 DefaultHandle; //The Default Call Handling indicates whether the call shall be released or
|
||||
//continued as requested in case of error in the gsmSSF to gsmSCF dialogue.
|
||||
//0:release 1:continue
|
||||
CapEventTypeBCSM TDP; //TDP_R
|
||||
//O-CSI:capp_collectedInfo = 2,
|
||||
//T-CSI:capp_termAttemptAuthorized = 12,
|
||||
u8 DstNum;
|
||||
DestCriteria DstList[10]; //The DP criteria indicate whether the gsmSSF shall request the gsmSCF for instructions.
|
||||
u8 BSNum;
|
||||
u32 BSCode[5]; //Basic service triggering criteria
|
||||
u8 FWCriteria; //Forwarding triggering criteria
|
||||
//1:enabling 0:inhibiting
|
||||
}CapCSI;
|
||||
*/
|
||||
|
||||
#endif
|
||||
1064
plat/xapp/src/capp/cap_msgtype.c
Normal file
1064
plat/xapp/src/capp/cap_msgtype.c
Normal file
File diff suppressed because it is too large
Load Diff
497
plat/xapp/src/capp/cap_public.c
Normal file
497
plat/xapp/src/capp/cap_public.c
Normal file
@@ -0,0 +1,497 @@
|
||||
/* CAP public function c file */
|
||||
/* Written by Liu Zhiguo 2003-08-26 */
|
||||
/* Version 1.0 */
|
||||
/* -------------------------------- */
|
||||
|
||||
#include "../../../public/src/include/pub_include.h"
|
||||
#include "../../../sccp/src/include/sccp.h"
|
||||
#include "../mapp/map_const.h"
|
||||
#include "../mapp/map_code.h"
|
||||
#include "../mapp/map_struct.h"
|
||||
#include "cap_head.h"
|
||||
|
||||
void cap_get_sccpadd(struct SCCP_ADDRESS *add_ptr, u8 * data)
|
||||
{
|
||||
u8 temp_len;
|
||||
|
||||
add_ptr->ip = (data[0] << 24) + (data[1] << 16) + (data[2] << 8) + data[3];
|
||||
add_ptr->DPC = (data[4] << 24) + (data[5] << 16) + (data[6] << 8) + data[7];
|
||||
add_ptr->NetID = data[8];
|
||||
add_ptr->SSN = data[9];
|
||||
add_ptr->RI = data[10];
|
||||
add_ptr->GTI = data[11];
|
||||
add_ptr->TT = data[12];
|
||||
add_ptr->NP = data[13];
|
||||
add_ptr->ES = data[14];
|
||||
add_ptr->NAI = data[15];
|
||||
add_ptr->len = data[16];
|
||||
temp_len = (data[16] + 1) / 2;
|
||||
memcpy(add_ptr->GTAI, data + 17, temp_len);
|
||||
}
|
||||
|
||||
void cap_set_sccpadd(struct SCCP_ADDRESS *add_ptr, u8 * data)
|
||||
{
|
||||
u8 temp_len;
|
||||
|
||||
data[0] = add_ptr->ip >> 24;
|
||||
data[1] = add_ptr->ip >> 16;
|
||||
data[2] = add_ptr->ip >> 8;
|
||||
data[3] = add_ptr->ip;
|
||||
data[4] = add_ptr->DPC >> 24;
|
||||
data[5] = add_ptr->DPC >> 16;
|
||||
data[6] = add_ptr->DPC >> 8;
|
||||
data[7] = add_ptr->DPC;
|
||||
data[8] = add_ptr->NetID;
|
||||
data[9] = add_ptr->SSN;
|
||||
data[10] = add_ptr->RI;
|
||||
data[11] = add_ptr->GTI;
|
||||
data[12] = add_ptr->TT;
|
||||
data[13] = add_ptr->NP;
|
||||
data[14] = add_ptr->ES;
|
||||
data[15] = add_ptr->NAI;
|
||||
data[16] = add_ptr->len;
|
||||
temp_len = (add_ptr->len + 1) / 2;
|
||||
memcpy(data + 17, add_ptr->GTAI, temp_len);
|
||||
}
|
||||
|
||||
u8 cap_com_ftos(struct MapComSrv_struct *map_com, u8 * data_flow)
|
||||
{ // common service data flow to structure
|
||||
u32 aa;
|
||||
u32 len;
|
||||
u8 ii;
|
||||
u8 delimiter_flag = 0;
|
||||
struct MapOpen_Arg *open_arg;
|
||||
struct MapOpen_Res *open_res;
|
||||
struct MapClose_Arg *close_ptr;
|
||||
struct MapUAbort_Arg *uabrt_ptr;
|
||||
struct MapPAbort_Arg *pabrt_ptr;
|
||||
|
||||
len = (data_flow[0] << 8) + data_flow[1];
|
||||
if(len < 9) // data flow is too short
|
||||
return 0;
|
||||
if(data_flow[2] != CAP_FLAG)
|
||||
return 0;
|
||||
map_com->port_id = (data_flow[3] << 8) + data_flow[4];
|
||||
map_com->dialogue_id = (data_flow[6] << 8) + data_flow[7];
|
||||
map_com->message_type = data_flow[9];
|
||||
map_com->message_flag = data_flow[10];
|
||||
switch (map_com->message_type)
|
||||
{
|
||||
case MAP_OPEN:
|
||||
if(map_com->message_flag == MAP_REQUEST || map_com->message_flag == MAP_INDICATE)
|
||||
{
|
||||
open_arg = (MapOpen_Arg *) & map_com->dlg_list.open_arg;
|
||||
open_arg->acn_data.acn = data_flow[11];
|
||||
open_arg->acn_data.acn_ver = data_flow[12];
|
||||
cap_get_sccpadd(&open_arg->peer_add, data_flow + 13);
|
||||
cap_get_sccpadd(&open_arg->local_add, data_flow + 41);
|
||||
open_arg->param_flag = 0x0b;
|
||||
aa = 70;
|
||||
for(ii = 0; ii < 3; ii++)
|
||||
{
|
||||
if(data_flow[aa] == 0x00)
|
||||
break;
|
||||
else if(data_flow[aa] == 0x01) // peer reference
|
||||
{
|
||||
len = data_flow[aa + 1];
|
||||
if(len > ISDN_LEN)
|
||||
return 0;
|
||||
open_arg->peerref_len = len;
|
||||
memcpy(open_arg->peer_reference, &data_flow[aa + 2], len);
|
||||
aa += len + 2;
|
||||
open_arg->param_flag |= 0x04;
|
||||
}
|
||||
else if(data_flow[aa] == 0x02) // local reference
|
||||
{
|
||||
len = data_flow[aa + 1];
|
||||
if(len > ISDN_LEN)
|
||||
return 0;
|
||||
open_arg->localref_len = len;
|
||||
memcpy(open_arg->local_reference, &data_flow[aa + 2], len);
|
||||
aa += len + 2;
|
||||
open_arg->param_flag |= 0x10;
|
||||
}
|
||||
else if(data_flow[aa] == 0x03) // specific info
|
||||
{
|
||||
len = data_flow[aa + 1];
|
||||
if(len >= MAX_SPCINFO_LEN)
|
||||
return 0;
|
||||
open_arg->specific_info.info_len = len;
|
||||
memcpy(open_arg->specific_info.info_data, &data_flow[aa + 2], len);
|
||||
open_arg->param_flag |= 0x20;
|
||||
aa += 2 + len;
|
||||
}
|
||||
else if(data_flow[aa] == 0x10)
|
||||
{
|
||||
delimiter_flag = 1;
|
||||
aa += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(map_com->message_flag == MAP_RESPONSE || map_com->message_flag == MAP_CONFIRM)
|
||||
{
|
||||
open_res = (MapOpen_Res *) & map_com->dlg_list.open_res;
|
||||
open_res->result = data_flow[11];
|
||||
open_res->param_flag = 0x08;
|
||||
aa = 13;
|
||||
for(ii = 0; ii < 4; ii++)
|
||||
{
|
||||
if(data_flow[aa] == 0x00)
|
||||
break;
|
||||
else if(data_flow[aa] == 0x01) // acn
|
||||
{
|
||||
open_res->acn_data.acn = data_flow[aa + 2];
|
||||
open_res->acn_data.acn_ver = data_flow[aa + 3];
|
||||
aa += 4;
|
||||
open_res->param_flag |= 0x01;
|
||||
}
|
||||
else if(data_flow[aa] == 0x02) // specific info
|
||||
{
|
||||
len = data_flow[aa + 1];
|
||||
if(len >= MAX_SPCINFO_LEN)
|
||||
return 0;
|
||||
open_res->specific_info.info_len = len;
|
||||
memcpy(open_res->specific_info.info_data, &data_flow[aa + 2], len);
|
||||
open_res->param_flag |= 0x02;
|
||||
aa += 2 + len;
|
||||
}
|
||||
else if(data_flow[aa] == 0x03) // refuse reason
|
||||
{
|
||||
open_res->refuse_reason = data_flow[aa + 2];
|
||||
open_res->param_flag |= 0x10;
|
||||
aa += 3;
|
||||
}
|
||||
else if(data_flow[aa] == 0x04) // provider error
|
||||
{
|
||||
open_res->provider_error = data_flow[aa + 2];
|
||||
open_res->param_flag |= 0x20;
|
||||
aa += 3;
|
||||
}
|
||||
else if(data_flow[aa] == 0x10)
|
||||
{
|
||||
delimiter_flag = 1;
|
||||
aa += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
break;
|
||||
case MAP_CLOSE:
|
||||
close_ptr = (MapClose_Arg *) & map_com->dlg_list.close_arg;
|
||||
close_ptr->release_method = data_flow[11];
|
||||
close_ptr->param_flag = 0x01;
|
||||
if(data_flow[13] == 0x01)
|
||||
{
|
||||
len = data_flow[14];
|
||||
if(len >= MAX_SPCINFO_LEN)
|
||||
return 0;
|
||||
close_ptr->specific_info.info_len = len;
|
||||
memcpy(close_ptr->specific_info.info_data, &data_flow[15], len);
|
||||
close_ptr->param_flag |= 0x02;
|
||||
}
|
||||
break;
|
||||
case MAP_U_ABORT:
|
||||
uabrt_ptr = (MapUAbort_Arg *) & map_com->dlg_list.uabort_arg;
|
||||
uabrt_ptr->user_reason = data_flow[11];
|
||||
uabrt_ptr->param_flag = 0x01;
|
||||
aa = 13;
|
||||
for(ii = 0; ii < 2; ii++)
|
||||
{
|
||||
if(data_flow[aa] == 0)
|
||||
break;
|
||||
else if(data_flow[aa] == 0x01) // diagnostic flag
|
||||
{
|
||||
uabrt_ptr->diag_info = data_flow[aa + 2];
|
||||
uabrt_ptr->param_flag |= 0x02;
|
||||
aa += 3;
|
||||
}
|
||||
else if(data_flow[aa] == 0x02) // specific info
|
||||
{
|
||||
len = data_flow[aa + 1];
|
||||
if(len >= MAX_SPCINFO_LEN)
|
||||
return 0;
|
||||
uabrt_ptr->specific_info.info_len = len;
|
||||
memcpy(uabrt_ptr->specific_info.info_data, &data_flow[aa + 2], len);
|
||||
uabrt_ptr->param_flag |= 0x04;
|
||||
aa += 2 + len;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MAP_P_ABORT:
|
||||
pabrt_ptr = (MapPAbort_Arg *) & map_com->dlg_list.pabort_arg;
|
||||
pabrt_ptr->provider_reason = data_flow[11];
|
||||
pabrt_ptr->source = data_flow[12];
|
||||
pabrt_ptr->param_flag = 0x03;
|
||||
break;
|
||||
case MAP_NOTICE:
|
||||
map_com->dlg_list.notice_arg.problem = data_flow[11];
|
||||
map_com->dlg_list.notice_arg.param_flag = 0x01;
|
||||
break;
|
||||
case MAP_DELIMITER:
|
||||
case MAP_LINK:
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
if(delimiter_flag == 1)
|
||||
return 2;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
void cap_com_stof(struct MapComSrv_struct *com_ptr, u8 * data_flow, u8 delimiter_flag)
|
||||
{ // transfer common structure to data flow
|
||||
u32 ii;
|
||||
u32 len;
|
||||
struct MapOpen_Arg *open_arg;
|
||||
struct MapOpen_Res *open_res;
|
||||
struct MapClose_Arg *close_arg;
|
||||
struct MapUAbort_Arg *uabrt_arg;
|
||||
|
||||
data_flow[2] = CAP_FLAG;
|
||||
data_flow[3] = com_ptr->port_id >> 8;
|
||||
data_flow[4] = com_ptr->port_id;
|
||||
data_flow[6] = com_ptr->dialogue_id >> 8;
|
||||
data_flow[7] = com_ptr->dialogue_id;
|
||||
data_flow[9] = com_ptr->message_type;
|
||||
data_flow[10] = com_ptr->message_flag;
|
||||
ii = 11;
|
||||
switch (com_ptr->message_type)
|
||||
{
|
||||
case MAP_OPEN:
|
||||
if(com_ptr->message_flag == MAP_INDICATE || com_ptr->message_flag == MAP_REQUEST)
|
||||
{
|
||||
open_arg = (MapOpen_Arg *) & com_ptr->dlg_list.open_arg;
|
||||
data_flow[ii++] = open_arg->acn_data.acn;
|
||||
data_flow[ii++] = open_arg->acn_data.acn_ver;
|
||||
cap_set_sccpadd(&open_arg->peer_add, data_flow + ii);
|
||||
ii += 28;
|
||||
cap_set_sccpadd(&open_arg->local_add, data_flow + ii);
|
||||
ii += 28;
|
||||
data_flow[ii++] = 1; // optional point
|
||||
if((open_arg->param_flag & 0x04)) // has peer reference address
|
||||
{
|
||||
data_flow[ii++] = 0x01;
|
||||
len = open_arg->peerref_len;
|
||||
data_flow[ii++] = len;
|
||||
memcpy(data_flow + ii, open_arg->peer_reference, len);
|
||||
ii += len;
|
||||
}
|
||||
if((open_arg->param_flag & 0x10)) // has local reference address
|
||||
{
|
||||
data_flow[ii++] = 0x02;
|
||||
len = open_arg->localref_len;
|
||||
data_flow[ii++] = len;
|
||||
memcpy(data_flow + ii, open_arg->local_reference, len);
|
||||
ii += len;
|
||||
}
|
||||
if((open_arg->param_flag & 0x20))
|
||||
{
|
||||
data_flow[ii++] = 0x03;
|
||||
len = open_arg->specific_info.info_len;
|
||||
data_flow[ii++] = len;
|
||||
memcpy(data_flow + ii, open_arg->specific_info.info_data, len);
|
||||
ii += len;
|
||||
}
|
||||
if(delimiter_flag == 1)
|
||||
{
|
||||
data_flow[ii++] = 0x10;
|
||||
data_flow[ii++] = 0x00;
|
||||
}
|
||||
data_flow[ii++] = 0x00;
|
||||
}
|
||||
else if(com_ptr->message_flag == MAP_RESPONSE || com_ptr->message_flag == MAP_CONFIRM)
|
||||
{
|
||||
open_res = (MapOpen_Res *) & com_ptr->dlg_list.open_res;
|
||||
data_flow[ii++] = open_res->result;
|
||||
data_flow[ii++] = 0x01; // optional point
|
||||
if((open_res->param_flag & 0x01)) // has ACN
|
||||
{
|
||||
data_flow[ii++] = 0x01;
|
||||
data_flow[ii++] = 2;
|
||||
data_flow[ii++] = open_res->acn_data.acn;
|
||||
data_flow[ii++] = open_res->acn_data.acn_ver;
|
||||
}
|
||||
if((open_res->param_flag & 0x02)) // has specific info
|
||||
{
|
||||
data_flow[ii++] = 0x02;
|
||||
len = open_res->specific_info.info_len;
|
||||
data_flow[ii++] = len;
|
||||
memcpy(data_flow + ii, open_res->specific_info.info_data, len);
|
||||
ii += len;
|
||||
}
|
||||
if((open_res->param_flag & 0x10)) // has refuse reason
|
||||
{
|
||||
data_flow[ii++] = 0x03;
|
||||
data_flow[ii++] = 1;
|
||||
data_flow[ii++] = open_res->refuse_reason;
|
||||
}
|
||||
if((open_res->param_flag & 0x20)) // has provider error
|
||||
{
|
||||
data_flow[ii++] = 0x04;
|
||||
data_flow[ii++] = 1;
|
||||
data_flow[ii++] = open_res->provider_error;
|
||||
}
|
||||
if(delimiter_flag == 1)
|
||||
{
|
||||
data_flow[ii++] = 0x10;
|
||||
data_flow[ii++] = 0x00;
|
||||
}
|
||||
data_flow[ii++] = 0x00;
|
||||
}
|
||||
break;
|
||||
case MAP_CLOSE:
|
||||
close_arg = (MapClose_Arg *) & com_ptr->dlg_list.close_arg;
|
||||
data_flow[ii++] = close_arg->release_method;
|
||||
data_flow[ii++] = 0x01; // optional point
|
||||
if((close_arg->param_flag & 0x02)) // has specific info
|
||||
{
|
||||
data_flow[ii++] = 0x01;
|
||||
len = close_arg->specific_info.info_len;
|
||||
data_flow[ii++] = len;
|
||||
memcpy(data_flow + ii, close_arg->specific_info.info_data, len);
|
||||
ii += len;
|
||||
}
|
||||
data_flow[ii++] = 0x00;
|
||||
break;
|
||||
case MAP_U_ABORT:
|
||||
uabrt_arg = (MapUAbort_Arg *) & com_ptr->dlg_list.uabort_arg;
|
||||
data_flow[ii++] = uabrt_arg->user_reason;
|
||||
data_flow[ii++] = 0x01; // optional point
|
||||
if((uabrt_arg->param_flag & 0x02))
|
||||
{
|
||||
data_flow[ii++] = 0x01;
|
||||
data_flow[ii++] = 1;
|
||||
data_flow[ii++] = uabrt_arg->diag_info;
|
||||
}
|
||||
if((uabrt_arg->param_flag & 0x04)) // has specific info
|
||||
{
|
||||
data_flow[ii++] = 0x02;
|
||||
len = uabrt_arg->specific_info.info_len;
|
||||
data_flow[ii++] = len;
|
||||
memcpy(data_flow + ii, uabrt_arg->specific_info.info_data, len);
|
||||
ii += len;
|
||||
}
|
||||
data_flow[ii++] = 0x00;
|
||||
break;
|
||||
case MAP_P_ABORT:
|
||||
data_flow[ii++] = com_ptr->dlg_list.pabort_arg.provider_reason;
|
||||
data_flow[ii++] = com_ptr->dlg_list.pabort_arg.source;
|
||||
break;
|
||||
case MAP_NOTICE:
|
||||
data_flow[ii++] = com_ptr->dlg_list.notice_arg.problem;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ii -= 2;
|
||||
data_flow[0] = ii >> 8;
|
||||
data_flow[1] = ii;
|
||||
}
|
||||
|
||||
u8 cap_opr_ftos(struct MapOprData_struct *opr_ptr, u8 * data_flow)
|
||||
{ // transfer opration data flow to structure
|
||||
u32 aa;
|
||||
u32 len;
|
||||
u8 ii;
|
||||
u8 delimiter_flag = 0;
|
||||
|
||||
len = (data_flow[0] << 8) + data_flow[1];
|
||||
if(len < 10)
|
||||
return 0;
|
||||
if(data_flow[2] != CAP_FLAG)
|
||||
return 0;
|
||||
opr_ptr->port_id = (data_flow[3] << 8) + data_flow[4];
|
||||
opr_ptr->dialogue_id = (data_flow[6] << 8) + data_flow[7];
|
||||
opr_ptr->message_type = data_flow[9];
|
||||
opr_ptr->message_flag = data_flow[10];
|
||||
opr_ptr->invoke_id = data_flow[11];
|
||||
opr_ptr->param_flag = 0x1f;
|
||||
opr_ptr->param_len = 0;
|
||||
aa = 13;
|
||||
for(ii = 0; ii < 2; ii++)
|
||||
{
|
||||
if(data_flow[aa] == 0x00)
|
||||
break;
|
||||
else if(data_flow[aa] == 0x01) // parameter
|
||||
{
|
||||
len = (data_flow[aa + 1] << 8) + data_flow[aa + 2];
|
||||
if(len > MAX_MAPPOPR_LEN)
|
||||
return 0;
|
||||
opr_ptr->param_len = len;
|
||||
memcpy(opr_ptr->param, &data_flow[aa + 3], len);
|
||||
aa += len + 3;
|
||||
opr_ptr->param_flag |= 0x20;
|
||||
}
|
||||
else if(data_flow[aa] == 0x02) // user error
|
||||
{
|
||||
opr_ptr->user_error = data_flow[aa + 2];
|
||||
opr_ptr->param_flag |= 0x40;
|
||||
aa += 3;
|
||||
}
|
||||
else if(data_flow[aa] == 0x03) // provider error
|
||||
{
|
||||
opr_ptr->provider_error = data_flow[aa + 2];
|
||||
opr_ptr->param_flag |= 0x80;
|
||||
aa += 3;
|
||||
}
|
||||
else if(data_flow[aa] == 0x10)
|
||||
{
|
||||
delimiter_flag = 1;
|
||||
aa += 2;
|
||||
}
|
||||
}
|
||||
if(delimiter_flag == 1)
|
||||
return 2;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
void cap_opr_stof(struct MapOprData_struct *opr_ptr, u8 * data_flow, u8 delimiter_flag)
|
||||
{ // transfer opration structure to data flow
|
||||
u32 ii;
|
||||
u32 len;
|
||||
|
||||
data_flow[2] = CAP_FLAG;
|
||||
data_flow[3] = opr_ptr->port_id >> 8;
|
||||
data_flow[4] = opr_ptr->port_id;
|
||||
data_flow[6] = opr_ptr->dialogue_id >> 8;
|
||||
data_flow[7] = opr_ptr->dialogue_id;
|
||||
data_flow[9] = opr_ptr->message_type;
|
||||
data_flow[10] = opr_ptr->message_flag;
|
||||
data_flow[11] = opr_ptr->invoke_id;
|
||||
data_flow[12] = 1;
|
||||
ii = 13;
|
||||
if((opr_ptr->param_flag & 0x20)) // has component
|
||||
{
|
||||
data_flow[ii++] = 0x01;
|
||||
len = opr_ptr->param_len;
|
||||
data_flow[ii++] = len >> 8;
|
||||
data_flow[ii++] = len;
|
||||
memcpy(data_flow + ii, opr_ptr->param, len);
|
||||
ii += len;
|
||||
}
|
||||
if((opr_ptr->param_flag & 0x40)) // has user error
|
||||
{
|
||||
data_flow[ii++] = 0x02;
|
||||
data_flow[ii++] = 1;
|
||||
data_flow[ii++] = opr_ptr->user_error;
|
||||
}
|
||||
if((opr_ptr->param_flag & 0x80)) // has provider error
|
||||
{
|
||||
data_flow[ii++] = 0x03;
|
||||
data_flow[ii++] = 1;
|
||||
data_flow[ii++] = opr_ptr->provider_error;
|
||||
}
|
||||
if(delimiter_flag == 1)
|
||||
{
|
||||
data_flow[ii++] = 0x10;
|
||||
data_flow[ii++] = 0x00;
|
||||
}
|
||||
data_flow[ii++] = 0;
|
||||
ii -= 2;
|
||||
data_flow[0] = ii >> 8;
|
||||
data_flow[1] = ii;
|
||||
}
|
||||
14
plat/xapp/src/capp/cap_public.h
Normal file
14
plat/xapp/src/capp/cap_public.h
Normal file
@@ -0,0 +1,14 @@
|
||||
/* CAP public function head file */
|
||||
/* Written by Liu Zhiguo 2003-08-26 */
|
||||
/* Version 1.0 */
|
||||
/* -------------------------------- */
|
||||
|
||||
#ifndef _CAP_PUBLIC
|
||||
#define _CAP_PUBLIC
|
||||
|
||||
u8 cap_com_ftos(struct MapComSrv_struct *map_com, u8 * data_flow);
|
||||
void cap_com_stof(struct MapComSrv_struct *com_ptr, u8 * data_flow, u8 delimiter_flag);
|
||||
u8 cap_opr_ftos(struct MapOprData_struct *opr_ptr, u8 * data_flow);
|
||||
void cap_opr_stof(struct MapOprData_struct *opr_ptr, u8 * data_flow, u8 delimiter_flag);
|
||||
|
||||
#endif
|
||||
20
plat/xapp/src/capp/icap.h
Normal file
20
plat/xapp/src/capp/icap.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/* CAP message interface head file */
|
||||
/* Written by Liu Zhiguo 2003-08-26 */
|
||||
/* Version 1.0 */
|
||||
/* -------------------------------- */
|
||||
|
||||
#ifndef _CAP_INTERFACE
|
||||
#define _CAP_INTERFACE
|
||||
|
||||
#include "cap_head.h"
|
||||
#include "cap_msg.h"
|
||||
|
||||
int encode_capmsg(struct CapArg caparg, u8 * msgbuf, u16 maxlen);
|
||||
|
||||
#ifdef _SRF_RELEVANT
|
||||
int decode_capmsg(char *msgbuf, u16 msglen, u8 ocode, u8 otype, struct CapArg *pcaparg);
|
||||
#else
|
||||
int decode_capmsg(char *msgbuf, u16 msglen, u8 ocode, struct CapArg *pcaparg);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
1054
plat/xapp/src/conv_prefix.c
Normal file
1054
plat/xapp/src/conv_prefix.c
Normal file
File diff suppressed because it is too large
Load Diff
72
plat/xapp/src/conv_prefix.h
Normal file
72
plat/xapp/src/conv_prefix.h
Normal file
@@ -0,0 +1,72 @@
|
||||
#ifndef _CONV_PREFIX_H
|
||||
#define _CONV_PREFIX_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#define MAX_CONV_PREFIX 128
|
||||
#define MAX_CLI_PREFIX 64
|
||||
#define MAX_PREFIX_LEN 16
|
||||
#define MAX_NAME_LEN 8
|
||||
|
||||
#define MAX_PLAT_NAME_LEN 24
|
||||
#define MAX_PLAT_NAME_INSTANCE 256
|
||||
|
||||
typedef struct conv_prefix_record
|
||||
{
|
||||
u_char used_flag;
|
||||
char prefix[MAX_PREFIX_LEN];
|
||||
char delete_length;
|
||||
char add_length;
|
||||
char add_digits[MAX_PREFIX_LEN];
|
||||
u_char valid_length;
|
||||
}_conv_prefix_record;
|
||||
|
||||
typedef struct cli_prefix
|
||||
{
|
||||
u_char in_property;
|
||||
char prefix[MAX_PREFIX_LEN];
|
||||
char delete_length;
|
||||
u_char out_property;
|
||||
char add_length;
|
||||
char add_digits[MAX_PREFIX_LEN];
|
||||
u_char valid_length;
|
||||
}_cli_prefix;
|
||||
|
||||
typedef struct xapp_group_prefix
|
||||
{
|
||||
char startNumber[MAX_PREFIX_LEN+1];
|
||||
char endNumber[MAX_PREFIX_LEN+1];
|
||||
u_char repStartDigit;
|
||||
u_char repEndDigit;
|
||||
char repDigitWith[MAX_PREFIX_LEN+1];
|
||||
u_char status; /* 0=unlock, 1=lock */
|
||||
char cReserved[MAX_PREFIX_LEN];
|
||||
}_xapp_group_prefix;
|
||||
|
||||
typedef struct conv_prefix
|
||||
{
|
||||
_conv_prefix_record conv_prefix[MAX_CONV_PREFIX];
|
||||
_cli_prefix cli_prefix[MAX_CLI_PREFIX];
|
||||
char conv_name[MAX_CONV_PREFIX][MAX_NAME_LEN];
|
||||
char cli_name[MAX_CLI_PREFIX][MAX_NAME_LEN];
|
||||
char plat_name[MAX_PLAT_NAME_INSTANCE][MAX_PLAT_NAME_LEN];
|
||||
_xapp_group_prefix group_conv_prefix[MAX_CONV_PREFIX];
|
||||
}_conv_prefix;
|
||||
|
||||
int snmpSetConvPrefix(u_char oidlen,DWORD *oid,u_char *pdata,u_short datalen);
|
||||
int snmpGetConvPrefix(u_char oidlen,DWORD *oid,u_char *pdata,u_char *vartype);
|
||||
int snmpSetCliPrefix(u_char oidlen,DWORD *oid,u_char *pdata,u_short datalen);
|
||||
int snmpGetCliPrefix(u_char oidlen,DWORD *oid,u_char *pdata,u_char *vartype);
|
||||
int snmpSetPlatName(u_char oidlen,DWORD *oid,u_char *pdata,u_short datalen);
|
||||
int snmpGetPlatName(u_char oidlen,DWORD *oid,u_char *pdata,u_char *vartype);
|
||||
int msisdnUnkToInt(char *msisdn_unk, char *msisdn_int);
|
||||
int cliUptoCalled(char *caller, char *called);
|
||||
int saveConvPrefix();
|
||||
|
||||
/* return value:
|
||||
-1 = error length;
|
||||
0 = cannn't find appropriate prefix;
|
||||
1 = conv. succeed
|
||||
*/
|
||||
|
||||
#endif
|
||||
66
plat/xapp/src/ixap.h
Normal file
66
plat/xapp/src/ixap.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/* XAP provider interface head file */
|
||||
/* Written by Liu Zhiguo 2003-03-13 */
|
||||
/* Version 1.0 */
|
||||
/* -------------------------------- */
|
||||
|
||||
#ifndef _XAP_INTERFACE
|
||||
#define _XAP_INTERFACE
|
||||
|
||||
#include "mapp/imap.h"
|
||||
#include "capp/icap.h"
|
||||
|
||||
/* defined in xap_interface.c */
|
||||
void xap_get_mcc(u8 *mcc);
|
||||
void xap_get_mnc(u8 *mnc);
|
||||
void xap_get_cc(u8 *cc);
|
||||
void xap_get_ndc(u8 *ndc);
|
||||
void xap_get_interprefix(u8 *inter_prefix);
|
||||
void xap_get_nationalprefix(u8 *national_prefix);
|
||||
void xap_get_localprefix(u8 *local_prefix);
|
||||
int xap_mscid_to_num(u8 *mscid,u8 ssn, u8 *num);
|
||||
|
||||
int imap_reg_ssn(u8 ssn);
|
||||
u8 map_check_sendcom(u32 did);
|
||||
u8 map_send_comdata(u8 *data_flow); // send map common service data
|
||||
u8 map_check_sendopr(u32 did);
|
||||
u8 map_send_oprdata(u8 *data_flow); // send map operation service data
|
||||
u8 map_get_comdata(u8 *data_flow,u32 did);
|
||||
u8 map_get_open(u8 *data_flow,u8 ssn);
|
||||
u8 map_get_oprdata(u8 *data_flow,u32 did);
|
||||
u32 map_get_dialogueid(u8 ssn);
|
||||
u8 map_get_invokeid(u32 did);
|
||||
u8 map_check_map_flag(u32 did);
|
||||
u8 map_send_oprsrv( MapOprSrv_struct *srv_ptr, u8 DelimiterFlag , u8 *data_flow);
|
||||
u8 map_send_comsrv(MapComSrv_struct *com_ptr,u8 uDelimiterFlag,u8 *data_flow);
|
||||
u8 map_send_open( MapOpenArgParam *pOpenParam , u8 *uDataFlow );
|
||||
u8 map_send_close( u32 pid , u32 did , u8 uCloseReasion );
|
||||
u8 map_extract_param(MapOprSrv_struct *srv_ptr,MapOprData_struct *data_ptr , int ver);
|
||||
u8 map_get_comdata_struct(MapComSrv_struct *map_com,u32 did);
|
||||
u8 map_get_oprdata_struct(MapOprData_struct *map_opr,u32 did);
|
||||
|
||||
u32 is41_get_dialogueid(u8 ssn);
|
||||
|
||||
int icap_reg_ssn(u8 ssn);
|
||||
u8 cap_check_sendcom(u32 did);
|
||||
u8 cap_send_comdata(u8 *data_flow); // send cap common service data
|
||||
u8 cap_check_sendopr(u32 did);
|
||||
u8 cap_send_oprdata(u8 *data_flow); // send cap operation service data
|
||||
u8 cap_get_comdata(u8 *data_flow,u32 did);
|
||||
u8 cap_get_open(u8 *data_flow,u8 ssn);
|
||||
u8 cap_get_oprdata(u8 *data_flow,u32 did);
|
||||
u32 cap_get_dialogueid(u8 ssn);
|
||||
u8 cap_get_invokeid(u32 did);
|
||||
|
||||
/* defined in xap_provider.c */
|
||||
u8 map_get_acnver(SCCP_ADDR *sccp_ptr,u8 acn);
|
||||
u8 map_set_acnver(SCCP_ADDR *sccp_ptr,u8 acn,u8 acn_ver);
|
||||
void xap_init( int grantdid );
|
||||
void xap_fsm();
|
||||
|
||||
int snmpGetCliPrefix(u_char oidlen,DWORD *oid,u_char *pdata,u_char *vartype);
|
||||
int snmpSetCliPrefix(u_char oidlen,DWORD *oid,u_char *pdata,u_short datalen);
|
||||
int saveConvPrefix();
|
||||
u8 init_mappconst(void);
|
||||
u8 init_cappconst(void);
|
||||
void wxc2_trace_xapp(u32 did);
|
||||
#endif
|
||||
942
plat/xapp/src/mapp/Map_opr.c
Normal file
942
plat/xapp/src/mapp/Map_opr.c
Normal file
@@ -0,0 +1,942 @@
|
||||
#include "map_includes.h"
|
||||
|
||||
/**************** vlr inquery opr ********************/
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding MapDetermineOprUser Arg argument */
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_MapDetermineOprUserArg(struct MapDetermineOprUser_Arg *dou_ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 tag1=1;
|
||||
char tlv1[32];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = dou_ptr->param_flag;
|
||||
if (flag & 0x01) // has imsi
|
||||
{
|
||||
sprintf(tlv1,"0-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,dou_ptr->imsi,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapDetermineOprUserArg loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
if (flag & 0x02) // has imei
|
||||
{
|
||||
sprintf(tlv1,"1-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMEI_LEN,dou_ptr->imei,0x80,&asn_buf);//add imei parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapDetermineOprUserArg loss IMEI");
|
||||
return RER;
|
||||
}
|
||||
if (flag & 0x04) //has roamingRestraintFlag
|
||||
{
|
||||
sprintf(tlv1,"2-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&dou_ptr->roamingRestraintFlag,0x80,&asn_buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapDetermineOprUserArg loss roamingRestraintFlag");
|
||||
return RER;
|
||||
}
|
||||
dou_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_MapDetermineOprUserArg(struct MapDetermineOprUser_Arg *dou_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
dou_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract_MapDetermineOprUserArg param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); // get imsi
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
memcpy(dou_ptr->imsi,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapDetermineOprUserArg:loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
|
||||
len = get_tlv("1",temp_buf,&asn_buf);
|
||||
if (len == IMEI_LEN) // get imei
|
||||
{
|
||||
flag |= 0x02;
|
||||
memcpy(dou_ptr->imei,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapDetermineOprUserArg:loss IMEI");
|
||||
return RER;
|
||||
}
|
||||
|
||||
len = get_tlv("2",temp_buf,&asn_buf); //get roamingRestraintFlag
|
||||
if (len == 1)
|
||||
{
|
||||
dou_ptr->roamingRestraintFlag = temp_buf[0];
|
||||
flag |= 0x04;
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapDetermineOprUserArg:loss roamingRestraintFlag");
|
||||
return RER;
|
||||
}
|
||||
dou_ptr->param_flag = flag;
|
||||
return ROK;
|
||||
}
|
||||
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding MapDetermineOprUser Response */
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_MapDetermineOprUserRes(struct MapDetermineOprUser_Res *dou_ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 tag1=1;
|
||||
char tlv1[32];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = dou_ptr->param_flag;
|
||||
if (flag & 0x01) // has imsi
|
||||
{
|
||||
sprintf(tlv1,"0-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,dou_ptr->imsi,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapDetermineOprUserRes loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
if (flag & 0x02) // has imei
|
||||
{
|
||||
sprintf(tlv1,"1-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMEI_LEN,dou_ptr->imei,0x80,&asn_buf);//add imei parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapDetermineOprUserRes loss IMEI");
|
||||
return RER;
|
||||
}
|
||||
if (flag & 0x04) //has oprFlag
|
||||
{
|
||||
sprintf(tlv1,"2-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&dou_ptr->oprflag,0x80,&asn_buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapDetermineOprUserRes loss oprFlag");
|
||||
return RER;
|
||||
}
|
||||
if (flag & 0x08) //has msisdn
|
||||
{
|
||||
sprintf(tlv1,"3-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,dou_ptr->msisdn[0],dou_ptr->msisdn+1,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
dou_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_MapDetermineOprUserRes(struct MapDetermineOprUser_Res *dou_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
dou_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract_MapDetermineOprUserRes param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); // get imsi
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
memcpy(dou_ptr->imsi,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapDetermineOprUserRes:loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
|
||||
len = get_tlv("1",temp_buf,&asn_buf);
|
||||
if (len == IMEI_LEN) // get imei
|
||||
{
|
||||
flag |= 0x02;
|
||||
memcpy(dou_ptr->imei,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapDetermineOprUserRes:loss IMEI");
|
||||
return RER;
|
||||
}
|
||||
|
||||
len = get_tlv("2",temp_buf,&asn_buf); //get oprflag
|
||||
if (len == 1)
|
||||
{
|
||||
dou_ptr->oprflag = temp_buf[0];
|
||||
flag |= 0x04;
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapDetermineOprUserRes:loss oprflag");
|
||||
return RER;
|
||||
}
|
||||
len = get_tlv("3",temp_buf,&asn_buf); //get msisdn
|
||||
if (len > 1 && len <= ISDN_LEN)
|
||||
{
|
||||
flag |= 0x08;
|
||||
dou_ptr->msisdn[0] = len;
|
||||
memcpy(dou_ptr->msisdn+1,temp_buf,len);
|
||||
}
|
||||
|
||||
dou_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
/**************** opr updataLocation vlr ********************/
|
||||
int assign_MapVlrUpdateLocationArg(struct MapVlrUpdateLocation_Arg *cuwm_ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 tag1=1;
|
||||
char tlv1[32];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = cuwm_ptr->param_flag;
|
||||
if (flag & 0x01) // has imsi
|
||||
{
|
||||
sprintf(tlv1,"0-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,cuwm_ptr->imsi,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapVlrUpdateLocationArg loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
if (flag & 0x02) // has oprflag
|
||||
{
|
||||
sprintf(tlv1,"1-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&cuwm_ptr->status,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapVlrUpdateLocationArg loss status");
|
||||
return RER;
|
||||
}
|
||||
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
|
||||
int extract_MapVlrUpdateLocationArg(struct MapVlrUpdateLocation_Arg *cuwm_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
cuwm_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract_MapVlrUpdateLocationArg param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); // get imsi
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
memcpy(cuwm_ptr->imsi,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapVlrUpdateLocationArg:loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
len = get_tlv("1",temp_buf,&asn_buf);/* get status */
|
||||
if (len == 1)
|
||||
{
|
||||
flag |= 0x02;
|
||||
cuwm_ptr->status = temp_buf[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapVlrUpdateLocationArg:loss status");
|
||||
return RER;
|
||||
}
|
||||
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int assign_MapVlrUpdateLocationRes(struct MapVlrUpdateLocation_Res *cuwm_ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 tag1=1;
|
||||
char tlv1[32];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = cuwm_ptr->param_flag;
|
||||
if (flag & 0x01) // has imsi
|
||||
{
|
||||
sprintf(tlv1,"0-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,cuwm_ptr->imsi,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
|
||||
if (flag & 0x02) // has status
|
||||
{
|
||||
sprintf(tlv1,"1-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&cuwm_ptr->status,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
|
||||
if (flag & 0x04) //has error
|
||||
{
|
||||
sprintf(tlv1,"2-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&cuwm_ptr->error,0x80,&asn_buf);
|
||||
}
|
||||
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_MapVlrUpdateLocationRes(struct MapVlrUpdateLocation_Res *cuwm_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
cuwm_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract_MapVlrUpdateLocationRes param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); // get imsi
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
memcpy(cuwm_ptr->imsi,temp_buf,len);
|
||||
}
|
||||
|
||||
|
||||
len = get_tlv("1",temp_buf,&asn_buf);
|
||||
if (len == 1)
|
||||
{
|
||||
flag |= 0x02;
|
||||
cuwm_ptr->status = temp_buf[0];
|
||||
}
|
||||
|
||||
len = get_tlv("2",temp_buf,&asn_buf); //get reult
|
||||
if (len == 1)
|
||||
{
|
||||
cuwm_ptr->error = temp_buf[0];
|
||||
flag |= 0x04;
|
||||
}
|
||||
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
|
||||
/**************** opr create hlr ********************/
|
||||
int assign_MapCreateUserWithMsisdnImsiArg(struct MapCreateUserWithMsisdnImsi_Arg *cuwm_ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 tag1=1;
|
||||
char tlv1[32];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = cuwm_ptr->param_flag;
|
||||
if (flag & 0x01) // has imsi
|
||||
{
|
||||
sprintf(tlv1,"0-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,cuwm_ptr->imsi,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapCreateUserWithMsisdnImsiArg loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
if (flag & 0x02) // has msisdn
|
||||
{
|
||||
sprintf(tlv1,"1-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,cuwm_ptr->msisdn[0],cuwm_ptr->msisdn+1,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapCreateUserWithMsisdnImsiArg loss MSISDN");
|
||||
return RER;
|
||||
}
|
||||
|
||||
if (flag & 0x04) //has imsiFlag
|
||||
{
|
||||
sprintf(tlv1,"2-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&cuwm_ptr->imsiflag,0x80,&asn_buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapCreateUserWithMsisdnImsiArg loss imsiFlag");
|
||||
return RER;
|
||||
}
|
||||
|
||||
if (flag & 0x08) //has camelFlag
|
||||
{
|
||||
sprintf(tlv1,"3-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&cuwm_ptr->camelflag,0x80,&asn_buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapCreateUserWithMsisdnImsiArg loss camelflag");
|
||||
return RER;
|
||||
}
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
|
||||
int extract_MapCreateUserWithMsisdnImsiArg(struct MapCreateUserWithMsisdnImsi_Arg *cuwm_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
cuwm_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract_MapCreateUserWithMsisdnImsiArg param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); // get imsi
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
memcpy(cuwm_ptr->imsi,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapCreateUserWithMsisdnImsiArg:loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
|
||||
len = get_tlv("1",temp_buf,&asn_buf);
|
||||
if (len > 1 && len <= ISDN_LEN)
|
||||
{
|
||||
flag |= 0x02;
|
||||
cuwm_ptr->msisdn[0] = len;
|
||||
memcpy(cuwm_ptr->msisdn+1,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapCreateUserWithMsisdnImsiArg:msisdn length error");
|
||||
return RER;
|
||||
}
|
||||
|
||||
len = get_tlv("2",temp_buf,&asn_buf); //get imsiflag
|
||||
if (len == 1)
|
||||
{
|
||||
cuwm_ptr->imsiflag = temp_buf[0];
|
||||
flag |= 0x04;
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapCreateUserWithMsisdnImsiArg:loss roamingRestraintFlag");
|
||||
return RER;
|
||||
}
|
||||
len = get_tlv("3",temp_buf,&asn_buf); //get camelflag
|
||||
if (len == 1)
|
||||
{
|
||||
cuwm_ptr->camelflag = temp_buf[0];
|
||||
flag |= 0x08;
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapCreateUserWithMsisdnImsiArg:loss camelflag");
|
||||
return RER;
|
||||
}
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int assign_MapCreateUserWithMsisdnImsiRes(struct MapCreateUserWithMsisdnImsi_Res *cuwm_ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 tag1=1;
|
||||
char tlv1[32];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = cuwm_ptr->param_flag;
|
||||
if (flag & 0x01) // has imsi
|
||||
{
|
||||
sprintf(tlv1,"0-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,cuwm_ptr->imsi,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
|
||||
if (flag & 0x02) // has msisdn
|
||||
{
|
||||
sprintf(tlv1,"1-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,cuwm_ptr->msisdn[0],cuwm_ptr->msisdn+1,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
|
||||
|
||||
if (flag & 0x04) //has result
|
||||
{
|
||||
sprintf(tlv1,"2-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&cuwm_ptr->result,0x80,&asn_buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapCreateUserWithMsisdnImsiRes loss result");
|
||||
return RER;
|
||||
}
|
||||
|
||||
if (flag & 0x08) //has cause
|
||||
{
|
||||
sprintf(tlv1,"3-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&cuwm_ptr->cause,0x80,&asn_buf);
|
||||
}
|
||||
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_MapCreateUserWithMsisdnImsiRes(struct MapCreateUserWithMsisdnImsi_Res *cuwm_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
cuwm_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract_MapCreateUserWithMsisdnImsiRes param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); // get imsi
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
memcpy(cuwm_ptr->imsi,temp_buf,len);
|
||||
}
|
||||
|
||||
|
||||
len = get_tlv("1",temp_buf,&asn_buf);
|
||||
if (len > 1 && len <= ISDN_LEN)
|
||||
{
|
||||
flag |= 0x02;
|
||||
cuwm_ptr->msisdn[0] = len;
|
||||
memcpy(cuwm_ptr->msisdn+1,temp_buf,len);
|
||||
}
|
||||
|
||||
|
||||
len = get_tlv("2",temp_buf,&asn_buf); //get reult
|
||||
if (len == 1)
|
||||
{
|
||||
cuwm_ptr->result = temp_buf[0];
|
||||
flag |= 0x04;
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapCreateUserWithMsisdnImsiArg:loss result");
|
||||
return RER;
|
||||
}
|
||||
|
||||
len = get_tlv("3",temp_buf,&asn_buf); //get cause
|
||||
if (len == 1)
|
||||
{
|
||||
cuwm_ptr->cause = temp_buf[0];
|
||||
flag |= 0x08;
|
||||
}
|
||||
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*********** opr delete hlr ***************************/
|
||||
int assign_MapDeleteOprUserArg(struct MapDeleteOprUser_Arg *dou_ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 tag1=1;
|
||||
char tlv1[32];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = dou_ptr->param_flag;
|
||||
if (flag & 0x01) // has imsi
|
||||
{
|
||||
sprintf(tlv1,"0-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,dou_ptr->imsi,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapDeleteOprUserArg loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
|
||||
if (flag & 0x02) // has msisdn
|
||||
{
|
||||
sprintf(tlv1,"1-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,dou_ptr->msisdn[0],dou_ptr->msisdn+1,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapDeleteOprUserArg loss MSISDN");
|
||||
return RER;
|
||||
}
|
||||
|
||||
dou_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
|
||||
int extract_MapDeleteOprUserArg(struct MapDeleteOprUser_Arg *dou_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
dou_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract_MapDeleteOprUserArg param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); // get imsi
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
memcpy(dou_ptr->imsi,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapDeleteOprUserArg:loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
|
||||
len = get_tlv("1",temp_buf,&asn_buf);
|
||||
if (len > 1 && len <= ISDN_LEN)
|
||||
{
|
||||
flag |= 0x02;
|
||||
dou_ptr->msisdn[0] = len;
|
||||
memcpy(dou_ptr->msisdn+1,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapDeleteOprUserArg:msisdn length error");
|
||||
return RER;
|
||||
}
|
||||
|
||||
dou_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int assign_MapDeleteOprUserRes(struct MapDeleteOprUser_Res *dou_ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 tag1=1;
|
||||
char tlv1[32];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = dou_ptr->param_flag;
|
||||
if (flag & 0x01) // has imsi
|
||||
{
|
||||
sprintf(tlv1,"0-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,dou_ptr->imsi,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
|
||||
if (flag & 0x02) // has msisdn
|
||||
{
|
||||
sprintf(tlv1,"1-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,dou_ptr->msisdn[0],dou_ptr->msisdn+1,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
|
||||
|
||||
if (flag & 0x04) //has result
|
||||
{
|
||||
sprintf(tlv1,"2-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&dou_ptr->result,0x80,&asn_buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapDeleteOprUserRes loss result");
|
||||
return RER;
|
||||
}
|
||||
|
||||
if (flag & 0x08) //has cause
|
||||
{
|
||||
sprintf(tlv1,"3-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&dou_ptr->cause,0x80,&asn_buf);
|
||||
}
|
||||
|
||||
dou_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_MapDeleteOprUserRes(struct MapDeleteOprUser_Res *dou_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
dou_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract_MapDeleteOprUserRes param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); // get imsi
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
memcpy(dou_ptr->imsi,temp_buf,len);
|
||||
}
|
||||
|
||||
len = get_tlv("1",temp_buf,&asn_buf);
|
||||
if (len > 1 && len <= ISDN_LEN)
|
||||
{
|
||||
flag |= 0x02;
|
||||
dou_ptr->msisdn[0] = len;
|
||||
memcpy(dou_ptr->msisdn+1,temp_buf,len);
|
||||
}
|
||||
|
||||
|
||||
len = get_tlv("2",temp_buf,&asn_buf); //get reult
|
||||
if (len == 1)
|
||||
{
|
||||
dou_ptr->result = temp_buf[0];
|
||||
flag |= 0x04;
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapDeleteOprUserRes:loss result");
|
||||
return RER;
|
||||
}
|
||||
|
||||
len = get_tlv("3",temp_buf,&asn_buf); //get cause
|
||||
if (len == 1)
|
||||
{
|
||||
dou_ptr->cause = temp_buf[0];
|
||||
flag |= 0x08;
|
||||
}
|
||||
|
||||
dou_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
|
||||
int assign_MapVlrEnquiryIMDM_Arg(struct MapVlrEnquiryIMDM_Arg *cuwm_ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 tag1=1;
|
||||
char tlv1[32];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = cuwm_ptr->param_flag;
|
||||
if (flag & 0x01) // has imsi
|
||||
{
|
||||
sprintf(tlv1,"0-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,cuwm_ptr->imsi,0x80,&asn_buf);//add imsi parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapVlrEnquiryIMDM_Arg loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
if (flag & 0x02) // has msisdn
|
||||
{
|
||||
sprintf(tlv1,"1-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,cuwm_ptr->msisdn[0],cuwm_ptr->msisdn+1,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapCreateUserWithMsisdnImsiArg loss MSISDN");
|
||||
return RER;
|
||||
}
|
||||
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
|
||||
int assign_MapVlrEnquiryIMDM_Res(struct MapVlrEnquiryIMDM_Res *cuwm_ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 tag1=1;
|
||||
char tlv1[32];
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = cuwm_ptr->param_flag;
|
||||
if (flag & 0x01) // has imsi
|
||||
{
|
||||
sprintf(tlv1,"0-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,IMSI_LEN,cuwm_ptr->imsi,0x80,&asn_buf);//add imsi parameter
|
||||
}
|
||||
|
||||
if (flag & 0x02) // has msisdn
|
||||
{
|
||||
sprintf(tlv1,"1-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,cuwm_ptr->msisdn[0],cuwm_ptr->msisdn+1,0x80,&asn_buf);//add msisdn parameter
|
||||
}
|
||||
|
||||
if (flag & 0x04) // has status
|
||||
{
|
||||
sprintf(tlv1,"2-%d",tag1++);
|
||||
buf_len = add_tlv(tlv1,1,&cuwm_ptr->status,0x80,&asn_buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("assign MapVlrEnquiryIMDM_Arg loss staus");
|
||||
return RER;
|
||||
}
|
||||
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
|
||||
int extract_MapVlrEnquiryIMDM_Arg(struct MapVlrEnquiryIMDM_Arg *cuwm_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
cuwm_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract_MapVlrEnquiryIMDM_Arg param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); // get imsi
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
memcpy(cuwm_ptr->imsi,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapVlrEnquiryIMDM_Arg:loss IMSI");
|
||||
return RER;
|
||||
}
|
||||
|
||||
len = get_tlv("1",temp_buf,&asn_buf);
|
||||
if (len > 1 && len <= ISDN_LEN)
|
||||
{
|
||||
flag |= 0x02;
|
||||
cuwm_ptr->msisdn[0] = len;
|
||||
memcpy(cuwm_ptr->msisdn+1,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapVlrEnquiryIMDM_Arg:msisdn length error");
|
||||
return RER;
|
||||
}
|
||||
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_MapVlrEnquiryIMDM_Res(struct MapVlrEnquiryIMDM_Res *cuwm_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
cuwm_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract_MapVlrEnquiryIMDM_Res param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); // get imsi
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
memcpy(cuwm_ptr->imsi,temp_buf,len);
|
||||
}
|
||||
|
||||
len = get_tlv("1",temp_buf,&asn_buf);
|
||||
if (len > 1 && len <= ISDN_LEN)
|
||||
{
|
||||
flag |= 0x02;
|
||||
cuwm_ptr->msisdn[0] = len;
|
||||
memcpy(cuwm_ptr->msisdn+1,temp_buf,len);
|
||||
}
|
||||
|
||||
len = get_tlv("2",temp_buf,&asn_buf);/* status */
|
||||
if (len == 1)
|
||||
{
|
||||
flag |= 0x04;
|
||||
cuwm_ptr->status = temp_buf[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract MapVlrEnquiryIMDM_Res:status loss");
|
||||
return RER;
|
||||
}
|
||||
|
||||
|
||||
cuwm_ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
22
plat/xapp/src/mapp/imap.h
Normal file
22
plat/xapp/src/mapp/imap.h
Normal file
@@ -0,0 +1,22 @@
|
||||
/* MAP message interface head file */
|
||||
/* Written by Liu Zhiguo 2003-08-26 */
|
||||
/* Version 1.0 */
|
||||
/* -------------------------------- */
|
||||
|
||||
#ifndef _MAP_INTERFACE
|
||||
#define _MAP_INTERFACE
|
||||
|
||||
#include "../../../sccp/src/include/sccp.h"
|
||||
#include "map_const.h"
|
||||
#include "map_struct.h"
|
||||
|
||||
int build_mapparam(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
u8 extract_mapparam(struct MapOprSrv_struct *opr_ptr,u8 opr_code,u8 opr_flag,u32 pre_param_len,u8 *pre_param);
|
||||
|
||||
int build_is41param(struct MapOprSrv_struct *opr_ptr,u8 *buf); // build is41 service paramter
|
||||
u8 extract_is41param(struct MapOprSrv_struct *opr_ptr,u8 opr_code,u8 opr_flag,u32 pre_param_len,u8 *pre_param);
|
||||
|
||||
void is41_init();
|
||||
void is41_timer();
|
||||
|
||||
#endif
|
||||
110
plat/xapp/src/mapp/is41_code.h
Normal file
110
plat/xapp/src/mapp/is41_code.h
Normal file
@@ -0,0 +1,110 @@
|
||||
/* IS41 code define */
|
||||
/* Created by daniel on 2005-05-27 */
|
||||
/* Modified by daniel on 2005-05-27 */
|
||||
/* -------------------------------------*/
|
||||
#ifndef _IS41_CODE
|
||||
#define _IS41_CODE
|
||||
|
||||
//Authorization Denied reason
|
||||
#define AUTHDEN_DELINQUENT_ACCOUNT 1
|
||||
#define AUTHDEN_INVALID_SERIAL_NUMBER 2
|
||||
#define AUTHDEN_STOLEN_UNIT 3
|
||||
#define AUTHDEN_DUPLICATE_UNIT 4
|
||||
#define AUTHDEN_UNASSIGNED_DIRECTORY_NUMBER 5
|
||||
#define AUTHDEN_UNSPECIFIED 6
|
||||
#define AUTHDEN_MULTIPLE_ACCESS 7
|
||||
#define AUTHDEN_NOT_AUTHORIZED_FOR_THE_MSC 8
|
||||
#define AUTHDEN_MISSING_AUTHENTICATION_PARAMETERS 9
|
||||
#define AUTHDEN_TERMINALTYPE_MISMATCH 10
|
||||
|
||||
#define WXC_SYSTEM_MY_TYPE_CODE 0
|
||||
|
||||
#define CANTYP_SERVING_SYSTEM_OPTION 1
|
||||
#define CANTYP_REPORTINCALL 2
|
||||
#define CANTYP_DISCONTINUE 3
|
||||
|
||||
//type of digits
|
||||
#define TOD_CALLED_PARTY_NUMBER 1
|
||||
#define TOD_CALLING_PARTY_NUMBER 2
|
||||
#define TOD_CALLER_INTERACTION 3
|
||||
#define TOD_ROUTING_NUMBER 4
|
||||
#define TOD_BILLING_NUMBER 5
|
||||
#define TOD_DESTINATION_NUMBER 6//This is the network address of the called party
|
||||
#define TOD_LATA 7
|
||||
#define TOD_CARRIER 8//In North America the three, four, or five digits represent an interexchange or international carrier
|
||||
|
||||
#define QUALCODE_VALIDATION_ONLY 2
|
||||
#define QUALCODE_VALIDATION_AND_PROFILE 3
|
||||
#define QUALCODE_PROFILE_ONLY 4
|
||||
|
||||
#define ACCDEN_UNASSIGNED_DIRECTORY_NUMBER 1
|
||||
#define ACCDEN_INACTIVE 2
|
||||
#define ACCDEN_BUSY 3
|
||||
#define ACCDEN_TERMINATION_DENIED 4
|
||||
#define ACCDEN_NO_PAGE_RESPONSE 5
|
||||
#define ACCDEN_UNAVAILABLE 6
|
||||
|
||||
//DMH_RedirectionIndicator
|
||||
#define REDIND_CFU 1
|
||||
#define REDIND_CFB 2
|
||||
#define REDIND_CFNA 3
|
||||
#define REDIND_CFO 4
|
||||
#define REDIND_CD_UNSPECIFIED 5
|
||||
#define REDIND_CD_PSTN 6
|
||||
#define REDIND_CD_PRIVATE 7
|
||||
#define REDIND_PSTN_TANDEM 8
|
||||
#define REDIND_PRIVATE_TANDEM 9
|
||||
#define REDIND_BUSY 10
|
||||
#define REDIND_INACTIVE 11
|
||||
#define REDIND_UNASSIGNED 12
|
||||
#define REDIND_TERMINATION_DENIED 13
|
||||
#define REDIND_CD_FAILURE 14
|
||||
#define REDIND_ECT 15
|
||||
#define REDIND_MAH 16
|
||||
#define REDIND_FA 17
|
||||
#define REDIND_ABANDONED_CALL_LEG 18
|
||||
#define REDIND_PCA_CALL_REFUSED 19
|
||||
#define REDIND_SCA_CALL_REFUSED 20
|
||||
#define REDIND_DIALOGUE 21
|
||||
#define REDIND_CFD 22
|
||||
#define REDIND_CD_LOCAL 23
|
||||
#define REDIND_VOICE_MAIL_RETRIEVAL 24
|
||||
|
||||
//RedirectionReason
|
||||
#define REDREASON_BUSY 1
|
||||
#define REDREASON_NO_ANSWER 2
|
||||
#define REDREASON_UNCONDITIONAL 3
|
||||
#define REDREASON_NO_PAGE_RESPONSE 4
|
||||
#define REDREASON_UNAVAILABLE 5
|
||||
#define REDREASON_UNROUTABLE 6
|
||||
#define REDREASON_CALL_ACCEPTED 7
|
||||
#define REDREASON_CALL_REFUSED 8
|
||||
|
||||
#define ORIGIND_Prior_agreement 1
|
||||
#define ORIGIND_Origination_denied 2
|
||||
#define ORIGIND_Local_calls_only 3
|
||||
#define ORIGIND_Selected_ldigits 4
|
||||
#define ORIGIND_Selected_ldigits_and_local_call 5
|
||||
#define ORIGIND_National_long_distance 6
|
||||
#define ORIGIND_International_calls 7
|
||||
#define ORIGIND_Single_directory_number 8
|
||||
|
||||
#define AUTHPER_Per_Call 1
|
||||
#define AUTHPER_Hours 2
|
||||
#define AUTHPER_Days 3
|
||||
#define AUTHPER_Weeks 4
|
||||
#define AUTHPER_Per_Agreement 5
|
||||
#define AUTHPER_Indefinite 6
|
||||
#define AUTHPER_Number_of_calls 7
|
||||
|
||||
|
||||
#define ACCTYPE_FLASHREQ 2
|
||||
#define ACCTYPE_REGISTRATION 3
|
||||
#define ACCTYPE_ORIGINATION 4
|
||||
#define ACCTYPE_TERMINATION 5
|
||||
#define ACCTYPE_NOACCESS 6
|
||||
#define ACCTYPE_POWERDOWN 7
|
||||
#define ACCTYPE_SMS_PAGERESPONSE 8
|
||||
|
||||
|
||||
#endif
|
||||
1345
plat/xapp/src/mapp/is41_code_auc.c
Normal file
1345
plat/xapp/src/mapp/is41_code_auc.c
Normal file
File diff suppressed because it is too large
Load Diff
3968
plat/xapp/src/mapp/is41_code_ms.c
Normal file
3968
plat/xapp/src/mapp/is41_code_ms.c
Normal file
File diff suppressed because it is too large
Load Diff
1134
plat/xapp/src/mapp/is41_code_sms.c
Normal file
1134
plat/xapp/src/mapp/is41_code_sms.c
Normal file
File diff suppressed because it is too large
Load Diff
1871
plat/xapp/src/mapp/is41_code_win.c
Normal file
1871
plat/xapp/src/mapp/is41_code_win.c
Normal file
File diff suppressed because it is too large
Load Diff
490
plat/xapp/src/mapp/is41_coding.c
Normal file
490
plat/xapp/src/mapp/is41_coding.c
Normal file
@@ -0,0 +1,490 @@
|
||||
/* MAP Update Location c file */
|
||||
/* created by daniel zhang 2004-06-17 */
|
||||
/* last modufy by xinyu yan 2006-05-15 */
|
||||
/* ------------------------------------ */
|
||||
|
||||
#include "map_includes.h"
|
||||
#include "map_code.h"
|
||||
|
||||
/* external functions */
|
||||
void is41_debug(DWORD mask, const char *fmt, ...);
|
||||
void is41_showbuf(DWORD mask, BYTE *buf, int len);
|
||||
|
||||
static int (*is41_assign_arg[128]) ();
|
||||
static int (*is41_assign_rsp[128]) ();
|
||||
static int (*is41_extract_arg[128]) ();
|
||||
static int (*is41_extract_rsp[128]) ();
|
||||
static char is41_opr_string[128][48] = {
|
||||
"",
|
||||
"HandoffMeasurementRequest",
|
||||
"FacilitiesDirective",
|
||||
"MobileOnChannel",
|
||||
"HandoffBack",
|
||||
"FacilitiesRelease",
|
||||
"QualificationRequest",
|
||||
"QualificationDirective",
|
||||
"Blocking",
|
||||
"Unblocking",
|
||||
"ResetCircuit",
|
||||
"TrunkTest",
|
||||
"TrunkTestDisconnect",
|
||||
"RegistrationNotification",
|
||||
"RegistrationCancellation",
|
||||
"LocationRequest",
|
||||
"RoutingRequest",
|
||||
"FeatureRequest",
|
||||
"ServiceProfileRequest",
|
||||
"ServiceProfileDirective",
|
||||
"UnreliableRoamerDataDirective",
|
||||
"CallDataREquest",
|
||||
"MSInactive",
|
||||
"TransferToNumberRequest",
|
||||
"RedirectionRequest",
|
||||
"HandoffToThird",
|
||||
"FlashRequest",
|
||||
"AuthenticationDirective",
|
||||
"AuthenticationRequest",
|
||||
"BaseStationChallenge",
|
||||
"AuthenticationFailureReport",
|
||||
"CountRequest",
|
||||
"InterSystemPage",
|
||||
"UnsolicitedResponse",
|
||||
"BulkDeregistration",
|
||||
"HandoffMeasurementRequest2",
|
||||
"FacilitiesDirective2",
|
||||
"HandoffBack2",
|
||||
"HandoffToThird2",
|
||||
"AuthenticationDirectiveForward",
|
||||
"AuthenticationStatusReport",
|
||||
"InformationBackward",
|
||||
"InformationDirective",
|
||||
"InformationForward",
|
||||
"InterSystemAnswer",
|
||||
"InterSystemPage2",
|
||||
"InterSystemSetup",
|
||||
"OriginationRequest",
|
||||
"RandomVariableRequest",
|
||||
"RedirectionDirective",
|
||||
"RemoteUserInteractionDirective",
|
||||
"SMSDeliveryBackward",
|
||||
"SMSDeliveryForward",
|
||||
"SMSDeliveryPointToPoint",
|
||||
"SMSNotification",
|
||||
"SMSRequest",
|
||||
"", "", "", "", "", "", "", "",
|
||||
"AnalyzedInformation",
|
||||
"ConnectionFailureReport",
|
||||
"ConnectResource",
|
||||
"DisconnectResource",
|
||||
"FacilitySelectedAndAvailable",
|
||||
"InstructionRequest",
|
||||
"Modify",
|
||||
"ResetTimer",
|
||||
"Search",
|
||||
"SeizeResource",
|
||||
"SRFDirective",
|
||||
"TBusy",
|
||||
"TNoAnswer",
|
||||
"", "", "",
|
||||
"BulkDisconnection",
|
||||
"CallControlDirective",
|
||||
"OAnswer",
|
||||
"ODisconnect",
|
||||
"CallRecoveryReport",
|
||||
"TAnswer",
|
||||
"TDisconnect",
|
||||
"UnreliableCallData",
|
||||
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
||||
"ShortMessageAnalyzed",
|
||||
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""
|
||||
};
|
||||
|
||||
void is41_register_encode_arg(u8 opr_code, int (*func)())
|
||||
{
|
||||
is41_assign_arg[opr_code] = func;
|
||||
}
|
||||
|
||||
void is41_register_encode_rsp(u8 opr_code, int (*func)())
|
||||
{
|
||||
is41_assign_rsp[opr_code] = func;
|
||||
}
|
||||
|
||||
void is41_register_decode_arg(u8 opr_code, int (*func)())
|
||||
{
|
||||
is41_extract_arg[opr_code] = func;
|
||||
}
|
||||
|
||||
void is41_register_decode_rsp(u8 opr_code, int (*func)())
|
||||
{
|
||||
is41_extract_rsp[opr_code] = func;
|
||||
}
|
||||
|
||||
void init_assignFunc_pointer()
|
||||
{
|
||||
is41_register_encode_arg(IS41OPR_AuthenticationDirective, assign_is41AuthenticationDirective_arg);
|
||||
is41_register_encode_rsp(IS41OPR_AuthenticationDirective, assign_is41AuthenticationDirective_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_AuthenticationFailureReport, assign_is41AuthenticationFailureReport_arg);
|
||||
is41_register_encode_rsp(IS41OPR_AuthenticationFailureReport, assign_is41AuthenticationFailureReport_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_AuthenticationRequest, assign_is41AuthenticationRequest_arg);
|
||||
is41_register_encode_rsp(IS41OPR_AuthenticationRequest, assign_is41AuthenticationRequest_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_AuthenticationStatusReport, assign_is41AuthenticationStatusReport_arg);
|
||||
is41_register_encode_rsp(IS41OPR_AuthenticationStatusReport, assign_is41AuthenticationStatusReport_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_AuthenticationDirectiveForward, assign_is41AuthenticationDirectiveForward_arg);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_BaseStationChallenge, assign_is41BaseStationChallenge_arg);
|
||||
is41_register_encode_rsp(IS41OPR_BaseStationChallenge, assign_is41BaseStationChallenge_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_CountRequest, assign_is41CountRequest_arg);
|
||||
is41_register_encode_rsp(IS41OPR_CountRequest, assign_is41CountRequest_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_SMSDeliveryBackward, assign_Is41SmsDeliveryBackward_arg);
|
||||
is41_register_encode_rsp(IS41OPR_SMSDeliveryBackward, assign_Is41SmsDeliveryBackward_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_SMSDeliveryForward, assign_Is41SmsDeliveryForward_arg);
|
||||
is41_register_encode_rsp(IS41OPR_SMSDeliveryForward, assign_Is41SmsDeliveryForward_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_SMSDeliveryPointToPoint, assign_Is41SmsDeliveryPointToPoint_arg);
|
||||
is41_register_encode_rsp(IS41OPR_SMSDeliveryPointToPoint, assign_Is41SmsDeliveryPointToPoint_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_SMSNotification, assign_Is41SmsNotification_arg);
|
||||
is41_register_encode_rsp(IS41OPR_SMSNotification, assign_Is41SmsNotification_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_SMSRequest, assign_Is41SmsRequest_arg);
|
||||
is41_register_encode_rsp(IS41OPR_SMSRequest, assign_Is41SmsRequest_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_RegistrationNotification, assign_is41RegistrationNotification_arg);
|
||||
is41_register_encode_rsp(IS41OPR_RegistrationNotification, assign_is41RegistrationNotification_rsp);
|
||||
is41_register_encode_arg(IS41OPR_RegistrationCancellation, assign_is41RegistrationCancellation_arg);
|
||||
is41_register_encode_rsp(IS41OPR_RegistrationCancellation, assign_is41RegistrationCancellation_rsp);
|
||||
is41_register_encode_arg(IS41OPR_LocationRequest, assign_is41LocationRequest_arg);
|
||||
is41_register_encode_rsp(IS41OPR_LocationRequest, assign_is41LocationRequest_rsp);
|
||||
is41_register_encode_arg(IS41OPR_RoutingRequest, assign_is41RoutingRequest_arg);
|
||||
is41_register_encode_rsp(IS41OPR_RoutingRequest, assign_is41RoutingRequest_rsp);
|
||||
is41_register_encode_arg(IS41OPR_MSInactive, assign_is41MSInactive_arg);
|
||||
is41_register_encode_rsp(IS41OPR_MSInactive, assign_is41MSInactive_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_FeatureRequest, assign_is41FeatureRequest_arg);
|
||||
is41_register_encode_rsp(IS41OPR_FeatureRequest, assign_is41FeatureRequest_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_QualificationDirective, assign_is41QualificationDirective_arg);
|
||||
is41_register_encode_rsp(IS41OPR_QualificationDirective, assign_is41QualificationDirective_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_TransferToNumberRequest, assign_is41TransferToNumberRequest_arg);
|
||||
is41_register_encode_rsp(IS41OPR_TransferToNumberRequest, assign_is41TransferToNumberRequest_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_RedirectionRequest, assign_is41RedirectionRequest_arg);
|
||||
is41_register_encode_rsp(IS41OPR_RedirectionRequest, assign_is41RedirectionRequest_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_OriginationRequest, assign_is41OriginationRequest_arg);
|
||||
is41_register_encode_rsp(IS41OPR_OriginationRequest, assign_is41OriginationRequest_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_AnalyzedInformation, assign_is41AnalyzedInformation_arg);
|
||||
is41_register_encode_rsp(IS41OPR_AnalyzedInformation, assign_is41AnalyzedInformation_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_OAnswer, assign_is41OAnswer_arg);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_ODisconnect, assign_is41ODisconnect_arg);
|
||||
is41_register_encode_rsp(IS41OPR_ODisconnect, assign_is41ODisconnect_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_TAnswer, assign_is41TAnswer_arg);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_TDisconnect, assign_is41TDisconnect_arg);
|
||||
is41_register_encode_rsp(IS41OPR_TDisconnect, assign_is41TDisconnect_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_CallControlDirective, assign_is41CallControlDirective_arg);
|
||||
is41_register_encode_rsp(IS41OPR_CallControlDirective, assign_is41CallControlDirective_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_SeizeResource, assign_is41SeizeResource_arg);
|
||||
is41_register_encode_rsp(IS41OPR_SeizeResource, assign_is41SeizeResource_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_ConnectResource, assign_is41ConnectResource_arg);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_SRFDirective, assign_is41SRFDirective_arg);
|
||||
is41_register_encode_rsp(IS41OPR_SRFDirective, assign_is41SRFDirective_rsp);
|
||||
|
||||
is41_register_encode_arg(IS41OPR_ShortMessageAnalyzed, assign_is41ShortMessageAnalyzed_arg);
|
||||
is41_register_encode_rsp(IS41OPR_ShortMessageAnalyzed, assign_is41ShortMessageAnalyzed_rsp);
|
||||
}
|
||||
|
||||
void init_extractFunc_pointer()
|
||||
{
|
||||
is41_register_decode_arg(IS41OPR_AuthenticationDirective, extract_is41AuthenticationDirective_arg);
|
||||
is41_register_decode_rsp(IS41OPR_AuthenticationDirective, extract_is41AuthenticationDirective_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_AuthenticationFailureReport, extract_is41AuthenticationFailureReport_arg);
|
||||
is41_register_decode_rsp(IS41OPR_AuthenticationFailureReport, extract_is41AuthenticationFailureReport_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_AuthenticationRequest, extract_is41AuthenticationRequest_arg);
|
||||
is41_register_decode_rsp(IS41OPR_AuthenticationRequest, extract_is41AuthenticationRequest_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_AuthenticationStatusReport, extract_is41AuthenticationStatusReport_arg);
|
||||
is41_register_decode_rsp(IS41OPR_AuthenticationStatusReport, extract_is41AuthenticationStatusReport_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_AuthenticationDirectiveForward, extract_is41AuthenticationDirectiveForward_arg);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_BaseStationChallenge, extract_is41BaseStationChallenge_arg);
|
||||
is41_register_decode_rsp(IS41OPR_BaseStationChallenge, extract_is41BaseStationChallenge_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_CountRequest, extract_is41CountRequest_arg);
|
||||
is41_register_decode_rsp(IS41OPR_CountRequest, extract_is41CountRequest_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_SMSDeliveryBackward, extract_Is41SmsDeliveryBackward_arg);
|
||||
is41_register_decode_rsp(IS41OPR_SMSDeliveryBackward, extract_Is41SmsDeliveryBackward_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_SMSDeliveryForward, extract_Is41SmsDeliveryForward_arg);
|
||||
is41_register_decode_rsp(IS41OPR_SMSDeliveryForward, extract_Is41SmsDeliveryForward_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_SMSDeliveryPointToPoint, extract_Is41SmsDeliveryPointToPoint_arg);
|
||||
is41_register_decode_rsp(IS41OPR_SMSDeliveryPointToPoint, extract_Is41SmsDeliveryPointToPoint_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_SMSNotification, extract_Is41SmsNotification_arg);
|
||||
is41_register_decode_rsp(IS41OPR_SMSNotification, extract_Is41SmsNotification_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_SMSRequest, extract_Is41SmsRequest_arg);
|
||||
is41_register_decode_rsp(IS41OPR_SMSRequest, extract_Is41SmsRequest_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_RegistrationNotification, extract_is41RegistrationNotification_arg);
|
||||
is41_register_decode_rsp(IS41OPR_RegistrationNotification, extract_is41RegistrationNotification_rsp);
|
||||
is41_register_decode_arg(IS41OPR_RegistrationCancellation, extract_is41RegistrationCancellation_arg);
|
||||
is41_register_decode_rsp(IS41OPR_RegistrationCancellation, extract_is41RegistrationCancellation_rsp);
|
||||
is41_register_decode_arg(IS41OPR_LocationRequest, extract_is41LocationRequest_arg);
|
||||
is41_register_decode_rsp(IS41OPR_LocationRequest, extract_is41LocationRequest_rsp);
|
||||
is41_register_decode_arg(IS41OPR_RoutingRequest, extract_is41RoutingRequest_arg);
|
||||
is41_register_decode_rsp(IS41OPR_RoutingRequest, extract_is41RoutingRequest_rsp);
|
||||
is41_register_decode_arg(IS41OPR_MSInactive, extract_is41MSInactive_arg);
|
||||
is41_register_decode_rsp(IS41OPR_MSInactive, extract_is41MSInactive_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_FeatureRequest, extract_is41FeatureRequest_arg);
|
||||
is41_register_decode_rsp(IS41OPR_FeatureRequest, extract_is41FeatureRequest_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_QualificationDirective, extract_is41QualificationDirective_arg);
|
||||
is41_register_decode_rsp(IS41OPR_QualificationDirective, extract_is41QualificationDirective_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_TransferToNumberRequest, extract_is41TransferToNumberRequest_arg);
|
||||
is41_register_decode_rsp(IS41OPR_TransferToNumberRequest, extract_is41TransferToNumberRequest_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_RedirectionRequest, extract_is41RedirectionRequest_arg);
|
||||
is41_register_decode_rsp(IS41OPR_RedirectionRequest, extract_is41RedirectionRequest_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_OriginationRequest, extract_is41OriginationRequest_arg);
|
||||
is41_register_decode_rsp(IS41OPR_OriginationRequest, extract_is41OriginationRequest_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_AnalyzedInformation, extract_is41AnalyzedInformation_arg);
|
||||
is41_register_decode_rsp(IS41OPR_AnalyzedInformation, extract_is41AnalyzedInformation_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_OAnswer, extract_is41OAnswer_arg);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_ODisconnect, extract_is41ODisconnect_arg);
|
||||
is41_register_decode_rsp(IS41OPR_ODisconnect, extract_is41ODisconnect_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_TAnswer, extract_is41TAnswer_arg);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_TDisconnect, extract_is41TDisconnect_arg);
|
||||
is41_register_decode_rsp(IS41OPR_TDisconnect, extract_is41TDisconnect_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_CallControlDirective, extract_is41CallControlDirective_arg);
|
||||
is41_register_decode_rsp(IS41OPR_CallControlDirective, extract_is41CallControlDirective_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_SeizeResource, extract_is41SeizeResource_arg);
|
||||
is41_register_decode_rsp(IS41OPR_SeizeResource, extract_is41SeizeResource_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_ConnectResource, extract_is41ConnectResource_arg);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_SRFDirective, extract_is41SRFDirective_arg);
|
||||
is41_register_decode_rsp(IS41OPR_SRFDirective, extract_is41SRFDirective_rsp);
|
||||
|
||||
is41_register_decode_arg(IS41OPR_ShortMessageAnalyzed, extract_is41ShortMessageAnalyzed_arg);
|
||||
is41_register_decode_rsp(IS41OPR_ShortMessageAnalyzed, extract_is41ShortMessageAnalyzed_rsp);
|
||||
}
|
||||
|
||||
int is41_u8Type_to_charType(u8 type,char *cType)
|
||||
{
|
||||
if(type >= 128)
|
||||
return 0;
|
||||
else if(strlen(is41_opr_string[type]) == 0)
|
||||
return 0;
|
||||
strcpy(cType, is41_opr_string[type]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*int is41_u8Type_to_charType(u8 type,char *cType)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
// Authentication service operation
|
||||
case IS41OPR_AuthenticationDirective:
|
||||
sprintf(cType,"AuthenticationDirective");
|
||||
break;
|
||||
case IS41OPR_AuthenticationFailureReport:
|
||||
sprintf(cType,"AuthenticationFailureReport");
|
||||
break;
|
||||
case IS41OPR_AuthenticationRequest:
|
||||
sprintf(cType,"AuthenticationRequest");
|
||||
break;
|
||||
case IS41OPR_AuthenticationStatusReport:
|
||||
sprintf(cType,"AuthenticationStatusReport");
|
||||
break;
|
||||
case IS41OPR_AuthenticationDirectiveForward:
|
||||
sprintf(cType,"AuthenticationDirectiveForward");
|
||||
break;
|
||||
case IS41OPR_CountRequest:
|
||||
sprintf(cType,"CountRequest");
|
||||
break;
|
||||
case IS41OPR_BaseStationChallenge:
|
||||
sprintf(cType,"BaseStationChallenge");
|
||||
break;
|
||||
case IS41OPR_SMSDeliveryBackward:
|
||||
sprintf(cType,"SMSDeliveryBackward");
|
||||
break;
|
||||
case IS41OPR_SMSDeliveryForward:
|
||||
sprintf(cType,"SMSDeliveryForward");
|
||||
break;
|
||||
case IS41OPR_SMSDeliveryPointToPoint:
|
||||
sprintf(cType,"SMSDeliveryPointToPoint");
|
||||
break;
|
||||
case IS41OPR_SMSNotification:
|
||||
sprintf(cType,"IS41OPR_SMSNotification");
|
||||
break;
|
||||
case IS41OPR_SMSRequest:
|
||||
sprintf(cType,"SMSRequest");
|
||||
break;
|
||||
|
||||
case IS41OPR_RegistrationNotification:
|
||||
sprintf(cType,"REGNOT");
|
||||
break;
|
||||
case IS41OPR_RegistrationCancellation:
|
||||
sprintf(cType,"REGCANC");
|
||||
break;
|
||||
case IS41OPR_LocationRequest:
|
||||
sprintf(cType,"LOCREQ");
|
||||
break;
|
||||
case IS41OPR_RoutingRequest:
|
||||
sprintf(cType,"ROUTREQ");
|
||||
break;
|
||||
case IS41OPR_MSInactive:
|
||||
sprintf(cType,"MSINACT");
|
||||
break;
|
||||
case IS41OPR_FeatureRequest:
|
||||
sprintf(cType,"FEATREQ");
|
||||
break;
|
||||
case IS41OPR_QualificationDirective:
|
||||
sprintf(cType,"QUALDIR");
|
||||
break;
|
||||
case IS41OPR_TransferToNumberRequest:
|
||||
sprintf(cType,"TRANUMREQ");
|
||||
break;
|
||||
case IS41OPR_RedirectionRequest:
|
||||
sprintf(cType,"REDREQ");
|
||||
break;
|
||||
|
||||
default: // unknown operation
|
||||
// sprintf(info_str,"MAPP error:the operation is unknown:%d",opr_ptr->message_type);
|
||||
// xap_send_error(info_str);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}*/
|
||||
|
||||
int build_is41param(struct MapOprSrv_struct *opr_ptr,u8 *buf) // build is41 service paramter
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u8 seq_flag=1;
|
||||
int param_len = 0;
|
||||
u8 info_str[1024];
|
||||
char charName[128];
|
||||
|
||||
if (opr_ptr == NULL || buf == NULL)
|
||||
return 0;
|
||||
if (!is41_u8Type_to_charType(opr_ptr->message_type,charName))
|
||||
{
|
||||
is41_debug(IS41DB_ENCODE,"[IS41-Encode]Building param,Operation code:%d not correct",opr_ptr->message_type);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (opr_ptr->message_flag == MAP_REQUEST)
|
||||
{
|
||||
is41_debug(IS41DB_ENCODE,"[IS41-Encode] MAP_REQUEST,OPRType=%s",charName);
|
||||
param_len = (*is41_assign_arg[opr_ptr->message_type]) (opr_ptr,buf);
|
||||
}
|
||||
else if (opr_ptr->message_flag == MAP_RESPONSE)
|
||||
{
|
||||
is41_debug(IS41DB_ENCODE,"[IS41-Encode] MAP_RESPONSE,OPRType=%s",charName);
|
||||
param_len = (*is41_assign_rsp[opr_ptr->message_type])(opr_ptr,buf);
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
|
||||
if (seq_flag == 1 && param_len > 0)
|
||||
{
|
||||
memcpy(info_str,buf,param_len%1024);
|
||||
AsnEncode(buf,256,&asn_buf);
|
||||
param_len = AddTLV(SET_NATIONAL,param_len,info_str,0xe0,&asn_buf);
|
||||
is41_debug(IS41DB_ENCODE,"[IS41-Encode] Completed,len=%d",param_len);
|
||||
is41_showbuf(IS41DB_ENCODE,buf,param_len);
|
||||
}
|
||||
else
|
||||
{
|
||||
AsnEncode(buf,256,&asn_buf);
|
||||
param_len = AddTLV(SET_NATIONAL,0,info_str,0xc0,&asn_buf);
|
||||
is41_debug(IS41DB_ENCODE,"[IS41-Encode] Completed,paramlen=0");
|
||||
is41_showbuf(IS41DB_ENCODE,buf,param_len);
|
||||
}
|
||||
return param_len;
|
||||
}
|
||||
|
||||
u8 extract_is41param(struct MapOprSrv_struct *opr_ptr,u8 opr_code,u8 opr_flag,u32 pre_param_len,u8 *pre_param)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
// u8 info_str[1024];
|
||||
u8 param[1024];
|
||||
int param_len;
|
||||
char charName[128];
|
||||
|
||||
asn_decode(pre_param,1,&asn_buf);
|
||||
param_len = get_tlv(SET_NATIONAL,param,&asn_buf);
|
||||
|
||||
if (param_len == -1) // not has sequence id
|
||||
{
|
||||
param_len = pre_param_len;
|
||||
memcpy(param,pre_param,param_len);
|
||||
}
|
||||
|
||||
if (!is41_u8Type_to_charType(opr_code,charName))
|
||||
{
|
||||
is41_debug(IS41DB_ENCODE,"[IS41-Encode]Extracting param,Operation code:%d not correct",opr_code);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (opr_flag == MAP_INDICATE)
|
||||
{
|
||||
is41_debug(IS41DB_DECODE,"[IS41-Decode]USER->IS41P,IS41_INDICATE,OPRType=%s",charName);
|
||||
is41_showbuf(IS41DB_DECODE,param,param_len);
|
||||
if (*is41_extract_arg[opr_code] != NULL)
|
||||
{
|
||||
return (*is41_extract_arg[opr_code])(opr_ptr,param_len,param);
|
||||
}
|
||||
else
|
||||
{
|
||||
is41_debug(IS41DB_ERR,"[IS41-Decode]No decode function for IS41_INDICATE opr_code=%d",opr_code);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else if (opr_flag == MAP_CONFIRM)
|
||||
{
|
||||
is41_debug(IS41DB_DECODE,"[IS41-Decode]USER->IS41P,MAP_CONFIRM,OPRType=%s",charName);
|
||||
is41_showbuf(IS41DB_DECODE,param,param_len);
|
||||
if (*is41_extract_rsp[opr_code] != NULL)
|
||||
return (*is41_extract_rsp[opr_code])(opr_ptr,param_len,param);
|
||||
else
|
||||
{
|
||||
is41_debug(IS41DB_ERR,"[IS41-Decode]No decode function for IS41_CONFIRM opr_code=%d",opr_code);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
3650
plat/xapp/src/mapp/is41_debug.c
Normal file
3650
plat/xapp/src/mapp/is41_debug.c
Normal file
File diff suppressed because it is too large
Load Diff
23
plat/xapp/src/mapp/is41_init.c
Normal file
23
plat/xapp/src/mapp/is41_init.c
Normal file
@@ -0,0 +1,23 @@
|
||||
/* IS41 init c file */
|
||||
/* created by daniel zhang 2004-06-18 */
|
||||
/* last modify by daniel zhang 2004-07-13 */
|
||||
/* version 1.0 */
|
||||
/* ------------------------------------ */
|
||||
|
||||
void is41_debug_setup();
|
||||
void is41_debug_timer();
|
||||
|
||||
|
||||
void init_assignFunc_pointer();
|
||||
void init_extractFunc_pointer();
|
||||
void is41_init()
|
||||
{
|
||||
is41_debug_setup();
|
||||
init_assignFunc_pointer();
|
||||
init_extractFunc_pointer();
|
||||
}
|
||||
|
||||
void is41_timer()
|
||||
{
|
||||
is41_debug_timer();
|
||||
}
|
||||
211
plat/xapp/src/mapp/map_LCSCode.c
Normal file
211
plat/xapp/src/mapp/map_LCSCode.c
Normal file
@@ -0,0 +1,211 @@
|
||||
#include "map_includes.h"
|
||||
|
||||
|
||||
int extract_RoutingInfoForLCS_Arg(RoutingInfoForLCS_Arg *ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract RoutingInfoForLCS_Arg param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf); /* mlc number */
|
||||
if (len > 1 && len <= ISDN_LEN)
|
||||
{
|
||||
flag |= 0x01;
|
||||
ptr->mlcNumber[0] = len;
|
||||
memcpy(ptr->mlcNumber+1,temp_buf,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract RoutingInfoForLCS_Arg:loss MLC number");
|
||||
return RER;
|
||||
}
|
||||
|
||||
if (get_tlv("1",temp_buf,&asn_buf) != -1)/* targetMs */
|
||||
{
|
||||
flag |= 0x02;
|
||||
len = get_tlv("1.0",temp_buf,&asn_buf); // IMSI
|
||||
if (len == IMSI_LEN && (temp_buf[IMSI_LEN-1]&0xf0) == 0xf0)
|
||||
{
|
||||
ptr->targetMs.identityChoice = 0x01;
|
||||
memcpy(ptr->targetMs.imsi,temp_buf,IMSI_LEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
len = get_tlv("1.1",temp_buf,&asn_buf); // msisdn
|
||||
if (len > 0 && len <= ISDN_LEN)
|
||||
{
|
||||
ptr->targetMs.identityChoice = 0x02;
|
||||
ptr->targetMs.msisdn[0] = len;
|
||||
memcpy(ptr->targetMs.msisdn+1,temp_buf,len);
|
||||
}
|
||||
else
|
||||
return RER;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mapp_log_debug("extract RoutingInfoForLCS_Arg:loss TargetMs");
|
||||
return RER;
|
||||
}
|
||||
ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int assign_RoutingInfoForLCS_Res(RoutingInfoForLCS_Res *ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
u8 len;
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = ptr->param_flag;
|
||||
|
||||
if (flag & 0x01) /* targetMs */
|
||||
{
|
||||
if (ptr->targetMs.identityChoice == 1) // IMSI
|
||||
buf_len = add_tlv("0.0",IMSI_LEN,ptr->targetMs.imsi,0x80,&asn_buf);
|
||||
else if (ptr->targetMs.identityChoice == 2) // msisdn
|
||||
{
|
||||
len = ptr->targetMs.msisdn[0];
|
||||
buf_len = add_tlv("0.1",len,ptr->targetMs.msisdn+1,0x80,&asn_buf);
|
||||
}
|
||||
else
|
||||
return RER;
|
||||
}
|
||||
else
|
||||
return RER;
|
||||
|
||||
if (flag & 0x02)/* mscNumber */
|
||||
{
|
||||
len = ptr->mscNumber[0];
|
||||
buf_len = add_tlv("1.4-1",len,ptr->mscNumber+1,0x00,&asn_buf);
|
||||
}
|
||||
else {
|
||||
mapp_log_debug("assign RoutingInfoForLCS_Res:loss MSC NUMBER");
|
||||
return RER;
|
||||
}
|
||||
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_ProvideSubscriberLocation_Arg(ProvideSubscriberLocation_Arg *ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
u32 flag=0;
|
||||
|
||||
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("extract ProvideSubscriberLocation_Arg param len is:0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
|
||||
if((len=get_tlv("16-1.0",temp_buf,&asn_buf)) > 0)/* locationType */
|
||||
{
|
||||
flag |= 0x01;
|
||||
ptr->locationType.locationEstimateType = temp_buf[0];
|
||||
}
|
||||
else
|
||||
return RER;
|
||||
|
||||
if((len=get_tlv("4-2",temp_buf,&asn_buf)) > 0)/* MLC number */
|
||||
{
|
||||
flag |= 0x02;
|
||||
ptr->mlcNumber[0] = len;
|
||||
memcpy(ptr->mlcNumber+1,temp_buf,len);
|
||||
}
|
||||
else
|
||||
return RER;
|
||||
|
||||
if (get_tlv("2",temp_buf,&asn_buf) != -1) /* imsi */
|
||||
{
|
||||
if (len == IMSI_LEN)
|
||||
{
|
||||
flag |= 0x04;
|
||||
memcpy(ptr->imsi,temp_buf,len);
|
||||
}
|
||||
else
|
||||
return RER;
|
||||
}
|
||||
|
||||
|
||||
if (get_tlv("3",temp_buf,&asn_buf) != -1) /* msisdn */
|
||||
{
|
||||
flag |= 0x08;
|
||||
ptr->msisdn[0] = len;
|
||||
memcpy(ptr->msisdn+1,temp_buf,len);
|
||||
}
|
||||
|
||||
ptr->param_flag = flag;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
|
||||
int assign_ProvideSubscriberLocation_Res(ProvideSubscriberLocation_Res *ptr,u8 *buf, u8 ver)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u32 flag;
|
||||
int buf_len=0;
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
flag = ptr->param_flag;
|
||||
if (flag & 0x01)/* locationEstimate */
|
||||
{
|
||||
u8 locationEstimate[maxExtGeographicalInformation] = {0};
|
||||
if(ptr->locationEstimate.typeOfShape != EllipsoidPoint) /* only support EllipsoidPoint */
|
||||
return RER;
|
||||
locationEstimate[0] |= ptr->locationEstimate.typeOfShape << 4;
|
||||
|
||||
ptr->locationEstimate.degreesOfLatitude &= 0x7fffff;
|
||||
if(ptr->locationEstimate.degreesOfLatitude >= 0)
|
||||
locationEstimate[1] &= 0x00;
|
||||
else
|
||||
locationEstimate[1] |= 0x80;
|
||||
locationEstimate[1] |= ptr->locationEstimate.degreesOfLatitude >> 16;
|
||||
locationEstimate[2] = ptr->locationEstimate.degreesOfLatitude >> 8;
|
||||
locationEstimate[3] = ptr->locationEstimate.degreesOfLatitude & 0xff;
|
||||
|
||||
ptr->locationEstimate.degreesOfLongitude &= 0xffffff;
|
||||
locationEstimate[4] = ptr->locationEstimate.degreesOfLongitude >> 16;
|
||||
locationEstimate[5] = ptr->locationEstimate.degreesOfLongitude >> 8;
|
||||
locationEstimate[6] = ptr->locationEstimate.degreesOfLongitude & 0xff;
|
||||
|
||||
buf_len = add_tlv("4-1",7,locationEstimate,0x00,&asn_buf);
|
||||
}
|
||||
else {
|
||||
return RER;
|
||||
}
|
||||
|
||||
if (flag & 0x02)/* cgi */
|
||||
{
|
||||
u8 cgi[16] = {0};
|
||||
if(ptr->cgi.cgiOrLaiChoice != CgiOrSai) /* only support cgiOrSai */
|
||||
return RER;
|
||||
memcpy(cgi,ptr->cgi.mccMnc,3);
|
||||
memcpy(cgi+3,&ptr->cgi.lac,2);
|
||||
memcpy(cgi+5,&ptr->cgi.cellId,2);
|
||||
buf_len = add_tlv("6-2.0",7,cgi,0x80,&asn_buf);
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
130
plat/xapp/src/mapp/map_LCSCode.h
Normal file
130
plat/xapp/src/mapp/map_LCSCode.h
Normal file
@@ -0,0 +1,130 @@
|
||||
|
||||
/***************** LCS **************
|
||||
#define AC_locationServiceGateWay 37
|
||||
#define AC_locationServiceEnquiry 38
|
||||
|
||||
#define RoutingInfoForLCS 85
|
||||
#define ProvideSubscriberLocation 83
|
||||
**************** LCS **************/
|
||||
|
||||
typedef struct _SubscriberIdentity
|
||||
{
|
||||
u8 identityChoice; /*1:imsi,2:msisdn*/
|
||||
u8 msisdn[ISDN_LEN+1]; /* TBCD */
|
||||
u8 imsi[IMSI_LEN+1]; /* TBCD */
|
||||
}SubscriberIdentity;
|
||||
|
||||
typedef struct _MapRoutingInfoForLCS_Arg
|
||||
{
|
||||
u32 param_flag;
|
||||
u8 mlcNumber[ISDN_LEN+1]; /* TBCD */
|
||||
SubscriberIdentity targetMs;
|
||||
u8 user_error;
|
||||
u8 provider_error;
|
||||
}RoutingInfoForLCS_Arg;
|
||||
|
||||
typedef struct _MapRoutingInfoForLCS_Res
|
||||
{
|
||||
u32 param_flag;
|
||||
SubscriberIdentity targetMs;
|
||||
u8 mscNumber[ISDN_LEN+1]; /* TBCD */
|
||||
u8 user_error;
|
||||
u8 provider_error;
|
||||
}RoutingInfoForLCS_Res;
|
||||
|
||||
|
||||
typedef enum _LocationEstimateType
|
||||
{
|
||||
currentLocation = 0,
|
||||
currentOrLastKnownLocation,
|
||||
initialLocation,
|
||||
activateDeferredLocation,
|
||||
cancelDeferredLocation,
|
||||
notificationVerificationOnly
|
||||
}LocationEstimateType;
|
||||
|
||||
typedef enum _DeferredLocationEventType
|
||||
{
|
||||
msAvailable = 0,
|
||||
enteringIntoArea,
|
||||
leavingFromArea,
|
||||
beingInsideArea,
|
||||
periodicLDR
|
||||
}DeferredLocationEventType;
|
||||
|
||||
typedef struct _LocationType
|
||||
{
|
||||
LocationEstimateType locationEstimateType;
|
||||
DeferredLocationEventType deferredLocationEventType;
|
||||
}LocationType;
|
||||
|
||||
typedef struct _ProvideSubscriberLocation_Arg
|
||||
{
|
||||
u32 param_flag;
|
||||
LocationType locationType;
|
||||
u8 mlcNumber[ISDN_LEN+1]; /* TBCD */
|
||||
u8 msisdn[ISDN_LEN+1]; /* TBCD */
|
||||
u8 imsi[IMSI_LEN+1]; /* TBCD */
|
||||
u8 user_error;
|
||||
u8 provider_error;
|
||||
}ProvideSubscriberLocation_Arg;
|
||||
|
||||
typedef enum _TypeOfShape
|
||||
{
|
||||
EllipsoidPoint = 0,
|
||||
EllipsoidPointWithUncertaintyCircle = 1,
|
||||
EllipsoidPointWithUncertaintyEllipse = 3,
|
||||
Polygon = 5,
|
||||
EllipsoidPointWithAltitude = 8,
|
||||
EllipsoidPointWithAltitudeAndUncertaintyEllipsoid = 9,
|
||||
EllipsoidArc =10
|
||||
}TypeOfShape;
|
||||
|
||||
|
||||
#define maxExtGeographicalInformation 20
|
||||
typedef struct _LocationEstimate
|
||||
{
|
||||
TypeOfShape typeOfShape;/* only support EllipsoidPoint */
|
||||
long degreesOfLatitude;
|
||||
long degreesOfLongitude;
|
||||
u8 reserve[maxExtGeographicalInformation - 7];
|
||||
}LocationEstimate;
|
||||
|
||||
|
||||
typedef enum _CgiSaiOrLaiChoice
|
||||
{
|
||||
CgiOrSai = 1,
|
||||
LAI = 2
|
||||
}CgiSaiOrLaiChoice;
|
||||
|
||||
typedef struct _CGI
|
||||
{
|
||||
CgiSaiOrLaiChoice cgiOrLaiChoice;
|
||||
/*
|
||||
-- octet 1 bits 4321 Mobile Country Code 1st digit
|
||||
-- bits 8765 Mobile Country Code 2nd digit
|
||||
-- octet 2 bits 4321 Mobile Country Code 3rd digit
|
||||
-- bits 8765 Mobile Network Code 3rd digit
|
||||
-- or filler (1111) for 2 digit MNCs
|
||||
-- octet 3 bits 4321 Mobile Network Code 1st digit
|
||||
-- bits 8765 Mobile Network Code 2nd digit
|
||||
-- octets 4 and 5 Location Area Code according to 3GPP TS 24.008
|
||||
-- octets 6 and 7 Cell Identity (CI) value or
|
||||
-- Service Area Code (SAC) value
|
||||
-- according to 3GPP TS 23.003
|
||||
*/
|
||||
u8 mccMnc[3]; /* tbcd */
|
||||
u16 lac; /* integer */
|
||||
u16 cellId; /* integer */
|
||||
}CGI;
|
||||
|
||||
typedef struct _ProvideSubscriberLocation_Res
|
||||
{
|
||||
u32 param_flag;
|
||||
LocationEstimate locationEstimate;
|
||||
CGI cgi;
|
||||
u8 user_error;
|
||||
u8 provider_error;
|
||||
}ProvideSubscriberLocation_Res;
|
||||
|
||||
|
||||
68
plat/xapp/src/mapp/map_acn.h
Normal file
68
plat/xapp/src/mapp/map_acn.h
Normal file
@@ -0,0 +1,68 @@
|
||||
/* MAP application context name head file */
|
||||
/* Written by Liu zhiguo 2001-12-28 */
|
||||
/* Version 1.0 (according GSM 09.02 17.3.3) */
|
||||
/* ---------------------------------------- */
|
||||
#ifndef _MAP_ACN
|
||||
#define _MAP_ACN
|
||||
|
||||
/* public portion */
|
||||
#define Identified_Organization 0x04
|
||||
#define ETSI 0x00
|
||||
#define MobileDomain 0x00
|
||||
#define GSM_Network 0x01
|
||||
#define AC_ID 0x00
|
||||
#define AC_Version1 0x01
|
||||
#define AC_Version2 0x02
|
||||
#define AC_Version3 0x03
|
||||
/* private portion */
|
||||
#define AC_networkLocUp 1 // network loction update
|
||||
#define AC_locationCancel 2 // location cancel
|
||||
#define AC_roamingNbEnquiry 3 // roaming number enquiry
|
||||
#define AC_locInfoRetrieval 5 // location info retrieval
|
||||
#define AC_reset 10 // reset context
|
||||
#define AC_handoverControl 11 // handover control
|
||||
#define AC_equipmentMngt 13 // equipment management
|
||||
#define AC_infoRetrieval 14 // info retrieval
|
||||
#define AC_interVlrInfoRetrieval 15
|
||||
#define AC_subscriberDataMngt 16
|
||||
#define AC_tracing 17 // tracing
|
||||
#define AC_networkFunctionalSs 18
|
||||
#define AC_networkUnstructuredSs 19
|
||||
#define AC_shortMsgGateway 20
|
||||
#define AC_shortMsgMoRelay 21
|
||||
#define AC_shortMsgAlert 23
|
||||
#define AC_mwdMngt 24
|
||||
#define AC_shortMsgMtRelay 25
|
||||
#define AC_imsiRetrieval 26
|
||||
#define AC_msPurging 27
|
||||
#define AC_subsriberInfoEnquiry 28
|
||||
#define AC_anyTimeInfoEnquiry 29
|
||||
#define AC_callControlTransfer 6
|
||||
#define AC_ssInvNotify 36 // ss-InvocationNotificationContext
|
||||
#define AC_sIWFSAllocation 12 // sIWFSAllocationContext
|
||||
#define AC_groupCallControl 31 // group call control context
|
||||
#define AC_gprsLocUp 32 // GPRS location update context
|
||||
#define AC_gprsLocInfoRetrieval 33 // GPRS location info retrieval context
|
||||
#define AC_failureReport 34 // failure report context
|
||||
#define AC_gprsNotify 35 // GPRS notify context
|
||||
#define AC_reporting 7 // reporting context
|
||||
#define AC_callCompletion 8 // call completion context
|
||||
|
||||
/* MAP-H application context */
|
||||
#define AC_SecurityTriplet 200 // security triplet
|
||||
#define AC_SubsInter 201 // subscriber interrogate
|
||||
#define AC_HLRSubsMng 202 // HLR subscriber management
|
||||
#define AC_HLRPingAUC 203 // HLR ping AUC
|
||||
|
||||
/* Opr,vlr,hlr ACN */
|
||||
#define OprVlrACN 210
|
||||
#define OprHlrACN 211
|
||||
|
||||
/***************** LCS **************/
|
||||
#define AC_locationServiceGateWay 37
|
||||
#define AC_locationServiceEnquiry 38
|
||||
/***************** LCS **************/
|
||||
|
||||
#define AC_Test 255
|
||||
|
||||
#endif
|
||||
333
plat/xapp/src/mapp/map_code.h
Normal file
333
plat/xapp/src/mapp/map_code.h
Normal file
@@ -0,0 +1,333 @@
|
||||
/* MAP operation and error code */
|
||||
/* written by liu zhiguo 2001-07-25 */
|
||||
/* Version 1.0 (according GSM 09.02 17.5) */
|
||||
/* ------------------------------------- */
|
||||
#ifndef _MAP_CODE
|
||||
#define _MAP_CODE
|
||||
|
||||
/* +++++++++++++++++ */
|
||||
/* MAP message type */
|
||||
/* +++++++++++++++++ */
|
||||
/* dialogue control portion */
|
||||
#define MAP_OPEN 0xff
|
||||
#define MAP_CLOSE 0xfe
|
||||
#define MAP_U_ABORT 0xfd
|
||||
#define MAP_P_ABORT 0xfc
|
||||
#define MAP_NOTICE 0xfb
|
||||
#define MAP_DELIMITER 0xfa
|
||||
#define MAP_LINK 0xef
|
||||
|
||||
#define MAP_REQUEST 0x01
|
||||
#define MAP_INDICATE 0x02
|
||||
#define MAP_RESPONSE 0x03
|
||||
#define MAP_CONFIRM 0x04
|
||||
|
||||
/* ++++++++++++++++++++ */
|
||||
/* MAP operation code */
|
||||
/* ++++++++++++++++++++ */
|
||||
|
||||
/* locaion registration operation codes */
|
||||
#define UpLoc 2 // update location
|
||||
#define CancelLoc 3 // cancel location
|
||||
#define PurgeMS 67 // purge mobile station
|
||||
#define SndIdent 55 // send identification
|
||||
|
||||
/* handover operatin codes */
|
||||
#define PreHo 68 // prepare handover
|
||||
#define SndEndSig 29 // send end signal
|
||||
#define ProcAccSig 33 // process access signalling
|
||||
#define FwdAccSig 34 // forward access signalling
|
||||
#define PreSubsHo 69 // prepare subsequent handover
|
||||
|
||||
/* authentication operation codes */
|
||||
#define SndAuthInfo 56 // send authentication information
|
||||
|
||||
/* IMEI management operation codes */
|
||||
#define ChkIMEI 43 // check IMEI
|
||||
|
||||
/* subscriber management operation codes */
|
||||
#define InsSubData 7 // insert subscriber data
|
||||
#define DelSubData 8 // delete subscriber data
|
||||
#define SendParam 9 // send parameters
|
||||
|
||||
/* fault recovery operation codes */
|
||||
#define Reset 37 // reset
|
||||
#define FwdChkSSInd 38 // forward check SS indication
|
||||
#define RestoreData 57 // restore data
|
||||
|
||||
/* operation and maintenance operation codes */
|
||||
#define ActvTraceMode 50 // active trace mode
|
||||
#define DeactvTraceMode 51 // deactive trace mode
|
||||
#define SndIMSI 58 // send IMSI
|
||||
|
||||
/* call handling operation codes */
|
||||
#define SndRoutInfo 22 // send routing information
|
||||
#define ProvRoamNum 4 // provide roaming number
|
||||
#define ResumeCH 6 // resume call handling
|
||||
#define ProvSIWFSNum 31 // provide SIWFS nunmber
|
||||
#define SIWFSSigMdf 32 // SIWFS signalling modify
|
||||
#define SetRepState 73 // set report state
|
||||
#define StatusRep 74 // status report
|
||||
#define RmtUserFree 75 // remote user free
|
||||
|
||||
/* supplementary service handling operation codes */
|
||||
#define RegSS 10 // register SS
|
||||
#define EraseSS 11 // erase SS
|
||||
#define ActvSS 12 // activate SS
|
||||
#define DeactvSS 13 // deactivate SS
|
||||
#define InterSS 14 // interrogate SS
|
||||
#define ProcUnstrctSSReq 59 // process unstructure SS request
|
||||
#define UnstrctSSReq 60 // unstructure SS request
|
||||
#define UnstrctSSNoti 61 // unstructure SS notify
|
||||
#define RegPasswd 17 // register password
|
||||
#define GetPasswd 18 // get password
|
||||
#define RegCCEntry 76 // register CC entry
|
||||
#define EraseCCEntry 77 // erase CC entry
|
||||
|
||||
/* short message service operation codes */
|
||||
#define SndRoutInfoForSM 45 // send routing information for SM
|
||||
#define FwdSM 46 // Forward SM V1
|
||||
#define MOFwdSM 46 // MO-forward SM
|
||||
#define MTFwdSM 46 // MT-forward SM
|
||||
#define MTFwdSM_v3 44
|
||||
#define RptSMDelvStat 47 // report SM delivery status
|
||||
#define InfSC 63 // inform service center
|
||||
#define AlrtSC 64 // alert service center
|
||||
#define RdyForSM 66 // ready for SM
|
||||
|
||||
/* provide subsriber info operation codes */
|
||||
#define ProvSubInfo 70 // provider subscriber information
|
||||
|
||||
/* any time interrogation operation codes */
|
||||
#define AnyTimeInter 71 // any time interrogation
|
||||
|
||||
/* supplementary service invocation notification operation codes */
|
||||
#define SSInvNoti 72 // SS invocation notification
|
||||
|
||||
/* group call operation codes */
|
||||
#define PreGrpCall 39 // prepare group call
|
||||
#define SndGrpCallEndSig 40 // send group call end signal
|
||||
#define ProcGrpCallSig 41 // process group call signalling
|
||||
#define FwdGrpCallSig 42 // forward group call signalling
|
||||
|
||||
/* GPRS location updating operation codes */
|
||||
#define UpGprsLoc 23 // update GPRS location
|
||||
|
||||
/* GPRS location information retrieval operation codes */
|
||||
#define SndRoutInfoForGprs 24 // send routing info for GPRS
|
||||
|
||||
/* failure reportin operation codes */
|
||||
#define FailRep 25 // failure report
|
||||
|
||||
/* GPRS notification operation codes */
|
||||
#define NoteMsPresForGprs 26 // note ms present for GPRS
|
||||
|
||||
/* MAP-H operaion codes, defined by owner */
|
||||
#define SecuTrip 200 // security triplets
|
||||
#define InterrSubs 201 // interrogate subscriber
|
||||
#define CreateSubs 202 // create subscriber
|
||||
#define DelSubs 203 // deleter subscriber
|
||||
#define PingAuc 204 // HLR ping AUC
|
||||
|
||||
/* +++++++++++++++++++++++++ */
|
||||
/* MAP operation error code */
|
||||
/* +++++++++++++++++++++++++ */
|
||||
|
||||
/* generic error codes */
|
||||
#define SysFail 34 // system failure
|
||||
#define DataMissing 35
|
||||
#define UnexpDataVal 36 // unexpected data value
|
||||
#define FaciNotSpprt 21 // facility not support
|
||||
#define IncomTerm 28 // incompatible terminal
|
||||
#define ResLimit 51 // resource limitation
|
||||
|
||||
/* identification and numbering error codes */
|
||||
#define UnknwnSub 1 // unknown subscriber
|
||||
#define NumChng 44 // number changed
|
||||
#define UnknwnMSC 3 // unknown MSC
|
||||
#define UnidentSub 5 // unidentified subscriber
|
||||
#define UnknwnEquip 7 // unkown equipment
|
||||
|
||||
/* subscription error codes */
|
||||
#define RoamNotAllow 8 // roaming not allowed
|
||||
#define IllgSub 9 // illegal subscriber
|
||||
#define IllgEquip 12 // illegal equipment
|
||||
#define BSNotProv 10 // bearer service not provisioned
|
||||
#define TSNotProv 11 // teleservice not provisioned
|
||||
|
||||
/* handover error codes */
|
||||
#define NoHONumAvail 25 // no handover number available
|
||||
#define SubsHOFail 26 // subsequent handover failure
|
||||
|
||||
/* operation and maintenance error codes */
|
||||
#define TrcBufferFull 40 // tracing buffer full
|
||||
|
||||
/* call handling error codes */
|
||||
#define NoRoamNumAvail 39 // no roaming number available
|
||||
#define AbsentSub 27 // absent subscriber
|
||||
#define BusySub 45 // busy subscriber
|
||||
#define NoSubReply 46 // no subscriber reply
|
||||
#define CallBarred 13
|
||||
#define FwdFail 47 // forwarding failing
|
||||
#define OR_NotAllow 48 // OR not allowed
|
||||
#define FwdViolate 14 // forwarding violate
|
||||
#define CUG_Reject 15
|
||||
|
||||
/* any time interrogatin error codes */
|
||||
#define ATI_NotAllow 49 // ati not allowed
|
||||
|
||||
/* group call error codes */
|
||||
#define NoGrpCallNumAvail 50 // no group call number available
|
||||
|
||||
/* supplementary service error codes */
|
||||
#define IllgSSOper 16 // illegal SS operation
|
||||
#define SSErrStatus 17 // SS error status
|
||||
#define SSNotAvail 18 // SS not available
|
||||
#define SSSubscViolate 19 // SS subscription violation
|
||||
#define SSIncompat 20 // SS incompatibility
|
||||
#define UnknwnAlph 71 // unknown alphabet
|
||||
#define USSDBusy 72
|
||||
#define PWRegFail 37 // pw-registration failure
|
||||
#define NegPWCheck 38 // negative pw-check
|
||||
#define NumOfPWAttViolate 43 // number of pw-attempts violation
|
||||
#define ShortTermDen 29 // short term denial
|
||||
#define LongTermDen 30 // long term denial
|
||||
|
||||
/* short message service error codes */
|
||||
#define SubBusyForMTSMS 31 // subscriber busy for MT-SMS
|
||||
#define SMDelivFail 32 // SM-delivery failure
|
||||
#define MsgWaitListFull 33 // message waiting list full
|
||||
#define AbsentSubSM 6 // absent subscriber SM
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++ */
|
||||
/* MAP operation provider error */
|
||||
/* defined by user */
|
||||
/* ++++++++++++++++++++++++++++++++ */
|
||||
#define DupInvokeId 101 // duplicated invoke id
|
||||
#define SrvNotSupport 102 // service not supported
|
||||
#define MistypeParam 103 // mistyped parameter
|
||||
#define ResourceLimit 104 // resource limitation
|
||||
#define InitRelease 105 // initiating release
|
||||
#define UnexpResFromPeer 106 // unexpected response from the peer
|
||||
#define SrvCompleteFailure 107 // service completion failure
|
||||
#define NoResFromPeer 108 // no response from the peer
|
||||
#define InvResReceive 109 // invalid response received
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++ */
|
||||
/* the following codes is reserved */
|
||||
/* ++++++++++++++++++++++++++++++++ */
|
||||
|
||||
/* reserved operation codes */
|
||||
#define SndParam 9 // send parameter
|
||||
#define ProcUnstrctSSData 19 // process unstructure SS data
|
||||
#define PerformHo 28 // perform handover
|
||||
#define PerformSubsHo 30 // perform subsequence handvoer
|
||||
#define NoteInterHo 35 // note internal handover
|
||||
#define NoteSubPrnt 48 // not subscriber present
|
||||
#define AlrtSCWithoutRes 49 // alert service center without result
|
||||
#define TraceSubAct 52 // trace subscriber activity
|
||||
#define BeginSubAct 54 // beging subscriber activity
|
||||
|
||||
/* reserved error codes */
|
||||
#define UnknwnBS 2 // unknowd base station
|
||||
#define InvalidTBS 23 // invalid target base station
|
||||
#define NoRRAvail 24 // no radio resource available
|
||||
|
||||
/* MAP OPEN response result */
|
||||
#define OpenResultRefuse 0x01
|
||||
#define OpenResultAccept 0x02
|
||||
|
||||
/* MAP OPEN refuse result */
|
||||
#define ACNotSupported 0x01
|
||||
#define InvalidDesReference 0x02 // invalid destination reference
|
||||
#define InvalidOrgReference 0x03 // invalid original reference
|
||||
#define NoReasonGiven 0x04
|
||||
#define RemoteNodeNotReachable 0x05
|
||||
#define PotentialVerIncompat 0x06 // potential version incompatibility
|
||||
|
||||
/* MAP CLOSE release method */
|
||||
#define NormalRelease 0x01
|
||||
#define PrearrangedEnd 0x02
|
||||
|
||||
/* MAP U-ABORT user reason */
|
||||
#define ResourceLimite 0x01
|
||||
#define ResourceUnavailable 0x02
|
||||
#define ApplicationCancel 0x03
|
||||
#define ProcedureError 0x04
|
||||
|
||||
/* MAP U-AOBRT diagnostic information */
|
||||
#define ShortTermProblem 0x01
|
||||
#define LongTermProblem 0x02
|
||||
#define HandoverCancel 0x03
|
||||
#define RadioChannelRelease 0x04
|
||||
#define NetworkPathRelease 0x05
|
||||
#define CallRelease 0x06
|
||||
#define AssociateProcedureFailure 0x07
|
||||
#define TandemDialogueRelease 0x08
|
||||
#define RemoteOperationFailure 0x09
|
||||
|
||||
/* MAP P-ABORT provider reason */
|
||||
#define ProviderMalfunction 0x01
|
||||
#define SupportingReleased 0x02
|
||||
#define ResourceLimitation 0x03
|
||||
#define MaintenanceActivity 0x04
|
||||
#define VersionIncompatibility 0x05
|
||||
#define AbnormalMAPDialogue 0x06
|
||||
|
||||
/* MAP P-ABORT source */
|
||||
#define MAPProblem 0x01
|
||||
#define TCProblem 0x02
|
||||
#define NetworkProblem 0x03
|
||||
|
||||
/* MAP NOTICE problem diagnostic */
|
||||
#define AbnormalEventDetect 0x01
|
||||
#define ResponseRejected 0x02
|
||||
#define AbnormalEventReceived 0x03
|
||||
#define MessageNotDelivered 0x04
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////lw add MAP V1 Modify
|
||||
|
||||
#define SendParam 9 // send parameters
|
||||
#define NoteSubPrnt 48 // not subscriber present
|
||||
#define ProcUnstrctSSData 19 // process unstructure SS data
|
||||
#define BeginSubAct 54 // beging subscriber activity
|
||||
#define PerformHo 28 // perform handover
|
||||
#define PerformSubsHo 30 // perform subsequence handvoer
|
||||
#define NoteInterHo 35 // note internal handover
|
||||
#define BeginSubAct 54 // beging subscriber activity
|
||||
#define AlrtSCWithoutRes 49 // alert service center without result
|
||||
#define TraceSubAct 52 // trace subscriber activity
|
||||
//////////////////////////////////////
|
||||
|
||||
/**** OPR VLR message ********/
|
||||
#define DetermineOprUser 128
|
||||
#define VlrUpdateLocation 129
|
||||
/**** OPR VLR message ********/
|
||||
|
||||
/**** OPR HLR message ********/
|
||||
#define CreateUserWithMsisdnImsi 130
|
||||
#define DeleteOprUser 131
|
||||
/**** OPR HLR message ********/
|
||||
|
||||
/**** IMDM VLR message ********/
|
||||
#define VlrEnquiryIMDMStatus 132
|
||||
/**** IMDM VLR message ********/
|
||||
|
||||
/***************** LCS **************/
|
||||
#define RoutingInfoForLCS 85
|
||||
#define ProvideSubscriberLocation 83
|
||||
/***************** LCS **************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
266
plat/xapp/src/mapp/map_code_auc.c
Normal file
266
plat/xapp/src/mapp/map_code_auc.c
Normal file
@@ -0,0 +1,266 @@
|
||||
/* map coding auc service file */
|
||||
/* written by Liu Zhiguo 2002-06-03 */
|
||||
/* Version 2.0 */
|
||||
/* -------------------------------- */
|
||||
|
||||
#include "map_includes.h"
|
||||
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding security triplets argument */
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_securityTriplets_arg(struct MapST_Arg *ptr,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int buf_len=0;
|
||||
u32 flag;
|
||||
|
||||
flag = ptr->param_flag;
|
||||
asn_encode(buf,&asn_buf);
|
||||
if(flag & 0x01) //imsi
|
||||
buf_len = add_tlv("4-1",IMSI_LEN,ptr->imsi,0x00,&asn_buf);
|
||||
else
|
||||
return RER;
|
||||
if(flag & 0x02) //hlr_id
|
||||
buf_len = add_tlv("4-2",HLRID_LEN,ptr->hlr_id,0x00,&asn_buf);
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_securityTriplets_arg(struct MapST_Arg *ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u8 temp_buf[256];
|
||||
int len;
|
||||
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("MAPP--extract_securityTriplets_arg buf_len=0");
|
||||
return RER;
|
||||
}
|
||||
if(asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
ptr->param_flag = 0;
|
||||
len = get_tlv("4-1",temp_buf,&asn_buf);
|
||||
if(len == IMSI_LEN && (temp_buf[IMSI_LEN-1]&0xf0) == 0xf0 ) //imsi
|
||||
{
|
||||
ptr->param_flag |= 0x01;
|
||||
memcpy(ptr->imsi,temp_buf,len);
|
||||
}
|
||||
if((len=get_tlv("4-2",temp_buf,&asn_buf)) == HLRID_LEN ) //hlr_id
|
||||
{
|
||||
ptr->param_flag |= 0x02;
|
||||
memcpy(ptr->hlr_id,temp_buf,len);
|
||||
}
|
||||
return ROK;
|
||||
}
|
||||
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding security triplets response */
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_securityTriplets_res(struct MapST_Res *ptr,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int buf_len=0;
|
||||
u32 flag;
|
||||
int ii;
|
||||
char tlv1[32];
|
||||
int temp_len;
|
||||
u8 temp_buf[256];
|
||||
|
||||
flag = ptr->param_flag;
|
||||
asn_encode(buf,&asn_buf);
|
||||
if ((flag & 0x01) == 0)
|
||||
{
|
||||
mapp_log_debug("MAPP--assign_securityTriplets_res flag=0");
|
||||
return RER;
|
||||
}
|
||||
if (ptr->authlist.auth_len > AUTHLIST_LEN)
|
||||
{
|
||||
mapp_log_debug("MAPP--assign_securityTriplets_res auth_len>AUTHLIST_LEN");
|
||||
return RER;
|
||||
}
|
||||
for (ii = 0;ii < ptr->authlist.auth_len;ii ++)
|
||||
{
|
||||
temp_len = assign_authset(&ptr->authlist.auth_set[ii],temp_buf);
|
||||
if (temp_len == RER)
|
||||
break;
|
||||
sprintf(tlv1,"16-%d",ii+1);
|
||||
buf_len = add_tlv(tlv1,temp_len,temp_buf,0x20,&asn_buf);
|
||||
}
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_securityTriplets_res(struct MapST_Res *ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
u8 temp_buf[256];
|
||||
char tlv1[32];
|
||||
int ii;
|
||||
int len;
|
||||
ASN_BUF asn_buf;
|
||||
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("MAPP--extract_securityTriplets_res buf_len=0");
|
||||
return ROK;
|
||||
}
|
||||
if(asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
ptr->param_flag = 0;
|
||||
for(ii = 0;ii < AUTHLIST_LEN;ii ++)
|
||||
{
|
||||
sprintf(tlv1,"16-%d",ii+1);
|
||||
len = get_tlv(tlv1,temp_buf,&asn_buf);
|
||||
if (len == -1)
|
||||
break;
|
||||
if (!extract_authset(&ptr->authlist.auth_set[ii],len,temp_buf))
|
||||
break;
|
||||
ptr->param_flag |= 0x01;
|
||||
ptr->authlist.auth_len ++;
|
||||
}
|
||||
return ROK;
|
||||
}
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding interrogation subscriber argument */
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_interrogateSubscriber_arg(struct MapIS_Arg *ptr,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int buf_len=0;
|
||||
u32 flag;
|
||||
|
||||
flag = ptr->param_flag;
|
||||
asn_encode(buf,&asn_buf);
|
||||
if(flag & 0x01) //imsi
|
||||
buf_len = add_tlv("4-1",IMSI_LEN,ptr->imsi,0x00,&asn_buf);
|
||||
else
|
||||
return RER;
|
||||
if(flag & 0x02) //hlr_id
|
||||
buf_len = add_tlv("4-2",HLRID_LEN,ptr->hlr_id,0x00,&asn_buf);
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_interrogateSubscriber_arg(struct MapIS_Arg *ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u8 temp_buf[256];
|
||||
int len;
|
||||
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("MAPP--extract_interrogateSubscriber_arg buf_len=0");
|
||||
return RER;
|
||||
}
|
||||
if(asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
ptr->param_flag = 0;
|
||||
len = get_tlv("4-1",temp_buf,&asn_buf);
|
||||
if(len == IMSI_LEN && (temp_buf[IMSI_LEN-1]&0xf0) == 0xf0 )//imsi
|
||||
{
|
||||
ptr->param_flag|=0x01;
|
||||
memcpy(ptr->imsi,temp_buf,len);
|
||||
}
|
||||
else
|
||||
return RER;
|
||||
if((get_tlv("4-2",temp_buf,&asn_buf)) == HLRID_LEN)//hlr_id
|
||||
{
|
||||
ptr->param_flag |= 0x02;
|
||||
memcpy(ptr->hlr_id,temp_buf,HLRID_LEN);
|
||||
}
|
||||
return ROK;
|
||||
}
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding create subscriber argument */
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_createSubscriber_arg(struct MapCS_Arg *ptr,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int buf_len=0;
|
||||
u32 flag;
|
||||
|
||||
flag = ptr->param_flag;
|
||||
asn_encode(buf,&asn_buf);
|
||||
if(flag & 0x01) //imsi
|
||||
buf_len = add_tlv("4-1",IMSI_LEN,ptr->imsi,0x00,&asn_buf);
|
||||
else
|
||||
return RER;
|
||||
if(flag & 0x02) //hlr_id
|
||||
buf_len = add_tlv("4-2",HLRID_LEN,ptr->hlr_id,0x00,&asn_buf);
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_createSubscriber_arg(struct MapCS_Arg *ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u8 temp_buf[256];
|
||||
int len;
|
||||
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("MAPP--extract_createSubscriber_arg buf_len=0");
|
||||
return RER;
|
||||
}
|
||||
if(asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
ptr->param_flag = 0;
|
||||
len = get_tlv("4-1",temp_buf,&asn_buf);
|
||||
if(len == IMSI_LEN && (temp_buf[7]&0xf0) == 0xf0) //imsi
|
||||
{
|
||||
ptr->param_flag |= 0x01;
|
||||
memcpy(ptr->imsi,temp_buf,len);
|
||||
}
|
||||
if((get_tlv("4-2",temp_buf,&asn_buf))==HLRID_LEN) //hlr_id
|
||||
{
|
||||
ptr->param_flag |= 0x02;
|
||||
memcpy(ptr->hlr_id,temp_buf,HLRID_LEN);
|
||||
}
|
||||
return ROK;
|
||||
}
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding delete subscriber argument */
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_deleteSubscriber_arg(struct MapDS_Arg *ptr,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int buf_len=0;
|
||||
u32 flag;
|
||||
|
||||
flag = ptr->param_flag;
|
||||
asn_encode(buf,&asn_buf);
|
||||
if(flag & 0x01) //imsi
|
||||
buf_len = add_tlv("4-1",IMSI_LEN,ptr->imsi,0x00,&asn_buf);
|
||||
else
|
||||
return RER;
|
||||
if(flag & 0x02) //hlr_id
|
||||
buf_len = add_tlv("4-2",HLRID_LEN,ptr->hlr_id,0x00,&asn_buf);
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_deleteSubscriber_arg(struct MapDS_Arg *ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
u8 temp_buf[256];
|
||||
int len;
|
||||
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("MAPP--extract_createSubscriber_arg buf_len=0");
|
||||
return RER;
|
||||
}
|
||||
if(asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
ptr->param_flag = 0;
|
||||
len = get_tlv("4-1",temp_buf,&asn_buf);
|
||||
if(len == IMSI_LEN && (temp_buf[7]&0xf0) == 0xf0) //imsi
|
||||
{
|
||||
ptr->param_flag |= 0x01;
|
||||
memcpy(ptr->imsi,temp_buf,len);
|
||||
}
|
||||
if((get_tlv("4-2",temp_buf,&asn_buf))==HLRID_LEN) //hlr_id
|
||||
{
|
||||
ptr->param_flag |= 0x02;
|
||||
memcpy(ptr->hlr_id,temp_buf,HLRID_LEN);
|
||||
}
|
||||
return ROK;
|
||||
}
|
||||
1775
plat/xapp/src/mapp/map_code_ch.c
Normal file
1775
plat/xapp/src/mapp/map_code_ch.c
Normal file
File diff suppressed because it is too large
Load Diff
209
plat/xapp/src/mapp/map_code_dlgpdu.c
Normal file
209
plat/xapp/src/mapp/map_code_dlgpdu.c
Normal file
@@ -0,0 +1,209 @@
|
||||
/* MAP dialogue PDU coding/decoding c file */
|
||||
/* Written by Liu Zhiguo 2003-08-25 */
|
||||
/* Version: 1.0 */
|
||||
/* -------------------------------------- */
|
||||
|
||||
#include "map_includes.h"
|
||||
#include "../../../tcap/src/include/tcap_head.h"
|
||||
#include "../../../tcap/src/include/tcap_public.h"
|
||||
#include "../../../tcap/src/include/tcap_struct.h"
|
||||
#include "../xap_interfunc.h"
|
||||
#include "map_dlgpdu.h"
|
||||
|
||||
|
||||
static u8 MAPP_Dlgpdu[7] = {0x04,0x00,0x00,0x01,0x01,0x01,0x01};
|
||||
|
||||
u8 build_mapdlg(struct MapDlg_struct *dlg_ptr,u8 *data_buf) // build user information portion
|
||||
{
|
||||
struct MapDlgOpen_struct *map_open;
|
||||
struct MapDlgUAbort_struct *map_uabort;
|
||||
ASN_BUF asn_buf;
|
||||
u8 temp_buf[256],temp_data[256];
|
||||
int len=0,len1=0;
|
||||
|
||||
asn_encode(temp_buf,&asn_buf);
|
||||
switch (dlg_ptr->dlg_type)
|
||||
{
|
||||
case MAPDLG_OPEN:
|
||||
map_open = (MapDlgOpen_struct *) &dlg_ptr->map_dlg.map_open;
|
||||
if ((map_open->param_flag & 0x01))
|
||||
len1 = add_tlv("0.0",map_open->peer_ref[0],map_open->peer_ref+1,0x80,&asn_buf);
|
||||
if ((map_open->param_flag & 0x02))
|
||||
len1 = add_tlv("0.1",map_open->local_ref[0],map_open->local_ref+1,0x80,&asn_buf);
|
||||
break;
|
||||
case MAPDLG_ACCEPT:
|
||||
len1 = add_tlv("1",0,&dlg_ptr->dlg_type,0x80,&asn_buf);
|
||||
break;
|
||||
case MAPDLG_CLOSE:
|
||||
len1 = add_tlv("2",0,&dlg_ptr->dlg_type,0x80,&asn_buf);
|
||||
break;
|
||||
case MAPDLG_REFUSE:
|
||||
temp_data[0] = dlg_ptr->map_dlg.map_refuse.reason;
|
||||
len1 = add_tlv("3.10",1,temp_data,0x00,&asn_buf);
|
||||
break;
|
||||
case MAPDLG_UABORT:
|
||||
map_uabort = (MapDlgUAbort_struct *) &dlg_ptr->map_dlg.map_uabort;
|
||||
switch (map_uabort->choice_flag)
|
||||
{
|
||||
case 0:
|
||||
len1 = add_null("4.0",0x00,&asn_buf);
|
||||
break;
|
||||
case 1:
|
||||
len1 = add_null("4.1",0x00,&asn_buf);
|
||||
break;
|
||||
case 2:
|
||||
temp_data[0] = map_uabort->choice.resunavi;
|
||||
len1 = add_tlv("4.2.10",1,temp_data,0x00,&asn_buf);
|
||||
break;
|
||||
case 3:
|
||||
temp_data[0] = map_uabort->choice.appproccancel;
|
||||
len1 = add_tlv("4.3.10",1,temp_data,0x00,&asn_buf);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case MAPDLG_PABORT:
|
||||
temp_data[0] = dlg_ptr->map_dlg.map_pabort.reason;
|
||||
len1 = add_tlv("5.10",1,temp_data,0x00,&asn_buf);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
asn_encode(data_buf,&asn_buf);
|
||||
len = add_tlv("8",0,temp_data,0x20,&asn_buf);
|
||||
len = add_tlv("8.6-1",7,MAPP_Dlgpdu,0x00,&asn_buf);
|
||||
len = add_tlv("8.0-2",len1,temp_buf,0xa0,&asn_buf);
|
||||
return len;
|
||||
}
|
||||
|
||||
u8 extract_mapdlg(struct MapDlg_struct *dlg_ptr,struct dlgport_struct *port_ptr)
|
||||
{
|
||||
struct MapDlgOpen_struct *map_open;
|
||||
struct MapDlgUAbort_struct *map_uabort;
|
||||
ASN_BUF asn_buf;
|
||||
u8 temp_buf[256],temp_data[256];
|
||||
int len;
|
||||
|
||||
dlg_ptr->dlg_type = 0xff;
|
||||
len = asn_decode(port_ptr->user_info,1,&asn_buf);
|
||||
if (len != port_ptr->user_info_len)
|
||||
{
|
||||
xap_send_error("MAPP extract user info error");
|
||||
return 0;
|
||||
}
|
||||
len = get_tlv("8",temp_buf,&asn_buf); // get External tag
|
||||
if (len == -1) // has nor external tag
|
||||
{
|
||||
xap_send_error("MAPP extract user info error");
|
||||
return 0;
|
||||
}
|
||||
len = get_tlv("8.6",temp_buf,&asn_buf);
|
||||
if (len == 7) // get MAP dialgoue PDU
|
||||
{
|
||||
if (temp_buf[5] != 1 || temp_buf[6] != 1)
|
||||
{
|
||||
xap_send_error("MAPP extract user info error identifier");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
len = get_tlv("8.0",temp_buf,&asn_buf); // get ASN.1 type
|
||||
if (len == -1)
|
||||
{
|
||||
xap_send_error("MAPP extract user info error ASN.1 type");
|
||||
return 0;
|
||||
}
|
||||
len = asn_decode(temp_buf,1,&asn_buf);
|
||||
len = get_tlv("0",temp_data,&asn_buf); // MAP_OPEN info
|
||||
if (len != -1)
|
||||
{
|
||||
dlg_ptr->dlg_type = MAPDLG_OPEN;
|
||||
map_open = (MapDlgOpen_struct *) &dlg_ptr->map_dlg.map_open;
|
||||
map_open->param_flag = 0;
|
||||
len = get_tlv("0.0",temp_data,&asn_buf); // local reference
|
||||
if (len != -1)
|
||||
{
|
||||
map_open->param_flag |= 0x02;
|
||||
map_open->local_ref[0] = len;
|
||||
memcpy(map_open->local_ref+1,temp_data,len);
|
||||
}
|
||||
len = get_tlv("0.1",temp_data,&asn_buf); // peer reference
|
||||
if (len != -1)
|
||||
{
|
||||
map_open->param_flag |= 0x01;
|
||||
map_open->peer_ref[0] = len;
|
||||
memcpy(map_open->peer_ref+1,temp_data,len);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
len = get_tlv("1",temp_data,&asn_buf); // MAP_ACCEPT info
|
||||
if (len != -1)
|
||||
{
|
||||
dlg_ptr->dlg_type = MAPDLG_ACCEPT;
|
||||
return 1;
|
||||
}
|
||||
len = get_tlv("2",temp_data,&asn_buf); // MAP_CLOSE info
|
||||
if (len != -1)
|
||||
{
|
||||
dlg_ptr->dlg_type = MAPDLG_CLOSE;
|
||||
return 1;
|
||||
}
|
||||
len = get_tlv("3",temp_data,&asn_buf); // MAP_REFUSE info
|
||||
if (len != -1)
|
||||
{
|
||||
dlg_ptr->dlg_type = MAPDLG_REFUSE;
|
||||
len = get_tlv("3.10",temp_data,&asn_buf);
|
||||
if (len != 1)
|
||||
{
|
||||
xap_send_error("MAPP extract user info refuse lack reason");
|
||||
return 0;
|
||||
}
|
||||
dlg_ptr->map_dlg.map_refuse.param_flag = 0x01;
|
||||
dlg_ptr->map_dlg.map_refuse.reason = temp_data[0];
|
||||
return 1;
|
||||
}
|
||||
len = get_tlv("4",temp_data,&asn_buf); // MAP_UABORT info
|
||||
if (len != -1)
|
||||
{
|
||||
dlg_ptr->dlg_type = MAPDLG_UABORT;
|
||||
map_uabort = (MapDlgUAbort_struct *) &dlg_ptr->map_dlg.map_uabort;
|
||||
len = get_tlv("4.0",temp_data,&asn_buf); // user specific reason
|
||||
if (len != -1)
|
||||
map_uabort->choice_flag = 0;
|
||||
len = get_tlv("4.1",temp_data,&asn_buf); // user resource limitation
|
||||
if (len != -1)
|
||||
map_uabort->choice_flag = 1;
|
||||
len = get_tlv("4.2",temp_data,&asn_buf); // resource unabailable
|
||||
if (len != -1)
|
||||
{
|
||||
map_uabort->choice_flag = 2;
|
||||
len = get_tlv("4.2.10",temp_data,&asn_buf);
|
||||
if (len == -1)
|
||||
return 0;
|
||||
map_uabort->choice.resunavi = temp_data[0];
|
||||
}
|
||||
len = get_tlv("4.3",temp_data,&asn_buf); // APC
|
||||
if (len != -1)
|
||||
{
|
||||
map_uabort->choice_flag = 3;
|
||||
len = get_tlv("4.3.10",temp_data,&asn_buf);
|
||||
if (len == -1)
|
||||
return 0;
|
||||
map_uabort->choice.appproccancel = temp_data[0];
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
len = get_tlv("5",temp_data,&asn_buf); // MAP_PAOBRT info
|
||||
if (len != -1)
|
||||
{
|
||||
dlg_ptr->dlg_type = MAPDLG_PABORT;
|
||||
len = get_tlv("5.10",temp_data,&asn_buf);
|
||||
if (len != 1)
|
||||
return 0;
|
||||
dlg_ptr->map_dlg.map_pabort.param_flag = 0x01;
|
||||
dlg_ptr->map_dlg.map_pabort.reason = temp_data[0];
|
||||
return 1;
|
||||
}
|
||||
xap_send_error("MAPP extract user info unknown type");
|
||||
return 0;
|
||||
}
|
||||
4697
plat/xapp/src/mapp/map_code_ms.c
Normal file
4697
plat/xapp/src/mapp/map_code_ms.c
Normal file
File diff suppressed because it is too large
Load Diff
231
plat/xapp/src/mapp/map_code_om.c
Normal file
231
plat/xapp/src/mapp/map_code_om.c
Normal file
@@ -0,0 +1,231 @@
|
||||
/* map coding operation & maintenance c file */
|
||||
/* written by Liu Zhiguo 2003-03-04 */
|
||||
/* Version 2.0 */
|
||||
/* ----------------------------------------- */
|
||||
|
||||
#include "map_includes.h"
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding activate trace mode argument */
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_acttrcmodearg(struct MapATM_Arg *atm_ptr,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int buf_len=0;
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
if (atm_ptr->param_flag & 0x01) // imsi
|
||||
buf_len = add_tlv("0",IMSI_LEN,atm_ptr->imsi,0x80,&asn_buf);
|
||||
if (atm_ptr->param_flag & 0x02) // trace reference
|
||||
buf_len = add_tlv("1",2,atm_ptr->trace_ref,0x80,&asn_buf);
|
||||
else
|
||||
return RER;
|
||||
if (atm_ptr->param_flag & 0x04) // trace type
|
||||
buf_len = add_int("2",atm_ptr->trace_type,0x80,&asn_buf);
|
||||
else
|
||||
return RER;
|
||||
if (atm_ptr->param_flag & 0x08) // omc id
|
||||
buf_len = add_tlv("3",atm_ptr->omc_id[0],atm_ptr->omc_id+1,0x80,&asn_buf);
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_acttrcmodearg(struct MapATM_Arg *atm_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
|
||||
atm_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("MAPP--extract_activate trace mode buf_len=0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf);
|
||||
if (len==IMSI_LEN && (temp_buf[IMSI_LEN-1]&0xf0) == 0xf0) //get imsi
|
||||
{
|
||||
atm_ptr->param_flag |= 0x01;
|
||||
memcpy(atm_ptr->imsi,temp_buf,IMSI_LEN);
|
||||
}
|
||||
if (get_tlv("1",temp_buf,&asn_buf) == 2)
|
||||
{
|
||||
atm_ptr->param_flag |= 0x02;
|
||||
memcpy(atm_ptr->trace_ref,temp_buf,2);
|
||||
}
|
||||
else
|
||||
return RER;
|
||||
if (get_tlv("2",temp_buf,&asn_buf) == 1)
|
||||
{
|
||||
atm_ptr->param_flag |= 0x04;
|
||||
atm_ptr->trace_type = temp_buf[0];
|
||||
}
|
||||
else
|
||||
return RER;
|
||||
len = get_tlv("3",temp_buf,&asn_buf);
|
||||
if (len > 0 && len <= ISDN_LEN)
|
||||
{
|
||||
atm_ptr->param_flag |= 0x08;
|
||||
atm_ptr->omc_id[0] = len;
|
||||
memcpy(atm_ptr->omc_id+1,temp_buf,len);
|
||||
}
|
||||
return ROK;
|
||||
}
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding activate trace mode response */
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_acttrcmoderes(struct MapATM_Res *atm_ptr,u8 *buf)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int extract_acttrcmoderes(struct MapATM_Res *atm_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
return ROK;
|
||||
}
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding deactivate trace mode argument */
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_deacttrcmodearg(struct MapDTM_Arg *dtm_ptr,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int buf_len=0;
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
if (dtm_ptr->param_flag & 0x01) // imsi
|
||||
buf_len = add_tlv("0",IMSI_LEN,dtm_ptr->imsi,0x80,&asn_buf);
|
||||
if (dtm_ptr->param_flag & 0x02) // trace reference
|
||||
buf_len = add_tlv("1",2,dtm_ptr->trace_ref,0x80,&asn_buf);
|
||||
else
|
||||
return RER;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_deacttrcmodearg(struct MapDTM_Arg *dtm_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
|
||||
dtm_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("MAPP--extract_deactivate trace mode buf_len=0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("0",temp_buf,&asn_buf);
|
||||
if (len==IMSI_LEN && (temp_buf[IMSI_LEN-1]&0xf0) == 0xf0) //get imsi
|
||||
{
|
||||
dtm_ptr->param_flag |= 0x01;
|
||||
memcpy(dtm_ptr->imsi,temp_buf,IMSI_LEN);
|
||||
}
|
||||
if (get_tlv("1",temp_buf,&asn_buf) == 2)
|
||||
{
|
||||
dtm_ptr->param_flag |= 0x02;
|
||||
memcpy(dtm_ptr->trace_ref,temp_buf,2);
|
||||
}
|
||||
else
|
||||
return RER;
|
||||
return ROK;
|
||||
}
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding deactivate trace mode response */
|
||||
/* ++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_deacttrcmoderes(struct MapDTM_Res *dtm_ptr,u8 *buf)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int extract_deacttrcmoderes(struct MapDTM_Res *dtm_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
return ROK;
|
||||
}
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding send IMSI argument */
|
||||
/* ++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_sndimsiarg(struct MapSIMSI_Arg *sim_ptr,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int buf_len=0;
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
if (sim_ptr->param_flag & 0x01) // msisdn
|
||||
buf_len = add_tlv("4",sim_ptr->msisdn[0],sim_ptr->msisdn+1,0x00,&asn_buf);
|
||||
else
|
||||
return RER;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_sndimsiarg(struct MapSIMSI_Arg *sim_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
|
||||
sim_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("MAPP--extract_send imsi buf_len=0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("4",temp_buf,&asn_buf);
|
||||
if (len > 0 && len <= ISDN_LEN)
|
||||
{
|
||||
sim_ptr->param_flag |= 0x01;
|
||||
sim_ptr->msisdn[0] = len;
|
||||
memcpy(sim_ptr->msisdn+1,temp_buf,len);
|
||||
}
|
||||
else
|
||||
return RER;
|
||||
return ROK;
|
||||
}
|
||||
|
||||
/* ++++++++++++++++++++++++++++++++++++ */
|
||||
/* encoding/decoding send IMSI response */
|
||||
/* ++++++++++++++++++++++++++++++++++++ */
|
||||
int assign_sndimsires(struct MapSIMSI_Res *sim_ptr,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int buf_len=0;
|
||||
|
||||
asn_encode(buf,&asn_buf);
|
||||
if (sim_ptr->param_flag & 0x01) // imsi
|
||||
buf_len = add_tlv("4",IMSI_LEN,sim_ptr->imsi,0x00,&asn_buf);
|
||||
else
|
||||
return RER;
|
||||
return buf_len;
|
||||
}
|
||||
|
||||
int extract_sndimsires(struct MapSIMSI_Res *sim_ptr,u32 buf_len,u8 *buf)
|
||||
{
|
||||
ASN_BUF asn_buf;
|
||||
int len;
|
||||
u8 temp_buf[256];
|
||||
|
||||
sim_ptr->param_flag = 0;
|
||||
if (buf_len == 0)
|
||||
{
|
||||
mapp_log_debug("MAPP--extract_send imsi buf_len=0");
|
||||
return RER;
|
||||
}
|
||||
if (asn_decode_v3(buf,buf_len,&decErr,&asn_buf) == -1)
|
||||
return RER;
|
||||
len = get_tlv("4",temp_buf,&asn_buf);
|
||||
if (len == IMSI_LEN && (temp_buf[IMSI_LEN-1]&0xf0) == 0xf0)
|
||||
{
|
||||
sim_ptr->param_flag |= 0x01;
|
||||
memcpy(sim_ptr->imsi,temp_buf,IMSI_LEN);
|
||||
}
|
||||
else
|
||||
return RER;
|
||||
return ROK;
|
||||
}
|
||||
1325
plat/xapp/src/mapp/map_code_sms.c
Normal file
1325
plat/xapp/src/mapp/map_code_sms.c
Normal file
File diff suppressed because it is too large
Load Diff
1647
plat/xapp/src/mapp/map_code_ss.c
Normal file
1647
plat/xapp/src/mapp/map_code_ss.c
Normal file
File diff suppressed because it is too large
Load Diff
1813
plat/xapp/src/mapp/map_coding.c
Normal file
1813
plat/xapp/src/mapp/map_coding.c
Normal file
File diff suppressed because it is too large
Load Diff
513
plat/xapp/src/mapp/map_coding.h
Normal file
513
plat/xapp/src/mapp/map_coding.h
Normal file
@@ -0,0 +1,513 @@
|
||||
/* MAP coding head file */
|
||||
/* written by Liu Zhiguo 2003-03-04 */
|
||||
/* version 2.0 */
|
||||
/* -------------------------------- */
|
||||
|
||||
#ifndef _MAP_CODING
|
||||
#define _MAP_CODING
|
||||
|
||||
/* define in map_code_ms.c */
|
||||
int assign_uplocarg(struct MapUL_Arg *ul_ptr,u8 *buf,u8 ver);
|
||||
int extract_uplocarg(struct MapUL_Arg *ul_ptr,u32 buf_len,u8 *buf ,u8 ver);
|
||||
int assign_uplocres(struct MapUL_Res *ul_ptr,u8 *buf);
|
||||
int extract_uplocres(struct MapUL_Res *ul_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
|
||||
/* ------------------------>>>>>>>>>>>>>>>> MAP v1 <<<<<<<<<<<<<<<<<<<<<<<<<----------------*/
|
||||
|
||||
//int assign_sendParameterres(struct MapSP_Res *sp_ptr,u8 *buf);
|
||||
//int extract_sendParameterArg(struct MapSP_Arg *sp_ptr,u32 buf_len,u8 *buf,u32 dialogue_id);
|
||||
|
||||
int assign_SendParaArg(struct MapSP_Arg *sendpara_ptr,u8 *buf);
|
||||
int extract_SendParaArg(struct MapSP_Arg *sendpara_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_SendParaRes(struct MapSP_Res *sp_ptr,u8 *buf);
|
||||
int extract_SendParaRes(struct MapSP_Res *sp_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_NotPresentArg(struct MapNP_Arg *np_ptr, u8 *buf);
|
||||
int extract_NotPresentArg( struct MapNP_Arg *np_ptr,u32 buf_len,u8 *buf) ;
|
||||
|
||||
int assign_ProcessUSSDArg(struct MapPUSSD_Arg *ussd_ptr, u8 *buf);
|
||||
int extract_ProcessUSSDArg( struct MapPUSSD_Arg *ussd_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_ProcessUSSDRes(struct MapPUSSD_Res *ussd_ptr, u8 *buf) ;
|
||||
int extract_ProcessUSSDRes( struct MapPUSSD_Res *ussd_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_SAArg(struct MapSA_Arg *sa_ptr, u8 *buf) ;
|
||||
int extract_SAArg( struct MapSA_Arg *sa_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_HOArg(struct MapHO_Arg *ho_ptr, u8 *buf) ;
|
||||
int extract_HOArg( struct MapHO_Arg *ho_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_HORes(struct MapHO_Res *ho_ptr, u8 *buf) ;
|
||||
int extract_HORes( struct MapHO_Res *ho_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_PFSHOArg(struct MapPFSHO_Arg *psho_ptr, u8 *buf);
|
||||
int extract_PFSHOArg( struct MapPFSHO_Arg *psho_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_PFSHORes(struct MapPFSHO_Res *psho_ptr,u8 *buf);
|
||||
int extract_PFSHORes(struct MapPFSHO_Res *psho_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_NIHOArg(struct MapNIHO_Arg *niho_ptr, u8 *buf) ;
|
||||
int extract_NIHOArg( struct MapNIHO_Arg *niho_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_TSAArg(struct MapTSA_Arg *tsa_ptr, u8 *buf);
|
||||
int extract_TSAArg( struct MapTSA_Arg *TSA_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_BSAArg(struct MapBSA_Arg *bsa_ptr, u8 *buf);
|
||||
int extract_BSAArg( struct MapBSA_Arg *bsa_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
|
||||
int assign_routinfoforsm_v1_arg(struct MapRIFSMV1_Arg *rif_ptr,u8 *buf);
|
||||
int extract_routinfoforsm_v1_arg(struct MapRIFSMV1_Arg *rif_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_routinfoforsm_v1_res(struct MapRIFSMV1_Res *rif_ptr,u8 *buf);
|
||||
int extract_routinfoforsm_v1_res(struct MapRIFSMV1_Res *rif_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
|
||||
int assign_fwdsmarg(struct MapFSM_Arg *ptr,u8 *buf);
|
||||
int extract_fwdsmarg(struct MapFSM_Arg *ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_cancellocarg(struct MapCL_Arg *cl_ptr,u8 *buf,u8 ver);
|
||||
int extract_cancellocarg(struct MapCL_Arg *cl_ptr,u32 buf_len,u8 *buf,u8 ver);
|
||||
int assign_cancellocres(struct MapCL_Res *cl_ptr,u8 *buf);
|
||||
int extract_cancellocres(struct MapCL_Res *cl_ptr,u32 buf_len,u8 *buf);
|
||||
/* ------------------------>>>>>>>>>>>>>>>> MAP v1 <<<<<<<<<<<<<<<<<<<<<<<<<----------------*/
|
||||
|
||||
int assign_purgemsarg(struct MapPMS_Arg *pms_ptr,u8 *buf,u8 version);
|
||||
int extract_purgemsarg(struct MapPMS_Arg *pms_ptr,u32 buf_len,u8 *buf,u8 version);
|
||||
int assign_purgemsres(struct MapPMS_Res *pms_ptr,u8 *buf);
|
||||
int extract_purgemsres(struct MapPMS_Res *pms_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_sndidentarg(struct MapSI_Arg *ptr,u8 *buf);
|
||||
int extract_sndidentarg(struct MapSI_Arg *ptr,u32 buf_len,u8 *buf);
|
||||
int assign_sndidentres(struct MapSI_Res *ptr,u8 *buf);
|
||||
int extract_sndidentres(struct MapSI_Res *ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_upgprslocarg(struct MapUGL_Arg *ugl_ptr,u8 *buf);
|
||||
int extract_upgprslocarg(struct MapUGL_Arg *ugl_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_upgprslocres(struct MapUGL_Res *ugl_ptr,u8 *buf);
|
||||
int extract_upgprslocres(struct MapUGL_Res *ugl_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_prvsubinfoarg(struct MapPSI_Arg *psi_ptr,u8 *buf);
|
||||
int extract_prvsubinfoarg(struct MapPSI_Arg *psi_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_prvsubinfores(struct MapPSI_Res *psi_ptr,u8 *buf);
|
||||
int extract_prvsubinfores(struct MapPSI_Res *psi_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_anytimeintarg(struct MapATI_Arg *ati_ptr,u8 *buf);
|
||||
int extract_anytimeintarg(struct MapATI_Arg *ati_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_anytimeintres(struct MapATI_Res *ati_ptr,u8 *buf);
|
||||
int extract_anytimeintres(struct MapATI_Res *ati_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_prehoarg(struct MapPHO_Arg *pho_ptr,u8 *buf);
|
||||
int extract_prehoarg(struct MapPHO_Arg *pho_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_prehores(struct MapPHO_Res *pho_ptr,u8 *buf);
|
||||
int extract_prehores(struct MapPHO_Res *pho_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_sndendsigarg(struct MapSES_Arg *ses_ptr,u8 *buf);
|
||||
int extract_sndendsigarg(struct MapSES_Arg *ses_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_prcaccsigarg(struct MapPAS_Arg *pas_ptr,u8 *buf);
|
||||
int extract_prcaccsigarg(struct MapPAS_Arg *pas_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_fwdaccsigarg(struct MapFAS_Arg *fas_ptr,u8 *buf);
|
||||
int extract_fwdaccsigarg(struct MapFAS_Arg *fas_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_presubshoarg(struct MapPSHO_Arg *psho_ptr,u8 *buf);
|
||||
int extract_presubshoarg(struct MapPSHO_Arg *psho_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_presubshores(struct MapPSHO_Res *psho_ptr,u8 *buf);
|
||||
int extract_presubshores(struct MapPSHO_Res *psho_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_sndauthinfoarg(struct MapSAI_Arg *sai_ptr,u8 *buf);
|
||||
int assign_sndauthinfores(struct MapSAI_Res *sai_ptr,u8 *buf);
|
||||
int extract_sndauthinfoarg(struct MapSAI_Arg *sai_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_sndauthinfores(struct MapSAI_Res *sai_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_chkimeiarg(struct MapCIMEI_Arg *ptr,u8 *buf);
|
||||
int extract_chkimeiarg(struct MapCIMEI_Arg *ptr,u32 buf_len,u8 *buf);
|
||||
int assign_chkimeires(struct MapCIMEI_Res *ptr,u8 *buf);
|
||||
int extract_chkimeires(struct MapCIMEI_Res *ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_inssubdataarg(struct MapISD_Arg *isd_ptr,u8 *buf,u8 version);
|
||||
int assign_inssubdatares(struct MapISD_Res *isd_ptr,u8 *buf);
|
||||
int extract_inssubdataarg(struct MapISD_Arg *isd_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_inssubdatares(struct MapISD_Res *isd_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_delsubdataarg(struct MapDSD_Arg *dsd_ptr,u8 *buf);
|
||||
int extract_delsubdataarg(struct MapDSD_Arg *dsd_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_delsubdatares(struct MapDSD_Res *dsdr_ptr,u8 *buf);
|
||||
int extract_delsubdatares(struct MapDSD_Res *dsdr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_resetarg(struct MapReset_Arg *rs_ptr,u8 *buf);
|
||||
int extract_resetarg(struct MapReset_Arg *rs_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_restdataarg(struct MapRD_Arg *rsd_ptr,u8 *buf);
|
||||
int extract_restdataarg(struct MapRD_Arg *rsd_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_restdatares(struct MapRD_Res *rsd_ptr,u8 *buf);
|
||||
int extract_restdatares(struct MapRD_Res *rsd_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_sndroutinfogprsarg(struct MapSRIFG_Arg *sfg_ptr,u8 *buf);
|
||||
int extract_sndroutinfogprsarg(struct MapSRIFG_Arg *sfg_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_sndroutinfogprsres(struct MapSRIFG_Res *sfg_ptr,u8 *buf);
|
||||
int extract_sndroutinfogprsres(struct MapSRIFG_Res *sfg_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_failreportarg(struct MapFR_Arg *fr_ptr,u8 *buf);
|
||||
int extract_failreportarg(struct MapFR_Arg *fr_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_failreportres(struct MapFR_Res *fr_ptr,u8 *buf);
|
||||
int extract_failreportres(struct MapFR_Res *fr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_notemspregprsarg(struct MapNMPFG_Arg *npg_ptr,u8 *buf);
|
||||
int extract_notemspregprsarg(struct MapNMPFG_Arg *npg_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_notemspregprsres(struct MapNMPFG_Res *npg_ptr,u8 *buf);
|
||||
int extract_notemspregprsres(struct MapNMPFG_Res *npg_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
/* define in map_code_om.c */
|
||||
int assign_acttrcmodearg(struct MapATM_Arg *atm_ptr,u8 *buf);
|
||||
int extract_acttrcmodearg(struct MapATM_Arg *atm_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_acttrcmoderes(struct MapATM_Res *atm_ptr,u8 *buf);
|
||||
int extract_acttrcmoderes(struct MapATM_Res *atm_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_deacttrcmodearg(struct MapDTM_Arg *dtm_ptr,u8 *buf);
|
||||
int extract_deacttrcmodearg(struct MapDTM_Arg *dtm_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_deacttrcmoderes(struct MapDTM_Res *dtm_ptr,u8 *buf);
|
||||
int extract_deacttrcmoderes(struct MapDTM_Res *dtm_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_sndimsiarg(struct MapSIMSI_Arg *sim_ptr,u8 *buf);
|
||||
int extract_sndimsiarg(struct MapSIMSI_Arg *sim_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_sndimsires(struct MapSIMSI_Res *sim_ptr,u8 *buf);
|
||||
int extract_sndimsires(struct MapSIMSI_Res *sim_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
/* define in map_code_ch.c */
|
||||
int assign_sndroutinfoarg(struct MapSRI_Arg *sri_ptr,u8 *buf,u8 ver);
|
||||
int assign_sndroutinfores(struct MapSRI_Res *sri_ptr,u8 *buf,u8 version);
|
||||
int extract_sndroutinfoarg(struct MapSRI_Arg *sri_ptr,u32 buf_len,u8 *buf,u8 ver);
|
||||
int extract_sndroutinfores(struct MapSRI_Res *sri_ptr,u32 buf_len,u8 *buf,u8 version);
|
||||
|
||||
int assign_provroamnumarg(struct MapPRN_Arg *prn_ptr, u8 *buf);
|
||||
int assign_provroamnumres(struct MapPRN_Res *prn_ptr, u8 *buf);
|
||||
int extract_provroamnumarg(struct MapPRN_Arg *prn_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_provroamnumres(struct MapPRN_Res *prn_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_rescallhandarg(struct MapRCH_Arg *rch_ptr,u8 *buf);
|
||||
int extract_rescallhandarg(struct MapRCH_Arg *rch_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_rescallhandres(struct MapRCH_Res *rch_ptr,u8 *buf);
|
||||
int extract_rescallhandres(struct MapRCH_Res *rch_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_prvsiwfsnumarg(struct MapPSN_Arg *psn_ptr,u8 *buf);
|
||||
int extract_prvsiwfsnumarg(struct MapPSN_Arg *psn_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_prvsiwfsnumres(struct MapPSN_Res *psn_ptr,u8 *buf);
|
||||
int extract_prvsiwfsnumres(struct MapPSN_Res *psn_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_siwfssigmodarg(struct MapSSM_Arg *ssm_ptr,u8 *buf);
|
||||
int extract_siwfssigmodarg(struct MapSSM_Arg *ssm_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_siwfssigmodres(struct MapSSM_Res *ssm_ptr,u8 *buf);
|
||||
int extract_siwfssigmodres(struct MapSSM_Res *ssm_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_setrepstatearg(struct MapSRS_Arg *srs_ptr,u8 *buf);
|
||||
int extract_setrepstatearg(struct MapSRS_Arg *srs_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_setrepstateres(struct MapSRS_Res *srs_ptr,u8 *buf);
|
||||
int extract_setrepstateres(struct MapSRS_Res *srs_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_statreparg(struct MapSR_Arg *sr_ptr,u8 *buf);
|
||||
int extract_statreparg(struct MapSR_Arg *sr_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_statrepres(struct MapSR_Res *sr_ptr,u8 *buf);
|
||||
int extract_statrepres(struct MapSR_Res *sr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_rmtuserfreearg(struct MapRUF_Arg *ruf_ptr,u8 *buf);
|
||||
int extract_rmtuserfreearg(struct MapRUF_Arg *ruf_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_rmtuserfreeres(struct MapRUF_Res *ruf_ptr,u8 *buf);
|
||||
int extract_rmtuserfreeres(struct MapRUF_Res *ruf_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
/* define in map_code_ss.c */
|
||||
int assign_regssarg(struct MapRSS_Arg *rss_ptr, u8 *buf);
|
||||
int extract_regssarg(struct MapRSS_Arg *rss_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_regssres(struct MapRSS_Res *rss_ptr, u8 *buf);
|
||||
int extract_regssres(struct MapRSS_Res *rss_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_erassarg(struct MapESS_Arg *ess_ptr, u8 *buf);
|
||||
int extract_erassarg(struct MapESS_Arg *ess_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_erassres(struct MapESS_Res *essr_ptr, u8 *buf);
|
||||
int extract_erassres(struct MapESS_Res *essr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_actssarg(struct MapASS_Arg *ass_ptr, u8 *buf);
|
||||
int extract_actssarg(struct MapASS_Arg *ass_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_actssres(struct MapASS_Res *assr_ptr, u8 *buf);
|
||||
int extract_actssres(struct MapASS_Res *assr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_deactssarg(struct MapDASS_Arg *dss_ptr, u8 *buf);
|
||||
int extract_deactssarg(struct MapDASS_Arg *dss_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_deactssres(struct MapDASS_Res *dssr_ptr, u8 *buf);
|
||||
int extract_deactssres(struct MapDASS_Res *dssr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_intrssarg(struct MapINTSS_Arg *intrss_ptr, u8 *buf);
|
||||
int extract_intrssarg(struct MapINTSS_Arg *intr_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_intrssres(struct MapINTSS_Res *intrss_ptr, u8 *buf);
|
||||
int extract_intrssres(struct MapINTSS_Res *intrss_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_prcunssreqarg(struct MapPUSSR_Arg *psr_ptr,u8 *buf);
|
||||
int extract_prcunssreqarg(struct MapPUSSR_Arg *psr_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_prcunssreqres(struct MapPUSSR_Res *psr_ptr,u8 *buf);
|
||||
int extract_prcunssreqres(struct MapPUSSR_Res *psr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_unssreqarg(struct MapUSSR_Arg *usr_ptr,u8 *buf);
|
||||
int extract_unssreqarg(struct MapUSSR_Arg *usr_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_unssreqres(struct MapUSSR_Res *usr_ptr,u8 *buf);
|
||||
int extract_unssreqres(struct MapUSSR_Res *usr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_unssnotarg(struct MapUSSN_Arg *usn_ptr,u8 *buf);
|
||||
int extract_unssnotarg(struct MapUSSN_Arg *usn_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_unssnotres(struct MapUSSN_Res *usn_ptr,u8 *buf);
|
||||
int extract_unssnotres(struct MapUSSN_Res *usn_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_regpswdarg(struct MapRPSS_Arg *rpw_ptr,u8 *buf);
|
||||
int extract_regpswdarg(struct MapRPSS_Arg *rpw_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_regpswdres(struct MapRPSS_Res *rpwr_ptr,u8 *buf);
|
||||
int extract_regpswdres(struct MapRPSS_Res *rpwr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_getpswdarg(struct MapGPSS_Arg *gpw_ptr,u8 *buf);
|
||||
int extract_getpswdarg(struct MapGPSS_Arg *gpw_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_getpswdres(struct MapGPSS_Res *rpwr_ptr,u8 *buf);
|
||||
int extract_getpswdres(struct MapGPSS_Res *rpwr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_ssinvnotarg(struct MapSSIN_Arg *sin_ptr,u8 *buf);
|
||||
int extract_ssinvnotarg(struct MapSSIN_Arg *sin_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_ssinvnotres(struct MapSSIN_Res *sin_ptr,u8 *buf);
|
||||
int extract_ssinvnotres(struct MapSSIN_Res *sin_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_regccentarg(struct MapRCCE_Arg *rce_ptr,u8 *buf);
|
||||
int extract_regccentarg(struct MapRCCE_Arg *rce_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_regccentres(struct MapRCCE_Res *rce_ptr,u8 *buf);
|
||||
int extract_regccentres(struct MapRCCE_Res *rce_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_eraseccentarg(struct MapECCE_Arg *ece_ptr,u8 *buf);
|
||||
int extract_eraseccentarg(struct MapECCE_Arg *ece_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_eraseccentres(struct MapECCE_Res *ece_ptr,u8 *buf);
|
||||
int extract_eraseccentres(struct MapECCE_Res *ece_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
/* define in map_code_sms.c */
|
||||
int assign_routinfoforsmarg(struct MapRIFSM_Arg *rif_ptr,u8 *buf);
|
||||
int extract_routinfoforsmarg(struct MapRIFSM_Arg *rif_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_routinfoforsmres(struct MapRIFSM_Res *rif_ptr,u8 *buf);
|
||||
int extract_routinfoforsmres();
|
||||
|
||||
int assign_mofwdsmarg(struct MapMOFSM_Arg *ptr,u8 *buf,u8 version);
|
||||
int extract_mofwdsmarg(struct MapMOFSM_Arg *ptr,u32 buf_len,u8 *buf,u8 version);
|
||||
int assign_mofwdsmres(struct MapMOFSM_Res *ptr,u8 *buf,u8 version);
|
||||
int extract_mofwdsmres(struct MapMOFSM_Res *ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_mtfwdsmarg(struct MapMTFSM_Arg *ptr,u8 *buf,u8 MAPVer);
|
||||
int extract_mtfwdsmarg(struct MapMTFSM_Arg *ptr,u32 buf_len,u8 *buf,u8 MAPVer);
|
||||
int assign_mtfwdsmres(struct MapMTFSM_Res *ptr,u8 *buf,u8 MAPVer);
|
||||
int extract_mtfwdsmres(struct MapMTFSM_Res *ptr,u32 buf_len,u8 *buf,u8 MAPVer);
|
||||
|
||||
int assign_repsmdelstatarg(struct MapRSMDS_Arg *ptr,u8 *buf);
|
||||
int extract_repsmdelstatarg(struct MapRSMDS_Arg *ptr,u32 buf_len,u8 *buf);
|
||||
int assign_repsmdelstatres(struct MapRSMDS_Res *ptr,u8 *buf);
|
||||
int extract_repsmdelstatres(struct MapRSMDS_Res *ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_infsrvcentarg(struct MapISC_Arg *ptr,u8 *buf);
|
||||
int extract_infsrvcentarg(struct MapISC_Arg *ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_altsrvcentarg(struct MapASC_Arg *ptr,u8 *buf);
|
||||
int extract_altsrvcentarg(struct MapASC_Arg *ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_rdyforsmarg(struct MapRFSM_Arg *ptr,u8 *buf);
|
||||
int extract_rdyforsmarg(struct MapRFSM_Arg *ptr,u32 buf_len,u8 *buf);
|
||||
int assign_rdyforsmres(struct MapRFSM_Res *ptr,u8 *buf);
|
||||
int extract_rdyforsmres(struct MapRFSM_Res *ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
/* +++++++++++++++++++++++++++++ */
|
||||
/* MAP-H (with AUC) structure */
|
||||
/* +++++++++++++++++++++++++++++ */
|
||||
int assign_securityTriplets_arg();
|
||||
int extract_securityTriplets_arg();
|
||||
int assign_securityTriplets_res();
|
||||
int extract_securityTriplets_res();
|
||||
|
||||
int assign_interrogateSubscriber_arg();
|
||||
int extract_interrogateSubscriber_arg();
|
||||
|
||||
int assign_createSubscriber_arg();
|
||||
int extract_createSubscriber_arg();
|
||||
|
||||
int assign_deleteSubscriber_arg();
|
||||
int extract_deleteSubscriber_arg();
|
||||
|
||||
/* ++++++++++++ */
|
||||
/* Common types */
|
||||
/* ++++++++++++ */
|
||||
int assign_authset(struct AuthSet_struct *auth_ptr,u8 *buf);
|
||||
int extract_authset(struct AuthSet_struct *auth_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_extsiginfo(struct ExtSigInfo_struct *sig_ptr,u8 *buf);
|
||||
int extract_extsiginfo(struct ExtSigInfo_struct *sig_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_bscode(struct BSCode_struct *bs_ptr,u8 *buf,u8 flag);
|
||||
int extract_bscode(struct BSCode_struct *bs_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_subinfo(struct SubInfo_struct *info_ptr,u8 *buf);
|
||||
int extract_subinfo(struct SubInfo_struct *info_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_ocsi(struct OCsi_struct *ocsi_ptr,u8 *buf);
|
||||
int extract_ocsi(struct OCsi_struct *ocsi_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_tdpcritlist(struct OBCritLst_struct *list_ptr,u8 *buf);
|
||||
int extract_tdpcritlist(struct OBCritLst_struct *list_ptr,u32 buf_len,u8 *buf);
|
||||
int assign_ccbsfeat(struct CcbsFeat_struct *cf_ptr,u8 *buf);
|
||||
int extract_ccbsfeat(struct CcbsFeat_struct *cf_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
/* is41 */
|
||||
int assign_is41AuthenticationDirective_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41AuthenticationDirective_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int extract_is41AuthenticationDirective_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41AuthenticationDirective_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int assign_is41AuthenticationDirectiveForward_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41AuthenticationFailureReport_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41AuthenticationFailureReport_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41AuthenticationRequest_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41AuthenticationRequest_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41AuthenticationStatusReport_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41AuthenticationStatusReport_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41BaseStationChallenge_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41BaseStationChallenge_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41CountRequest_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_is41CountRequest_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
|
||||
int extract_is41AuthenticationDirectiveForward_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41AuthenticationFailureReport_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41AuthenticationFailureReport_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41AuthenticationRequest_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41AuthenticationRequest_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41AuthenticationStatusReport_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41AuthenticationStatusReport_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41BaseStationChallenge_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41BaseStationChallenge_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41CountRequest_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41CountRequest_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
|
||||
int assign_Is41SmsDeliveryBackward_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_Is41SmsDeliveryBackward_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_Is41SmsDeliveryForward_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_Is41SmsDeliveryForward_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_Is41SmsDeliveryPointToPoint_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_Is41SmsDeliveryPointToPoint_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_Is41SmsNotification_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_Is41SmsNotification_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_Is41SmsRequest_arg(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
int assign_Is41SmsRequest_rsp(struct MapOprSrv_struct *ptr,u8 *buf);
|
||||
|
||||
int extract_Is41SmsDeliveryBackward_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_Is41SmsDeliveryBackward_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_Is41SmsDeliveryForward_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_Is41SmsDeliveryForward_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_Is41SmsDeliveryPointToPoint_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_Is41SmsDeliveryPointToPoint_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_Is41SmsNotification_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_Is41SmsNotification_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_Is41SmsRequest_arg(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_Is41SmsRequest_rsp(struct MapOprSrv_struct *ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
int assign_is41RegistrationNotification_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41RegistrationNotification_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41RegistrationCancellation_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41RegistrationCancellation_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41LocationRequest_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41LocationRequest_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41RoutingRequest_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41RoutingRequest_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41MSInactive_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41MSInactive_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41FeatureRequest_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41FeatureRequest_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41QualificationDirective_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41QualificationDirective_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41TransferToNumberRequest_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41TransferToNumberRequest_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41RedirectionRequest_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41RedirectionRequest_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41OriginationRequest_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41OriginationRequest_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41AnalyzedInformation_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41AnalyzedInformation_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41OAnswer_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41ODisconnect_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41ODisconnect_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41TAnswer_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41TDisconnect_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41TDisconnect_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41CallControlDirective_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41CallControlDirective_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41SeizeResource_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41SeizeResource_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41ConnectResource_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41SRFDirective_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41SRFDirective_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41ShortMessageAnalyzed_arg(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
int assign_is41ShortMessageAnalyzed_rsp(struct MapOprSrv_struct *opr_ptr,u8 *buf);
|
||||
|
||||
int extract_is41RegistrationNotification_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41RegistrationNotification_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41RegistrationCancellation_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41RegistrationCancellation_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41LocationRequest_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41LocationRequest_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41RoutingRequest_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41RoutingRequest_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41MSInactive_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41MSInactive_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41FeatureRequest_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41FeatureRequest_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41QualificationDirective_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41QualificationDirective_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41TransferToNumberRequest_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41TransferToNumberRequest_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41RedirectionRequest_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41RedirectionRequest_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41OriginationRequest_arg(struct MapOprSrv_struct *opr_ptr, u32 buf_len, u8 *buf);
|
||||
int extract_is41OriginationRequest_rsp(struct MapOprSrv_struct *opr_ptr, u32 buf_len, u8 *buf);
|
||||
int extract_is41AnalyzedInformation_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41AnalyzedInformation_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41OAnswer_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41ODisconnect_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41ODisconnect_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41TAnswer_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41TDisconnect_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41TDisconnect_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41CallControlDirective_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41CallControlDirective_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41SeizeResource_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41SeizeResource_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41ConnectResource_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41SRFDirective_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41SRFDirective_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41ShortMessageAnalyzed_arg(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
int extract_is41ShortMessageAnalyzed_rsp(struct MapOprSrv_struct *opr_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
|
||||
/***************** LCS **************/
|
||||
int assign_ProvideSubscriberLocation_Res(ProvideSubscriberLocation_Res *ptr,u8 *buf, u8 ver);
|
||||
int assign_RoutingInfoForLCS_Res(RoutingInfoForLCS_Res *ptr,u8 *buf, u8 ver);
|
||||
int extract_ProvideSubscriberLocation_Arg(ProvideSubscriberLocation_Arg *ptr,u32 buf_len,u8 *buf);
|
||||
int extract_RoutingInfoForLCS_Arg(RoutingInfoForLCS_Arg *ptr,u32 buf_len,u8 *buf);
|
||||
/***************** LCS **************/
|
||||
|
||||
//show message
|
||||
int debug_show_REGNOT_ARG(struct IS41_REGNOT_ARG *ptr,char *buf);
|
||||
int debug_show_REGNOT_RSP(struct IS41_REGNOT_RSP *ptr,char *buf);
|
||||
int debug_show_LOCREQ_ARG(struct IS41_LOCREQ_ARG *ptr,char *buf);
|
||||
int debug_show_LOCREQ_RSP(struct IS41_LOCREQ_RSP *ptr,char *buf);
|
||||
int debug_show_ROUTREQ_ARG(struct IS41_ROUTREQ_ARG *ptr,char *buf);
|
||||
int debug_show_ROUTREQ_RSP(struct IS41_ROUTREQ_RSP *ptr,char *buf);
|
||||
int debug_show_TRANUMREQ_ARG(struct IS41_TRANUMREQ_ARG *ptr,char *buf);
|
||||
int debug_show_TRANUMREQ_RSP(struct IS41_TRANUMREQ_RSP *ptr,char *buf);
|
||||
int debug_show_SMSREQ_ARG(struct IS41_SMSREQ_ARG *ptr,char *buf);
|
||||
int debug_show_SMSREQ_RSP(struct IS41_SMSREQ_RSP *ptr,char *buf);
|
||||
int debug_show_MSINACT_ARG(struct IS41_MSINACT_ARG *ptr,char *buf);
|
||||
int debug_show_MSINACT_RSP(struct IS41_MSINACT_RSP *ptr,char *buf);
|
||||
int debug_show_FEATREQ_ARG(struct IS41_FEATREQ_ARG *ptr,char *buf);
|
||||
int debug_show_FEATREQ_RSP(struct IS41_FEATREQ_RSP *ptr,char *buf);
|
||||
|
||||
int debug_show_AUTHREQ_ARG(IS41_AUTHREQ_ARG *AUTHREQ,char *charOpr);
|
||||
int debug_show_authreq_rsp(IS41_AUTHREQ_RSP *authreq,char *charOpr);
|
||||
int debug_show_ASREPORT_ARG(IS41_ASREPORT_ARG *ASREPORT,char *charOpr);
|
||||
int debug_show_asreport_rsp(IS41_ASREPORT_RSP *asreport,char *charOpr);
|
||||
int debug_show_BSCHALL_ARG(IS41_BSCHALL_ARG *BSCHALL,char *charOpr);
|
||||
int debug_show_bschall_rsp(IS41_BSCHALL_RSP *bschall,char *charOpr);
|
||||
int debug_show_AFREPORT_ARG(IS41_AFREPORT_ARG *AFREPORT,char *charOpr);
|
||||
int debug_show_afreport_rsp(IS41_AFREPORT_RSP *afreport,char *charOpr);
|
||||
int auc_debug_show_COUNTREQ_ARG(IS41_COUNTREQ_ARG *COUNTREQ,char *charOpr);
|
||||
int auc_debug_show_countreq_rsp(IS41_COUNTREQ_RSP *countreq,char *charOpr);
|
||||
int auc_debug_show_AUTHDIR_ARG(IS41_AUTHDIR_ARG *AUTHDIR,char *charOpr);
|
||||
int auc_debug_show_authdir_rsp(IS41_AUTHDIR_RSP *authdir,char *charOpr);
|
||||
#endif
|
||||
671
plat/xapp/src/mapp/map_const.h
Normal file
671
plat/xapp/src/mapp/map_const.h
Normal file
@@ -0,0 +1,671 @@
|
||||
/* MAP const define head file */
|
||||
/* written by Liu Zhiguo 2002-01-09 */
|
||||
/* Version 1.0 */
|
||||
/* -------------------------------- */
|
||||
#ifndef _MAP_CONST
|
||||
#define _MAP_CONST
|
||||
|
||||
#define MAX_TCAPSEND_LEN (TCAP_PARAM_LEN-20)
|
||||
#define MAX_TCAPSEND_LEN_1 (TCAP_PARAM_LEN_1-20)
|
||||
#define HLR_SSN 6
|
||||
#define VLR_SSN 7
|
||||
#define MSC_SSN 8
|
||||
#define EIR_SSN 9
|
||||
#define AUC_SSN 10
|
||||
#define SMSC_SSN 11
|
||||
#define GMLC_SSN 0x91
|
||||
#define SCF_SSN 0x93
|
||||
#define SIWF_SSN 0x94
|
||||
#define SGSN_SSN 0x95
|
||||
#define GGSN_SSN 0x96
|
||||
#define SCF_SSN_USSD 0x99
|
||||
#define OPPS_SSN 33
|
||||
/* timer values definition, according GSM 09.02 14.1.2 */
|
||||
#define SmallTimer 5
|
||||
#define MediumTimer 20
|
||||
#define MLongTimer 60
|
||||
#define LongTimer 108000
|
||||
|
||||
/* Address string coding, according GSM 09.02 14.7.8 */
|
||||
/* extension indicator */
|
||||
#define ADD_NOEXT 0x80 // no extension
|
||||
/* nature of address indicator */
|
||||
#define ADD_NAT_INTER 0x10 // international number
|
||||
#define ADD_NAT_NATSIG 0x20 // national significant number
|
||||
#define ADD_NAT_NETSPE 0x30 // network specific number
|
||||
#define ADD_NAT_SUB 0x40 // subscriber number
|
||||
#define ADD_NAT_ABBR 0x60 // abbreviated number
|
||||
/* numbering plan indicator */
|
||||
#define ADD_PLAN_ISDN 0x01 // ISDN/Teliphony numbering plan (CCITT E.164)
|
||||
#define ADD_PLAN_DATA 0x03 // data numbering plan (CCITT X.121)
|
||||
#define ADD_PLAN_TELEX 0x04 // telex numbering plan (CCITT F.69)
|
||||
#define ADD_PLAN_LANDM 0x06 // land mobile numbering plan (CCITT E.212)
|
||||
#define ADD_PLAN_NATIONAL 0x08 // national numbering plan
|
||||
#define ADD_PLAN_PRIV 0x09 //private numbering plan
|
||||
|
||||
/* define the all kinds of parameter length */
|
||||
#define SSDATA_NUM 16
|
||||
#define SIGNALINFO_LEN 200
|
||||
#define ADDRESS_LEN 20
|
||||
#define ASCI_LEN 8 // ASCI call reference length
|
||||
#define ISDN_LEN 9
|
||||
#define ISDNSUB_LEN 21 // ISDN subaddressing
|
||||
#define IMSI_LEN 8
|
||||
#define TMSI_LEN 4
|
||||
#define IMEI_LEN 8
|
||||
#define LMSI_LEN 4
|
||||
#define HLRID_NUM 50
|
||||
#define NAEA_LEN 3
|
||||
#define GCID_LEN 7 // global cell id
|
||||
#define LAI_LEN 5
|
||||
#define SMEA_LEN 12 // SM-RP-SMEA length
|
||||
#define BSG_LEN 13 // basic service group length
|
||||
#define CCBS_LEN 5 // CCBS requests number
|
||||
#define USSD_LEN 160 // USSD string length
|
||||
#define SS_LEN 30
|
||||
#define PASSWD_LEN 4 // password length
|
||||
#define USSD_LEN 160 // USSD string length
|
||||
#define EVENT_LEN 2
|
||||
//#define FWD_NUM 5 // forwarding number
|
||||
#define CALLREF_NUM 8 // call reference number
|
||||
#define TDPDATA_NUM 10 // camel TDP data number
|
||||
#define MAX_DSTNUM 10 // camel destination number length
|
||||
#define DSTNUM_LEN 3 // camel destination number-lengths length
|
||||
#define ISDN_DIGIT 15 // ISDN address digits
|
||||
#define BSCRIT_LEN 5 // camel basic service criteria length
|
||||
#define LOCATION_NUM 10 // location number
|
||||
#define KI_LEN 16
|
||||
#define RAND_LEN 16
|
||||
#define SRES_LEN 4
|
||||
#define KC_LEN 8
|
||||
#define AUTHLIST_LEN 5 // authenticate list length
|
||||
#define GSN_LEN 17
|
||||
#define PDP_LEN 17 // PDP address length
|
||||
#define APN_LEN 63 // APN length
|
||||
#define PDPCONTEXT_LEN 50 // PDP context length
|
||||
#define EXTBSG_LEN 32 // extent basic service group
|
||||
#define BSLIST_LEN 50 // bearer service list length
|
||||
#define TSLIST_LEN 20 // tele service list length
|
||||
#define CUGLOCK_LEN 4 // CUG interlock length
|
||||
#define CUG_LEN 10
|
||||
#define ZONECODE_LEN 10
|
||||
#define BSL_LEN 70 // basic service list
|
||||
#define CAMELTDP_LEN 10
|
||||
#define VBS_LEN 50
|
||||
#define VGCS_LEN 50
|
||||
#define CAMELSS_LEN 10 // camel SS event length
|
||||
|
||||
#define CALLBAR_LEN 8
|
||||
#define EMLPP_LEN 20
|
||||
#define CKSN_LEN 16
|
||||
|
||||
#define MAX_FWDNUM 5 // MAX forwarding number
|
||||
#define HLRID_LEN 2
|
||||
/* ++++++++++++++++++ */
|
||||
/* teliservice codes */
|
||||
/* ++++++++++++++++++ */
|
||||
#define TS_All 0x00 // all teleservice
|
||||
|
||||
#define TS_AllSTS 0x10 // all speech transmission services
|
||||
#define TS_PHONY 0x11 // telephony
|
||||
#define TS_EMERCALL 0x12 // emergency calls
|
||||
|
||||
#define TS_AllSMS 0x20 // all short message services
|
||||
#define TS_SMMTPP 0x21 // short message MT-PP
|
||||
#define TS_SMMOPP 0x22 // short message MO-PP
|
||||
|
||||
#define TS_AllFTS 0x60 // all facsimile transmission services
|
||||
#define TS_FG3AAS 0x61 // facsimile group3 and alter speech
|
||||
#define TS_AFG3 0x62 // automatic facsimile group3
|
||||
#define TS_FG4 0x63 // facsimile group4
|
||||
|
||||
#define TS_AllData 0x70 // all data teleservices
|
||||
#define TS_AllEXSMS 0x80 // all teleservices expect SMS
|
||||
|
||||
#define TS_AllVGCS 0x90 // all voice group call services
|
||||
#define TS_VGC 0x91 // voice group call
|
||||
#define TS_VBSC 0x92 // voice broadcase call
|
||||
|
||||
#define TS_AllPLMN 0xd0 // all PLMN specific TS
|
||||
#define TS_PLMN1 0xd1
|
||||
#define TS_PLMN2 0xd2
|
||||
#define TS_PLMN3 0xd3
|
||||
#define TS_PLMN4 0xd4
|
||||
#define TS_PLMN5 0xd5
|
||||
#define TS_PLMN6 0xd6
|
||||
#define TS_PLMN7 0xd7
|
||||
#define TS_PLMN8 0xd8
|
||||
#define TS_PLMN9 0xd9
|
||||
#define TS_PLMNa 0xda
|
||||
#define TS_PLMNb 0xdb
|
||||
#define TS_PLMNc 0xdc
|
||||
#define TS_PLMNd 0xdd
|
||||
#define TS_PLMNe 0xde
|
||||
#define TS_PLMNf 0xdf
|
||||
|
||||
/* ++++++++++++++++++++ */
|
||||
/* Bearer service codes */
|
||||
/* ++++++++++++++++++++ */
|
||||
#define BS_All 0x00 // all bearer service
|
||||
|
||||
#define BS_AllDataCDA 0x10 // all data CDA services
|
||||
#define BS_CDA300 0x11 // data CDA-300 bps
|
||||
#define BS_CDA1200 0x12 // data CDA-1200 bps
|
||||
#define BS_CDA7500 0x13 // data CDA-1200-7500 bps
|
||||
#define BS_CDA2400 0x14 // data CDA-2400 bps
|
||||
#define BS_CDA4800 0x15 // data CDA-4800 bps
|
||||
#define BS_CDA9600 0x16 // data CDA-9600 bps
|
||||
#define BS_CDAGNRL 0x17 // general data CDA
|
||||
|
||||
#define BS_AllDataCDS 0x18 // all data CDS services
|
||||
#define BS_CDS1200 0x1a // data CDS-1200 bps
|
||||
#define BS_CDS2400 0x1c // data CDS-2400 bps
|
||||
#define BS_CDS4800 0x1d // data CDS-4800 bps
|
||||
#define BS_CDS9600 0x1e // data CDS-9600 bps
|
||||
#define BS_CDSGNRL 0x1f // general data CDS
|
||||
|
||||
#define BS_AllPACA 0x20 // all pad access CA services
|
||||
#define BS_PACA300 0x21 // pad access CA-300 bps
|
||||
#define BS_PACA1200 0x22 // pad access CA-1200 bps
|
||||
#define BS_PACA7500 0x23 // pad access CA-1200-7500 bps
|
||||
#define BS_PACA2400 0x24 // pad access CA-2400 bps
|
||||
#define BS_PACA4800 0x25 // pad access CA-4800 bps
|
||||
#define BS_PACA9600 0x26 // pad access CA-9600 bps
|
||||
#define BS_PACAGNRL 0x27 // general pad access CA
|
||||
|
||||
#define BS_AllDPDS 0x28 // all data PDS services
|
||||
#define BS_DPDS2400 0x2c // data PDS-2400 bps
|
||||
#define BS_DPDS4800 0x2d // data PDS-4800 bps
|
||||
#define BS_DPDS9600 0x2e // data PDS-9600 bps
|
||||
#define BS_DPDSGNRL 0x2f // general data PDS
|
||||
|
||||
#define BS_AllASDCDA 0x30 // all alternate speech data CDA
|
||||
#define BS_AllASDCDS 0x38 // all alternate speech data CDS
|
||||
#define BS_AllASFBDCDA 0x40 // all speech followed by Data CDA
|
||||
#define BS_AllASFBDCDS 0x48 // all speech followed by Data CDS
|
||||
|
||||
#define BS_AllDCA 0x50 // all data circuit asynchronous
|
||||
#define BS_AllAS 0x60 // all asynchronous services
|
||||
#define BS_AllDCS 0x58 // all data circuit synchronous
|
||||
#define BS_AllSS 0x68 // all synchronous services
|
||||
|
||||
#define BS_AllPLMN 0xd0 // all PLMN specific BS
|
||||
#define BS_PLMN1 0xd1
|
||||
#define BS_PLMN2 0xd2
|
||||
#define BS_PLMN3 0xd3
|
||||
#define BS_PLMN4 0xd4
|
||||
#define BS_PLMN5 0xd5
|
||||
#define BS_PLMN6 0xd6
|
||||
#define BS_PLMN7 0xd7
|
||||
#define BS_PLMN8 0xd8
|
||||
#define BS_PLMN9 0xd9
|
||||
#define BS_PLMNa 0xda
|
||||
#define BS_PLMNb 0xdb
|
||||
#define BS_PLMNc 0xdc
|
||||
#define BS_PLMNd 0xdd
|
||||
#define BS_PLMNe 0xde
|
||||
#define BS_PLMNf 0xdf
|
||||
|
||||
/* ++++++++++++++++++++++++++++ */
|
||||
/* supplementary service codes */
|
||||
/* ++++++++++++++++++++++++++++ */
|
||||
#define SS_All 0x00 // (reserved)
|
||||
#define SS_AllIdent 0x10 // all line identification SS (reserved)
|
||||
#define SS_CLIP 0x11 // calling line identification presentation
|
||||
#define SS_CLIR 0x12 // calling line identification restriction
|
||||
#define SS_COLP 0x13 // connected line identification presentation
|
||||
#define SS_COLR 0x14 // coonected line identification restriction
|
||||
#define SS_MCI 0x15 // malicious call identification (reserved)
|
||||
|
||||
#define SS_AllNI 0x18 // all name identification SS
|
||||
#define SS_CNAP 0x19 // calling name presentation
|
||||
|
||||
#define SS_AllFwd 0x20 // all forwarding SS
|
||||
#define SS_CFU 0x21 // call forwarding unconditional
|
||||
#define SS_AllCFwd 0x28 // all conditional forwarding SS
|
||||
#define SS_CFB 0x29 // call forwarding on mobile suscriber busy
|
||||
#define SS_CFNRY 0x2a // call forwarding on no reply
|
||||
#define SS_CFNRC 0x2b // call forwarding on mobile subscriber not reachable
|
||||
#define SS_CD 0x24 // call deflection
|
||||
|
||||
#define SS_AllCOff 0x30 // all call offering SS (reserved)
|
||||
#define SS_ECT 0x31 // explicit call transfer
|
||||
#define SS_MAH 0x32 // mobile access hunting (reserved)
|
||||
|
||||
#define SS_AllCC 0x40 // all call completion SS (reserved)
|
||||
#define SS_CW 0x41 // call waiting
|
||||
#define SS_HOLD 0x42 // call hold
|
||||
#define SS_CCBSA 0x43 // completion of call to busy subscribers,originating side
|
||||
#define SS_CCBSB 0x44 // completion of call to busy subscribers,destination side
|
||||
|
||||
#define SS_AllMP 0x50 // all multiparty SS (reserved)
|
||||
#define SS_MULTIPTY 0x51 // multiparty
|
||||
|
||||
#define SS_AllCOI 0x60 // all community of interest SS (reserved)
|
||||
#define SS_CUG 0x61 // closed user group
|
||||
|
||||
#define SS_AllCHG 0x70 // all charging SS (reserved)
|
||||
#define SS_AOCI 0x71 // advice of charge information
|
||||
#define SS_AOCC 0x72 // advice of charge charging
|
||||
|
||||
#define SS_AllAIT 0x80 // all additional information transfer SS (reserved)
|
||||
#define SS_UUS 0x81 // user to user signalling (reserved)
|
||||
|
||||
#define SS_AllBar 0x90 // all barring SS
|
||||
#define SS_BOC 0x91 // barring of outgoing calls
|
||||
#define SS_BAOC 0x92 // barring of all outgoing calls
|
||||
#define SS_BOIC 0x93 // barring of outgoing international calls
|
||||
#define SS_BOICEXHC 0x94 // barring of outgoing international calls except to the home PLMN
|
||||
#define SS_BIC 0x99 // barring of incoming calls
|
||||
#define SS_BAIC 0x9a // barring of all incoming calls
|
||||
#define SS_BICROAM 0x9b // barring of incoming calls when roaming outside home PLMN country
|
||||
|
||||
#define SS_AllPLMNS 0xf0 // all PLMN specific SS
|
||||
#define SS_PLMN1 0xf1
|
||||
#define SS_PLMN2 0xf2
|
||||
#define SS_PLMN3 0xf3
|
||||
#define SS_PLMN4 0xf4
|
||||
#define SS_PLMN5 0xf5
|
||||
#define SS_PLMN6 0xf6
|
||||
#define SS_PLMN7 0xf7
|
||||
#define SS_PLMN8 0xf8
|
||||
#define SS_PLMN9 0xf9
|
||||
#define SS_PLMNa 0xfa
|
||||
#define SS_PLMNb 0xfb
|
||||
#define SS_PLMNc 0xfc
|
||||
#define SS_PLMNd 0xfd
|
||||
#define SS_PLMNe 0xfe
|
||||
#define SS_PLMNf 0xff
|
||||
|
||||
#define SS_AllCP 0xa0 // all call priority SS (reserved)
|
||||
#define SS_EMLPP 0xa1 // enhanced multilevel precedence pre-emption(EMLPP) service
|
||||
|
||||
/* ++++++++++++++++++++++++ */
|
||||
/* alerting pattern codes */
|
||||
/* ++++++++++++++++++++++++ */
|
||||
#define ALT_Lev0 0x00 // alerting level 0
|
||||
#define ALT_Lev1 0x01 // alerting level 1
|
||||
#define ALT_Lev2 0x02 // alerting level 2
|
||||
#define ALT_CATE1 0x04 // alerting category 1
|
||||
#define ALT_CATE2 0x05 // alerting category 2
|
||||
#define ALT_CATE3 0x06 // alerting category 3
|
||||
#define ALT_CATE4 0x07 // alerting category 4
|
||||
#define ALT_CATE5 0x08 // alertign category 5
|
||||
|
||||
/* ++++++++++++++++++++++++ */
|
||||
/* EMLPP priority codes */
|
||||
/* ++++++++++++++++++++++++ */
|
||||
#define EMLPP_LA 0x06 // EMLPP priority level A
|
||||
#define EMLPP_LB 0x05 // EMLPP priority level B
|
||||
#define EMLPP_L0 0x00 // EMLPP priority level 0
|
||||
#define EMLPP_L1 0x01 // EMLPP priority level 1
|
||||
#define EMLPP_L2 0x02 // EMLPP priority level 2
|
||||
#define EMLPP_L3 0x03 // EMLPP priority level 3
|
||||
#define EMLPP_L4 0x04 // EMLPP priority level 4
|
||||
|
||||
|
||||
/* IS41 */
|
||||
#define ESN_LEN 0X04
|
||||
#define MIN_LEN 0x05
|
||||
#define BIT0_TRUE 0x01
|
||||
#define BIT1_TRUE 0x02
|
||||
#define BIT2_TRUE 0x04
|
||||
#define BIT3_TRUE 0x08
|
||||
#define BIT4_TRUE 0x10
|
||||
#define BIT5_TRUE 0x20
|
||||
#define BIT6_TRUE 0x40
|
||||
#define BIT7_TRUE 0x80
|
||||
#define BIT8_TRUE 0x100
|
||||
#define BIT9_TRUE 0x200
|
||||
#define BIT10_TRUE 0x400
|
||||
#define BIT11_TRUE 0x800
|
||||
#define BIT12_TRUE 0x1000
|
||||
#define BIT13_TRUE 0x2000
|
||||
#define BIT14_TRUE 0x4000
|
||||
#define BIT15_TRUE 0x8000
|
||||
#define BIT16_TRUE 0x10000
|
||||
#define BIT17_TRUE 0x20000
|
||||
#define BIT18_TRUE 0x40000
|
||||
#define BIT19_TRUE 0x80000
|
||||
#define BIT20_TRUE 0x100000
|
||||
#define BIT21_TRUE 0x200000
|
||||
#define BIT22_TRUE 0x400000
|
||||
#define BIT23_TRUE 0x800000
|
||||
#define BIT24_TRUE 0x1000000
|
||||
#define BIT25_TRUE 0x2000000
|
||||
#define BIT26_TRUE 0x4000000
|
||||
#define BIT27_TRUE 0x8000000
|
||||
#define BIT28_TRUE 0x10000000
|
||||
#define BIT29_TRUE 0x20000000
|
||||
|
||||
//asn.1 tag
|
||||
#define IS41PAR_BILLID "1"
|
||||
#define IS41PAR_SCID "2"
|
||||
#define IS41PAR_TCID "3"
|
||||
#define IS41PAR_DIGITS "4"
|
||||
#define IS41PAR_CD "5"
|
||||
#define IS41PAR_IMSCCID "6"
|
||||
#define IS41PAR_ISC "7"
|
||||
#define IS41PAR_MIN "8"//IMPLICIT OCTET STRING
|
||||
#define IS41PAR_ESN "9"//IMPLICIT OCTET STRING
|
||||
#define IS41PAR_RR "10"
|
||||
#define IS41PAR_SQ "11"
|
||||
#define IS41PAR_SCM "12"
|
||||
#define IS41PAR_AUTHDEN "13"
|
||||
#define IS41PAR_AUTHPER "14"
|
||||
#define IS41PAR_ST "15"
|
||||
#define IS41PAR_TS "16"
|
||||
#define IS41PAR_QUALCODE "17"
|
||||
#define IS41PAR_FEATRESULT "18"
|
||||
#define IS41PAR_REDREASON "19"
|
||||
#define IS41PAR_ACCDEN "20"
|
||||
#define IS41PAR_MSCID "21"
|
||||
#define IS41PAR_MYTYP "22"
|
||||
#define IS41PAR_ORIGIND "23"
|
||||
#define IS41PAR_TERMRES "24"
|
||||
#define IS41PAR_CFI "25"
|
||||
#define IS41PAR_FP "26"
|
||||
#define IS41PAR_UID "27"
|
||||
#define IS41PAR_TDMACD "28"
|
||||
#define IS41PAR_TDMACM "29"
|
||||
#define IS41PAR_HR "30"
|
||||
#define IS41PAR_TDMABID "31"
|
||||
#define IS41PAR_PCSSN "32"
|
||||
#define IS41PAR_LOCID "33"//IMPLICIT OCTET STRING
|
||||
#define IS41PAR_SYSACCTYPE "34"
|
||||
#define IS41PAR_AUTHR "35"
|
||||
#define IS41PAR_AUTHBS "36"
|
||||
#define IS41PAR_AUTHU "37"//IMPLICIT OCTET STRING
|
||||
#define IS41PAR_COUNT "38"//IMPLICIT Unsigned Integer (0..63)
|
||||
#define IS41PAR_CMODES "39"
|
||||
#define IS41PAR_RAND "40"
|
||||
#define IS41PAR_RANDBS "41"
|
||||
#define IS41PAR_RANDSSD "42"//IMPLICIT OCTET STRING
|
||||
#define IS41PAR_RANDU "43"//IMPLICIT OCTET STRING
|
||||
#define IS41PAR_RPTTYP "44"//IMPLICIT Unsigned Enumerated
|
||||
//#define IS41PAR_RPTTYP2 "44-2"//IMPLICIT Unsigned Enumerated
|
||||
#define IS41PAR_SMEKEY "45"
|
||||
#define IS41PAR_SSD "46"//IMPLICIT OCTET STRING
|
||||
#define IS41PAR_TERMTYP "47"
|
||||
#define IS41PAR_VPMASK "48"
|
||||
#define IS41PAR_SYSCAP "49"
|
||||
#define IS41PAR_DENACC "50"
|
||||
#define IS41PAR_UPDCOUNT "51"//IMPLICIT Unsigned Enumerated
|
||||
#define IS41PAR_NOSSD "52"//IMPLICIT Unsigned Enumerated
|
||||
#define IS41PAR_EXTMSCID "53"
|
||||
#define IS41PAR_EXTMYTYP "54"
|
||||
#define IS41PAR_CCDATA "55"
|
||||
#define IS41PAR_SYSACCDATA "56"
|
||||
#define IS41PAR_CANCD "57"
|
||||
#define IS41PAR_BORDACC "58"
|
||||
#define IS41PAR_CDMASCM "59"
|
||||
#define IS41PAR_CDMASOWD "60"
|
||||
#define IS41PAR_CDMATOWD "61"
|
||||
#define IS41PAR_CDMACM "62"
|
||||
#define IS41PAR_CDMACD "63"
|
||||
#define IS41PAR_CDMASQ "64"
|
||||
#define IS41PAR_CDMAPS "65"
|
||||
#define IS41PAR_CDMAMPR "66"
|
||||
#define IS41PAR_CDMAPLCM "67"
|
||||
#define IS41PAR_CDMACC "68"
|
||||
#define IS41PAR_CDMASW "69"
|
||||
#define IS41PAR_MSLOC "70"
|
||||
#define IS41PAR_PID "71"
|
||||
#define IS41PAR_RSIGQUAL "72"
|
||||
#define IS41PAR_DEREG "73"
|
||||
#define IS41PAR_NAMPSCD "74"
|
||||
#define IS41PAR_ALRTCODE "75"
|
||||
#define IS41PAR_ANCC "76"
|
||||
#define IS41PAR_AAV "77"//IMPLICIT OCTET STRING
|
||||
#define IS41PAR_AUTHCAP "78"
|
||||
#define IS41PAR_COUNTEx "79"
|
||||
#define IS41PAR_CPNDGTS1 "80"
|
||||
#define IS41PAR_CPNDGTS2 "81"
|
||||
#define IS41PAR_CPNSTRG1 "82"
|
||||
#define IS41PAR_CPNSTRG2 "83"
|
||||
#define IS41PAR_CPSUB "84"
|
||||
#define IS41PAR_CANTP "85"
|
||||
#define IS41PAR_CARDGTS "86"
|
||||
#define IS41PAR_DESTDGTS "87"
|
||||
#define IS41PAR_REDIND "88"
|
||||
#define IS41PAR_ISTERM "89"
|
||||
#define IS41PAR_AVTYP "90"
|
||||
#define IS41PAR_LOCTERM "91"
|
||||
#define IS41PAR_MWNCOUNT "92"
|
||||
#define IS41PAR_MDN "93"
|
||||
#define IS41PAR_MSCIN "94"
|
||||
#define IS41PAR_PSTNTERM "95"
|
||||
#define IS41PAR_NATIME "96"
|
||||
#define IS41PAR_OTFI "97"
|
||||
#define IS41PAR_ORIGTRIG "98"
|
||||
#define IS41PAR_RANDC "99"
|
||||
#define IS41PAR_RNDGTS "100"
|
||||
#define IS41PAR_RNSTRING "101"
|
||||
#define IS41PAR_RSUB "102"
|
||||
#define IS41PAR_SENDERIN "103"//IMPLICIT DigitsType
|
||||
#define IS41PAR_SMSADDR "104"
|
||||
#define IS41PAR_SMSBD "105"
|
||||
#define IS41PAR_SMSCID "106"
|
||||
#define IS41PAR_SMSDA "107"
|
||||
#define IS41PAR_SMSMSGCNT "108"
|
||||
#define IS41PAR_SMSNOTIND "109"
|
||||
#define IS41PAR_SMSODA "110"
|
||||
#define IS41PAR_SMSODS "111"
|
||||
#define IS41PAR_SMSOOA "112"
|
||||
#define IS41PAR_SMSOOS "113"
|
||||
#define IS41PAR_SMSOA "114"
|
||||
#define IS41PAR_SMSORGRES "115"
|
||||
#define IS41PAR_SMSTID "116"
|
||||
#define IS41PAR_SMSTERMRES "117"
|
||||
#define IS41PAR_SMSMWI "118"
|
||||
#define IS41PAR_TAT "119"
|
||||
#define IS41PAR_TERMLIST "120"
|
||||
#define IS41PAR_TERMTRMT "121"
|
||||
#define IS41PAR_TERMTRIG "122"
|
||||
#define IS41PAR_TRANSCAP "123"
|
||||
#define IS41PAR_UCHALRPT "124"
|
||||
//#define IS41PAR_RESERVED "125"
|
||||
//#define IS41PAR_RESERVED "126"
|
||||
//#define IS41PAR_RESERVED "127"
|
||||
#define IS41PAR_ACTCODE "128"
|
||||
#define IS41PAR_AR "129"
|
||||
#define IS41PAR_ANNLIST "130"
|
||||
#define IS41PAR_CDMACCI "131"
|
||||
#define IS41PAR_CDMACCL "132"
|
||||
#define IS41PAR_CDMATMI "133"
|
||||
#define IS41PAR_CDMATML "134"
|
||||
#define IS41PAR_CDMATMAHOI "135"
|
||||
#define IS41PAR_CDMATMAHOL "136"
|
||||
#define IS41PAR_CCI "137"
|
||||
#define IS41PAR_COUNTRPT "138"
|
||||
#define IS41PAR_DIGITCC "139"//IMPLICIT Unsigned Enumerated
|
||||
#define IS41PAR_ACDGTS "140"
|
||||
#define IS41PAR_ABDGTS "141"
|
||||
#define IS41PAR_BILLDGTS "142"
|
||||
#define IS41PAR_GEOAUTH "143"
|
||||
#define IS41PAR_LEGINFO "144"
|
||||
#define IS41PAR_MWNTYPE "145"
|
||||
#define IS41PAR_PACAIND "146"
|
||||
#define IS41PAR_PLIND "147"
|
||||
#define IS41PAR_RANDVT "148"
|
||||
#define IS41PAR_RESDGTS "149"
|
||||
#define IS41PAR_ROUTDGTS "150"
|
||||
#define IS41PAR_SR "151"
|
||||
#define IS41PAR_SMSACCDEN "152"
|
||||
#define IS41PAR_SMSCC "153"
|
||||
#define IS41PAR_SPINIPIN "154"
|
||||
#define IS41PAR_SPINITRIG "155"
|
||||
#define IS41PAR_SSDURPT "156"
|
||||
#define IS41PAR_TMINFO "157"
|
||||
#define IS41PAR_TML "158"
|
||||
#define IS41PAR_VMSPIN "159"
|
||||
#define IS41PAR_VMBOX "160"
|
||||
#define IS41PAR_AUTHDATA "161"
|
||||
#define IS41PAR_CDEN "162"
|
||||
#define IS41PAR_GRPINFO "163"
|
||||
#define IS41PAR_HOS "164"
|
||||
#define IS41PAR_NAMPSCM "165"
|
||||
#define IS41PAR_CDMASCI "166"
|
||||
#define IS41PAR_DENAUTHPER "167"
|
||||
#define IS41PAR_PILOT "168"
|
||||
#define IS41PAR_PILOTBID "169"
|
||||
#define IS41PAR_GLOBALTITLE "261"
|
||||
#define IS41PAR_RESUMEPIC "266"
|
||||
#define IS41PAR_TRIGADRLIST "276"
|
||||
#define IS41PAR_TRIGCAP "277"
|
||||
#define IS41PAR_TRIGLIST "278"
|
||||
#define IS41PAR_WINCAP "280"
|
||||
#define IS41PAR_WINOPRCAP "281"
|
||||
#define IS41PAR_WINTRIGLIST "283"
|
||||
#define IS41PAR_DMH_SVCID "286"
|
||||
//N.S0013-0 "WIN Phase 1"
|
||||
#define IS41PAR_EXESCR "258"
|
||||
#define IS41PAR_PSR "265"
|
||||
#define IS41PAR_SCRARG "267"
|
||||
#define IS41PAR_SCRNAME "268"
|
||||
#define IS41PAR_SCRRESULT "269"
|
||||
//#define IS41PAR_SR "274"
|
||||
#define IS41PAR_TDO "275"
|
||||
#define IS41PAR_TRIGERTYPE "279"
|
||||
//N.S0018 "TIA/EIA-41-D Pre-Paid Charging(Revision: 1)"
|
||||
#define IS41PAR_FEATIND "306"
|
||||
#define IS41PAR_RELCAUSE "308"
|
||||
#define IS41PAR_TOD "309"
|
||||
#define IS41PAR_CALLSTATUS "310"
|
||||
//N.S0009 "IMSI"
|
||||
#define IS41PAR_IMSI "242"
|
||||
//N.S0012 "CNAP/CNAR"
|
||||
#define IS41PAR_CPNAME "243"
|
||||
#define IS41PAR_DISPTEXT "244"
|
||||
#define IS41PAR_RDNAME "245"
|
||||
#define IS41PAR_SRVID "246"
|
||||
//X.S0010 "Pre-Paid Charging Enhancements for Circuit-Switched Data and Short Message Services"
|
||||
#define IS41PAR_SMSBRLEN "382"
|
||||
#define IS41PAR_SMSBILLID "383"
|
||||
#define IS41PAR_SMSEVENT "384"
|
||||
#define IS41PAR_SMSEVENTNOT "385"
|
||||
#define IS41PAR_SMSPMCNT "386"
|
||||
|
||||
|
||||
//is41 operations
|
||||
#define IS41OPR_HandoffMeasurementRequest 0x01
|
||||
#define IS41OPR_FacilitiesDirective 0x02
|
||||
#define IS41OPR_MobileOnChannel 0x03
|
||||
#define IS41OPR_HandoffBack 0x04
|
||||
#define IS41OPR_FacilitiesRelease 0x05
|
||||
#define IS41OPR_QualificationRequest 0x06
|
||||
#define IS41OPR_QualificationDirective 0x07
|
||||
#define IS41OPR_Blocking 0x08
|
||||
#define IS41OPR_Unblocking 0x09
|
||||
#define IS41OPR_ResetCircuit 0x0a
|
||||
#define IS41OPR_TrunkTest 0x0b
|
||||
#define IS41OPR_TrunkTestDisconnect 0x0c
|
||||
#define IS41OPR_RegistrationNotification 0x0d
|
||||
#define IS41OPR_RegistrationCancellation 0x0e
|
||||
#define IS41OPR_LocationRequest 0x0f
|
||||
#define IS41OPR_RoutingRequest 0x10
|
||||
#define IS41OPR_FeatureRequest 0x11
|
||||
#define IS41OPR_ServiceProfileRequest 0x12
|
||||
#define IS41OPR_ServiceProfileDirective 0x13
|
||||
#define IS41OPR_UnreliableRoamerDataDirective 0x14
|
||||
#define IS41OPR_CallDataREquest 0x15
|
||||
#define IS41OPR_MSInactive 0x16
|
||||
#define IS41OPR_TransferToNumberRequest 0x17
|
||||
#define IS41OPR_RedirectionRequest 0x18
|
||||
#define IS41OPR_HandoffToThird 0x19
|
||||
#define IS41OPR_FlashRequest 0x1a
|
||||
#define IS41OPR_AuthenticationDirective 0x1b
|
||||
#define IS41OPR_AuthenticationRequest 0x1c
|
||||
#define IS41OPR_BaseStationChallenge 0x1d
|
||||
#define IS41OPR_AuthenticationFailureReport 0x1e
|
||||
#define IS41OPR_CountRequest 0x1f
|
||||
#define IS41OPR_InterSystemPage 0x20
|
||||
#define IS41OPR_UnsolicitedResponse 0x21
|
||||
#define IS41OPR_BulkDeregistration 0x22
|
||||
#define IS41OPR_HandoffMeasurementRequest2 0x23
|
||||
#define IS41OPR_FacilitiesDirective2 0x24
|
||||
#define IS41OPR_HandoffBack2 0x25
|
||||
#define IS41OPR_HandoffToThird2 0x26
|
||||
#define IS41OPR_AuthenticationDirectiveForward 0x27
|
||||
#define IS41OPR_AuthenticationStatusReport 0x28
|
||||
#define IS41OPR_InformationBackward 0x29
|
||||
#define IS41OPR_InformationDirective 0x2a
|
||||
#define IS41OPR_InformationForward 0x2b
|
||||
#define IS41OPR_InterSystemAnswer 0x2c
|
||||
#define IS41OPR_InterSystemPage2 0x2d
|
||||
#define IS41OPR_InterSystemSetup 0x2e
|
||||
#define IS41OPR_OriginationRequest 0x2f
|
||||
#define IS41OPR_RandomVariableRequest 0x30
|
||||
#define IS41OPR_RedirectionDirective 0x31
|
||||
#define IS41OPR_RemoteUserInteractionDirective 0x32
|
||||
#define IS41OPR_SMSDeliveryBackward 0x33
|
||||
#define IS41OPR_SMSDeliveryForward 0x34
|
||||
#define IS41OPR_SMSDeliveryPointToPoint 0x35
|
||||
#define IS41OPR_SMSNotification 0x36
|
||||
#define IS41OPR_SMSRequest 0x37
|
||||
//N.S0013-0 "WIN Phase 1"
|
||||
#define IS41OPR_AnalyzedInformation 64
|
||||
#define IS41OPR_ConnectionFailureReport 65
|
||||
#define IS41OPR_ConnectResource 66
|
||||
#define IS41OPR_DisconnectResource 67
|
||||
#define IS41OPR_FacilitySelectedAndAvailable 68
|
||||
#define IS41OPR_InstructionRequest 69
|
||||
#define IS41OPR_Modify 70
|
||||
#define IS41OPR_ResetTimer 71
|
||||
#define IS41OPR_Search 72
|
||||
#define IS41OPR_SeizeResource 73
|
||||
#define IS41OPR_SRFDirective 74
|
||||
#define IS41OPR_TBusy 75
|
||||
#define IS41OPR_TNoAnswer 76
|
||||
//N.S0018 "TIA/EIA-41-D Pre-Paid Charging(Revision: 1)"
|
||||
#define IS41OPR_BulkDisconnection 80
|
||||
#define IS41OPR_CallControlDirective 81
|
||||
#define IS41OPR_OAnswer 82
|
||||
#define IS41OPR_ODisconnect 83
|
||||
#define IS41OPR_CallRecoveryReport 84
|
||||
#define IS41OPR_TAnswer 85
|
||||
#define IS41OPR_TDisconnect 86
|
||||
#define IS41OPR_UnreliableCallData 87
|
||||
//X.S0010-A "Pre-Paid Charging Enhancements for Circuit-Switched Data and Short Message Services"
|
||||
#define IS41OPR_ShortMessageAnalyzed 105
|
||||
|
||||
// debug
|
||||
#define IS41DB_DEBUG 0x01
|
||||
#define IS41DB_ENCODE 0x02
|
||||
#define IS41DB_DECODE 0x04
|
||||
#define IS41DB_FLOW 0x08
|
||||
#define IS41DB_ERR 0x10
|
||||
|
||||
|
||||
#define IS41ERR_UNRECOGNIZED_MIN 0x81
|
||||
#define IS41ERR_UNRECOGNIZED_ESN 0x82
|
||||
#define IS41ERR_MIN_HLR_MISMATCH 0x83
|
||||
#define IS41ERR_OPERATION_SEQUENCE_PROBLEM 0x84
|
||||
#define IS41ERR_RESOURCE_SHORTAGE 0x85
|
||||
#define IS41ERR_OPERATION_NOT_SUPPORTED 0x86
|
||||
#define IS41ERR_TRUNK_UNAVAILABLE 0x87
|
||||
#define IS41ERR_PARAMETER_ERROR 0x88
|
||||
#define IS41ERR_SYSTEM_FAILURE 0x89
|
||||
#define IS41ERR_UNRECOGNIZED_PARAMETER_VALUE 0x8a
|
||||
#define IS41ERR_FEATURE_INACTIVE 0x8b
|
||||
#define IS41ERR_MISSING_PARAMETER 0x8c
|
||||
|
||||
// asn.1
|
||||
#define SET_NATIONAL "18"
|
||||
#define ASN_OCTET_STRING "4"
|
||||
#define ASN_INTEGER "2"
|
||||
#define ASN_NULL "5"
|
||||
#define ASN_ENUMERATED "10"
|
||||
#define ASN_SEQUENCE "16"
|
||||
#define ASN_SET "17"
|
||||
|
||||
#define ISDN_LEN 9
|
||||
|
||||
#define MAX_TCAPSEND_LEN (TCAP_PARAM_LEN-20)
|
||||
#define MAX_TCAPSEND_LEN_1 (TCAP_PARAM_LEN_1-20)
|
||||
#define MAX_IS41_VARPAR_LEN 32
|
||||
#define MAX_IS41_VARPAR_LEN_1 31
|
||||
#define MAX_IS41_TRIG_LIST_NUM 4
|
||||
#define MAX_IS41_TRIG_LIST_NUM_1 3
|
||||
|
||||
#endif
|
||||
104
plat/xapp/src/mapp/map_dlgpdu.h
Normal file
104
plat/xapp/src/mapp/map_dlgpdu.h
Normal file
@@ -0,0 +1,104 @@
|
||||
/* MAP dialogue PDU head file */
|
||||
/* written by Liu zhiguo 2002-01-14 */
|
||||
/* Version 1.0 (according GSM 09.02 17.4) */
|
||||
/* ------------------------------------- */
|
||||
#ifndef _MAP_DLGPDU
|
||||
#define _MAP_DLGPDU
|
||||
|
||||
#define MAPDLG_OPEN 0x00
|
||||
#define MAPDLG_ACCEPT 0x01
|
||||
#define MAPDLG_CLOSE 0x02
|
||||
#define MAPDLG_REFUSE 0x03
|
||||
#define MAPDLG_UABORT 0x04 // user abort
|
||||
#define MAPDLG_PABORT 0x05 // provider abort
|
||||
|
||||
/* +++++++++++++++++++++++++ */
|
||||
/* MAP-Openinfo */
|
||||
/* +++++++++++++++++++++++++ */
|
||||
typedef struct MapDlgOpen_struct
|
||||
{
|
||||
u8 param_flag;
|
||||
u8 peer_ref[ISDN_LEN+1]; // peer reference
|
||||
u8 local_ref[ISDN_LEN+1]; // local reference
|
||||
} MapDlgOpen_struct;
|
||||
|
||||
/* +++++++++++++++++++++++++ */
|
||||
/* MAP-Refuseinfo */
|
||||
/* +++++++++++++++++++++++++ */
|
||||
typedef enum MapDlgReason_enum
|
||||
{
|
||||
noReasonGiven = 0,
|
||||
invalidDstRef = 1, // invalid destination reference
|
||||
invalidOrgRef = 2 // invalid original reference
|
||||
} MapDlgReason_enum;
|
||||
|
||||
typedef struct MapDlgRefuse_struct
|
||||
{
|
||||
u8 param_flag;
|
||||
enum MapDlgReason_enum reason;
|
||||
} MapDlgRefuse_struct;
|
||||
|
||||
/* +++++++++++++++++++++++++ */
|
||||
/* MAP-UserAbortinfo */
|
||||
/* +++++++++++++++++++++++++ */
|
||||
typedef enum MapDlgRUReason_enum // resource unavailable reason
|
||||
{
|
||||
shortTRLimit = 0, // short term resource limitation
|
||||
longTRLimit = 1 // long term resource limitation
|
||||
} MapDlgRUReason_enum;
|
||||
|
||||
typedef enum MapDlgPCReason_enum // procedure cancellation reason
|
||||
{
|
||||
handoverCancel = 0, // hand over cancellation
|
||||
radioChanRelease = 1, // radio channel release
|
||||
netPathRelease = 2, // network path release
|
||||
callRelease = 3, // call release
|
||||
assProFailure = 4, // associated procedure failure
|
||||
randomDialRelease = 5, // random dialogue release
|
||||
remOperFailure = 6 // remote operation failure
|
||||
} MapDlgPCReason_enum;
|
||||
|
||||
typedef struct MapDlgUAbort_struct
|
||||
{
|
||||
u8 choice_flag; // user abort choice
|
||||
union
|
||||
{
|
||||
enum MapDlgRUReason_enum resunavi; // resource unavailable, choice_flag = 2
|
||||
enum MapDlgPCReason_enum appproccancel; // application procedure cancellation, choice_flag = 3
|
||||
} choice;
|
||||
} MapDlgUAbort_struct;
|
||||
|
||||
/* +++++++++++++++++++++++++ */
|
||||
/* MAP-UserAbortinfo */
|
||||
/* +++++++++++++++++++++++++ */
|
||||
typedef enum MapDlgPAbortReason_enum
|
||||
{
|
||||
abnormaldial = 0, // abnormal dialogue
|
||||
invalidPDU = 1
|
||||
} MapDlgPAbortReason_enum;
|
||||
|
||||
typedef struct MapDlgPAbort_struct // MAP provider abort info
|
||||
{
|
||||
u8 param_flag;
|
||||
enum MapDlgPAbortReason_enum reason;
|
||||
} MapDlgPAbort_struct;
|
||||
|
||||
/* +++++++++++++++++++++++++ */
|
||||
/* MAP-DialoguePDU */
|
||||
/* +++++++++++++++++++++++++ */
|
||||
typedef struct MapDlg_struct
|
||||
{
|
||||
u8 dlg_type;
|
||||
union
|
||||
{
|
||||
struct MapDlgOpen_struct map_open;
|
||||
struct MapDlgRefuse_struct map_refuse;
|
||||
struct MapDlgUAbort_struct map_uabort;
|
||||
struct MapDlgPAbort_struct map_pabort;
|
||||
} map_dlg;
|
||||
} MapDlg_struct;
|
||||
|
||||
u8 build_mapdlg(struct MapDlg_struct *dlg_ptr,u8 *data_buf);
|
||||
u8 extract_mapdlg(struct MapDlg_struct *dlg_ptr,struct dlgport_struct *port_ptr);
|
||||
|
||||
#endif
|
||||
24
plat/xapp/src/mapp/map_includes.h
Normal file
24
plat/xapp/src/mapp/map_includes.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//////////////////////////////////////////////////
|
||||
//Title : map_includes.c
|
||||
//Auhtor : Liu Wei
|
||||
//Desc : map include headers
|
||||
//Created : 2007-05-18
|
||||
//Revision :
|
||||
//
|
||||
//Revision :
|
||||
//
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef _MAP_INCLUDES_H_
|
||||
#define _MAP_INCLUDES_H_
|
||||
|
||||
|
||||
#include "../../../public/src/include/pub_include.h"
|
||||
#include "../../../sccp/src/include/sccp.h"
|
||||
#include "map_const.h"
|
||||
#include "map_struct.h"
|
||||
#include "map_coding.h"
|
||||
#include "map_public.h"
|
||||
|
||||
#endif
|
||||
34
plat/xapp/src/mapp/map_opr_func.h
Normal file
34
plat/xapp/src/mapp/map_opr_func.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/* MAP extension operation */
|
||||
/* ------------------------------------- */
|
||||
#ifndef _MAP_OPR_FUNC
|
||||
#define _MAP_OPR_FUNC
|
||||
|
||||
#include "map_includes.h"
|
||||
#include "../xap_interfunc.h"
|
||||
#include "map_code.h"
|
||||
|
||||
extern int assign_MapDetermineOprUserArg(struct MapDetermineOprUser_Arg *dou_ptr,u8 *buf, u8 ver);
|
||||
extern int extract_MapDetermineOprUserArg(struct MapDetermineOprUser_Arg *dou_ptr,u32 buf_len,u8 *buf);
|
||||
extern int assign_MapDetermineOprUserRes(struct MapDetermineOprUser_Res *dou_ptr,u8 *buf, u8 ver);
|
||||
extern int extract_MapDetermineOprUserRes(struct MapDetermineOprUser_Res *dou_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
extern int assign_MapVlrUpdateLocationArg(struct MapVlrUpdateLocation_Arg *cuwm_ptr,u8 *buf, u8 ver);
|
||||
extern int extract_MapVlrUpdateLocationArg(struct MapVlrUpdateLocation_Arg *cuwm_ptr,u32 buf_len,u8 *buf);
|
||||
extern int assign_MapVlrUpdateLocationRes(struct MapVlrUpdateLocation_Res *cuwm_ptr,u8 *buf, u8 ver);
|
||||
extern int extract_MapVlrUpdateLocationRes(struct MapVlrUpdateLocation_Res *cuwm_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
extern int assign_MapCreateUserWithMsisdnImsiArg(struct MapCreateUserWithMsisdnImsi_Arg *cuwm_ptr,u8 *buf, u8 ver);
|
||||
extern int extract_MapCreateUserWithMsisdnImsiArg(struct MapCreateUserWithMsisdnImsi_Arg *cuwm_ptr,u32 buf_len,u8 *buf);
|
||||
extern int assign_MapCreateUserWithMsisdnImsiRes(struct MapCreateUserWithMsisdnImsi_Res *cuwm_ptr,u8 *buf, u8 ver);
|
||||
extern int extract_MapCreateUserWithMsisdnImsiRes(struct MapCreateUserWithMsisdnImsi_Res *cuwm_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
extern int assign_MapDeleteOprUserArg(struct MapDeleteOprUser_Arg *dou_ptr,u8 *buf, u8 ver);
|
||||
extern int extract_MapDeleteOprUserArg(struct MapDeleteOprUser_Arg *dou_ptr,u32 buf_len,u8 *buf);
|
||||
extern int assign_MapDeleteOprUserRes(struct MapDeleteOprUser_Res *dou_ptr,u8 *buf, u8 ver);
|
||||
extern int extract_MapDeleteOprUserRes(struct MapDeleteOprUser_Res *dou_ptr,u32 buf_len,u8 *buf);
|
||||
|
||||
extern int assign_MapVlrEnquiryIMDM_Arg(struct MapVlrEnquiryIMDM_Arg *cuwm_ptr,u8 *buf, u8 ver);
|
||||
extern int extract_MapVlrEnquiryIMDM_Arg(struct MapVlrEnquiryIMDM_Arg *cuwm_ptr,u32 buf_len,u8 *buf);
|
||||
extern int assign_MapVlrEnquiryIMDM_Res(struct MapVlrEnquiryIMDM_Res *cuwm_ptr,u8 *buf, u8 ver);
|
||||
extern int extract_MapVlrEnquiryIMDM_Res(struct MapVlrEnquiryIMDM_Res *cuwm_ptr,u32 buf_len,u8 *buf);
|
||||
#endif
|
||||
1108
plat/xapp/src/mapp/map_public.c
Normal file
1108
plat/xapp/src/mapp/map_public.c
Normal file
File diff suppressed because it is too large
Load Diff
26
plat/xapp/src/mapp/map_public.h
Normal file
26
plat/xapp/src/mapp/map_public.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/* MAP public head file */
|
||||
/* written by Liu Zhiguo 2002-03-27 */
|
||||
/* version 1.0 */
|
||||
/* -------------------------------- */
|
||||
|
||||
#ifndef _MAP_PUBLIC
|
||||
#define _MAP_PUBLIC
|
||||
|
||||
void mapp_log_debug(const char *fmt, ...);
|
||||
|
||||
u8 bytestrtobitstr(u8 *bit_str,u8 *byte_str,u8 bit_len);
|
||||
u8 bitstrtobytestr(u8 *byte_str,u8 *bit_str,u8 bit_len);
|
||||
u8 tele_bittostr(u16 tele_data,u8 *tele_str,u8 ss_flag);
|
||||
u16 tele_strtobit(u8 *tele_str,u8 tele_len);
|
||||
u8 bearer_bittostr(u32 bearer_data, u8 *bearer_str,u8 ss_flag);
|
||||
u32 bearer_strtobit(u8 *bearer_str,u8 bearer_len);
|
||||
void get_sccpadd(struct SCCP_ADDRESS *add_ptr,u8 *data);
|
||||
void set_sccpadd(struct SCCP_ADDRESS *add_ptr,u8 *data);
|
||||
u8 map_com_ftos(struct MapComSrv_struct *map_com,u8 *data_flow);
|
||||
void map_com_stof(struct MapComSrv_struct *com_ptr,u8 *data_flow,u8 delimiter_flag);
|
||||
u8 map_opr_ftos(struct MapOprData_struct *opr_ptr,u8 *data_flow);
|
||||
void map_opr_stof(struct MapOprData_struct *opr_ptr,u8 *data_flow,u8 delimiter_flag);
|
||||
|
||||
char *is41_sequenceTag(char *tag,int sequence);
|
||||
|
||||
#endif
|
||||
3643
plat/xapp/src/mapp/map_struct.h
Normal file
3643
plat/xapp/src/mapp/map_struct.h
Normal file
File diff suppressed because it is too large
Load Diff
477
plat/xapp/src/mapp/win_struct.h
Normal file
477
plat/xapp/src/mapp/win_struct.h
Normal file
@@ -0,0 +1,477 @@
|
||||
/***************************/
|
||||
/****** WIN Parameter ******/
|
||||
/***************************/
|
||||
//N.S0009: 6.5.2.bv
|
||||
typedef struct IS41_PAR_MSID {
|
||||
u8 choice_flag; //0:min; 1:imsi
|
||||
u8 min[MIN_LEN];
|
||||
u8 imsi[IMSI_LEN];
|
||||
} IS41_PAR_MSID;
|
||||
|
||||
//N.S0013: 6.5.2.cl
|
||||
typedef struct IS41_PAR_EXESCR {
|
||||
u8 param_flag;
|
||||
u8 scrnameLen;
|
||||
u8 scrname[32];
|
||||
//optional
|
||||
u8 scrargLen;
|
||||
u8 scrarg[96];
|
||||
} IS41_PAR_EXESCR;
|
||||
|
||||
/***************************/
|
||||
/****** WIN Operation ******/
|
||||
/***************************/
|
||||
//N.S0018: 6.4.2.30 OriginationRequest INVOKE
|
||||
typedef struct IS41_ORREQ_ARG {
|
||||
u32 param_flag;
|
||||
u8 billid[7];//BillingID (Originating) M 6.5.2.16
|
||||
u8 digitsLen;
|
||||
u8 digits[32];//Digits (Dialed) M 6.5.2.58
|
||||
u8 esn[4];//ElectronicSerialNumber M 6.5.2.63
|
||||
u8 mscid[3];//MSCID (Originating MSC) M 6.5.2.82
|
||||
IS41_PAR_MSID msid;//MSID M 6.5.2.bv k
|
||||
u8 origtrigLen;
|
||||
u8 origtrig[32];//OriginationTriggers M 6.5.2.90
|
||||
u8 transcapLen;
|
||||
u8 transcap[32];//TransactionCapability M 6.5.2.160
|
||||
//optional
|
||||
u8 cpnameLen;
|
||||
u8 cpname[32];//CallingPartyName O 6.5.2.bw g, i
|
||||
u8 cpndgts1Len;
|
||||
u8 cpndgts1[32];//CallingPartyNumberDigits1 O 6.5.2.21 a
|
||||
u8 cpndgts2Len;
|
||||
u8 cpndgts2[32];//CallingPartyNumberDigits2 O 6.5.2.22 a
|
||||
u8 cpsubLen;
|
||||
u8 cpsub[32];//CallingPartySubaddress O 6.5.2.25 a
|
||||
u8 locid[2];//LocationAreaID O 6.5.2.77 a, l
|
||||
u8 mdnLen;
|
||||
u8 mdn[32];//MobileDirectoryNumber O 6.5.2.80 b
|
||||
u8 featindLen;
|
||||
u8 featind[32];//FeatureIndicator O 6.5.2.ej m
|
||||
u8 mscinLen;
|
||||
u8 mscin[32];//MSCIdentificationNumber O 6.5.2.83 c
|
||||
u8 otfiLen;
|
||||
u8 otfi[32];//OneTimeFeatureIndicator O 6.5.2.88 d
|
||||
u8 pc_ssn[5];//PC_SSN (Originating MSC) O 6.5.2.93 e
|
||||
u8 plind;//PreferredLanguageIndicator O 6.5.2.96 j
|
||||
u8 senderinLen;
|
||||
u8 senderin[32];//SenderIdentificationNumber O 6.5.2.116 f
|
||||
u8 scellid[2];//ServingCellID O 6.5.2.117 a, n
|
||||
u8 triggertype;//TriggerType O 6.5.2.dh h
|
||||
IS41_PAR_WIN_CAP wincap;//WINCapability O 6.5.2.di o
|
||||
} IS41_ORREQ_ARG;
|
||||
|
||||
//N.S0018: 6.4.2.30 OriginationRequest RETURN RESULT
|
||||
typedef struct IS41_ORREQ_RSP {
|
||||
u32 param_flag;
|
||||
//optional
|
||||
u8 accden;//AccessDeniedReason O 6.5.2.1 a
|
||||
u8 actcodeLen;
|
||||
u8 actcode[32];//ActionCode O 6.5.2.2 b
|
||||
u8 annlistLen;
|
||||
u8 annlist[32];//AnnouncementList O 6.5.2.6 c
|
||||
u8 cpnstrg1Len;
|
||||
u8 cpnstrg1[32];//CallingPartyNumberString1 O 6.5.2.23 d, e
|
||||
u8 cpnstrg2Len;
|
||||
u8 cpnstrg2[32];//CallingPartyNumberString2 O 6.5.2.24 d, e
|
||||
u8 cpsubLen;
|
||||
u8 cpsub[32];//CallingPartySubaddress O 6.5.2.25 d, e, f
|
||||
u8 cardgtsLen;
|
||||
u8 cardgts[32];//CarrierDigits O 6.5.2.28 g
|
||||
u8 digitsLen;
|
||||
u8 digits[32];//Digits (Dialed) O 6.5.2.58 h
|
||||
u8 disptextLen;
|
||||
u8 disptext[32];//DisplayText O 6.5.2.bx d, e, r
|
||||
u8 acdgtsLen;
|
||||
u8 acdgts[32];//DMH_AccountCodeDigits O 6.5.2.59 i
|
||||
u8 abdgtsLen;
|
||||
u8 abdgts[32];//DMH_AlternateBillingDigits O 6.5.2.60 i
|
||||
u8 billdgtsLen;
|
||||
u8 billdgts[32];//DMH_BillingDigits O 6.5.2.61 i
|
||||
u8 redindLen;
|
||||
u8 redind[32];//DMH_RedirectionIndicator O 6.5.2.62 i, j
|
||||
u8 dmh_svcidLen;
|
||||
u8 dmh_svcid[32];//DMH_ServiceID O 6.5.2.ei s
|
||||
u8 grpinfoLen;
|
||||
u8 grpinfo[32];//GroupInformation O 6.5.2.69 k
|
||||
u8 mdnLen;
|
||||
u8 mdn[32];//MobileDirectoryNumber O 6.5.2.80 i
|
||||
u8 natimeLen;
|
||||
u8 natime[32];//NoAnswerTime O 6.5.2.87 l
|
||||
u8 otfiLen;
|
||||
u8 otfi[32];//OneTimeFeatureIndicator O 6.5.2.88 m
|
||||
u8 pilotLen;
|
||||
u8 pilot[32];//PilotNumber O 6.5.2.95 k
|
||||
u8 rndgtsLen;
|
||||
u8 rndgts[32];//RedirectingNumberDigits O 6.5.2.107 f
|
||||
u8 rnstringLen;
|
||||
u8 rnstring[32];//RedirectingNumberString O 6.5.2.108 d
|
||||
u8 rsubLen;
|
||||
u8 rsub[32];//RedirectingSubaddress O 6.5.2.109 d, e
|
||||
u8 resumepic;//ResumePIC O 6.5.2.cu p
|
||||
u8 routdgtsLen;
|
||||
u8 routdgts[32];//RoutingDigits O 6.5.2.114 g
|
||||
IS41_PAR_TERMLIST termlist;//TerminationList O 6.5.2.156 n
|
||||
u8 termtrigLen;
|
||||
u8 termtrig[32];//TerminationTriggers O 6.5.2.57 o //should be 6.5.2.159
|
||||
u8 triggerlistnum;
|
||||
IS41_PAR_TRIGGER_LIST triggerlist[MAX_IS41_TRIG_LIST_NUM];//TriggerAddressList O 6.5.2.de q
|
||||
} IS41_ORREQ_RSP;
|
||||
|
||||
//N.S0018: 6.4.2.i AnalyzedInformation INVOKE
|
||||
typedef struct IS41_ANLYZD_ARG {
|
||||
u32 param_flag;
|
||||
u8 billid[7];//BillingID (Originating) M 6.5.2.16 a
|
||||
u8 digitsLen;
|
||||
u8 digits[32];//Digits (Dialed) M 6.5.2.58
|
||||
u8 mscid[3];//MSCID (Originating) M 6.5.2.82 b
|
||||
u8 transcapLen;
|
||||
u8 transcap[32];//TransactionCapability M 6.5.2.160
|
||||
u8 triggertype;//TriggerType M 6.5.2.dh c
|
||||
IS41_PAR_WIN_CAP wincap;//WINCapability M 6.5.2.di d
|
||||
//optional
|
||||
u8 cpnameLen;
|
||||
u8 cpname[32];//CallingPartyName O 6.5.2.bw e, m
|
||||
u8 cpndgts1Len;
|
||||
u8 cpndgts1[32];//CallingPartyNumberDigits1 O 6.5.2.21 e
|
||||
u8 cpndgts2Len;
|
||||
u8 cpndgts2[32];//CallingPartyNumberDigits2 O 6.5.2.22 e
|
||||
u8 cpsubLen;
|
||||
u8 cpsub[32];//CallingPartySubaddress O 6.5.2.25 e
|
||||
u8 cardgtsLen;
|
||||
u8 cardgts[32];//CarrierDigits O 6.5.2.28 n, o
|
||||
u8 cciLen;
|
||||
u8 cci[32];//ConferenceCallingIndicator O 6.5.2.49 f
|
||||
u8 destdgtsLen;
|
||||
u8 destdgts[32];//DestinationDigits O 6.5.2.56 n, p
|
||||
u8 redindLen;
|
||||
u8 redind[32];//DMH_RedirectionIndicator O 6.5.2.62 q
|
||||
u8 esn[4];//ElectronicSerialNumber O 6.5.2.63 g, r
|
||||
u8 featindLen;
|
||||
u8 featind[32];//FeatureIndicator O 6.5.2.ej s
|
||||
u8 locid[2];//LocationAreaID O 6.5.2.77 h, t
|
||||
u8 mdnLen;
|
||||
u8 mdn[32];//MobileDirectoryNumber O 6.5.2.80 i
|
||||
u8 mscinLen;
|
||||
u8 mscin[32];//MSCIdentificationNumber O 6.5.2.83 j
|
||||
IS41_PAR_MSID msid;//MSID O 6.5.2.bv g, r
|
||||
u8 otfiLen;
|
||||
u8 otfi[32];//OneTimeFeatureIndicator O 6.5.2.88 k
|
||||
u8 plind;//PreferredLanguageIndicator O 6.5.2.96
|
||||
u8 rndgtsLen;
|
||||
u8 rndgts[32];//RedirectingNumberDigits O 6.5.2.107 e
|
||||
u8 rdnameLen;
|
||||
u8 rdname[32];//RedirectingPartyName O 6.5.2.by b, m
|
||||
u8 rsubLen;
|
||||
u8 rsub[32];//RedirectingSubaddress O 6.5.2.109 e
|
||||
u8 routdgtsLen;
|
||||
u8 routdgts[32];//RoutingDigits O 6.5.2.114 n, u
|
||||
u8 scellid[2];//ServingCellID O 6.5.2.117 h, v
|
||||
u8 mytyp;//SystemMyTypeCode O 6.5.2.147
|
||||
u8 tat;//TerminationAccessType O 6.5.2.155 l
|
||||
u8 tdo[2];//TimeDateOffset O 6.5.2.dd w
|
||||
u8 tod[3];//TimeOfDay O 6.5.2.em x
|
||||
} IS41_ANLYZD_ARG;
|
||||
|
||||
//N.S0018: 6.4.2.i AnalyzedInformation RETURN RESULT
|
||||
typedef struct IS41_ANLYZD_RSP {
|
||||
u32 param_flag;
|
||||
//optional
|
||||
u8 accden;//AccessDeniedReason O 6.5.2.1 a
|
||||
u8 actcodeLen;
|
||||
u8 actcode[32];//ActionCode O 6.5.2.2 b
|
||||
u8 annlistLen;
|
||||
u8 annlist[32];//AnnouncementList O 6.5.2.6 c
|
||||
u8 cardgtsLen;
|
||||
u8 cardgts[32];//CarrierDigits O 6.5.2.28 d
|
||||
u8 cciLen;
|
||||
u8 cci[32];//ConferenceCallingIndicator O 6.5.2.49 e
|
||||
u8 digitsLen;
|
||||
u8 digits[32];//Digits (Dialed) O 6.5.2.58 f
|
||||
u8 disptextLen;
|
||||
u8 disptext[32];//DisplayText O 6.5.2.bx d, m
|
||||
u8 acdgtsLen;
|
||||
u8 acdgts[32];//DMH_AccountCodeDigits O 6.5.2.59 g
|
||||
u8 abdgtsLen;
|
||||
u8 abdgts[32];//DMH_AlternateBillingDigits O 6.5.2.60 g
|
||||
u8 billdgtsLen;
|
||||
u8 billdgts[32];//DMH_BillingDigits O 6.5.2.61 g
|
||||
u8 redindLen;
|
||||
u8 redind[32];//DMH_RedirectionIndicator O 6.5.2.62 g, h
|
||||
u8 dmh_svcidLen;
|
||||
u8 dmh_svcid[32];//DMH_ServiceID O 6.5.2.ei n
|
||||
u8 natimeLen;
|
||||
u8 natime[32];//NoAnswerTime O 6.5.2.87 i
|
||||
u8 otfiLen;
|
||||
u8 otfi[32];//OneTimeFeatureIndicator O 6.5.2.88 j
|
||||
u8 rndgtsLen;
|
||||
u8 rndgts[32];//RedirectingNumberDigits O 6.5.2.107 d
|
||||
u8 resumepic;//ResumePIC O 6.5.2.cu k
|
||||
u8 routdgtsLen;
|
||||
u8 routdgts[32];//RoutingDigits O 6.5.2.114 d
|
||||
IS41_PAR_TERMLIST termlist;//TerminationList O 6.5.2.156 l
|
||||
u8 termtrigLen;
|
||||
u8 termtrig[32];//TerminationTriggers O 6.5.2.159 d
|
||||
u8 triggerlistnum;
|
||||
IS41_PAR_TRIGGER_LIST triggerlist[MAX_IS41_TRIG_LIST_NUM];//TriggerAddressList O 6.5.2.de d, o
|
||||
} IS41_ANLYZD_RSP;
|
||||
|
||||
//N.S0018: 6.4.2.aa OAnswer INVOKE
|
||||
typedef struct IS41_OANSWER_ARG {
|
||||
u32 param_flag;
|
||||
u8 billid[7];//BillingID (Originating) M 6.5.2.16 a
|
||||
u8 esn[4];//ElectronicSerialNumber M 6.5.2.63 b
|
||||
u8 mscid[3];//MSCID (Originating) M 6.5.2.82 c
|
||||
IS41_PAR_MSID msid;//MSID M 6.5.2.bv d
|
||||
u8 tdo[2];//TimeDateOffset M 6.5.2.dd e
|
||||
u8 tod[3];//TimeOfDay M 6.5.2.em f
|
||||
u8 triggertype;//TriggerType M 6.5.2.dh g
|
||||
//optional
|
||||
u8 locid[2];//LocationAreaID O 6.5.2.77 h, i
|
||||
u8 mdnLen;
|
||||
u8 mdn[32];//MobileDirectoryNumber O 6.5.2.80 j
|
||||
u8 featindLen;
|
||||
u8 featind[32];//FeatureIndicator O 6.5.2.ej k
|
||||
u8 mscinLen;
|
||||
u8 mscin[32];//MSCIdentificationNumber O 6.5.2.83 l
|
||||
u8 scellid[2];//ServingCellID O 6.5.2.117 h, m
|
||||
u8 mytyp;//SystemMyTypeCode O 6.5.2.147
|
||||
} IS41_OANSWER_ARG;
|
||||
|
||||
//N.S0018: 6.4.2.ab ODisconnect INVOKE
|
||||
typedef struct IS41_ODISCONNECT_ARG {
|
||||
u32 param_flag;
|
||||
u8 billid[7];//BillingID (Originating) M 6.5.2.16 a
|
||||
u8 esn[4];//ElectronicSerialNumber M 6.5.2.63 b
|
||||
u8 mscid[3];//MSCID (Originating) M 6.5.2.82 c
|
||||
IS41_PAR_MSID msid;//MSID M 6.5.2.bv d
|
||||
u8 relcause;//ReleaseCause M 6.5.2.el e
|
||||
u8 tdo[2];//TimeDateOffset M 6.5.2.dd f
|
||||
u8 tod[3];//TimeOfDay M 6.5.2.em g
|
||||
u8 transcapLen;
|
||||
u8 transcap[32];//TransactionCapability M 6.5.2.160
|
||||
IS41_PAR_WIN_CAP wincap;//WINCapability M 6.5.2.di
|
||||
u8 triggertype;//TriggerType M 6.5.2.dh h
|
||||
//optional
|
||||
u8 locid[2];//LocationAreaID O 6.5.2.77 i, j
|
||||
u8 mdnLen;
|
||||
u8 mdn[32];//MobileDirectoryNumber O 6.5.2.80 k
|
||||
u8 mscinLen;
|
||||
u8 mscin[32];//MSCIdentificationNumber O 6.5.2.83 l
|
||||
u8 scellid[2];//ServingCellID O 6.5.2.117 i, m
|
||||
u8 mytyp;//SystemMyTypeCode O 6.5.2.147
|
||||
} IS41_ODISCONNECT_ARG;
|
||||
|
||||
//N.S0018: 6.4.2.ab ODisconnect RETURN RESULT
|
||||
typedef struct IS41_ODISCONNECT_RSP {
|
||||
u32 param_flag;
|
||||
//optional
|
||||
u8 annlistLen;
|
||||
u8 annlist[32];//AnnouncementList O 6.5.2.6 a
|
||||
u8 dmh_svcidLen;
|
||||
u8 dmh_svcid[32];//DMH_ServiceID O 6.5.2.ei b
|
||||
} IS41_ODISCONNECT_RSP;
|
||||
|
||||
//N.S0018: 6.4.2.ad TAnswer INVOKE
|
||||
typedef struct IS41_TANSWER_ARG {
|
||||
u32 param_flag;
|
||||
u8 billid[7];//BillingID (Originating) M 6.5.2.16 a
|
||||
u8 esn[4];//ElectronicSerialNumber M 6.5.2.63 b
|
||||
u8 mscid[3];//MSCID M 6.5.2.82 c
|
||||
IS41_PAR_MSID msid;//MSID M 6.5.2.bv b
|
||||
u8 tdo[2];//TimeDateOffset M 6.5.2.dd d
|
||||
u8 tod[3];//TimeOfDay M 6.5.2.em e
|
||||
u8 transcapLen;
|
||||
u8 transcap[32];//TransactionCapability M 6.5.2.160
|
||||
u8 triggertype;//TriggerType M 6.5.2.dh f
|
||||
IS41_PAR_WIN_CAP wincap;//WINCapability M 6.5.2.di
|
||||
//optional
|
||||
u8 locid[2];//LocationAreaID O 6.5.2.77 g, h
|
||||
u8 mdnLen;
|
||||
u8 mdn[32];//MobileDirectoryNumber O 6.5.2.80 i
|
||||
u8 featindLen;
|
||||
u8 featind[32];//FeatureIndicator O 6.5.2.ej j
|
||||
u8 mscinLen;
|
||||
u8 mscin[32];//MSCIdentificationNumber O 6.5.2.83 k
|
||||
u8 scellid[2];//ServingCellID O 6.5.2.117 g, l
|
||||
u8 mytyp;//SystemMyTypeCode O 6.5.2.147
|
||||
u8 tat;//TerminationAccessType O 6.5.2.155 m
|
||||
} IS41_TANSWER_ARG;
|
||||
|
||||
//N.S0018: 6.4.2.ae TDisconnect INVOKE
|
||||
typedef struct IS41_TDISCONNECT_ARG {
|
||||
u32 param_flag;
|
||||
u8 billid[7];//BillingID (Originating) M 6.5.2.16 a
|
||||
u8 esn[4];//ElectronicSerialNumber M 6.5.2.63 b
|
||||
u8 mscid[3];//MSCID M 6.5.2.82 c
|
||||
IS41_PAR_MSID msid;//MSID M 6.5.2.bv d
|
||||
u8 tdo[2];//TimeDateOffset M 6.5.2.dd e
|
||||
u8 tod[3];//TimeOfDay M 6.5.2.em f
|
||||
u8 triggertype;//TriggerType M 6.5.2.dh g
|
||||
//optional
|
||||
u8 locid[2];//LocationAreaID O 6.5.2.77 h, i
|
||||
u8 mdnLen;
|
||||
u8 mdn[32];//MobileDirectoryNumber O 6.5.2.80 j
|
||||
u8 mscinLen;
|
||||
u8 mscin[32];//MSCIdentificationNumber O 6.5.2.83 k
|
||||
u8 relcause;//ReleaseCause O 6.5.2.el l
|
||||
u8 scellid[2];//ServingCellID O 6.5.2.117 h, m
|
||||
u8 mytyp;//SystemMyTypeCode O 6.5.2.147
|
||||
} IS41_TDISCONNECT_ARG;
|
||||
|
||||
//N.S0018: 6.4.2.ae TDisconnect RETURN RESULT
|
||||
typedef struct IS41_TDISCONNECT_RSP {
|
||||
u32 param_flag;
|
||||
//optional
|
||||
u8 dmh_svcidLen;
|
||||
u8 dmh_svcid[32];//DMH_ServiceID O 6.5.2.ei a
|
||||
} IS41_TDISCONNECT_RSP;
|
||||
|
||||
//N.S0018: 6.4.2.z CallControlDirective INVOKE
|
||||
typedef struct IS41_CCDIR_ARG {
|
||||
u32 param_flag;
|
||||
u8 billid[7];//BillingID M 6.5.2.16 a
|
||||
u8 mscid[3];//MSCID M 6.5.2.82 b
|
||||
IS41_PAR_MSID msid;//MSID M 6.5.2.bv c
|
||||
//optional
|
||||
u8 actcodeLen;
|
||||
u8 actcode[32];//ActionCode O 6.5.2.2 d
|
||||
u8 annlistLen;
|
||||
u8 annlist[32];//AnnouncementList O 6.5.2.6 e
|
||||
u8 disptextLen;
|
||||
u8 disptext[32];//DisplayText O 6.5.2.bx f
|
||||
u8 acdgtsLen;
|
||||
u8 acdgts[32];//DMH_AccountCodeDigits O 6.5.2.59 g
|
||||
u8 abdgtsLen;
|
||||
u8 abdgts[32];//DMH_AlternateBillingDigits O 6.5.2.60 g
|
||||
u8 billdgtsLen;
|
||||
u8 billdgts[32];//DMH_BillingDigits O 6.5.2.61 g
|
||||
u8 redindLen;
|
||||
u8 redind[32];//DMH_RedirectionIndicator O 6.5.2.62 g, h
|
||||
u8 esn[4];//ElectronicSerialNumber O 6.5.2.63 i, j
|
||||
u8 mdnLen;
|
||||
u8 mdn[32];//MobileDirectoryNumber O 6.5.2.80 k
|
||||
u8 plind;//PreferredLanguageIndicator O 6.5.2.96 l, m
|
||||
IS41_PAR_TERMLIST termlist;//TerminationList O 6.5.2.156 n
|
||||
u8 triggerlistnum;
|
||||
IS41_PAR_TRIGGER_LIST triggerlist[MAX_IS41_TRIG_LIST_NUM];//TriggerAddressList O 6.5.2.de h
|
||||
} IS41_CCDIR_ARG;
|
||||
|
||||
//N.S0018: 6.4.2.z CallControlDirective RETURN RESULT
|
||||
typedef struct IS41_CCDIR_RSP {
|
||||
u32 param_flag;
|
||||
//optional
|
||||
u8 callstatusLen;
|
||||
u8 callstatus[32];//CallStatus O 6.5.2.en a
|
||||
} IS41_CCDIR_RSP;
|
||||
|
||||
//N.S0013: 6.4.2.r SeizeResource INVOKE
|
||||
typedef struct IS41_SEIZERES_ARG {
|
||||
u32 param_flag;
|
||||
//optional
|
||||
u8 plind;//PreferredLanguageIndicator O 6.5.2.96
|
||||
u8 psrLen;
|
||||
u8 psr[32];//PrivateSpecializedResource O 6.5.2.u a //should be 6.5.2.ct
|
||||
u8 srLen;
|
||||
u8 sr[32];//SpecializedResource O 6.5.2.dc a
|
||||
} IS41_SEIZERES_ARG;
|
||||
|
||||
//N.S0013: 6.4.2.r SeizeResource RETURN RESULT
|
||||
typedef struct IS41_SEIZERES_RSP {
|
||||
u32 param_flag;
|
||||
u8 destdgtsLen;
|
||||
u8 destdgts[32];//DestinationDigits M 6.5.2.56 a
|
||||
} IS41_SEIZERES_RSP;
|
||||
|
||||
//N.S0013: 6.4.2.k ConnectResource INVOKE
|
||||
typedef struct IS41_CONNRES_ARG {
|
||||
u32 param_flag;
|
||||
u8 destdgtsLen;
|
||||
u8 destdgts[32];//DestinationDigits M 6.5.2.56
|
||||
//optional
|
||||
u8 cardgtsLen;
|
||||
u8 cardgts[32];//CarrierDigits O 6.5.2.28 a
|
||||
u8 routdgtsLen;
|
||||
u8 routdgts[32];//RoutingDigits O 6.5.2.114 a
|
||||
} IS41_CONNRES_ARG;
|
||||
|
||||
//N.S0013: 6.4.2.n InstructionRequest INVOKE & RETURN RESULT
|
||||
typedef struct IS41_INSTREQ_ARG {
|
||||
u32 param_flag; //no parameter
|
||||
} IS41_INSTREQ_ARG;
|
||||
|
||||
typedef struct IS41_INSTREQ_RSP {
|
||||
u32 param_flag; //no parameter
|
||||
} IS41_INSTREQ_RSP;
|
||||
|
||||
//N.S0018: 6.4.2.s SRFDirective INVOKE
|
||||
typedef struct IS41_SRFDIR_ARG {
|
||||
u32 param_flag;
|
||||
//optional
|
||||
u8 annlistLen;
|
||||
u8 annlist[32];//AnnouncementList O 6.5.2.6 a, d
|
||||
u8 dgtccLen;
|
||||
u8 dgtcc[32];//DigitCollectionControl O 6.5.2.57 b
|
||||
IS41_PAR_EXESCR exescr;//ExecuteScript O 6.5.2.cl c, d
|
||||
u8 mdnLen;
|
||||
u8 mdn[32];//MobileDirectoryNumber O 6.5.2.80 e
|
||||
} IS41_SRFDIR_ARG;
|
||||
|
||||
//N.S0013: 6.4.2.s SRFDirective RETURN RESULT
|
||||
typedef struct IS41_SRFDIR_RSP {
|
||||
u32 param_flag;
|
||||
//optional
|
||||
u8 digitsLen;
|
||||
u8 digits[32];//Digits (Dialed) O 6.5.2.58 a, b
|
||||
u8 scrresultLen;
|
||||
u8 scrresult[96];//ScriptResult O 6.5.2.cx c
|
||||
} IS41_SRFDIR_RSP;
|
||||
|
||||
//X.S0010: 6.4.2.ax ShortMessageAnalyzed INVOKE
|
||||
typedef struct IS41_SM_ANLYZD_ARG {
|
||||
u32 param_flag;
|
||||
u8 sms_brlen[2];//SMS_BearerLength M 6.5.2.hn a
|
||||
u8 sms_billidLen;
|
||||
u8 sms_billid[32];//SMS_BillingID M 6.5.2.ho b
|
||||
u8 sms_event;//SMS_Event M 6.5.2.hp c
|
||||
u8 smstidLen;
|
||||
u8 smstid[MAX_IS41_VARPAR_LEN];//SMS_TeleserviceIdentifier M 6.5.2.137 d
|
||||
//optional
|
||||
u8 esn[4];//ElectronicSerialNumber O 6.5.2.63 e, f
|
||||
u8 mdnLen;
|
||||
u8 mdn[32];//MobileDirectoryNumber O 6.5.2.80 e, f, g
|
||||
IS41_PAR_MSID msid;//MSID O 6.5.2.bv e, f, g
|
||||
u8 smscidLen;
|
||||
u8 smscid[MAX_IS41_VARPAR_LEN];//SMS_ChargeIndicator O 6.5.2.126 h
|
||||
u8 smsdaLen;
|
||||
u8 smsda[MAX_IS41_VARPAR_LEN];//SMS_DestinationAddress O 6.5.2.127 i
|
||||
u8 sms_pmcnt[4];//SMS_PendingMessageCount O 6.5.2.hr j
|
||||
u8 smsodaLen;
|
||||
u8 smsoda[MAX_IS41_VARPAR_LEN];//SMS_OriginalDestinationAddress O 6.5.2.131 k
|
||||
u8 smsodsLen;
|
||||
u8 smsods[MAX_IS41_VARPAR_LEN];//SMS_OriginalDestinationSubaddress O 6.5.2.132 l
|
||||
u8 smsooaLen;
|
||||
u8 smsooa[MAX_IS41_VARPAR_LEN];//SMS_OriginalOriginatingAddress O 6.5.2.133 m
|
||||
u8 smsoosLen;
|
||||
u8 smsoos[MAX_IS41_VARPAR_LEN];//SMS_OriginalOriginatingSubaddress O 6.5.2.134 l
|
||||
u8 smsoaLen;
|
||||
u8 smsoa[MAX_IS41_VARPAR_LEN];//SMS_OriginatingAddress O 6.5.2.135 n
|
||||
u8 tdo[2];//TimeDateOffset O 6.5.2.dd o
|
||||
u8 tod[3];//TimeOfDay O 6.5.2.em p
|
||||
} IS41_SM_ANLYZD_ARG;
|
||||
|
||||
//X.S0010: 6.4.2.ax ShortMessageAnalyzed RETURN RESULT
|
||||
typedef struct IS41_SM_ANLYZD_RSP {
|
||||
u32 param_flag;
|
||||
//optional
|
||||
u8 dmh_svcidLen;
|
||||
u8 dmh_svcid[32];//DMH_ServiceID O 6.5.2.ei a
|
||||
u8 smsbdLen;
|
||||
u8 smsbd[256];//SMS_BearerData O 6.5.2.124 b
|
||||
u8 smscauseLen;
|
||||
u8 smscause[32];//SMS_CauseCode O 6.5.2.125 c
|
||||
u8 sms_eventnotLen;
|
||||
u8 sms_eventnot[32];//SMS_EventNotification O 6.5.2.hq d
|
||||
} IS41_SM_ANLYZD_RSP;
|
||||
|
||||
|
||||
1755
plat/xapp/src/xap_cdmacdr.c
Normal file
1755
plat/xapp/src/xap_cdmacdr.c
Normal file
File diff suppressed because it is too large
Load Diff
898
plat/xapp/src/xap_cdmacdr.h
Normal file
898
plat/xapp/src/xap_cdmacdr.h
Normal file
@@ -0,0 +1,898 @@
|
||||
/* HLR CDMA cdr structure */
|
||||
/* Created by daniel:2005-06-21 */
|
||||
/* Modify by daniel:2005-06-21 */
|
||||
/* -------------------------------- */
|
||||
|
||||
#define DMHPAR_ASWID 0
|
||||
#define DMHPAR_AUDSN 1
|
||||
#define DMHPAR_AUDSUB 2
|
||||
#define DMHPAR_BIN 6
|
||||
#define DMHPAR_BILLIND 7
|
||||
#define DMHPAR_CDDGTS 8
|
||||
#define DMHPAR_CDLOC 9
|
||||
#define DMHPAR_CGDGTS 10
|
||||
#define DMHPAR_CGLOC 11
|
||||
#define DMHPAR_CHRGAMT 12
|
||||
#define DMHPAR_CNVDUR 13
|
||||
#define DMHPAR_CNVUSG 14
|
||||
#define DMHPAR_DATE 15
|
||||
#define DMHPAR_DIALDGTS 16
|
||||
#define DMHPAR_DUR 17
|
||||
#define DMHPAR_IDSUB 18
|
||||
#define DMHPAR_LNUM 19
|
||||
#define DMHPAR_MODIND 20
|
||||
#define DMHPAR_OSWID 21
|
||||
#define DMHPAR_RLEG 22
|
||||
#define DMHPAR_SEGNUM 23
|
||||
#define DMHPAR_SSWID 24
|
||||
#define DMHPAR_SWNO 25
|
||||
#define DMHPAR_SID 26
|
||||
#define DMHPAR_TOD 27
|
||||
#define DMHPAR_TKNUM 29
|
||||
#define DMHPAR_ACTIND 32
|
||||
#define DMHPAR_AJCKT 33
|
||||
#define DMHPAR_ACTSUB 34
|
||||
#define DMHPAR_ACHDUR 37
|
||||
#define DMHPAR_ACHUSG 38
|
||||
#define DMHPAR_AIRSSUB 39
|
||||
#define DMHPAR_AUTHCNT 42
|
||||
#define DMHPAR_AUTHDEN 43
|
||||
#define DMHPAR_AUTHTYP 44
|
||||
#define DMHPAR_CJCKT 47
|
||||
#define DMHPAR_CELLID 49
|
||||
#define DMHPAR_CHRGIND 50
|
||||
#define DMHPAR_CHRGSUB 51
|
||||
#define DMHPAR_CHRGTAX 52
|
||||
#define DMHPAR_CHRGTIND 53
|
||||
#define DMHPAR_CHRGUNIT 54
|
||||
#define DMHPAR_DENACC 56
|
||||
#define DMHPAR_DESTDGTS 57
|
||||
#define DMHPAR_ESN 58
|
||||
#define DMHPAR_EVTIND 60
|
||||
#define DMHPAR_FPARM 61
|
||||
#define DMHPAR_FBDUR 62
|
||||
#define DMHPAR_FBIND 64
|
||||
#define DMHPAR_FBUSG 65
|
||||
#define DMHPAR_FEATIND 66
|
||||
#define DMHPAR_FEATOPN 67
|
||||
#define DMHPAR_FRIND 68
|
||||
#define DMHPAR_HCOORD 69
|
||||
#define DMHPAR_HSWID 70
|
||||
#define DMHPAR_IECCDUR 71
|
||||
#define DMHPAR_INCDUR 73
|
||||
#define DMHPAR_INCUSG 74
|
||||
#define DMHPAR_LLIND 78
|
||||
#define DMHPAR_LJCKT 81
|
||||
#define DMHPAR_MIN 84
|
||||
#define DMHPAR_MRPI 85
|
||||
#define DMHPAR_NPANXX 86
|
||||
#define DMHPAR_NUMACT 87
|
||||
#define DMHPAR_NUMCHRG 89
|
||||
#define DMHPAR_NUMEVT 90
|
||||
#define DMHPAR_NUMLEG 91
|
||||
#define DMHPAR_NUMSEG 93
|
||||
#define DMHPAR_OLSUB 94
|
||||
#define DMHPAR_OGTDUR 95
|
||||
#define DMHPAR_OGTUSG 96
|
||||
#define DMHPAR_PLNAM 97
|
||||
#define DMHPAR_RCHNUM 99
|
||||
#define DMHPAR_RPI 100
|
||||
#define DMHPAR_REDIND 101
|
||||
#define DMHPAR_RLSUB 102
|
||||
#define DMHPAR_RBIN 103
|
||||
#define DMHPAR_RELIND 104
|
||||
#define DMHPAR_RIN 106
|
||||
#define DMHPAR_SRT 109
|
||||
#define DMHPAR_SJCKT 110
|
||||
#define DMHPAR_SPNAM 112
|
||||
#define DMHPAR_TSSUB 113
|
||||
#define DMHPAR_TSWID 114
|
||||
#define DMHPAR_TLSUB 115
|
||||
#define DMHPAR_TDO 116
|
||||
#define DMHPAR_TTIND 117
|
||||
#define DMHPAR_VCOORD 118
|
||||
#define DMHPAR_BINR 128
|
||||
#define DMHPAR_BRI 129
|
||||
#define DMHPAR_EJCKT 142
|
||||
#define DMHPAR_EVTSUB 143
|
||||
#define DMHPAR_FALSUB 146
|
||||
#define DMHPAR_PACAIND 150
|
||||
#define DMHPAR_PACASUB 151
|
||||
#define DMHPAR_AUXLSUB 161
|
||||
#define DMHPAR_IMEI 165
|
||||
#define DMHPAR_IMSI 166
|
||||
#define DMHPAR_LATA 167
|
||||
#define DMHPAR_NUMOCT 168
|
||||
#define DMHPAR_NUMPKT 169
|
||||
#define DMHPAR_TEXIND 170
|
||||
#define DMHPAR_CHRGTCOD 171
|
||||
#define DMHPAR_CHRGTTBL 172
|
||||
#define DMHPAR_FILLIND 178
|
||||
#define DMHPAR_FILLIC 179
|
||||
#define DMHPAR_MDN 184
|
||||
#define DMHPAR_NEICLNP 186
|
||||
#define DMHPAR_NUMFAL 188
|
||||
#define DMHPAR_NUMRED 189
|
||||
#define DMHPAR_NUMORG 190
|
||||
#define DMHPAR_NUMTRM 191
|
||||
#define DMHPAR_SELUSE 193
|
||||
#define DMHPAR_SUCOD 194
|
||||
#define DMHPAR_MYTYP 196
|
||||
#define DMHPAR_NUMAUX 199
|
||||
#define DMHPAR_NEIIP 200
|
||||
#define DMHPAR_IWFDUR 202
|
||||
#define DMHPAR_RETIND 207
|
||||
#define DMHPAR_RICODE 208
|
||||
#define DMHPAR_RSEG 209
|
||||
#define DMHPAR_WCNTRY 214
|
||||
|
||||
#define EVTIND_authorizationGranted 1
|
||||
#define EVTIND_authorizationExpired 2
|
||||
#define EVTIND_authorizationDenied 3
|
||||
#define EVTIND_securityViolationReport 4
|
||||
#define EVTIND_inactive 5
|
||||
#define EVTIND_deregistration 6
|
||||
#define EVTIND_registrationCanceled 7
|
||||
#define EVTIND_profileUpdated 8
|
||||
#define EVTIND_qualificationUpdated 9
|
||||
#define EVTIND_terminationDeniedInvalid 10
|
||||
#define EVTIND_terminationDeniedUnassigned 11
|
||||
#define EVTIND_terminationDeniedInactive 12
|
||||
#define EVTIND_terminationDeniedUnregistered 13
|
||||
#define EVTIND_terminationDeniedNoPageResponse 14
|
||||
#define EVTIND_terminationDeniedBusy 15
|
||||
#define EVTIND_terminationDeniedSCA 16
|
||||
#define EVTIND_terminationDeniedDND 17
|
||||
#define EVTIND_terminationDeniedCD 18
|
||||
#define EVTIND_terminationDeniedCS 19
|
||||
#define EVTIND_terminationDeniedOther 20
|
||||
#define EVTIND_callDelivered 21
|
||||
#define EVTIND_callForwarded 22
|
||||
#define EVTIND_callForwardingNotification 23
|
||||
#define EVTIND_messageWaitingNotification 24
|
||||
#define EVTIND_originationDeniedNoTrunk 25
|
||||
#define EVTIND_originationDeniedUnrecognized 26
|
||||
#define EVTIND_originationDeniedCB 27
|
||||
#define EVTIND_originationDeniedOther 28
|
||||
#define EVTIND_unspecifiedHourlyEvent 29
|
||||
#define EVTIND_unspecifiedDailyEvent 30
|
||||
#define EVTIND_unspecifiedWeeklyEvent 31
|
||||
#define EVTIND_unspecifiedMonthlyEvent 32
|
||||
#define EVTIND_unspecifiedQuarterlyEvent 33
|
||||
#define EVTIND_unspecifiedSemi_annualEvent 34
|
||||
#define EVTIND_unspecifiedAnnualEvent 35
|
||||
#define EVTIND_featureAccessAttempted 36
|
||||
#define EVTIND_SMSMO 37
|
||||
#define EVTIND_SMSMT 38
|
||||
#define EVTIND_SMSNOT 39
|
||||
|
||||
#define ACTIND_unspecified 0
|
||||
#define ACTIND_locallyDeniedRegistration 1
|
||||
#define ACTIND_homeDeniedRegistration 2
|
||||
#define ACTIND_powerOnRegistration 3
|
||||
#define ACTIND_autonomousRegistration 4
|
||||
#define ACTIND_missedAutonomousRegistration 5
|
||||
#define ACTIND_movementRegistration 6
|
||||
#define ACTIND_movementDetected 7
|
||||
#define ACTIND_powerDownDeregistration 8
|
||||
#define ACTIND_pageResponse 0
|
||||
#define ACTIND_noPageResponse 10
|
||||
#define ACTIND_messageWaiting 11
|
||||
#define ACTIND_abbreviatedAlert 12
|
||||
#define ACTIND_alert 13
|
||||
#define ACTIND_alertWithInformation 14
|
||||
#define ACTIND_alertingAnswered 15
|
||||
#define ACTIND_pACARequest 16
|
||||
#define ACTIND_originationRequest 17
|
||||
#define ACTIND_flashRequestWithoutInformation 18
|
||||
#define ACTIND_flashRequestWithInformation 19
|
||||
#define ACTIND_callModeChanged 20
|
||||
#define ACTIND_lostRadioContact 21
|
||||
#define ACTIND_measurementRequest 22
|
||||
#define ACTIND_mAHORequest 23
|
||||
#define ACTIND_intraSystemHandoff 24
|
||||
#define ACTIND_interSystemHandoff 25
|
||||
#define ACTIND_powerControlProblem 26
|
||||
#define ACTIND_protocolError 27
|
||||
#define ACTIND_spuriousEmissions 28
|
||||
#define ACTIND_orderedRegistration 29
|
||||
#define ACTIND_trafficChannelRegistration 30
|
||||
#define ACTIND_dataBurst_ShortMessage 31
|
||||
#define ACTIND_featureNotification 32
|
||||
#define ACTIND_lock 33
|
||||
#define ACTIND_unlock 34
|
||||
#define ACTIND_maintenanceRequired 35
|
||||
#define ACTIND_intrasystemSoftHandoffBegin 36
|
||||
#define ACTIND_intersystemSoftHandoffBegin 37
|
||||
#define ACTIND_packetDataRegistrationOnly 38
|
||||
|
||||
#define FEATIND_callForwarding_Unconditional 1
|
||||
#define FEATIND_callForwarding_Busy 2
|
||||
#define FEATIND_callForwarding_NoAnswer 3
|
||||
#define FEATIND_callForwarding_Other 4
|
||||
#define FEATIND_callWaiting 5
|
||||
#define FEATIND_threeWayCalling 6
|
||||
#define FEATIND_callDelivery 7
|
||||
#define FEATIND_doNotDisturb 8
|
||||
#define FEATIND_conferenceCalling 9
|
||||
#define FEATIND_callTransfer 10
|
||||
#define FEATIND_callingNumberIdentificationRestriction 11
|
||||
#define FEATIND_selectiveCallAcceptance 12
|
||||
#define FEATIND_authorizationCode 13
|
||||
#define FEATIND_speedDialing 14
|
||||
#define FEATIND_adviceOfCharging 15
|
||||
#define FEATIND_voiceMail 16
|
||||
#define FEATIND_callForwardDefault 17
|
||||
#define FEATIND_callingNumberIdentificationPresentation 18
|
||||
#define FEATIND_flexibleAlerting 19
|
||||
#define FEATIND_messageWaitingNotification 20
|
||||
#define FEATIND_mobileAccessHunting 21
|
||||
#define FEATIND_passwordCallAcceptance 22
|
||||
#define FEATIND_preferredLanguageService 23
|
||||
#define FEATIND_priorityAccessAndChannelAssignment 24
|
||||
#define FEATIND_remoteFeatureControl 25
|
||||
#define FEATIND_subscriberPINAccess 26
|
||||
#define FEATIND_subscriberPINIntercept 27
|
||||
#define FEATIND_voicePrivacy 28
|
||||
#define FEATIND_shortMessageDeliveryPoint_ToPointBearer 29
|
||||
#define FEATIND_shortMessageDeliveryBroadcast 30
|
||||
#define FEATIND_cellularPagingTeleservice 31
|
||||
#define FEATIND_cellularMessagingTeleservice 32
|
||||
#define FEATIND_intersystemCall 33
|
||||
#define FEATIND_voiceMailDelete 34
|
||||
#define FEATIND_voiceMailSend 35
|
||||
#define FEATIND_voiceMailDeposit 36
|
||||
#define FEATIND_answerHold 37
|
||||
#define FEATIND_userSelectiveCallForwarding 38
|
||||
|
||||
#define FEATOPN_featureRegistration 1
|
||||
#define FEATOPN_featureDeregistration 2
|
||||
#define FEATOPN_featureActivation 3
|
||||
#define FEATOPN_featureDeactivation 4
|
||||
#define FEATOPN_featureInvocation 5
|
||||
#define FEATOPN_featurePerCallActivation 6
|
||||
#define FEATOPN_featurePerCallDeactivation 7
|
||||
#define FEATOPN_featureRegistrationAndActivation 8
|
||||
#define FEATOPN_featureInterrogation 9
|
||||
#define FEATOPN_featureTesting 10
|
||||
#define FEATOPN_screenListEditing 11
|
||||
|
||||
#define FRIND_timerExpiry 1
|
||||
#define FRIND_networkFailure 2
|
||||
#define FRIND_operationError 3
|
||||
#define FRIND_operationReject 4
|
||||
#define FRIND_unspecified 5
|
||||
#define FRIND_unsuccessful 6
|
||||
#define FRIND_successful 7
|
||||
|
||||
typedef struct DMH_CallLocation
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
u8 HcoordinateLen;
|
||||
u8 Hcoordinate[3];
|
||||
|
||||
u8 NPANXX[3];
|
||||
|
||||
u8 PlaceNameLen;
|
||||
u8 PlaceName[20];
|
||||
|
||||
u8 StateProvinceName[2];
|
||||
|
||||
u8 VcoordinateLen;
|
||||
u8 Vcoordinate[3];
|
||||
|
||||
u8 LocalAccessTransportAreaLen;
|
||||
u8 LocalAccessTransportArea[4];
|
||||
|
||||
u8 WorldCountry[3];
|
||||
}DMH_CallLocation;
|
||||
|
||||
typedef struct DMH_ReturnIndicator
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
u8 ReturnIndicatorCode;
|
||||
|
||||
//optional part
|
||||
struct
|
||||
{
|
||||
u8 ParameterIdentifierLen;
|
||||
u8 ParameterIdentifier[16];
|
||||
} FaultyParameter;
|
||||
|
||||
}DMH_ReturnIndicator;
|
||||
|
||||
typedef struct DMH_FillIndicator
|
||||
{
|
||||
struct
|
||||
{
|
||||
u8 ParameterIdentifierLen;
|
||||
u8 ParameterIdentifier[16];
|
||||
} FaultyParameter;
|
||||
|
||||
u8 FillIndicatorCode;
|
||||
}DMH_FillIndicator;
|
||||
|
||||
typedef struct DMH_AuditSubrecord
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
u8 audsnLen;
|
||||
u8 audsn[4];//AuditSequenceNumber
|
||||
|
||||
//optional part
|
||||
u8 achdurLen;
|
||||
u8 achdur[4];//AirChannelDuration
|
||||
u8 cnvdurLen;
|
||||
u8 cnvdur[4];//ConversationDuration
|
||||
u8 fbdurLen;
|
||||
u8 fbdur[4];//FeatureBridgeDuration
|
||||
u8 ieccdurLen;
|
||||
u8 ieccdur[4];//IECConnectDuration
|
||||
u8 incdurLen;
|
||||
u8 incdur[4];//IncomingTrunkDuration
|
||||
u8 numactLen;
|
||||
u8 numact[4];//NumberOfActivities
|
||||
u8 numchrgLen;
|
||||
u8 numchrg[4];//NumberOfCharges
|
||||
u8 numevtLen;
|
||||
u8 numevt[4];//NumberOfEvents
|
||||
u8 numlegLen;
|
||||
u8 numleg[4];//NumberOfLegs
|
||||
u8 numsegLen;
|
||||
u8 numseg[4];//NumberOfSegments
|
||||
u8 ogtdurLen;
|
||||
u8 ogtdur[4];//OutgoingTrunkDuration
|
||||
u8 numfalLen;
|
||||
u8 numfal[4];//NumberOfFeatureActivationLegs
|
||||
u8 numorgLen;
|
||||
u8 numorg[8];//NumberOfOriginationLegs
|
||||
u8 numredLen;
|
||||
u8 numred[4];//NumberOfRedirectionLegs
|
||||
u8 numtrmLen;
|
||||
u8 numtrm[4];//NumberOfTerminationLegs
|
||||
u8 numauxLen;
|
||||
u8 numaux[4];//NumberOfAuxiliaryLegs
|
||||
u8 numoctLen;
|
||||
u8 numoct[4];//NumberOfOctets
|
||||
u8 numpktLen;
|
||||
u8 numpkt[4];//NumberOfPackets
|
||||
u8 iwfdurLen;
|
||||
u8 iwfdur[4];//IWFDuration
|
||||
DMH_FillIndicator fillind;
|
||||
DMH_ReturnIndicator retind;
|
||||
}DMH_AuditSubrecord;
|
||||
|
||||
typedef struct DMH_SwitchID
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
u8 swno;//SwitchNumber
|
||||
u8 sid[2];//SystemIdentifier
|
||||
u8 bri[2];//BusinessRelationIdentifier
|
||||
u8 mytyp;//SystemMyTypeCode
|
||||
}DMH_SwitchID;
|
||||
|
||||
typedef struct DMH_IdentitySubrecord
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
u8 Date[3];
|
||||
struct
|
||||
{
|
||||
u8 ChoiceFlag;
|
||||
|
||||
u8 esn[4];
|
||||
u8 imei[5];
|
||||
} Choice1;
|
||||
|
||||
struct
|
||||
{
|
||||
u8 ChoiceFlag;
|
||||
|
||||
u8 min[5];
|
||||
u8 imsi[8];
|
||||
u8 neiclnp[19];
|
||||
u8 neiip[4];
|
||||
} Choice2;
|
||||
|
||||
u8 tdoLen;
|
||||
u8 tdo[2];//TimeDateOffset
|
||||
u8 todLen;
|
||||
u8 tod[3];//TimeOfDay
|
||||
|
||||
struct
|
||||
{
|
||||
u8 ChoiceFlag;
|
||||
|
||||
DMH_SwitchID aswid;//AnchorSWID
|
||||
DMH_SwitchID oswid;//OriginatingSWID
|
||||
DMH_SwitchID sswid;//ServingSWID
|
||||
} Choice3;
|
||||
|
||||
u8 binLen;
|
||||
u8 bin[4];//BillingIdentificationNumber
|
||||
|
||||
DMH_SwitchID hswid;//HomeSWID
|
||||
|
||||
u8 mdnLen;
|
||||
u8 mdn[8];
|
||||
DMH_FillIndicator fillind;
|
||||
DMH_ReturnIndicator retind;
|
||||
|
||||
}DMH_IdentitySubrecord;
|
||||
|
||||
typedef struct DMH_EventSubrecord
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
u8 evtind;//EventIndicator
|
||||
u8 rinLen;
|
||||
u8 rin[4];//ReportIdentificationNumber
|
||||
|
||||
//optional part
|
||||
DMH_SwitchID aswid;//AnchorSWID
|
||||
|
||||
u8 authcnt;//AuthorizationCount
|
||||
u8 authden;//AuthorizationDenied
|
||||
u8 authtyp;//AuthorizationType
|
||||
u8 binLen;
|
||||
u8 bin[4];//BillingIdentificationNumber
|
||||
u8 Date[3];
|
||||
u8 denacc;//DenyAccess
|
||||
u8 featind;//FeatureIndicator
|
||||
u8 featopn;//FeatureOperation
|
||||
u8 frind;//FeatureResultIndicator
|
||||
|
||||
DMH_SwitchID oswid;//OriginatingSWID
|
||||
|
||||
u8 rbinLen;
|
||||
u8 rbin[4];//RelatedBillingIdentificationNumber
|
||||
u8 srt;//SecurityReportType
|
||||
|
||||
DMH_SwitchID sswid;//ServingSWID
|
||||
|
||||
u8 tdoLen;
|
||||
u8 tdo[2];//TimeDateOffset
|
||||
u8 todLen;
|
||||
u8 tod[3];//TimeOfDay
|
||||
DMH_FillIndicator fillind;
|
||||
DMH_ReturnIndicator retind;
|
||||
}DMH_EventSubrecord;
|
||||
|
||||
typedef struct DMH_ChargeSubrecord
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
u8 chrgamtLen;
|
||||
u8 chrgamt[4];//ChargeAmount
|
||||
u8 chrgind;//ChargeIndicator
|
||||
|
||||
//optional part
|
||||
u8 chrgtaxLen;
|
||||
u8 chrgtax[4];//ChargeTax
|
||||
u8 chrgtind;//ChargeTaxIndicator
|
||||
u8 chrgunit;//ChargeUnits
|
||||
u8 durLen;
|
||||
u8 dur[4];//Duration
|
||||
u8 mrpi;//MultipleRatePeriodIndicator,len=0
|
||||
u8 plnamLen;
|
||||
u8 plnam[20];//PlaceName
|
||||
u8 rpi;//RatePeriodIndicator
|
||||
u8 spnam[2];//StateProvinceName
|
||||
u8 ttind;//TollTariffIndicator
|
||||
u8 wcntry[3];//WorldCountry
|
||||
|
||||
struct
|
||||
{
|
||||
u8 ChoiceFlag;
|
||||
|
||||
u8 lnum;//LegNumber
|
||||
u8 segnum;//SegmentNumber
|
||||
} Choice;
|
||||
|
||||
u8 chrgtcodLen;
|
||||
u8 chrgtcod[2];//ChargeTaxCode
|
||||
u8 chrgttbl;//ChargeTaxTable
|
||||
u8 numoctLen;
|
||||
u8 numoct[4];//NumberOfOctets
|
||||
u8 numpktLen;
|
||||
u8 numpkt[4];//NumberOfPackets
|
||||
u8 seluseLen;
|
||||
u8 seluse[100];//SelectiveUse
|
||||
u8 sucod;//SelectiveUseCode
|
||||
u8 texind;//TaxExemptIndicator
|
||||
DMH_FillIndicator fillind;
|
||||
DMH_ReturnIndicator retind;
|
||||
}DMH_ChargeSubrecord;
|
||||
|
||||
typedef struct DMH_BeginForwardPath
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
u8 cellidLen;
|
||||
u8 cellid[2];//CellIdentifier
|
||||
u8 modind;//ModulationIndicator
|
||||
u8 rchnumLen;
|
||||
u8 rchnum[2];//RadioChannelNumber
|
||||
u8 tknumLen;
|
||||
u8 tknum[2];//TrunkNumber
|
||||
|
||||
//optional part
|
||||
u8 bearind;//BearerIndicator
|
||||
u8 locidLen;
|
||||
u8 locid[2];//LocationAreaIdentifier
|
||||
u8 radattr[2];//RadioAttributes
|
||||
u8 trnsnumLen;
|
||||
u8 trnsnum[2];//TransceiverNumber
|
||||
u8 tkgrpLen;
|
||||
u8 tkgrp[2];//TrunkGroup
|
||||
|
||||
struct
|
||||
{
|
||||
u8 ChoiceFlag;
|
||||
//will add encode in the future
|
||||
|
||||
} Choice;
|
||||
|
||||
u8 cellnamLen;
|
||||
u8 cellnam[8];//CellName
|
||||
u8 tgpnamLen;
|
||||
u8 tgpnam[12];//TrunkGroupName
|
||||
u8 uzLen;
|
||||
u8 uz[3];//UserZoneNumber
|
||||
u8 bndclsLen;
|
||||
u8 bndcls[63];//BandClass
|
||||
u8 freqind;//FrequencyIndicator
|
||||
}DMH_BeginForwardPath;//BeginForwardPath
|
||||
|
||||
typedef struct DMH_EndForwardPath
|
||||
{
|
||||
u32 param_flag;
|
||||
}DMH_EndForwardPath;//BeginForwardPath
|
||||
|
||||
typedef struct DMH_ActivitySubrecord
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
u8 actind;//ActivityIndicator
|
||||
u8 rinLen;
|
||||
u8 rin[4];//ReportIdentificationNumber
|
||||
|
||||
//optional part
|
||||
u8 authden;//AuthorizationDenied
|
||||
|
||||
DMH_BeginForwardPath bfpath;
|
||||
u8 binLen;
|
||||
u8 bin[4];//BillingIdentificationNumber
|
||||
u8 Date[3];
|
||||
u8 denacc;//DenyAccess
|
||||
u8 srt;//SecurityReportType
|
||||
|
||||
DMH_SwitchID sswid;//ServingSWID
|
||||
|
||||
u8 tdoLen;
|
||||
u8 tdo[2];//TimeDateOffset
|
||||
u8 todLen;
|
||||
u8 tod[3];//TimeOfDay
|
||||
DMH_FillIndicator fillind;
|
||||
u8 rsegLen;
|
||||
u8 rseg[3];//RelatedSegmentNumber
|
||||
DMH_ReturnIndicator retind;
|
||||
}DMH_ActivitySubrecord;
|
||||
|
||||
typedef struct DMH_FeatureBridgeUsage
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
u8 fbind; //FeatureBridgeIndicator
|
||||
u8 durLen;
|
||||
u8 dur[4];//Duration
|
||||
u8 rlegLen;
|
||||
u8 rleg[3];//RelatedLegNumber
|
||||
u8 todLen;
|
||||
u8 tod[3];//TimeOfDay
|
||||
|
||||
}DMH_FeatureBridgeUsage;
|
||||
|
||||
typedef struct DMH_IncomingTrunkUsage
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
u8 durLen;
|
||||
u8 dur[4];//Duration
|
||||
u8 todLen;
|
||||
u8 tod[3];//TimeOfDay
|
||||
u8 tknumLen;
|
||||
u8 tknum[2];//TrunkNumber
|
||||
|
||||
u8 cardgts[2];//CarrierDigits
|
||||
u8 Date[3];
|
||||
u8 relind;//ReleaseIndicator
|
||||
u8 tdoLen;
|
||||
u8 tdo[2];//TimeDateOffset
|
||||
u8 tkgrpLen;
|
||||
u8 tkgrp[2];//TrunkGroup
|
||||
u8 tgpnamLen;
|
||||
u8 tgpnam[12];//TrunkGroupName
|
||||
}DMH_IncomingTrunkUsage;
|
||||
|
||||
typedef struct DMH_OutgoingTrunkUsage
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
u8 durLen;
|
||||
u8 dur[4];//Duration
|
||||
u8 todLen;
|
||||
u8 tod[3];//TimeOfDay
|
||||
u8 tknumLen;
|
||||
u8 tknum[2];//TrunkNumber
|
||||
|
||||
u8 cardgts[2];//CarrierDigits
|
||||
u8 Date[3];
|
||||
u8 relind;//ReleaseIndicator
|
||||
u8 tdoLen;
|
||||
u8 tdo[2];//TimeDateOffset
|
||||
u8 tkgrpLen;
|
||||
u8 tkgrp[2];//TrunkGroup
|
||||
u8 tgpnamLen;
|
||||
u8 tgpnam[12];//TrunkGroupName
|
||||
}DMH_OutgoingTrunkUsage;
|
||||
|
||||
typedef struct DMH_AirChannelUsage
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
DMH_BeginForwardPath bfpath;
|
||||
u8 durLen;
|
||||
u8 dur[4];//Duration
|
||||
u8 todLen;
|
||||
u8 tod[3];//TimeOfDay
|
||||
u8 Date[3];
|
||||
|
||||
//optional part
|
||||
DMH_EndForwardPath efpath;
|
||||
u8 relind;//ReleaseIndicator
|
||||
u8 tdoLen;
|
||||
u8 tdo[2];//TimeDateOffset
|
||||
}DMH_AirChannelUsage;
|
||||
|
||||
typedef struct DMH_AirSegmentSubrecord
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
DMH_AirChannelUsage achusg;//AirChannelUsage
|
||||
u8 segnum;//SegmentNumber
|
||||
|
||||
//optional part
|
||||
struct
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
u8 latLen;
|
||||
u8 lat[3];//Latitude
|
||||
u8 LONGLen;
|
||||
u8 LONG[3];//Longitude
|
||||
u8 resolLen;
|
||||
u8 resol[3];//Resolution
|
||||
}begloc;//BeginLocation
|
||||
DMH_IncomingTrunkUsage incusg;//IncomingTrunkUsage
|
||||
u8 lsind;//LastSegmentIndicator,len=0
|
||||
DMH_SwitchID sswid;//ServingSWID
|
||||
u8 cgblind;//ChargeableIndicator
|
||||
DMH_FillIndicator fillind;
|
||||
DMH_ReturnIndicator retind;
|
||||
|
||||
}DMH_AirSegmentSubrecord;
|
||||
|
||||
typedef struct DMH_FeatureActivationLegSubrecord
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
u8 dialdgtsLen;
|
||||
u8 dialdgts[32];//DialedDigits
|
||||
u8 lnum;//LegNumber
|
||||
|
||||
//optional part will be encoded in the future
|
||||
u8 frind;//FeatureResultIndicator, BIT13
|
||||
u8 llind;//LastLegIndicator, BIT15
|
||||
}DMH_FeatureActivationLegSubrecord;
|
||||
|
||||
typedef struct DMH_ConversationUsage
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
u8 durLen;
|
||||
u8 dur[4];//Duration
|
||||
u8 todLen;
|
||||
u8 tod[3];//TimeOfDay
|
||||
|
||||
//optional part
|
||||
u8 Date[3];
|
||||
u8 relind;//ReleaseIndicator
|
||||
u8 tdoLen;
|
||||
u8 tdo[2];//TimeDateOffset
|
||||
u8 numoctLen;
|
||||
u8 numoct[4];//NumberOfOctets
|
||||
u8 numpktLen;
|
||||
u8 numpkt[4];//NumberOfPackets
|
||||
}DMH_ConversationUsage;
|
||||
|
||||
typedef struct DMH_OriginationLegSubrecord
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
u8 billind;//BillingIndicator
|
||||
u8 dialdgtsLen;
|
||||
u8 dialdgts[32];//DialedDigits
|
||||
u8 lnum;//LegNumber
|
||||
|
||||
DMH_CallLocation CalledLocation;//BIT8
|
||||
|
||||
DMH_CallLocation CallingLocation;//BIT11
|
||||
|
||||
DMH_ConversationUsage cnvusg;//ConversationUsage,BIT14
|
||||
DMH_FeatureBridgeUsage fbusg;//FeatureBridgeUsage,BIT16
|
||||
u8 llind;//LastLegIndicator,len=0,BIT19
|
||||
DMH_OutgoingTrunkUsage ogtusg;//OutgoingTrunkUsage.BIT20
|
||||
|
||||
}DMH_OriginationLegSubrecord;
|
||||
|
||||
typedef struct DMH_PACASegmentSubrecord
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
u8 cellidLen;
|
||||
u8 cellid[2];//CellIdentifier
|
||||
u8 durLen;
|
||||
u8 dur[4];//Duration
|
||||
u8 pacaind;//PACAIndicator
|
||||
u8 segnum;//SegmentNumber
|
||||
}DMH_PACASegmentSubrecord;
|
||||
|
||||
typedef struct DMH_RedirectionLegSubrecord
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
u8 billind;//BillingIndicator
|
||||
u8 cddgtsLen;
|
||||
u8 cddgts[9];//CalledDigits
|
||||
DMH_IncomingTrunkUsage incusg;//IncomingTrunkUsage
|
||||
u8 lnum;//LegNumber
|
||||
u8 redind;//RedirectionIndicator
|
||||
|
||||
//optional part
|
||||
DMH_CallLocation CalledLocation;//BIT6
|
||||
|
||||
u8 cgdgtsLen;
|
||||
u8 cgdgts[9];//CallingDigits, BIT8
|
||||
|
||||
DMH_CallLocation CallingLocation;//BIT9
|
||||
|
||||
DMH_ConversationUsage cnvusg;//ConversationUsage,BIT12
|
||||
u8 destdgtsLen;
|
||||
u8 destdgts[32];//DestinationDigits,BIT13
|
||||
u8 llind;//LastLegIndicator,len=0,BIT18
|
||||
DMH_OutgoingTrunkUsage ogtusg;//OutgoingTrunkUsage.BIT19
|
||||
|
||||
}DMH_RedirectionLegSubrecord;
|
||||
|
||||
typedef struct DMH_TandemSegmentSubrecord
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
DMH_OutgoingTrunkUsage ogtusg;//OutgoingTrunkUsage
|
||||
u8 segnum;//SegmentNumber
|
||||
DMH_SwitchID tswid;//ServingSWID
|
||||
|
||||
//optional part will be added in the future
|
||||
}DMH_TandemSegmentSubrecord;
|
||||
|
||||
typedef struct DMH_TerminationLegSubrecord
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
u8 billind;//BillingIndicator
|
||||
u8 lnum;//LegNumber
|
||||
|
||||
//optional part
|
||||
DMH_CallLocation CalledLocation;//BIT6
|
||||
|
||||
u8 cgdgtsLen;
|
||||
u8 cgdgts[9];//CallingDigits,BIT9
|
||||
|
||||
DMH_CallLocation CallingLocation;//BIT10
|
||||
|
||||
DMH_ConversationUsage cnvusg;//ConversationUsage,BIT13
|
||||
DMH_FeatureBridgeUsage fbusg;//FeatureBridgeUsage,BIT16
|
||||
DMH_IncomingTrunkUsage incusg;//IncomingTrunkUsage,BIT17
|
||||
u8 llind;//LastLegIndicator,len=0,BIT19
|
||||
|
||||
}DMH_TerminationLegSubrecord;
|
||||
|
||||
typedef struct DMH_AuxiliaryLegSubrecord
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
u8 billind;//BillingIndicator
|
||||
u8 lnum;//LegNumber
|
||||
}DMH_AuxiliaryLegSubrecord;
|
||||
|
||||
typedef struct DMH_EventJacket
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
DMH_AuditSubrecord audsub;
|
||||
DMH_IdentitySubrecord idsub;
|
||||
DMH_EventSubrecord evtsub;
|
||||
DMH_ChargeSubrecord chrgsub;
|
||||
}DMH_EventJacket;
|
||||
|
||||
typedef struct DMH_ActivityJacket
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
DMH_AuditSubrecord audsub;
|
||||
DMH_IdentitySubrecord idsub;
|
||||
DMH_ActivitySubrecord actsub;
|
||||
DMH_ChargeSubrecord chrgsub;
|
||||
}DMH_ActivityJacket;
|
||||
|
||||
typedef struct DMH_CallJacket
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
DMH_AuditSubrecord audsub;
|
||||
DMH_IdentitySubrecord idsub;
|
||||
|
||||
DMH_ActivitySubrecord actsub;
|
||||
DMH_AirSegmentSubrecord airssub;
|
||||
DMH_ChargeSubrecord chrgsub;
|
||||
DMH_FeatureActivationLegSubrecord falsub;
|
||||
DMH_OriginationLegSubrecord olsub;
|
||||
DMH_PACASegmentSubrecord pacasub;
|
||||
DMH_RedirectionLegSubrecord rlsub;
|
||||
DMH_TandemSegmentSubrecord tssub;
|
||||
DMH_TerminationLegSubrecord tlsub;
|
||||
DMH_AuxiliaryLegSubrecord auxlsub;
|
||||
}DMH_CallJacket;
|
||||
|
||||
typedef struct DMH_LegJacket
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
DMH_IdentitySubrecord idsub;
|
||||
|
||||
DMH_ChargeSubrecord chrgsub;
|
||||
DMH_FeatureActivationLegSubrecord falsub;
|
||||
DMH_OriginationLegSubrecord olsub;
|
||||
DMH_RedirectionLegSubrecord rlsub;
|
||||
DMH_TerminationLegSubrecord tlsub;
|
||||
DMH_AuxiliaryLegSubrecord auxlsub;
|
||||
}DMH_LegJacket;
|
||||
|
||||
typedef struct DMH_SegmentJacket
|
||||
{
|
||||
u32 param_flag;
|
||||
|
||||
DMH_IdentitySubrecord idsub;
|
||||
|
||||
DMH_ActivitySubrecord actsub;
|
||||
DMH_AirSegmentSubrecord airssub;
|
||||
DMH_ChargeSubrecord chrgsub;
|
||||
DMH_PACASegmentSubrecord pacasub;
|
||||
DMH_TandemSegmentSubrecord tssub;
|
||||
}DMH_SegmentJacket;
|
||||
|
||||
|
||||
|
||||
int assign_DMHEventJacket(DMH_EventJacket *ptr,u8 *buf);
|
||||
int assign_DMH_ActivityJacket(DMH_ActivityJacket *ptr,u8 *buf);
|
||||
int assign_DMH_CallJacket(DMH_CallJacket *ptr,u8 *buf);
|
||||
int assign_DMH_LegJacket(DMH_LegJacket *ptr,u8 *buf);
|
||||
int assign_DMH_SegmentJacket(DMH_SegmentJacket *ptr,u8 *buf);
|
||||
void encode_DMH_date(u8 *date);
|
||||
u8 encode_DMH_TimeDateOffset(u8 *TimeDateOffset);
|
||||
u8 encode_DMH_TimeOfDay(u8 *TimeOfDay);
|
||||
|
||||
930
plat/xapp/src/xap_interface.c
Normal file
930
plat/xapp/src/xap_interface.c
Normal file
@@ -0,0 +1,930 @@
|
||||
/* XAP provider interface c file */
|
||||
/* Written by Liu Zhiguo 2003-08-26 */
|
||||
/* Version 1.0 */
|
||||
/* -------------------------------- */
|
||||
|
||||
#include "../../public/src/include/public.h"
|
||||
#include "../../public/src/include/license_id.h"
|
||||
#include "../../tcap/src/include/itcap.h"
|
||||
#include "../../tcap/src/include/idmanage.h"
|
||||
#include "xap_provider.h"
|
||||
#include "xap_monitor.h"
|
||||
#include "mapp/map_public.h"
|
||||
#include "capp/cap_public.h"
|
||||
|
||||
int xap_mscid_to_num ( u8 * mscid, u8 ssn, u8 * num )
|
||||
{
|
||||
int i;
|
||||
|
||||
for ( i = 0; i < 256; i++ )
|
||||
{
|
||||
if( ( memcmp ( mscid, xap_inter_ptr->mscidToNum[i], 3 ) == 0 ) && ( xap_inter_ptr->mscidToNum[i][3] == ssn ) )
|
||||
{
|
||||
memcpy ( num, xap_inter_ptr->mscidToNum[4], 10 );
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void xap_get_mcc ( u8 * mcc )
|
||||
{
|
||||
memcpy ( mcc, xap_inter_ptr->mcc, 2 );
|
||||
}
|
||||
|
||||
void xap_get_mnc ( u8 * mnc )
|
||||
{
|
||||
memcpy ( mnc, &xap_inter_ptr->mnc, 2 );
|
||||
}
|
||||
|
||||
void xap_get_cc ( u8 * cc )
|
||||
{
|
||||
memcpy ( cc, xap_inter_ptr->cc, 2 );
|
||||
}
|
||||
|
||||
void xap_get_ndc ( u8 * ndc )
|
||||
{
|
||||
memcpy ( ndc, xap_inter_ptr->ndc, 3 );
|
||||
}
|
||||
|
||||
void xap_get_interprefix ( u8 * inter_prefix )
|
||||
{
|
||||
memcpy ( inter_prefix, xap_inter_ptr->inter_prefix, 2 );
|
||||
}
|
||||
|
||||
void xap_get_nationalprefix ( u8 * national_prefix )
|
||||
{
|
||||
memcpy ( national_prefix, xap_inter_ptr->national_prefix, 2 );
|
||||
}
|
||||
|
||||
void xap_get_localprefix ( u8 * local_prefix )
|
||||
{
|
||||
memcpy ( local_prefix, xap_inter_ptr->local_prefix, 2 );
|
||||
}
|
||||
|
||||
int imap_reg_ssn ( u8 ssn )
|
||||
{
|
||||
u8 ii, jj;
|
||||
|
||||
ii = xap_inter_ptr->regssn_len;
|
||||
if( ii >= MAX_XAP_SSN )
|
||||
{
|
||||
xap_send_error ( "Can not register ssn in map provider" );
|
||||
return -1;
|
||||
}
|
||||
for ( jj = 0; jj < ii; jj++ )
|
||||
{
|
||||
if( xap_inter_ptr->reg_ssn[jj] == ssn )
|
||||
{
|
||||
xap_send_error ( "ssn has registered in map provider" );
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
xap_inter_ptr->reg_ssn[ii] = ssn;
|
||||
xap_inter_ptr->regssn_flag[ii] = XAP_MAP_SSN;
|
||||
xap_inter_ptr->regssn_len++;
|
||||
return itcap_reg_ssn ( ssn );
|
||||
}
|
||||
|
||||
u8 map_check_sendcom ( u32 did )
|
||||
{
|
||||
struct xapp_vm_data *vm_ptr;
|
||||
|
||||
if( did >= ( xap_vm_ptr->grantdid ) )
|
||||
return 0;
|
||||
vm_ptr = ( xapp_vm_data * ) & xap_vm_ptr->xap_data[did];
|
||||
if( vm_ptr->recvcom_flag == 0 )
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 map_send_comdata_struct ( MapComSrv_struct * map_com ) // send map common service data
|
||||
{
|
||||
u32 temp_did;
|
||||
struct xapp_vm_data *vm_ptr;
|
||||
struct psmvm_data *psm_ptr;
|
||||
|
||||
if( xap_vm_ptr->debug_data.send_control )
|
||||
{
|
||||
u8 data_flow[512];
|
||||
|
||||
map_com_stof ( map_com, data_flow, 1 );
|
||||
xap_send_error ( "[%d]Sending Com:%d in Structure", map_com->dialogue_id, map_com->message_type );
|
||||
xap_msg_display ( data_flow );
|
||||
}
|
||||
|
||||
temp_did = map_com->dialogue_id;
|
||||
if( temp_did >= ( xap_vm_ptr->grantdid ) )
|
||||
{
|
||||
xap_send_error ( "[%d]Com:%d sending did error", temp_did, map_com->message_type );
|
||||
return 0;
|
||||
}
|
||||
vm_ptr = ( xapp_vm_data * ) & xap_vm_ptr->xap_data[temp_did];
|
||||
if( ( vm_ptr->recvcom_flag == 1 ) && ( map_com->message_type != MAP_U_ABORT ) ) /* daniel change on 2005-4-29 */
|
||||
{
|
||||
xap_send_error ( "[%d]Com:%d sending without permit", temp_did, map_com->message_type );
|
||||
return 0;
|
||||
}
|
||||
psm_ptr = ( psmvm_data * ) & vm_ptr->psm_data;
|
||||
// if (result == 2 || map_com->message_type == MAP_DELIMITER)
|
||||
psm_ptr->delimiter_flag = 1;
|
||||
if( map_com->message_type != MAP_DELIMITER )
|
||||
{
|
||||
memcpy ( &vm_ptr->recvcom_data, map_com, sizeof ( MapComSrv_struct ) );
|
||||
psm_ptr->msg_type = map_com->message_type;
|
||||
psm_ptr->msg_flag = map_com->message_flag;
|
||||
vm_ptr->recvcom_flag = 1;
|
||||
xap_watch_dog(27);
|
||||
}
|
||||
xap_watch_dog(25);
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 map_send_comdata ( u8 * data_flow ) // send map common service data
|
||||
{
|
||||
u8 result;
|
||||
u32 temp_did;
|
||||
struct xapp_vm_data *vm_ptr;
|
||||
struct psmvm_data *psm_ptr;
|
||||
struct MapComSrv_struct map_com;
|
||||
|
||||
xap_msg_display ( data_flow );
|
||||
if( ( result = map_com_ftos ( &map_com, data_flow ) ) == 0 )
|
||||
{
|
||||
xap_send_error ( "[%d]Com:%d sending translate error", map_com.dialogue_id, map_com.message_type );
|
||||
return 0;
|
||||
}
|
||||
temp_did = map_com.dialogue_id;
|
||||
if( temp_did >= ( xap_vm_ptr->grantdid ) )
|
||||
{
|
||||
xap_send_error ( "[%d]Com:%d sending did error", temp_did, map_com.message_type );
|
||||
return 0;
|
||||
}
|
||||
vm_ptr = ( xapp_vm_data * ) & xap_vm_ptr->xap_data[temp_did];
|
||||
if( ( vm_ptr->recvcom_flag == 1 ) && ( map_com.message_type != MAP_U_ABORT ) ) /* daniel change on 2005-4-29 */
|
||||
{
|
||||
xap_send_error ( "[%d]Com:%d sending without permit", temp_did, map_com.message_type );
|
||||
return 0;
|
||||
}
|
||||
psm_ptr = ( psmvm_data * ) & vm_ptr->psm_data;
|
||||
if( result == 2 || map_com.message_type == MAP_DELIMITER )
|
||||
{
|
||||
if (result == 2)
|
||||
xap_watch_dog(64);
|
||||
else
|
||||
xap_watch_dog(65);
|
||||
psm_ptr->delimiter_flag = 1;
|
||||
}
|
||||
if( map_com.message_type != MAP_DELIMITER )
|
||||
{
|
||||
memcpy ( &vm_ptr->recvcom_data, &map_com, sizeof ( MapComSrv_struct ) );
|
||||
psm_ptr->msg_type = map_com.message_type;
|
||||
psm_ptr->msg_flag = map_com.message_flag;
|
||||
vm_ptr->recvcom_flag = 1;
|
||||
xap_watch_dog(28);
|
||||
}
|
||||
xap_watch_dog(25);
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 map_check_sendopr ( u32 did )
|
||||
{
|
||||
struct xapp_vm_data *vm_ptr;
|
||||
|
||||
if( did >= ( xap_vm_ptr->grantdid ) )
|
||||
return 0;
|
||||
vm_ptr = ( xapp_vm_data * ) & xap_vm_ptr->xap_data[did];
|
||||
if( vm_ptr->recvopr_flag == 1 )
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 map_send_oprdata ( u8 * data_flow ) // send map operation service data
|
||||
{
|
||||
u8 result;
|
||||
u32 temp_did;
|
||||
struct xapp_vm_data *vm_ptr;
|
||||
struct MapOprData_struct map_opr;
|
||||
|
||||
//xap_msg_display ( data_flow );
|
||||
if( ( result = map_opr_ftos ( &map_opr, data_flow ) ) == 0 )
|
||||
{
|
||||
xap_send_error ( "[%d]Opr:%d sending translate error", map_opr.dialogue_id, map_opr.message_type );
|
||||
return 0;
|
||||
}
|
||||
temp_did = map_opr.dialogue_id;
|
||||
if( temp_did >= ( xap_vm_ptr->grantdid ) )
|
||||
{
|
||||
xap_send_error ( "[%d]Opr:%d sending did error", temp_did, map_opr.message_type );
|
||||
return 0;
|
||||
}
|
||||
vm_ptr = ( xapp_vm_data * ) & xap_vm_ptr->xap_data[temp_did];
|
||||
if( vm_ptr->recvopr_flag == 1 )
|
||||
{
|
||||
xap_send_error ( "[%d]Opr:%d sending without permit", temp_did, map_opr.message_type );
|
||||
return 0;
|
||||
}
|
||||
xap_msg_display ( data_flow );
|
||||
memcpy ( &vm_ptr->recvopr_data, &map_opr, sizeof ( MapOprData_struct ) );
|
||||
if( result == 2 )
|
||||
{
|
||||
vm_ptr->psm_data.delimiter_flag = 1;
|
||||
xap_watch_dog(68);
|
||||
}
|
||||
vm_ptr->recvopr_flag = 1;
|
||||
xap_watch_dog(45);
|
||||
xap_watch_dog(47);
|
||||
if(map_opr.message_type == SndRoutInfo)
|
||||
{
|
||||
if(map_opr.message_flag == 1)
|
||||
{
|
||||
xap_watch_dog(16);
|
||||
}
|
||||
else
|
||||
{
|
||||
xap_watch_dog(17);
|
||||
}
|
||||
}
|
||||
else if(map_opr.message_type == ProvRoamNum)
|
||||
{
|
||||
if(map_opr.message_flag == 1)
|
||||
{
|
||||
xap_watch_dog(20);
|
||||
}
|
||||
else
|
||||
{
|
||||
xap_watch_dog(21);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 map_send_oprdata_struct ( MapOprData_struct * map_opr ) // send map operation service data
|
||||
{
|
||||
u32 temp_did;
|
||||
struct xapp_vm_data *vm_ptr;
|
||||
|
||||
// struct MapOprData_struct map_opr;
|
||||
|
||||
temp_did = map_opr->dialogue_id;
|
||||
if( temp_did >= ( xap_vm_ptr->grantdid ) )
|
||||
{
|
||||
xap_send_error ( "[%d]Opr:%d sending did error", temp_did, map_opr->message_type );
|
||||
return 0;
|
||||
}
|
||||
vm_ptr = ( xapp_vm_data * ) & xap_vm_ptr->xap_data[temp_did];
|
||||
|
||||
if( xap_vm_ptr->debug_data.send_control )
|
||||
{
|
||||
u8 data_flow[512];
|
||||
|
||||
map_opr_stof ( map_opr, data_flow, 1 );
|
||||
xap_send_error ( "[%d]Sending Opr:%d in Structure ", map_opr->dialogue_id, map_opr->message_type );
|
||||
xap_msg_display ( data_flow );
|
||||
}
|
||||
if( vm_ptr->recvopr_flag == 1 )
|
||||
{
|
||||
xap_send_error ( "[%d]Opr:%d sending without permit", temp_did, map_opr->message_type );
|
||||
return 0;
|
||||
}
|
||||
memcpy ( &vm_ptr->recvopr_data, map_opr, sizeof ( MapOprData_struct ) );
|
||||
// if (result == 2)
|
||||
vm_ptr->psm_data.delimiter_flag = 1;
|
||||
vm_ptr->recvopr_flag = 1;
|
||||
xap_watch_dog(45);
|
||||
xap_watch_dog(48);
|
||||
if(map_opr->message_type == SndRoutInfo)
|
||||
{
|
||||
if(map_opr->message_flag == 1)
|
||||
{
|
||||
xap_watch_dog(16);
|
||||
}
|
||||
else
|
||||
{
|
||||
xap_watch_dog(17);
|
||||
}
|
||||
}
|
||||
else if(map_opr->message_type == ProvRoamNum)
|
||||
{
|
||||
if(map_opr->message_flag == 1)
|
||||
{
|
||||
xap_watch_dog(20);
|
||||
}
|
||||
else
|
||||
{
|
||||
xap_watch_dog(21);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 map_get_comdata ( u8 * data_flow, u32 did )
|
||||
{
|
||||
struct xapp_vm_data *vm_ptr;
|
||||
struct psmvm_data *psm_ptr;
|
||||
|
||||
vm_ptr = ( xapp_vm_data * ) & xap_vm_ptr->xap_data[did];
|
||||
if( vm_ptr->sendcom_flag == 0 )
|
||||
return 0;
|
||||
psm_ptr = ( psmvm_data * ) & vm_ptr->psm_data;
|
||||
map_com_stof ( &vm_ptr->sendcom_data, data_flow, 0 );
|
||||
vm_ptr->sendcom_flag = 0;
|
||||
xap_watch_dog(6);
|
||||
xap_watch_dog(7);
|
||||
xap_msg_display ( data_flow );
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 map_get_comdata_struct ( MapComSrv_struct * map_com, u32 did )
|
||||
{
|
||||
struct xapp_vm_data *vm_ptr;
|
||||
struct psmvm_data *psm_ptr;
|
||||
|
||||
vm_ptr = ( xapp_vm_data * ) & xap_vm_ptr->xap_data[did];
|
||||
if( vm_ptr->sendcom_flag == 0 )
|
||||
return 0;
|
||||
psm_ptr = ( psmvm_data * ) & vm_ptr->psm_data;
|
||||
memcpy ( map_com, &vm_ptr->sendcom_data, sizeof ( struct MapComSrv_struct ) );
|
||||
if( xap_vm_ptr->debug_data.send_control )
|
||||
{
|
||||
u8 data_flow[512];
|
||||
|
||||
map_com_stof ( map_com, data_flow, 0 );
|
||||
xap_msg_display ( data_flow );
|
||||
}
|
||||
vm_ptr->sendcom_flag = 0;
|
||||
xap_watch_dog(6);
|
||||
xap_watch_dog(8);
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 map_get_open ( u8 * data_flow, u8 ssn )
|
||||
{
|
||||
u8 aa;
|
||||
u8 ii;
|
||||
u8 flag = 0;
|
||||
u32 temp_did;
|
||||
|
||||
for ( aa = 0; aa < xap_inter_ptr->regssn_len; aa++ )
|
||||
{
|
||||
if( xap_inter_ptr->reg_ssn[aa] == ssn ) // find ssn
|
||||
{
|
||||
flag = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( flag == 0 )
|
||||
{
|
||||
xap_send_error ( "SSN--%d is not registerd", ssn );
|
||||
return 0;
|
||||
}
|
||||
ii = xap_inter_ptr->open_tail[aa];
|
||||
if( xap_inter_ptr->open_head[aa] == ii ) // empty
|
||||
return 0;
|
||||
temp_did = xap_inter_ptr->open_did[aa][ii];
|
||||
xap_inter_ptr->open_tail[aa] = ( ii + 1 ) % XAP_OPEN_LEN;
|
||||
if( !map_get_comdata ( data_flow, temp_did ) )
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 map_get_open_struct ( MapComSrv_struct * map_com, u8 ssn )
|
||||
{
|
||||
u8 aa;
|
||||
u8 ii;
|
||||
u8 flag = 0;
|
||||
u32 temp_did;
|
||||
|
||||
for ( aa = 0; aa < xap_inter_ptr->regssn_len; aa++ )
|
||||
{
|
||||
if( xap_inter_ptr->reg_ssn[aa] == ssn ) // find ssn
|
||||
{
|
||||
flag = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( flag == 0 )
|
||||
{
|
||||
xap_send_error ( "SSN--%d is not registerd", ssn );
|
||||
return 0;
|
||||
}
|
||||
ii = xap_inter_ptr->open_tail[aa];
|
||||
if( xap_inter_ptr->open_head[aa] == ii ) // empty
|
||||
return 0;
|
||||
temp_did = xap_inter_ptr->open_did[aa][ii];
|
||||
xap_inter_ptr->open_tail[aa] = ( ii + 1 ) % XAP_OPEN_LEN;
|
||||
if( !map_get_comdata_struct ( map_com, temp_did ) )
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 map_get_oprdata ( u8 * data_flow, u32 did )
|
||||
{
|
||||
struct xapp_vm_data *vm_ptr;
|
||||
struct psmvm_data *psm_ptr;
|
||||
|
||||
if( did >= ( xap_vm_ptr->grantdid ) )
|
||||
return 0;
|
||||
vm_ptr = ( xapp_vm_data * ) & xap_vm_ptr->xap_data[did];
|
||||
if( vm_ptr->sendopr_flag != 1 )
|
||||
return 0;
|
||||
psm_ptr = ( psmvm_data * ) & vm_ptr->psm_data;
|
||||
map_opr_stof ( &vm_ptr->sendopr_data, data_flow, 0 );
|
||||
vm_ptr->sendopr_flag = 0;
|
||||
xap_watch_dog(11);
|
||||
xap_msg_display ( data_flow );
|
||||
|
||||
if(vm_ptr->sendopr_data.message_type == SndRoutInfo)
|
||||
{
|
||||
if(vm_ptr->sendopr_data.message_flag == 2)
|
||||
{
|
||||
xap_watch_dog(18);
|
||||
}
|
||||
else
|
||||
{
|
||||
xap_watch_dog(19);
|
||||
}
|
||||
}
|
||||
else if(vm_ptr->sendopr_data.message_type == ProvRoamNum)
|
||||
{
|
||||
if(vm_ptr->sendopr_data.message_flag == 2)
|
||||
{
|
||||
xap_watch_dog(22);
|
||||
}
|
||||
else
|
||||
{
|
||||
xap_watch_dog(23);
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 map_get_oprdata_struct ( MapOprData_struct * map_opr, u32 did )
|
||||
{
|
||||
struct xapp_vm_data *vm_ptr;
|
||||
struct psmvm_data *psm_ptr;
|
||||
|
||||
if( did >= ( xap_vm_ptr->grantdid ) )
|
||||
return 0;
|
||||
vm_ptr = ( xapp_vm_data * ) & xap_vm_ptr->xap_data[did];
|
||||
if( vm_ptr->sendopr_flag != 1 )
|
||||
return 0;
|
||||
psm_ptr = ( psmvm_data * ) & vm_ptr->psm_data;
|
||||
|
||||
memcpy ( map_opr, &vm_ptr->sendopr_data, sizeof ( struct MapOprData_struct ) );
|
||||
if( xap_vm_ptr->debug_data.send_control )
|
||||
{
|
||||
u8 data_flow[512];
|
||||
|
||||
map_opr_stof ( map_opr, data_flow, 0 );
|
||||
xap_msg_display ( data_flow );
|
||||
}
|
||||
vm_ptr->sendopr_flag = 0;
|
||||
xap_watch_dog(11);
|
||||
if(vm_ptr->sendopr_data.message_type == SndRoutInfo)
|
||||
{
|
||||
if(vm_ptr->sendopr_data.message_flag == 2)
|
||||
{
|
||||
xap_watch_dog(18);
|
||||
}
|
||||
else
|
||||
{
|
||||
xap_watch_dog(19);
|
||||
}
|
||||
}
|
||||
else if(vm_ptr->sendopr_data.message_type == ProvRoamNum)
|
||||
{
|
||||
if(vm_ptr->sendopr_data.message_flag == 2)
|
||||
{
|
||||
xap_watch_dog(22);
|
||||
}
|
||||
else
|
||||
{
|
||||
xap_watch_dog(23);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int map_get_oprType ( u32 did )
|
||||
{
|
||||
struct xapp_vm_data *vm_ptr;
|
||||
|
||||
if( did >= ( xap_vm_ptr->grantdid ) )
|
||||
return 0;
|
||||
vm_ptr = ( xapp_vm_data * ) & xap_vm_ptr->xap_data[did];
|
||||
if( vm_ptr->psm_data.psm_state == XAP_IDLE )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if( ( vm_ptr->sendopr_data.message_type != 0 ) && ( vm_ptr->sendopr_flag != 0 ) )
|
||||
{
|
||||
return vm_ptr->sendopr_data.message_type;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 map_get_dialogueid ( u8 ssn )
|
||||
{
|
||||
u32 did;
|
||||
|
||||
if( ( did = assign_did ( ) ) == 0 )
|
||||
{
|
||||
xap_send_error ( "Fail to get did(Map)" );
|
||||
return 0;
|
||||
}
|
||||
xap_vm_ptr->xap_data[did].psm_data.xap_flag = XAP_MAP_SSN;
|
||||
xap_watch_dog(55);
|
||||
return did;
|
||||
}
|
||||
|
||||
#if _SUPPORT_ANSI
|
||||
u32 is41_get_dialogueid ( u8 ssn )
|
||||
{
|
||||
u32 did;
|
||||
|
||||
if( ( did = assign_did ( ) ) == 0 )
|
||||
{
|
||||
xap_send_error ( "IS41 Fail to get did(Map)" );
|
||||
return 0;
|
||||
}
|
||||
xap_vm_ptr->xap_data[did].psm_data.xap_flag = XAP_IS41_SSN;
|
||||
xap_watch_dog(56);
|
||||
return did;
|
||||
}
|
||||
#endif
|
||||
|
||||
u8 map_get_invokeid ( u32 did )
|
||||
{
|
||||
return assign_iid ( did );
|
||||
}
|
||||
|
||||
#if _SUPPORT_ANSI
|
||||
u8 map_check_map_flag ( u32 did )
|
||||
{
|
||||
if( did >= ( xap_vm_ptr->grantdid ) )
|
||||
return 0;
|
||||
if( xap_vm_ptr->xap_data[did].psm_data.xap_flag == XAP_IS41_SSN )
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
int icap_reg_ssn ( u8 ssn )
|
||||
{
|
||||
u8 ii, jj;
|
||||
if(wxc2_get_license(LIC_CAP)<=0)
|
||||
{
|
||||
xap_send_error ( "Can not register ssn in cap provider:no license" );
|
||||
return -1;
|
||||
}
|
||||
ii = xap_inter_ptr->regssn_len;
|
||||
if( ii >= MAX_XAP_SSN )
|
||||
{
|
||||
xap_send_error ( "Can not register ssn in map provider" );
|
||||
return -1;
|
||||
}
|
||||
for ( jj = 0; jj < ii; jj++ )
|
||||
{
|
||||
if( xap_inter_ptr->reg_ssn[jj] == ssn )
|
||||
{
|
||||
xap_send_error ( "ssn has registered in map provider" );
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
xap_inter_ptr->reg_ssn[ii] = ssn;
|
||||
xap_inter_ptr->regssn_flag[ii] = XAP_CAP_SSN;
|
||||
xap_inter_ptr->regssn_len++;
|
||||
return itcap_reg_ssn ( ssn );
|
||||
}
|
||||
|
||||
u8 cap_check_sendcom ( u32 did )
|
||||
{
|
||||
struct xapp_vm_data *vm_ptr;
|
||||
|
||||
if( did >= ( xap_vm_ptr->grantdid ) )
|
||||
return 0;
|
||||
vm_ptr = ( xapp_vm_data * ) & xap_vm_ptr->xap_data[did];
|
||||
if( vm_ptr->recvcom_flag == 0 )
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 cap_send_comdata ( u8 * data_flow ) // send cap common service data
|
||||
{
|
||||
u8 result;
|
||||
u32 temp_did;
|
||||
struct xapp_vm_data *vm_ptr;
|
||||
struct psmvm_data *psm_ptr;
|
||||
struct MapComSrv_struct map_com;
|
||||
|
||||
xap_msg_display ( data_flow );
|
||||
if( ( result = cap_com_ftos ( &map_com, data_flow ) ) == 0 )
|
||||
return 0;
|
||||
temp_did = map_com.dialogue_id;
|
||||
if( temp_did >= ( xap_vm_ptr->grantdid ) )
|
||||
return 0;
|
||||
vm_ptr = ( xapp_vm_data * ) & xap_vm_ptr->xap_data[temp_did];
|
||||
if( vm_ptr->recvcom_flag == 1 )
|
||||
return 0;
|
||||
psm_ptr = ( psmvm_data * ) & vm_ptr->psm_data;
|
||||
if( result == 2 || map_com.message_type == MAP_DELIMITER )
|
||||
psm_ptr->delimiter_flag = 1;
|
||||
if( map_com.message_type != MAP_DELIMITER )
|
||||
{
|
||||
memcpy ( &vm_ptr->recvcom_data, &map_com, sizeof ( MapComSrv_struct ) );
|
||||
psm_ptr->msg_type = map_com.message_type;
|
||||
psm_ptr->msg_flag = map_com.message_flag;
|
||||
vm_ptr->recvcom_flag = 1;
|
||||
xap_watch_dog(29);
|
||||
}
|
||||
xap_watch_dog(25);
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 cap_check_sendopr ( u32 did )
|
||||
{
|
||||
struct xapp_vm_data *vm_ptr;
|
||||
|
||||
if( did >= ( xap_vm_ptr->grantdid ) )
|
||||
return 0;
|
||||
vm_ptr = ( xapp_vm_data * ) & xap_vm_ptr->xap_data[did];
|
||||
if( vm_ptr->recvopr_flag == 1 )
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 cap_send_oprdata ( u8 * data_flow ) // send cap operation service data
|
||||
{
|
||||
u8 result;
|
||||
u32 temp_did;
|
||||
struct xapp_vm_data *vm_ptr;
|
||||
struct MapOprData_struct map_opr;
|
||||
//u8 info[1024];
|
||||
|
||||
//xap_msg_display ( data_flow );
|
||||
if( ( result = cap_opr_ftos ( &map_opr, data_flow ) ) == 0 )
|
||||
{
|
||||
xap_send_error ( "errro: cap ftos failed" );
|
||||
return 0;
|
||||
}
|
||||
temp_did = map_opr.dialogue_id;
|
||||
if( temp_did >= ( xap_vm_ptr->grantdid ) )
|
||||
{
|
||||
xap_send_error ( "cap errro: did > max did" );
|
||||
return 0;
|
||||
}
|
||||
vm_ptr = ( xapp_vm_data * ) & xap_vm_ptr->xap_data[temp_did];
|
||||
if( vm_ptr->recvopr_flag == 1 )
|
||||
{
|
||||
//xap_send_error("cap errro: quence full");
|
||||
return 0;
|
||||
}
|
||||
xap_msg_display ( data_flow );
|
||||
memcpy ( &vm_ptr->recvopr_data, &map_opr, sizeof ( MapOprData_struct ) );
|
||||
if( result == 2 )
|
||||
{
|
||||
vm_ptr->psm_data.delimiter_flag = 1;
|
||||
//xap_send_ascout("Delimiter Flag = YES\r\n");
|
||||
}
|
||||
vm_ptr->recvopr_flag = 1;
|
||||
xap_watch_dog(45);
|
||||
xap_watch_dog(49);
|
||||
//sprintf(info, "cap_send_oprdata: did: %ld, iid: %d, iid_state: %d\r\n", map_opr.dialogue_id, map_opr.invoke_id, xap_vm_ptr->xap_data[map_opr.dialogue_id].psm_data.opr_state[map_opr.invoke_id]);
|
||||
//xap_send_ascout(info);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 cap_get_comdata ( u8 * data_flow, u32 did )
|
||||
{
|
||||
struct xapp_vm_data *vm_ptr;
|
||||
struct psmvm_data *psm_ptr;
|
||||
|
||||
vm_ptr = ( xapp_vm_data * ) & xap_vm_ptr->xap_data[did];
|
||||
if( vm_ptr->sendcom_flag == 0 )
|
||||
return 0;
|
||||
psm_ptr = ( psmvm_data * ) & vm_ptr->psm_data;
|
||||
cap_com_stof ( &vm_ptr->sendcom_data, data_flow, 0 );
|
||||
vm_ptr->sendcom_flag = 0;
|
||||
xap_watch_dog(6);
|
||||
xap_watch_dog(9);
|
||||
xap_msg_display ( data_flow );
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 cap_get_open ( u8 * data_flow, u8 ssn )
|
||||
{
|
||||
u8 aa;
|
||||
u8 ii;
|
||||
u8 flag = 0;
|
||||
u32 temp_did;
|
||||
|
||||
for ( aa = 0; aa < xap_inter_ptr->regssn_len; aa++ )
|
||||
{
|
||||
if( xap_inter_ptr->reg_ssn[aa] == ssn ) // find ssn
|
||||
{
|
||||
flag = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( flag == 0 )
|
||||
{
|
||||
xap_send_error ( "SSN--%d is not registerd", ssn );
|
||||
return 0;
|
||||
}
|
||||
ii = xap_inter_ptr->open_tail[aa];
|
||||
if( xap_inter_ptr->open_head[aa] == ii ) // empty
|
||||
return 0;
|
||||
temp_did = xap_inter_ptr->open_did[aa][ii];
|
||||
xap_inter_ptr->open_tail[aa] = ( ii + 1 ) % XAP_OPEN_LEN;
|
||||
if( !cap_get_comdata ( data_flow, temp_did ) )
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 cap_get_oprdata ( u8 * data_flow, u32 did )
|
||||
{
|
||||
struct xapp_vm_data *vm_ptr;
|
||||
struct psmvm_data *psm_ptr;
|
||||
|
||||
if( did >= ( xap_vm_ptr->grantdid ) )
|
||||
return 0;
|
||||
vm_ptr = ( xapp_vm_data * ) & xap_vm_ptr->xap_data[did];
|
||||
if( vm_ptr->sendopr_flag != 1 )
|
||||
return 0;
|
||||
psm_ptr = ( psmvm_data * ) & vm_ptr->psm_data;
|
||||
cap_opr_stof ( &vm_ptr->sendopr_data, data_flow, 0 );
|
||||
vm_ptr->sendopr_flag = 0;
|
||||
xap_watch_dog(11);
|
||||
xap_msg_display ( data_flow );
|
||||
return 1;
|
||||
}
|
||||
|
||||
u32 cap_get_dialogueid ( u8 ssn )
|
||||
{
|
||||
u32 did;
|
||||
|
||||
if( ( did = assign_did ( ) ) == 0 )
|
||||
{
|
||||
xap_send_error ( "Fail to get did(Cap)" );
|
||||
return 0;
|
||||
}
|
||||
xap_vm_ptr->xap_data[did].psm_data.xap_flag = XAP_CAP_SSN;
|
||||
xap_watch_dog(57);
|
||||
return did;
|
||||
}
|
||||
|
||||
u8 cap_get_invokeid ( u32 did )
|
||||
{
|
||||
return assign_iid ( did );
|
||||
}
|
||||
|
||||
u8 xapp_check_did_state ( u32 did )
|
||||
{
|
||||
if( xap_vm_ptr->xap_data[did].psm_data.psm_state == XAP_IDLE )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
xap_vm_ptr->debug_data.watch_dog[108]++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 xapp_check_did ( u32 did )
|
||||
{
|
||||
if( xap_vm_ptr->xap_data[did].psm_data.psm_state <= XAP_IDLE )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 map_send_oprsrv ( MapOprSrv_struct * srv_ptr, u8 DelimiterFlag, u8 * data_flow )
|
||||
{
|
||||
u32 len;
|
||||
u8 buf[4096];
|
||||
MapOprData_struct data_ptr;
|
||||
|
||||
data_ptr.port_id = srv_ptr->port_id;
|
||||
data_ptr.dialogue_id = srv_ptr->dialogue_id;
|
||||
data_ptr.invoke_id = srv_ptr->invoke_id;
|
||||
data_ptr.message_type = srv_ptr->message_type;
|
||||
data_ptr.message_flag = srv_ptr->message_flag;
|
||||
data_ptr.param_flag = 0x1f;
|
||||
len = build_mapparam ( srv_ptr, buf );
|
||||
//printf ( "map_send_oprsrv: build map param len ; %d \n", len );
|
||||
if( len < 0 || len > MAX_MAPPOPR_LEN )
|
||||
{
|
||||
xap_send_error ( "map_send_oprsrv: build mapparam too long!" );
|
||||
return 0;
|
||||
}
|
||||
data_ptr.param_len = len;
|
||||
memcpy ( data_ptr.param, buf, len );
|
||||
data_ptr.param_flag |= 0x20;
|
||||
map_opr_stof ( &data_ptr, data_flow, DelimiterFlag );
|
||||
|
||||
return map_send_oprdata ( data_flow );
|
||||
}
|
||||
|
||||
u8 map_send_comsrv ( MapComSrv_struct * com_ptr, u8 uDelimiterFlag, u8 * data_flow )
|
||||
{
|
||||
map_com_stof ( com_ptr, data_flow, uDelimiterFlag );
|
||||
return map_send_comdata ( data_flow );
|
||||
}
|
||||
|
||||
u8 map_send_open ( MapOpenArgParam * pOpenParam, u8 * uDataFlow )
|
||||
{
|
||||
MapComSrv_struct map_com;
|
||||
MapOpen_Arg *pOpenArg;
|
||||
|
||||
pOpenArg = &map_com.dlg_list.open_arg;
|
||||
|
||||
map_com.message_type = MAP_OPEN;
|
||||
map_com.message_flag = MAP_REQUEST;
|
||||
map_com.port_id = pOpenParam->pid;
|
||||
map_com.dialogue_id = pOpenParam->did;
|
||||
memcpy ( &pOpenArg->local_add, &pOpenParam->local_add, sizeof ( SCCP_ADDR ) );
|
||||
memcpy ( &pOpenArg->peer_add, &pOpenParam->peer_add, sizeof ( SCCP_ADDR ) );
|
||||
pOpenArg->acn_data.acn = pOpenParam->acn;
|
||||
pOpenArg->acn_data.acn_ver = map_get_acnver ( &pOpenParam->local_add, pOpenParam->acn );
|
||||
pOpenArg->param_flag = 0x0b;
|
||||
xap_watch_dog(60);
|
||||
if (pOpenParam->uDelimeterFlag != 0)
|
||||
xap_watch_dog(61);
|
||||
return map_send_comsrv ( &map_com, pOpenParam->uDelimeterFlag, uDataFlow );
|
||||
}
|
||||
|
||||
u8 map_send_close ( u32 pid, u32 did, u8 uCloseReasion )
|
||||
{
|
||||
MapComSrv_struct map_com;
|
||||
u8 uDataFlow[4096];
|
||||
|
||||
map_com.message_type = MAP_CLOSE;
|
||||
map_com.message_flag = MAP_REQUEST;
|
||||
map_com.port_id = pid;
|
||||
map_com.dialogue_id = did;
|
||||
map_com.dlg_list.close_arg.release_method = uCloseReasion;
|
||||
map_com.dlg_list.close_arg.param_flag = 0x01;
|
||||
|
||||
return map_send_comsrv ( &map_com, 0, uDataFlow );
|
||||
|
||||
}
|
||||
|
||||
u8 map_extract_param ( MapOprSrv_struct * srv_ptr, MapOprData_struct * data_ptr, int ver )
|
||||
{
|
||||
srv_ptr->port_id = data_ptr->port_id;
|
||||
srv_ptr->dialogue_id = data_ptr->dialogue_id;
|
||||
srv_ptr->invoke_id = data_ptr->invoke_id;
|
||||
srv_ptr->message_type = data_ptr->message_type;
|
||||
srv_ptr->message_flag = data_ptr->message_flag;
|
||||
srv_ptr->version = ver;
|
||||
/*
|
||||
if( !( data_ptr->param_flag & 0x20 ) ) // has not parameter
|
||||
return 0;
|
||||
//some response doesn't take any parameter, like V2 fwdMOSMSResponse...
|
||||
*/
|
||||
return extract_mapparam ( srv_ptr, data_ptr->message_type, data_ptr->message_flag, data_ptr->param_len, data_ptr->param );
|
||||
}
|
||||
|
||||
u8 cap_send_oprsrv ( CapArg * pCapArg, u8 DelimiterFlag, u8 * data_flow )
|
||||
{
|
||||
|
||||
u32 len;
|
||||
u8 buf[4096];
|
||||
MapOprData_struct data_ptr;
|
||||
|
||||
data_ptr.port_id = pCapArg->port_id;
|
||||
data_ptr.dialogue_id = pCapArg->dialogue_id;
|
||||
data_ptr.invoke_id = pCapArg->invoke_id;
|
||||
data_ptr.message_type = pCapArg->ocode;
|
||||
data_ptr.message_flag = pCapArg->message_flag;
|
||||
data_ptr.param_flag = 0x1f;
|
||||
len = encode_capmsg ( *pCapArg, buf, 4096 );
|
||||
//printf ( "cap_send_oprsrv: build map param len ; %d \n", len );
|
||||
if( len == 0 || len > MAX_MAPPOPR_LEN )
|
||||
{
|
||||
xap_send_error ( "cap_send_oprsrv: build capparam too long!" );
|
||||
return 0;
|
||||
}
|
||||
data_ptr.param_len = len;
|
||||
memcpy ( data_ptr.param, buf, len );
|
||||
data_ptr.param_flag |= 0x20;
|
||||
cap_opr_stof ( &data_ptr, data_flow, DelimiterFlag );
|
||||
|
||||
return cap_send_oprdata ( data_flow );
|
||||
}
|
||||
|
||||
u8 cap_send_comsrv ( MapComSrv_struct * com_ptr, u8 uDelimiterFlag, u8 * data_flow )
|
||||
{
|
||||
cap_com_stof ( com_ptr, data_flow, uDelimiterFlag );
|
||||
return cap_send_comdata ( data_flow );
|
||||
}
|
||||
|
||||
void wxc2_trace_xapp(u32 did)
|
||||
{
|
||||
if (did >= (xap_vm_ptr->grantdid))
|
||||
return;
|
||||
xap_vm_ptr->debug_data.monitor_did = did;
|
||||
}
|
||||
11
plat/xapp/src/xap_interfunc.h
Normal file
11
plat/xapp/src/xap_interfunc.h
Normal file
@@ -0,0 +1,11 @@
|
||||
/* XAP interface for map/cap use head file */
|
||||
/* Written by Liu Zhiguo 2003-08-26 */
|
||||
/* Version 1.0 */
|
||||
/* --------------------------------------- */
|
||||
|
||||
#ifndef _XAP_INTER_FUNC
|
||||
#define _XAP_INTER_FUNC
|
||||
|
||||
void xap_send_error(const char *fmt,...);
|
||||
|
||||
#endif
|
||||
1239
plat/xapp/src/xap_monitor.c
Normal file
1239
plat/xapp/src/xap_monitor.c
Normal file
File diff suppressed because it is too large
Load Diff
19
plat/xapp/src/xap_monitor.h
Normal file
19
plat/xapp/src/xap_monitor.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/* XAP monitor head file */
|
||||
/* Written by Liu Zhiguo 2003-03-13 */
|
||||
/* Version 1.0 */
|
||||
/* -------------------------------- */
|
||||
|
||||
#ifndef _XAP_MONITOR
|
||||
#define _XAP_MONITOR
|
||||
|
||||
void xap_init_m(void);
|
||||
void xap_monitor(void);
|
||||
|
||||
void xap_send_error(const char *fmt,...);
|
||||
void xap_msg_display(u8 *info_str);
|
||||
void xap_dlg_display(struct CSLdlg_struct *dha_ptr);
|
||||
void xap_cmp_display(struct CSLcmp_struct *cha_ptr);
|
||||
void xap_watch_dog(u32 wd_site);
|
||||
void xap_logdebug(const char *fmt,...);
|
||||
|
||||
#endif
|
||||
3421
plat/xapp/src/xap_provider.c
Normal file
3421
plat/xapp/src/xap_provider.c
Normal file
File diff suppressed because it is too large
Load Diff
182
plat/xapp/src/xap_provider.h
Normal file
182
plat/xapp/src/xap_provider.h
Normal file
@@ -0,0 +1,182 @@
|
||||
/* XAP provider head file */
|
||||
/* Written by Liu Zhiguo 2003-08-26 */
|
||||
/* Version 1.0 */
|
||||
/* -------------------------------- */
|
||||
|
||||
#include "../../public/src/include/includes.h"
|
||||
#include "../../public/src/include/pub_fmt.h"
|
||||
#include "../../sccp/src/include/sccp.h"
|
||||
#include "../../tcap/src/include/tcap_head.h"
|
||||
#include "../../tcap/src/include/tcap_public.h"
|
||||
#include "../../tcap/src/include/tcap_struct.h"
|
||||
#include "ixap.h"
|
||||
#include "mapp/map_const.h"
|
||||
#include "mapp/map_public.h"
|
||||
#include "mapp/map_code.h"
|
||||
#include "mapp/map_coding.h"
|
||||
#include "mapp/is41_code.h"
|
||||
#include "mapp/map_struct.h"
|
||||
#include "mapp/map_acn.h"
|
||||
#include "mapp/map_dlgpdu.h"
|
||||
|
||||
#ifndef _PROVIDER_H
|
||||
#define _PROVIDER_H
|
||||
|
||||
#define XAP_MAP_SSN 1 // ssn is used for map
|
||||
#define XAP_CAP_SSN 2 // ssn is used for cap
|
||||
#define XAP_IS41_SSN 3 // ssn is used for is41
|
||||
|
||||
#define XAP_VM_KEY 0xa0e00000
|
||||
#define XAP_VM_PERM 0664
|
||||
#define XAP_INTER_KEY 0xa0f00000
|
||||
#define XAP_INTER_PERM 0664
|
||||
|
||||
#define MAX_XAP_SSN 16
|
||||
#define XAP_OPEN_LEN 128
|
||||
#define XAP_ACN_LEN 7 // xap acn length
|
||||
#define XAP_ACN_NUM 50 // acn buffer length
|
||||
#define XAP_OPR_NUM 80 // operation length
|
||||
|
||||
#define XAP_ASCIN_LEN 1024
|
||||
#define XAP_ASCOUT_LEN 4096
|
||||
#define XAP_WTDOG_LEN 256
|
||||
|
||||
#define XAP_INIT 0x00
|
||||
#define XAP_IDLE 0x01
|
||||
#define XAP_WFUR 0x02 // wait for user requests
|
||||
#define XAP_WFCBI 0x03 // wait for check begin indicate
|
||||
#define XAP_DLG_INITIATED 0x05
|
||||
#define XAP_DLG_PENDING 0x04 // dialogue pending
|
||||
#define XAP_DLG_ACCEPTED 0x06
|
||||
#define XAP_DLG_ESTABLISHED 0x07
|
||||
#define XAP_DLG_SUSPEND 0x08
|
||||
#define XAP_DLG_HALT 0x09
|
||||
|
||||
/* the state of SSM */
|
||||
#define SSM_IDLE 0x00
|
||||
#define SSM_WFRESPONSE 0x01 // wait for response
|
||||
#define SSM_WFCONFIRM 0x02
|
||||
|
||||
/* the flag of requesting map SSM */
|
||||
#define SERVICE_INVOKED 0x01
|
||||
#define RESULT_RECEIVED 0x02
|
||||
#define PARTIAL_RESULT_RECEIVED 0x03
|
||||
#define NEGATIVE_RESULT_RECEIVED 0x04
|
||||
#define LINKED_REQUEST_RECEIVED 0x05
|
||||
#define LINKED_SERVICE_INVOKED 0x06
|
||||
#define USER_REJECT_RECEIVED 0x07
|
||||
#define PROVIDER_REJECT_RECEIVED 0x08
|
||||
#define TIMER_EXPIRY 0x09
|
||||
#define TERMINATED 0x0a
|
||||
|
||||
/* the flag of performing map SSM */
|
||||
#define SERVICE_INVOCATION_RECEIVED 0x01
|
||||
#define RESPONSE_ISSUED 0x02
|
||||
#define GUARD_TIMER 0x03
|
||||
|
||||
#define SUSPEND_TIME 1
|
||||
#define DLGPEND_TIME 180
|
||||
#define XAPP_TIMERHZ 100
|
||||
|
||||
#define XAPP_PRIVATE_TCAP 1
|
||||
#define XAPP_OPER_FAMILY 9
|
||||
|
||||
typedef struct xap_acn_info // store info about application context name
|
||||
{
|
||||
u8 buf_len;
|
||||
u8 acn[XAP_ACN_NUM]; // acn buffer
|
||||
u8 acn_ver[XAP_ACN_NUM]; // acn version buffer
|
||||
} xap_acn_info;
|
||||
|
||||
typedef struct xap_opr_info // store info about opration code
|
||||
{
|
||||
u8 buf_len;
|
||||
u8 opr_code[XAP_OPR_NUM]; // operation code buffer
|
||||
u8 opr_class[XAP_OPR_NUM]; // operation class buffer
|
||||
u32 opr_timer[XAP_OPR_NUM]; // operation timer buffer
|
||||
} xap_opr_info;
|
||||
|
||||
|
||||
typedef struct xap_inter_struct // xap interface structure
|
||||
{
|
||||
u8 mcc[2];
|
||||
u8 mnc0;
|
||||
u8 cc[2];
|
||||
u8 ndc[3];
|
||||
u8 inter_prefix[2];
|
||||
u8 national_prefix[2];
|
||||
u8 local_prefix[2];
|
||||
u8 mnc[2];//expend mnc from 1 byte to 2 bytes
|
||||
|
||||
/* mscid is special use for CDMA */
|
||||
u8 mscidToNum[256][14];
|
||||
/* mscid is special use for CDMA */
|
||||
|
||||
// define for the ssn control
|
||||
u8 regssn_len;
|
||||
u8 reg_ssn[MAX_XAP_SSN];
|
||||
u8 regssn_flag[MAX_XAP_SSN]; // indicate if the register SSN is MAP or CAP ssn
|
||||
u8 open_head[MAX_XAP_SSN];
|
||||
u8 open_tail[MAX_XAP_SSN];
|
||||
u32 open_did[MAX_XAP_SSN][XAP_OPEN_LEN];
|
||||
} xap_inter_struct;
|
||||
|
||||
typedef struct xap_debug_struct
|
||||
{
|
||||
char *start_time; // time of module start
|
||||
u32 monitor_did; // the dialogue id for monitored
|
||||
u8 error_switch;
|
||||
u8 map_switch;
|
||||
u8 cap_switch;
|
||||
u8 send_control; // control if can send xap message
|
||||
u8 ascin_buf[XAP_ASCIN_LEN];
|
||||
u8 ascout_buf[XAP_ASCOUT_LEN];
|
||||
u32 watch_dog[XAP_WTDOG_LEN];
|
||||
} xap_debug_struct;
|
||||
|
||||
typedef struct psmvm_data // xap provider state machine data
|
||||
{
|
||||
u8 xap_flag; // 0: empty; 1: map primitive; 2: cap primitive
|
||||
u8 psm_state;
|
||||
u8 sub_state1;
|
||||
u8 delimiter_flag;
|
||||
u8 acn;
|
||||
u8 acn_ver;
|
||||
u8 msg_type;
|
||||
u8 msg_flag;
|
||||
u32 port_id;
|
||||
u32 suspend_timer;
|
||||
u8 data_count;
|
||||
u8 recv_bsa_count;
|
||||
u8 opr_state[MAX_INVOKEID];
|
||||
u8 opr_code[MAX_INVOKEID];
|
||||
u8 opr_class[MAX_INVOKEID];
|
||||
} psmvm_data;
|
||||
|
||||
typedef struct xapp_vm_data // XAP provider virtue machine structure
|
||||
{
|
||||
struct psmvm_data psm_data;
|
||||
u8 recvcom_flag; // USER=>XAPP
|
||||
u8 recvopr_flag; // USER=>XAPP 0: has not data 1: has data 2: has partial data
|
||||
u8 sendcom_flag; // XAPP=>USER
|
||||
u8 sendopr_flag; // XAPP=>USER
|
||||
u32 recvopr_site; // USER=>XAPP 0: has not data 1: has data 2: has partial data
|
||||
struct MapComSrv_struct recvcom_data;
|
||||
struct MapOprData_struct recvopr_data;
|
||||
struct MapComSrv_struct sendcom_data;
|
||||
struct MapOprData_struct sendopr_data;
|
||||
struct CSLdlg_struct tcap_data;
|
||||
struct MapDlg_struct map_dlg;
|
||||
} xapp_vm_data;
|
||||
|
||||
typedef struct xap_vm_struct
|
||||
{
|
||||
int grantdid;
|
||||
struct xapp_vm_data xap_data[MAX_DIALOGUEID];
|
||||
struct xap_debug_struct debug_data;
|
||||
} xap_vm_struct;
|
||||
|
||||
struct xap_vm_struct *xap_vm_ptr;
|
||||
struct xap_inter_struct *xap_inter_ptr;
|
||||
|
||||
#endif
|
||||
42
plat/xapp/ut/xapp_test/Makefile
Normal file
42
plat/xapp/ut/xapp_test/Makefile
Normal file
@@ -0,0 +1,42 @@
|
||||
# Makefile create for XAPP Test
|
||||
# Create by liuwei
|
||||
|
||||
cc = gcc
|
||||
#CFLAG = -g -Wall -c -DVMS_UNDER_DEVELOP
|
||||
CFLAG = -g -Wall -c
|
||||
LIB_DIR = ../..
|
||||
XAPP_TEST_OBJ = xapp_main.o xapp_op_test.o xapp_coding_test.o
|
||||
|
||||
PUBLIC_LIB = -L$(LIB_DIR)/public -lpublic
|
||||
MTP3_LIB = -L$(LIB_DIR)/mtp3 -lmtp3
|
||||
DEBUG_LIB = -L$(LIB_DIR)/debug -ldebug
|
||||
SNMP_LIB = -L$(LIB_DIR)/snmp -lsnmp
|
||||
SCCP_LIB = -L$(LIB_DIR)/sccp -lsccp
|
||||
TCAP_LIB = -L$(LIB_DIR)/tcap -ltcap
|
||||
XAPP_LIB = -L$(LIB_DIR)/xapp -lxapp
|
||||
IPTRANS_LIB = -L$(LIB_DIR)/iptrans -liptrans
|
||||
|
||||
xapp_test: $(XAPP_TEST_OBJ)
|
||||
$(cc) -o xapp_test $(XAPP_TEST_OBJ) $(DEBUG_LIB) $(IPTRANS_LIB) $(SNMP_LIB) $(MTP3_LIB) $(SCCP_LIB) $(TCAP_LIB) $(XAPP_LIB) $(PUBLIC_LIB) -lm -lz
|
||||
|
||||
xapp_main.o: xapp_main.c
|
||||
$(cc) $(CFLAG) xapp_main.c
|
||||
|
||||
xapp_op_test.o : xapp_op_test.c
|
||||
$(cc) $(CFLAG) xapp_op_test.c
|
||||
|
||||
xapp_coding_test.o : xapp_coding_test.c
|
||||
$(cc) $(CFLAG) xapp_coding_test.c
|
||||
|
||||
run:
|
||||
cd .. ; rm -f *.a
|
||||
cd ../mapp;make;cd ..
|
||||
cd ../capp;make;cd ..
|
||||
cd .. ;make;
|
||||
rm -f xapp_test ; make
|
||||
clean:
|
||||
cd ../ ;make clean
|
||||
rm -f *.o *.a *.bak core xapp_test
|
||||
|
||||
backup:
|
||||
|
||||
BIN
plat/xapp/ut/xapp_test/conf/.sccp.conf.swo
Normal file
BIN
plat/xapp/ut/xapp_test/conf/.sccp.conf.swo
Normal file
Binary file not shown.
BIN
plat/xapp/ut/xapp_test/conf/HlrSysPara
Normal file
BIN
plat/xapp/ut/xapp_test/conf/HlrSysPara
Normal file
Binary file not shown.
8
plat/xapp/ut/xapp_test/conf/cap_acn.conf
Normal file
8
plat/xapp/ut/xapp_test/conf/cap_acn.conf
Normal file
@@ -0,0 +1,8 @@
|
||||
#application context name configure file for CAP
|
||||
total data length=4
|
||||
|
||||
#application context name data
|
||||
No.1:50 00 // gsmSSF to gsmSCF
|
||||
No.2:51 02 // assist handoff gsmSSF to gsmSCF
|
||||
No.3:52 02 // gsmSRF to gsmSCF
|
||||
No.4:128 02 // gsmSRF to gsmSCF
|
||||
36
plat/xapp/ut/xapp_test/conf/cap_operation.conf
Normal file
36
plat/xapp/ut/xapp_test/conf/cap_operation.conf
Normal file
@@ -0,0 +1,36 @@
|
||||
# operation code configure file for CAP
|
||||
total data length=32
|
||||
|
||||
#operation code
|
||||
No.1:00 04 5 // initial DP
|
||||
No.2:16 02 5 // assist request instructions
|
||||
No.3:17 02 20 // establish temporary connection
|
||||
No.4:18 04 5 // disconnect forward connection
|
||||
No.5:19 04 5 // connect to resource
|
||||
No.6:20 04 5 // connect
|
||||
No.7:22 04 5 // release call
|
||||
No.8:23 04 5 // request report BCSM event
|
||||
No.9:24 04 5 // event report BCSM
|
||||
No.10:31 04 5 // continue
|
||||
No.11:33 04 5 // reset timer
|
||||
No.12:34 04 5 // furnish charging information
|
||||
No.13:35 04 5 // apply charging
|
||||
No.14:36 04 5 // apply charging report
|
||||
No.15:44 04 5 // call information report
|
||||
No.16:45 04 5 // call information request
|
||||
No.17:46 04 5 // send charging information
|
||||
No.18:47 04 60 // play announcement
|
||||
No.19:48 01 60 // prompt and collect user information
|
||||
No.20:49 04 5 // specialized resource report
|
||||
No.21:53 04 5 // cancel
|
||||
No.22:55 04 5 // activity test
|
||||
No.23:60 04 5 // initial DPSMS
|
||||
No.24:61 04 5 // Furnishing charging info.SMS
|
||||
No.25:62 04 5 // connect DPSMS
|
||||
No.26:63 04 5 // request SMS event
|
||||
No.27:64 04 5 // event report SMS
|
||||
No.28:65 04 5 // continue SMS
|
||||
No.29:66 04 5 // release DPSMS
|
||||
No.30:67 04 5 // reset timer DPSMS
|
||||
No.31:176 04 5 // VPS to PPS
|
||||
No.32:177 04 5 // PPS to VPS
|
||||
215
plat/xapp/ut/xapp_test/conf/cc_table.conf
Normal file
215
plat/xapp/ut/xapp_test/conf/cc_table.conf
Normal file
@@ -0,0 +1,215 @@
|
||||
# Country code table configure file
|
||||
|
||||
#List the country code
|
||||
0086; // China
|
||||
0001; // Canada & USA
|
||||
0007; // Kazakhstan & Kirighzia & Kyrgyzstan & Russia & Sakhalin & Tajikistan & Uzbekistan
|
||||
0020; // Egypt
|
||||
0027; // South Africa
|
||||
0030; // Greece
|
||||
0031; // Netherlands
|
||||
0036; // Hungary
|
||||
0039; // Italy
|
||||
0040; // Bomania
|
||||
0041; // Switzerland
|
||||
0042; // Czech Republic & Slovakia
|
||||
0043; // Austria
|
||||
0044; // United Kingdom
|
||||
0045; // Denmark
|
||||
0046; // Sweden
|
||||
0047; // Norway
|
||||
0048; // Poland
|
||||
0049; // Germany
|
||||
0051; // Peru
|
||||
0052; // South Korea
|
||||
0053; // Cuba
|
||||
0054; // Argentina
|
||||
0055; // Brazil
|
||||
0056; // Chile
|
||||
0057; // Colombia
|
||||
0058; // Venezuela
|
||||
0060; // Malaysia
|
||||
0061; // Australia
|
||||
0062; // Indonesia
|
||||
0063; // Philippines
|
||||
0064; // New Zealand
|
||||
0065; // Singapore
|
||||
0066; // Thailand
|
||||
0081; // Japan
|
||||
0084; // Vietnam
|
||||
0090; // Turkey
|
||||
0091; // India
|
||||
0092; // Pakistan
|
||||
0093; // Afghanistan
|
||||
0094; // Sri Lanka
|
||||
0095; // Myanmar (Burma)
|
||||
0098; // Iran
|
||||
0212; // Morocco
|
||||
0213; // Algeria
|
||||
0216; // Tunisia
|
||||
0218; // Libya
|
||||
0220; // Gambia
|
||||
0221; // Senegal Republic
|
||||
0222; // Mauritania
|
||||
0223; // Mali Republic
|
||||
0224; // Guinea
|
||||
0225; // Ivory Coast
|
||||
0226; // Burkina Faso
|
||||
0227; // Niger
|
||||
0228; // Togo
|
||||
0229; // Benin
|
||||
0230; // Mauritius
|
||||
0231; // Liberia
|
||||
0232; // Sierra Leone
|
||||
0233; // Ghana
|
||||
0234; // Nigeria
|
||||
0235; // Chad Republic
|
||||
0236; // Central Africa Republic
|
||||
0237; // Cameroon
|
||||
0239; // Sao Tome
|
||||
0240; // Equatorial Guinea
|
||||
0241; // Gabon
|
||||
0242; // Congo
|
||||
0243; // Zaire
|
||||
0244; // Angola
|
||||
0245; // Guinea Bissau
|
||||
0246; // Diego Garcia
|
||||
0247; // Ascension Islands
|
||||
0248; // Seychelles
|
||||
0249; // Sudan
|
||||
0250; // Rwanda
|
||||
0251; // Ethiopia
|
||||
0252; // Somalia
|
||||
0253; // Djibouti
|
||||
0254; // Kenya
|
||||
0255; // Tanzania
|
||||
0256; // Uganda
|
||||
0257; // Burundi
|
||||
0258; // Mozambigue
|
||||
0259; // Zanzibar
|
||||
0260; // Zambia
|
||||
0261; // Madagascar
|
||||
0262; // Reunion Island
|
||||
0263; // Zimbabwe
|
||||
0264; // Namibia
|
||||
0265; // Malawi
|
||||
0266; // Lesotho
|
||||
0267; // Botswana
|
||||
0268; // Swaziland
|
||||
0269; // Comoros
|
||||
0290; // St.Helena
|
||||
0291; // Eritrea
|
||||
0297; // Aruba
|
||||
0298; // Faeroe Islands
|
||||
0299; // Greenland
|
||||
#2696 // Mayotte Island
|
||||
0321; // Belgium
|
||||
0331; // France
|
||||
0339; // Monaco
|
||||
0349; // Spain
|
||||
0350; // Gibraltar
|
||||
0351; // Portugal
|
||||
0352; // Luxembourg
|
||||
0353; // Ireland
|
||||
0354; // Iceland
|
||||
0355; // Albania
|
||||
0356; // Malta
|
||||
0357; // Cyprus
|
||||
0358; // Finland
|
||||
0359; // Bulgaria
|
||||
0370; // Lithuania
|
||||
0371; // Latvia
|
||||
0372; // Estonia
|
||||
0373; // Moldova
|
||||
0374; // Armenia
|
||||
0375; // Belarus
|
||||
0376; // Andorra
|
||||
0380; // Ukraine
|
||||
0381; // Yugoslavia
|
||||
0385; // Croatia
|
||||
0386; // Slovenia
|
||||
0387; // Bosnia Herzegovina
|
||||
0389; // Macedonia
|
||||
0395; // San Marino
|
||||
0396; // Vatican City
|
||||
0417; // Liechtenstein
|
||||
0500; // Falkland Islands
|
||||
0501; // Belize
|
||||
0502; // Guatemala
|
||||
0503; // EI Salvador
|
||||
0504; // Honduras
|
||||
0505; // Nicaragua
|
||||
0506; // Costa Rica
|
||||
0507; // Panama
|
||||
0508; // St.Pierre
|
||||
0509; // Haiti
|
||||
0521; // Mexico Band 1
|
||||
0522; // Mexico Band 2
|
||||
0523; // Mexico Band 3
|
||||
0524; // Mexico Band 4
|
||||
0525; // Mexico Band 5
|
||||
0526; // Mexico Band 6
|
||||
0527; // Mexico Band 7
|
||||
0528; // Mexico Band 8
|
||||
0590; // Guadeloupe
|
||||
0591; // Bolivia
|
||||
0592; // Ecuador & Guyana
|
||||
0594; // French Guiana
|
||||
0595; // Paraguay
|
||||
0596; // French Antilles
|
||||
0597; // Suriname
|
||||
0598; // Uruguay
|
||||
0599; // Netherlands Antilles
|
||||
#5399 // Guantanamo Bay
|
||||
0670; // Saipan
|
||||
0671; // Guam
|
||||
0672; // Antarctica(Casey) & Antarctica(Scott) & Christmas/Cocos
|
||||
0673; // Brunei
|
||||
0674; // Nauru
|
||||
0675; // Papau New Guinea
|
||||
0676; // Tonga
|
||||
0677; // Solomon Islands
|
||||
0678; // Vanuatu
|
||||
0679; // Fiji Islands
|
||||
0680; // Palau
|
||||
0681; // Wallis/Futuna
|
||||
0682; // Cook Island
|
||||
0683; // Niue Island
|
||||
0684; // American Samoa
|
||||
0685; // West Samoa
|
||||
0686; // Kiribati
|
||||
0687; // New Caledonia
|
||||
0688; // Tuvalu Islands
|
||||
0689; // French Polynesia
|
||||
0691; // Micronesia
|
||||
0692; // Marshall Islands
|
||||
#6723 // Norfolk Island
|
||||
0787; // Puerto Rico
|
||||
0809; // Anguilla & Antigua & Bahamas & Barbados & Bermuda......
|
||||
0850; // North Korea
|
||||
0852; // Hong Kong
|
||||
0853; // Macao
|
||||
0855; // Cambodia
|
||||
0856; // Laos
|
||||
0868; // Trinidad/Tobago
|
||||
0880; // Bangladesh
|
||||
0886; // Taiwan
|
||||
0960; // Maldives
|
||||
0961; // Lebanon
|
||||
0962; // Jordan
|
||||
0963; // Syria
|
||||
0964; // Iraq
|
||||
0965; // Kuwait
|
||||
0966; // Saudi Arabia
|
||||
0967; // Yemen Arab Rep.
|
||||
0968; // Oman
|
||||
0971; // United Arab Emirates
|
||||
0972; // Israel
|
||||
0973; // Bahrain
|
||||
0974; // Qatar
|
||||
0975; // Bhutan
|
||||
0976; // Mongolia
|
||||
0977; // Nepal
|
||||
0994; // Azerbaijan
|
||||
0995; // Georgia
|
||||
|
||||
BIN
plat/xapp/ut/xapp_test/conf/conf.rar
Normal file
BIN
plat/xapp/ut/xapp_test/conf/conf.rar
Normal file
Binary file not shown.
BIN
plat/xapp/ut/xapp_test/conf/conv_prefix.conf
Normal file
BIN
plat/xapp/ut/xapp_test/conf/conv_prefix.conf
Normal file
Binary file not shown.
6
plat/xapp/ut/xapp_test/conf/hae_sys.conf
Normal file
6
plat/xapp/ut/xapp_test/conf/hae_sys.conf
Normal file
@@ -0,0 +1,6 @@
|
||||
#HLR/AUC/EIR system configure file
|
||||
|
||||
#IP info of SMSC
|
||||
hlr-0=172.18.234.1;
|
||||
#hlr-1=172.18.133.1;
|
||||
hlr-1=172.54.240.147;
|
||||
20
plat/xapp/ut/xapp_test/conf/help_page
Normal file
20
plat/xapp/ut/xapp_test/conf/help_page
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
******************
|
||||
* HELP PAGE *
|
||||
******************
|
||||
|
||||
Welcome to DEBUG MONITOR.
|
||||
|
||||
Press 's' or 'S' to enter "SUB MODULE SELECTION PAGE".
|
||||
|
||||
In "SUB MODULE SELECTION PAGE",
|
||||
Press 'x' or 'X' to return "HELP PAGE",
|
||||
Press 'a-p' or 'A-P' to select sub module.
|
||||
|
||||
In each sub module, Press '0-9' and 'a-f' to select pages.
|
||||
|
||||
There are two methods to use Debug,
|
||||
1. Serial Port, use PC-to-PC serial line.
|
||||
2. Telnet, use "telnet dst_host_ip 4965".
|
||||
|
||||
$
|
||||
BIN
plat/xapp/ut/xapp_test/conf/hlr_parambit.conf
Normal file
BIN
plat/xapp/ut/xapp_test/conf/hlr_parambit.conf
Normal file
Binary file not shown.
17
plat/xapp/ut/xapp_test/conf/iptrans.conf
Normal file
17
plat/xapp/ut/xapp_test/conf/iptrans.conf
Normal file
@@ -0,0 +1,17 @@
|
||||
#ipconfig for pps
|
||||
#port=type,num,interface
|
||||
#type=UDP/TCP
|
||||
#num=0-6
|
||||
#interface=BUFFER/DIRECT
|
||||
4950=UDP,6,DIRECT
|
||||
4952=UDP,2,BUFFER
|
||||
4953=UDP,3,BUFFER
|
||||
4954=UDP,3,BUFFER
|
||||
4955=UDP,3,BUFFER
|
||||
4957=UDP,4,BUFFER
|
||||
4960=UDP,3,BUFFER
|
||||
4965=TCP,3,BUFFER
|
||||
4969=UDP,3,BUFFER
|
||||
4970=UDP,3,BUFFER
|
||||
4971=UDP,2,BUFFER
|
||||
4972=UDP,2,BUFFER
|
||||
42
plat/xapp/ut/xapp_test/conf/map_acn.conf
Normal file
42
plat/xapp/ut/xapp_test/conf/map_acn.conf
Normal file
@@ -0,0 +1,42 @@
|
||||
#application context name configure file
|
||||
total data length=36
|
||||
|
||||
#application context name data
|
||||
No.1:01 03 // network location update
|
||||
No.2:02 03 // location cancel
|
||||
No.3:03 03 // roaming number enquiry
|
||||
No.4:05 03 // location info retrieval
|
||||
No.5:10 02 // reset context
|
||||
No.6:11 02 // handover control
|
||||
No.7:13 02 // equipment management
|
||||
No.8:14 02 // info retrieval
|
||||
No.9:15 02 // inter VLR info retrieval
|
||||
No.10:16 03 // subscriber data management
|
||||
No.11:17 03 // tracing
|
||||
No.12:18 02 // network functional SS
|
||||
No.13:19 02 // network unstructured SS
|
||||
No.14:20 03 // short message gateway
|
||||
No.15:21 03 // short message MO relay
|
||||
No.16:23 02 // short message alert
|
||||
No.17:24 03 // short message waiting data management
|
||||
No.18:25 03 // mobile terminating short message relay
|
||||
No.19:26 02 // imsi retrieval
|
||||
No.20:27 03 // MS purging
|
||||
No.21:28 03 // subscriber info enquiry
|
||||
No.22:29 03 // any time info enquiry
|
||||
No.23:06 03 // call control transfer
|
||||
No.24:36 03 // invocation notification
|
||||
No.25:12 03 // sIWFS allocation
|
||||
No.26:31 03 // group call control
|
||||
No.27:32 03 // GPRS location update
|
||||
No.28:33 03 // GPRS location info retrieval
|
||||
No.29:34 03 // failure report
|
||||
No.30:35 03 // GPRS notify
|
||||
No.31:07 03 // reporting
|
||||
No.32:08 03 // call completion
|
||||
No.33:200 02 // security triplets (MAP-H defined by Meng Xiaozhen)
|
||||
No.34:201 02 // subscriber interrogate (MAP-H defined by Meng Xiaozhen)
|
||||
No.35:202 02 // HLR subscriber management (MAP-H defined by Meng Xiaozhen)
|
||||
No.36:203 02 // HLR ping AUC (MAP-H defined by Meng Xiaozhen reserved)
|
||||
NO.37:09 01 // Send parameter
|
||||
|
||||
76
plat/xapp/ut/xapp_test/conf/map_operation.conf
Normal file
76
plat/xapp/ut/xapp_test/conf/map_operation.conf
Normal file
@@ -0,0 +1,76 @@
|
||||
# operation code configure file
|
||||
total data length=72
|
||||
|
||||
#operation code
|
||||
No.1:02 01 20 // update location
|
||||
No.2:03 01 10 // cancel location
|
||||
No.3:67 01 20 // purge mobile station
|
||||
No.4:55 01 05 // send identification
|
||||
No.5:68 01 20 // prepare handover
|
||||
No.6:29 03 108000 // send end signal
|
||||
No.7:33 04 05 // process access signalling
|
||||
No.8:34 04 05 // forward access signalling
|
||||
No.9:69 01 20 // prepare subsequent handover
|
||||
No.10:56 01 20 // send authentication info
|
||||
No.11:43 01 20 // check IMEI
|
||||
No.12:07 01 20 // insert subscriber data
|
||||
No.13:08 01 20 // delete subscriber data
|
||||
No.14:37 04 20 // reset
|
||||
No.15:38 04 20 // forward check ss indication
|
||||
No.16:57 01 20 // restore data
|
||||
No.17:50 01 20 // active trace mode
|
||||
No.18:51 01 20 // deactive trace mode
|
||||
No.19:58 01 20 // send imsi
|
||||
No.20:22 01 20 // send routing info
|
||||
No.21:04 01 20 // provide roaming number
|
||||
No.22:06 01 20 // resume call handling
|
||||
No.23:31 01 20 // provide SIWFS number
|
||||
No.24:32 01 20 // SIWFS signalling modify
|
||||
No.25:73 01 20 // set report state
|
||||
No.26:74 01 20 // status report
|
||||
No.27:75 01 60 // remote user free
|
||||
No.28:10 01 20 // register ss
|
||||
No.29:11 01 20 // erase ss
|
||||
No.30:12 01 20 // activate ss
|
||||
No.31:13 01 20 // deactivate ss
|
||||
No.32:14 01 20 // interrogate ss
|
||||
No.33:59 01 600 // process unstructure ss request
|
||||
No.34:60 01 60 // unstructure ss request
|
||||
No.35:61 01 60 // unstructure ss notify
|
||||
No.36:17 01 60 // register password
|
||||
No.37:18 03 20 // get password
|
||||
No.38:76 01 20 // register cc entry
|
||||
No.39:77 01 20 // erase cc entry
|
||||
No.40:45 01 20 // send routing info for sm
|
||||
No.41:46 01 60 // mo forward sm
|
||||
No.42:44 01 60 // mt forward sm
|
||||
No.43:47 01 05 // report sm delivery status
|
||||
No.44:63 04 05 // inform service centre
|
||||
No.45:64 01 05 // alert service center
|
||||
No.46:66 01 05 // ready for sm
|
||||
No.47:70 01 20 // provider subscriber info
|
||||
No.48:71 01 20 // any time interrogation
|
||||
No.49:72 01 20 // ss invocatin notification
|
||||
No.50:39 01 20 // prepare group call
|
||||
No.51:40 03 108000 // send group call end signal
|
||||
No.52:41 04 05 // process group call signalling
|
||||
No.53:42 04 05 // forward group call signalling
|
||||
No.54:23 01 20 // update GPRS location
|
||||
No.55:24 01 20 // send routing info for GPRS
|
||||
No.56:25 01 20 // failure report
|
||||
No.57:26 01 20 // note ms present for GPRS
|
||||
No.58:200 01 05 // security triplets (MAP-H defined by Meng Xiaozhen)
|
||||
No.59:201 01 05 // interrogate subscriber (MAP-H defined by Meng Xiaozhen)
|
||||
No.60:202 01 05 // hlr create subscriber (MAP-H defined by Meng Xiaozhen)
|
||||
No.61:203 01 05 // hlr delete subscriber (MAP-H defined by Meng Xiaozhen)
|
||||
No.62:204 01 05 // hlr ping auc (MAP-H defined by Meng Xiaozhen reserved)
|
||||
No.63:09 01 20 // send parameters
|
||||
No.64:48 01 20 // not subscriber present
|
||||
No.65:19 01 20 // process unstructure SS data
|
||||
No.66:54 01 20 // beging subscriber activity
|
||||
No.67:28 01 20 // perform handover
|
||||
No.68:30 01 20 // perform subsequence handvoer
|
||||
No.69:35 01 20 // note internal handover
|
||||
No.70:54 01 20 // beging subscriber activity
|
||||
No.71:49 01 20 // alert service center without result
|
||||
No.72:52 01 20 // trace subscriber activity
|
||||
13
plat/xapp/ut/xapp_test/conf/menu_page
Normal file
13
plat/xapp/ut/xapp_test/conf/menu_page
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
*******************
|
||||
* MENU PAGE *
|
||||
*******************
|
||||
|
||||
a -- IPTR i -- HLR
|
||||
b -- MTP3 j -- SMSC
|
||||
c -- SCCP k -- PPS
|
||||
d -- TCAP l -- SNMP
|
||||
e -- XAPP m --
|
||||
f -- MSC n -- DEBUG
|
||||
g -- VLR o -- AUC
|
||||
h -- p -- EIR
|
||||
1408
plat/xapp/ut/xapp_test/conf/mtp3.conf
Normal file
1408
plat/xapp/ut/xapp_test/conf/mtp3.conf
Normal file
File diff suppressed because it is too large
Load Diff
BIN
plat/xapp/ut/xapp_test/conf/ppsConf.txt
Normal file
BIN
plat/xapp/ut/xapp_test/conf/ppsConf.txt
Normal file
Binary file not shown.
37
plat/xapp/ut/xapp_test/conf/profile
Normal file
37
plat/xapp/ut/xapp_test/conf/profile
Normal file
@@ -0,0 +1,37 @@
|
||||
# /etc/profile
|
||||
|
||||
# System wide environment and startup programs
|
||||
# Functions and aliases go in /etc/bashrc
|
||||
|
||||
PATH=".:$PATH:/sbin:/usr/sbin:/usr/X11R6/bin:/etc/rc.d/init.d:/usr/local/wxc2/bin"
|
||||
PATH=/usr/java/jdk1.3/bin:$PATH
|
||||
|
||||
ulimit -c 80000
|
||||
if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then
|
||||
umask 002
|
||||
else
|
||||
umask 022
|
||||
fi
|
||||
|
||||
USER=`id -un`
|
||||
LOGNAME=$USER
|
||||
MAIL="/var/spool/mail/$USER"
|
||||
|
||||
HOSTNAME=`/bin/hostname`
|
||||
HISTSIZE=1000
|
||||
|
||||
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
|
||||
INPUTRC=/etc/inputrc
|
||||
fi
|
||||
JAVA_COMPILER=javacomp ; export JAVA_COMPILER
|
||||
LD_LIBRARY_PATH=/usr/local/mysql/lib ; export LD_LIBRARY_PATH
|
||||
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
|
||||
|
||||
for i in /etc/profile.d/*.sh ; do
|
||||
if [ -x $i ]; then
|
||||
. $i
|
||||
fi
|
||||
done
|
||||
|
||||
unset i
|
||||
PATH=/usr/local/wxc2/bin:$PATH
|
||||
26
plat/xapp/ut/xapp_test/conf/sccp.conf
Normal file
26
plat/xapp/ut/xapp_test/conf/sccp.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
#SCCP Config file (R8V0_03)
|
||||
|
||||
[Local Node]
|
||||
#ssn NetID msisdn ip0 ip1
|
||||
4 2 - 172.18.128.1 172.18.129.1
|
||||
6 2 8675557122002 172.18.199.1 -
|
||||
7 2 8675557122001 172.18.198.1 -
|
||||
8 2 8675599999999 172.18.234.3 172.18.99.1
|
||||
9 2 86755920005 172.18.132.1 172.18.99.1
|
||||
10 2 86755920004 172.18.132.1 172.18.99.1
|
||||
11 2 86755920006 172.18.132.1 172.18.99.1
|
||||
19 2 86755920007 172.18.132.1 172.18.99.1
|
||||
20 2 86755920008 172.18.132.1 172.18.99.1
|
||||
21 2 86755920009 172.18.132.1 172.18.99.1
|
||||
22 2 867559000213 172.18.132.1 -
|
||||
146 2 86755920011 172.18.132.1 172.18.99.1
|
||||
147 2 86755920010 172.18.132.1 172.18.99.1
|
||||
254 2 - 172.18.132.1 172.18.99.1
|
||||
[GTT_Table]
|
||||
#No NP StartDigits EndDigits NI SPC SSN RI AI S E N Rep
|
||||
0 6 460020000000000 460029999999999 2 000028 6 0 7
|
||||
#1 1 8675590000000 8675599999998 2 000028 6 0 7
|
||||
|
||||
[RL_SSN]
|
||||
#NetID DPC SSN
|
||||
|
||||
21
plat/xapp/ut/xapp_test/conf/smsc_csta.conf
Normal file
21
plat/xapp/ut/xapp_test/conf/smsc_csta.conf
Normal file
@@ -0,0 +1,21 @@
|
||||
# This file defines the SMSC CSTA row
|
||||
# The max number of row is 20
|
||||
# Attention: When you want to define the Entity name, the name of "MS" "All" and "Other" is reserved
|
||||
|
||||
# define the entity who send short message to SMSC
|
||||
Receive from:
|
||||
MS
|
||||
PPS
|
||||
VMS
|
||||
#VMS+PPS
|
||||
Other
|
||||
#All
|
||||
|
||||
# define the entity who receive short message from SMSC
|
||||
Send to:
|
||||
MS
|
||||
PPS
|
||||
VMS
|
||||
#VMS+PPS
|
||||
Other
|
||||
#All
|
||||
BIN
plat/xapp/ut/xapp_test/conf/smsc_parambit.conf
Normal file
BIN
plat/xapp/ut/xapp_test/conf/smsc_parambit.conf
Normal file
Binary file not shown.
5
plat/xapp/ut/xapp_test/conf/smsc_sys.conf
Normal file
5
plat/xapp/ut/xapp_test/conf/smsc_sys.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
#SMSC system configure file
|
||||
|
||||
#IP info of SMSC
|
||||
wxc2-0=172.18.98.1;
|
||||
wxc2-1=172.18.99.1;
|
||||
BIN
plat/xapp/ut/xapp_test/conf/system.ini
Normal file
BIN
plat/xapp/ut/xapp_test/conf/system.ini
Normal file
Binary file not shown.
BIN
plat/xapp/ut/xapp_test/conf/system.ini.100k
Normal file
BIN
plat/xapp/ut/xapp_test/conf/system.ini.100k
Normal file
Binary file not shown.
BIN
plat/xapp/ut/xapp_test/conf/system.ini.30K
Normal file
BIN
plat/xapp/ut/xapp_test/conf/system.ini.30K
Normal file
Binary file not shown.
BIN
plat/xapp/ut/xapp_test/conf/system.inimscvlrhlr
Normal file
BIN
plat/xapp/ut/xapp_test/conf/system.inimscvlrhlr
Normal file
Binary file not shown.
1
plat/xapp/ut/xapp_test/conf/wxc2_sys.conf
Normal file
1
plat/xapp/ut/xapp_test/conf/wxc2_sys.conf
Normal file
@@ -0,0 +1 @@
|
||||
pps-1=172.18.98.1;
|
||||
4
plat/xapp/ut/xapp_test/conf/wxc2exit.txt
Normal file
4
plat/xapp/ut/xapp_test/conf/wxc2exit.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
WXC2 procedure exit log
|
||||
Time: Fri Nov 5 05:27:51 2004
|
||||
|
||||
Now module: MSC
|
||||
BIN
plat/xapp/ut/xapp_test/conf/xap_sysparam.conf
Normal file
BIN
plat/xapp/ut/xapp_test/conf/xap_sysparam.conf
Normal file
Binary file not shown.
2
plat/xapp/ut/xapp_test/conf/xapp_test.conf
Normal file
2
plat/xapp/ut/xapp_test/conf/xapp_test.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
172.18.199.1
|
||||
2000
|
||||
652
plat/xapp/ut/xapp_test/xapp_coding_test.c
Normal file
652
plat/xapp/ut/xapp_test/xapp_coding_test.c
Normal file
@@ -0,0 +1,652 @@
|
||||
/* XAPP coding test function c file */
|
||||
/* created by Liu Wei 2006-01-13 */
|
||||
/* Version 1.0 */
|
||||
/* ------------------------------------- */
|
||||
|
||||
#include "xapp_coding_test.h"
|
||||
#include "xapp_main.h"
|
||||
|
||||
CAP_Message CAP_Com_OpenResponse = {
|
||||
{0, 16}
|
||||
,
|
||||
CAP_FLAG,
|
||||
{0, 0, 0}
|
||||
,
|
||||
{0, 0, 0}
|
||||
,
|
||||
CAP_O_OPEN, //CAP_O_OPEN,
|
||||
CAP_RESPONSE, //RESPONSE,
|
||||
{2, //RESULT=accept
|
||||
1, //
|
||||
1, //acn tag
|
||||
2, //len
|
||||
50, //acn
|
||||
2, //acn version
|
||||
0,} //end flag
|
||||
};
|
||||
|
||||
CAP_Message CAP_Com_End = {
|
||||
{0, 12}
|
||||
,
|
||||
CAP_FLAG,
|
||||
{0, 0, 0}
|
||||
,
|
||||
{0, 0, 0}
|
||||
,
|
||||
CAP_O_END, //CAP_O_END,
|
||||
CAP_REQUEST, //REQUEST,
|
||||
{1, //release method
|
||||
0, //optional part
|
||||
0,}
|
||||
};
|
||||
|
||||
int bcd_hton(BYTE * netbcd, const BYTE * hostbcd, BYTE max_octet)
|
||||
{
|
||||
int i;
|
||||
BYTE bcd_h, bcd_l;
|
||||
|
||||
for(i = 0; i < max_octet; i++)
|
||||
{
|
||||
if((bcd_h = hostbcd[i] >> 4) == 0x0f)
|
||||
return i * 2;
|
||||
else if((bcd_l = hostbcd[i] & 0x0f) == 0x0f)
|
||||
{
|
||||
netbcd[i] = bcd_h & 0x0f;
|
||||
return i * 2 + 1;
|
||||
}
|
||||
else
|
||||
netbcd[i] = (bcd_l << 4) | bcd_h;
|
||||
}
|
||||
return i * 2;
|
||||
}
|
||||
|
||||
/* end by "F" */
|
||||
int bcd_ntoh(BYTE * hostbcd, const BYTE * netbcd, BYTE max_octet)
|
||||
{
|
||||
int i;
|
||||
int bcd_h, bcd_l;
|
||||
|
||||
for(i = 0; i < max_octet; i++)
|
||||
{
|
||||
if((bcd_h = netbcd[i] & 0x0f) == 0x0f)
|
||||
{
|
||||
memset(&hostbcd[i], 0xff, max_octet - i);
|
||||
return i * 2;
|
||||
}
|
||||
else if((bcd_l = netbcd[i] >> 4) == 0x0f)
|
||||
{
|
||||
hostbcd[i] = (bcd_h << 4) | 0x0f;
|
||||
memset(&hostbcd[i + 1], 0xff, max_octet - i - 1);
|
||||
return i * 2 + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
hostbcd[i] = (bcd_h << 4) | bcd_l;
|
||||
}
|
||||
}
|
||||
return i * 2;
|
||||
}
|
||||
|
||||
void isdn_aton(u8 *normal_isdn,u8 *anti_isdn)
|
||||
{
|
||||
u8 ii;
|
||||
u8 aa=0,bb=0;
|
||||
u8 isdn_len;
|
||||
|
||||
isdn_len = anti_isdn[0];
|
||||
if (isdn_len > ISDN_LEN)
|
||||
isdn_len = ISDN_LEN;
|
||||
normal_isdn[0] = anti_isdn[1];
|
||||
for (ii = 1;ii < isdn_len;ii ++)
|
||||
{
|
||||
if ((anti_isdn[ii+1] & 0x0f) >= 0x0e)
|
||||
break;
|
||||
aa = (anti_isdn[ii+1] & 0x0f0) >> 4;
|
||||
if (aa > 0x0c)
|
||||
aa = 0x0e;
|
||||
bb = anti_isdn[ii+1] & 0x0f;
|
||||
normal_isdn[ii] = (bb << 4) + aa;
|
||||
}
|
||||
for (;ii < ISDN_LEN;ii ++)
|
||||
normal_isdn[ii] = 0x0ee;
|
||||
}
|
||||
|
||||
void imsi_aton(u8 *normal_imsi,u8 *anti_imsi)
|
||||
{ // the IMSI must 15 digits
|
||||
u8 ii;
|
||||
u8 aa,bb=0;
|
||||
|
||||
normal_imsi[0] = 0;
|
||||
for (ii = 0;ii < IMSI_LEN*2;ii++)
|
||||
{
|
||||
if ((ii % 2) == 1)
|
||||
{
|
||||
aa = anti_imsi[ii/2] & 0x0f;
|
||||
normal_imsi[ii/2] |= aa;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ii/2 != IMSI_LEN -1)
|
||||
{
|
||||
bb = anti_imsi[ii/2] & 0x0f0;
|
||||
normal_imsi[ii/2+1] = bb;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* transfer IMSI format from normal to anti sequence */
|
||||
/* 0460022157127001 --> 64002251177200f1 */
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
void imsi_ntoa(u8 *anti_imsi,u8 *normal_imsi)
|
||||
{
|
||||
u8 ii;
|
||||
u8 aa,bb=0;
|
||||
|
||||
for (ii = 1;ii <= IMSI_LEN*2;ii++)
|
||||
{
|
||||
if ((ii % 2) == 1)
|
||||
bb = normal_imsi[ii/2] & 0x0f;
|
||||
else
|
||||
{
|
||||
if (ii == IMSI_LEN * 2)
|
||||
aa = 0x0f0;
|
||||
else
|
||||
aa = normal_imsi[ii/2] & 0x0f0;
|
||||
anti_imsi[ii/2-1] = aa | bb;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* transfer IMSI format from normal to ascii string */
|
||||
/* 0460022157127001 --> "460022157127001" */
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
void imsi_ntos(u8 *str_imsi,u8 *normal_imsi)
|
||||
{
|
||||
u8 len;
|
||||
u8 ii,jj;
|
||||
|
||||
str_imsi[0] = (normal_imsi[0] & 0x0f) + '0';
|
||||
len = 1;
|
||||
for (ii = 1;ii < IMSI_LEN;ii ++)
|
||||
{
|
||||
jj = (normal_imsi[ii] >> 4) & 0x0f;
|
||||
str_imsi[len++] = jj + '0';
|
||||
jj = normal_imsi[ii] & 0x0f;
|
||||
str_imsi[len++] = jj + '0';
|
||||
}
|
||||
str_imsi[len] = '\0';
|
||||
}
|
||||
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* transfer IMSI format from ascii string to normal */
|
||||
/* "460022157127001" --> 0460022157127001 */
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
void imsi_ston(u8 *normal_imsi,u8 *str_imsi)
|
||||
{
|
||||
if (strlen(str_imsi) != IMSI_LEN*2-1)
|
||||
return;
|
||||
normal_imsi[0] = str_imsi[0] - '0';
|
||||
AsciiToBcd(normal_imsi+1,str_imsi+1,IMSI_LEN*2-2);
|
||||
}
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* transfer ISDN format from normal to ascii string */
|
||||
/* 918675557127001EEE --> "8675557127001" */
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
void isdn_ntos(u8 *str_isdn,u8 *normal_isdn)
|
||||
{
|
||||
u8 len = 0;
|
||||
u8 ii,jj;
|
||||
|
||||
for (ii = 1;ii < ISDN_LEN;ii ++)
|
||||
{
|
||||
jj = (normal_isdn[ii] >> 4) & 0x0f;
|
||||
if (jj > 0x0c)
|
||||
break;
|
||||
str_isdn[len++] = jj + '0';
|
||||
jj = normal_isdn[ii] & 0x0f;
|
||||
if (jj > 0x0c)
|
||||
break;
|
||||
str_isdn[len++] = jj + '0';
|
||||
}
|
||||
str_isdn[len] = '\0';
|
||||
}
|
||||
|
||||
void isdn_ntoa(u8 * anti_isdn, u8 * normal_isdn)
|
||||
{
|
||||
u8 ii;
|
||||
u8 aa = 0, bb = 0;
|
||||
u8 len;
|
||||
|
||||
anti_isdn[1] = normal_isdn[0]; // nature of address and numbering plan indicator
|
||||
len = 1;
|
||||
for(ii = 1; ii < ISDN_LEN; ii++)
|
||||
{
|
||||
if(normal_isdn[ii] == 0xee)
|
||||
break;
|
||||
else
|
||||
{
|
||||
aa = (normal_isdn[ii] & 0x0f0) >> 4;
|
||||
bb = normal_isdn[ii] & 0x0f;
|
||||
if(bb > 0x0c)
|
||||
bb = 0x0f;
|
||||
anti_isdn[ii + 1] = (bb << 4) + aa;
|
||||
len++;
|
||||
}
|
||||
}
|
||||
anti_isdn[0] = len;
|
||||
}
|
||||
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
/* transfer ISDN format from ascii string to normal */
|
||||
/* "8675557127001" --> 918675557127001EEE */
|
||||
/* return value: 0--string has error; 1--success */
|
||||
/* +++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
u8 isdn_ston(u8 *normal_isdn,u8 *str_isdn)
|
||||
{
|
||||
u8 ii;
|
||||
u8 len;
|
||||
|
||||
len = strlen(str_isdn);
|
||||
if (len > ISDN_LEN*2-2)
|
||||
return 0;
|
||||
if ((len % 2) == 1) // odd number
|
||||
{
|
||||
AsciiToBcd(normal_isdn+1,str_isdn,len-1);
|
||||
ii = len/2 + 1;
|
||||
normal_isdn[ii] = (str_isdn[len-1] - '0') << 4;
|
||||
normal_isdn[ii] |= 0x0E;
|
||||
}
|
||||
else
|
||||
{
|
||||
AsciiToBcd(normal_isdn+1,str_isdn,len);
|
||||
ii = len/2;
|
||||
}
|
||||
memset(normal_isdn+ii+1,0xEE,ISDN_LEN-ii-1);
|
||||
normal_isdn[0] = 0x91; // default value
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
u8 set_gtai_isdn(u8 * gtai, u8 * isdn)
|
||||
{
|
||||
u8 temp_buf[32];
|
||||
u8 ii;
|
||||
u8 len;
|
||||
|
||||
isdn_ntoa(temp_buf, isdn);
|
||||
ii = temp_buf[0];
|
||||
memcpy(gtai, temp_buf + 2, ii - 1);
|
||||
if((temp_buf[ii] & 0x0f0) == 0x0f0)
|
||||
len = ii * 2 - 3;
|
||||
else
|
||||
len = ii * 2 - 2;
|
||||
return len;
|
||||
}
|
||||
|
||||
void xapp_set_sccpadd(u8 ssn, u8 * gtt_num, struct SCCP_ADDRESS *sccp_add)
|
||||
{
|
||||
sccp_add->DPC = 0; // set SCCP address
|
||||
sccp_add->NetID = 4;
|
||||
sccp_add->SSN = ssn;
|
||||
sccp_add->RI = 0;
|
||||
sccp_add->GTI = 0x04;
|
||||
sccp_add->TT = 0;
|
||||
sccp_add->NAI = 4;
|
||||
sccp_add->NP = 1; // MSISDN
|
||||
sccp_add->len = set_gtai_isdn(sccp_add->GTAI, gtt_num);
|
||||
}
|
||||
|
||||
u8 get_mapp_open(struct MapComSrv_struct *com_ptr, u8 ssn)
|
||||
{
|
||||
u8 data_flow[1024];
|
||||
|
||||
if(!map_get_open(data_flow, ssn))
|
||||
return 0;
|
||||
if(!map_com_ftos(com_ptr, data_flow))
|
||||
return 0;
|
||||
printf("-->>: Recv OpenInd !\r\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 send_mapp_comdata(struct MapComSrv_struct * com_ptr, u8 DelimiterFlag)
|
||||
{
|
||||
u8 data_flow[1024];
|
||||
|
||||
map_com_stof(com_ptr, data_flow, DelimiterFlag);
|
||||
return map_send_comdata(data_flow);
|
||||
}
|
||||
|
||||
u8 recv_mapp_comdata(struct MapComSrv_struct * com_ptr, u32 did)
|
||||
{
|
||||
u8 data_flow[1024];
|
||||
|
||||
if(!map_get_comdata(data_flow, did))
|
||||
return 0;
|
||||
if(!map_com_ftos(com_ptr, data_flow))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int send_mapp_oprdata(struct MapOprData_struct *opr_ptr, u8 DelimiterFlag)
|
||||
{
|
||||
u8 data_flow[1024];
|
||||
|
||||
map_opr_stof(opr_ptr, data_flow, DelimiterFlag);
|
||||
return map_send_oprdata(data_flow);
|
||||
}
|
||||
|
||||
int recv_mapp_oprdata(struct MapOprData_struct *opr_ptr, u32 did)
|
||||
{
|
||||
u8 data_flow[1024];
|
||||
|
||||
if(!map_get_oprdata(data_flow, did))
|
||||
return 0;
|
||||
if(!map_opr_ftos(opr_ptr, data_flow))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int send_mapp_open_req(WORD dialog_id)
|
||||
{
|
||||
struct MapComSrv_struct map_com;
|
||||
|
||||
map_com.message_type = MAP_OPEN;
|
||||
map_com.message_flag = MAP_REQUEST;
|
||||
map_com.port_id = 0;
|
||||
map_com.dialogue_id = test_xapp.did;
|
||||
map_com.dlg_list.open_arg.acn_data.acn = 0;
|
||||
map_com.dlg_list.open_arg.acn_data.acn_ver = 1;
|
||||
memcpy(&map_com.dlg_list.open_arg.local_add, &test_xapp.local_add, sizeof(SCCP_ADDR));
|
||||
memcpy(&map_com.dlg_list.open_arg.peer_add, &test_xapp.peer_add, sizeof(SCCP_ADDR));
|
||||
map_com.dlg_list.open_arg.param_flag = 0x0b;
|
||||
send_mapp_comdata(&map_com, 1);
|
||||
printf("<<--: Send OpenReq !\r\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
int send_mapp_open_conf()
|
||||
{
|
||||
struct MapComSrv_struct map_com;
|
||||
struct MapOpen_Res *open_res;
|
||||
|
||||
map_com.message_type = MAP_OPEN;
|
||||
map_com.message_flag = MAP_RESPONSE;
|
||||
map_com.port_id = 0;
|
||||
map_com.dialogue_id = test_xapp.did;
|
||||
map_com.dlg_list.open_arg.acn_data.acn = 0;
|
||||
map_com.dlg_list.open_arg.acn_data.acn_ver = 1;
|
||||
memcpy(&map_com.dlg_list.open_arg.local_add, &test_xapp.local_add, sizeof(SCCP_ADDR));
|
||||
memcpy(&map_com.dlg_list.open_arg.peer_add, &test_xapp.peer_add, sizeof(SCCP_ADDR));
|
||||
open_res = (MapOpen_Res *) & map_com.dlg_list.open_res;
|
||||
open_res->result = OpenResultAccept;
|
||||
open_res->param_flag = 0x08;
|
||||
if(send_mapp_comdata(&map_com, 1))
|
||||
{
|
||||
printf("<<--: Send OpenConf !\r\n");
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int send_mapp_close(WORD dialog_id)
|
||||
{
|
||||
|
||||
struct MapComSrv_struct map_com;
|
||||
|
||||
map_com.message_type = MAP_CLOSE;
|
||||
map_com.message_flag = MAP_REQUEST;
|
||||
map_com.port_id = 0;
|
||||
map_com.dialogue_id = test_xapp.did;
|
||||
map_com.dlg_list.open_arg.acn_data.acn_ver = 1;
|
||||
memcpy(&map_com.dlg_list.open_arg.local_add, &test_xapp.local_add, sizeof(SCCP_ADDR));
|
||||
memcpy(&map_com.dlg_list.open_arg.peer_add, &test_xapp.peer_add, sizeof(SCCP_ADDR));
|
||||
map_com.dlg_list.close_arg.release_method = NormalRelease;
|
||||
map_com.dlg_list.close_arg.param_flag = 0x01;
|
||||
send_mapp_comdata(&map_com, 1);
|
||||
printf("<<--: Send Close !\r\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 get_capp_open(struct MapComSrv_struct * com_ptr, u8 ssn)
|
||||
{
|
||||
u8 data_flow[1024];
|
||||
|
||||
if(!cap_get_open(data_flow, ssn))
|
||||
return 0;
|
||||
if(!cap_com_ftos(com_ptr, data_flow))
|
||||
return 0;
|
||||
printf("-->>: Recv OpenInd !\r\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 send_capp_comdata(struct MapComSrv_struct * com_ptr, u8 DelimiterFlag)
|
||||
{
|
||||
u8 data_flow[1024];
|
||||
|
||||
cap_com_stof(com_ptr, data_flow, DelimiterFlag);
|
||||
return cap_send_comdata(data_flow);
|
||||
}
|
||||
|
||||
u8 recv_capp_comdata(struct MapComSrv_struct * com_ptr, u32 did)
|
||||
{
|
||||
u8 data_flow[1024];
|
||||
|
||||
if(!cap_get_comdata(data_flow, did))
|
||||
return 0;
|
||||
if(!cap_com_ftos(com_ptr, data_flow))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int send_capp_oprdata(struct MapOprData_struct *opr_ptr, u8 DelimiterFlag)
|
||||
{
|
||||
u8 data_flow[1024];
|
||||
|
||||
cap_opr_stof(opr_ptr, data_flow, DelimiterFlag);
|
||||
return cap_send_oprdata(data_flow);
|
||||
}
|
||||
|
||||
int recv_capp_oprdata(struct MapOprData_struct *opr_ptr, u32 did)
|
||||
{
|
||||
u8 data_flow[1024];
|
||||
|
||||
if(!cap_get_oprdata(data_flow, did))
|
||||
return 0;
|
||||
if(!cap_opr_ftos(opr_ptr, data_flow))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
u8 send_capp_oprdata(CAP_Message *pcapmsg , u8 len)
|
||||
{
|
||||
pcapmsg->msgOperaCode = test_xapp.operation_type;
|
||||
pcapmsg->msgServiceCode = 0x8a;
|
||||
pcapmsg->msgOperaType = MAP_REQUEST;
|
||||
pcapmsg->msgContent[0] = test_xapp.invoke_id;
|
||||
pcapmsg->msgContent[1] = 1; //pointer to paramter
|
||||
pcapmsg->msgContent[2] = 1; //Tag of parameter
|
||||
pcapmsg->msgContent[3] = 0; //length1
|
||||
pcapmsg->msgContent[4] = len; //length2
|
||||
pcapmsg->msgContent[5 + len] = 0x10; //delimiter
|
||||
pcapmsg->msgContent[6 + len] = 0;
|
||||
pcapmsg->msgContent[7 + len] = 0;
|
||||
|
||||
pcapmsg->msgLength[0] = 0;
|
||||
pcapmsg->msgLength[1] = 17 + len;
|
||||
if(!cap_send_oprdata((char *)pcapmsg))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 recv_capp_oprdata(CAP_Message *capmsg , u32 did)
|
||||
{
|
||||
return cap_get_oprdata((unsigned char *)capmsg, did);
|
||||
}
|
||||
*/
|
||||
int send_capp_open_req(unsigned char acn, unsigned char acn_v, unsigned short dlgid)
|
||||
{
|
||||
struct MapComSrv_struct map_com;
|
||||
|
||||
map_com.message_type = CAP_O_OPEN;
|
||||
map_com.message_flag = CAP_REQUEST;
|
||||
map_com.port_id = 0;
|
||||
map_com.dialogue_id = test_xapp.did;
|
||||
map_com.dlg_list.open_arg.acn_data.acn = acn;
|
||||
map_com.dlg_list.open_arg.acn_data.acn_ver = 1;
|
||||
memcpy(&map_com.dlg_list.open_arg.local_add, &test_xapp.local_add, sizeof(SCCP_ADDR));
|
||||
memcpy(&map_com.dlg_list.open_arg.peer_add, &test_xapp.peer_add, sizeof(SCCP_ADDR));
|
||||
map_com.dlg_list.open_arg.param_flag = 0x0b;
|
||||
send_capp_comdata(&map_com, 1);
|
||||
printf("<<--: Send OpenReq !\r\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
void send_capp_open_conf(unsigned char acn, unsigned char acn_v, unsigned short dlgid)
|
||||
{
|
||||
CAP_Message capmsg;
|
||||
|
||||
memcpy(&capmsg, &CAP_Com_OpenResponse, 18);
|
||||
capmsg.dialogue_id[0] = dlgid >> 8;
|
||||
capmsg.dialogue_id[1] = dlgid;
|
||||
capmsg.msgContent[4] = acn;
|
||||
capmsg.msgContent[5] = acn_v;
|
||||
cap_send_comdata((unsigned char *)&capmsg);
|
||||
}
|
||||
|
||||
void send_capp_close(unsigned short dlgid)
|
||||
{
|
||||
CAP_Message capmsg;
|
||||
|
||||
memcpy(&capmsg, &CAP_Com_End, 14);
|
||||
capmsg.dialogue_id[0] = dlgid >> 8;
|
||||
capmsg.dialogue_id[1] = dlgid;
|
||||
cap_send_comdata((unsigned char *)&capmsg);
|
||||
}
|
||||
|
||||
int build_xapp_msg()
|
||||
{
|
||||
if(test_xapp.xapp_type)
|
||||
{
|
||||
int len;
|
||||
struct CapArg *cap_opr;
|
||||
struct MapOprData_struct *data_ptr;
|
||||
u8 buf[1024];
|
||||
|
||||
cap_opr = &test_xapp.xapp.capp.cap_opr;
|
||||
data_ptr = &test_xapp.xapp.capp.data_ptr;
|
||||
|
||||
data_ptr->port_id = cap_opr->port_id;
|
||||
data_ptr->dialogue_id = cap_opr->dialogue_id;
|
||||
data_ptr->invoke_id = cap_opr->invoke_id;
|
||||
data_ptr->message_type = cap_opr->ocode;
|
||||
data_ptr->message_flag = cap_opr->message_flag;
|
||||
data_ptr->param_flag = 0x1f;
|
||||
|
||||
len = encode_capmsg(*cap_opr, buf, MAX_MAPPOPR_LEN);
|
||||
if(len == 0 || len > MAX_MAPPOPR_LEN)
|
||||
return 0;
|
||||
data_ptr->param_len = len;
|
||||
|
||||
memcpy(data_ptr->param, buf, len);
|
||||
data_ptr->param_flag |= 0x20;
|
||||
return len;
|
||||
}
|
||||
else
|
||||
{
|
||||
struct MapOprData_struct *data_ptr;
|
||||
struct MapOprSrv_struct *srv_ptr;
|
||||
int len;
|
||||
u8 buf[1024];
|
||||
|
||||
data_ptr = &test_xapp.xapp.mapp.data_ptr;
|
||||
srv_ptr = &test_xapp.xapp.mapp.map_opr;
|
||||
|
||||
data_ptr->port_id = srv_ptr->port_id;
|
||||
data_ptr->dialogue_id = srv_ptr->dialogue_id;
|
||||
data_ptr->invoke_id = srv_ptr->invoke_id;
|
||||
data_ptr->message_type = srv_ptr->message_type;
|
||||
data_ptr->message_flag = srv_ptr->message_flag;
|
||||
//data_ptr->linked_id =1;
|
||||
data_ptr->param_flag = 0x1f;
|
||||
|
||||
len = build_mapparam(srv_ptr, buf);
|
||||
if(len == 0 || len > MAX_MAPPOPR_LEN)
|
||||
return 0;
|
||||
data_ptr->param_len = len;
|
||||
|
||||
memcpy(data_ptr->param, buf, len);
|
||||
data_ptr->param_flag |= 0x20;
|
||||
return len;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int extract_xapp_msg()
|
||||
{
|
||||
if(test_xapp.xapp_type)
|
||||
{
|
||||
int len;
|
||||
struct CapArg *cap_opr;
|
||||
struct MapOprData_struct *data_ptr;
|
||||
|
||||
data_ptr = &test_xapp.xapp.capp.data_ptr;
|
||||
cap_opr = &test_xapp.xapp.capp.cap_opr;
|
||||
|
||||
cap_opr->port_id = data_ptr->port_id;
|
||||
cap_opr->dialogue_id = data_ptr->dialogue_id;
|
||||
cap_opr->invoke_id = data_ptr->invoke_id;
|
||||
cap_opr->ocode = data_ptr->message_type;
|
||||
cap_opr->message_flag = data_ptr->message_flag;
|
||||
|
||||
decode_capmsg(data_ptr->param, data_ptr->param_len, cap_opr->ocode, cap_opr->message_flag, cap_opr);
|
||||
return len;
|
||||
}
|
||||
else
|
||||
{
|
||||
struct MapOprData_struct *data_ptr;
|
||||
struct MapOprSrv_struct *srv_ptr;
|
||||
|
||||
data_ptr = &test_xapp.xapp.mapp.data_ptr;
|
||||
srv_ptr = &test_xapp.xapp.mapp.map_opr;
|
||||
|
||||
srv_ptr->port_id = data_ptr->port_id;
|
||||
srv_ptr->dialogue_id = data_ptr->dialogue_id;
|
||||
srv_ptr->invoke_id = data_ptr->invoke_id;
|
||||
srv_ptr->message_type = data_ptr->message_type;
|
||||
srv_ptr->message_flag = data_ptr->message_flag;
|
||||
if(!(data_ptr->param_flag & 0x20)) // has not parameter
|
||||
return RER;
|
||||
extract_mapparam(srv_ptr, data_ptr->message_type, data_ptr->message_flag, data_ptr->param_len, data_ptr->param);
|
||||
return ROK;
|
||||
}
|
||||
return RER;
|
||||
}
|
||||
|
||||
|
||||
void extract_sri()
|
||||
{
|
||||
struct MapOprSrv_struct opr_ptr;
|
||||
u8 opr_code = SndRoutInfo;
|
||||
u8 opr_flag = MAP_CONFIRM;
|
||||
u32 pre_param_len= 21;
|
||||
u8 *pre_param;
|
||||
u8 buf[256],temp_buf[256];
|
||||
u8 str[256]="A313890864009200000083F10407916857951230F7";
|
||||
|
||||
Str2Bcd( buf ,str ,pre_param_len );
|
||||
|
||||
|
||||
Bcd2Str_Space(temp_buf, str,pre_param_len);
|
||||
printf("\r\nextract code :[%d] len :[%ld]\r\n%s\r\n",opr_code,pre_param_len,str);
|
||||
|
||||
pre_param = (u8*)&buf;
|
||||
opr_ptr.version =3;
|
||||
extract_mapparam( &opr_ptr, opr_code , opr_flag , pre_param_len , pre_param );
|
||||
|
||||
}
|
||||
105
plat/xapp/ut/xapp_test/xapp_coding_test.h
Normal file
105
plat/xapp/ut/xapp_test/xapp_coding_test.h
Normal file
@@ -0,0 +1,105 @@
|
||||
/* XAPP coding test function head file */
|
||||
/* created by Liu Wei 2006-01-13 */
|
||||
/* Version 1.0 */
|
||||
/* ------------------------------------- */
|
||||
|
||||
#include "xapp_main.h"
|
||||
|
||||
#ifndef _XAPP_CODING_TEST_
|
||||
|
||||
#define _XAPP_CODING_TEST_
|
||||
|
||||
struct mapp_struct
|
||||
{
|
||||
struct MapOprSrv_struct map_opr;
|
||||
struct MapOprData_struct data_ptr;
|
||||
//struct MapOprData_struct data_ptr_bak;
|
||||
struct MapComSrv_struct com_ptr;
|
||||
};
|
||||
|
||||
typedef struct _CAP_Message
|
||||
{
|
||||
unsigned char msgLength[2]; /* unsigned char0 is the higher part */
|
||||
unsigned char msgServiceCode; /* fixed as 0xAF */
|
||||
unsigned char port_id[3]; /* unsigned char 0 is the higher part,unsigned char 1 is the lower part ,and unsigned char 2 is reserved */
|
||||
unsigned char dialogue_id[3];
|
||||
unsigned char msgOperaCode; /* message type code ,e.g , InitialDP = 0x00 */
|
||||
unsigned char msgOperaType; /* 1/2/3/4 = request, indicate, response, confirm */
|
||||
unsigned char msgContent[CAP_CONTENT_LEN];
|
||||
/* if the message if cap operation ,then the first unsigned char of msgContent is invoke id */
|
||||
}
|
||||
CAP_Message, *PCAP_Message;
|
||||
|
||||
struct capp_struct
|
||||
{
|
||||
struct CapArg cap_opr;
|
||||
struct MapOprData_struct data_ptr;
|
||||
struct MapComSrv_struct com_ptr;
|
||||
//CAP_Message capmsg;
|
||||
};
|
||||
|
||||
struct test_xapp_struct
|
||||
{
|
||||
int sock;
|
||||
u8 fsm_state;
|
||||
u8 did;
|
||||
u8 invoke_id;
|
||||
u8 xapp_type;
|
||||
u8 ms_mode;
|
||||
u8 test_result;
|
||||
u8 operation_type;
|
||||
u8 local_ssn;
|
||||
u8 peer_ssn;
|
||||
u8 peer_state;
|
||||
u32 wait_time;
|
||||
struct SCCP_ADDRESS local_add;
|
||||
struct SCCP_ADDRESS peer_add;
|
||||
union
|
||||
{
|
||||
struct mapp_struct mapp;
|
||||
struct capp_struct capp;
|
||||
}
|
||||
xapp;
|
||||
}
|
||||
test_xapp;
|
||||
|
||||
enum XAPP_TEST_OP test_cmd;
|
||||
int bcd_hton(BYTE * netbcd, const BYTE * hostbcd, BYTE max_octet);
|
||||
int bcd_ntoh(BYTE * hostbcd, const BYTE * netbcd, BYTE max_octet);
|
||||
void isdn_aton(u8 *normal_isdn,u8 *anti_isdn);
|
||||
void imsi_aton(u8 *normal_imsi,u8 *anti_imsi);
|
||||
void imsi_ntos(u8 *str_imsi,u8 *normal_imsi);
|
||||
void imsi_ston(u8 *normal_imsi,u8 *str_imsi);
|
||||
void isdn_ntos(u8 *str_isdn,u8 *normal_isdn);
|
||||
void imsi_ntoa(u8 *anti_imsi,u8 *normal_imsi);
|
||||
|
||||
void isdn_ntoa(u8 * anti_isdn, u8 * normal_isdn);
|
||||
u8 isdn_ston(u8 *normal_isdn,u8 *str_isdn);
|
||||
|
||||
void xapp_set_sccpadd(u8 ssn, u8 * gtt_num, struct SCCP_ADDRESS *sccp_add);
|
||||
|
||||
int build_xapp_msg();
|
||||
int extract_xapp_msg();
|
||||
|
||||
u8 get_mapp_open(struct MapComSrv_struct *com_ptr, u8 ssn);
|
||||
u8 send_mapp_comdata(struct MapComSrv_struct *com_ptr, u8 DelimiterFlag);
|
||||
u8 recv_mapp_comdata(struct MapComSrv_struct *com_ptr, u32 did);
|
||||
int send_mapp_oprdata(struct MapOprData_struct *opr_ptr, u8 DelimiterFlag);
|
||||
int recv_mapp_oprdata(struct MapOprData_struct *opr_ptr, u32 did);
|
||||
|
||||
int send_mapp_open_req(WORD dialog_id);
|
||||
int send_mapp_open_conf();
|
||||
int send_mapp_close(WORD dialog_id);
|
||||
|
||||
u8 get_capp_open(struct MapComSrv_struct *com_ptr, u8 ssn);
|
||||
u8 send_capp_comdata(struct MapComSrv_struct *com_ptr, u8 DelimiterFlag);
|
||||
u8 recv_capp_comdata(struct MapComSrv_struct *com_ptr, u32 did);
|
||||
int send_capp_oprdata(struct MapOprData_struct *opr_ptr, u8 DelimiterFlag);
|
||||
int recv_capp_oprdata(struct MapOprData_struct *opr_ptr, u32 did);
|
||||
int send_capp_open_req(unsigned char acn, unsigned char acn_v, unsigned short dlgid);
|
||||
void send_capp_open_conf(unsigned char acn, unsigned char acn_v, unsigned short dlgid);
|
||||
void send_capp_close(unsigned short dlgid);
|
||||
|
||||
void extract_sri();
|
||||
|
||||
#endif
|
||||
372
plat/xapp/ut/xapp_test/xapp_main.c
Normal file
372
plat/xapp/ut/xapp_test/xapp_main.c
Normal file
@@ -0,0 +1,372 @@
|
||||
/* XAPP coding test function c file */
|
||||
/* created by Liu Wei 2006-01-13 */
|
||||
/* Version 1.0 */
|
||||
/* ------------------------------------- */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
#include <termio.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/io.h>
|
||||
|
||||
#include "xapp_coding_test.h"
|
||||
#include "xapp_main.h"
|
||||
|
||||
static int sys_timer10ms = 0;
|
||||
|
||||
static char test_sync_cmd[6][32] = {
|
||||
"XAPP_TEST",
|
||||
"XAPP_RSP",
|
||||
"XAPP_OK",
|
||||
"XAPP_FAIL",
|
||||
"XAPP_OK,NEXT",
|
||||
"XAPP_FAIL,NEXT",
|
||||
};
|
||||
|
||||
static char udp_contents = 0;
|
||||
|
||||
#define SYS_IT_INTERVAL_SEC 0
|
||||
#define SYS_IT_INTERVAL_USEC (10*1000)
|
||||
int remote_ip;
|
||||
int test_port = 6999;
|
||||
u8 time_count;
|
||||
|
||||
int get_socket(u_int32_t ip, int port)
|
||||
{
|
||||
int sock;
|
||||
int on = 1;
|
||||
DWORD cmdarg = 1;
|
||||
struct sockaddr_in sin_addr;
|
||||
|
||||
sin_addr.sin_family = AF_INET;
|
||||
sin_addr.sin_port = htons(port);
|
||||
sin_addr.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
|
||||
if(!(sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)
|
||||
perror("Get socket");
|
||||
setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
|
||||
if(bind(sock, (struct sockaddr *)&sin_addr, sizeof(struct sockaddr_in)) != 0)
|
||||
{
|
||||
perror("bind");
|
||||
return 0;
|
||||
}
|
||||
ioctl(sock, FIONBIO, &cmdarg);
|
||||
return (sock);
|
||||
}
|
||||
|
||||
int Get_Peer_IP()
|
||||
{
|
||||
char s[16];
|
||||
FILE *fp = NULL;
|
||||
int i = 0;
|
||||
char c;
|
||||
|
||||
fp = fopen("./conf/sccp_test.conf", "r");
|
||||
if(fp != NULL)
|
||||
{
|
||||
while((c = fgetc(fp)) != EOF && c != ' ' && c != '\n' && c != '\t')
|
||||
{
|
||||
s[i++] = c;
|
||||
if(i >= 16)
|
||||
break;
|
||||
}
|
||||
s[i] = '\0';
|
||||
printf("Remote ip :%s\r\n", s);
|
||||
remote_ip = inet_addr(s);
|
||||
i = 0;
|
||||
while((c = fgetc(fp)) != EOF && c != ' ' && c != '\n' && c != '\t')
|
||||
{
|
||||
s[i++] = c;
|
||||
if(i >= 5)
|
||||
break;
|
||||
|
||||
}
|
||||
s[i] = '\0';
|
||||
test_xapp.wait_time = strtol(s, NULL, 10);
|
||||
printf("Waiting start test time :%ld\r\n", test_xapp.wait_time);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void MS_mode_test()
|
||||
{
|
||||
memset(&test_xapp, 0, sizeof(struct test_xapp_struct));
|
||||
//test_cmd=0;
|
||||
//test_xapp.ms_mode = 0;
|
||||
if(Get_Peer_IP())
|
||||
{
|
||||
test_xapp.sock = get_socket(remote_ip, test_port);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Get Peer IP Fail!\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
void next_case()
|
||||
{
|
||||
test_cmd++;
|
||||
|
||||
test_xapp.test_result = 0;
|
||||
test_xapp.peer_state = 0;
|
||||
printf("\r\n ------------------------>> Next Case %d<<------------------ \r\n",(int )test_cmd);
|
||||
if(test_cmd == XAPP_TEST_LAST_IDLE)
|
||||
{
|
||||
printf("\r\n\r\nTest over !\r\n\r\n");
|
||||
test_cmd = 0;
|
||||
test_xapp.test_result = 7;
|
||||
}
|
||||
}
|
||||
|
||||
void MS_test_timer()
|
||||
{
|
||||
char msg[256];
|
||||
struct sockaddr_in sin_addr;
|
||||
int addr_len;
|
||||
u8 isdn[ISDN_LEN];
|
||||
u8 i;
|
||||
char str[32];
|
||||
|
||||
sin_addr.sin_port = htons(test_port);
|
||||
sin_addr.sin_addr.s_addr = remote_ip;
|
||||
addr_len = sizeof(struct sockaddr_in);
|
||||
udp_contents = 0;
|
||||
memset(msg, 0, 256);
|
||||
recvfrom(test_xapp.sock, (char *)msg, 256, 0, (struct sockaddr *)&sin_addr, &addr_len);
|
||||
if(msg[0])
|
||||
{
|
||||
//printf("Recv Test sycn msg :%s \r\n",msg);
|
||||
for(i = 0; i <= 6; i++)
|
||||
{
|
||||
sprintf(str, "%s", test_sync_cmd[i]);
|
||||
if(i >= 2)
|
||||
sprintf(str, "%s:%d", test_sync_cmd[i], test_cmd);
|
||||
if(strcmp(msg, str) == 0)
|
||||
{
|
||||
udp_contents = i + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if(test_xapp.ms_mode == 0)
|
||||
{
|
||||
if(udp_contents == 0)
|
||||
{
|
||||
strcpy(msg, "XAPP_TEST");
|
||||
sendto(test_xapp.sock, (char *)msg, 32, 0, (struct sockaddr *)&sin_addr, sizeof(struct sockaddr));
|
||||
}
|
||||
if(udp_contents == 2)
|
||||
{
|
||||
test_xapp.local_ssn = 7;
|
||||
test_xapp.peer_ssn = 6;
|
||||
imap_reg_ssn(test_xapp.local_ssn);
|
||||
AsciiToBcd(isdn, "918675557122001F", 16);
|
||||
xapp_set_sccpadd(test_xapp.local_ssn, isdn, &test_xapp.local_add);
|
||||
AsciiToBcd(isdn, "918675557122002F", 16);
|
||||
xapp_set_sccpadd(test_xapp.peer_ssn, isdn, &test_xapp.peer_add);
|
||||
printf(" XAPP Test Slave Started :%s\r\n", msg);
|
||||
test_xapp.ms_mode = 2;
|
||||
return;
|
||||
}
|
||||
else if(udp_contents == 1)
|
||||
{
|
||||
test_xapp.local_ssn = 6;
|
||||
test_xapp.peer_ssn = 7;
|
||||
imap_reg_ssn(test_xapp.local_ssn);
|
||||
AsciiToBcd(isdn, "918675557122002F", 16);
|
||||
xapp_set_sccpadd(test_xapp.local_ssn, isdn, &test_xapp.local_add);
|
||||
AsciiToBcd(isdn, "918675557122001F", 16);
|
||||
xapp_set_sccpadd(test_xapp.peer_ssn, isdn, &test_xapp.peer_add);
|
||||
printf(" XAPP Test Master Started :%s\r\n", msg);
|
||||
strcpy(msg, "XAPP_RSP");
|
||||
sendto(test_xapp.sock, (char *)msg, 32, 0, (struct sockaddr *)&sin_addr, sizeof(struct sockaddr));
|
||||
test_xapp.ms_mode = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
if(test_xapp.ms_mode)
|
||||
{
|
||||
switch (test_xapp.test_result)
|
||||
{
|
||||
case 0:
|
||||
|
||||
if(udp_contents == 4)
|
||||
{
|
||||
sprintf(msg, "XAPP_FAIL:%d,Next", test_cmd);
|
||||
sendto(test_xapp.sock, (char *)msg, 32, 0, (struct sockaddr *)&sin_addr, sizeof(struct sockaddr));
|
||||
printf("[Test]:Fail!\r\n\r\n");
|
||||
next_case();
|
||||
return;
|
||||
}
|
||||
else if(udp_contents == 3)
|
||||
{
|
||||
printf("Peer Test OK !\r\n");
|
||||
test_xapp.peer_state = 1;
|
||||
}
|
||||
break;
|
||||
case 1: //OK
|
||||
printf("Local Test OK !\r\n");
|
||||
if(test_xapp.peer_state == 1)
|
||||
{
|
||||
sprintf(msg, "XAPP_OK,NEXT:%d", test_cmd);
|
||||
sendto(test_xapp.sock, (char *)msg, 32, 0, (struct sockaddr *)&sin_addr, sizeof(struct sockaddr));
|
||||
printf("[Test]: OK!\r\n\r\n");
|
||||
next_case();
|
||||
return;
|
||||
}
|
||||
sprintf(msg, "XAPP_OK:%d", test_cmd);
|
||||
sendto(test_xapp.sock, (char *)msg, 32, 0, (struct sockaddr *)&sin_addr, sizeof(struct sockaddr));
|
||||
printf("Send sycn msg : %s\r\n ",msg);
|
||||
test_xapp.test_result = 3;
|
||||
break;
|
||||
case 2:
|
||||
printf("Local Test Fail !\r\n");
|
||||
if(test_xapp.peer_state == 1)
|
||||
{
|
||||
sprintf(msg, "XAPP_FAIL,NEXT:%d", test_cmd);
|
||||
sendto(test_xapp.sock, (char *)msg, 32, 0, (struct sockaddr *)&sin_addr, sizeof(struct sockaddr));
|
||||
printf("[Test]:Fail!\r\n\r\n");
|
||||
next_case();
|
||||
return;
|
||||
}
|
||||
sprintf(msg, "XAPP_FAIL:%d", test_cmd);
|
||||
sendto(test_xapp.sock, (char *)msg, 32, 0, (struct sockaddr *)&sin_addr, sizeof(struct sockaddr));
|
||||
printf("Send sycn msg : %s\r\n ",msg);
|
||||
test_xapp.test_result = 4;
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
if( msg[0] )
|
||||
printf("udp recv pos 3:%s\r\n", msg);
|
||||
if(udp_contents == 5 || udp_contents == 6)
|
||||
{
|
||||
(test_xapp.test_result == 3) ? printf("Peer Test OK !\r\n") : printf("Peer Test Fail !\r\n");
|
||||
(test_xapp.test_result == 3) ? printf("[Test]: OK!\r\n\r\n") : printf("[Test]: Fail!\r\n\r\n");
|
||||
next_case();
|
||||
return;
|
||||
}
|
||||
else if(udp_contents == 3)
|
||||
{
|
||||
sprintf(msg, "XAPP_OK,NEXT:%d", test_cmd);
|
||||
sendto(test_xapp.sock, (char *)msg, 32, 0, (struct sockaddr *)&sin_addr, sizeof(struct sockaddr));
|
||||
printf("Peer Test OK !\r\n");
|
||||
printf("[Test]: OK!\r\n\r\n");
|
||||
next_case();
|
||||
return;
|
||||
}
|
||||
else if(udp_contents == 4)
|
||||
{
|
||||
sprintf(msg, "XAPP_FAIL,NEXT:%d", test_cmd);
|
||||
sendto(test_xapp.sock, (char *)msg, 32, 0, (struct sockaddr *)&sin_addr, sizeof(struct sockaddr));
|
||||
printf("Peer Test Fail !\r\n");
|
||||
printf("[Test]:Fail!\r\n\r\n");
|
||||
next_case();
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void moduleInit()
|
||||
{
|
||||
//ioperm(0x27A,3,1);
|
||||
MS_mode_test(); //master and slaver mode
|
||||
debug_init();
|
||||
//#ifdef NEW_PLATFORM
|
||||
iptrMainInit();
|
||||
/*#else
|
||||
iptrans_init();
|
||||
#endif */
|
||||
mtp_shm_init();
|
||||
snmp_init(4957);
|
||||
sccp_init();
|
||||
tcap_init(1024);
|
||||
printf("MAP OP data size : %d\r\n,MAP OP Str size : %d\r\n",sizeof(MapOprData_struct),sizeof(MapOprSrv_struct));
|
||||
//printf("send para res size : %d \r\nProvid_SSInfo_struct : %d \r\nOdbData_struct :%d \r\n" ,sizeof(MapSP_Res),
|
||||
//sizeof(Provid_SSInfo_struct),sizeof(struct OdbData_struct));
|
||||
printf("Sub_data_struct :%d ExtSsInfo_struct:%d \r\n",sizeof(Sub_data_struct),sizeof(ExtSsInfo_struct));
|
||||
printf("MapISD_Arg :%d \r\n",sizeof(MapISD_Arg));
|
||||
xap_init(1204);
|
||||
extract_sri();
|
||||
printf("\r\nWating Peer test message ... \r\n");
|
||||
}
|
||||
|
||||
void sysTimer_IRQ()
|
||||
{
|
||||
sys_timer10ms = 1;
|
||||
}
|
||||
|
||||
static void SigactionSystem()
|
||||
{
|
||||
struct sigaction action;
|
||||
|
||||
action.sa_handler = sysTimer_IRQ;
|
||||
sigemptyset(&action.sa_mask);
|
||||
action.sa_flags = 0;
|
||||
if(sigaction(SIGALRM, &action, NULL) < 0)
|
||||
{
|
||||
printf("sigactin sigalarm failed\n");
|
||||
}
|
||||
}
|
||||
|
||||
void SetFSMTimer()
|
||||
{
|
||||
struct itimerval *ptv, tv;
|
||||
|
||||
ptv = (struct itimerval *)&tv;
|
||||
ptv->it_interval.tv_sec = 0;
|
||||
ptv->it_interval.tv_usec = 10 * 1000;
|
||||
ptv->it_value = ptv->it_interval;
|
||||
setitimer(ITIMER_REAL, ptv, NULL);
|
||||
}
|
||||
|
||||
void moduleProc()
|
||||
{
|
||||
iptrans_timer();
|
||||
snmp_timer();
|
||||
heartbeat_timer();
|
||||
mtp3_proc();
|
||||
sccp_timer();
|
||||
debug_rt();
|
||||
tcap_fsm();
|
||||
xap_fsm();
|
||||
Test_func();
|
||||
MS_test_timer();
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
moduleInit();
|
||||
SigactionSystem();
|
||||
SetFSMTimer();
|
||||
|
||||
sys_timer10ms = 1;
|
||||
while(1)
|
||||
{
|
||||
if(sys_timer10ms)
|
||||
{
|
||||
sys_timer10ms = 0;
|
||||
moduleProc();
|
||||
}
|
||||
if(sys_timer10ms == 0)
|
||||
usleep(1);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
32
plat/xapp/ut/xapp_test/xapp_main.h
Normal file
32
plat/xapp/ut/xapp_test/xapp_main.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/* XAPP coding test function head file */
|
||||
/* created by Liu Wei 2006-01-13 */
|
||||
/* Version 1.0 */
|
||||
/* ------------------------------------- */
|
||||
|
||||
#ifndef _XAPP_MAIN_
|
||||
|
||||
#define _XAPP_MAIN_
|
||||
|
||||
#include "../../public/asn1.h"
|
||||
#include "../../public/includes.h"
|
||||
#include "../../iptrans/iptrans.h"
|
||||
#include "../../mtp3/mtp3.h"
|
||||
#include "../../snmp/snmp.h"
|
||||
#include "../../sccp/sccp.h"
|
||||
#include "../../tcap/tcap_public.h"
|
||||
#include "../../tcap/tcap_proc.h"
|
||||
#include "../../xapp/mapp/map_const.h"
|
||||
#include "../../xapp/mapp/map_code.h"
|
||||
#include "../../xapp/mapp/map_acn.h"
|
||||
#include "../../xapp/mapp/map_struct.h"
|
||||
#include "../../xapp/mapp/map_public.h"
|
||||
#include "../../xapp/capp/cap_public.h"
|
||||
#include "../../xapp/ixap.h"
|
||||
#include "../../debug/debug.h"
|
||||
#include "../../snmp/snmp.h"
|
||||
#include "../../xapp/capp/cap_msg.h"
|
||||
#include "../../xapp/xap_provider.h"
|
||||
#include "../../xapp/conv_prefix.h"
|
||||
#include "xapp_op_test.h"
|
||||
|
||||
#endif
|
||||
2067
plat/xapp/ut/xapp_test/xapp_op_test.c
Normal file
2067
plat/xapp/ut/xapp_test/xapp_op_test.c
Normal file
File diff suppressed because it is too large
Load Diff
39
plat/xapp/ut/xapp_test/xapp_op_test.h
Normal file
39
plat/xapp/ut/xapp_test/xapp_op_test.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/* XAPP coding test function head file */
|
||||
/* created by Liu Wei 2006-01-13 */
|
||||
/* Version 1.0 */
|
||||
/* ------------------------------------- */
|
||||
|
||||
#ifndef _XAPP_OP_TEST_
|
||||
|
||||
#define _XAPP_OP_TEST_
|
||||
|
||||
enum XAPP_TEST_OP
|
||||
{
|
||||
MAPP_TEST_SENDPARA =1,
|
||||
MAPP_TEST_NOTSUBPRE,
|
||||
MAPP_TEST_PROCUSSD,
|
||||
MAPP_TEST_BEGINACT,
|
||||
MAPP_TEST_REGISTERSS ,
|
||||
MAPP_TEST_HANDOVER,
|
||||
MAPP_TEST_PERFORMSUBSEQUENTHANDOVER,
|
||||
MAPP_TEST_NOTEINERNALHANDOVER,
|
||||
MAPP_TEST_TRACESUBSCRIBERACTIVITY,
|
||||
MAPP_TEST_FOWARDSM,
|
||||
MAPP_TEST_SENDROUTINGINFOFORSM,
|
||||
MAPP_TEST_CANCELLOC,
|
||||
MAPP_TEST_CANCELLOCv3,
|
||||
CAPP_TEST_INITDP,
|
||||
//CAPP_TEST_ACTTEST,
|
||||
CAPP_TEST_CONNECT,
|
||||
//CAPP_TEST_CONTINUE,
|
||||
//CAPP_TEST_REPORTBCSM,
|
||||
//CAPP_TEST_CALLREL,
|
||||
CAPP_TEST_REQREPORTBCSM,
|
||||
XAPP_TEST_LAST_IDLE,
|
||||
|
||||
//Please add here , add behind the XAPP_TEST_LAST_IDLE
|
||||
|
||||
};
|
||||
|
||||
void Test_func();
|
||||
#endif
|
||||
Reference in New Issue
Block a user