Import BSSAP+, BSSGP, BSSMAP, GTP, GTPv2, LLC and MobileL3
this has been kindly provided by Ericsson and will soon (September-ish) be released officially as FOSS on the eclipse.org git server.
This commit is contained in:
parent
336959fc3c
commit
a814f263cc
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,922 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Copyright Test Competence Center (TCC) ETH 2008 //
|
||||
// //
|
||||
// The copyright to the computer program(s) herein is the property of TCC. //
|
||||
// The program(s) may be used and/or copied only with the written permission //
|
||||
// of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
// agreement/contract under which the program(s) has been supplied. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: BSSAPp_Types.ttcn
|
||||
// Rev: R1A01
|
||||
// Prodnr: CNL 113 580
|
||||
// Updated: 2008-01-24
|
||||
// Contact: http://ttcn.ericsson.se
|
||||
// Reference: BSSAP+, 3GPP TS 29.018 v7.3.0 (2006-12)
|
||||
|
||||
module BSSAPp_Types { // beginning of module
|
||||
|
||||
// This module contains the BSSAP+ type definitions based on
|
||||
// 29.018 v7.3.0 (2006-12)
|
||||
// with attributes for RAW encoding/decoding.
|
||||
|
||||
import from General_Types all;
|
||||
|
||||
external function enc_PDU_BSSAPp(in PDU_BSSAPp pdu) return octetstring
|
||||
with { extension "prototype(convert)"
|
||||
extension "encode(RAW)"
|
||||
}
|
||||
|
||||
external function dec_PDU_BSSAPp(in octetstring stream) return PDU_BSSAPp
|
||||
with { extension "prototype(convert)"
|
||||
extension "decode(RAW)"
|
||||
}
|
||||
|
||||
//====================================================================
|
||||
// Message type
|
||||
// Reference: 29.018 18.2
|
||||
//====================================================================
|
||||
|
||||
type BIT8 ST_BSSAPp_Msg_type with { variant "" };
|
||||
|
||||
//====================================================================
|
||||
// IMSI
|
||||
// Reference: 29.018 18.4.10
|
||||
//====================================================================
|
||||
|
||||
type hexstring IMSIDigits length(1..15) with { variant "HEXORDER(low)" };
|
||||
|
||||
type record STR_BSSAPp_IMSI {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
BIT3 first_3_BIT, //this is always '001'B
|
||||
BIT1 parity, // 0 - Even, 1 - Odd
|
||||
IMSIDigits iMSIdigits,
|
||||
BIT4 fillerDigit optional // B'1111, fillerDigit is present
|
||||
// if oddevenIndicator=0
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator)
|
||||
"LENGTHTO (first_3_BIT, parity, iMSIdigits, fillerDigit)";
|
||||
variant (fillerDigit) "PRESENCE (parity = '0'B) ";
|
||||
};
|
||||
|
||||
|
||||
//====================================================================
|
||||
// Gs Cause
|
||||
// Reference: 29.018 18.4.7
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_Gs_Cause {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
OCT1 gsCauseValue
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (gsCauseValue)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// VLR Number
|
||||
// Reference: 29.018 18.4.26
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_VLR_Number {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
BIT8 first_8_BIT, //this is always '10010001'B
|
||||
IMSIDigits vLRdigits
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (first_8_BIT, vLRdigits)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// Downlink Tunnel Payload Control and Info
|
||||
// Reference: 29.018 18.4.3
|
||||
//====================================================================
|
||||
|
||||
|
||||
type record STR_BSSAPp_Downlink_Tunnel_Payload_Control_And_Info {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
BIT2 tunnelPriority,
|
||||
BIT1 e,
|
||||
BIT4 protocolDiscriminator,
|
||||
BIT1 spare,
|
||||
octetstring tunnelPayload
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator)
|
||||
"LENGTHTO (tunnelPriority, e, protocolDiscriminator, spare, tunnelPayload)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// SGSN Number
|
||||
// Reference: 29.018 18.4.22
|
||||
//====================================================================
|
||||
|
||||
type STR_BSSAPp_VLR_Number STR_BSSAPp_SGSN_Number with { variant "" };
|
||||
|
||||
//====================================================================
|
||||
// IMSI Detach from GPRS Service Type
|
||||
// Reference: 29.018 18.4.11
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_IMSI_Detach_from_GPRS_service_type {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
BIT8 iMSIDetachFromGPRSServiceTypeValue
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (iMSIDetachFromGPRSServiceTypeValue)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// Cell Global Identity
|
||||
// Reference: 29.018 18.4.1
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_Cell_Global_Identity {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
octetstring cellGlobalIdentityValue length(8)
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (cellGlobalIdentityValue)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// Service Area Identification
|
||||
// Reference: 29.018 18.4.21b
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_Service_Area_Identification {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
octetstring serviceAreaIdentificationValue length(7)
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (serviceAreaIdentificationValue)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// IMSI Detach from Non-GPRS Service Type
|
||||
// Reference: 29.018 18.4.12
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_IMSI_detach_from_non_GPRS_service_type {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
BIT8 iMSIDetachFromNonGPRSServiceTypeValue
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (iMSIDetachFromNonGPRSServiceTypeValue)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// Location Information Age
|
||||
// Reference: 29.018 18.4.15
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_Location_Information_Age {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
OCT2 locationInformationAge
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (locationInformationAge)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// Location Area Identifier
|
||||
// Reference: 29.018 18.4.14
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_Location_Area_Identifier {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
OCT5 locationAreaIdentifierValue
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (locationAreaIdentifierValue)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// Mobile Identity
|
||||
// Reference: 29.018 18.4.17
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_Mobile_Identity {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
octetstring mobileIdentityValue
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (mobileIdentityValue)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// Reject Cause
|
||||
// Reference: 29.018 18.4.21
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_Reject_Cause {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
OCT1 rejectCauseValue
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (rejectCauseValue)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// GPRS Location Update Type
|
||||
// Reference: 29.018 18.4.6
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_GPRS_Location_Update_Type {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
BIT8 gPRSLocationUpdateTypeValue
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (gPRSLocationUpdateTypeValue)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// Mobile Station Classmark 1
|
||||
// Reference: 29.018 18.4.18
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_Mobile_Station_Classmark1 {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
OCT1 mobileStationClassmarkValue
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (mobileStationClassmarkValue)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// TMSI Status
|
||||
// Reference: 29.018 18.4.24
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_TMSI_Status {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
BIT1 tIMSIFlag,
|
||||
BIT7 spare
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (tIMSIFlag, spare)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// IMEISV
|
||||
// Reference: 29.018 18.4.9
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_IMEISV {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
hexstring digits length (16)
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (digits)";
|
||||
};
|
||||
|
||||
|
||||
//====================================================================
|
||||
// MM Information
|
||||
// Reference: 29.018 18.4.16
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_MM_Information {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
octetstring mMInformationValue
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (mMInformationValue)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// Erroneous Message
|
||||
// Reference: 29.018 18.4.5
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_Erroneous_Message {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
octetstring erroneousMessageValue
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (erroneousMessageValue)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// Information Requested
|
||||
// Reference: 29.018 18.4.13
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_Information_Requested {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
BIT8 informationRequestedValue
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (informationRequestedValue)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// TMSI
|
||||
// Reference: 29.018 18.4.23
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_TMSI {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
OCT4 tMSIoctets
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (tMSIoctets)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// PTMSI
|
||||
// Reference: 29.018 18.4.20
|
||||
//====================================================================
|
||||
|
||||
type STR_BSSAPp_TMSI STR_BSSAPp_PTMSI with { variant "" };
|
||||
|
||||
//====================================================================
|
||||
// IMEI
|
||||
// Reference: 29.018 18.4.8
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_IMEI {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
hexstring digits length (14),
|
||||
OCT1 lastOctet //should be 'F0'O
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (digits, lastOctet)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// Mobile Station State
|
||||
// Reference: 29.018 18.4.19
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_Mobile_Station_State {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
BIT8 mobileStationStateValue
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (mobileStationStateValue)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// Channel Needed
|
||||
// Reference: 29.018 18.4.2
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_Channel_Needed {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
OCT1 channelNeededValue
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (channelNeededValue)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// eMLPP Priority
|
||||
// Reference: 29.018 18.4.4
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_eMLPP_Priority {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
OCT1 eMLPPPriorityValue
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (eMLPPPriorityValue)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// Global CN-Id
|
||||
// Reference: 29.018 18.4.27
|
||||
//====================================================================
|
||||
|
||||
type record STR_BSSAPp_Global_CN_Id {
|
||||
BIT8 iEI,
|
||||
LIN1 lengthIndicator,
|
||||
HEX6n pLMN_Id,
|
||||
OCT2 CN_Id
|
||||
}
|
||||
with {
|
||||
variant (lengthIndicator) "LENGTHTO (pLMN_Id, CN_Id)";
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// Downlink Tunnel Payload Control and Info
|
||||
// Reference: 29.018 18.4.25
|
||||
//====================================================================
|
||||
|
||||
type STR_BSSAPp_Downlink_Tunnel_Payload_Control_And_Info
|
||||
STR_BSSAPp_Uplink_Tunnel_Payload_Control_And_Info with { variant "" };
|
||||
|
||||
//====================================================================
|
||||
// BSSAPp REJECT (Used for several IEs)
|
||||
// Reference: 29.018
|
||||
//====================================================================
|
||||
|
||||
type record BSSAPp_REJECT {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
STR_BSSAPp_IMSI iMSI,
|
||||
STR_BSSAPp_Gs_Cause gsCause
|
||||
}
|
||||
with {
|
||||
variant "TAG (
|
||||
iMSI, iEI = '00000001'B;
|
||||
gsCause, iEI = '00001000'B;
|
||||
)"
|
||||
};
|
||||
|
||||
|
||||
//-------------- PDUs ----------------//
|
||||
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-ALERT-ACK
|
||||
// Reference: 29.018 17.1.1
|
||||
//====================================================================
|
||||
|
||||
|
||||
type record PDU_BSSAPp_ALERT_ACK {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
STR_BSSAPp_IMSI iMSI
|
||||
}
|
||||
with {
|
||||
variant "TAG (
|
||||
iMSI, iEI = '00000001'B;
|
||||
)"
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-ALERT-REJECT
|
||||
// Reference: 29.018 17.1.2
|
||||
//====================================================================
|
||||
|
||||
type BSSAPp_REJECT PDU_BSSAPp_ALERT_REJECT;
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-ALERT-REQUEST
|
||||
// Reference: 29.018 17.1.3
|
||||
//====================================================================
|
||||
|
||||
type record PDU_BSSAPp_ALERT_REQUEST {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
STR_BSSAPp_IMSI iMSI
|
||||
}
|
||||
with {
|
||||
variant "TAG(
|
||||
iMSI, iEI = '00000001'B;
|
||||
)"
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-DOWNLINK-TUNNEL-REQUEST
|
||||
// Reference: 29.018 17.1.4
|
||||
//====================================================================
|
||||
|
||||
type record PDU_BSSAPp_DOWNLINK_TUNNEL_REQUEST {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
STR_BSSAPp_IMSI iMSI,
|
||||
STR_BSSAPp_VLR_Number vLRnumber,
|
||||
STR_BSSAPp_Downlink_Tunnel_Payload_Control_And_Info
|
||||
downlinkTunnelPayloadControlAndInfo
|
||||
}
|
||||
with {
|
||||
variant "TAG (
|
||||
iMSI, iEI = '00000001'B;
|
||||
vLRnumber, iEI = '00000010'B;
|
||||
downlinkTunnelPayloadControlAndInfo, iEI = '00011100'B;
|
||||
)"
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-GPRS-DETACH-ACK
|
||||
// Reference: 29.018 17.1.5
|
||||
//====================================================================
|
||||
|
||||
type record PDU_BSSAPp_GPRS_DETACH_ACK {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
STR_BSSAPp_IMSI iMSI
|
||||
} with { variant "TAG(
|
||||
iMSI, iEI = '00000001'B;
|
||||
)"
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-GPRS-DETACH-INDICATION
|
||||
// Reference: 29.018 17.1.6
|
||||
//====================================================================
|
||||
|
||||
type record PDU_BSSAPp_GPRS_DETACH_INDICATION {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
STR_BSSAPp_IMSI iMSI,
|
||||
STR_BSSAPp_SGSN_Number sGSNnumber,
|
||||
STR_BSSAPp_IMSI_Detach_from_GPRS_service_type iMSIdetachFromGPRSserviceType,
|
||||
STR_BSSAPp_Cell_Global_Identity cellGlobalIdentity optional,
|
||||
STR_BSSAPp_Service_Area_Identification serviceAreaIdentification optional
|
||||
}
|
||||
with {
|
||||
variant "TAG (
|
||||
iMSI, iEI = '00000001'B;
|
||||
sGSNnumber, iEI = '00001001'B;
|
||||
iMSIdetachFromGPRSserviceType, iEI = '00010000'B;
|
||||
cellGlobalIdentity, iEI = '00011000'B;
|
||||
serviceAreaIdentification, iEI = '00011110'B;
|
||||
)"
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-GPRS-DETACH-ACK
|
||||
// Reference: 29.018 17.1.7
|
||||
//====================================================================
|
||||
|
||||
type record PDU_BSSAPp_IMSI_DETACH_ACK {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
STR_BSSAPp_IMSI iMSI
|
||||
}
|
||||
with {
|
||||
variant "TAG(
|
||||
iMSI, iEI = '00000001'B;
|
||||
)"
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-IMSI-DETACH-INDICATION
|
||||
// Reference: 29.018 17.1.8
|
||||
//====================================================================
|
||||
type record PDU_BSSAPp_IMSI_DETACH_INDICATION {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
|
||||
STR_BSSAPp_IMSI iMSI,
|
||||
STR_BSSAPp_SGSN_Number sGSNnumber,
|
||||
STR_BSSAPp_IMSI_detach_from_non_GPRS_service_type detachType,
|
||||
STR_BSSAPp_Cell_Global_Identity cellGlobalIdentity optional,
|
||||
STR_BSSAPp_Location_Information_Age locationInformationAge optional,
|
||||
STR_BSSAPp_Service_Area_Identification serviceAreaIdentification optional
|
||||
} with {
|
||||
variant "TAG (
|
||||
iMSI, iEI = '00000001'B;
|
||||
sGSNnumber, iEI = '00001001'B;
|
||||
detachType, iEI = '00010001'B;
|
||||
cellGlobalIdentity, iEI = '00011000'B;
|
||||
locationInformationAge, iEI = '00011001'B;
|
||||
serviceAreaIdentification, iEI = '00011110'B;
|
||||
)"
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-LOCATION-UPDATE-ACCEPT
|
||||
// Reference: 29.018 17.1.9
|
||||
//====================================================================
|
||||
|
||||
type record PDU_BSSAPp_LOCATION_UPDATE_ACCEPT {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
STR_BSSAPp_IMSI iMSI,
|
||||
STR_BSSAPp_Location_Area_Identifier locationAreaIdentifier,
|
||||
STR_BSSAPp_Mobile_Identity newTMSIorIMSI optional
|
||||
} with {
|
||||
variant "TAG (
|
||||
iMSI, iEI = '00000001'B;
|
||||
locationAreaIdentifier, iEI = '00000100'B;
|
||||
newTMSIorIMSI, iEI = '00001110'B;
|
||||
)"
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-LOCATION-UPDATE-REJECT
|
||||
// Reference: 29.018 17.1.10
|
||||
//====================================================================
|
||||
|
||||
type record PDU_BSSAPp_LOCATION_UPDATE_REJECT {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
STR_BSSAPp_IMSI iMSI,
|
||||
STR_BSSAPp_Reject_Cause rejectCause
|
||||
} with {
|
||||
variant "TAG(
|
||||
iMSI, iEI = '00000001'B;
|
||||
rejectCause, iEI = '00001111'B
|
||||
)"
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-LOCATION-UPDATE-REQUEST
|
||||
// Reference: 29.018 17.1.11
|
||||
//====================================================================
|
||||
|
||||
type record PDU_BSSAPp_LOCATION_UPDATE_REQUEST {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
STR_BSSAPp_IMSI iMSI,
|
||||
STR_BSSAPp_SGSN_Number sGSNnumber,
|
||||
STR_BSSAPp_GPRS_Location_Update_Type updateType,
|
||||
STR_BSSAPp_Cell_Global_Identity cellGlobalIdentity,
|
||||
STR_BSSAPp_Mobile_Station_Classmark1 mobileStationClassmark,
|
||||
STR_BSSAPp_Location_Area_Identifier oldLocationAreaIdentifier optional,
|
||||
STR_BSSAPp_TMSI_Status tMSIstatus optional,
|
||||
STR_BSSAPp_Service_Area_Identification serviceAreaIdentification optional,
|
||||
STR_BSSAPp_IMEISV iMEISV optional
|
||||
} with {
|
||||
variant "TAG (
|
||||
iMSI, iEI = '00000001'B;
|
||||
sGSNnumber, iEI = '00001001'B;
|
||||
updateType, iEI = '00001010'B;
|
||||
cellGlobalIdentity, iEI = '00011000'B;
|
||||
mobileStationClassmark, iEI = '00001101'B;
|
||||
oldLocationAreaIdentifier, iEI = '00000100'B;
|
||||
tMSIstatus, iEI = '00000111'B;
|
||||
serviceAreaIdentification, iEI = '00011110'B;
|
||||
iMEISV, iEI = '00010101'B;
|
||||
)"
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-MM-INFORMATION-REQUEST
|
||||
// Reference: 29.018 17.1.12
|
||||
//====================================================================
|
||||
|
||||
type record PDU_BSSAPp_MM_INFORMATION_REQUEST {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
STR_BSSAPp_IMSI iMSI,
|
||||
STR_BSSAPp_MM_Information mMinformation optional
|
||||
} with {
|
||||
variant "TAG (
|
||||
iMSI, iEI = '00000001'B;
|
||||
mMinformation, iEI = '00010111'B;
|
||||
)"
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-MOBILE-STATUS
|
||||
// Reference: 29.018 17.1.13
|
||||
//====================================================================
|
||||
|
||||
type record PDU_BSSAPp_MOBILE_STATUS {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
STR_BSSAPp_IMSI iMSI optional,
|
||||
STR_BSSAPp_Gs_Cause gsCause,
|
||||
STR_BSSAPp_Erroneous_Message erroneousMessage
|
||||
} with {
|
||||
variant "TAG (
|
||||
iMSI, iEI = '00000001'B;
|
||||
gsCause, iEI = '00001000'B;
|
||||
erroneousMessage, iEI = '00011011'B;
|
||||
)"
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-MS-ACTIVITY-INDICATION
|
||||
// Reference: 29.018 17.1.14
|
||||
//====================================================================
|
||||
|
||||
type record PDU_BSSAPp_MS_ACTIVITY_INDICATION {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
STR_BSSAPp_IMSI iMSI,
|
||||
STR_BSSAPp_Cell_Global_Identity cellGlobalIdentity optional,
|
||||
STR_BSSAPp_Service_Area_Identification serviceAreaIdentification optional
|
||||
} with {
|
||||
variant "TAG (
|
||||
iMSI, iEI = '00000001'B;
|
||||
cellGlobalIdentity, iEI = '00011000'B;
|
||||
serviceAreaIdentification, iEI = '00011110'B;
|
||||
)"
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-MS-INFORMATION-REQUEST
|
||||
// Reference: 29.018 17.1.15
|
||||
//====================================================================
|
||||
|
||||
type record PDU_BSSAPp_MS_INFORMATION_REQUEST {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
STR_BSSAPp_IMSI iMSI,
|
||||
STR_BSSAPp_Information_Requested informationRequested
|
||||
} with {
|
||||
variant "TAG(
|
||||
iMSI, iEI = '00000001'B;
|
||||
informationRequested, iEI = '00010010'B;
|
||||
)"
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-MS-INFORMATION-RESPONSE
|
||||
// Reference: 29.018 17.1.16
|
||||
//====================================================================
|
||||
|
||||
type record PDU_BSSAPp_MS_INFORMATION_RESPONSE {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
STR_BSSAPp_IMSI iMSI,
|
||||
STR_BSSAPp_TMSI tMSI optional,
|
||||
STR_BSSAPp_PTMSI pTMSI optional,
|
||||
STR_BSSAPp_IMEI iMEI optional,
|
||||
STR_BSSAPp_IMEISV iMEISV optional,
|
||||
STR_BSSAPp_Cell_Global_Identity cellGlobalIdentity optional,
|
||||
STR_BSSAPp_Location_Information_Age locationInformationAge optional,
|
||||
STR_BSSAPp_Mobile_Station_State mobileStationState optional,
|
||||
STR_BSSAPp_Service_Area_Identification serviceAreaIdentification optional
|
||||
} with {
|
||||
variant "TAG (
|
||||
iMSI, iEI = '00000001'B;
|
||||
tMSI, iEI = '00000011'B;
|
||||
pTMSI, iEI = '00010011'B;
|
||||
iMEI, iEI = '00010100'B;
|
||||
iMEISV, iEI = '00010101'B;
|
||||
cellGlobalIdentity, iEI = '00011000'B;
|
||||
locationInformationAge, iEI = '00011001'B;
|
||||
mobileStationState, iEI = '00011010'B;
|
||||
serviceAreaIdentification, iEI = '00011110'B;
|
||||
)"
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-MS-UNREACHABLE
|
||||
// Reference: 29.018 17.1.17
|
||||
//====================================================================
|
||||
|
||||
|
||||
type BSSAPp_REJECT PDU_BSSAPp_MS_UNREACHABLE;
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-PAGING-REJECT
|
||||
// Reference: 29.018 17.1.18
|
||||
//====================================================================
|
||||
|
||||
type BSSAPp_REJECT PDU_BSSAPp_PAGING_REJECT;
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-PAGING-REQUEST
|
||||
// Reference: 29.018 17.1.19
|
||||
//====================================================================
|
||||
|
||||
|
||||
type record PDU_BSSAPp_PAGING_REQUEST {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
STR_BSSAPp_IMSI iMSI,
|
||||
STR_BSSAPp_VLR_Number vLRnumber,
|
||||
STR_BSSAPp_TMSI tMSI optional,
|
||||
STR_BSSAPp_Location_Area_Identifier locationAreaIdentifier optional,
|
||||
STR_BSSAPp_Channel_Needed channelNeeded optional,
|
||||
STR_BSSAPp_eMLPP_Priority eMLPPpriority optional,
|
||||
STR_BSSAPp_Global_CN_Id global_CN_Id optional
|
||||
} with {
|
||||
variant "TAG (
|
||||
iMSI, iEI = '00000001'B;
|
||||
vLRnumber, iEI = '00000010'B;
|
||||
tMSI, iEI = '00000011'B;
|
||||
locationAreaIdentifier, iEI = '00000100'B;
|
||||
channelNeeded, iEI = '00000101'B;
|
||||
eMLPPpriority, iEI = '00000110'B;
|
||||
global_CN_Id, iEI = '00001011'B;
|
||||
)"
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-RESET-ACK
|
||||
// Reference: 29.018 17.1.20
|
||||
//====================================================================
|
||||
|
||||
type record PDU_BSSAPp_RESET_ACK {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
STR_BSSAPp_SGSN_Number sGSNnumber optional,
|
||||
STR_BSSAPp_VLR_Number vLRnumber optional
|
||||
} with {
|
||||
variant "TAG (
|
||||
sGSNnumber, iEI = '00001001'B;
|
||||
vLRnumber, iEI = '00000010'B;
|
||||
)"
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-RESET-INDICATION
|
||||
// Reference: 29.018 17.1.21
|
||||
//====================================================================
|
||||
|
||||
type record PDU_BSSAPp_RESET_INDICATION {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
STR_BSSAPp_SGSN_Number sGSNnumber optional,
|
||||
STR_BSSAPp_VLR_Number vLRnumber optional
|
||||
} with {
|
||||
variant "TAG (
|
||||
sGSNnumber, iEI = '00001001'B;
|
||||
vLRnumber, iEI = '00000010'B;
|
||||
)"
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-TMSI-REALLOCATION-COMPLETE
|
||||
// Reference: 29.018 17.1.22
|
||||
//====================================================================
|
||||
|
||||
type record PDU_BSSAPp_TMSI_REALLOCATION_COMPLETE {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
STR_BSSAPp_IMSI iMSI,
|
||||
STR_BSSAPp_Cell_Global_Identity cellGlobalIdentity optional,
|
||||
STR_BSSAPp_Service_Area_Identification serviceAreaIdentification optional
|
||||
} with {
|
||||
variant "TAG (
|
||||
iMSI, iEI = '00000001'B;
|
||||
cellGlobalIdentity, iEI = '00011000'B;
|
||||
serviceAreaIdentification, iEI = '00011110'B;
|
||||
)"
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
// BSSAP+-UPLINK-TUNNEL-REQUEST
|
||||
// Reference: 29.018 17.1.23
|
||||
//====================================================================
|
||||
|
||||
|
||||
type record PDU_BSSAPp_UPLINK_TUNNEL_REQUEST {
|
||||
ST_BSSAPp_Msg_type messageType,
|
||||
STR_BSSAPp_IMSI iMSI,
|
||||
STR_BSSAPp_SGSN_Number sGSNnumber,
|
||||
STR_BSSAPp_Uplink_Tunnel_Payload_Control_And_Info
|
||||
uplinkTunnelPayloadControlAndInfo
|
||||
} with {
|
||||
variant "TAG(
|
||||
iMSI, iEI = '00000001'B;
|
||||
sGSNnumber, iEI = '00001001'B;
|
||||
uplinkTunnelPayloadControlAndInfo, iEI = '00011101'B;
|
||||
)"
|
||||
};
|
||||
|
||||
|
||||
|
||||
// ------------------ // ----PDU_BSSAPp---- // ------------------
|
||||
|
||||
|
||||
type union PDU_BSSAPp {
|
||||
PDU_BSSAPp_PAGING_REJECT pDU_BSSAPp_PAGING_REJECT,
|
||||
PDU_BSSAPp_PAGING_REQUEST pDU_BSSAPp_PAGING_REQUEST,
|
||||
PDU_BSSAPp_DOWNLINK_TUNNEL_REQUEST pDU_BSSAPp_DOWNLINK_TUNNEL_REQUEST,
|
||||
PDU_BSSAPp_UPLINK_TUNNEL_REQUEST pDU_BSSAPp_UPLINK_TUNNEL_REQUEST,
|
||||
PDU_BSSAPp_LOCATION_UPDATE_REQUEST pDU_BSSAPp_LOCATION_UPDATE_REQUEST,
|
||||
PDU_BSSAPp_LOCATION_UPDATE_ACCEPT pDU_BSSAPp_LOCATION_UPDATE_ACCEPT,
|
||||
PDU_BSSAPp_LOCATION_UPDATE_REJECT pDU_BSSAPp_LOCATION_UPDATE_REJECT,
|
||||
PDU_BSSAPp_TMSI_REALLOCATION_COMPLETE pDU_BSSAPp_TMSI_REALLOCATION_COMPLETE,
|
||||
PDU_BSSAPp_ALERT_REQUEST pDU_BSSAPp_ALERT_REQUEST,
|
||||
PDU_BSSAPp_ALERT_ACK pDU_BSSAPp_ALERT_ACK,
|
||||
PDU_BSSAPp_ALERT_REJECT pDU_BSSAPp_ALERT_REJECT,
|
||||
PDU_BSSAPp_MS_ACTIVITY_INDICATION pDU_BSSAPp_MS_ACTIVITY_INDICATION,
|
||||
PDU_BSSAPp_GPRS_DETACH_INDICATION pDU_BSSAPp_GPRS_DETACH_INDICATION,
|
||||
PDU_BSSAPp_GPRS_DETACH_ACK pDU_BSSAPp_GPRS_DETACH_ACK,
|
||||
PDU_BSSAPp_IMSI_DETACH_INDICATION pDU_BSSAPp_IMSI_DETACH_INDICATION,
|
||||
PDU_BSSAPp_IMSI_DETACH_ACK pDU_BSSAPp_IMSI_DETACH_ACK,
|
||||
PDU_BSSAPp_RESET_INDICATION pDU_BSSAPp_RESET_INDICATION,
|
||||
PDU_BSSAPp_RESET_ACK pDU_BSSAPp_RESET_ACK,
|
||||
PDU_BSSAPp_MS_INFORMATION_REQUEST pDU_BSSAPp_MS_INFORMATION_REQUEST,
|
||||
PDU_BSSAPp_MS_INFORMATION_RESPONSE pDU_BSSAPp_MS_INFORMATION_RESPONSE,
|
||||
PDU_BSSAPp_MM_INFORMATION_REQUEST pDU_BSSAPp_MM_INFORMATION_REQUEST,
|
||||
PDU_BSSAPp_MOBILE_STATUS pDU_BSSAPp_MOBILE_STATUS,
|
||||
PDU_BSSAPp_MS_UNREACHABLE pDU_BSSAPp_MS_UNREACHABLE
|
||||
|
||||
} with {
|
||||
variant "TAG (
|
||||
pDU_BSSAPp_PAGING_REQUEST, messageType ='00000001'B;
|
||||
pDU_BSSAPp_PAGING_REJECT, messageType ='00000010'B;
|
||||
pDU_BSSAPp_DOWNLINK_TUNNEL_REQUEST, messageType ='00000111'B;
|
||||
pDU_BSSAPp_UPLINK_TUNNEL_REQUEST, messageType ='00001000'B;
|
||||
pDU_BSSAPp_LOCATION_UPDATE_REQUEST, messageType ='00001001'B;
|
||||
pDU_BSSAPp_LOCATION_UPDATE_ACCEPT, messageType ='00001010'B;
|
||||
pDU_BSSAPp_LOCATION_UPDATE_REJECT, messageType ='00001011'B;
|
||||
pDU_BSSAPp_TMSI_REALLOCATION_COMPLETE, messageType ='00001100'B;
|
||||
pDU_BSSAPp_ALERT_REQUEST, messageType ='00001101'B;
|
||||
pDU_BSSAPp_ALERT_ACK, messageType ='00001110'B;
|
||||
pDU_BSSAPp_ALERT_REJECT, messageType ='00001111'B;
|
||||
pDU_BSSAPp_MS_ACTIVITY_INDICATION, messageType ='00010000'B;
|
||||
pDU_BSSAPp_GPRS_DETACH_INDICATION, messageType ='00010001'B;
|
||||
pDU_BSSAPp_GPRS_DETACH_ACK, messageType ='00010010'B;
|
||||
pDU_BSSAPp_IMSI_DETACH_INDICATION, messageType ='00010011'B;
|
||||
pDU_BSSAPp_IMSI_DETACH_ACK, messageType ='00010100'B;
|
||||
pDU_BSSAPp_RESET_INDICATION, messageType ='00010101'B;
|
||||
pDU_BSSAPp_RESET_ACK, messageType ='00010110'B;
|
||||
pDU_BSSAPp_MS_INFORMATION_REQUEST, messageType ='00010111'B;
|
||||
pDU_BSSAPp_MS_INFORMATION_RESPONSE, messageType ='00011000'B;
|
||||
pDU_BSSAPp_MM_INFORMATION_REQUEST, messageType ='00011010'B;
|
||||
pDU_BSSAPp_MOBILE_STATUS, messageType ='00011101'B;
|
||||
pDU_BSSAPp_MS_UNREACHABLE, messageType ='00011111'B;
|
||||
)"
|
||||
};
|
||||
|
||||
} with{ encode "RAW"}//end of module BSSAPp_Types
|
|
@ -0,0 +1,51 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (c) 2016 Ericsson
|
||||
|
||||
The copyright to the computer program(s) herein is the property of Ericsson.
|
||||
The program(s) may be used and/or copied only with the written permission
|
||||
of Ericsson or in accordance with the terms and conditions stipulated in the
|
||||
agreement/contract under which the program(s) has been supplied.
|
||||
|
||||
|
||||
File: BSSGP_v13.0.0_CNL113833.tpd
|
||||
Description: tpd project file
|
||||
Rev: R1A
|
||||
Prodnr: CNL 113 833
|
||||
|
||||
-->
|
||||
<TITAN_Project_File_Information version="1.0">
|
||||
<ProjectName>BSSGP_v13.0.0_CNL113833</ProjectName>
|
||||
<ReferencedProjects>
|
||||
<ReferencedProject name="ProtocolModules_Common" projectLocationURI="../COMMON/ProtocolModules_Common.tpd"/>
|
||||
</ReferencedProjects>
|
||||
<Files>
|
||||
<FileResource projectRelativePath="src/BSSGP_EncDec.cc" relativeURI="src/BSSGP_EncDec.cc"/>
|
||||
<FileResource projectRelativePath="src/BSSGP_Types.ttcn" relativeURI="src/BSSGP_Types.ttcn"/>
|
||||
</Files>
|
||||
<ActiveConfiguration>Default</ActiveConfiguration>
|
||||
<Configurations>
|
||||
<Configuration name="Default">
|
||||
<ProjectProperties>
|
||||
<MakefileSettings>
|
||||
<generateInternalMakefile>true</generateInternalMakefile>
|
||||
<GNUMake>true</GNUMake>
|
||||
<incrementalDependencyRefresh>true</incrementalDependencyRefresh>
|
||||
<targetExecutable>bin/BSSGP_v13.0.0_CNL113833</targetExecutable>
|
||||
<buildLevel>Level 3 - Creating object files with dependency update</buildLevel>
|
||||
</MakefileSettings>
|
||||
<LocalBuildSettings>
|
||||
<workingDirectory>bin</workingDirectory>
|
||||
</LocalBuildSettings>
|
||||
</ProjectProperties>
|
||||
<FolderProperties>
|
||||
<FolderResource>
|
||||
<FolderPath>doc</FolderPath>
|
||||
<FolderProperties>
|
||||
<ExcludeFromBuild>true</ExcludeFromBuild>
|
||||
</FolderProperties>
|
||||
</FolderResource>
|
||||
</FolderProperties>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
</TITAN_Project_File_Information>
|
|
@ -0,0 +1,13 @@
|
|||
Please note that the storage of the documentation of the product has been
|
||||
moved to the eridoc.ericsson.se from the ClearCase.
|
||||
|
||||
You can access the documentation of the product via the following links:
|
||||
|
||||
The documentation belongs to the R1A revision of the product
|
||||
can be found here:
|
||||
http://document.internal.ericsson.com/Download?DocNo=1095-CNL113833&Rev=A&Lang=EN&PRev=Y
|
||||
|
||||
The documentation belongs to the latest revision of the product
|
||||
can be found here:
|
||||
http://document.internal.ericsson.com/Download?DocNo=1095-CNL113833&Rev=HIGHEST&Lang=EN&Status=FREE&PRev=Y
|
||||
|
|
@ -0,0 +1,145 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Copyright Test Competence Center (TCC) ETH 2016 //
|
||||
// //
|
||||
// The copyright to the computer program(s) herein is the property of TCC. //
|
||||
// The program(s) may be used and/or copied only with the written permission //
|
||||
// of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
// agreement/contract under which the program(s) has been supplied. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: BSSGP_EncDec.cc
|
||||
// Rev: R1A
|
||||
// Prodnr: CNL 113 833
|
||||
// Contact: http://ttcn.ericsson.se
|
||||
// Reference: 3GPP TS 48.018 13.0.0
|
||||
|
||||
#include "BSSGP_Types.hh"
|
||||
|
||||
//static TTCN_Module BSSGP_EndDec("BSSGP_EncDec", __DATE__, __TIME__);
|
||||
|
||||
namespace BSSGP__Types {
|
||||
|
||||
|
||||
OCTETSTRING enc__PDU__BSSGP(const PDU__BSSGP& pdu)
|
||||
{
|
||||
TTCN_Buffer bb;
|
||||
|
||||
// CALCULATE WHICH LENGTH FORMAT SHOULD BE USED AND CHANGE SHORT LENGTH FORM
|
||||
// TO LONG LENGTH FORM IF NECESSARY
|
||||
if (pdu.get_selection() == PDU__BSSGP::ALT_pDU__BSSGP__DL__UNITDATA)
|
||||
{
|
||||
if( pdu.pDU__BSSGP__DL__UNITDATA().lLC__PDU().lLC__PDU().lengthof() > 127)
|
||||
{
|
||||
PDU__BSSGP pdu2(pdu);
|
||||
pdu2.pDU__BSSGP__DL__UNITDATA().lLC__PDU().lengthIndicator().length2() =
|
||||
pdu2.pDU__BSSGP__DL__UNITDATA().lLC__PDU().lLC__PDU().lengthof();
|
||||
pdu2.encode(PDU__BSSGP_descr_ ,bb, TTCN_EncDec::CT_RAW);
|
||||
|
||||
}
|
||||
else
|
||||
pdu.encode(PDU__BSSGP_descr_ ,bb, TTCN_EncDec::CT_RAW);
|
||||
}
|
||||
else if(pdu.get_selection() == PDU__BSSGP::ALT_pDU__BSSGP__UL__UNITDATA)
|
||||
{
|
||||
if( pdu.pDU__BSSGP__UL__UNITDATA().lLC__PDU().lLC__PDU().lengthof() > 127)
|
||||
{
|
||||
PDU__BSSGP pdu2(pdu);
|
||||
pdu2.pDU__BSSGP__UL__UNITDATA().lLC__PDU().lengthIndicator().length2() =
|
||||
pdu2.pDU__BSSGP__UL__UNITDATA().lLC__PDU().lLC__PDU().lengthof();
|
||||
pdu2.encode(PDU__BSSGP_descr_ ,bb, TTCN_EncDec::CT_RAW);
|
||||
}
|
||||
else
|
||||
pdu.encode(PDU__BSSGP_descr_ ,bb, TTCN_EncDec::CT_RAW);
|
||||
}
|
||||
|
||||
else if(pdu.get_selection() == PDU__BSSGP::ALT_pDU__BSSGP__DL__MBMS__UNITDATA)
|
||||
{
|
||||
if( pdu.pDU__BSSGP__DL__MBMS__UNITDATA().lLC__PDU().lLC__PDU().lengthof() > 127)
|
||||
{
|
||||
PDU__BSSGP pdu2(pdu);
|
||||
pdu2.pDU__BSSGP__DL__MBMS__UNITDATA().lLC__PDU().lengthIndicator().length2() =
|
||||
pdu2.pDU__BSSGP__DL__MBMS__UNITDATA().lLC__PDU().lLC__PDU().lengthof();
|
||||
pdu2.encode(PDU__BSSGP_descr_ ,bb, TTCN_EncDec::CT_RAW);
|
||||
}
|
||||
else
|
||||
pdu.encode(PDU__BSSGP_descr_ ,bb, TTCN_EncDec::CT_RAW);
|
||||
}
|
||||
|
||||
else if(pdu.get_selection() == PDU__BSSGP::ALT_pDU__BSSGP__UL__MBMS__UNITDATA)
|
||||
{
|
||||
if( pdu.pDU__BSSGP__UL__MBMS__UNITDATA().lLC__PDU().lLC__PDU().lengthof() > 127)
|
||||
{
|
||||
PDU__BSSGP pdu2(pdu);
|
||||
pdu2.pDU__BSSGP__UL__MBMS__UNITDATA().lLC__PDU().lengthIndicator().length2() =
|
||||
pdu2.pDU__BSSGP__UL__MBMS__UNITDATA().lLC__PDU().lLC__PDU().lengthof();
|
||||
pdu2.encode(PDU__BSSGP_descr_ ,bb, TTCN_EncDec::CT_RAW);
|
||||
}
|
||||
else
|
||||
pdu.encode(PDU__BSSGP_descr_ ,bb, TTCN_EncDec::CT_RAW);
|
||||
}
|
||||
|
||||
else
|
||||
pdu.encode(PDU__BSSGP_descr_ ,bb, TTCN_EncDec::CT_RAW);
|
||||
|
||||
return OCTETSTRING (bb.get_len(), bb.get_data());
|
||||
}
|
||||
|
||||
/*PDU__BSSGP dec__PDU__BSSGP(const OCTETSTRING& stream)
|
||||
{
|
||||
PDU__BSSGP retv;
|
||||
TTCN_Buffer bb;
|
||||
|
||||
bb.put_os(stream);
|
||||
|
||||
retv.decode(PDU__BSSGP_descr_, bb, TTCN_EncDec::CT_RAW);
|
||||
return retv;
|
||||
}*/
|
||||
|
||||
PDU__BSSGP dec__PDU__BSSGP(const OCTETSTRING& stream)
|
||||
{
|
||||
if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {
|
||||
TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
|
||||
TTCN_Logger::log_event_str("dec_PDU_BSSGP(): Stream before decoding: ");
|
||||
stream.log();
|
||||
TTCN_Logger::end_event();
|
||||
}
|
||||
TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT);
|
||||
TTCN_EncDec::clear_error();
|
||||
TTCN_Buffer ttcn_buffer(stream);
|
||||
PDU__BSSGP ret_val;
|
||||
ret_val.decode(PDU__BSSGP_descr_, ttcn_buffer, TTCN_EncDec::CT_RAW);
|
||||
|
||||
if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {
|
||||
TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
|
||||
TTCN_Logger::log_event_str("dec_PDU_BSSGP(): Decoded @BSSGP_Types.PDU_BSSGP: ");
|
||||
ret_val.log();
|
||||
TTCN_Logger::end_event();
|
||||
}
|
||||
if (TTCN_EncDec::get_last_error_type() == TTCN_EncDec::ET_NONE) {
|
||||
if (ttcn_buffer.get_pos() < ttcn_buffer.get_len() && TTCN_Logger::log_this_event(TTCN_WARNING)) {
|
||||
ttcn_buffer.cut();
|
||||
OCTETSTRING remaining_stream;
|
||||
ttcn_buffer.get_string(remaining_stream);
|
||||
TTCN_Logger::begin_event(TTCN_WARNING);
|
||||
TTCN_Logger::log_event_str("dec_PDU_BSSGP(): Warning: Data remained at the end of the stream after successful decoding: ");
|
||||
remaining_stream.log();
|
||||
TTCN_Logger::end_event();
|
||||
}
|
||||
}
|
||||
if(ret_val.get_selection()== PDU__BSSGP::ALT_pDU__BSSGP__PS__HANDOVER__REQUEST)
|
||||
{
|
||||
if(!ret_val.pDU__BSSGP__PS__HANDOVER__REQUEST().target__Cell__Identifier().ispresent()){
|
||||
Cell__Identifier cell;
|
||||
cell = ret_val.pDU__BSSGP__PS__HANDOVER__REQUEST().source__Cell__Identifier();
|
||||
ret_val.pDU__BSSGP__PS__HANDOVER__REQUEST().target__Cell__Identifier() = cell;
|
||||
//ret_val.pDU__BSSGP__PS__HANDOVER__REQUEST().source__Cell__Identifier().clean_up();
|
||||
ret_val.pDU__BSSGP__PS__HANDOVER__REQUEST().source__Cell__Identifier()= OMIT_VALUE;
|
||||
|
||||
} }
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
|
||||
}//namespace
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,59 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright Test Competence Center (TCC) ETH 2012
|
||||
|
||||
The copyright to the computer program(s) herein is the property of TCC.
|
||||
The program(s) may be used and/or copied only with the written permission
|
||||
of TCC or in accordance with the terms and conditions stipulated in the
|
||||
agreement/contract under which the program(s) has been supplied.
|
||||
|
||||
|
||||
File: BSSMAP_v11.2.0_CNL113761.tpd
|
||||
Description: tpd project file
|
||||
Rev: R1A01
|
||||
Prodnr: CNL 113 761
|
||||
Updated: 2012-11-09
|
||||
Contact: http://ttcn.ericsson.se
|
||||
|
||||
-->
|
||||
<TITAN_Project_File_Information version="1.0">
|
||||
<ProjectName>BSSMAP_v11.2.0_CNL113761</ProjectName>
|
||||
<ReferencedProjects>
|
||||
<ReferencedProject name="ProtocolModules_Common" projectLocationURI="../COMMON/ProtocolModules_Common.tpd"/>
|
||||
</ReferencedProjects>
|
||||
<Folders>
|
||||
<FolderResource projectRelativePath="doc" relativeURI="doc"/>
|
||||
<FolderResource projectRelativePath="src" relativeURI="src"/>
|
||||
</Folders>
|
||||
<Files>
|
||||
<FileResource projectRelativePath="doc/BSSMAP_v11.2.0_CNL113761_FS.pdf" relativeURI="/doc/BSSMAP_v11.2.0_CNL113761_FS.pdf"/>
|
||||
<FileResource projectRelativePath="doc/BSSMAP_v11.2.0_CNL113761_PRI.pdf" relativeURI="/doc/BSSMAP_v11.2.0_CNL113761_PRI.pdf"/>
|
||||
<FileResource projectRelativePath="doc/BSSMAP_v11.2.0_CNL113761_UG.pdf" relativeURI="/doc/BSSMAP_v11.2.0_CNL113761_UG.pdf"/>
|
||||
<FileResource projectRelativePath="src/BSSAP_Types.ttcn" relativeURI="/src/BSSAP_Types.ttcn"/>
|
||||
</Files>
|
||||
<ActiveConfiguration>Default</ActiveConfiguration>
|
||||
<Configurations>
|
||||
<Configuration name="Default">
|
||||
<ProjectProperties>
|
||||
<MakefileSettings>
|
||||
<generateInternalMakefile>true</generateInternalMakefile>
|
||||
<GNUMake>true</GNUMake>
|
||||
<incrementalDependencyRefresh>true</incrementalDependencyRefresh>
|
||||
<targetExecutable>bin/BSSMAP_v11.2.0_CNL113761</targetExecutable>
|
||||
<buildLevel>Level 3 - Creating object files with dependency update</buildLevel>
|
||||
</MakefileSettings>
|
||||
<LocalBuildSettings>
|
||||
<workingDirectory>bin</workingDirectory>
|
||||
</LocalBuildSettings>
|
||||
</ProjectProperties>
|
||||
<FolderProperties>
|
||||
<FolderResource>
|
||||
<FolderPath>doc</FolderPath>
|
||||
<FolderProperties>
|
||||
<ExcludeFromBuild>true</ExcludeFromBuild>
|
||||
</FolderProperties>
|
||||
</FolderResource>
|
||||
</FolderProperties>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
</TITAN_Project_File_Information>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,27 @@
|
|||
<!--
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Copyright Test Competence Center (TCC) ETH 2012 //
|
||||
// //
|
||||
// The copyright to the computer program(s) herein is the property of TCC. //
|
||||
// The program(s) may be used and/or copied only with the written permission //
|
||||
// of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
// agreement/contract under which the program(s) has been supplied. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: BSSMAP_V11.2.0.grp
|
||||
// Description: BSSMAP_V11.2.0 Protocol Module group file
|
||||
// Rev: R1A01
|
||||
// Prodnr: CNL 113 761
|
||||
// Updated: 2012-11-06
|
||||
// Contact: http://ttcn.ericsson.se
|
||||
//
|
||||
-->
|
||||
|
||||
<!DOCTYPE TITAN_GUI_FileGroup_file>
|
||||
<FileGroup TITAN_version="1.10.pl0" >
|
||||
<File_Group name="BSSMAP_V11.2.0" >
|
||||
<File path="BSSAP_Types.ttcn" />
|
||||
</File_Group>
|
||||
</FileGroup>
|
|
@ -0,0 +1,47 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (c) 2016 Ericsson
|
||||
|
||||
The copyright to the computer program(s) herein is the property of Ericsson.
|
||||
The program(s) may be used and/or copied only with the written permission
|
||||
of Ericsson or in accordance with the terms and conditions stipulated in the
|
||||
agreement/contract under which the program(s) has been supplied.
|
||||
|
||||
|
||||
File: GTP_v13.5.0_CNL113843.tpd
|
||||
Description: tpd project file
|
||||
Rev: R1B
|
||||
Prodnr: CNL 113 843
|
||||
|
||||
-->
|
||||
<TITAN_Project_File_Information version="1.0">
|
||||
<ProjectName>GTP_v13.5.0_CNL113843</ProjectName>
|
||||
<ReferencedProjects>
|
||||
<ReferencedProject name="ProtocolModules_Common" projectLocationURI="../COMMON/ProtocolModules_Common.tpd"/>
|
||||
</ReferencedProjects>
|
||||
<Folders>
|
||||
<FolderResource projectRelativePath="src" relativeURI="src"/>
|
||||
</Folders>
|
||||
<Files>
|
||||
<FileResource projectRelativePath="src/GTPC_EncDec.cc" relativeURI="src/GTPC_EncDec.cc"/>
|
||||
<FileResource projectRelativePath="src/GTPC_Types.ttcn" relativeURI="src/GTPC_Types.ttcn"/>
|
||||
<FileResource projectRelativePath="src/GTPU_EncDec.cc" relativeURI="src/GTPU_EncDec.cc"/>
|
||||
<FileResource projectRelativePath="src/GTPU_Types.ttcn" relativeURI="src/GTPU_Types.ttcn"/>
|
||||
</Files>
|
||||
<ActiveConfiguration>Default</ActiveConfiguration>
|
||||
<Configurations>
|
||||
<Configuration name="Default">
|
||||
<ProjectProperties>
|
||||
<MakefileSettings>
|
||||
<generateInternalMakefile>true</generateInternalMakefile>
|
||||
<GNUMake>true</GNUMake>
|
||||
<incrementalDependencyRefresh>true</incrementalDependencyRefresh>
|
||||
<targetExecutable>bin/GTP_v13.5.0_CNL113843</targetExecutable>
|
||||
</MakefileSettings>
|
||||
<LocalBuildSettings>
|
||||
<workingDirectory>bin</workingDirectory>
|
||||
</LocalBuildSettings>
|
||||
</ProjectProperties>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
</TITAN_Project_File_Information>
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,216 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Copyright Test Competence Center (TCC) ETH 2016 //
|
||||
// //
|
||||
// The copyright to the computer program(s) herein is the property of TCC. //
|
||||
// The program(s) may be used and/or copied only with the written permission //
|
||||
// of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
// agreement/contract under which the program(s) has been supplied. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: GTPC_EncDec.cc
|
||||
// Rev: R1B
|
||||
// Prodnr: CNL 113 843
|
||||
// Contact: http://ttcn.ericsson.se
|
||||
// Reference: 3GPP TS 29.060 v13.5.0
|
||||
|
||||
#include "GTPC_Types.hh"
|
||||
|
||||
namespace GTPC__Types {
|
||||
|
||||
|
||||
// find the length of the optional part and decode optional part into OPT_PART
|
||||
int find_optpart_length(const unsigned char * opt_part_ptr,GTPC__Header__optional__part& OPT_PART)// pointer to opt part start
|
||||
{
|
||||
int opt_part_length = 4; // mandatory minimum length of opt_part
|
||||
OPT_PART.sequenceNumber() = OCTETSTRING(2,opt_part_ptr);
|
||||
OPT_PART.npduNumber() = OCTETSTRING(1,opt_part_ptr+2);
|
||||
OPT_PART.nextExtHeader() = OCTETSTRING(1,opt_part_ptr+3);
|
||||
OPT_PART.gTPC__extensionHeader__List() = OMIT_VALUE;
|
||||
|
||||
int i = 0;
|
||||
bool opt_part_end = false;
|
||||
while(!opt_part_end)
|
||||
{
|
||||
if (opt_part_ptr[opt_part_length-1] != 0x00) // 0x00 means end of optional part
|
||||
{
|
||||
unsigned char lengthfield = opt_part_ptr[opt_part_length];
|
||||
|
||||
OPT_PART.gTPC__extensionHeader__List()()[i].lengthfield() = lengthfield;
|
||||
OPT_PART.gTPC__extensionHeader__List()()[i].content() =
|
||||
OCTETSTRING(4*lengthfield-2,opt_part_ptr + opt_part_length +1);
|
||||
OPT_PART.gTPC__extensionHeader__List()()[i].nextExtHeader() =
|
||||
OCTETSTRING(1,opt_part_ptr + opt_part_length + 4*lengthfield - 1);
|
||||
|
||||
opt_part_length = opt_part_length + 4*lengthfield;
|
||||
i++;
|
||||
}
|
||||
else
|
||||
{opt_part_end = true;}
|
||||
}
|
||||
|
||||
return opt_part_length;
|
||||
}
|
||||
|
||||
|
||||
void dec__PDU__GTPC_no_optional_part(const unsigned char * udp__pdu,const int pl_udp_pdu_length, const SystemUnderTest& pl__SystemUnderTest,PDU__GTPC& pdu)
|
||||
{
|
||||
TTCN_Buffer buf;
|
||||
|
||||
if ((pl__SystemUnderTest == SystemUnderTest::GGSN) || (pl__SystemUnderTest == SystemUnderTest::CGW))
|
||||
// testing GGSN or CGW (not default)
|
||||
{
|
||||
const unsigned char *gtpc_message = (const unsigned char *) udp__pdu;
|
||||
if ((gtpc_message[1] == 0x12) || (gtpc_message[1] == 0x13))
|
||||
// if updatePDPContextRequest or updatePDPContextResponse message is received from GGSN or C-GW
|
||||
{
|
||||
unsigned char pn = gtpc_message[0] & 0x01;
|
||||
pdu.pn__bit() = BITSTRING(1,&pn);
|
||||
|
||||
unsigned char s = (gtpc_message[0] & 0x02) >> 1;
|
||||
pdu.s__bit() = BITSTRING(1,&s);
|
||||
|
||||
unsigned char e = (gtpc_message[0] & 0x04) >> 2;
|
||||
pdu.e__bit() = BITSTRING(1,&e);
|
||||
|
||||
unsigned char spare = (gtpc_message[0] & 0x08) >> 3;
|
||||
pdu.spare() = BITSTRING(1,&spare );
|
||||
|
||||
unsigned char pt = (gtpc_message[0] & 0x10) >> 4;
|
||||
pdu.pt() = BITSTRING(1,&pt );
|
||||
|
||||
unsigned char version = ((gtpc_message[0] & 0x80) >> 7) |
|
||||
((gtpc_message[0] & 0x40) >> 5) |
|
||||
((gtpc_message[0] & 0x20) >> 3) ;
|
||||
pdu.version() = BITSTRING(3,&version);
|
||||
|
||||
pdu.messageType() = OCTETSTRING(1,gtpc_message+1);
|
||||
|
||||
pdu.lengthf() = (gtpc_message[2] << 8) + gtpc_message[3];
|
||||
|
||||
pdu.teid() = OCTETSTRING(4,gtpc_message+4);
|
||||
|
||||
pdu.opt__part() = OMIT_VALUE;
|
||||
|
||||
if (gtpc_message[1] == 0x12) //updatePDPContextRequest
|
||||
{
|
||||
if(pl__SystemUnderTest == SystemUnderTest::GGSN) // from GGSN
|
||||
{
|
||||
UpdatePDPContextRequestGGSN updatePDPContextRequestGGSN;
|
||||
OCTETSTRING updatePDPContextRequestGGSN_string = OCTETSTRING(pl_udp_pdu_length-8,udp__pdu+8 );
|
||||
buf.put_os(updatePDPContextRequestGGSN_string);
|
||||
updatePDPContextRequestGGSN.decode(UpdatePDPContextRequestGGSN_descr_,buf,TTCN_EncDec::CT_RAW);
|
||||
pdu.gtpc__pdu().updatePDPContextRequest().updatePDPContextRequestGGSN() = updatePDPContextRequestGGSN;
|
||||
}
|
||||
else // from CGW
|
||||
{
|
||||
UpdatePDPContextRequestCGW updatePDPContextRequestCGW;
|
||||
OCTETSTRING updatePDPContextRequestCGW_string = OCTETSTRING(pl_udp_pdu_length-8,udp__pdu+8 );
|
||||
buf.put_os(updatePDPContextRequestCGW_string);
|
||||
updatePDPContextRequestCGW.decode(UpdatePDPContextRequestCGW_descr_,buf,TTCN_EncDec::CT_RAW);
|
||||
pdu.gtpc__pdu().updatePDPContextRequest().updatePDPContextRequestCGW() = updatePDPContextRequestCGW;
|
||||
}
|
||||
}
|
||||
else //updatePDPContextResponse
|
||||
{
|
||||
if(pl__SystemUnderTest == SystemUnderTest::GGSN) // from GGSN
|
||||
{
|
||||
UpdatePDPContextResponseGGSN updatePDPContextResponseGGSN;
|
||||
OCTETSTRING updatePDPContextResponseGGSN_string = OCTETSTRING(pl_udp_pdu_length-8,udp__pdu+8 );
|
||||
buf.put_os(updatePDPContextResponseGGSN_string);
|
||||
updatePDPContextResponseGGSN.decode(UpdatePDPContextResponseGGSN_descr_,buf,TTCN_EncDec::CT_RAW);
|
||||
pdu.gtpc__pdu().updatePDPContextResponse().updatePDPContextResponseGGSN() = updatePDPContextResponseGGSN;
|
||||
}
|
||||
else // from CGW
|
||||
{
|
||||
UpdatePDPContextResponseCGW updatePDPContextResponseCGW;
|
||||
OCTETSTRING updatePDPContextResponseCGW_string = OCTETSTRING(pl_udp_pdu_length-8,udp__pdu+8 );
|
||||
buf.put_os(updatePDPContextResponseCGW_string);
|
||||
updatePDPContextResponseCGW.decode(UpdatePDPContextResponseCGW_descr_,buf,TTCN_EncDec::CT_RAW);
|
||||
pdu.gtpc__pdu().updatePDPContextResponse().updatePDPContextResponseCGW() = updatePDPContextResponseCGW;
|
||||
}
|
||||
}
|
||||
|
||||
buf.clear();
|
||||
return;
|
||||
}
|
||||
else // if message not equal to updatePDPContextRequest or updatePDPContextResponse is received from GGSN or C-GW
|
||||
{
|
||||
buf.put_s(pl_udp_pdu_length,udp__pdu);
|
||||
pdu.decode(PDU__GTPC_descr_, buf, TTCN_EncDec::CT_RAW);
|
||||
buf.clear();
|
||||
return;
|
||||
}
|
||||
}
|
||||
else //pl__SystemUnderTest is SGSN or MME (this is default)
|
||||
{
|
||||
buf.put_s(pl_udp_pdu_length,udp__pdu);
|
||||
pdu.decode(PDU__GTPC_descr_, buf, TTCN_EncDec::CT_RAW);
|
||||
buf.clear();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////
|
||||
// Decoding function for GTPC__DialoguePDU
|
||||
//////////////////////////////////
|
||||
|
||||
PDU__GTPC dec__PDU__GTPC(const OCTETSTRING& udp__pdu,const SystemUnderTest& pl__SystemUnderTest)
|
||||
{
|
||||
PDU__GTPC pdu;
|
||||
|
||||
const unsigned char *gtpc_message = (const unsigned char *) udp__pdu;
|
||||
|
||||
int opt_part_length = 0;
|
||||
if ( gtpc_message[0] & 0x07 ) // opt_part is present
|
||||
{
|
||||
GTPC__Header__optional__part OPT_PART;
|
||||
|
||||
// find the length of the optional part and decode optional part into OPT_PART
|
||||
opt_part_length = find_optpart_length(gtpc_message+8,OPT_PART);
|
||||
if( ((gtpc_message[2] << 8) + gtpc_message[3] - opt_part_length) < 0 )
|
||||
{TTCN_error("Decoding error, lengthf field is shorter that decoded length of opt_part");}
|
||||
|
||||
// build PDU without optional part
|
||||
unsigned int gtpc_IEs_length = (gtpc_message[2] << 8) + gtpc_message[3] - opt_part_length;
|
||||
unsigned char gtpcBuf[8 + gtpc_IEs_length];
|
||||
memcpy(gtpcBuf,gtpc_message,8);
|
||||
memcpy(gtpcBuf+8,gtpc_message+8+opt_part_length,gtpc_IEs_length);
|
||||
|
||||
// substitute dummy bits (indicating there is no optional part)
|
||||
gtpcBuf[0] = gtpcBuf[0] & 0xf8;
|
||||
|
||||
// substitute dummy length (not including optional part)
|
||||
gtpcBuf[2] = (gtpc_IEs_length & 0xff00) >> 8;
|
||||
gtpcBuf[3] = gtpc_IEs_length & 0xff;
|
||||
|
||||
// call decoding function
|
||||
dec__PDU__GTPC_no_optional_part(gtpcBuf,udp__pdu.lengthof() - opt_part_length,pl__SystemUnderTest,pdu);
|
||||
|
||||
// put back the original values
|
||||
unsigned char pn = gtpc_message[0] & 0x01;
|
||||
pdu.pn__bit() = BITSTRING(1,&pn);
|
||||
|
||||
unsigned char s = (gtpc_message[0] & 0x02) >> 1;
|
||||
pdu.s__bit() = BITSTRING(1,&s);
|
||||
|
||||
unsigned char e = (gtpc_message[0] & 0x04) >> 2;
|
||||
pdu.e__bit() = BITSTRING(1,&e);
|
||||
|
||||
pdu.lengthf() = (gtpc_message[2] << 8) + gtpc_message[3];
|
||||
|
||||
pdu.opt__part() = OPT_PART;
|
||||
|
||||
return pdu;
|
||||
}
|
||||
else // opt_part is not present
|
||||
{
|
||||
dec__PDU__GTPC_no_optional_part(gtpc_message,udp__pdu.lengthof(),pl__SystemUnderTest,pdu);
|
||||
return pdu;
|
||||
}
|
||||
} // end of function
|
||||
|
||||
|
||||
|
||||
}//namespace
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,119 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Copyright Test Competence Center (TCC) ETH 2016 //
|
||||
// //
|
||||
// The copyright to the computer program(s) herein is the property of TCC. //
|
||||
// The program(s) may be used and/or copied only with the written permission //
|
||||
// of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
// agreement/contract under which the program(s) has been supplied. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: GTPU_EncDec.cc
|
||||
// Rev: R1B
|
||||
// Prodnr: CNL 113 843
|
||||
// Contact: http://ttcn.ericsson.se
|
||||
// Reference: 3GPP TS 29.060 v13.5.0
|
||||
|
||||
#include "GTPU_Types.hh"
|
||||
|
||||
namespace GTPU__Types {
|
||||
|
||||
// find the length of the optional part and decode optional part into OPT_PART
|
||||
int find_optpart_length(const unsigned char * opt_part_ptr,GTPU__Header__optional__part& OPT_PART)// pointer to opt part start
|
||||
{
|
||||
int opt_part_length = 4; // mandatory minimum length of opt_part
|
||||
OPT_PART.sequenceNumber() = OCTETSTRING(2,opt_part_ptr);
|
||||
OPT_PART.npduNumber() = OCTETSTRING(1,opt_part_ptr+2);
|
||||
OPT_PART.nextExtHeader() = OCTETSTRING(1,opt_part_ptr+3);
|
||||
OPT_PART.gTPU__extensionHeader__List() = OMIT_VALUE;
|
||||
|
||||
int i = 0;
|
||||
bool opt_part_end = false;
|
||||
while(!opt_part_end)
|
||||
{
|
||||
if (opt_part_ptr[opt_part_length-1] != 0x00) // 0x00 means end of optional part
|
||||
{
|
||||
unsigned char lengthfield = opt_part_ptr[opt_part_length];
|
||||
|
||||
OPT_PART.gTPU__extensionHeader__List()()[i].lengthfield() = lengthfield;
|
||||
OPT_PART.gTPU__extensionHeader__List()()[i].content() =
|
||||
OCTETSTRING(4*lengthfield-2,opt_part_ptr + opt_part_length +1);
|
||||
OPT_PART.gTPU__extensionHeader__List()()[i].nextExtHeader() =
|
||||
OCTETSTRING(1,opt_part_ptr + opt_part_length + 4*lengthfield - 1);
|
||||
|
||||
opt_part_length = opt_part_length + 4*lengthfield;
|
||||
i++;
|
||||
}
|
||||
else
|
||||
{opt_part_end = true;}
|
||||
}
|
||||
|
||||
return opt_part_length;
|
||||
}
|
||||
|
||||
//////////////////////////////////
|
||||
// Decoding function for GTPC__DialoguePDU
|
||||
//////////////////////////////////
|
||||
PDU__GTPU dec__PDU__GTPU(const OCTETSTRING& udp__pdu)
|
||||
{
|
||||
TTCN_Buffer buf;
|
||||
PDU__GTPU pdu;
|
||||
|
||||
const unsigned char *gtpu_message = (const unsigned char *) udp__pdu;
|
||||
|
||||
int opt_part_length = 0;
|
||||
if ( gtpu_message[0] & 0x07 ) // opt_part is present
|
||||
{
|
||||
GTPU__Header__optional__part OPT_PART;
|
||||
|
||||
// find the length of the optional part and decode optional part into OPT_PART
|
||||
opt_part_length = find_optpart_length(gtpu_message+8,OPT_PART);
|
||||
if( ((gtpu_message[2] << 8) + gtpu_message[3] - opt_part_length) < 0 )
|
||||
{TTCN_error("Decoding error, lengthf field is shorter that decoded length of opt_part");};
|
||||
|
||||
// build PDU without optional part
|
||||
unsigned int gtpu_IEs_length = (gtpu_message[2] << 8) + gtpu_message[3] - opt_part_length;
|
||||
unsigned char gtpuBuf[8 + gtpu_IEs_length];
|
||||
memcpy(gtpuBuf,gtpu_message,8);
|
||||
memcpy(gtpuBuf+8,gtpu_message+8+opt_part_length,gtpu_IEs_length);
|
||||
|
||||
// substitute dummy bits (indicating there is no optional part)
|
||||
gtpuBuf[0] = gtpuBuf[0] & 0xf8;
|
||||
|
||||
// substitute dummy length (not including optional part)
|
||||
gtpuBuf[2] = (gtpu_IEs_length & 0xff00) >> 8;
|
||||
gtpuBuf[3] = gtpu_IEs_length & 0xff;
|
||||
|
||||
// RAW decoding
|
||||
buf.put_s(8 + gtpu_IEs_length,gtpuBuf);
|
||||
pdu.decode(PDU__GTPU_descr_, buf, TTCN_EncDec::CT_RAW);
|
||||
buf.clear();
|
||||
|
||||
// put back the original values
|
||||
unsigned char pn = gtpu_message[0] & 0x01;
|
||||
pdu.pn__bit() = BITSTRING(1,&pn);
|
||||
|
||||
unsigned char s = (gtpu_message[0] & 0x02) >> 1;
|
||||
pdu.s__bit() = BITSTRING(1,&s);
|
||||
|
||||
unsigned char e = (gtpu_message[0] & 0x04) >> 2;
|
||||
pdu.e__bit() = BITSTRING(1,&e);
|
||||
|
||||
pdu.lengthf() = (gtpu_message[2] << 8) + gtpu_message[3];
|
||||
|
||||
pdu.opt__part() = OPT_PART;
|
||||
|
||||
return pdu;
|
||||
}
|
||||
else // opt_part is not present
|
||||
{
|
||||
buf.put_os(udp__pdu);
|
||||
pdu.decode(PDU__GTPU_descr_, buf, TTCN_EncDec::CT_RAW);
|
||||
buf.clear();
|
||||
return pdu;
|
||||
}
|
||||
} // end of function
|
||||
|
||||
|
||||
}//namespace
|
|
@ -0,0 +1,189 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Copyright Test Competence Center (TCC) ETH 2016 //
|
||||
// //
|
||||
// The copyright to the computer program(s) herein is the property of TCC. //
|
||||
// The program(s) may be used and/or copied only with the written permission //
|
||||
// of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
// agreement/contract under which the program(s) has been supplied. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: GTPU_Types.ttcn
|
||||
// Rev: R1B
|
||||
// Prodnr: CNL 113 843
|
||||
// Contact: http://ttcn.ericsson.se
|
||||
// Reference: 3GPP TS 29.060 v13.5.0, 3GPP TS 29.281 v13.2.0
|
||||
//
|
||||
// This module contains the GTP-U (General Packet Radio Servive Protocol
|
||||
// Tunnelling Protocol - User Plane)
|
||||
|
||||
module GTPU_Types {
|
||||
|
||||
import from General_Types all;
|
||||
|
||||
// external encoding/decoding functions
|
||||
external function enc_PDU_GTPU(in PDU_GTPU gtpu_pdu) return octetstring
|
||||
with { extension "prototype(convert)"
|
||||
extension "encode(RAW)"
|
||||
}
|
||||
|
||||
external function dec_PDU_GTPU(in octetstring udp_pdu) return PDU_GTPU
|
||||
|
||||
external function dec_PDU_GTPU_ext(in octetstring udp_pdu) return PDU_GTPU_ext
|
||||
with { extension "prototype(convert)"
|
||||
extension "decode(RAW)"
|
||||
}
|
||||
|
||||
|
||||
|
||||
//////////////////////////
|
||||
// IE definition
|
||||
//////////////////////////
|
||||
//Private Extension - 7.7.46
|
||||
type record of PrivateExtension_gtpu PrivateExtension_gtpu_List;
|
||||
|
||||
type record PrivateExtension_gtpu {
|
||||
OCT1 type_gtpu,
|
||||
LIN2_BO_LAST lengthf,
|
||||
OCT2 extensionID,
|
||||
octetstring extensionValue
|
||||
} with { variant "PRESENCE( type_gtpu = 'FF'O)";
|
||||
variant (lengthf) "LENGTHTO(extensionID, extensionValue)";};
|
||||
|
||||
//Recovery - 7.7.11
|
||||
type record Recovery_gtpu {
|
||||
OCT1 type_gtpu,
|
||||
OCT1 restartCounter
|
||||
};
|
||||
|
||||
//Extension Header Type List - 7.7.40
|
||||
type record ExtensionHeaderTypeList_gtpu {
|
||||
OCT1 type_gtpu,
|
||||
integer lengthf,
|
||||
octetstring extensionTypesList
|
||||
} with { variant (lengthf) "LENGTHTO(extensionTypesList)"; }
|
||||
|
||||
//Tunnel Endpoint Identifier Data I - 7.7.13
|
||||
type record TeidDataI_gtpu {
|
||||
OCT1 type_gtpu,
|
||||
OCT4 teidDataI
|
||||
};
|
||||
|
||||
//GSN Address - 7.7.32
|
||||
type record GSNAddress_gtpu
|
||||
{
|
||||
OCT1 type_gtpu,
|
||||
LIN2_BO_LAST lengthf,
|
||||
octetstring gSNAddressValue
|
||||
} with {variant (lengthf) "LENGTHTO(gSNAddressValue)";};
|
||||
|
||||
//////////////////////////
|
||||
// Message definition
|
||||
//////////////////////////
|
||||
// Echo Request - 7.2.1
|
||||
type record EchoRequest_IEs {
|
||||
PrivateExtension_gtpu_List private_extension_gtpu optional
|
||||
}
|
||||
|
||||
// Echo Response - 7.2.2
|
||||
type record EchoResponse_IEs {
|
||||
Recovery_gtpu recovery_gtpu,
|
||||
PrivateExtension_gtpu_List private_extension_gtpu optional
|
||||
}
|
||||
|
||||
//Error Indication - 3GPP TS 29.281 v13.2.0 - 7.3.1
|
||||
type record ErrorIndication_IEs {
|
||||
TeidDataI_gtpu teidDataI_gtpu,
|
||||
GSNAddress_gtpu gSNAddress_gtpu,
|
||||
PrivateExtension_gtpu_List private_extension_gtpu optional
|
||||
}
|
||||
|
||||
//Supported Extension Headers Notification - 7.2.4
|
||||
type record SupportedExtensionHeadersNotification_IEs {
|
||||
ExtensionHeaderTypeList_gtpu extensionHeaderTypeList_gtpu
|
||||
};
|
||||
|
||||
// 3GPP TS 29.281 v9.3.0 - 7.3.2
|
||||
type record EndMarker_IEs{
|
||||
PrivateExtension_gtpu_List private_extension_gtpu optional
|
||||
}
|
||||
|
||||
//G PDU - 9.3.1
|
||||
type record G_PDU_IEs {
|
||||
octetstring data
|
||||
};
|
||||
|
||||
|
||||
type union GTPU_IEs {
|
||||
EchoRequest_IEs echoRequest_IEs,
|
||||
EchoResponse_IEs echoResponse_IEs,
|
||||
ErrorIndication_IEs errorIndication_IEs,
|
||||
SupportedExtensionHeadersNotification_IEs suppExtHeadersNotif_IEs,
|
||||
EndMarker_IEs endMarker_IEs,
|
||||
G_PDU_IEs g_PDU_IEs
|
||||
};
|
||||
|
||||
|
||||
//////////////////////////
|
||||
// Extension Header definition
|
||||
//////////////////////////
|
||||
type record GTPU_ExtensionHeader {
|
||||
integer lengthfield,
|
||||
octetstring content,
|
||||
OCT1 nextExtHeader
|
||||
} with {
|
||||
variant (lengthfield) "LENGTHTO(lengthfield,content,nextExtHeader)";
|
||||
variant (lengthfield) "UNIT(32)";
|
||||
}
|
||||
|
||||
type record of GTPU_ExtensionHeader GTPU_ExtensionHeader_List;
|
||||
|
||||
type record GTPU_Header_optional_part {
|
||||
OCT2 sequenceNumber,
|
||||
OCT1 npduNumber,
|
||||
OCT1 nextExtHeader,
|
||||
GTPU_ExtensionHeader_List gTPU_extensionHeader_List optional
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////
|
||||
// PDU definition
|
||||
//////////////////////////
|
||||
type record PDU_GTPU {
|
||||
BIT1 pn_bit,
|
||||
BIT1 s_bit,
|
||||
BIT1 e_bit,
|
||||
BIT1 spare,
|
||||
BIT1 pt,
|
||||
BIT3 version,
|
||||
OCT1 messageType,
|
||||
LIN2_BO_LAST lengthf,
|
||||
OCT4 teid,
|
||||
GTPU_Header_optional_part opt_part optional,
|
||||
GTPU_IEs gtpu_IEs
|
||||
} with {
|
||||
variant (lengthf) "LENGTHTO(opt_part, gtpu_IEs)";
|
||||
variant (opt_part) "PRESENCE({pn_bit = '1'B, s_bit = '1'B, e_bit = '1'B})";
|
||||
variant (gtpu_IEs) "CROSSTAG( echoRequest_IEs, messageType = '01'O;
|
||||
echoResponse_IEs, messageType = '02'O;
|
||||
errorIndication_IEs, messageType = '1A'O;
|
||||
suppExtHeadersNotif_IEs, messageType = '1F'O;
|
||||
endMarker_IEs, messageType = 'FE'O;
|
||||
g_PDU_IEs, messageType = 'FF'O)";
|
||||
};
|
||||
|
||||
|
||||
type record PDU_GTPU_ext {
|
||||
PDU_GTPU gtpu_pdu,
|
||||
octetstring extraOctets
|
||||
} with {
|
||||
variant "" ;
|
||||
};
|
||||
|
||||
}//end of module
|
||||
with {
|
||||
extension "version R1B"
|
||||
encode "RAW"
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (c) 2017 Ericsson
|
||||
|
||||
The copyright to the computer program(s) herein is the property of Ericsson.
|
||||
The program(s) may be used and/or copied only with the written permission
|
||||
of Ericsson or in accordance with the terms and conditions stipulated in the
|
||||
agreement/contract under which the program(s) has been supplied.
|
||||
|
||||
|
||||
File: GTPv2_v13.7.0_CNL113846.tpd
|
||||
Description: tpd project file
|
||||
Rev: R1E
|
||||
Prodnr: CNL 113 846
|
||||
|
||||
-->
|
||||
<TITAN_Project_File_Information version="1.0">
|
||||
<ProjectName>GTPv2_v13.7.0_CNL113846</ProjectName>
|
||||
<ReferencedProjects>
|
||||
<ReferencedProject name="GTPv2_PrivateExtensions_CNL113798" projectLocationURI="../GTPv2_PrivateExtensions_CNL113798/GTPv2_PrivateExtensions_CNL113798.tpd"/>
|
||||
<ReferencedProject name="ProtocolModules_Common" projectLocationURI="../COMMON/ProtocolModules_Common.tpd"/>
|
||||
</ReferencedProjects>
|
||||
<Files>
|
||||
<FileResource projectRelativePath="GTPv2_Types.ttcn" relativeURI="src/GTPv2_Types.ttcn"/>
|
||||
</Files>
|
||||
<ActiveConfiguration>Default</ActiveConfiguration>
|
||||
<Configurations>
|
||||
<Configuration name="Default">
|
||||
<ProjectProperties>
|
||||
<MakefileSettings>
|
||||
<generateInternalMakefile>true</generateInternalMakefile>
|
||||
<GNUMake>true</GNUMake>
|
||||
<incrementalDependencyRefresh>true</incrementalDependencyRefresh>
|
||||
<targetExecutable>bin/GTPv2_v13.7.0_CNL113846</targetExecutable>
|
||||
<buildLevel>Level3-Creatingobjectfileswithdependencyupdate</buildLevel>
|
||||
</MakefileSettings>
|
||||
<LocalBuildSettings>
|
||||
<workingDirectory>bin</workingDirectory>
|
||||
</LocalBuildSettings>
|
||||
</ProjectProperties>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
</TITAN_Project_File_Information>
|
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,318 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Copyright Test Competence Center (TCC) ETH 2008 //
|
||||
// //
|
||||
// The copyright to the computer program(s) herein is the property of TCC. //
|
||||
// The program(s) may be used and/or copied only with the written permission //
|
||||
// of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
// agreement/contract under which the program(s) has been supplied. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: LLC_EncDec.cc
|
||||
// Rev: R1A0
|
||||
// Prodnr: CNL 113 577
|
||||
// Updated: 2008-01-22
|
||||
// Contact: http://ttcn.ericsson.se
|
||||
// Reference: 3GPP TS 44.064 7.1.0
|
||||
|
||||
#include "LLC_Types.hh"
|
||||
#include <string.h>
|
||||
|
||||
// GIVEN IN CODE RECEIVED FROM ERV
|
||||
#define CRC_POLY_LLC2 0xad85dd
|
||||
|
||||
// GIVEN IN SPECIFICATION
|
||||
//#define CRC_POLY_LLC2 0xbba1b5
|
||||
|
||||
#define TABLE_LENGTH 256
|
||||
|
||||
// For UI frames if PM bit is 0 (unprotected) then CRC will be calculated over Header + N202 octets
|
||||
#define N202 4
|
||||
|
||||
unsigned int mCRCTable[TABLE_LENGTH];
|
||||
|
||||
|
||||
static void BuildCrc24Table()
|
||||
{
|
||||
unsigned int i,j;
|
||||
unsigned int reg;
|
||||
|
||||
//TRACE_FUNC( "BuildCrc24Table" );
|
||||
|
||||
for( i = 0; i < TABLE_LENGTH; i++ )
|
||||
{
|
||||
reg = i;
|
||||
for( j = 8; j > 0; j-- )
|
||||
{
|
||||
if( reg & 1 )
|
||||
{
|
||||
|
||||
reg = (reg>>1) ^ (unsigned int) CRC_POLY_LLC2;
|
||||
}
|
||||
else
|
||||
{
|
||||
reg >>= 1;
|
||||
}
|
||||
}
|
||||
reg &= 0x00ffffffL;
|
||||
|
||||
mCRCTable[i] = (unsigned int)reg;
|
||||
//TTCN_Logger::begin_event(TTCN_DEBUG);
|
||||
|
||||
//TTCN_Logger::log_event("mCRCTable[%d]= %d",i,mCRCTable[i]);
|
||||
|
||||
// TTCN_Logger::end_event();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------
|
||||
|
||||
unsigned int Calculate_CRC(TTCN_Buffer& pdu)
|
||||
{
|
||||
|
||||
const unsigned char* loc_pdu = pdu.get_data();
|
||||
|
||||
//TTCN_Logger::begin_event(TTCN_DEBUG);
|
||||
|
||||
//for (size_t i =0; i< pdu.get_len();i++)
|
||||
// {
|
||||
// TTCN_Logger::log_event("%02x ",loc_pdu[i]);
|
||||
// }
|
||||
|
||||
//TTCN_Logger::log_event("\n");
|
||||
|
||||
//TTCN_Logger::end_event();
|
||||
|
||||
BuildCrc24Table();
|
||||
|
||||
//TTCN_Logger::begin_event(TTCN_DEBUG);
|
||||
//TTCN_Logger::log_event("mCRCTable[%d]= %d\n",255,mCRCTable[255]);
|
||||
//TTCN_Logger::log_event("mCRCTable[%d]= 0x%08x (%u)",255,mCRCTable[255]);
|
||||
//TTCN_Logger::log_event("\n");
|
||||
//TTCN_Logger::end_event();
|
||||
|
||||
unsigned int reg = 0xFFFFFF;
|
||||
|
||||
unsigned int length = pdu.get_len();
|
||||
|
||||
|
||||
|
||||
if ( ((loc_pdu[1] >>5) & 0x07) == 0x06 ) //UI frame
|
||||
{
|
||||
if ((loc_pdu[2] & 0x01) == 0x00) // PM bit is 0 (unprotected)
|
||||
{
|
||||
if(length > 3 + N202) // pdu length is longer than header + N202
|
||||
{
|
||||
length = 3 + N202; // length = header length + N202
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
while ( length--)
|
||||
{
|
||||
reg =
|
||||
((reg>>8) & 0x00ffff)^mCRCTable[(reg^*((unsigned char*)loc_pdu++)) & 0xffL];
|
||||
}
|
||||
//TTCN_Logger::log(TTCN_DEBUG, "reg:%08x\n",reg);
|
||||
// 1's complement of FCS
|
||||
reg ^= 0xffffffL;
|
||||
|
||||
reg = ((reg >> 16) & 0x000000ff)+ ((reg) & 0x0000ff00) + ((reg <<16 )& 0x00ff0000);
|
||||
//unsigned int tempint = *(unsigned int*)loc_crcBuffer;
|
||||
//reg = (unsigned int*)loc_crcBuffer ;
|
||||
//TTCN_Logger::log(TTCN_DEBUG, "reg:%08x\n",reg);
|
||||
|
||||
return reg & 0x00ffffffL;
|
||||
}
|
||||
//---------------------------------------------------------------------------------------
|
||||
|
||||
namespace LLC__Types {
|
||||
|
||||
OCTETSTRING enc__PDU__LLC(const PDU__LLC& pdu)
|
||||
{
|
||||
TTCN_Buffer bb;
|
||||
PDU__LLC pdu2(pdu);
|
||||
|
||||
if (pdu2.get_selection() == PDU__LLC::ALT_pDU__LLC__U)
|
||||
{
|
||||
|
||||
if (pdu2.pDU__LLC__U().information__field__U().get_selection() == Information__field__U::ALT_uA)
|
||||
{int record_of_size = pdu2.pDU__LLC__U().information__field__U().uA().size_of();
|
||||
|
||||
for (int i = 0; i < (record_of_size) ; i++)
|
||||
{
|
||||
// AUTOMATICALLY CALCULATE WHICH LENGTH FORMAT SHOULD BE USED AND CHANGE SHORT LENGTH FORM
|
||||
// TO LONG LENGTH FORM IF NECESSARY WHEN L3 PDU IS INCLUDED
|
||||
if ( pdu2.pDU__LLC__U().information__field__U().uA()[i].typefield() == int2bit(11,5) )
|
||||
{
|
||||
if( pdu2.pDU__LLC__U().information__field__U().uA()[i].xID__Data().l3param().lengthof() > 3)
|
||||
{
|
||||
pdu2.pDU__LLC__U().information__field__U().uA()[i].xID__length().long__len() =
|
||||
pdu2.pDU__LLC__U().information__field__U().uA()[i].xID__Data().l3param().lengthof();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pdu2.pDU__LLC__U().information__field__U().get_selection() == Information__field__U::ALT_sABM)
|
||||
{int record_of_size = pdu2.pDU__LLC__U().information__field__U().sABM().size_of();
|
||||
|
||||
for (int i = 0; i < (record_of_size) ; i++)
|
||||
{
|
||||
// AUTOMATICALLY CALCULATE WHICH LENGTH FORMAT SHOULD BE USED AND CHANGE SHORT LENGTH FORM
|
||||
// TO LONG LENGTH FORM IF NECESSARY WHEN L3 PDU IS INCLUDED
|
||||
if ( pdu2.pDU__LLC__U().information__field__U().sABM()[i].typefield() == int2bit(11,5) )
|
||||
{
|
||||
if( pdu2.pDU__LLC__U().information__field__U().sABM()[i].xID__Data().l3param().lengthof() > 3)
|
||||
{
|
||||
pdu2.pDU__LLC__U().information__field__U().sABM()[i].xID__length().long__len() =
|
||||
pdu2.pDU__LLC__U().information__field__U().sABM()[i].xID__Data().l3param().lengthof();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pdu2.pDU__LLC__U().information__field__U().get_selection() == Information__field__U::ALT_xID)
|
||||
{int record_of_size = pdu2.pDU__LLC__U().information__field__U().xID().size_of();
|
||||
|
||||
for (int i = 0; i < (record_of_size) ; i++)
|
||||
{
|
||||
// AUTOMATICALLY CALCULATE WHICH LENGTH FORMAT SHOULD BE USED AND CHANGE SHORT LENGTH FORM
|
||||
// TO LONG LENGTH FORM IF NECESSARY WHEN L3 PDU IS INCLUDED
|
||||
if ( pdu2.pDU__LLC__U().information__field__U().xID()[i].typefield() == int2bit(11,5) )
|
||||
{
|
||||
if( pdu2.pDU__LLC__U().information__field__U().xID()[i].xID__Data().l3param().lengthof() > 3)
|
||||
{
|
||||
pdu2.pDU__LLC__U().information__field__U().xID()[i].xID__length().long__len() =
|
||||
pdu2.pDU__LLC__U().information__field__U().xID()[i].xID__Data().l3param().lengthof();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (pdu2.get_selection() == PDU__LLC::ALT_pDU__LLC__U)
|
||||
{
|
||||
if ( pdu2.pDU__LLC__U().fCS().ispresent())
|
||||
{
|
||||
if ( pdu2.pDU__LLC__U().fCS() == int2oct(0,3) ) // IF ENCODER NEEDS TO GENERATE CRC
|
||||
{
|
||||
pdu2.pDU__LLC__U().fCS() = OMIT_VALUE;
|
||||
pdu2.encode(PDU__LLC_descr_ ,bb, TTCN_EncDec::CT_RAW);
|
||||
unsigned int crcBuffer = Calculate_CRC(bb);
|
||||
bb.put_os(int2oct(crcBuffer,3));
|
||||
return OCTETSTRING (bb.get_len(), bb.get_data());
|
||||
|
||||
}
|
||||
|
||||
else { // IF ENCODER SENDS OUT NONZERO CRC GIVEN IN TTCN TEMPLATE
|
||||
pdu2.encode(PDU__LLC_descr_ ,bb, TTCN_EncDec::CT_RAW);
|
||||
return OCTETSTRING (bb.get_len(), bb.get_data());
|
||||
}
|
||||
}
|
||||
else { //FCS OMIT
|
||||
pdu2.encode(PDU__LLC_descr_ ,bb, TTCN_EncDec::CT_RAW);
|
||||
unsigned int crcBuffer = Calculate_CRC(bb);
|
||||
bb.put_os(int2oct(crcBuffer,3));
|
||||
return OCTETSTRING (bb.get_len(), bb.get_data());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
else if (pdu2.get_selection() == PDU__LLC::ALT_pDU__LLC__UI)
|
||||
{
|
||||
if ( pdu2.pDU__LLC__UI().fCS().ispresent())
|
||||
{
|
||||
if ( pdu2.pDU__LLC__UI().fCS() == int2oct(0,3) ) // IF ENCODER NEEDS TO GENERATE CRC
|
||||
{
|
||||
pdu2.pDU__LLC__UI().fCS() = OMIT_VALUE;
|
||||
pdu2.encode(PDU__LLC_descr_ ,bb, TTCN_EncDec::CT_RAW);
|
||||
unsigned int crcBuffer = Calculate_CRC(bb);
|
||||
bb.put_os(int2oct(crcBuffer,3));
|
||||
return OCTETSTRING (bb.get_len(), bb.get_data());
|
||||
|
||||
}
|
||||
|
||||
else { // IF ENCODER SENDS OUT NONZERO CRC GIVEN IN TTCN TEMPLATE
|
||||
pdu2.encode(PDU__LLC_descr_ ,bb, TTCN_EncDec::CT_RAW);
|
||||
return OCTETSTRING (bb.get_len(), bb.get_data());
|
||||
}
|
||||
}
|
||||
else { //FCS OMIT
|
||||
pdu2.encode(PDU__LLC_descr_ ,bb, TTCN_EncDec::CT_RAW);
|
||||
unsigned int crcBuffer = Calculate_CRC(bb);
|
||||
bb.put_os(int2oct(crcBuffer,3));
|
||||
return OCTETSTRING (bb.get_len(), bb.get_data());
|
||||
}
|
||||
}
|
||||
else {TTCN_error("Can not encode LLC PDU"); //Neither UI NOR U
|
||||
|
||||
return OCTETSTRING (bb.get_len(), bb.get_data()); // this is dummy to avoid warning during compilation
|
||||
}
|
||||
//pdu2.encode(PDU__LLC_descr_ ,bb, TTCN_EncDec::CT_RAW);
|
||||
//unsigned int crcBuffer = Calculate_CRC(bb);
|
||||
|
||||
//bb.put_os( int2oct(crcBuffer,3));
|
||||
|
||||
|
||||
//return OCTETSTRING (bb.get_len(), bb.get_data());
|
||||
|
||||
}
|
||||
|
||||
|
||||
OCTETSTRING enc__PDU__LLC(const PDU__LLC_template& pdu)
|
||||
{
|
||||
return enc__PDU__LLC(pdu.valueof());
|
||||
}
|
||||
|
||||
|
||||
PDU__LLC dec__PDU__LLC(const OCTETSTRING& stream)
|
||||
{
|
||||
PDU__LLC retv;
|
||||
TTCN_Buffer bb;
|
||||
OCTETSTRING crc = int2oct(0,3);
|
||||
|
||||
size_t datalength = stream.lengthof()-3;
|
||||
const unsigned char * CRC_AS_RECEIVED = (const unsigned char *)stream+datalength;
|
||||
bb.put_s(datalength,(const unsigned char *)stream);
|
||||
|
||||
unsigned int CRC_CALCULATED = Calculate_CRC(bb);
|
||||
|
||||
// COMPARE CRC RECEIVED IN LLC PDU WITH CRC CALCULATED FROM LLC PDU
|
||||
if(
|
||||
(CRC_AS_RECEIVED[ 0 ] != (CRC_CALCULATED & 0xff0000 ) >> 16) ||
|
||||
(CRC_AS_RECEIVED[ 1 ] != (CRC_CALCULATED & 0xff00 ) >> 8) ||
|
||||
(CRC_AS_RECEIVED[ 2 ] != (CRC_CALCULATED & 0xff ) )
|
||||
)
|
||||
{
|
||||
TTCN_warning("CRC ERROR IN LLC PDU"); // CRC IS NOT AS EXPECTED
|
||||
crc=OCTETSTRING(3,CRC_AS_RECEIVED);
|
||||
}
|
||||
// CRC IS
|
||||
// FILL CRC octets with zeroes if CRC is OK
|
||||
|
||||
retv.decode(PDU__LLC_descr_, bb, TTCN_EncDec::CT_RAW);
|
||||
|
||||
if (retv.get_selection() == PDU__LLC::ALT_pDU__LLC__UI){
|
||||
retv.pDU__LLC__UI().fCS() = crc;
|
||||
}
|
||||
|
||||
if (retv.get_selection() == PDU__LLC::ALT_pDU__LLC__U){
|
||||
retv.pDU__LLC__U().fCS() = crc;
|
||||
}
|
||||
|
||||
|
||||
return retv;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}//namespace
|
|
@ -0,0 +1,329 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Copyright Test Competence Center (TCC) ETH 2008 //
|
||||
// //
|
||||
// The copyright to the computer program(s) herein is the property of TCC. //
|
||||
// The program(s) may be used and/or copied only with the written permission //
|
||||
// of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
// agreement/contract under which the program(s) has been supplied. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: LLC_Types.ttcn
|
||||
// Description: This module contains the Logical Link Control protocol (LLC)
|
||||
// 44.064 v7.1.0 with attributes for RAW encoding/decoding.
|
||||
// Rev: R1A0
|
||||
// Prodnr: CNL 113 577
|
||||
// Updated: 2008-01-22
|
||||
// Contact: http://ttcn.ericsson.se
|
||||
// Reference: 3GPP TS 44.064 7.1.0
|
||||
|
||||
module LLC_Types
|
||||
{
|
||||
|
||||
import from General_Types all;
|
||||
|
||||
external function enc_PDU_LLC(in PDU_LLC pdu) return octetstring;
|
||||
external function dec_PDU_LLC(in octetstring stream) return PDU_LLC;
|
||||
|
||||
type record Version
|
||||
{
|
||||
integer version_value (0..15),
|
||||
BIT4 spare
|
||||
|
||||
} with {
|
||||
variant (version_value) "FIELDLENGTH(4)";
|
||||
}
|
||||
|
||||
type octetstring IOV_UI length(4)
|
||||
|
||||
|
||||
type octetstring IOV_I length(4)
|
||||
|
||||
|
||||
type record T200
|
||||
{
|
||||
BIT4 spare,
|
||||
integer t200Value
|
||||
} with {
|
||||
variant (t200Value) "FIELDLENGTH(12)";
|
||||
variant (t200Value) "BYTEORDER(last)";
|
||||
variant "FIELDORDER(msb)";
|
||||
};
|
||||
|
||||
|
||||
type record N200
|
||||
{
|
||||
integer retransmissions (0..15),
|
||||
BIT4 spare
|
||||
} with {
|
||||
variant (retransmissions) "FIELDLENGTH(4)";
|
||||
}
|
||||
|
||||
|
||||
type record N201_U
|
||||
{
|
||||
BIT5 spare,
|
||||
integer n201UValue
|
||||
} with {
|
||||
variant (n201UValue) "FIELDLENGTH(11)";
|
||||
variant (n201UValue) "BYTEORDER(last)";
|
||||
variant "FIELDORDER(msb)";
|
||||
};
|
||||
|
||||
|
||||
type record N201_I
|
||||
{
|
||||
BIT5 spare,
|
||||
integer n201IValue
|
||||
}
|
||||
with {
|
||||
variant (n201IValue) "FIELDLENGTH(11)";
|
||||
variant (n201IValue) "BYTEORDER(last)";
|
||||
variant "FIELDORDER(msb)";
|
||||
};
|
||||
|
||||
type record MD
|
||||
{
|
||||
BIT1 spare,
|
||||
integer mDValue
|
||||
} with {
|
||||
variant (mDValue) "FIELDLENGTH(15)";
|
||||
variant (mDValue) "BYTEORDER(last)";
|
||||
variant "FIELDORDER(msb)";
|
||||
};
|
||||
|
||||
|
||||
type record MU
|
||||
{
|
||||
BIT1 spare,
|
||||
integer mUValue
|
||||
} with {
|
||||
variant (mUValue) "FIELDLENGTH(15)";
|
||||
variant (mUValue) "BYTEORDER(last)";
|
||||
variant "FIELDORDER(msb)";
|
||||
};
|
||||
|
||||
type integer KD with {variant "FIELDLENGTH(8)";};
|
||||
|
||||
type integer KU with {variant "FIELDLENGTH(8)";};
|
||||
|
||||
type octetstring L3param;
|
||||
|
||||
type octetstring Reset_LLC length(0);
|
||||
|
||||
type union XID_Data
|
||||
{
|
||||
Version version,
|
||||
IOV_UI iOV_UI,
|
||||
IOV_I iOV_I,
|
||||
T200 t200,
|
||||
N200 n200,
|
||||
N201_U n201_U,
|
||||
N201_I n201_I,
|
||||
MD mD,
|
||||
MU mU,
|
||||
KD kD,
|
||||
KU kU,
|
||||
L3param l3param,
|
||||
Reset_LLC reset
|
||||
}
|
||||
|
||||
|
||||
type union XID_length
|
||||
{
|
||||
integer short_len,
|
||||
integer long_len
|
||||
}with {
|
||||
variant (short_len) "FIELDLENGTH(2)";
|
||||
variant (long_len) "FIELDLENGTH(8)";
|
||||
variant (long_len) "BYTEORDER(last)";
|
||||
variant (short_len) "FIELDORDER(msb)";
|
||||
variant (long_len) "FIELDORDER(msb)";
|
||||
|
||||
}
|
||||
|
||||
|
||||
type record XID
|
||||
{
|
||||
BIT1 xl,
|
||||
BIT5 typefield,
|
||||
XID_length xID_length,
|
||||
//Header_XID header_XID,
|
||||
XID_Data xID_Data
|
||||
} with {
|
||||
variant (xID_Data) "CROSSTAG( version, typefield = '00000'B;
|
||||
iOV_UI, typefield = '00001'B;
|
||||
iOV_I, typefield = '00010'B;
|
||||
t200, typefield = '00011'B;
|
||||
n200, typefield = '00100'B;
|
||||
n201_U, typefield = '00101'B;
|
||||
n201_I, typefield = '00110'B;
|
||||
mD, typefield = '00111'B;
|
||||
mU, typefield = '01000'B;
|
||||
kD, typefield = '01001'B;
|
||||
kU, typefield = '01010'B;
|
||||
l3param, typefield = '01011'B;
|
||||
reset, typefield = '01100'B;
|
||||
|
||||
)";
|
||||
variant "FIELDORDER(msb)";
|
||||
variant (xID_length) "CROSSTAG( short_len, xl = '0'B;
|
||||
long_len, xl = '1'B;)";
|
||||
variant (xID_length) "LENGTHTO (xID_Data)"
|
||||
|
||||
variant (xID_length) "PADDING(yes)"
|
||||
};
|
||||
|
||||
|
||||
type record RejectedFrameControlField_UI
|
||||
{
|
||||
Control_field_UI control_field,
|
||||
OCT4 spare
|
||||
}
|
||||
|
||||
|
||||
type record RejectedFrameControlField_U
|
||||
{
|
||||
Control_field_U control_field,
|
||||
OCT5 spare
|
||||
}
|
||||
|
||||
|
||||
type union RejectedFrameControlField
|
||||
{
|
||||
RejectedFrameControlField_UI rejectedFrameControlField_UI,
|
||||
RejectedFrameControlField_U rejectedFrameControlField_U
|
||||
} with {
|
||||
variant "TAG(rejectedFrameControlField_UI, control_field.format = '110'B;
|
||||
rejectedFrameControlField_U, control_field.format = '111'B;
|
||||
)";
|
||||
};
|
||||
|
||||
|
||||
type record of XID UA_Information;
|
||||
|
||||
type record of XID SABM_Information;
|
||||
|
||||
type record of XID XID_Information;
|
||||
|
||||
|
||||
type octetstring DM_Information length(0);
|
||||
|
||||
|
||||
type record FRMR_Information
|
||||
{
|
||||
RejectedFrameControlField rejectedFrameControlField,
|
||||
BIT4 spare1,
|
||||
BIT9 vS,
|
||||
BIT1 spare2,
|
||||
BIT9 vR,
|
||||
BIT1 cR,
|
||||
BIT4 spare3,
|
||||
BIT1 w4,
|
||||
BIT1 w3,
|
||||
BIT1 w2,
|
||||
BIT1 w1
|
||||
} with {
|
||||
variant (vS) "BYTEORDER(last)";
|
||||
variant (vR) "BYTEORDER(last)";
|
||||
variant "FIELDORDER(msb)";
|
||||
};
|
||||
|
||||
|
||||
type record Address_field
|
||||
{
|
||||
BIT4 sAPI,
|
||||
BIT2 spare, // '00'B
|
||||
BIT1 cR,
|
||||
BIT1 pD //'0' for LLC
|
||||
}
|
||||
|
||||
type record Control_field_U
|
||||
{
|
||||
BIT4 mBits,
|
||||
BIT1 pF,
|
||||
BIT3 format // '111'B
|
||||
}
|
||||
|
||||
|
||||
|
||||
type record Control_field_UI
|
||||
|
||||
{
|
||||
BIT3 format, // '110'B
|
||||
BIT2 spare,
|
||||
integer nU, //BIT9
|
||||
BIT1 e,
|
||||
BIT1 pM
|
||||
} with {
|
||||
|
||||
variant (nU) "FIELDLENGTH(9)";
|
||||
variant (nU) "BYTEORDER(last)";
|
||||
variant "FIELDORDER(msb)";
|
||||
}
|
||||
|
||||
|
||||
type union Information_field_U
|
||||
{
|
||||
UA_Information uA,
|
||||
SABM_Information sABM,
|
||||
FRMR_Information fRMR,
|
||||
DM_Information dM,
|
||||
XID_Information xID
|
||||
};
|
||||
|
||||
|
||||
type record PDU_LLC_UI
|
||||
{
|
||||
Address_field address_field,
|
||||
Control_field_UI control_field,
|
||||
octetstring information_field_UI,
|
||||
OCT3 fCS optional
|
||||
// fCS ENCODING:
|
||||
//'000000'O in send template -> generate CRC,
|
||||
// omit in send template -> generate CRC,
|
||||
// otherwise send out fCS in send template
|
||||
//
|
||||
// DECODING:
|
||||
// decoder generates '000000'O if CRC OK
|
||||
}
|
||||
|
||||
|
||||
|
||||
type record PDU_LLC_U
|
||||
{
|
||||
Address_field address_field,
|
||||
Control_field_U control_field,
|
||||
Information_field_U information_field_U,
|
||||
OCT3 fCS optional
|
||||
// ENCODING:
|
||||
//'000000'O in send template -> generate CRC,
|
||||
// omit in send template -> generate CRC,
|
||||
// otherwise send out fCS in send template
|
||||
//
|
||||
// DECODING:
|
||||
// decoder generates '000000'O if CRC OK
|
||||
} with {
|
||||
variant (information_field_U) "CROSSTAG( uA, control_field.mBits = '0110'B;
|
||||
sABM, control_field.mBits = '0111'B;
|
||||
fRMR, control_field.mBits = '1000'B;
|
||||
dM, control_field.mBits = '0001'B;
|
||||
xID, control_field.mBits = '1011'B;
|
||||
)";
|
||||
};
|
||||
|
||||
|
||||
type union PDU_LLC
|
||||
{
|
||||
PDU_LLC_UI pDU_LLC_UI,
|
||||
PDU_LLC_U pDU_LLC_U
|
||||
} with { variant "TAG (
|
||||
pDU_LLC_UI, control_field.format ='110'B;
|
||||
pDU_LLC_U, control_field.format ='111'B;
|
||||
)"
|
||||
};
|
||||
|
||||
|
||||
|
||||
}with{ encode "RAW"}// end of module
|
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,680 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Copyright Test Competence Center (TCC) ETH 2016 //
|
||||
// //
|
||||
// The copyright to the computer program(s) herein is the property of TCC. //
|
||||
// The program(s) may be used and/or copied only with the written permission //
|
||||
// of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
// agreement/contract under which the program(s) has been supplied. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: MobileL3_CommonIE_Types.ttcn
|
||||
// Rev: R1B
|
||||
// Prodnr: CNL 113 832
|
||||
// Contact: http://ttcn.ericsson.se
|
||||
// Reference: 3GPP TS 24.008 v13.4.0
|
||||
|
||||
module MobileL3_CommonIE_Types {
|
||||
|
||||
import from General_Types all;
|
||||
|
||||
// This type is a container for all necessary MS related parameters
|
||||
type record MS_parameters
|
||||
{
|
||||
integer imsi_length, //in
|
||||
BIT4 imsi_firstdigit,
|
||||
octetstring imsi,
|
||||
octetstring number,
|
||||
integer SCCP_connId, //connection Id of currently used SCCP connection
|
||||
integer L3_NSD, // actual value of L3 NSD
|
||||
BIT1 tiFlag // '0'B for call originator, '1' for call destination
|
||||
// this is an example how to set the value
|
||||
// tsp_imsi_1_firstdigit := '0010'B
|
||||
// tsp_imsi_1 := '26200103000015'O; // '262021030000051'O;
|
||||
// tsp_calledPartyBCD_Number_digits := '7112300020'O ; // '1721030002'O
|
||||
}
|
||||
|
||||
// Use these Types instead of repeating it !
|
||||
|
||||
type record Type1_V
|
||||
{
|
||||
BIT4 dummy,
|
||||
BIT4 valuePart
|
||||
};
|
||||
|
||||
type record Type1_TV
|
||||
{
|
||||
BIT4 valuePart,
|
||||
BIT4 elementIdentifier
|
||||
};
|
||||
|
||||
type record Type2
|
||||
{
|
||||
OCT1 elementIdentifier
|
||||
};
|
||||
|
||||
type record Type3_V
|
||||
{
|
||||
OCTN valuePart
|
||||
};
|
||||
|
||||
type record Type3_TV
|
||||
{
|
||||
OCT1 elementIdentifier,
|
||||
OCTN valuePart
|
||||
};
|
||||
|
||||
type record Type4_LV
|
||||
{
|
||||
LIN1 lengthIndicator,
|
||||
OCTN valuePart
|
||||
} with { variant (lengthIndicator) "LENGTHTO (valuePart)"};
|
||||
|
||||
type record Type4_TLV
|
||||
{
|
||||
OCT1 elementIdentifier,
|
||||
LIN1 lengthIndicator,
|
||||
OCTN valuePart
|
||||
} with { variant (lengthIndicator) "LENGTHTO (valuePart)"};
|
||||
|
||||
///////////////////////////////////////
|
||||
// IE Type definitions
|
||||
///////////////////////////////////////
|
||||
|
||||
type record ML3_NotifySS_Arg
|
||||
{
|
||||
OCT1 sequenceTag,
|
||||
OCT1 sequenceLength,
|
||||
OCT1 ssCodeTag,
|
||||
OCT1 ssCodeLength,
|
||||
OCT1 ssCodeValue,
|
||||
OCT1 ssIndicatorTag,
|
||||
OCT1 ssIndicatorLength,
|
||||
OCT1 ssIndicatorValue
|
||||
};
|
||||
|
||||
|
||||
//============================================================================
|
||||
// 10.5.1 Common Information elements
|
||||
//============================================================================
|
||||
|
||||
// 10.5.1.1 Cell Identity
|
||||
type record CellIdentity
|
||||
{
|
||||
OCT1 elementIdentifier,
|
||||
OCT2 cIvalue
|
||||
};
|
||||
|
||||
// 10.5.1.2 CipheringKeySequenceNumber
|
||||
type record CipheringKeySequenceNumberTV
|
||||
{
|
||||
CipheringKeySequenceNumberV keySequence,
|
||||
BIT4 elementIdentifier
|
||||
} with { variant "PRESENCE (elementIdentifier = '1000'B)"; };
|
||||
|
||||
type record CipheringKeySequenceNumberV
|
||||
{
|
||||
BIT3 keySequence,
|
||||
BIT1 spare
|
||||
};
|
||||
|
||||
//24.008/10.5.1.3 Location Area Identification
|
||||
type record LocationAreaIdentification_V
|
||||
{
|
||||
OCT3 mcc_mnc,
|
||||
OCT2 lac
|
||||
};
|
||||
|
||||
type record LocationAreaIdentification_TV
|
||||
{
|
||||
OCT1 elementIdentifier,
|
||||
OCT3 mcc_mnc,
|
||||
OCT2 lac
|
||||
};
|
||||
|
||||
// 24.008/ 10.5.1.4 Mobile Identity
|
||||
type record MobileIdentityTLV
|
||||
{
|
||||
BIT7 elementIdentifier,
|
||||
BIT1 spare1,
|
||||
MobileIdentityLV mobileIdentityLV
|
||||
};
|
||||
|
||||
type record MobileIdentityLV
|
||||
{
|
||||
LIN1 lengthIndicator,
|
||||
MobileIdentityV mobileIdentityV
|
||||
} with { variant (lengthIndicator) "LENGTHTO (mobileIdentityV)"};
|
||||
|
||||
type record MobileIdentityV
|
||||
{
|
||||
BIT3 typeOfIdentity,
|
||||
OddEvenInd_Identity oddEvenInd_identity
|
||||
} with { variant (oddEvenInd_identity) "CROSSTAG
|
||||
(
|
||||
imei, typeOfIdentity ='010'B;
|
||||
imsi, typeOfIdentity ='001'B;
|
||||
imei_sv, typeOfIdentity ='011'B;
|
||||
tmsi_ptmsi, typeOfIdentity ='100'B;
|
||||
tmgi_and_MBMS_SessionID, typeOfIdentity ='101'B;
|
||||
no_identity, typeOfIdentity ='000'B;
|
||||
)"};
|
||||
|
||||
|
||||
type union OddEvenInd_Identity
|
||||
{
|
||||
IMSI_L3 imsi, // avoid name conflict with RANAP
|
||||
IMEI_L3 imei, // avoid name conflict with RANAP
|
||||
IMEI_SV imei_sv,
|
||||
TMSI_PTMSI tmsi_ptmsi,
|
||||
TMGI_and_MBMS_SessionID tmgi_and_MBMS_SessionID,
|
||||
No_Identity no_identity
|
||||
};
|
||||
|
||||
type record IMSI_L3
|
||||
{
|
||||
BIT1 oddevenIndicator, // '1'B or '0'B
|
||||
hexstring digits length(5..15),
|
||||
BIT4 fillerDigit optional // B'1111, fillerDigit is present
|
||||
// if oddevenIndicator=0
|
||||
} with { variant (fillerDigit) "PRESENCE (oddevenIndicator = '0'B) ";};
|
||||
|
||||
type record IMEI_L3
|
||||
{
|
||||
BIT1 oddevenIndicator, // '1'B
|
||||
hexstring digits length(15)
|
||||
};
|
||||
|
||||
type record TMSI_PTMSI
|
||||
{
|
||||
BIT1 oddevenIndicator, // '0'B
|
||||
BIT4 fillerDigit, // B'1111
|
||||
OCT4 octets
|
||||
};
|
||||
|
||||
type record IMEI_SV
|
||||
{
|
||||
BIT1 oddevenIndicator, // '0'B
|
||||
hexstring digits length(16),
|
||||
BIT4 fillerDigit // filler '1111'B
|
||||
};
|
||||
|
||||
type record TMGI_and_MBMS_SessionID
|
||||
{
|
||||
BIT1 oddevenIndicator,
|
||||
BIT1 mCC_MNCIndicator, // 1: present
|
||||
BIT1 mBMS_SessionIdentityIndicator, // 1: present
|
||||
BIT2 spare,
|
||||
OCT3 mBMS_ServiceID,
|
||||
HEX1 mccDigit1,
|
||||
HEX1 mccDigit2,
|
||||
HEX1 mccDigit3,
|
||||
HEX1 mncDigit3,
|
||||
HEX1 mncDigit1,
|
||||
HEX1 mncDigit2,
|
||||
OCT1 mBMS_SessionIdentity
|
||||
}
|
||||
|
||||
type record No_Identity
|
||||
{
|
||||
BIT1 oddevenIndicator, // '0'B (guessed)
|
||||
hexstring fillerDigits length(5) // length to be "3" if the GMM identification procedure is used
|
||||
};
|
||||
|
||||
// 24.008/ 10.5.1.5 MobileStationClassmark1
|
||||
type record MobileStationClassmark1_TV
|
||||
{
|
||||
OCT1 elementIdentifier, //'???'H
|
||||
BIT3 rf_PowerCapability,
|
||||
BIT1 a5_1,
|
||||
BIT1 esind,
|
||||
BIT2 revisionLevel,
|
||||
BIT1 spare1_1
|
||||
};
|
||||
|
||||
type record MobileStationClassmark1_V
|
||||
{
|
||||
BIT3 rf_PowerCapability,
|
||||
// class1 (000) (for GSM+DCS+PCS)
|
||||
// class2 (001) (for GSM+DCS+PCS)
|
||||
// class3 (010) (for GSM+DCS+PCS)
|
||||
// class4 (011) (only for GSM)
|
||||
// class5 (100) (only for GSM)
|
||||
BIT1 a5_1,
|
||||
// encryption algor. A5/available 1 (1)
|
||||
// encryption algor. A5/1 available not (0)
|
||||
BIT1 esind,
|
||||
BIT2 revisionLevel,
|
||||
BIT1 spare1_1
|
||||
};
|
||||
|
||||
// 24.008/ 10.5.1.6 MobileStationClassmark2
|
||||
//4th octet:
|
||||
type record MobileStationClassmark2_oct4
|
||||
{
|
||||
BIT1 fc, // '0'B no MS support of E/R_GSM
|
||||
// '1'B MS support of E/R_GSM
|
||||
////BIT2 spare1_2, // '00'B removed by ethbaat
|
||||
BIT1 vgcs,//'0'B no VGCS capability
|
||||
//'1'B VGCS capability and notifications wanted
|
||||
BIT1 vbs, //'0'B no VBS capability,
|
||||
// '1'B VBS capability and notifications wanted
|
||||
BIT1 sm_Capability, // '0'B SM capbility present not
|
||||
// '1'B SM capbility present
|
||||
BIT2 ss_ScreenIndicator,
|
||||
// '00'B default value of phase1 (GSM+DCS) reserved or (PCS)
|
||||
// '01'B capability of notation ellipsis
|
||||
// '10'B for future use
|
||||
// '11'B for use future
|
||||
BIT1 ps_Capability, // 'x'B ignored, received if
|
||||
BIT1 spare2_1 // '0'B
|
||||
};
|
||||
|
||||
|
||||
//5th octet ( Table 10.5.6a ):
|
||||
type record MobileStationClassmark2_oct5
|
||||
{
|
||||
BIT1 a5_2, // '0'B encryption algorithm A5/2 available not(0)
|
||||
// '1'B encryption algorithm A5/available 2 (1)
|
||||
BIT1 a5_3, // '0'B encryption algorithm A5/3 available not(0)
|
||||
// '1'B encryption algorithm A5/available 3 (1)
|
||||
//removed by ethbaat: BIT5 spare3_5, // '00000'B
|
||||
BIT1 cmsp,
|
||||
BIT1 solsa,
|
||||
BIT1 ucs2,
|
||||
BIT1 lcsva_cap,
|
||||
BIT1 spare5_7,
|
||||
BIT1 cm3 // '0'B no additional capability info
|
||||
// '1'B The MS supports options that are indicated in classmark 3 IE
|
||||
// (additional info capability)
|
||||
};
|
||||
|
||||
type record MobileStationClassmark2_LV
|
||||
{
|
||||
LIN1 lengthIndicator, // '01'O..'03'O
|
||||
BIT3 rf_PowerCapability, // '000'B class1 (for GSM+DCS+PCS)
|
||||
// '001'B class2 (for GSM+DCS+PCS)
|
||||
// '010'B class3 (for GSM+DCS+PCS)
|
||||
// '011'class4 B (only for GSM)
|
||||
// '100'class5 B (only for GSM)
|
||||
BIT1 a5_1, // '0'B encryption algorithm A5/1 available (0)
|
||||
// '1'B encryption algorithm A5/1 not available 1 (1)
|
||||
BIT1 esind,
|
||||
// '0'B controlled early classmark sending option implemented not (0)
|
||||
// '1'B controlled early classmark sending implemented option (1)
|
||||
BIT2 revisionLevel, // '00'B reserved for phase1 (GSM+DCS)
|
||||
// '00'B reserved for GSM phase 1 (PCS)
|
||||
// '01'B used by phase2 MSs (GSM+DCS)
|
||||
// '01'B used by PCS1900 MSs phase1 (PCS)
|
||||
// '10'B used by MSs R99 supporting
|
||||
// '11'B reserved for future use
|
||||
BIT1 spare1_1, // '0'B
|
||||
MobileStationClassmark2_oct4 mobileStationClassmark2_oct4 optional,
|
||||
MobileStationClassmark2_oct5 mobileStationClassmark2_oct5 optional
|
||||
} with { variant (lengthIndicator) "LENGTHTO (rf_PowerCapability, a5_1, esind,
|
||||
revisionLevel, spare1_1,
|
||||
mobileStationClassmark2_oct4,
|
||||
mobileStationClassmark2_oct5)"};
|
||||
|
||||
type record MobileStationClassmark2_TLV
|
||||
{
|
||||
OCT1 elementIdentifier,
|
||||
MobileStationClassmark2_LV mobileStationClassmark2LV
|
||||
} with {
|
||||
variant "PRESENCE (elementIdentifier = '11'O)";
|
||||
};
|
||||
|
||||
|
||||
|
||||
//**********************************************************************
|
||||
// 24.008/ 10.5.1.6 5th octet ( Table 10.5.6a ):
|
||||
// almost the same as MobileStationClassmark2_LV, but
|
||||
// _TLV ie elementIdentifier is present
|
||||
// oct4 and oct5 is mandatory
|
||||
// The record name is inherited from (and used in) old test cases
|
||||
//**********************************************************************
|
||||
type record ClassmarkInformationType2_forUMTS
|
||||
{
|
||||
OCT1 elementIdentifier,
|
||||
//'33'O instead of '12'O (normal Classmark2)
|
||||
LIN1 lengthIndicator,
|
||||
//always '03'O (unlike normal ClassMark2, which can be 2 or 3)
|
||||
BIT3 rf_PowerCapability, // '000'B class1 (for GSM+DCS+PCS)
|
||||
// '001'B class2 (for GSM+DCS+PCS)
|
||||
// '010'B class3 (for GSM+DCS+PCS)
|
||||
// '011'class4 B (only for GSM)
|
||||
// '100'class5 B (only for GSM)
|
||||
BIT1 a5_1, // '0'B encryption algorithm A5/1 available not (0)
|
||||
// '1'B encryption algorithm A5/available 1 (1)
|
||||
BIT1 esind,
|
||||
//'0'B controlled early classmark sending option implemented not (0)
|
||||
// '1'B controlled early classmark sending implemented option (1)
|
||||
BIT2 revisionLevel, // '00'B reserved for phase1 (GSM+DCS)
|
||||
// '00'reserved B (PCS)
|
||||
// '01'B used by phase2 MSs (GSM+DCS)
|
||||
// '01'B used by PCS1900 MSs phase1 (PCS)
|
||||
BIT1 spare1_1, // '0'B
|
||||
BIT1 fc, // '0'B no MS' support of E/R_GSM
|
||||
// '1'B MS' support of E/R_GSM
|
||||
BIT1 vgcs,//'0'B no VGCS capability
|
||||
//'1'B VGCS capability and notifications wanted
|
||||
BIT1 vbs, //'0'B no VBS capability,
|
||||
// '1'B VBS capability and notifications wanted
|
||||
BIT1 sm_Capability, // '0'B SM capbility present not
|
||||
// '1'B SM capability present
|
||||
BIT2 ss_ScreenIndicator, // '00'B default value of phase1 (GSM+DCS)
|
||||
// '00'reserved B (PCS)
|
||||
// '01'B capability of notation ellipsis
|
||||
// '10'B for future use
|
||||
// '11'B for use future
|
||||
BIT1 ps_Capability, // '0'B or '1'B ignored, received if
|
||||
BIT1 spare2_1, // '0'B,
|
||||
BIT1 a5_2, // '0'B encryption algorithm A5/2 available not (0)
|
||||
// '1'B encryption algorithm A5/available 2 (1)
|
||||
BIT1 a5_3, // '0'B encryption algorithm A5/3 available not (0)
|
||||
// '1'B encryption algorithm A5/available 3 (1)
|
||||
//BIT5 spare3_5, // '00000'B
|
||||
BIT1 cmsp,
|
||||
BIT1 solsa,
|
||||
BIT1 ucs2,
|
||||
BIT1 lcsva_cap,
|
||||
BIT1 spare5_7,
|
||||
BIT1 cm3 // '0'B no additional capability info
|
||||
// '1'B additional info capability
|
||||
} with { variant (lengthIndicator) "LENGTHTO (rf_PowerCapability, a5_1, esind,
|
||||
revisionLevel, spare1_1, fc, vgcs, vbs,
|
||||
sm_Capability, ss_ScreenIndicator,
|
||||
ps_Capability, spare2_1, a5_2, a5_3,
|
||||
//spare3_5,
|
||||
cmsp,solsa,ucs2,lcsva_cap,spare5_7,
|
||||
cm3)"};
|
||||
|
||||
|
||||
|
||||
//24.008/ 10.5.1.7
|
||||
type record MobileStationClassmark3_TLV
|
||||
{
|
||||
OCT1 elementIdentifier,
|
||||
LIN1 lengthIndicator,
|
||||
OCTN valuePart
|
||||
} with {
|
||||
variant "PRESENCE (elementIdentifier = '20'O)"
|
||||
variant (lengthIndicator) "LENGTHTO (valuePart)"
|
||||
};
|
||||
|
||||
|
||||
type record MobileStationClassmark3_LV
|
||||
{
|
||||
LIN1 lengthIndicator,
|
||||
OCTN valuePart
|
||||
} with { variant (lengthIndicator) "LENGTHTO (valuePart)"};
|
||||
// used in: PDU_ML3_Setup_MSC_MS, PDU_ML3_CallProceeding,
|
||||
// PDU_ML3_CMServiceRequest
|
||||
|
||||
type record UTRACSGCellsReporting
|
||||
{
|
||||
BIT1 reportingofUTRANCSGCellsSupport
|
||||
} with {
|
||||
variant "FIELDORDER(msb)"
|
||||
}
|
||||
|
||||
type record VAMOSLevel
|
||||
{
|
||||
BIT2 vAMOSSupport
|
||||
} with {
|
||||
variant "FIELDORDER(msb)"
|
||||
}
|
||||
|
||||
//24.008/ 10.5.1.8 Spare half octet ---- not used
|
||||
|
||||
//24.008/ 10.5.1.9 Descriptive group or broadcast call reference
|
||||
type record DescriptiveGroupOrBroadcastCallReference_V
|
||||
{
|
||||
bitstring binaryCodingOfGroupOrBroadcastCallReference length (27),
|
||||
BIT1 sF,
|
||||
BIT1 aF,
|
||||
BIT3 callPriority,
|
||||
BIT4 cipheringInformation,
|
||||
BIT4 spare
|
||||
} with { variant (binaryCodingOfGroupOrBroadcastCallReference,sF,aF,
|
||||
callPriority,cipheringInformation,spare) "FIELDORDER(msb)"};
|
||||
|
||||
//10.5.1.10 Group Cipher Key Number
|
||||
type record groupCipherKeyNumber_TV
|
||||
{
|
||||
BIT4 valuePart,
|
||||
BIT4 elementIdentifier
|
||||
};
|
||||
|
||||
type BIT4 groupCipherKeyNumber_V;
|
||||
|
||||
|
||||
//24.008/10.5.1.10a
|
||||
type record PdAndSapi
|
||||
{
|
||||
BIT4 protocolDiscriminator,
|
||||
BIT2 sapi,
|
||||
BIT2 spare2
|
||||
};
|
||||
|
||||
//10.5.1.11 Priority Level
|
||||
type record PriorityLevel_ML3
|
||||
{
|
||||
BIT3 callPriority, // B'...._000 no applied priority
|
||||
// B'...._001 call priority level 4
|
||||
// B'...._010 call priority level 3
|
||||
// B'...._011 call priority level 2
|
||||
// B'...._100 call priority level 1
|
||||
// B'...._101 call priority level 0
|
||||
// B'...._110 call priority level B
|
||||
// B'...._111 call priority level A
|
||||
BIT1 spare1_1, // B'....0.._
|
||||
// modified by ethbaat:OCT1 elementIdentifier for...
|
||||
BIT4 elementIdentifier // B'1000' type 1 IEI Priority level
|
||||
};
|
||||
//ending "_ML3" added, because ambiguities of (RANAP is also using this name)
|
||||
|
||||
|
||||
//10.5.1.12 Core Network System Information
|
||||
// not implemented yet
|
||||
|
||||
//10.5.1.13 PLMN List
|
||||
type record PLMNListTLV
|
||||
{
|
||||
BIT7 elementIdentifier,
|
||||
BIT1 spare1,
|
||||
LIN1 lengthIndicator,
|
||||
octetstring digits length(3..45) // collapsed into one octetstring
|
||||
// instead of digits
|
||||
} with { variant "PRESENCE (elementIdentifier = '1001010'B)";
|
||||
variant (lengthIndicator) "LENGTHTO (digits)"};
|
||||
|
||||
//10.5.1.15
|
||||
type record MS_NetworkFeatureSupportTV
|
||||
{
|
||||
BIT1 extendedPeriodicTimers,
|
||||
BIT3 spare,
|
||||
BIT4 elementIdentifier
|
||||
}
|
||||
|
||||
// GPRS Timer3 - 10.5.7.4a
|
||||
type record GPRSTimer3TLV
|
||||
{
|
||||
OCT1 elementIdentifier,
|
||||
LIN1 lengthIndicator,
|
||||
GPRSTimer3V gprsTimer3V
|
||||
} with {
|
||||
variant (lengthIndicator) "LENGTHTO (gprsTimer3V)"
|
||||
};
|
||||
|
||||
type record GPRSTimer3V
|
||||
{
|
||||
BIT5 timerValue,
|
||||
BIT3 unit
|
||||
};
|
||||
|
||||
//****************************************************************************
|
||||
// Common elements in CC and SS:
|
||||
//****************************************************************************
|
||||
|
||||
//24.008/10.5.4.11 Cause
|
||||
type record Diagnostics
|
||||
{
|
||||
octetstring data // to split into pieces????
|
||||
} with { variant "EXTENSION_BIT (yes)"};
|
||||
|
||||
// This type is added for handling extension bit in octet 3 of Cause IE
|
||||
type record ML3_Cause_oct3
|
||||
{
|
||||
BIT4 location, // '0000'user B
|
||||
// '0001'B private network, local user
|
||||
// '0010'B public network, user local
|
||||
// '0011'B transit network
|
||||
// '0100'B public network, user remote
|
||||
// '0101'B private network, remote user
|
||||
// '0111'B network international
|
||||
// '1010'B Network beyond interworking pt.
|
||||
BIT1 spare1_1, // '0'B
|
||||
BIT2 codingStandard, // '00'B coding according Q.931
|
||||
// '01'B reserved for standards other
|
||||
// '10'B National standard
|
||||
// '11'B standard other (e.g. one defined for GSM PLMNs)
|
||||
BIT1 ext1, // '0'B or '1'B
|
||||
//octet3a:
|
||||
BIT7 recommendation optional,
|
||||
BIT1 ext2 optional // B'1......
|
||||
} with { variant "EXTENSION_BIT (yes)"};
|
||||
|
||||
type record ML3_Cause_oct4
|
||||
{
|
||||
BIT7 causeValue, // see 12/FS
|
||||
BIT1 ext3 // B'1......
|
||||
} with { variant "EXTENSION_BIT (yes)"};
|
||||
|
||||
type record ML3_Cause_LV
|
||||
{
|
||||
LIN1 lengthIndicator, // 2..30
|
||||
ML3_Cause_oct3 oct3,
|
||||
ML3_Cause_oct4 oct4,
|
||||
Diagnostics diagnostics optional // size: 1..27
|
||||
} with { variant (lengthIndicator) "LENGTHTO (oct3, oct4, diagnostics) "};
|
||||
|
||||
//24.008/10.5.4.11
|
||||
type record ML3_Cause_TLV
|
||||
{
|
||||
OCT1 elementIdentifier,
|
||||
LIN1 lengthIndicator, // 2..30
|
||||
ML3_Cause_oct3 oct3,
|
||||
ML3_Cause_oct4 oct4,
|
||||
Diagnostics diagnostics optional // size: 1..27
|
||||
} with { variant (lengthIndicator) "LENGTHTO (oct3, oct4, diagnostics) "};
|
||||
|
||||
//10.5.4.15 Facility IE (see also 24.080/3.6)
|
||||
type record Facility_TLV
|
||||
{
|
||||
OCT1 elementIdentifier, // H'1C
|
||||
LIN1 lengthIndicator, // 0..?
|
||||
OCTN facilityInformation optional //see 24.080/3.6
|
||||
} with { variant (lengthIndicator) "LENGTHTO (facilityInformation)"};
|
||||
|
||||
type record Facility_LV
|
||||
{
|
||||
LIN1 lengthIndicator, // 0..?
|
||||
OCTN facilityInformation optional //see 24.080/3.6
|
||||
} with { variant (lengthIndicator) "LENGTHTO (facilityInformation)"};
|
||||
|
||||
//24.008/10.5.4.24 SS Version Indicator
|
||||
// used by SS and CC
|
||||
type record SS_VersionIndicator
|
||||
{
|
||||
OCT1 elementIdentifier, // H'7F
|
||||
LIN1 lengthIndicator, // 0..?
|
||||
OCTN ss_VersionIndicatorContents optional //see 24.080 !!!
|
||||
} with { variant (lengthIndicator) "LENGTHTO (ss_VersionIndicatorContents)"};
|
||||
|
||||
//10.5.4.32 Supported Codec List
|
||||
type record codec
|
||||
{
|
||||
OCT1 systemIdentification1,
|
||||
OCT1 lengthOfBitmap1,
|
||||
OCT1 codecBitmap1_bits1to8,
|
||||
OCT1 codecBitmap1_bits9to16
|
||||
};
|
||||
|
||||
type record of codec CodecList_ML3;
|
||||
|
||||
type record SupportedCodecList
|
||||
{
|
||||
OCT1 elementIdentifier,
|
||||
LIN1 lengthIndicator, //
|
||||
CodecList_ML3 codecList
|
||||
} with {
|
||||
variant "PRESENCE (elementIdentifier = '40'O)";
|
||||
variant (lengthIndicator) "LENGTHTO( codecList )"
|
||||
};
|
||||
|
||||
// 10.5.7.8
|
||||
type record DevicePropertiesTV
|
||||
{
|
||||
BIT1 lowPriority,
|
||||
BIT3 spare,
|
||||
BIT4 elementIdentifier
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
// Common elements in GMM and MM:
|
||||
//****************************************************************************
|
||||
// 10.5.5.8a - P-TMSI Signature 2
|
||||
type record P_TMSISignature2TLV
|
||||
{
|
||||
OCT1 elementIdentifier,
|
||||
LIN1 lengthIndicator,
|
||||
OCT3 valueField
|
||||
} with {
|
||||
variant "PRESENCE (elementIdentifier = '19'O)";
|
||||
variant (lengthIndicator) "LENGTHTO (valueField)"
|
||||
};
|
||||
|
||||
// 10.5.5.29 - P-TMSI Type
|
||||
type record P_TMSI_TypeTV
|
||||
{
|
||||
BIT1 pTMSI_TypeValue,
|
||||
BIT3 spare,
|
||||
BIT4 elementIdentifier
|
||||
} with { variant "PRESENCE (elementIdentifier = '1110'B)" };
|
||||
|
||||
//10.5.5.15a - Routing Area Identification
|
||||
type record RoutingAreaIdentification2TLV
|
||||
{
|
||||
OCT1 elementIdentifier,
|
||||
LIN1 lengthIndicator,
|
||||
OCT6 routingAreaIdentification2
|
||||
} with {
|
||||
variant "PRESENCE (elementIdentifier = '1B'O)";
|
||||
variant (lengthIndicator) "LENGTHTO (routingAreaIdentification2)"
|
||||
};
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// Common elements in RRM and MM:
|
||||
//****************************************************************************
|
||||
|
||||
//10.5.3.14 Additional Update Parameter
|
||||
type record AdditionalUpdateParameterTV
|
||||
{
|
||||
BIT1 cSMT,
|
||||
BIT1 cSMO,
|
||||
BIT1 spare2,
|
||||
BIT1 spare3,
|
||||
BIT4 elementIdentifier
|
||||
} with {
|
||||
variant "PRESENCE (elementIdentifier = '1100'B)"
|
||||
}
|
||||
|
||||
}//end of module
|
||||
with {
|
||||
extension "version R1B"
|
||||
encode "RAW"
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,572 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Copyright Test Competence Center (TCC) ETH 2016 //
|
||||
// //
|
||||
// The copyright to the computer program(s) herein is the property of TCC. //
|
||||
// The program(s) may be used and/or copied only with the written permission //
|
||||
// of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
// agreement/contract under which the program(s) has been supplied. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: MobileL3_MM_Types.ttcn
|
||||
// Rev: R1B
|
||||
// Prodnr: CNL 113 832
|
||||
// Contact: http://ttcn.ericsson.se
|
||||
// Reference: 3GPP TS 24.008 v13.4.0
|
||||
|
||||
|
||||
module MobileL3_MM_Types
|
||||
{
|
||||
|
||||
import from General_Types all;
|
||||
import from MobileL3_CommonIE_Types all;
|
||||
|
||||
//============================================================================
|
||||
// 24.008/ 10.5.3 Mobility Management information elements
|
||||
//============================================================================
|
||||
|
||||
//10.5.3.1 AuthenticationParRAND
|
||||
//**********************************************************************
|
||||
type record AuthenticationParameterRANDTV
|
||||
{
|
||||
OCT1 elementIdentifier,
|
||||
OCT16 randValue
|
||||
} with { variant "PRESENCE (elementIdentifier = '21'O)"; };
|
||||
|
||||
//10.5.3.1.1 Authentication Par AUTN (UMTS auth. ch. only)
|
||||
//**********************************************************************
|
||||
type record AuthenticationParameterAUTNTLV
|
||||
{
|
||||
OCT1 elementIdentifier,
|
||||
LIN1 lengthIndicator,
|
||||
OCT16 autnValue
|
||||
} with { variant (lengthIndicator) "LENGTHTO (autnValue)"};
|
||||
|
||||
//10.5.3.2 Authentication Response parameter
|
||||
//**********************************************************************
|
||||
type record AuthenticationResponseParameterTV
|
||||
{
|
||||
OCT1 elementIdentifier,
|
||||
OCT4 valueField length (4)
|
||||
} with { variant "PRESENCE (elementIdentifier = '22'O)"; };
|
||||
|
||||
//10.5.3.2.1 Authentication Response parameter (extension)
|
||||
//**********************************************************************
|
||||
type record AuthenticationResponseParameterUMTSTLV
|
||||
{
|
||||
OCT1 elementIdentifier,
|
||||
LIN1 lengthIndicator,
|
||||
octetstring valueField length (1..12)
|
||||
} with { variant (lengthIndicator) "LENGTHTO (valueField)"};
|
||||
|
||||
|
||||
//10.5.3.2.2 Authentication Failure parameter (UMTS authentication challenge only)
|
||||
//**********************************************************************
|
||||
type record AuthenticationFailureParametersTLV
|
||||
{
|
||||
OCT1 elementIdentifier,
|
||||
LIN1 lengthIndicator,
|
||||
octetstring valueField length (14)
|
||||
} with { variant "PRESENCE (elementIdentifier = '30'O)";
|
||||
variant (lengthIndicator) "LENGTHTO (valueField)"};
|
||||
|
||||
//10.5.3.5 Location Update Type
|
||||
//****************************************************************************
|
||||
type record LocationUpdatingType
|
||||
{
|
||||
BIT2 lut, // LU Normal (00)
|
||||
// LU Periodic (01)
|
||||
// Attach IMSI (10)
|
||||
// reserved (11)
|
||||
BIT1 spare1_1, // 0
|
||||
BIT1 fop // Follow Pending on (1), not (0)
|
||||
};
|
||||
|
||||
//10.5.3.5a Network Name
|
||||
//****************************************************************************
|
||||
type record NetworkNameTLV
|
||||
{
|
||||
BIT7 elementIdentifier,
|
||||
BIT1 spare1,
|
||||
LIN1 lengthIndicator,
|
||||
NetworkNameV valueField
|
||||
} with { variant (lengthIndicator) "LENGTHTO (valueField)"};
|
||||
|
||||
|
||||
type record NetworkNameV
|
||||
{
|
||||
BIT3 nSpareBits,
|
||||
BIT1 addCI,
|
||||
BIT3 codingScheme,
|
||||
BIT1 ext1, //'1'B
|
||||
octetstring textString // length (0..infinity)
|
||||
// actually the upper limit depends on the max size of the PDU, see 44.006
|
||||
};
|
||||
|
||||
//10.5.3.7 Follow-on Proceed
|
||||
//****************************************************************************
|
||||
type Type2 FollowOnProceed; //'A1'O
|
||||
|
||||
//10.5.3.8 TimeZone
|
||||
//****************************************************************************
|
||||
type record TimeZoneTV
|
||||
{
|
||||
BIT7 elementIdentifier,
|
||||
BIT1 spare,
|
||||
TimeZoneV valueField
|
||||
} with { variant "PRESENCE (elementIdentifier = '1000110'B)"; }; //'46'O 7 bits
|
||||
|
||||
type record TimeZoneV
|
||||
{
|
||||
OCT1 timeZone
|
||||
};
|
||||
|
||||
//10.5.3.9 Time Zone And Time
|
||||
//****************************************************************************
|
||||
type record TimeZoneAndTimeTV
|
||||
{
|
||||
BIT7 elementIdentifier,
|
||||
BIT1 spare,
|
||||
TimeZoneAndTimeV valueField
|
||||
} with { variant "PRESENCE (elementIdentifier = '1000111'B)"; }; //'47'O 7 bits;
|
||||
|
||||
|
||||
type record TimeZoneAndTimeV
|
||||
{
|
||||
OCT1 year,
|
||||
OCT1 month,
|
||||
OCT1 day,
|
||||
OCT1 hour,
|
||||
OCT1 minute,
|
||||
OCT1 second,
|
||||
OCT1 timeZone
|
||||
};
|
||||
|
||||
//10.5.3.10 CTS permission
|
||||
//**********************************************************************
|
||||
type Type2 CTS_Permission;
|
||||
|
||||
//10.5.3.11 LSA identifier (Localised Service Area)
|
||||
//**********************************************************************
|
||||
type record LSA_IdentifierTLV
|
||||
{
|
||||
BIT7 elementIdentifier,
|
||||
BIT1 spare,
|
||||
LIN1 lengthIndicator,
|
||||
LSA_IdentifierV valueField
|
||||
} with { variant "PRESENCE (elementIdentifier = '1001000'B)"; //'48'O 7 bits
|
||||
variant (lengthIndicator) "LENGTHTO (valueField)"};
|
||||
|
||||
type record LSA_IdentifierV
|
||||
{
|
||||
octetstring lsa_id length (0..3)
|
||||
};
|
||||
|
||||
//10.5.3.12 Daylight Saving Time
|
||||
//**********************************************************************
|
||||
type record DaylightSavingTimeTLV
|
||||
{
|
||||
OCT1 elementIdentifier,
|
||||
LIN1 lengthIndicator,
|
||||
DaylightSavingTimeV valueField
|
||||
} with { variant "PRESENCE (elementIdentifier = '49'O)";
|
||||
variant (lengthIndicator) "LENGTHTO (valueField)"};
|
||||
|
||||
type record DaylightSavingTimeV
|
||||
{
|
||||
BIT2 valueField,
|
||||
BIT6 spare // Shall be set to 000000
|
||||
};
|
||||
|
||||
//10.5.3.13 Emergency Number List
|
||||
//**********************************************************************
|
||||
type record EmergencyNumberListTLV
|
||||
{
|
||||
OCT1 elementIdentifier,
|
||||
LIN1 lengthIndicator,
|
||||
EmergencyNumberListV emergencyNumberListV
|
||||
} with { variant "PRESENCE (elementIdentifier = '34'O)";
|
||||
variant (lengthIndicator) "LENGTHTO (emergencyNumberListV)"};
|
||||
|
||||
type record of EmergencyNumber EmergencyNumberListV
|
||||
|
||||
type record EmergencyNumber
|
||||
{
|
||||
LIN1 lengthIndicator,
|
||||
EmergencyServiceCategory emergencyServiceCategory,
|
||||
hexstring emergencyNumber length (1..44)
|
||||
} with { variant (lengthIndicator) "LENGTHTO (emergencyServiceCategory,emergencyNumber)";
|
||||
variant "PADDING(yes)";
|
||||
variant "PADDING_PATTERN('1111'B)"};
|
||||
|
||||
type record EmergencyServiceCategory
|
||||
{
|
||||
BIT5 valueFiled,
|
||||
BIT3 spare //'000'B
|
||||
};
|
||||
|
||||
//10.5.3.14 Additional Update Parameter
|
||||
//moved into MobileL3_CommonIE_Types
|
||||
|
||||
|
||||
//10.5.3.16 MM Timer
|
||||
//**********************************************************************
|
||||
type record MM_TimerTLV
|
||||
{
|
||||
OCT1 elementIdentifier,
|
||||
LIN1 lengthIndicator,
|
||||
MM_TimerV valueField
|
||||
} with { variant "PRESENCE (elementIdentifier = '36'O)";
|
||||
variant (lengthIndicator) "LENGTHTO (valueField)"};
|
||||
|
||||
type record MM_TimerV
|
||||
{
|
||||
BIT5 timerValue,
|
||||
BIT3 unit
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
// 24.008/9.2 Messages for mobility management (MM)
|
||||
//============================================================================
|
||||
|
||||
//**********************************************************************
|
||||
// Security Messages
|
||||
//**********************************************************************
|
||||
|
||||
// 9.2.1 Authentication Reject
|
||||
//**********************************************************************
|
||||
type record PDU_ML3_AuthenticationReject
|
||||
{
|
||||
BIT6 messageType, // '010001'B (AuthenticationReject)
|
||||
BIT2 nsd
|
||||
};
|
||||
|
||||
// 9.2.2 Authentication Request
|
||||
//**********************************************************************
|
||||
type record PDU_ML3_AuthenticationRequest
|
||||
{
|
||||
BIT6 messageType, // '010010'B
|
||||
BIT2 nsd,
|
||||
CipheringKeySequenceNumberV cipheringKeySequenceNumber,
|
||||
BIT4 spare2_4, // B'0000
|
||||
OCT16 authenticationParRAND,
|
||||
AuthenticationParameterAUTNTLV authenticationParAUTN optional
|
||||
// added by ethcky acc to 10/155 17_1/APT 210 26/1 Uen Rev A
|
||||
} with { variant "TAG (
|
||||
authenticationParAUTN, elementIdentifier = '20'O ) "};
|
||||
|
||||
// 9.2.3 Authentication Response
|
||||
//****************************************************************************
|
||||
type record PDU_ML3_AuthenticationResponse
|
||||
{
|
||||
BIT6 messageType, // '010100'B (AuthenticationResponse)
|
||||
BIT2 nsd,
|
||||
OCT4 authenticationParSRES, //10.5.3.2
|
||||
AuthenticationResponseParameterUMTSTLV authenticationParSRESext optional
|
||||
} with { variant "TAG (authenticationParSRESext, elementIdentifier = '21'O )"};
|
||||
|
||||
// 9.2.3a Authentication Failure
|
||||
//****************************************************************************
|
||||
type record PDU_ML3_AuthenticationFailure
|
||||
{
|
||||
BIT6 messageType, // '011100'B (AuthenticationFailure)
|
||||
BIT2 nsd,
|
||||
OCT1 rejectCause, //10.5.3.6
|
||||
AuthenticationFailureParametersTLV authenticationParFailure optional
|
||||
} with { variant "TAG (authenticationParFailure , elementIdentifier = '22'O ) " };
|
||||
|
||||
//**********************************************************************
|
||||
// Mobility Management Message Types (TS 24.008/ chapter 9)
|
||||
// Connection management (CM) messages
|
||||
//**********************************************************************
|
||||
|
||||
// 9.2.4 CM Re-establishment Request
|
||||
//**********************************************************************
|
||||
type record PDU_ML3_CMReestablishmentRequest
|
||||
{
|
||||
BIT6 messageType, // '101000'B
|
||||
BIT2 nsd,
|
||||
CipheringKeySequenceNumberV cipheringKeySequenceNumber,
|
||||
BIT4 spare,
|
||||
MobileStationClassmark2_LV mobileStationClassmark2,
|
||||
MobileIdentityLV mobileIdentityLV,
|
||||
LocationAreaIdentification_TV locationAreaIdentification optional,
|
||||
DevicePropertiesTV deviceProperties optional
|
||||
} with { variant "TAG (locationAreaIdentification, elementIdentifier = '13'O;
|
||||
deviceProperties, elementIdentifier = '1101'B;)
|
||||
"};
|
||||
|
||||
// 9.2.5 CM Service Accept (NW->MS)
|
||||
//**********************************************************************
|
||||
type record PDU_ML3_CMServiceAccept
|
||||
{
|
||||
BIT6 messageType, // '100001'B
|
||||
BIT2 nsd
|
||||
};
|
||||
|
||||
// 9.2.5a CMServicePrompt (NW->MS)
|
||||
//**********************************************************************
|
||||
type record PDU_ML3_CMServicePrompt
|
||||
{
|
||||
BIT6 messageType, // '100101'B
|
||||
BIT2 nsd,
|
||||
PdAndSapi pd_sapi
|
||||
};
|
||||
|
||||
// 9.2.6 CMServiceReject (NW->MS)
|
||||
//**********************************************************************
|
||||
type record PDU_ML3_CMServiceReject
|
||||
{
|
||||
BIT6 messageType, // '100010'B
|
||||
BIT2 nsd,
|
||||
OCT1 rejectCause, //10.5.3.6
|
||||
MM_TimerTLV t3246_Value optional
|
||||
};
|
||||
|
||||
// 9.2.7 CM Service Abort (MS->NW to request the abortion)
|
||||
//**********************************************************************
|
||||
type record PDU_ML3_CMServiceAbort
|
||||
{
|
||||
BIT6 messageType, // '100011'B
|
||||
BIT2 nsd
|
||||
};
|
||||
|
||||
// 9.2.8 Abort (NW->MS to initiate the abortion)
|
||||
//**********************************************************************
|
||||
type record PDU_ML3_Abort
|
||||
{
|
||||
BIT6 messageType, // '100010'B
|
||||
BIT2 nsd,
|
||||
OCT1 rejectCause //10.5.3.6
|
||||
};
|
||||
|
||||
// 9.2.9 CM Service Request (MS->NW)
|
||||
//**********************************************************************
|
||||
type record PDU_ML3_CMServiceRequest
|
||||
{
|
||||
BIT6 messageType,// '100100'B
|
||||
BIT2 nsd,
|
||||
BIT4 cm_ServiceType, // '0001'B establishment MOC
|
||||
// '0010'B Emergency Call
|
||||
// '0100'SMS B
|
||||
// '1000'B SS activation
|
||||
CipheringKeySequenceNumberV cipheringKeySequenceNumber,
|
||||
MobileStationClassmark2_LV mobileStationClassmark2,
|
||||
MobileIdentityLV mobileIdentity,
|
||||
PriorityLevel_ML3 priorityLevel optional,
|
||||
AdditionalUpdateParameterTV additionalUpdateParameterTV optional,
|
||||
DevicePropertiesTV deviceProperties optional
|
||||
} with { variant "TAG (priorityLevel, elementIdentifier = '1000'B;
|
||||
deviceProperties, elementIdentifier = '1101'B;)
|
||||
"};
|
||||
|
||||
//9.2.10 Identity Request
|
||||
//**********************************************************************
|
||||
type record PDU_ML3_IdentityRequest
|
||||
{
|
||||
BIT6 messageType, // '011000'B ( IdentityRequest )
|
||||
BIT2 nsd,
|
||||
BIT3 identityType, // IMSI:'001'B IMEI:'010'B IMEISV:'011'B
|
||||
//(TMSI:'100'B not allowed?) 10.5.3.4
|
||||
BIT5 spare1_5 // '00000'B
|
||||
};
|
||||
|
||||
//9.2.11 Identity Response
|
||||
//**********************************************************************
|
||||
type record PDU_ML3_IdentityResponse
|
||||
{
|
||||
BIT6 messageType, // '011001'B (IdentityResponse)
|
||||
BIT2 nsd,
|
||||
MobileIdentityLV mobileIdentityLV,
|
||||
P_TMSI_TypeTV p_TMSI_TypeTV optional,
|
||||
RoutingAreaIdentification2TLV routingAreaIdentification2TLV optional,
|
||||
P_TMSISignature2TLV p_TMSISignature2TLV optional
|
||||
};
|
||||
|
||||
//9.2.12 IMSI Detach Indication
|
||||
//**********************************************************************
|
||||
type record PDU_ML3_IMSI_DetachIndication
|
||||
{
|
||||
BIT6 messageType, // '000001'IMSI Detach Indication
|
||||
BIT2 nsd,
|
||||
MobileStationClassmark1_V mobileStationClassmark1,
|
||||
MobileIdentityLV mobileIdentityLV
|
||||
};
|
||||
|
||||
//****************************************************************************
|
||||
// 24.008/9 Mobility Management message contents
|
||||
//****************************************************************************
|
||||
|
||||
// 9.2.13 Location Update Accept
|
||||
//****************************************************************************
|
||||
type record PDU_ML3_LocationUpdateAccept
|
||||
{
|
||||
BIT6 messageType, // '000010'B (LocationUpdateRequest)
|
||||
BIT2 nsd,
|
||||
LocationAreaIdentification_V locationAreaIdentification,
|
||||
MobileIdentityTLV mobileIdentityTLV optional,
|
||||
Type2 followOnProceed optional,
|
||||
CTS_Permission cTS_Permission optional,
|
||||
PLMNListTLV equivalentPLMNs optional,
|
||||
EmergencyNumberListTLV emergencyNumberList optional,
|
||||
GPRSTimer3TLV perMS_T3212 optional
|
||||
} with { variant "TAG ( mobileIdentityTLV, elementIdentifier = '0010111'B; //'17'O;
|
||||
followOnProceed, elementIdentifier = 'A1'O;
|
||||
cTS_Permission, elementIdentifier = 'A2'O;
|
||||
equivalentPLMNs, elementIdentifier = '1001010'B; //'4A'O;
|
||||
emergencyNumberList, elementIdentifier = '34'O;) "};
|
||||
|
||||
// 9.2.14 Location Update Reject (NW->MS)
|
||||
//****************************************************************************
|
||||
type record PDU_ML3_LocationUpdateReject
|
||||
{
|
||||
BIT6 messageType, // '000100'B (LocationUpdateReject)
|
||||
BIT2 nsd,
|
||||
OCT1 rejectCause, // see 10.5.3.6
|
||||
MM_TimerTLV t3246_Value optional
|
||||
};
|
||||
|
||||
//9.2.15 Location Update Request (MS->NW)
|
||||
//****************************************************************************
|
||||
type record PDU_ML3_LocationUpdateRequest
|
||||
{
|
||||
BIT6 messageType, // B'_001000 (LocationUpdateRequest)
|
||||
BIT2 nsd,
|
||||
LocationUpdatingType locationUpdatingType,
|
||||
CipheringKeySequenceNumberV cipheringKeySequenceNumber,
|
||||
LocationAreaIdentification_V locationAreaIdentification,
|
||||
MobileStationClassmark1_V mobileStationClassmark1,
|
||||
MobileIdentityLV mobileIdentityLV,
|
||||
ClassmarkInformationType2_forUMTS classmarkInformationType2_forUMTS optional,
|
||||
AdditionalUpdateParameterTV additionalUpdateParameterTV optional,
|
||||
DevicePropertiesTV deviceProperties optional,
|
||||
MS_NetworkFeatureSupportTV mS_NetworkFeatureSupport optional
|
||||
} with {
|
||||
variant "TAG (
|
||||
deviceProperties, elementIdentifier = '1101'B;
|
||||
mS_NetworkFeatureSupport, elementIdentifier = '1110'B; //E
|
||||
)"
|
||||
};
|
||||
|
||||
//9.2.15a MM information
|
||||
//****************************************************************************
|
||||
type record PDU_ML3_MMInformation
|
||||
{
|
||||
BIT6 messageType, //
|
||||
BIT2 nsd,
|
||||
NetworkNameTLV fullNetworkName optional,
|
||||
NetworkNameTLV shortNetworkName optional,
|
||||
TimeZoneTV localtimeZone optional,
|
||||
TimeZoneAndTimeTV univTime optional,
|
||||
LSA_IdentifierTLV lSAIdentity optional,
|
||||
DaylightSavingTimeTLV networkDST optional
|
||||
} with { variant "TAG (
|
||||
fullNetworkName, elementIdentifier = '1000011'B; // '43'O;
|
||||
shortNetworkName, elementIdentifier = '1000101'B; // '45'O;
|
||||
localtimeZone, elementIdentifier = '1000110'B; // '46'O;
|
||||
univTime, elementIdentifier = '1000111'B; // '47'O;
|
||||
lSAIdentity, elementIdentifier = '1001000'B; //' 48'O;
|
||||
networkDST, elementIdentifier = '49'O;)"};
|
||||
|
||||
//9.2.16 MM Status
|
||||
//****************************************************************************
|
||||
type record PDU_ML3_MMStatus
|
||||
{
|
||||
BIT6 messageType,
|
||||
BIT2 nsd,
|
||||
OCT1 rejectCause //10.5.3.6
|
||||
};
|
||||
|
||||
//9.2.17 TMSI reallocation command (NW->MS)
|
||||
//****************************************************************************
|
||||
type record PDU_ML3_TMSI_ReallocationCommand
|
||||
{
|
||||
BIT6 messageType, // '011010'B
|
||||
BIT2 nsd,
|
||||
LocationAreaIdentification_V locationAreaIdentification,
|
||||
MobileIdentityLV mobileIdentity
|
||||
};
|
||||
|
||||
//9.2.18 TMSI reallocation complete (MS->NW)
|
||||
//****************************************************************************
|
||||
type record PDU_ML3_TMSI_ReallocationComplete
|
||||
{
|
||||
BIT6 messageType, // '011011'B
|
||||
BIT2 nsd
|
||||
};
|
||||
|
||||
//9.2.19 MM Null (MS->NW)
|
||||
//****************************************************************************
|
||||
type record PDU_ML3_MMNull
|
||||
{
|
||||
BIT6 messageType, // '110000'B
|
||||
BIT2 nsd
|
||||
};
|
||||
|
||||
|
||||
// ***************************************************************************
|
||||
// * Mobility Management Messages
|
||||
// ***************************************************************************
|
||||
// 24.008/ Table 10.2
|
||||
type union PDU_ML3_MM
|
||||
{
|
||||
PDU_ML3_IMSI_DetachIndication imsiDetachIndication,
|
||||
PDU_ML3_LocationUpdateAccept locationUpdateAccept,
|
||||
PDU_ML3_LocationUpdateReject locationUpdateReject,
|
||||
PDU_ML3_LocationUpdateRequest locationUpdateRequest,
|
||||
|
||||
PDU_ML3_AuthenticationReject authenticationReject,
|
||||
PDU_ML3_AuthenticationRequest authenticationRequest,
|
||||
PDU_ML3_AuthenticationResponse authenticationResponse,
|
||||
PDU_ML3_AuthenticationFailure authenticationFailure,
|
||||
PDU_ML3_IdentityRequest identityRequest,
|
||||
PDU_ML3_IdentityResponse identityResponse,
|
||||
PDU_ML3_TMSI_ReallocationCommand tmsiReallocCommand,
|
||||
PDU_ML3_TMSI_ReallocationComplete tmsiReallocComplete,
|
||||
|
||||
PDU_ML3_CMServiceAbort cMServiceAbort,
|
||||
PDU_ML3_CMServiceAccept cMServiceAccept,
|
||||
PDU_ML3_CMServiceReject cMServiceReject,
|
||||
PDU_ML3_CMServiceRequest cMServiceRequest,
|
||||
PDU_ML3_CMServicePrompt cMServicePrompt,
|
||||
PDU_ML3_CMReestablishmentRequest cMReEstablReq,
|
||||
PDU_ML3_Abort abort,
|
||||
|
||||
PDU_ML3_MMNull mMNull,
|
||||
PDU_ML3_MMStatus mMStatus,
|
||||
PDU_ML3_MMInformation mMInformation
|
||||
} with { variant "TAG (
|
||||
imsiDetachIndication, messageType ='000001'B; //registration msgs
|
||||
locationUpdateAccept, messageType ='000010'B;
|
||||
locationUpdateReject, messageType ='000100'B;
|
||||
locationUpdateRequest, messageType ='001000'B;
|
||||
|
||||
authenticationReject, messageType ='010001'B;//security msgs
|
||||
authenticationRequest, messageType ='010010'B;
|
||||
authenticationResponse, messageType ='010100'B;
|
||||
authenticationFailure, messageType ='011100'B;
|
||||
identityRequest, messageType ='011000'B;
|
||||
identityResponse, messageType ='011001'B;
|
||||
tmsiReallocCommand, messageType ='011010'B;
|
||||
tmsiReallocComplete, messageType ='011011'B;
|
||||
|
||||
cMServiceAbort, messageType ='100011'B; //conn, mgmt
|
||||
cMServiceAccept, messageType ='100001'B;
|
||||
cMServiceReject, messageType ='100010'B;
|
||||
cMServiceRequest, messageType ='100100'B;
|
||||
cMServicePrompt, messageType ='100101'B;
|
||||
cMReEstablReq, messageType ='101000'B;
|
||||
abort, messageType ='101001'B;
|
||||
|
||||
mMNull, messageType ='110000'B; //misc
|
||||
mMStatus, messageType ='110001'B;
|
||||
mMInformation, messageType ='110010'B;
|
||||
)"};
|
||||
|
||||
}//end of module
|
||||
with {
|
||||
extension "version R1B"
|
||||
encode "RAW"
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,765 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Copyright Test Competence Center (TCC) ETH 2016 //
|
||||
// //
|
||||
// The copyright to the computer program(s) herein is the property of TCC. //
|
||||
// The program(s) may be used and/or copied only with the written permission //
|
||||
// of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
// agreement/contract under which the program(s) has been supplied. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: MobileL3_SMS_Types.ttcn
|
||||
// Rev: R1B
|
||||
// Prodnr: CNL 113 832
|
||||
// Contact: http://ttcn.ericsson.se
|
||||
// Reference: 3GPP TS 24.008 v13.4.0, 24.011 v13.0.0, 23.040 v13.0.0
|
||||
|
||||
module MobileL3_SMS_Types
|
||||
{
|
||||
// beginning of module
|
||||
|
||||
// This module contains the SMS Messages defined in 24.011 v13.0.0,
|
||||
// 23.040 v13.0.0 and 23.038 v7.0.0
|
||||
// This includes the C-PDUs, R-PDUs and T-PDUs with attributes for
|
||||
// RAW encoding/decoding.
|
||||
|
||||
|
||||
import from General_Types all;
|
||||
|
||||
external function enc_TPDU_RP_DATA_MS_SGSN_fast(in TPDU_RP_DATA_MS_SGSN pdu, out octetstring stream)
|
||||
with { extension "prototype(fast)" extension "encode(RAW)" }
|
||||
|
||||
external function dec_TPDU_RP_DATA_MS_SGSN_backtrack(in octetstring stream, out TPDU_RP_DATA_MS_SGSN pdu) return integer
|
||||
with { extension "prototype(backtrack)" extension "decode(RAW)" }
|
||||
|
||||
external function enc_TPDU_RP_DATA_SGSN_MS_fast(in TPDU_RP_DATA_SGSN_MS pdu, out octetstring stream)
|
||||
with { extension "prototype(fast)" extension "encode(RAW)" }
|
||||
|
||||
external function dec_TPDU_RP_DATA_SGSN_MS_backtrack(in octetstring stream, out TPDU_RP_DATA_SGSN_MS pdu) return integer
|
||||
with { extension "prototype(backtrack)" extension "decode(RAW)" }
|
||||
|
||||
external function enc_TPDU_RP_ACK_MS_SGSN_fast(in TPDU_RP_ACK_MS_SGSN pdu, out octetstring stream)
|
||||
with { extension "prototype(fast)" extension "encode(RAW)" }
|
||||
|
||||
external function dec_TPDU_RP_ACK_MS_SGSN_backtrack(in octetstring stream, out TPDU_RP_ACK_MS_SGSN pdu) return integer
|
||||
with { extension "prototype(backtrack)" extension "decode(RAW)" }
|
||||
|
||||
external function enc_TPDU_RP_ACK_SGSN_MS_fast(in TPDU_RP_ACK_SGSN_MS pdu, out octetstring stream)
|
||||
with { extension "prototype(fast)" extension "encode(RAW)" }
|
||||
|
||||
external function dec_TPDU_RP_ACK_SGSN_MS_backtrack(in octetstring stream, out TPDU_RP_ACK_SGSN_MS pdu) return integer
|
||||
with { extension "prototype(backtrack)" extension "decode(RAW)" }
|
||||
|
||||
external function enc_TPDU_RP_ERROR_MS_SGSN_fast(in TPDU_RP_ERROR_MS_SGSN pdu, out octetstring stream)
|
||||
with { extension "prototype(fast)" extension "encode(RAW)" }
|
||||
|
||||
external function dec_TPDU_RP_ERROR_MS_SGSN_backtrack(in octetstring stream, out TPDU_RP_ERROR_MS_SGSN pdu) return integer
|
||||
with { extension "prototype(backtrack)" extension "decode(RAW)" }
|
||||
|
||||
external function enc_TPDU_RP_ERROR_SGSN_MS_fast(in TPDU_RP_ERROR_SGSN_MS pdu, out octetstring stream)
|
||||
with { extension "prototype(fast)" extension "encode(RAW)" }
|
||||
|
||||
external function dec_TPDU_RP_ERROR_SGSN_MS_backtrack(in octetstring stream, out TPDU_RP_ERROR_SGSN_MS pdu) return integer
|
||||
with { extension "prototype(backtrack)" extension "decode(RAW)" }
|
||||
|
||||
external function enc_RPDU_SGSN_MS_fast(in RPDU_SGSN_MS pdu, out octetstring stream)
|
||||
with { extension "prototype(fast)" extension "encode(RAW)" }
|
||||
|
||||
external function dec_RPDU_SGSN_MS_backtrack(in octetstring stream, out RPDU_SGSN_MS pdu) return integer
|
||||
with { extension "prototype(backtrack)" extension "decode(RAW)" }
|
||||
|
||||
external function enc_RPDU_MS_SGSN_fast(in RPDU_MS_SGSN pdu, out octetstring stream)
|
||||
with { extension "prototype(fast)" extension "encode(RAW)" }
|
||||
|
||||
external function dec_RPDU_MS_SGSN_backtrack(in octetstring stream, out RPDU_MS_SGSN pdu) return integer
|
||||
with { extension "prototype(backtrack)" extension "decode(RAW)" }
|
||||
//==============================================================================
|
||||
// 24.011 7.2 CP-MESSAGES (CP_DATA, CP_ACK, CP_ERROR)
|
||||
//==============================================================================
|
||||
|
||||
// 7.2
|
||||
type union L3_SMS_MS_SGSN
|
||||
{
|
||||
CP_DATA_MS_SGSN cP_DATA,
|
||||
CP_ACK cP_ACK,
|
||||
CP_ERROR cP_ERROR
|
||||
};
|
||||
|
||||
// 7.2
|
||||
type union L3_SMS_SGSN_MS
|
||||
{
|
||||
CP_DATA_SGSN_MS cP_DATA,
|
||||
CP_ACK cP_ACK,
|
||||
CP_ERROR cP_ERROR
|
||||
};
|
||||
|
||||
// 7.2.1 CP-DATA
|
||||
type record CP_DATA_MS_SGSN
|
||||
{
|
||||
BIT8 cP_messageType,
|
||||
CP_User_DataLV_MS_SGSN cP_User_Data
|
||||
} with { variant "PRESENCE(cP_messageType = '00000001'B)"; };
|
||||
|
||||
// 7.2.1 CP-DATA
|
||||
type record CP_DATA_SGSN_MS
|
||||
{
|
||||
BIT8 cP_messageType,
|
||||
CP_User_DataLV_SGSN_MS cP_User_Data
|
||||
} with { variant "PRESENCE(cP_messageType = '00000001'B)"; };
|
||||
|
||||
// 7.2.2 CP-ACK
|
||||
type record CP_ACK
|
||||
{
|
||||
BIT8 cP_messageType
|
||||
} with { variant "PRESENCE(cP_messageType = '00000100'B)"; };
|
||||
|
||||
// 7.2.3 CP-ERROR
|
||||
type record CP_ERROR
|
||||
{
|
||||
BIT8 cP_messageType,
|
||||
CP_CauseV cP_Cause
|
||||
} with { variant "PRESENCE(cP_messageType = '00010000'B)"; };
|
||||
|
||||
// 7.2.1 CP-DATA
|
||||
type record CP_User_DataLV_SGSN_MS
|
||||
{
|
||||
LIN1 lengthIndicator,
|
||||
RPDU_SGSN_MS cP_RPDU
|
||||
} with { variant (lengthIndicator) "LENGTHTO (cP_RPDU)"};
|
||||
|
||||
// 7.2.1 CP-DATA
|
||||
type record CP_User_DataLV_MS_SGSN
|
||||
{
|
||||
LIN1 lengthIndicator,
|
||||
RPDU_MS_SGSN cP_RPDU
|
||||
} with { variant (lengthIndicator) "LENGTHTO (cP_RPDU)"};
|
||||
|
||||
// 7.2.3 CP-ERROR
|
||||
type record CP_CauseV
|
||||
{
|
||||
OCT1 causeValue
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// END OF CP-MESSAGES
|
||||
//=============================================================================
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// 24.011 7.3 RP-MESSAGES (RP-DATA, RP-SMMA, RP-ACK, RP-ERROR)
|
||||
//=============================================================================
|
||||
// 7.3
|
||||
type union RPDU_SGSN_MS
|
||||
{
|
||||
RP_DATA_SGSN_MS rP_DATA_SGSN_MS,
|
||||
RP_ACK_SGSN_MS rP_ACK_SGSN_MS,
|
||||
RP_ERROR_SGSN_MS rP_ERROR_SGSN_MS,
|
||||
RP_SMMA rP_SMMA // RP_SMMA included for negative testing in SGSN_MS direction
|
||||
} with {
|
||||
variant "TAG
|
||||
(
|
||||
rP_DATA_SGSN_MS, rP_MTI = '001'B;
|
||||
rP_ACK_SGSN_MS, rP_MTI = '011'B;
|
||||
rP_ERROR_SGSN_MS, rP_MTI = '101'B;
|
||||
rP_SMMA, rP_MTI = '110'B;
|
||||
)"
|
||||
};
|
||||
|
||||
// 7.3
|
||||
type union RPDU_MS_SGSN
|
||||
{
|
||||
RP_DATA_MS_SGSN rP_DATA_MS_SGSN,
|
||||
RP_ACK_MS_SGSN rP_ACK_MS_SGSN,
|
||||
RP_ERROR_MS_SGSN rP_ERROR_MS_SGSN,
|
||||
RP_SMMA rP_SMMA
|
||||
} with {
|
||||
variant "TAG
|
||||
(
|
||||
rP_DATA_MS_SGSN, rP_MTI = '000'B;
|
||||
rP_ACK_MS_SGSN, rP_MTI = '010'B;
|
||||
rP_ERROR_MS_SGSN, rP_MTI = '100'B;
|
||||
rP_SMMA, rP_MTI = '110'B;
|
||||
)"
|
||||
};
|
||||
|
||||
// 7.3.1.2 RP-DATA (Mobile Station to Network)
|
||||
type record RP_DATA_MS_SGSN
|
||||
{
|
||||
BIT3 rP_MTI,
|
||||
BIT5 rP_Spare, // '00000'B
|
||||
OCT1 rP_MessageReference,
|
||||
RP_OriginatorAddressLV rP_OriginatorAddress,
|
||||
RP_DestinationAddressLV rP_DestinationAddress,
|
||||
RP_DATA_User_DataLV_MS_SGSN rP_User_Data
|
||||
} with { variant "PRESENCE(rP_MTI = '000'B)"; };
|
||||
|
||||
// 7.3.1.1 RP-DATA (Network to Mobile Station)
|
||||
type record RP_DATA_SGSN_MS
|
||||
{
|
||||
BIT3 rP_MTI,
|
||||
BIT5 rP_Spare, // '00000'B
|
||||
OCT1 rP_MessageReference,
|
||||
RP_OriginatorAddressLV rP_OriginatorAddress,
|
||||
RP_DestinationAddressLV rP_DestinationAddress,
|
||||
RP_DATA_User_DataLV_SGSN_MS rP_User_Data
|
||||
} with { variant "PRESENCE(rP_MTI = '001'B)"; };
|
||||
|
||||
// 7.3.2 RP-SMMA
|
||||
type record RP_SMMA
|
||||
{
|
||||
BIT3 rP_MTI,
|
||||
BIT5 rP_Spare, // '00000'B
|
||||
OCT1 rP_MessageReference
|
||||
} with { variant "PRESENCE(rP_MTI = '110'B)"; };
|
||||
|
||||
// 7.3.3 RP-ACK
|
||||
type record RP_ACK_SGSN_MS
|
||||
{
|
||||
BIT3 rP_MTI,
|
||||
BIT5 rP_Spare, // '00000'B
|
||||
OCT1 rP_MessageReference,
|
||||
RP_ACK_User_DataTLV_SGSN_MS rP_User_Data optional
|
||||
} with { variant "PRESENCE(rP_MTI = '011'B)"; };
|
||||
|
||||
// 7.3.3 RP-ACK
|
||||
type record RP_ACK_MS_SGSN
|
||||
{
|
||||
BIT3 rP_MTI,
|
||||
BIT5 rP_Spare, // '00000'B
|
||||
OCT1 rP_MessageReference,
|
||||
RP_ACK_User_DataTLV_MS_SGSN rP_User_Data optional
|
||||
} with { variant "PRESENCE(rP_MTI = '010'B)"; };
|
||||
|
||||
// 7.3.4 RP-ERROR
|
||||
type record RP_ERROR_SGSN_MS
|
||||
{
|
||||
BIT3 rP_MTI,
|
||||
BIT5 rP_Spare, // '00000'B
|
||||
OCT1 rP_Message_Reference,
|
||||
RP_CauseLV rP_CauseLV,
|
||||
RP_ERROR_User_DataTLV_SGSN_MS rP_User_Data optional
|
||||
} with { variant "PRESENCE(rP_MTI = '101'B)"; };
|
||||
|
||||
// 7.3.4 RP-ERROR
|
||||
type record RP_ERROR_MS_SGSN
|
||||
{
|
||||
BIT3 rP_MTI,
|
||||
BIT5 rP_Spare, // '00000'B
|
||||
OCT1 rP_Message_Reference,
|
||||
RP_CauseLV rP_CauseLV,
|
||||
RP_ERROR_User_DataTLV_MS_SGSN rP_User_Data optional
|
||||
} with { variant "PRESENCE(rP_MTI = '100'B)"; };
|
||||
|
||||
// 8.2.5.1 Originator address element
|
||||
type record RP_OriginatorAddressLV
|
||||
{
|
||||
LIN1 lengthIndicator,
|
||||
RP_NumberingPlan_and_NumberDigits rP_OriginatorAddress optional
|
||||
} with {variant(lengthIndicator)"LENGTHTO (rP_OriginatorAddress)"};
|
||||
|
||||
|
||||
// 8.2.5.2 Destination address element
|
||||
type record RP_DestinationAddressLV
|
||||
{
|
||||
LIN1 lengthIndicator,
|
||||
RP_NumberingPlan_and_NumberDigits rP_DestinationAddress optional
|
||||
} with { variant (lengthIndicator)"LENGTHTO (rP_DestinationAddress)"};
|
||||
|
||||
// 8.2.5.1 & 8.2.5.2 Originator address element
|
||||
type record RP_NumberingPlan_and_NumberDigits
|
||||
{
|
||||
BIT4 rP_NumberingPlanIdentification,
|
||||
BIT3 rP_TypeOfNumber,
|
||||
BIT1 rP_Ext,
|
||||
hexstring rP_NumberDigits length (1..20)
|
||||
} with { variant "PADDING(yes)";
|
||||
variant "PADDING_PATTERN('1111'B)"};
|
||||
|
||||
|
||||
// 8.2.5.4 RP-Cause element
|
||||
type record RP_CauseLV
|
||||
{
|
||||
LIN1 rP_LengthIndicator,
|
||||
RP_CauseV rP_CauseV,
|
||||
OCT1 rP_diagnisticField optional
|
||||
} with { variant (rP_LengthIndicator)"LENGTHTO (rP_CauseV,rP_diagnisticField)"};
|
||||
|
||||
// 8.2.5.4 RP-Cause
|
||||
type record RP_CauseV
|
||||
{
|
||||
BIT7 causeValue,
|
||||
BIT1 ext //'0'B
|
||||
}
|
||||
|
||||
// 8.2.5.3 RP-User data element
|
||||
type record RP_DATA_User_DataLV_SGSN_MS
|
||||
{
|
||||
LIN1 rP_LengthIndicator,
|
||||
TPDU_RP_DATA_SGSN_MS rP_TPDU
|
||||
} with { variant (rP_LengthIndicator) "LENGTHTO (rP_TPDU)"};
|
||||
|
||||
// 8.2.5.3 RP-User data element
|
||||
type record RP_DATA_User_DataLV_MS_SGSN
|
||||
{
|
||||
LIN1 rP_LengthIndicator,
|
||||
TPDU_RP_DATA_MS_SGSN rP_TPDU
|
||||
} with { variant (rP_LengthIndicator) "LENGTHTO (rP_TPDU)"};
|
||||
|
||||
// 8.2.5.3 RP-User data element
|
||||
type record RP_ACK_User_DataTLV_SGSN_MS
|
||||
{
|
||||
BIT1 rP_Spare,
|
||||
BIT7 rP_UserDataIEI,
|
||||
LIN1 rP_LengthIndicator,
|
||||
TPDU_RP_ACK_SGSN_MS rP_TPDU
|
||||
} with { variant "PRESENCE(rP_UserDataIEI = '1000001'B)";
|
||||
variant (rP_Spare,rP_UserDataIEI) "FIELDORDER(msb)";
|
||||
variant (rP_LengthIndicator) "LENGTHTO (rP_TPDU)"};
|
||||
|
||||
// 8.2.5.3 RP-User data element
|
||||
type record RP_ACK_User_DataTLV_MS_SGSN
|
||||
{
|
||||
BIT1 rP_Spare,
|
||||
BIT7 rP_UserDataIEI,
|
||||
LIN1 rP_LengthIndicator,
|
||||
TPDU_RP_ACK_MS_SGSN rP_TPDU
|
||||
} with { variant "PRESENCE(rP_UserDataIEI = '1000001'B)";
|
||||
variant (rP_Spare,rP_UserDataIEI) "FIELDORDER(msb)";
|
||||
variant (rP_LengthIndicator) "LENGTHTO (rP_TPDU)"};
|
||||
|
||||
// 8.2.5.3 RP-User data element
|
||||
type record RP_ERROR_User_DataTLV_SGSN_MS
|
||||
{
|
||||
BIT1 rP_Spare,
|
||||
BIT7 rP_UserDataIEI,
|
||||
LIN1 rP_LengthIndicator,
|
||||
TPDU_RP_ERROR_SGSN_MS rP_TPDU
|
||||
} with { variant "PRESENCE(rP_UserDataIEI = '1000001'B)";
|
||||
variant (rP_Spare,rP_UserDataIEI) "FIELDORDER(msb)";
|
||||
variant (rP_LengthIndicator) "LENGTHTO (rP_TPDU)"};
|
||||
|
||||
// 8.2.5.3 RP-User data element
|
||||
type record RP_ERROR_User_DataTLV_MS_SGSN
|
||||
{
|
||||
BIT1 rP_Spare,
|
||||
BIT7 rP_UserDataIEI,
|
||||
LIN1 rP_LengthIndicator,
|
||||
TPDU_RP_ERROR_MS_SGSN rP_TPDU
|
||||
} with { variant "PRESENCE(rP_UserDataIEI = '1000001'B)";
|
||||
variant (rP_Spare,rP_UserDataIEI) "FIELDORDER(msb)";
|
||||
variant (rP_LengthIndicator) "LENGTHTO (rP_TPDU)"};
|
||||
|
||||
|
||||
type union TPDU_RP_DATA_MS_SGSN
|
||||
{
|
||||
SMS_SUBMIT sMS_SUBMIT,
|
||||
SMS_COMMAND sMS_COMMAND
|
||||
} with {
|
||||
variant "TAG
|
||||
(
|
||||
sMS_SUBMIT, tP_MTI = '01'B;
|
||||
sMS_COMMAND, tP_MTI = '10'B;
|
||||
)"
|
||||
};
|
||||
|
||||
|
||||
type union TPDU_RP_DATA_SGSN_MS
|
||||
{
|
||||
SMS_DELIVER sMS_DELIVER,
|
||||
SMS_STATUS_REPORT sMS_STATUS_REPORT
|
||||
} with {
|
||||
variant "TAG
|
||||
(
|
||||
sMS_DELIVER, tP_MTI = '00'B;
|
||||
sMS_STATUS_REPORT, tP_MTI = '10'B;
|
||||
)"
|
||||
};
|
||||
|
||||
|
||||
type union TPDU_RP_ACK_MS_SGSN
|
||||
{
|
||||
SMS_DELIVER_REPORT_in_RP_ACK sMS_DELIVER_REPORT
|
||||
} with {
|
||||
variant "TAG
|
||||
(
|
||||
sMS_DELIVER_REPORT, tP_MTI = '00'B;
|
||||
)"
|
||||
};
|
||||
|
||||
|
||||
type union TPDU_RP_ACK_SGSN_MS
|
||||
{
|
||||
SMS_SUBMIT_REPORT_in_RP_ACK sMS_SUBMIT_REPORT
|
||||
} with {
|
||||
variant "TAG
|
||||
(
|
||||
sMS_SUBMIT_REPORT, tP_MTI = '01'B;
|
||||
)"
|
||||
};
|
||||
|
||||
|
||||
type union TPDU_RP_ERROR_MS_SGSN
|
||||
{
|
||||
SMS_DELIVER_REPORT_in_RP_ERROR sMS_DELIVER_REPORT
|
||||
} with {
|
||||
variant "TAG
|
||||
(
|
||||
sMS_DELIVER_REPORT, tP_MTI = '00'B;
|
||||
)"
|
||||
};
|
||||
|
||||
|
||||
type union TPDU_RP_ERROR_SGSN_MS
|
||||
{
|
||||
SMS_SUBMIT_REPORT_in_RP_ERROR sMS_SUBMIT_REPORT
|
||||
} with {
|
||||
variant "TAG
|
||||
(
|
||||
sMS_SUBMIT_REPORT, tP_MTI = '01'B;
|
||||
)"
|
||||
};
|
||||
|
||||
|
||||
//================================================================
|
||||
// END OF RP-MESSAGES
|
||||
//================================================================
|
||||
|
||||
|
||||
//================================================================
|
||||
// TPDUs 23.040 9.2.2
|
||||
// (SMS_DELIVER, SMS_DELIVER_REPORT, SMS_SUBMIT, SMS_SUBMIT_REPORT,
|
||||
// SMS_STATUS_REPORT, SMS_COMMAND)
|
||||
//================================================================
|
||||
|
||||
// 23.040 9.2.2.1
|
||||
type record SMS_DELIVER
|
||||
{
|
||||
BIT2 tP_MTI,
|
||||
BIT1 tP_MMS,
|
||||
BIT1 tP_LP,
|
||||
BIT1 tP_Spare, //00
|
||||
BIT1 tP_SRI,
|
||||
BIT1 tP_UDHI,
|
||||
BIT1 tP_RP,
|
||||
|
||||
TP_OA tP_OA,
|
||||
|
||||
OCT1 tP_PID,
|
||||
|
||||
TP_DCS tP_DCS,
|
||||
//See 23.038 Section 4 for encoding tP_DCS
|
||||
OCT7 tP_SCTS,
|
||||
|
||||
TP_UDL_UD tP_UDL_UD
|
||||
} with { variant "PRESENCE(tP_MTI = '00'B)"; };
|
||||
|
||||
// 23.040 9.2.2.1a(i)
|
||||
type record SMS_DELIVER_REPORT_in_RP_ERROR
|
||||
{
|
||||
BIT2 tP_MTI,
|
||||
BIT4 tP_Spare1, //'0000'B
|
||||
BIT1 tP_UDHI,
|
||||
BIT1 tP_Spare2, //'0'B
|
||||
|
||||
OCT1 tP_FCS,
|
||||
|
||||
BIT1 tP_PresenceBitTP_PID,
|
||||
BIT1 tP_PresenceBitTP_DCS,
|
||||
BIT1 tP_PresenceBitTP_UDL,
|
||||
BIT4 tP_Reserved,
|
||||
BIT1 tP_ExtensionBit,
|
||||
// note:current implementation PID is 1 octet ->tP_extensionBit=0
|
||||
OCT1 tP_PID optional,
|
||||
//See 23.038 for encoding tP_DCS
|
||||
TP_DCS tP_DCS optional,
|
||||
|
||||
TP_UDL_UD tP_UDL_UD optional
|
||||
} with { variant "PRESENCE(tP_MTI = '00'B)";
|
||||
variant (tP_PID) "PRESENCE(tP_PresenceBitTP_PID = '1'B)";
|
||||
variant (tP_DCS) "PRESENCE(tP_PresenceBitTP_DCS = '1'B)";
|
||||
variant (tP_UDL_UD) "PRESENCE(tP_PresenceBitTP_UDL = '1'B)"};
|
||||
|
||||
// 23.040 9.2.2.1a(ii)
|
||||
type record SMS_DELIVER_REPORT_in_RP_ACK
|
||||
{
|
||||
BIT2 tP_MTI,
|
||||
BIT4 tP_Spare1, //'0000'B
|
||||
BIT1 tP_UDHI,
|
||||
BIT1 tP_Spare2, //'0'B
|
||||
|
||||
BIT1 tP_PresenceBitTP_PID,
|
||||
BIT1 tP_PresenceBitTP_DCS,
|
||||
BIT1 tP_PresenceBitTP_UDL,
|
||||
BIT4 tP_Reserved,
|
||||
BIT1 tP_ExtensionBit,
|
||||
// note:current implementation PID is 1 octet ->tP_extensionBit=0
|
||||
OCT1 tP_PID optional,
|
||||
//See 23.038 for encoding tP_DCS
|
||||
TP_DCS tP_DCS optional,
|
||||
|
||||
TP_UDL_UD tP_UDL_UD optional
|
||||
} with { variant "PRESENCE(tP_MTI = '00'B)";
|
||||
variant (tP_PID) "PRESENCE(tP_PresenceBitTP_PID = '1'B)";
|
||||
variant (tP_DCS) "PRESENCE(tP_PresenceBitTP_DCS = '1'B)";
|
||||
variant (tP_UDL_UD) "PRESENCE(tP_PresenceBitTP_UDL = '1'B)"};
|
||||
|
||||
// 23.040 9.2.2.2
|
||||
type record SMS_SUBMIT
|
||||
{
|
||||
BIT2 tP_MTI,
|
||||
BIT1 tP_RD,
|
||||
BIT2 tP_VPF,
|
||||
BIT1 tP_SRR,
|
||||
BIT1 tP_UDHI,
|
||||
BIT1 tP_RP,
|
||||
OCT1 tP_MR,
|
||||
|
||||
TP_DA tP_DA,
|
||||
|
||||
OCT1 tP_PID,
|
||||
//See 23.038 for encoding tP_DCS
|
||||
TP_DCS tP_DCS,
|
||||
|
||||
TP_VP tP_VP optional, // depends on tP_VPF
|
||||
|
||||
TP_UDL_UD tP_UDL_UD
|
||||
} with { variant "PRESENCE(tP_MTI = '01'B)";
|
||||
variant (tP_VP)"CROSSTAG(
|
||||
// tP_VP_not_present, tP_VPF='00'B;
|
||||
tP_VP_relative_format, tP_VPF='10'B;
|
||||
tP_VP_enhanced_format, tP_VPF='01'B;
|
||||
tP_VP_absolute_format, tP_VPF='11'B
|
||||
)";
|
||||
variant (tP_VP) "PRESENCE(tP_VPF='10'B, tP_VPF='01'B, tP_VPF='11'B)"
|
||||
};
|
||||
|
||||
// 23.040 9.2.2.2a (i)
|
||||
type record SMS_SUBMIT_REPORT_in_RP_ERROR // for RP_Error
|
||||
{
|
||||
BIT2 tP_MTI,
|
||||
BIT4 tP_Spare1,
|
||||
BIT1 tP_UDHI,
|
||||
BIT1 tP_Spare2,
|
||||
|
||||
OCT1 tP_FCS,
|
||||
|
||||
BIT1 tP_PresenceBitTP_PID,
|
||||
BIT1 tP_PresenceBitTP_DCS,
|
||||
BIT1 tP_PresenceBitTP_UDL,
|
||||
BIT4 tP_Reserved,
|
||||
BIT1 tP_ExtensionBit,
|
||||
// note:current implementation PID is 1 octet ->tP_extensionBit=0
|
||||
|
||||
OCT7 tP_SCTS,
|
||||
|
||||
OCT1 tP_PID optional,
|
||||
//See 23.038 for encoding tP_DCS
|
||||
TP_DCS tP_DCS optional,
|
||||
|
||||
TP_UDL_UD tP_UDL_UD optional
|
||||
} with { variant "PRESENCE(tP_MTI = '01'B)";
|
||||
variant (tP_PID) "PRESENCE(tP_PresenceBitTP_PID = '1'B)";
|
||||
variant (tP_DCS) "PRESENCE(tP_PresenceBitTP_DCS = '1'B)";
|
||||
variant (tP_UDL_UD) "PRESENCE(tP_PresenceBitTP_UDL = '1'B)"}
|
||||
|
||||
// 23.040 9.2.2.2a (ii)
|
||||
type record SMS_SUBMIT_REPORT_in_RP_ACK // for RP_ACK
|
||||
{
|
||||
BIT2 tP_MTI,
|
||||
BIT4 tP_Spare1,
|
||||
BIT1 tP_UDHI,
|
||||
BIT1 tP_Spare2,
|
||||
|
||||
BIT1 tP_PresenceBitTP_PID,
|
||||
BIT1 tP_PresenceBitTP_DCS,
|
||||
BIT1 tP_PresenceBitTP_UDL,
|
||||
BIT4 tP_Reserved,
|
||||
BIT1 tP_ExtensionBit,
|
||||
// note:current implementation PID is 1 octet ->tP_extensionBit=0
|
||||
OCT7 tP_SCTS,
|
||||
|
||||
OCT1 tP_PID optional,
|
||||
//See 23.038 for encoding tP_DCS
|
||||
TP_DCS tP_DCS optional,
|
||||
|
||||
TP_UDL_UD tP_UDL_UD optional
|
||||
} with { variant "PRESENCE(tP_MTI = '01'B)";
|
||||
variant (tP_PID) "PRESENCE(tP_PresenceBitTP_PID = '1'B)";
|
||||
variant (tP_DCS) "PRESENCE(tP_PresenceBitTP_DCS = '1'B)";
|
||||
variant (tP_UDL_UD) "PRESENCE(tP_PresenceBitTP_UDL = '1'B)"}
|
||||
|
||||
// 23.040 9.2.2.3
|
||||
type record SMS_STATUS_REPORT
|
||||
{
|
||||
BIT2 tP_MTI,
|
||||
BIT1 tP_MMS,
|
||||
BIT1 tP_LP,
|
||||
BIT1 tP_Spare1,
|
||||
BIT1 tP_SRQ,
|
||||
BIT1 tP_UDHI,
|
||||
BIT1 tP_Spare2,
|
||||
|
||||
OCT1 tP_MR,
|
||||
|
||||
TP_RA tP_RA,
|
||||
|
||||
OCT7 tP_SCTS,
|
||||
|
||||
OCT7 tP_DT,
|
||||
|
||||
OCT1 tP_ST,
|
||||
|
||||
BIT1 tP_PresenceBitTP_PID optional,
|
||||
BIT1 tP_PresenceBitTP_DCS optional,
|
||||
BIT1 tP_PresenceBitTP_UDL optional,
|
||||
BIT4 tP_Reserved optional,
|
||||
BIT1 tP_ExtensionBit optional,
|
||||
// note:current implementation PID is 1 octet ->tP_extensionBit=0
|
||||
OCT1 tP_PID optional,
|
||||
|
||||
TP_DCS tP_DCS optional,
|
||||
//See 23.038 for encoding tP_DCS
|
||||
TP_UDL_UD tP_UDL_UD optional
|
||||
} with { variant "PRESENCE(tP_MTI = '10'B)";
|
||||
variant (tP_PID) "PRESENCE(tP_PresenceBitTP_PID = '1'B)";
|
||||
variant (tP_DCS) "PRESENCE(tP_PresenceBitTP_DCS = '1'B)";
|
||||
variant (tP_UDL_UD) "PRESENCE(tP_PresenceBitTP_UDL = '1'B)"}
|
||||
|
||||
// 23.040 9.2.2.4
|
||||
type record SMS_COMMAND
|
||||
{
|
||||
BIT2 tP_MTI,
|
||||
BIT3 tP_Spare1,
|
||||
BIT1 tP_SRR,
|
||||
BIT1 tP_UDHI,
|
||||
BIT1 tP_Spare2,
|
||||
|
||||
OCT1 tP_MR,
|
||||
|
||||
OCT1 tP_PID,
|
||||
|
||||
OCT1 tP_CT,
|
||||
|
||||
OCT1 tP_MN,
|
||||
|
||||
TP_DA tP_DA,
|
||||
|
||||
TP_CDL_CD tP_CDL_CD
|
||||
} with { variant "PRESENCE(tP_MTI = '10'B)"; };
|
||||
//================================================================
|
||||
// END OF TPDUs 23.040 9.2.2
|
||||
//================================================================
|
||||
|
||||
//================================================================
|
||||
// TPDU Parameters 23.040 9.2.3
|
||||
//================================================================
|
||||
type record TP_OA
|
||||
{
|
||||
TP_OA_NoPad tP_OA_NoPad
|
||||
} with { variant "PADDING(yes), PADDING_PATTERN('1111'B)"};
|
||||
//Note: Padding is handled automatically here.
|
||||
|
||||
type record TP_OA_NoPad
|
||||
{
|
||||
LIN1 tP_LengthIndicator, //0-20
|
||||
BIT4 tP_NumberingPlanID,
|
||||
BIT3 tP_TypeOfNumber,
|
||||
BIT1 tp_Spare,
|
||||
hexstring tP_OAValue length (0..20)
|
||||
// Note: tP_OAValue does not incude the padding half-octet.
|
||||
// It includes only useful tP_OAValue digits.
|
||||
// Padding after tP_OAValue digits is handled
|
||||
// automatically and the tester does not see it in
|
||||
// the TTCN templates
|
||||
} with { variant (tP_LengthIndicator) "LENGTHTO (tP_OAValue)";
|
||||
variant (tP_LengthIndicator) "UNIT(4)";};
|
||||
|
||||
type record TP_CDL_CD
|
||||
{
|
||||
LIN1 tP_CDL, // length is possible
|
||||
octetstring tP_CD
|
||||
} with { variant (tP_CDL) "LENGTHTO (tP_CD)"};
|
||||
|
||||
type record TP_RA
|
||||
{
|
||||
TP_RA_NoPad tP_RA_NoPad
|
||||
} with { variant "PADDING(yes), PADDING_PATTERN('1111'B)"};
|
||||
//Note: Padding is handled automatically here.
|
||||
|
||||
type record TP_RA_NoPad
|
||||
{
|
||||
LIN1 tP_LengthIndicator, //0-20
|
||||
BIT4 tP_NumberingPlanID,
|
||||
BIT3 tP_TypeOfNumber,
|
||||
BIT1 tp_Spare,
|
||||
hexstring tP_RAValue length (0..20)
|
||||
// Note: tP_RAValue does not incude the padding half-octet.
|
||||
// It includes only useful tP_RAValue digits.
|
||||
// Padding after tP_RAValue digits is handled
|
||||
// automatically and the tester does not see it in
|
||||
// the TTCN templates
|
||||
} with { variant (tP_LengthIndicator) "LENGTHTO (tP_RAValue)";
|
||||
variant (tP_LengthIndicator) "UNIT(4)";};
|
||||
|
||||
type union TP_VP
|
||||
{
|
||||
// OCT0 tP_VP_not_present,
|
||||
OCT1 tP_VP_relative_format,
|
||||
OCT7 tP_VP_enhanced_format,
|
||||
OCT7 tP_VP_absolute_format
|
||||
};
|
||||
|
||||
type record TP_DA
|
||||
{
|
||||
TP_DA_NoPad tP_DA_NoPad
|
||||
} with { variant "PADDING(yes), PADDING_PATTERN('1111'B)"};
|
||||
//Note: Padding is handled automatically here.
|
||||
|
||||
type record TP_DA_NoPad
|
||||
{
|
||||
LIN1 tP_LengthIndicator, //0-20
|
||||
BIT4 tP_NumberingPlanID,
|
||||
BIT3 tP_TypeOfNumber,
|
||||
BIT1 tp_Spare,
|
||||
hexstring tP_DAValue length (0..20)
|
||||
// Note: tP_DAValue does not incude the padding half-octet.
|
||||
// It includes only useful tP_DAValue digits.
|
||||
// Padding after tP_DAValue digits is handled
|
||||
// automatically and the tester does not see it in
|
||||
// the TTCN templates
|
||||
} with { variant (tP_LengthIndicator) "LENGTHTO (tP_DAValue)";
|
||||
variant (tP_LengthIndicator) "UNIT(4)"; };
|
||||
|
||||
|
||||
// Note that tP_LengthIndicator in TP_UDL_UD gives the data length in septets or
|
||||
// octets. Septets are used for uncompressed GSM 7 bit default alphabet coding
|
||||
// Octets are used for all other variations.
|
||||
// IT IS NOT CALCULATED AUTOMATICALLY BY THE RAW CODER.
|
||||
// This will not be a problem during decoding.
|
||||
// For encoding correct messages the tester has to enter manually
|
||||
// or calculate the correct tP_LengthIndicator with a function.
|
||||
// Note also that the septet or octet choice depends on the various
|
||||
// bit combinations in field TP_DCS. See 23.038 Section 4.
|
||||
type record TP_UDL_UD
|
||||
{
|
||||
integer tP_LengthIndicator, // could be zero length
|
||||
octetstring tP_UD
|
||||
}
|
||||
|
||||
// See 23.038 for encoding TP_DCS
|
||||
// The various bit combinations in TP_DCS determine
|
||||
// the coding of TP_UDL_UD
|
||||
type OCT1 TP_DCS;
|
||||
|
||||
//================================================================
|
||||
// END of TPDU Parameters 23.040 9.2.3
|
||||
//================================================================
|
||||
|
||||
}//end of module
|
||||
with {
|
||||
extension "version R1B"
|
||||
encode "RAW"
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Copyright Test Competence Center (TCC) ETH 2016 //
|
||||
// //
|
||||
// The copyright to the computer program(s) herein is the property of TCC. //
|
||||
// The program(s) may be used and/or copied only with the written permission //
|
||||
// of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
// agreement/contract under which the program(s) has been supplied. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: MobileL3_SS_Types.ttcn
|
||||
// Rev: R1B
|
||||
// Prodnr: CNL 113 832
|
||||
// Contact: http://ttcn.ericsson.se
|
||||
// Reference: 3GPP TS 24.080 v13.0.0
|
||||
|
||||
module MobileL3_SS_Types
|
||||
{
|
||||
|
||||
import from General_Types all;
|
||||
import from MobileL3_CommonIE_Types all;
|
||||
|
||||
//****************************************************************************
|
||||
// 24.080/2.3 Facility
|
||||
// see also 9.3.9.1 (NW->MS) and 9.3.9.2 (MS->NW) Facility
|
||||
//****************************************************************************
|
||||
type record PDU_ML3_SS_Facility
|
||||
{
|
||||
BIT6 messageType, // '111010'B; facilityIEI
|
||||
BIT2 nsd,
|
||||
Facility_LV facility // see 24.008/10.5.4.15 in Mobility_L3_CommonIE_Types and
|
||||
// see 24.080/3.6 how to extract
|
||||
}
|
||||
|
||||
//****************************************************************************************
|
||||
//24.080/2.4.1 Register (NW->MS)
|
||||
//****************************************************************************************
|
||||
type record PDU_ML3_SS_Register_NW_MS
|
||||
{
|
||||
BIT6 messageType, // '111011'B Register
|
||||
BIT2 nsd,
|
||||
Facility_TLV facility
|
||||
};
|
||||
|
||||
//****************************************************************************************
|
||||
//24.080/2.4.1 Register ( MS->NW)
|
||||
//****************************************************************************************
|
||||
type record PDU_ML3_SS_Register_MS_NW
|
||||
{
|
||||
BIT6 messageType, // '111011'B Register
|
||||
BIT2 nsd,
|
||||
Facility_TLV facility,
|
||||
SS_VersionIndicator ss_version optional
|
||||
} with { variant "TAG (
|
||||
ss_version, elementIdentifier = '7F'O;)"};
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
// 2.5 Release Complete
|
||||
// see also 24.008/9.3.19.1
|
||||
//****************************************************************************
|
||||
type record PDU_ML3_SS_ReleaseComplete
|
||||
{
|
||||
BIT6 messageType, // '101010'B ReleaseComplete
|
||||
BIT2 nsd, // sent by the NW: '00'B
|
||||
ML3_Cause_TLV cause optional,
|
||||
Facility_TLV facility optional
|
||||
} with { variant "TAG (
|
||||
cause, elementIdentifier = '08'O;
|
||||
facility, elementIdentifier = '1C'O;)"};
|
||||
|
||||
/****************************************************************************************
|
||||
MobileL3 Supplementary Service Management
|
||||
TS 24.080 / 2.2
|
||||
****************************************************************************************/
|
||||
type union PDU_ML3_SS_MS_NW
|
||||
{
|
||||
PDU_ML3_SS_Facility facility,
|
||||
PDU_ML3_SS_Register_MS_NW register,
|
||||
PDU_ML3_SS_ReleaseComplete releaseComplete_MS_NW
|
||||
} with { variant "TAG (
|
||||
facility, messageType ='111010'B;
|
||||
register, messageType ='111011'B;
|
||||
releaseComplete_MS_NW, messageType ='101010'B;)"};
|
||||
|
||||
type union PDU_ML3_SS_NW_MS
|
||||
{
|
||||
PDU_ML3_SS_Facility facility,
|
||||
PDU_ML3_SS_Register_NW_MS register,
|
||||
PDU_ML3_SS_ReleaseComplete releaseComplete_NW_MS
|
||||
} with { variant "TAG (
|
||||
facility, messageType ='111010'B;
|
||||
register, messageType ='111011'B;
|
||||
releaseComplete_NW_MS, messageType ='101010'B;)"};
|
||||
|
||||
}//end of module
|
||||
with {
|
||||
extension "version R1B"
|
||||
encode "RAW"
|
||||
}
|
||||
|
|
@ -0,0 +1,403 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Copyright Test Competence Center (TCC) ETH 2016 //
|
||||
// //
|
||||
// The copyright to the computer program(s) herein is the property of TCC. //
|
||||
// The program(s) may be used and/or copied only with the written permission //
|
||||
// of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
// agreement/contract under which the program(s) has been supplied. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: MobileL3_Types.ttcn
|
||||
// Rev: R1B
|
||||
// Prodnr: CNL 113 832
|
||||
// Contact: http://ttcn.ericsson.se
|
||||
// Reference: 3GPP TS 24.008 v13.4.0
|
||||
|
||||
module MobileL3_Types
|
||||
{
|
||||
|
||||
import from General_Types all;
|
||||
import from MobileL3_CommonIE_Types all;
|
||||
import from MobileL3_GMM_SM_Types all;
|
||||
import from MobileL3_MM_Types all;
|
||||
import from MobileL3_CC_Types all;
|
||||
import from MobileL3_RRM_Types all;
|
||||
import from MobileL3_SMS_Types all;
|
||||
import from MobileL3_SS_Types all;
|
||||
|
||||
external function enc_PDU_L3_MS_SGSN(in PDU_L3_MS_SGSN pdu) return octetstring
|
||||
with { extension "prototype(convert)" extension "encode(RAW)" }
|
||||
external function enc_PDU_L3_MS_SGSN_fast(in PDU_L3_MS_SGSN pdu, out octetstring stream)
|
||||
with { extension "prototype(fast)" extension "encode(RAW)" }
|
||||
|
||||
// new external function for decoding MS -> SGSN
|
||||
external function dec_PDU_L3_MS_SGSN(in octetstring stream) return PDU_L3_MS_SGSN
|
||||
with { extension "prototype(convert)" extension "decode(RAW)" }
|
||||
external function dec_PDU_L3_MS_SGSN_backtrack(in octetstring stream, out PDU_L3_MS_SGSN pdu) return integer
|
||||
with { extension "prototype(backtrack)" extension "decode(RAW)" }
|
||||
|
||||
// new external function for encoding SGSN -> MS
|
||||
external function enc_PDU_L3_SGSN_MS(in PDU_L3_SGSN_MS pdu) return octetstring
|
||||
with { extension "prototype(convert)" extension "encode(RAW)" }
|
||||
external function enc_PDU_L3_SGSN_MS_fast(in PDU_L3_SGSN_MS pdu, out octetstring stream)
|
||||
with { extension "prototype(fast)" extension "encode(RAW)" }
|
||||
|
||||
external function dec_PDU_L3_SGSN_MS(in octetstring stream) return PDU_L3_SGSN_MS
|
||||
with { extension "prototype(convert)" extension "decode(RAW)" }
|
||||
external function dec_PDU_L3_SGSN_MS_backtrack(in octetstring stream, out PDU_L3_SGSN_MS pdu) return integer
|
||||
with { extension "prototype(backtrack)" extension "decode(RAW)" }
|
||||
|
||||
external function enc_PDU_ML3_NW_MS(in PDU_ML3_NW_MS pdu) return octetstring
|
||||
with { extension "prototype(convert)" extension " encode(RAW)" }
|
||||
external function enc_PDU_ML3_NW_MS_fast(in PDU_ML3_NW_MS pdu, out octetstring stream)
|
||||
with { extension "prototype(fast)" extension " encode(RAW)" }
|
||||
|
||||
external function dec_PDU_ML3_NW_MS(in octetstring stream) return PDU_ML3_NW_MS
|
||||
with { extension "prototype(convert)" extension " decode(RAW)" }
|
||||
external function dec_PDU_ML3_NW_MS_backtrack(in octetstring stream, out PDU_ML3_NW_MS pdu) return integer
|
||||
with { extension "prototype(backtrack)" extension " decode(RAW)" }
|
||||
|
||||
external function enc_PDU_ML3_MS_NW(in PDU_ML3_MS_NW pdu) return octetstring
|
||||
with { extension "prototype(convert)" extension " encode(RAW)" }
|
||||
external function enc_PDU_ML3_MS_NW_fast(in PDU_ML3_MS_NW pdu, out octetstring stream)
|
||||
with { extension "prototype(fast)" extension " encode(RAW)" }
|
||||
|
||||
external function dec_PDU_ML3_MS_NW(in octetstring stream) return PDU_ML3_MS_NW
|
||||
with { extension "prototype(convert)" extension " decode(RAW)" }
|
||||
external function dec_PDU_ML3_MS_NW_backtrack(in octetstring stream, out PDU_ML3_MS_NW pdu) return integer
|
||||
with { extension "prototype(backtrack)" extension " decode(RAW)" }
|
||||
|
||||
// ***************************************************************************
|
||||
// * The container types of all L3_PDU
|
||||
// ***************************************************************************
|
||||
type record L3_TransactionId
|
||||
{
|
||||
BIT3 tio,
|
||||
BIT1 tiFlag ,
|
||||
TI_Extension tIExtension optional
|
||||
// an extension octet (TI) can be used for session management messages
|
||||
// not yet implemented (see 24.008 clause 10.3.2 for more detail
|
||||
} with { variant (tIExtension) "PRESENCE(tio = '111'B)" };
|
||||
|
||||
type record L3_TransactionId_not_extended
|
||||
{
|
||||
BIT3 tio,
|
||||
BIT1 tiFlag
|
||||
};
|
||||
|
||||
type union TiOrSkip_not_extended
|
||||
{
|
||||
BIT4 skipIndicator,
|
||||
L3_TransactionId_not_extended transactionId
|
||||
};
|
||||
|
||||
|
||||
type union TiOrSkip
|
||||
{
|
||||
BIT4 skipIndicator,
|
||||
L3_TransactionId transactionId
|
||||
};
|
||||
|
||||
type union L3_Discr_SGSN_MS
|
||||
{
|
||||
octetstring gcc, //group call control
|
||||
octetstring bcc, // broadcast call control
|
||||
octetstring cc, // call control; call related SS messages PDU_ypes_CC_MSC_MS
|
||||
octetstring gttp, // GPRS Transparent Transport Protocol
|
||||
octetstring mm, // mobility management messages PDU_DTAP_MM
|
||||
octetstring rrm, // radio resource management messages PDU_DTAP_RRM
|
||||
L3_GMM_SGSN_MS gprs_mm, // GPRS mobility management messages
|
||||
octetstring sms, // SMS messages
|
||||
L3_GSM_SGSN_MS gprs_sm, // GPRS session management messages
|
||||
octetstring ss, // non call related SS messages
|
||||
octetstring loc, // Location services
|
||||
octetstring reserved
|
||||
};
|
||||
|
||||
|
||||
type record PDU_L3_SGSN_MS_unextended_ti
|
||||
{
|
||||
BIT4 discriminator,
|
||||
TiOrSkip_not_extended tiOrSkip,
|
||||
L3_Discr_SGSN_MS msgs
|
||||
} with { variant (msgs)"CROSSTAG(
|
||||
gcc, discriminator='0000'B;
|
||||
bcc, discriminator='0001'B;
|
||||
cc, discriminator='0011'B;
|
||||
gttp, discriminator='0100'B;
|
||||
mm, discriminator='0101'B;
|
||||
rrm, discriminator='0110'B;
|
||||
gprs_mm, discriminator='1000'B;
|
||||
sms, discriminator='1001'B;
|
||||
gprs_sm, discriminator='1010'B;
|
||||
ss, discriminator='1011'B;
|
||||
loc, discriminator='1100'B;
|
||||
reserved, { discriminator='0010'B,
|
||||
discriminator='0111'B,
|
||||
discriminator='1101'B,
|
||||
discriminator='1110'B,
|
||||
discriminator='1111'B }
|
||||
)";
|
||||
variant (tiOrSkip)"CROSSTAG(
|
||||
skipIndicator, { discriminator='0000'B,
|
||||
discriminator='0001'B,
|
||||
discriminator='0010'B,
|
||||
discriminator='0100'B,
|
||||
discriminator='0101'B,
|
||||
discriminator='0110'B,
|
||||
discriminator='0111'B,
|
||||
discriminator='1000'B,
|
||||
discriminator='1100'B,
|
||||
discriminator='1101'B,
|
||||
discriminator='1110'B,
|
||||
discriminator='1111'B };
|
||||
transactionId, { discriminator='0011'B,
|
||||
discriminator='1001'B,
|
||||
discriminator='1011'B,
|
||||
discriminator='1010'B }
|
||||
)";
|
||||
};
|
||||
|
||||
|
||||
type record PDU_L3_SGSN_MS
|
||||
{
|
||||
BIT4 discriminator,
|
||||
TiOrSkip tiOrSkip,
|
||||
L3_Discr_SGSN_MS msgs
|
||||
} with { variant (msgs)"CROSSTAG(
|
||||
gcc, discriminator='0000'B;
|
||||
bcc, discriminator='0001'B;
|
||||
cc, discriminator='0011'B;
|
||||
gttp, discriminator='0100'B;
|
||||
mm, discriminator='0101'B;
|
||||
rrm, discriminator='0110'B;
|
||||
gprs_mm, discriminator='1000'B;
|
||||
sms, discriminator='1001'B;
|
||||
gprs_sm, discriminator='1010'B;
|
||||
ss, discriminator='1011'B;
|
||||
loc, discriminator='1100'B;
|
||||
reserved, { discriminator='0010'B,
|
||||
discriminator='0111'B,
|
||||
discriminator='1101'B,
|
||||
discriminator='1110'B,
|
||||
discriminator='1111'B }
|
||||
)";
|
||||
variant (tiOrSkip)"CROSSTAG(
|
||||
skipIndicator, { discriminator='0000'B,
|
||||
discriminator='0001'B,
|
||||
discriminator='0010'B,
|
||||
discriminator='0100'B,
|
||||
discriminator='0101'B,
|
||||
discriminator='0110'B,
|
||||
discriminator='0111'B,
|
||||
discriminator='1000'B,
|
||||
discriminator='1100'B,
|
||||
discriminator='1101'B,
|
||||
discriminator='1110'B,
|
||||
discriminator='1111'B };
|
||||
transactionId, { discriminator='0011'B,
|
||||
discriminator='1011'B,
|
||||
discriminator='1001'B,
|
||||
discriminator='1010'B }
|
||||
)";
|
||||
};
|
||||
|
||||
|
||||
type union L3_Discr_MS_SGSN
|
||||
{
|
||||
octetstring gcc, //group call control
|
||||
octetstring bcc, // broadcast call control
|
||||
octetstring cc, // call control; call related SS messages PDU_DTAP_CC_MS_MSC
|
||||
octetstring gttp, // GPRS Transparent Transport Protocol
|
||||
octetstring mm, // mobility management messages PDU_DTAP_MM
|
||||
octetstring rrm, // radio resource management messages PDU_DTAP_RRM
|
||||
L3_GMM_MS_SGSN gprs_mm, // GPRS mobility management messages
|
||||
octetstring sms, // SMS messages
|
||||
L3_GSM_MS_SGSN gprs_sm, // GPRS session management messages
|
||||
octetstring ss, // non call related SS messages
|
||||
octetstring loc, // Location services
|
||||
octetstring reserved
|
||||
};
|
||||
|
||||
|
||||
type record PDU_L3_MS_SGSN
|
||||
{
|
||||
BIT4 discriminator,
|
||||
TiOrSkip tiOrSkip,
|
||||
L3_Discr_MS_SGSN msgs
|
||||
} with { variant (msgs)"CROSSTAG(
|
||||
gcc, discriminator='0000'B;
|
||||
bcc, discriminator='0001'B;
|
||||
cc, discriminator='0011'B;
|
||||
gttp, discriminator='0100'B;
|
||||
mm, discriminator='0101'B;
|
||||
rrm, discriminator='0110'B;
|
||||
gprs_mm, discriminator='1000'B;
|
||||
sms, discriminator='1001'B;
|
||||
gprs_sm, discriminator='1010'B;
|
||||
ss, discriminator='1011'B;
|
||||
loc, discriminator='1100'B;
|
||||
reserved, { discriminator='0010'B,
|
||||
discriminator='0111'B,
|
||||
discriminator='1101'B,
|
||||
discriminator='1110'B,
|
||||
discriminator='1111'B }
|
||||
)";
|
||||
variant (tiOrSkip)"CROSSTAG(
|
||||
skipIndicator, { discriminator='0000'B,
|
||||
discriminator='0001'B,
|
||||
discriminator='0010'B,
|
||||
discriminator='0100'B,
|
||||
discriminator='0101'B,
|
||||
discriminator='0110'B,
|
||||
discriminator='0111'B,
|
||||
discriminator='1000'B,
|
||||
discriminator='1100'B,
|
||||
discriminator='1101'B,
|
||||
discriminator='1110'B,
|
||||
discriminator='1111'B };
|
||||
transactionId, { discriminator='0011'B,
|
||||
discriminator='1001'B,
|
||||
discriminator='1011'B,
|
||||
discriminator='1010'B }
|
||||
)";
|
||||
};
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
// 24.007/11.2.3.1.1 and 24.008/10.2 Protocol Discriminator NW->MS
|
||||
//***************************************************************************
|
||||
type union ML3_Discr_NW_MS
|
||||
{
|
||||
octetstring gcc, // group call control <- 24.068 WITHDRAWN
|
||||
octetstring bcc, // broadcast call control <- 24.069 WITHDRAWN
|
||||
PDU_ML3_CC_NW_MS cc, // call control; call related SS messages <-24.008, implemented
|
||||
octetstring gttp, // GPRS Transparent Transport Protocol <- not required in MSC
|
||||
PDU_ML3_MM mm, // mobility management messages <- 24.008,
|
||||
PDU_RRM_NW_MS rrm, // radio resource management messages <- 24.008, 24.018
|
||||
octetstring gprs_mm, // GPRS mobility management messages <- Not required in MSC
|
||||
// but implemented as L3_GMM_SGSN_MS in L3_Types (SGSN)
|
||||
L3_SMS_SGSN_MS sms, // SMS messages
|
||||
//<-24.011, imported from L3_SMS_Types
|
||||
octetstring gprs_sm, // GPRS session management messages <- not required in MSC
|
||||
// but impl. as L3_GMM_MS_SGSN in L3_GSM_SGSN_MS_Types
|
||||
PDU_ML3_SS_NW_MS ss, // non call related SS messages
|
||||
//<- 24.080 ASN1 or implemented by ethgbh
|
||||
octetstring loc, // Location services(LCS) <- 24.030
|
||||
octetstring reserved
|
||||
};
|
||||
|
||||
|
||||
// ref: 24.007/11.2.3.1.1 "Protocol discriminator" and
|
||||
// Table 11.2 "Protocol dicriminator values"
|
||||
type record PDU_ML3_NW_MS
|
||||
{
|
||||
BIT4 discriminator, //24.008/10.2
|
||||
TiOrSkip tiOrSkip, //24.008/10.3
|
||||
ML3_Discr_NW_MS msgs
|
||||
} with { variant (msgs)"CROSSTAG(
|
||||
gcc, discriminator='0000'B;
|
||||
bcc, discriminator='0001'B;
|
||||
cc, discriminator='0011'B;
|
||||
gttp, discriminator='0100'B;
|
||||
mm, discriminator='0101'B;
|
||||
rrm, discriminator='0110'B;
|
||||
gprs_mm, discriminator='1000'B;
|
||||
sms, discriminator='1001'B;
|
||||
gprs_sm, discriminator='1010'B;
|
||||
ss, discriminator='1011'B;
|
||||
loc, discriminator='1100'B;
|
||||
reserved, { discriminator='0010'B,
|
||||
discriminator='0111'B,
|
||||
discriminator='1101'B,
|
||||
discriminator='1110'B,
|
||||
discriminator='1111'B }
|
||||
)";
|
||||
variant (tiOrSkip)"CROSSTAG(
|
||||
skipIndicator, { discriminator='0000'B,
|
||||
discriminator='0001'B,
|
||||
discriminator='0010'B,
|
||||
discriminator='0100'B,
|
||||
discriminator='0101'B,
|
||||
discriminator='0110'B,
|
||||
discriminator='0111'B,
|
||||
discriminator='1000'B,
|
||||
discriminator='1100'B,
|
||||
discriminator='1101'B,
|
||||
discriminator='1110'B,
|
||||
discriminator='1111'B };
|
||||
transactionId, { discriminator='0011'B,
|
||||
discriminator='1001'B,
|
||||
discriminator='1011'B,
|
||||
discriminator='1010'B }
|
||||
)";
|
||||
};
|
||||
|
||||
|
||||
type union ML3_Discr_MS_NW
|
||||
{
|
||||
octetstring gcc, //group call control
|
||||
octetstring bcc, // broadcast call control
|
||||
PDU_ML3_CC_MS_NW cc, // call control; call related SS messages
|
||||
octetstring gttp, // GPRS Transparent Transport Protocol
|
||||
PDU_ML3_MM mm, // mobility management messages
|
||||
PDU_RRM_MS_NW rrm, // radio resource management messages
|
||||
octetstring gprs_mm, // GPRS mobility management messages
|
||||
L3_SMS_MS_SGSN sms, // SMS messages
|
||||
octetstring gprs_sm, // GPRS session management messages
|
||||
PDU_ML3_SS_MS_NW ss, // non call related SS messages
|
||||
octetstring loc, // Location services
|
||||
octetstring reserved
|
||||
};
|
||||
|
||||
type record PDU_ML3_MS_NW
|
||||
{
|
||||
BIT4 discriminator,
|
||||
TiOrSkip tiOrSkip,
|
||||
ML3_Discr_MS_NW msgs
|
||||
} with { variant (msgs)"CROSSTAG(
|
||||
gcc, discriminator='0000'B;
|
||||
bcc, discriminator='0001'B;
|
||||
cc, discriminator='0011'B;
|
||||
gttp, discriminator='0100'B;
|
||||
mm, discriminator='0101'B;
|
||||
rrm, discriminator='0110'B;
|
||||
gprs_mm, discriminator='1000'B;
|
||||
sms, discriminator='1001'B;
|
||||
gprs_sm, discriminator='1010'B;
|
||||
ss, discriminator='1011'B;
|
||||
loc, discriminator='1100'B;
|
||||
reserved, { discriminator='0010'B,
|
||||
discriminator='0111'B,
|
||||
discriminator='1101'B,
|
||||
discriminator='1110'B,
|
||||
discriminator='1111'B }
|
||||
)";
|
||||
variant (tiOrSkip)"CROSSTAG(
|
||||
skipIndicator, { discriminator='0000'B,
|
||||
discriminator='0001'B,
|
||||
discriminator='0010'B,
|
||||
discriminator='0100'B,
|
||||
discriminator='0101'B,
|
||||
discriminator='0110'B,
|
||||
discriminator='0111'B,
|
||||
discriminator='1000'B,
|
||||
discriminator='1100'B,
|
||||
discriminator='1101'B,
|
||||
discriminator='1110'B,
|
||||
discriminator='1111'B };
|
||||
transactionId, { discriminator='0011'B, //24.008/10.3.2
|
||||
discriminator='1001'B,
|
||||
discriminator='1011'B,
|
||||
discriminator='1010'B } //24.008/10.3.2
|
||||
)";
|
||||
};
|
||||
|
||||
}//end of module
|
||||
with {
|
||||
extension "version R1B"
|
||||
encode "RAW"
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<!--
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Copyright Test Competence Center (TCC) ETH 2016 //
|
||||
// //
|
||||
// The copyright to the computer program(s) herein is the property of TCC. //
|
||||
// The program(s) may be used and/or copied only with the written permission //
|
||||
// of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
// agreement/contract under which the program(s) has been supplied. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: MobileL3_v13.4.0_ProtocolModule.grp
|
||||
// Description: MobileL3_v13.4.0 Protocol Module group file
|
||||
// Rev: R1B
|
||||
// Prodnr: CNL 113 832
|
||||
// Contact: http://ttcn.ericsson.se
|
||||
//
|
||||
-->
|
||||
|
||||
<!DOCTYPE TITAN_GUI_FileGroup_file>
|
||||
<File_Group name="MobileL3_v13.4.0_ProtocolModule" >
|
||||
<File path="MobileL3_CC_Types.ttcn" />
|
||||
<File path="MobileL3_CommonIE_Types.ttcn" />
|
||||
<File path="MobileL3_GMM_SM_Types.ttcn" />
|
||||
<File path="MobileL3_MM_Types.ttcn" />
|
||||
<File path="MobileL3_RRM_Types.ttcn" />
|
||||
<File path="MobileL3_SMS_Types.ttcn" />
|
||||
<File path="MobileL3_SS_Types.ttcn" />
|
||||
<File path="MobileL3_Types.ttcn" />
|
||||
<File path="SS_DataTypes.asn" />
|
||||
<File path="SS_EncDec.cc" />
|
||||
<File path="SS_Errors.asn" />
|
||||
<File path="SS_Operations.asn" />
|
||||
<File path="SS_PDU_Defs.asn" />
|
||||
<File path="SS_Protocol.asn" />
|
||||
<File path="SS_Types.ttcn" />
|
||||
</File_Group>
|
|
@ -0,0 +1,502 @@
|
|||
--/////////////////////////////////////////////////////////////////////////////
|
||||
-- //
|
||||
-- Copyright Test Competence Center (TCC) ETH 2016 //
|
||||
-- //
|
||||
-- The copyright to the computer program(s) herein is the property of TCC. //
|
||||
-- The program(s) may be used and/or copied only with the written permission //
|
||||
-- of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
-- agreement/contract under which the program(s) has been supplied. //
|
||||
-- //
|
||||
--/////////////////////////////////////////////////////////////////////////////
|
||||
--
|
||||
-- File: SS_DataTypes.asn
|
||||
-- Rev: R1B
|
||||
-- Prodnr: CNL 113 832
|
||||
-- Contact: http://ttcn.ericsson.se
|
||||
-- Reference: 3GPP TS 24.080 v13.0.0
|
||||
|
||||
SS-DataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0) gsm-Access (2) modules (3)
|
||||
ss-DataTypes (2) version12 (12)}
|
||||
|
||||
DEFINITIONS
|
||||
|
||||
IMPLICIT TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
-- exports all data types defined in this module
|
||||
|
||||
IMPORTS
|
||||
|
||||
SS-Code
|
||||
FROM MAP-SS-Code {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0) gsm-Network (1) modules (3)
|
||||
map-SS-Code (15) version12 (12)}
|
||||
|
||||
-- imports MAP-SS-DataTypes
|
||||
SS-Status, USSD-DataCodingScheme, USSD-String, CCBS-Feature
|
||||
-- USSD-DataCodingScheme, USSD-String were introduced because of CNAP.
|
||||
FROM MAP-SS-DataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0) gsm-Network (1) modules (3)
|
||||
map-SS-DataTypes (14) version12 (12)}
|
||||
|
||||
GSN-Address,
|
||||
CUG-Index,
|
||||
NotificationToMSUser
|
||||
FROM MAP-MS-DataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0) gsm-Network (1) modules (3)
|
||||
map-MS-DataTypes (11) version12 (12)}
|
||||
|
||||
maxSignalInfoLength,
|
||||
ISDN-AddressString,
|
||||
ISDN-SubaddressString,
|
||||
AlertingPattern,
|
||||
LCSClientExternalID,
|
||||
AddressString,
|
||||
LCSServiceTypeID,
|
||||
AgeOfLocationInformation
|
||||
FROM MAP-CommonDataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0) gsm-Network (1) modules (3)
|
||||
map-CommonDataTypes (18) version12 (12)}
|
||||
|
||||
LocationType,
|
||||
DeferredLocationEventType,
|
||||
LCSClientName,
|
||||
LCS-QoS,
|
||||
Horizontal-Accuracy,
|
||||
ResponseTime,
|
||||
Ext-GeographicalInformation,
|
||||
VelocityEstimate,
|
||||
SupportedGADShapes,
|
||||
Add-GeographicalInformation,
|
||||
LCSRequestorID,
|
||||
LCS-ReferenceNumber,
|
||||
LCSCodeword,
|
||||
AreaEventInfo,
|
||||
ReportingPLMNList,
|
||||
PeriodicLDRInfo,
|
||||
SequenceNumber
|
||||
|
||||
FROM MAP-LCS-DataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-LCS-DataTypes (25) version12 (12)}
|
||||
|
||||
;
|
||||
|
||||
-- data types definition
|
||||
|
||||
SS-UserData ::= IA5String (SIZE (1.. maxSignalInfoLength))
|
||||
|
||||
NotifySS-Arg ::= SEQUENCE{
|
||||
ss-Code [1] SS-Code OPTIONAL,
|
||||
ss-Status [4] SS-Status OPTIONAL,
|
||||
ss-Notification [5] SS-Notification OPTIONAL,
|
||||
callIsWaiting-Indicator [14] NULL OPTIONAL,
|
||||
callOnHold-Indicator [15] CallOnHold-Indicator OPTIONAL,
|
||||
mpty-Indicator [16] NULL OPTIONAL,
|
||||
cug-Index [17] CUG-Index OPTIONAL,
|
||||
clirSuppressionRejected [18] NULL OPTIONAL,
|
||||
... ,
|
||||
ect-Indicator [19] ECT-Indicator OPTIONAL,
|
||||
nameIndicator [20] NameIndicator OPTIONAL,
|
||||
ccbs-Feature [21] CCBS-Feature OPTIONAL,
|
||||
alertingPattern [22] AlertingPattern OPTIONAL,
|
||||
multicall-Indicator [23] Multicall-Indicator OPTIONAL}
|
||||
|
||||
-- The nameIndicator is defined because of CNAP.
|
||||
|
||||
Multicall-Indicator ::= ENUMERATED {
|
||||
nbr-SNexceeded (0),
|
||||
nbr-Userexceeded (1)}
|
||||
|
||||
ForwardChargeAdviceArg ::= SEQUENCE{
|
||||
ss-Code [0] SS-Code,
|
||||
chargingInformation [1] ChargingInformation,
|
||||
...}
|
||||
|
||||
SS-Notification ::= OCTET STRING (SIZE (1))
|
||||
|
||||
-- Bit 8 7 6 5 4 00000 (Unused)
|
||||
|
||||
-- Bit 3 Call is forwarded indication to A-subscriber
|
||||
-- (calling subscriber)
|
||||
-- 0 No information content
|
||||
-- 1 Outgoing call has been forwarded to C
|
||||
|
||||
-- Bit 2 Call is forwarded indication to B-subscriber
|
||||
-- (forwarding subscriber)
|
||||
-- 0 No information content
|
||||
-- 1 Incoming call has been forwarded to C
|
||||
|
||||
-- Bit 1 Call is forwarded indication to C-subscriber
|
||||
-- (forwarded-to subscriber)
|
||||
-- 0 No information content
|
||||
-- 1 Incoming call is a forwarded call
|
||||
|
||||
ChargingInformation ::= SEQUENCE{
|
||||
e1 [1] E1 OPTIONAL,
|
||||
e2 [2] E2 OPTIONAL,
|
||||
e3 [3] E3 OPTIONAL,
|
||||
e4 [4] E4 OPTIONAL,
|
||||
e5 [5] E5 OPTIONAL,
|
||||
e6 [6] E6 OPTIONAL,
|
||||
e7 [7] E7 OPTIONAL,
|
||||
...}
|
||||
|
||||
E1 ::= INTEGER (0..max10TimesUnitsPerTime)
|
||||
max10TimesUnitsPerTime INTEGER ::= 8191
|
||||
|
||||
E2 ::= INTEGER (0..max10TimesTimeInterval)
|
||||
max10TimesTimeInterval INTEGER ::= 8191
|
||||
|
||||
E3 ::= INTEGER (0..max100TimesScalingFactor)
|
||||
max100TimesScalingFactor INTEGER ::= 8191
|
||||
|
||||
E4 ::= INTEGER (0..max10TimesIncrement)
|
||||
max10TimesIncrement INTEGER ::= 8191
|
||||
|
||||
E5 ::= INTEGER (0..max10TimesIncrementPerDataInterval)
|
||||
max10TimesIncrementPerDataInterval INTEGER ::= 8191
|
||||
|
||||
E6 ::= INTEGER (0..maxNumberOfSegmentsPerDataInterval)
|
||||
maxNumberOfSegmentsPerDataInterval INTEGER ::= 8191
|
||||
|
||||
E7 ::= INTEGER (0..max10TimesInitialTime)
|
||||
max10TimesInitialTime INTEGER ::= 8191
|
||||
|
||||
CallOnHold-Indicator ::= ENUMERATED {
|
||||
callRetrieved (0),
|
||||
callOnHold (1)}
|
||||
|
||||
ForwardCUG-InfoArg ::= SEQUENCE {
|
||||
cug-Index [0] CUG-Index OPTIONAL,
|
||||
suppressPrefCUG [1] NULL OPTIONAL,
|
||||
suppressOA [2] NULL OPTIONAL,
|
||||
...}
|
||||
|
||||
ECT-Indicator ::= SEQUENCE {
|
||||
ect-CallState [0] ECT-CallState,
|
||||
rdn [1] RDN OPTIONAL,
|
||||
...}
|
||||
|
||||
ECT-CallState ::= ENUMERATED {
|
||||
alerting (0),
|
||||
active (1)}
|
||||
|
||||
NameIndicator ::= SEQUENCE {
|
||||
callingName [0] Name OPTIONAL,
|
||||
...}
|
||||
|
||||
Name ::= CHOICE {
|
||||
namePresentationAllowed [0] NameSet,
|
||||
presentationRestricted [1] NULL,
|
||||
nameUnavailable [2] NULL,
|
||||
namePresentationRestricted [3] NameSet}
|
||||
|
||||
NameSet ::= SEQUENCE {
|
||||
dataCodingScheme [0] USSD-DataCodingScheme,
|
||||
lengthInCharacters [1] INTEGER,
|
||||
nameString [2] USSD-String,
|
||||
...}
|
||||
|
||||
-- NameIndicator, Name and NameSet are defined because of CNAP.
|
||||
-- The USSD-DataCodingScheme shall indicate use of the default alphabet through the
|
||||
-- following encoding:
|
||||
-- bit 7 6 5 4 3 2 1 0
|
||||
-- | 0 0 0 0 | 1 1 1 1|
|
||||
|
||||
RDN ::= CHOICE {
|
||||
presentationAllowedAddress [0] RemotePartyNumber,
|
||||
presentationRestricted [1] NULL,
|
||||
numberNotAvailableDueToInterworking [2] NULL,
|
||||
presentationRestrictedAddress [3] RemotePartyNumber}
|
||||
|
||||
RemotePartyNumber ::= SEQUENCE {
|
||||
partyNumber [0] ISDN-AddressString,
|
||||
partyNumberSubaddress [1] ISDN-SubaddressString OPTIONAL,
|
||||
...}
|
||||
|
||||
AccessRegisterCCEntryArg ::= SEQUENCE {
|
||||
...}
|
||||
|
||||
CallDeflectionArg ::= SEQUENCE {
|
||||
deflectedToNumber [0] AddressString,
|
||||
deflectedToSubaddress [1] ISDN-SubaddressString OPTIONAL,
|
||||
...}
|
||||
|
||||
UserUserServiceArg ::= SEQUENCE {
|
||||
uUS-Service [0] UUS-Service,
|
||||
uUS-Required [1] BOOLEAN,
|
||||
... }
|
||||
|
||||
UUS-Service ::= ENUMERATED {
|
||||
uUS1 (1),
|
||||
uUS2 (2),
|
||||
uUS3 (3),
|
||||
... }
|
||||
|
||||
-- exception handling:
|
||||
-- In case of UUS-Service with any other value, indicated as "UUS required",
|
||||
-- but not understood by the MS, the call will be cleared.
|
||||
|
||||
LocationNotificationArg ::= SEQUENCE {
|
||||
notificationType [0] NotificationToMSUser,
|
||||
locationType [1] LocationType,
|
||||
lcsClientExternalID [2] LCSClientExternalID OPTIONAL,
|
||||
lcsClientName [3] LCSClientName OPTIONAL,
|
||||
... ,
|
||||
lcsRequestorID [4] LCSRequestorID OPTIONAL,
|
||||
lcsCodeword [5] LCSCodeword OPTIONAL,
|
||||
lcsServiceTypeID [6] LCSServiceTypeID OPTIONAL }
|
||||
|
||||
-- The notificationType may only be set to notifyLocationAllowed,
|
||||
-- notifyAndVerify-LocationAllowedIfNoResponse,
|
||||
-- or notifyAndVerify-LocationNotAllowedIfNoResponse.
|
||||
-- The locationEstimateType field of the locationType may only be set to
|
||||
-- currentLocation, currentOrLastKnownLocation,
|
||||
-- notificationVerificationOnly, or activateDeferredLocation.
|
||||
-- The deferredLocationEventType field of the locationType may only be set to
|
||||
-- enteringIntoArea, and/or leavingFromArea, and/or beingInsideArea,
|
||||
-- and/or periodicLDR.
|
||||
-- For LCS location notification of MT-LR for current location, the
|
||||
-- locationEstimateType field of the locationType shall be set to currentLocation.
|
||||
-- For LCS location notification of MT-LR for current or last known location, the
|
||||
-- locationEstimateType field of the locationType shall be set to currentOrLastKnownLocation.
|
||||
-- For the LCS location notification for the LDR of MS available event,
|
||||
-- the locationEstimateType field of the locationType shall be set to currentLocation.
|
||||
-- For LCS location notification for the LDR of change of area event,
|
||||
-- the locationEstimateType field of the locationType shall be set to
|
||||
-- activateDeferredLocation, and the deferredLocationEventType shall be
|
||||
-- set to enteringIntoArea, and/or leavingFromArea, and/or beingInsideArea.
|
||||
-- For the post positioning LCS location notification, the locationEstimateType
|
||||
-- field of the locationType shall be set to notificationVerificationOnly.
|
||||
-- For LCS location notification for the LDR of periodic location event,
|
||||
-- the locationEstimateType field of the locationType shall be set to
|
||||
-- activateDeferredLocation, and the
|
||||
-- deferredLocationEventType shall be set to periodicLDR.
|
||||
|
||||
-- exception handling:
|
||||
-- At reception of an unrecognised notificationType value the receiver shall reject the
|
||||
-- operation with a return error cause of unexpected data value.
|
||||
-- At reception of an unrecognised locationType value the receiver shall reject the
|
||||
-- operation with a return error cause of unexpected data value.
|
||||
-- At reception of an unallowed notificationType value the receiver shall either ignore the
|
||||
-- received operation or reject the operation with a return error cause of unexpected
|
||||
-- data value.
|
||||
-- At reception of an unallowed locationType value the receiver shall either ignore the
|
||||
-- received operation or reject the operation with a return error cause of unexpected
|
||||
-- data value.
|
||||
|
||||
|
||||
|
||||
LocationNotificationRes ::= SEQUENCE {
|
||||
verificationResponse [0] VerificationResponse OPTIONAL,
|
||||
...}
|
||||
|
||||
VerificationResponse::= ENUMERATED {
|
||||
permissionDenied (0),
|
||||
permissionGranted (1),
|
||||
... }
|
||||
|
||||
-- exception handling:
|
||||
-- an unrecognized value shall be treated the same as value 0 (permissionDenied)
|
||||
|
||||
LCS-MOLRArg ::= SEQUENCE {
|
||||
molr-Type [0] MOLR-Type,
|
||||
locationMethod [1] LocationMethod OPTIONAL,
|
||||
lcs-QoS [2] LCS-QoS OPTIONAL,
|
||||
lcsClientExternalID [3] LCSClientExternalID OPTIONAL,
|
||||
mlc-Number [4] ISDN-AddressString OPTIONAL,
|
||||
gpsAssistanceData [5] GPSAssistanceData OPTIONAL,
|
||||
...,
|
||||
supportedGADShapes [6] SupportedGADShapes OPTIONAL,
|
||||
lcsServiceTypeID [7] LCSServiceTypeID OPTIONAL,
|
||||
ageOfLocationInfo [8] AgeOfLocationInformation OPTIONAL,
|
||||
locationType [9] LocationType OPTIONAL,
|
||||
pseudonymIndicator [10] NULL OPTIONAL,
|
||||
h-gmlc-address [11] GSN-Address OPTIONAL,
|
||||
locationEstimate [12] Ext-GeographicalInformation OPTIONAL,
|
||||
velocityEstimate [13] VelocityEstimate OPTIONAL,
|
||||
referenceNumber [14] LCS-ReferenceNumber OPTIONAL,
|
||||
periodicLDRInfo [15] PeriodicLDRInfo OPTIONAL,
|
||||
locationUpdateRequest [16] NULL OPTIONAL,
|
||||
sequenceNumber [17] SequenceNumber OPTIONAL,
|
||||
terminationCause [18] TerminationCause OPTIONAL,
|
||||
mo-lrShortCircuit [19] NULL OPTIONAL,
|
||||
ganssAssistanceData [20] GANSSAssistanceData OPTIONAL,
|
||||
multiplePositioningProtocolPDUs [21] MultiplePositioningProtocolPDUs OPTIONAL }
|
||||
-- The parameter locationMethod shall be included if and only if the molr-Type is set to value
|
||||
-- deCipheringKeys or assistanceData.
|
||||
-- The parameter gpsAssistanceData shall be included if and only if the molr-Type is set to value
|
||||
-- assistanceData and locationMethod is set to value assistedGPS or assistedGPSandGANSS.
|
||||
-- The parameter ganssAssistanceData shall be included if and only if the molr-Type is set to value
|
||||
-- assistanceData and locationMethod is set to value assistedGANSS or assistedGPSandGANSS.
|
||||
-- supportedGADShapes shall not be included for deferred MO-LR initiation or deferred MO-LR or MT-LR
|
||||
-- responses
|
||||
-- multiplePositioningProtocolPDUs may only be included for E-UTRAN access.
|
||||
-- locationMethod shall not be included for E-UTRAN access.
|
||||
-- gpsAssistanceData shall not be included for E-UTRAN access.
|
||||
-- h-gmlc-address shall not be included for E-UTRAN access.
|
||||
-- locationEstimate shall not be included for E-UTRAN access.
|
||||
-- velocityEstimate shall not be included for E-UTRAN access.
|
||||
-- referenceNumber shall not be included for E-UTRAN access.
|
||||
-- periodicLDRInfo shall not be included for E-UTRAN access.
|
||||
-- locationUpdateRequest shall not be included for E-UTRAN access.
|
||||
-- sequenceNumber shall not be included for E-UTRAN access.
|
||||
-- terminationCause shall not be included for E-UTRAN access.
|
||||
-- mo-lrShortCircuit shall not be included for E-UTRAN access.
|
||||
-- ganssAssistanceData shall not be included for E-UTRAN access.
|
||||
|
||||
|
||||
|
||||
MOLR-Type::= ENUMERATED {
|
||||
locationEstimate (0),
|
||||
assistanceData (1),
|
||||
deCipheringKeys (2),
|
||||
... ,
|
||||
deferredMo-lrTTTPInitiation (3),
|
||||
deferredMo-lrSelfLocationInitiation (4),
|
||||
deferredMt-lrOrmo-lrTTTPLocationEstimate (5),
|
||||
deferredMt-lrOrmo-lrCancellation (6)}
|
||||
-- exception handling:
|
||||
-- an unrecognized value shall be rejected by the receiver with a return error cause of
|
||||
-- unexpected data value.
|
||||
-- For E-UTRAN access, only locationEstimate or assistanceData shall be included
|
||||
|
||||
LocationMethod::= ENUMERATED {
|
||||
msBasedEOTD (0),
|
||||
msAssistedEOTD (1),
|
||||
assistedGPS (2),
|
||||
...,
|
||||
msBasedOTDOA (3),
|
||||
assistedGANSS (4),
|
||||
assistedGPSandGANSS (5)
|
||||
}
|
||||
-- exception handling:
|
||||
-- When this parameter is received with value msBasedEOTD or msAssistedEOTD and the MS
|
||||
-- is camped on an UMTS Service Area then the receiver shall reject it
|
||||
-- with a return error cause of unexpected data value.
|
||||
-- When this parameter is received with value msBasedOTDOA and the MS
|
||||
-- is camped on a GSM Cell then the receiver shall reject it with a return error cause of
|
||||
-- unexpected data value.
|
||||
-- an unrecognized value shall be rejected by the receiver with a return error cause of
|
||||
-- unexpected data value.
|
||||
|
||||
GPSAssistanceData::= OCTET STRING (SIZE (1..38))
|
||||
-- Octets 1 to 38 are coded in the same way as the octets 3 to 7+2n of Requested GPS Data IE
|
||||
-- in 3GPP TS 49.031 [14].
|
||||
|
||||
GANSSAssistanceData::= OCTET STRING (SIZE (1..40))
|
||||
-- Octets 1 to 40 are coded in the same way as the octets 3 to 9+2n of Requested GANSS Data IE
|
||||
-- in 3GPP TS 49.031 [14] .
|
||||
|
||||
TerminationCause ::= ENUMERATED {
|
||||
subscriberTermination (0),
|
||||
uETermination (1),
|
||||
...}
|
||||
|
||||
MultiplePositioningProtocolPDUs ::= SEQUENCE (SIZE (1..maxNumLPPMsg)) OF PositioningProtocolPDU
|
||||
|
||||
PositioningProtocolPDU ::= OCTET STRING
|
||||
-- PositioningProtocolPDU contains a LPP message defined in 3GPP TS 36.355 [17].
|
||||
|
||||
maxNumLPPMsg INTEGER ::= 3
|
||||
|
||||
|
||||
|
||||
LCS-MOLRRes::= SEQUENCE {
|
||||
locationEstimate [0] Ext-GeographicalInformation OPTIONAL,
|
||||
decipheringKeys [1] DecipheringKeys OPTIONAL,
|
||||
...,
|
||||
add-LocationEstimate [2] Add-GeographicalInformation OPTIONAL,
|
||||
velocityEstimate [3] VelocityEstimate OPTIONAL,
|
||||
referenceNumber [4] LCS-ReferenceNumber OPTIONAL,
|
||||
h-gmlc-address [5] GSN-Address OPTIONAL,
|
||||
mo-lrShortCircuit [6] NULL OPTIONAL,
|
||||
reportingPLMNList [7] ReportingPLMNList OPTIONAL
|
||||
}
|
||||
-- Parameters locationEstimate or add-LocationEstimate (one but not both)
|
||||
-- shall be included if and only if the
|
||||
-- molr-Type in LocationRequestArg was set to value locationEstimate.
|
||||
-- Parameter add-LocationEstimate shall not be included if the supportedGADShapes
|
||||
-- parameter was not received in the LCS-MOLRArg.
|
||||
-- The locationEstimate and the add-locationEstimate parameters shall not be sent if
|
||||
-- the supportedGADShapes parameter has been received in LCS-MOLRArg
|
||||
-- and the shape encoded in locationEstimate or add-LocationEstimate is not marked
|
||||
-- as supported in supportedGADShapes. In such a case LCS-MOLRArg
|
||||
-- shall be rejected with error FacilityNotSupported with additional indication
|
||||
-- shapeOfLocationEstimateNotSupported.
|
||||
-- Parameter decipheringKeys shall be included if and only if the molr-Type
|
||||
-- in LocationRequestArg was set to value deCipheringKeys.
|
||||
-- Parameter velocityEstimate may only be included if the lcs-QoS in LCS-MOLRarg includes
|
||||
-- velocityRequest
|
||||
-- decipheringKeys shall not be included for E-UTRAN access.
|
||||
-- referenceNumber shall not be included for E-UTRAN access.
|
||||
-- h-gmlc-address shall not be included for E-UTRAN access.
|
||||
-- mo-lrShortCircuit shall not be included for E-UTRAN access.
|
||||
-- reportingPLMNList shall not be included for E-UTRAN access.
|
||||
|
||||
|
||||
|
||||
DecipheringKeys::= OCTET STRING (SIZE (15))
|
||||
-- Octets in DecipheringKeys are coded in the same way as the octets 3 to 17 of Deciphering Key IE
|
||||
-- in 3GPP TS 49.031 [14]. I.e. these octets contain Current Deciphering Key, Next Deciphering Key and
|
||||
-- Ciphering Key Flag.
|
||||
LCS-AreaEventRequestArg ::= SEQUENCE {
|
||||
referenceNumber [0] LCS-ReferenceNumber,
|
||||
h-gmlc-address [1] GSN-Address,
|
||||
deferredLocationEventType [3] DeferredLocationEventType,
|
||||
areaEventInfo [4] AreaEventInfo,
|
||||
... }
|
||||
|
||||
-- the msAvailableValue in the DeferredLocationEventType is not applicable for this procedure
|
||||
|
||||
LCS-AreaEventReportArg ::= SEQUENCE {
|
||||
referenceNumber [0] LCS-ReferenceNumber,
|
||||
h-gmlc-address [1] GSN-Address,
|
||||
... }
|
||||
|
||||
LCS-AreaEventCancellationArg ::= SEQUENCE {
|
||||
referenceNumber [0] LCS-ReferenceNumber,
|
||||
h-gmlc-address [1] GSN-Address,
|
||||
... }
|
||||
|
||||
|
||||
LCS-PeriodicLocationRequestArg ::= SEQUENCE {
|
||||
referenceNumber [0] LCS-ReferenceNumber,
|
||||
periodicLDRInfo [1] PeriodicLDRInfo,
|
||||
lcsClientExternalID [2] LCSClientExternalID,
|
||||
qoS [3] LCS-QoS OPTIONAL,
|
||||
h-gmlc-address [4] GSN-Address OPTIONAL,
|
||||
mo-lrShortCircuit [5] NULL OPTIONAL,
|
||||
reportingPLMNList [6] ReportingPLMNList OPTIONAL,
|
||||
... }
|
||||
|
||||
|
||||
LCS-PeriodicLocationRequestRes ::= SEQUENCE {
|
||||
mo-lrShortCircuit [0] NULL OPTIONAL,
|
||||
... }
|
||||
|
||||
|
||||
LCS-LocationUpdateArg ::= SEQUENCE {
|
||||
referenceNumber [0] LCS-ReferenceNumber OPTIONAL,
|
||||
add-LocationEstimate[1] Add-GeographicalInformation OPTIONAL,
|
||||
velocityEstimate [2] VelocityEstimate OPTIONAL,
|
||||
sequenceNumber [3] SequenceNumber OPTIONAL,
|
||||
... }
|
||||
-- add-LocationEstimate shall be included if and only if a location estimate was successfully
|
||||
-- transferred towards an External LCS Client or was successfully obtained for UE self location
|
||||
-- velocityEstimate may only be included if add-LocationEstimate is included
|
||||
|
||||
LCS-LocationUpdateRes ::= SEQUENCE {
|
||||
terminationCause [0] TerminationCause OPTIONAL,
|
||||
... }
|
||||
|
||||
LCS-PeriodicLocationCancellationArg ::= SEQUENCE {
|
||||
referenceNumber [0] LCS-ReferenceNumber,
|
||||
h-gmlc-address [1] GSN-Address OPTIONAL,
|
||||
... }
|
||||
|
||||
|
||||
END
|
|
@ -0,0 +1,438 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Copyright Test Competence Center (TCC) ETH 2016 //
|
||||
// //
|
||||
// The copyright to the computer program(s) herein is the property of TCC. //
|
||||
// The program(s) may be used and/or copied only with the written permission //
|
||||
// of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
// agreement/contract under which the program(s) has been supplied. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: SS_PDU_Defs.asn
|
||||
// Rev: R1B
|
||||
// Prodnr: CNL 113 832
|
||||
// Contact: http://ttcn.ericsson.se
|
||||
// Reference: 3GPP TS 24.008 v13.4.0
|
||||
|
||||
#include "SS_PDU_Defs.hh"
|
||||
#include "SS_Types.hh"
|
||||
|
||||
namespace SS__Types
|
||||
{
|
||||
using namespace SS__PDU__Defs;
|
||||
TTCN_Module SS__EncDec("SS_EncDec", __DATE__, __TIME__);
|
||||
|
||||
//Type definitions to transfer data between coding functions
|
||||
struct SS_Invoke_for_dec
|
||||
{
|
||||
INTEGER invokeId;
|
||||
OPTIONAL<INTEGER> linkedId;
|
||||
Remote__Operations__Information__Objects::Code opcode;
|
||||
OPTIONAL<OCTETSTRING> stream;
|
||||
};
|
||||
|
||||
struct SS_ReturnResult_for_dec
|
||||
{
|
||||
INTEGER invokeId;
|
||||
OPTIONAL<Remote__Operations__Information__Objects::Code> opcode;
|
||||
OPTIONAL<OCTETSTRING> stream;
|
||||
};
|
||||
|
||||
struct SS_ReturnError_for_dec
|
||||
{
|
||||
INTEGER invokeId;
|
||||
Remote__Operations__Information__Objects::Code errorCode;
|
||||
OPTIONAL<OCTETSTRING> stream;
|
||||
};
|
||||
|
||||
struct SS_Reject_for_dec
|
||||
{
|
||||
OPTIONAL<INTEGER> invokeId;
|
||||
Remote__Operations__Generic__ROS__PDUs::ProblemType problem;
|
||||
};
|
||||
|
||||
|
||||
//////////////////////////////////
|
||||
// Encoding function for SS__Invoke
|
||||
//////////////////////////////////
|
||||
OCTETSTRING enc_SS_Invoke(const SS__Invoke& pdu)
|
||||
{
|
||||
TTCN_Buffer buf;
|
||||
|
||||
OCTETSTRING ret_val;
|
||||
pdu.encode(SS__Invoke_descr_, buf, TTCN_EncDec::CT_BER, BER_ENCODE_DER);
|
||||
buf.get_string(ret_val);
|
||||
ret_val[0] = int2oct(161,1);
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
//////////////////////////////////
|
||||
// Encoding function for SS__ReturnResult
|
||||
//////////////////////////////////
|
||||
OCTETSTRING enc_SS_ReturnResult(const SS__ReturnResult& pdu)
|
||||
{
|
||||
TTCN_Buffer buf;
|
||||
|
||||
OCTETSTRING ret_val;
|
||||
pdu.encode(SS__ReturnResult_descr_, buf, TTCN_EncDec::CT_BER, BER_ENCODE_DER);
|
||||
buf.get_string(ret_val);
|
||||
ret_val[0] = int2oct(162,1);
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
//////////////////////////////////
|
||||
// Encoding function for SS__ReturnError
|
||||
//////////////////////////////////
|
||||
OCTETSTRING enc_SS_ReturnError(const SS__ReturnError& pdu)
|
||||
{
|
||||
TTCN_Buffer buf;
|
||||
|
||||
OCTETSTRING ret_val;
|
||||
pdu.encode(SS__ReturnError_descr_, buf, TTCN_EncDec::CT_BER, BER_ENCODE_DER);
|
||||
buf.get_string(ret_val);
|
||||
ret_val[0] = int2oct(163,1);
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
//////////////////////////////////
|
||||
// Encoding function for SS__Reject
|
||||
//////////////////////////////////
|
||||
OCTETSTRING enc_SS_Reject(const SS__Reject& pdu)
|
||||
{
|
||||
TTCN_Buffer buf;
|
||||
|
||||
OCTETSTRING ret_val;
|
||||
pdu.encode(SS__Reject_descr_, buf, TTCN_EncDec::CT_BER, BER_ENCODE_DER);
|
||||
buf.get_string(ret_val);
|
||||
ret_val[0] = int2oct(164,1);
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
//////////////////////////////////
|
||||
// Decoding function for SS__Invoke
|
||||
//////////////////////////////////
|
||||
int dec_SS_Invoke(const SS_Invoke_for_dec& params, SS__Invoke& pdu)
|
||||
{
|
||||
SS__Invoke__help help_pdu;
|
||||
|
||||
if(params.stream.ispresent())
|
||||
{
|
||||
help_pdu.invokeId().present__() = params.invokeId;
|
||||
if(params.linkedId.ispresent())
|
||||
help_pdu.linkedId()().present__().present__() = params.linkedId;
|
||||
else
|
||||
help_pdu.linkedId() = OMIT_VALUE;
|
||||
|
||||
help_pdu.opcode() = params.opcode;
|
||||
|
||||
OCTETSTRING oct_stream = params.stream;
|
||||
help_pdu.argument() = oct_stream;
|
||||
TTCN_Buffer buf;
|
||||
help_pdu.encode(SS__Invoke__help_descr_, buf, TTCN_EncDec::CT_BER, BER_ENCODE_DER);
|
||||
|
||||
TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_IGNORE);
|
||||
TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_WARNING);
|
||||
TTCN_EncDec::clear_error();
|
||||
|
||||
pdu.decode(SS__Invoke_descr_, buf, TTCN_EncDec::CT_BER, BER_ACCEPT_ALL);
|
||||
|
||||
TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT);
|
||||
|
||||
if(TTCN_EncDec::get_last_error_type() != 0) return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
pdu.invokeId().present__() = params.invokeId;
|
||||
|
||||
if(params.linkedId.ispresent())
|
||||
pdu.linkedId()().present__().present__() = params.linkedId;
|
||||
else
|
||||
pdu.linkedId() = OMIT_VALUE;
|
||||
|
||||
pdu.opcode() = params.opcode;
|
||||
|
||||
pdu.argument() = OMIT_VALUE;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//////////////////////////////////
|
||||
// Decoding function for SS__ReturnResult
|
||||
//////////////////////////////////
|
||||
int dec_SS_ReturnResult(const SS_ReturnResult_for_dec& params, SS__ReturnResult& pdu)
|
||||
{
|
||||
SS__ReturnResult__help help_pdu;
|
||||
|
||||
|
||||
if(params.opcode.ispresent() && params.stream.ispresent())
|
||||
{
|
||||
help_pdu.invokeId().present__() = params.invokeId;
|
||||
help_pdu.result()().opcode() = params.opcode;
|
||||
OCTETSTRING oct_stream = params.stream;
|
||||
help_pdu.result()().result() = oct_stream;
|
||||
TTCN_Buffer buf;
|
||||
help_pdu.encode(SS__ReturnResult__help_descr_, buf, TTCN_EncDec::CT_BER, BER_ENCODE_DER);
|
||||
|
||||
TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_IGNORE);
|
||||
TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_WARNING);
|
||||
TTCN_EncDec::clear_error();
|
||||
|
||||
pdu.decode(SS__ReturnResult_descr_, buf, TTCN_EncDec::CT_BER, BER_ACCEPT_ALL);
|
||||
|
||||
TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT);
|
||||
|
||||
if(TTCN_EncDec::get_last_error_type() != 0) return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
pdu.invokeId().present__() = params.invokeId;
|
||||
pdu.result() = OMIT_VALUE;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//////////////////////////////////
|
||||
// Decoding function for SS__ReturnError
|
||||
//////////////////////////////////
|
||||
int dec_SS_ReturnError(const SS_ReturnError_for_dec& params, SS__ReturnError& pdu)
|
||||
{
|
||||
|
||||
SS__ReturnError__help help_pdu;
|
||||
|
||||
if(params.stream.ispresent())
|
||||
{
|
||||
help_pdu.invokeId().present__() = params.invokeId;
|
||||
help_pdu.errcode() = params.errorCode;
|
||||
OCTETSTRING oct_stream = params.stream;
|
||||
help_pdu.parameter()() = oct_stream;
|
||||
|
||||
TTCN_Buffer buf;
|
||||
|
||||
help_pdu.encode(SS__ReturnError__help_descr_, buf, TTCN_EncDec::CT_BER, BER_ENCODE_DER);
|
||||
|
||||
TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_IGNORE);
|
||||
TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_WARNING);
|
||||
TTCN_EncDec::clear_error();
|
||||
|
||||
pdu.decode(SS__ReturnError_descr_, buf, TTCN_EncDec::CT_BER, BER_ACCEPT_ALL);
|
||||
|
||||
TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT);
|
||||
|
||||
if(TTCN_EncDec::get_last_error_type() != 0) return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
pdu.invokeId().present__() = params.invokeId;
|
||||
pdu.errcode() = params.errorCode;
|
||||
pdu.parameter() = OMIT_VALUE;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//////////////////////////////////
|
||||
// Decoding function for SS__Reject
|
||||
//////////////////////////////////
|
||||
int dec_SS_Reject(const SS_Reject_for_dec& params, SS__Reject& pdu)
|
||||
{
|
||||
if(params.invokeId.ispresent())
|
||||
pdu.invokeId().present__() = params.invokeId;
|
||||
else
|
||||
pdu.invokeId().absent() = ASN_NULL_VALUE;
|
||||
|
||||
pdu.problem() = params.problem;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Decoding function for internal SS_TCAP_ComponentPortion
|
||||
////////////////////////////////////////////////////////////////////
|
||||
int dec__SS__TCAP__ComponentPortion(const OCTETSTRING& stream, SS__TCAP__ComponentPortion& pdu)
|
||||
{
|
||||
if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC))
|
||||
{
|
||||
TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
|
||||
TTCN_Logger::log_event_str("dec_SS_TCAP_ComponentPortion(): Stream before decoding: ");
|
||||
stream.log();
|
||||
TTCN_Logger::end_event();
|
||||
}
|
||||
|
||||
TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_IGNORE);
|
||||
TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_WARNING);
|
||||
TTCN_EncDec::clear_error();
|
||||
|
||||
TTCN_Buffer ttcn_buffer(stream);
|
||||
SS__TCAP__Component ret_sub_val;
|
||||
int i = 0;
|
||||
|
||||
if(!ttcn_buffer.contains_complete_TLV()) {
|
||||
if (TTCN_Logger::log_this_event(TTCN_Logger::TTCN_WARNING))
|
||||
{
|
||||
TTCN_Logger::begin_event(TTCN_Logger::TTCN_WARNING);
|
||||
TTCN_Logger::log_event_str("dec_SS_TCAP_ComponentPortion(): there is no complete TLV in the incoming stream!");
|
||||
TTCN_Logger::end_event();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
while(ttcn_buffer.contains_complete_TLV())
|
||||
{
|
||||
ret_sub_val.decode(SS__TCAP__Component_descr_, ttcn_buffer, TTCN_EncDec::CT_BER, BER_ACCEPT_ALL);
|
||||
pdu[i] = ret_sub_val;
|
||||
i++;
|
||||
ttcn_buffer.cut();
|
||||
}
|
||||
|
||||
TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT);
|
||||
|
||||
if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC))
|
||||
{
|
||||
TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
|
||||
TTCN_Logger::log_event_str("dec_SS_TCAP_ComponentPortion(): Decoded @SS_Types.SS_TCAP_ComponentPortion: ");
|
||||
pdu.log();
|
||||
TTCN_Logger::end_event();
|
||||
}
|
||||
|
||||
return TTCN_EncDec::get_last_error_type() == TTCN_EncDec::ET_NONE ? 0 : 1;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Main encoding function for SS_FacilityInformation. This is called from TTCN-3
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
OCTETSTRING enc__SS__FacilityInformation(const SS__FacilityInformation& pdu)
|
||||
{
|
||||
if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC))
|
||||
{
|
||||
TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
|
||||
TTCN_Logger::log_event_str("enc_SS_FacilityInformation(): SS_FacilityInformation before encoding: ");
|
||||
pdu.log();
|
||||
TTCN_Logger::end_event();
|
||||
}
|
||||
SS__TCAP__ComponentPortion temp_val;
|
||||
OCTETSTRING ret_val(0,NULL);
|
||||
|
||||
for (int i = 0; i < pdu.size_of(); i++)
|
||||
{
|
||||
if (pdu[i].get_selection() == SS__Component::ALT_invoke)
|
||||
{
|
||||
ret_val = ret_val + enc_SS_Invoke(pdu[i].invoke());
|
||||
}
|
||||
else if (pdu[i].get_selection() == SS__Component::ALT_returnResult)
|
||||
{
|
||||
ret_val = ret_val + enc_SS_ReturnResult(pdu[i].returnResult());
|
||||
}
|
||||
else if (pdu[i].get_selection() == SS__Component::ALT_returnError)
|
||||
{
|
||||
ret_val = ret_val + enc_SS_ReturnError(pdu[i].returnError());
|
||||
}
|
||||
else if (pdu[i].get_selection() == SS__Component::ALT_reject)
|
||||
{
|
||||
ret_val = ret_val + enc_SS_Reject(pdu[i].reject());
|
||||
}
|
||||
}
|
||||
if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC))
|
||||
{
|
||||
TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
|
||||
TTCN_Logger::log_event_str("enc_SS_FacilityInformation(): stream after encoding: ");
|
||||
ret_val.log();
|
||||
TTCN_Logger::end_event();
|
||||
}
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Main decoding function for SS_FacilityInformation. This is called from TTCN-3
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
INTEGER dec__SS__FacilityInformation__backtrack(const OCTETSTRING& stream, SS__FacilityInformation& pdu)
|
||||
{
|
||||
if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC))
|
||||
{
|
||||
TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
|
||||
TTCN_Logger::log_event_str("dec_SS_FacilityInformation__backtrack(): Stream before decoding: ");
|
||||
stream.log();
|
||||
TTCN_Logger::end_event();
|
||||
}
|
||||
|
||||
SS__TCAP__ComponentPortion temp_val;
|
||||
int decode = dec__SS__TCAP__ComponentPortion(stream, temp_val);
|
||||
|
||||
if(decode == 0) {
|
||||
|
||||
for (int i = 0; i < temp_val.size_of() && decode == 0; i++)
|
||||
{
|
||||
if (temp_val[i].get_selection() == SS__TCAP__Component::ALT_invoke)
|
||||
{
|
||||
SS_Invoke_for_dec par_val;
|
||||
par_val.invokeId = temp_val[i].invoke().invokeID();
|
||||
par_val.linkedId = temp_val[i].invoke().linkedID();
|
||||
par_val.opcode = temp_val[i].invoke().operationCode();
|
||||
par_val.stream = temp_val[i].invoke().parameter();
|
||||
decode = dec_SS_Invoke(par_val, pdu[i].invoke());
|
||||
}
|
||||
else if (temp_val[i].get_selection() == SS__TCAP__Component::ALT_returnResult)
|
||||
{
|
||||
SS_ReturnResult_for_dec par_val;
|
||||
par_val.invokeId = temp_val[i].returnResult().invokeID();
|
||||
|
||||
if(temp_val[i].returnResult().result().ispresent())
|
||||
{
|
||||
SS__TCAP__ReturnResult__Result temp_res = temp_val[i].returnResult().result();
|
||||
par_val.opcode = temp_res.operationCode();
|
||||
par_val.stream = temp_res.parameter();
|
||||
}
|
||||
else
|
||||
{
|
||||
par_val.opcode = OMIT_VALUE;
|
||||
par_val.stream = OMIT_VALUE;
|
||||
}
|
||||
decode = dec_SS_ReturnResult(par_val, pdu[i].returnResult());
|
||||
}
|
||||
else if (temp_val[i].get_selection() == SS__TCAP__Component::ALT_returnError)
|
||||
{
|
||||
SS_ReturnError_for_dec par_val;
|
||||
par_val.invokeId = temp_val[i].returnError().invokeID();
|
||||
par_val.errorCode = temp_val[i].returnError().errorCode();
|
||||
par_val.stream = temp_val[i].returnError().parameter();
|
||||
|
||||
decode = dec_SS_ReturnError(par_val, pdu[i].returnError());
|
||||
}
|
||||
else if (temp_val[i].get_selection() == SS__TCAP__Component::ALT_reject)
|
||||
{
|
||||
SS_Reject_for_dec par_val;
|
||||
if( temp_val[i].reject().invokeID().get_selection() == SS__TCAP__Reject_invokeID::ALT_derivable)
|
||||
par_val.invokeId = temp_val[i].reject().invokeID().derivable();
|
||||
else
|
||||
par_val.invokeId = OMIT_VALUE;
|
||||
par_val.problem = temp_val[i].reject().problem();
|
||||
|
||||
decode = dec_SS_Reject(par_val, pdu[i].reject());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC))
|
||||
{
|
||||
TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
|
||||
TTCN_Logger::log_event_str("dec_SS_FacilityInformation__backtrack(): Decoded @SS_Types.SS_FacilityInformation: ");
|
||||
pdu.log();
|
||||
TTCN_Logger::end_event();
|
||||
}
|
||||
|
||||
return decode;
|
||||
}
|
||||
|
||||
SS__FacilityInformation dec__SS__FacilityInformation(const OCTETSTRING& stream)
|
||||
{
|
||||
SS__FacilityInformation ret;
|
||||
dec__SS__FacilityInformation__backtrack(stream, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
}//namespace
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
--/////////////////////////////////////////////////////////////////////////////
|
||||
-- //
|
||||
-- Copyright Test Competence Center (TCC) ETH 2016 //
|
||||
-- //
|
||||
-- The copyright to the computer program(s) herein is the property of TCC. //
|
||||
-- The program(s) may be used and/or copied only with the written permission //
|
||||
-- of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
-- agreement/contract under which the program(s) has been supplied. //
|
||||
-- //
|
||||
--/////////////////////////////////////////////////////////////////////////////
|
||||
--
|
||||
-- File: SS_Errors.asn
|
||||
-- Rev: R1B
|
||||
-- Prodnr: CNL 113 832
|
||||
-- Contact: http://ttcn.ericsson.se
|
||||
-- Reference: 3GPP TS 24.080 v13.0.0
|
||||
|
||||
SS-Errors {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0) gsm-Access (2) modules (3)
|
||||
ss-Errors (1) version12 (12)}
|
||||
|
||||
DEFINITIONS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
ERROR FROM
|
||||
Remote-Operations-Information-Objects {joint-iso-itu-t remote-operations(4)
|
||||
informationObjects(5) version1(0)};
|
||||
|
||||
-- The MAP errors
|
||||
-- unknownSubscriber, bearerServiceNotProvisioned, teleserviceNotProvisioned,
|
||||
-- illegalSS-Operation, ss-ErrorStatus, ss-NotAvailable, ss-SubscriptionViolation,
|
||||
-- ss-Incompatibility, systemFailure, dataMissing, unexpectedDataValue, facilityNotSupported,
|
||||
-- pw-RegistrationFailure, negativePW-Check, callBarred, numberOfPW-AttemptsViolation,
|
||||
-- absentSubscriber, illegalSubscriber, illegalEquipment, ussd-Busy, unknownAlphabet,
|
||||
-- forwardingViolation, forwardingFailed
|
||||
-- are imported from MAP-Errors in SS-Protocol module.
|
||||
|
||||
-- errors definition
|
||||
resourcesNotAvailable ERROR ::= {
|
||||
CODE local:127 }
|
||||
maxNumberOfMPTY-ParticipantsExceeded ERROR ::= {
|
||||
CODE local:126 }
|
||||
invalidDeflectedToNumber ERROR ::= {
|
||||
CODE local:125 }
|
||||
specialServiceCode ERROR ::= {
|
||||
CODE local:124 }
|
||||
deflectionToServedSubscriber ERROR ::= {
|
||||
CODE local:123 }
|
||||
rejectedByNetwork ERROR ::= {
|
||||
CODE local:122 }
|
||||
rejectedByUser ERROR ::= {
|
||||
CODE local:121 }
|
||||
|
||||
END
|
|
@ -0,0 +1,313 @@
|
|||
--/////////////////////////////////////////////////////////////////////////////
|
||||
-- //
|
||||
-- Copyright Test Competence Center (TCC) ETH 2016 //
|
||||
-- //
|
||||
-- The copyright to the computer program(s) herein is the property of TCC. //
|
||||
-- The program(s) may be used and/or copied only with the written permission //
|
||||
-- of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
-- agreement/contract under which the program(s) has been supplied. //
|
||||
-- //
|
||||
--/////////////////////////////////////////////////////////////////////////////
|
||||
--
|
||||
-- File: SS_Operations.asn
|
||||
-- Rev: R1B
|
||||
-- Prodnr: CNL 113 832
|
||||
-- Contact: http://ttcn.ericsson.se
|
||||
-- Reference: 3GPP TS 24.080 v13.0.0
|
||||
|
||||
SS-Operations {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0) gsm-Access (2) modules (3)
|
||||
ss-Operations (0) version12 (12)}
|
||||
|
||||
DEFINITIONS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
EXPORTS
|
||||
|
||||
-- exports operations
|
||||
|
||||
-- operations defined in this specification
|
||||
processUnstructuredSS-Data, notifySS, forwardChargeAdvice, forwardCUG-Info, buildMPTY, holdMPTY, retrieveMPTY, splitMPTY, explicitCT, accessRegisterCCEntry, callDeflection, userUserService,
|
||||
lcs-LocationNotification, lcs-MOLR, lcs-AreaEventRequest, lcs-AreaEventReport, lcs-AreaEventCancellation, lcs-PeriodicLocationRequest, lcs-LocationUpdate, lcs-PeriodicLocationCancellation;
|
||||
|
||||
IMPORTS
|
||||
|
||||
OPERATION FROM
|
||||
Remote-Operations-Information-Objects {
|
||||
joint-iso-itu-t remote-operations(4)
|
||||
informationObjects(5) version1(0)}
|
||||
|
||||
-- The MAP operations:
|
||||
-- registerSS, eraseSS, activateSS, deactivateSS, interrogateSS, registerPassword,
|
||||
-- getPassword, processUnstructuredSS-Request, unstructuredSS-Request, unstructuredSS-Notify
|
||||
-- forwardCheckSS-Indication
|
||||
-- are imported from MAP-Operations in SS-Protocol module.
|
||||
|
||||
-- imports SS-data types
|
||||
NotifySS-Arg,
|
||||
ForwardChargeAdviceArg,
|
||||
ForwardCUG-InfoArg,
|
||||
SS-UserData,
|
||||
AccessRegisterCCEntryArg,
|
||||
CallDeflectionArg,
|
||||
UserUserServiceArg,
|
||||
LocationNotificationArg,
|
||||
LocationNotificationRes,
|
||||
LCS-MOLRArg,
|
||||
LCS-MOLRRes,
|
||||
LCS-AreaEventRequestArg,
|
||||
LCS-AreaEventReportArg,
|
||||
LCS-AreaEventCancellationArg,
|
||||
LCS-PeriodicLocationRequestArg,
|
||||
LCS-PeriodicLocationRequestRes,
|
||||
LCS-LocationUpdateArg,
|
||||
LCS-LocationUpdateRes,
|
||||
LCS-PeriodicLocationCancellationArg
|
||||
|
||||
|
||||
FROM SS-DataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0) gsm-Access (2) modules (3)
|
||||
ss-DataTypes (2) version12 (12)}
|
||||
|
||||
-- imports MAP-SS-data types
|
||||
RegisterCC-EntryRes
|
||||
FROM MAP-SS-DataTypes {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Network (1) modules (3) map-SS-DataTypes (14) version12 (12)}
|
||||
|
||||
-- imports MAP-errors
|
||||
illegalSS-Operation, ss-ErrorStatus, ss-NotAvailable, ss-SubscriptionViolation,
|
||||
ss-Incompatibility, systemFailure, facilityNotSupported, callBarred, unexpectedDataValue, shortTermDenial, longTermDenial, dataMissing, forwardingViolation, forwardingFailed, positionMethodFailure
|
||||
FROM MAP-Errors {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0) gsm-Network (1) modules (3)
|
||||
map-Errors (10) version12 (12)}
|
||||
|
||||
-- imports SS-Errors
|
||||
resourcesNotAvailable, maxNumberOfMPTY-ParticipantsExceeded, deflectionToServedSubscriber, invalidDeflectedToNumber, specialServiceCode, rejectedByUser, rejectedByNetwork
|
||||
FROM SS-Errors {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0) gsm-Access (2) modules (3)
|
||||
ss-Errors (1) version12 (12)}
|
||||
;
|
||||
|
||||
-- operations definition
|
||||
|
||||
processUnstructuredSS-Data OPERATION ::= { -- Timer T(PUSSD)= 15s to 30s
|
||||
ARGUMENT SS-UserData
|
||||
RESULT SS-UserData
|
||||
-- optional
|
||||
ERRORS {
|
||||
systemFailure |
|
||||
unexpectedDataValue}
|
||||
CODE local:19 }
|
||||
|
||||
notifySS OPERATION ::= {
|
||||
ARGUMENT NotifySS-Arg
|
||||
CODE local:16 }
|
||||
|
||||
forwardChargeAdvice OPERATION ::= { -- Timer T(AoC)= 1s to 40s
|
||||
ARGUMENT ForwardChargeAdviceArg
|
||||
RETURN RESULT TRUE
|
||||
CODE local:125 }
|
||||
|
||||
forwardCUG-Info OPERATION ::= {
|
||||
ARGUMENT ForwardCUG-InfoArg
|
||||
CODE local:120 }
|
||||
|
||||
buildMPTY OPERATION ::= { -- Timer T(BuildMPTY)= 5s to 30s
|
||||
RETURN RESULT TRUE
|
||||
ERRORS {
|
||||
illegalSS-Operation |
|
||||
ss-ErrorStatus |
|
||||
ss-NotAvailable |
|
||||
ss-Incompatibility |
|
||||
systemFailure |
|
||||
resourcesNotAvailable |
|
||||
maxNumberOfMPTY-ParticipantsExceeded}
|
||||
CODE local:124 }
|
||||
|
||||
holdMPTY OPERATION ::= { -- Timer T(HoldMPTY)= 5s to 30s
|
||||
RETURN RESULT TRUE
|
||||
ERRORS {
|
||||
illegalSS-Operation |
|
||||
ss-ErrorStatus |
|
||||
ss-Incompatibility |
|
||||
facilityNotSupported |
|
||||
systemFailure}
|
||||
CODE local:123 }
|
||||
|
||||
retrieveMPTY OPERATION ::= { -- Timer T(RetrieveMPTY)= 5s to 30s
|
||||
RETURN RESULT TRUE
|
||||
ERRORS {
|
||||
illegalSS-Operation |
|
||||
ss-ErrorStatus |
|
||||
ss-Incompatibility |
|
||||
facilityNotSupported |
|
||||
systemFailure}
|
||||
CODE local:122 }
|
||||
|
||||
splitMPTY OPERATION ::= { -- Timer T(SplitMPTY)= 5s to 30s
|
||||
RETURN RESULT TRUE
|
||||
ERRORS {
|
||||
illegalSS-Operation |
|
||||
ss-ErrorStatus |
|
||||
ss-Incompatibility |
|
||||
facilityNotSupported |
|
||||
systemFailure}
|
||||
CODE local:121 }
|
||||
|
||||
explicitCT OPERATION ::= { -- Timer T(ECT)= 5s to 15s
|
||||
RETURN RESULT TRUE
|
||||
ERRORS {
|
||||
illegalSS-Operation |
|
||||
ss-ErrorStatus |
|
||||
ss-NotAvailable |
|
||||
ss-Incompatibility |
|
||||
facilityNotSupported |
|
||||
systemFailure |
|
||||
resourcesNotAvailable |
|
||||
callBarred}
|
||||
CODE local:126 }
|
||||
|
||||
accessRegisterCCEntry OPERATION ::= { -- Timer T(AccRegCCEntry)= 30s
|
||||
ARGUMENT AccessRegisterCCEntryArg
|
||||
RESULT RegisterCC-EntryRes
|
||||
ERRORS {
|
||||
systemFailure |
|
||||
dataMissing |
|
||||
unexpectedDataValue |
|
||||
callBarred |
|
||||
illegalSS-Operation |
|
||||
ss-ErrorStatus |
|
||||
ss-Incompatibility |
|
||||
shortTermDenial |
|
||||
longTermDenial |
|
||||
facilityNotSupported}
|
||||
CODE local:119 }
|
||||
|
||||
-- the timer value is defined by T308, see also in TS 24.008 for definition of timer T308
|
||||
|
||||
callDeflection OPERATION ::= { -- Timer T(CD)= 30s
|
||||
ARGUMENT CallDeflectionArg
|
||||
RETURN RESULT TRUE
|
||||
ERRORS {
|
||||
illegalSS-Operation |
|
||||
ss-ErrorStatus |
|
||||
ss-NotAvailable |
|
||||
ss-Incompatibility |
|
||||
facilityNotSupported |
|
||||
systemFailure |
|
||||
resourcesNotAvailable |
|
||||
forwardingViolation |
|
||||
callBarred |
|
||||
deflectionToServedSubscriber |
|
||||
invalidDeflectedToNumber |
|
||||
specialServiceCode |
|
||||
forwardingFailed}
|
||||
CODE local:117 }
|
||||
|
||||
-- the timer value is defined by T305, see also in TS 24.008 for definition of timer T305
|
||||
-- extensionContainer shall not be used with this operation
|
||||
|
||||
userUserService OPERATION ::= { -- Timer T(UUS3)= 10s
|
||||
ARGUMENT UserUserServiceArg
|
||||
RETURN RESULT TRUE
|
||||
ERRORS {
|
||||
illegalSS-Operation |
|
||||
ss-ErrorStatus |
|
||||
ss-NotAvailable |
|
||||
ss-Incompatibility |
|
||||
facilityNotSupported |
|
||||
systemFailure |
|
||||
resourcesNotAvailable |
|
||||
rejectedByNetwork |
|
||||
rejectedByUser}
|
||||
CODE local:118 }
|
||||
|
||||
-- The timer value for UUS3 is 10s; it is applicable only if UUS3 is activated by FACILITY
|
||||
-- message. If UUS service (UUS1, UUS2 or UUS3) is activated by SETUP message, no timers are
|
||||
-- needed. In those cases Return Result or Return Error must be received within certain call
|
||||
-- control messages, see 3GPP TS 24.087.
|
||||
-- extensionContainer shall not be used with this operation.
|
||||
|
||||
|
||||
lcs-LocationNotification OPERATION ::= { -- Timer T(LCSN)= 10s to 20s
|
||||
ARGUMENT LocationNotificationArg
|
||||
RESULT LocationNotificationRes
|
||||
ERRORS {
|
||||
systemFailure |
|
||||
unexpectedDataValue}
|
||||
CODE local:116 }
|
||||
|
||||
|
||||
lcs-MOLR OPERATION ::= { -- Timer T(LCSL)= 10s to 300s
|
||||
ARGUMENT LCS-MOLRArg
|
||||
RESULT LCS-MOLRRes
|
||||
ERRORS {
|
||||
systemFailure |
|
||||
unexpectedDataValue |
|
||||
dataMissing |
|
||||
facilityNotSupported |
|
||||
ss-SubscriptionViolation |
|
||||
positionMethodFailure}
|
||||
CODE local:115 }
|
||||
|
||||
|
||||
lcs-AreaEventRequest OPERATION ::= { -- Timer T(LCSN)= 10s to 20s
|
||||
ARGUMENT LCS-AreaEventRequestArg
|
||||
RETURN RESULT TRUE
|
||||
ERRORS {
|
||||
systemFailure |
|
||||
facilityNotSupported |
|
||||
unexpectedDataValue}
|
||||
CODE local:114 }
|
||||
|
||||
|
||||
lcs-AreaEventReport OPERATION ::= { -- Timer T(LCSL)= 10s to 300s
|
||||
ARGUMENT LCS-AreaEventReportArg
|
||||
RETURN RESULT TRUE
|
||||
ERRORS {
|
||||
systemFailure |
|
||||
unexpectedDataValue |
|
||||
facilityNotSupported}
|
||||
CODE local:113 }
|
||||
|
||||
|
||||
lcs-AreaEventCancellation OPERATION ::= { -- Timer T(LCSN)= 10s to 20s
|
||||
ARGUMENT LCS-AreaEventCancellationArg
|
||||
RETURN RESULT TRUE
|
||||
ERRORS {
|
||||
systemFailure |
|
||||
facilityNotSupported |
|
||||
unexpectedDataValue}
|
||||
CODE local:112 }
|
||||
|
||||
lcs-PeriodicLocationRequest OPERATION ::= { -- Timer T(LCSN)= 10s to 20s
|
||||
ARGUMENT LCS-PeriodicLocationRequestArg
|
||||
RESULT LCS-PeriodicLocationRequestRes
|
||||
ERRORS {
|
||||
systemFailure |
|
||||
facilityNotSupported |
|
||||
unexpectedDataValue |
|
||||
dataMissing }
|
||||
CODE local: 111 }
|
||||
|
||||
lcs-LocationUpdate OPERATION ::= { -- Timer T(LCSN)= 10s to 20s
|
||||
ARGUMENT LCS-LocationUpdateArg
|
||||
RESULT LCS-LocationUpdateRes
|
||||
ERRORS {
|
||||
systemFailure |
|
||||
unexpectedDataValue}
|
||||
CODE local: 110 }
|
||||
|
||||
lcs-PeriodicLocationCancellation OPERATION ::= { -- Timer T(LCSN)= 10s to 20s
|
||||
ARGUMENT LCS-PeriodicLocationCancellationArg
|
||||
RETURN RESULT TRUE
|
||||
ERRORS {
|
||||
systemFailure |
|
||||
unexpectedDataValue}
|
||||
CODE local: 109 }
|
||||
|
||||
|
||||
|
||||
END
|
|
@ -0,0 +1,136 @@
|
|||
--/////////////////////////////////////////////////////////////////////////////
|
||||
-- //
|
||||
-- Copyright Test Competence Center (TCC) ETH 2016 //
|
||||
-- //
|
||||
-- The copyright to the computer program(s) herein is the property of TCC. //
|
||||
-- The program(s) may be used and/or copied only with the written permission //
|
||||
-- of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
-- agreement/contract under which the program(s) has been supplied. //
|
||||
-- //
|
||||
--/////////////////////////////////////////////////////////////////////////////
|
||||
--
|
||||
-- File: SS_PDU_Defs.asn
|
||||
-- Rev: R1B
|
||||
-- Prodnr: CNL 113 832
|
||||
-- Contact: http://ttcn.ericsson.se
|
||||
-- Reference: 3GPP TS 24.080 v13.0.0
|
||||
|
||||
SS-PDU-Defs
|
||||
|
||||
DEFINITIONS IMPLICIT TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
Supported-SS-Operations
|
||||
FROM
|
||||
SS-Protocol
|
||||
|
||||
OPERATION, ERROR, Code
|
||||
FROM Remote-Operations-Information-Objects {joint-iso-itu-t
|
||||
remote-operations(4) informationObjects(5) version1(0)}
|
||||
|
||||
Invoke{}, ReturnResult{}, ReturnError{}, Reject{},
|
||||
Invoke-help{}, ReturnResult-help{}, ReturnError-help{},
|
||||
Errors{}, PresentInvokeId, ProblemType
|
||||
FROM Remote-Operations-Generic-ROS-PDUs {joint-iso-itu-t
|
||||
remote-operations(4) generic-ROS-PDUs(6) version1(0)};
|
||||
|
||||
|
||||
-- SS-Invoke, SS-ReturnResult, SS-ReturnError, SS-Reject
|
||||
-- SS-Invoke-help SS-ReturnResult-help SS-ReturnError-help types
|
||||
-- (these are accessible from TTCN-3)
|
||||
SS-Invoke ::= Invoke{{PresentInvokeId}, {Supported-SS-Operations}}
|
||||
|
||||
SS-ReturnResult ::= ReturnResult{{Supported-SS-Operations}}
|
||||
|
||||
SS-ReturnError ::= ReturnError{{Errors {{Supported-SS-Operations}}}}
|
||||
|
||||
SS-Reject ::= Reject --{{Errors {{Supported-SS-Operations}}}}
|
||||
|
||||
SS-Invoke-help ::= Invoke-help{{PresentInvokeId}, {Supported-SS-Operations}}
|
||||
|
||||
SS-ReturnResult-help ::= ReturnResult-help{{Supported-SS-Operations}}
|
||||
|
||||
SS-ReturnError-help ::= ReturnError-help{{Errors {{Supported-SS-Operations}}}}
|
||||
|
||||
|
||||
-- Component Portion fields
|
||||
|
||||
-- COMPONENT PORTION. This part is copied from TCAP_PDU_Defs.asn file
|
||||
-- with TCAP -> SS-TCAP renaming
|
||||
-- This is needed for internal coding: DON'T USE FROM TTCN !!!
|
||||
SS-TCAP-ComponentPortion ::= [UNIVERSAL 28] IMPLICIT SEQUENCE (SIZE(1..MAX)) OF
|
||||
SS-TCAP-Component
|
||||
|
||||
|
||||
-- COMPONENT TYPE. Recommendation X.229 defines four Application Protocol Data
|
||||
-- Units (APDUs).
|
||||
|
||||
SS-TCAP-Component ::= CHOICE
|
||||
{
|
||||
invoke [1] IMPLICIT SS-TCAP-Invoke,
|
||||
returnResult [2] IMPLICIT SS-TCAP-ReturnResult,
|
||||
returnError [3] IMPLICIT SS-TCAP-ReturnError,
|
||||
reject [4] IMPLICIT SS-TCAP-Reject
|
||||
}
|
||||
|
||||
-- The Components are sequences of data elements.
|
||||
SS-TCAP-Invoke ::= SEQUENCE
|
||||
{
|
||||
invokeID SS-TCAP-InvokeIdType,
|
||||
linkedID [0] IMPLICIT SS-TCAP-InvokeIdType OPTIONAL,
|
||||
operationCode Code,
|
||||
parameter ANY DEFINED BY operationCode OPTIONAL
|
||||
}
|
||||
-- ethgry(11/July/02): ANY and ANY DEFINED BY handled in a special,
|
||||
-- transparent way at encoding/decoding:
|
||||
-- its value notation shall be a simple octet string, which will be
|
||||
-- directly copied (i.e without an additional tag and length fields)
|
||||
-- into the encoded stream and will be fetched from the received
|
||||
-- stream and passed to the abstract level as an octet string.
|
||||
|
||||
|
||||
-- ANY is filled by the single ASN.1 data type following the keyword PARAMETER
|
||||
-- or the keyword ARGUMENT in the type definition of a particular operation.
|
||||
|
||||
SS-TCAP-ReturnResult ::= SEQUENCE
|
||||
{
|
||||
invokeID SS-TCAP-InvokeIdType,
|
||||
result SS-TCAP-ReturnResult-Result OPTIONAL
|
||||
}
|
||||
|
||||
SS-TCAP-ReturnResult-Result ::= SEQUENCE
|
||||
{
|
||||
operationCode Code,
|
||||
parameter ANY DEFINED BY operationCode OPTIONAL
|
||||
-- ethgry: See comment to Invoke on the use of ANY
|
||||
}
|
||||
|
||||
-- ANY is filled by the single ASN.1 data type following the keyword RESULT in
|
||||
-- the type definition of a particular operation.
|
||||
|
||||
SS-TCAP-ReturnError ::= SEQUENCE
|
||||
{
|
||||
invokeID SS-TCAP-InvokeIdType,
|
||||
errorCode Code,
|
||||
parameter ANY DEFINED BY errorCode OPTIONAL
|
||||
-- ethgry: See comment to Invoke on the use of ANY
|
||||
}
|
||||
|
||||
-- ANY is filled by the single ASN.1 data type following the keyword PARAMETER
|
||||
-- in the type definition of a particular error.
|
||||
SS-TCAP-Reject ::= SEQUENCE
|
||||
{
|
||||
invokeID CHOICE
|
||||
{
|
||||
derivable SS-TCAP-InvokeIdType,
|
||||
not-derivable NULL
|
||||
},
|
||||
problem ProblemType
|
||||
}
|
||||
|
||||
SS-TCAP-InvokeIdType ::= INTEGER (-128..127)
|
||||
|
||||
END
|
|
@ -0,0 +1,67 @@
|
|||
--/////////////////////////////////////////////////////////////////////////////
|
||||
-- //
|
||||
-- Copyright Test Competence Center (TCC) ETH 2016 //
|
||||
-- //
|
||||
-- The copyright to the computer program(s) herein is the property of TCC. //
|
||||
-- The program(s) may be used and/or copied only with the written permission //
|
||||
-- of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
-- agreement/contract under which the program(s) has been supplied. //
|
||||
-- //
|
||||
--/////////////////////////////////////////////////////////////////////////////
|
||||
--
|
||||
-- File: SS_Protocol.asn
|
||||
-- Rev: R1B
|
||||
-- Prodnr: CNL 113 832
|
||||
-- Contact: http://ttcn.ericsson.se
|
||||
-- Reference: 3GPP TS 24.080 v13.0.0
|
||||
|
||||
|
||||
SS-Protocol {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0)
|
||||
gsm-Access (2) modules (3) ss-Protocol (3) version12 (12)}
|
||||
|
||||
DEFINITIONS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
OPERATION
|
||||
FROM Remote-Operations-Information-Objects {
|
||||
joint-iso-itu-t remote-operations(4) informationObjects(5) version1(0)}
|
||||
|
||||
-- imports operations
|
||||
|
||||
-- imports operation from MAP-MobileServiceOperations
|
||||
forwardCheckSS-Indication
|
||||
FROM MAP-MobileServiceOperations {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0) gsm-Network (1) modules (3)
|
||||
map-MobileServiceOperations (5) version12 (12)}
|
||||
|
||||
-- imports operations from MAP-SupplementaryServiceOperations
|
||||
registerSS, eraseSS, activateSS, deactivateSS, interrogateSS, registerPassword, getPassword,
|
||||
processUnstructuredSS-Request, unstructuredSS-Request, unstructuredSS-Notify, eraseCC-Entry
|
||||
FROM MAP-SupplementaryServiceOperations {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0) gsm-Network (1) modules (3)
|
||||
map-SupplementaryServiceOperations (8) version12 (12)}
|
||||
|
||||
-- imports operations from SS-Operations
|
||||
processUnstructuredSS-Data, notifySS, forwardChargeAdvice, buildMPTY, holdMPTY, retrieveMPTY,
|
||||
splitMPTY, explicitCT, forwardCUG-Info, accessRegisterCCEntry, callDeflection, userUserService,
|
||||
lcs-LocationNotification, lcs-MOLR, lcs-AreaEventRequest, lcs-AreaEventReport, lcs-AreaEventCancellation, lcs-PeriodicLocationRequest, lcs-LocationUpdate, lcs-PeriodicLocationCancellation
|
||||
FROM SS-Operations {
|
||||
itu-t identified-organization (4) etsi (0) mobileDomain (0) gsm-Access (2) modules (3)
|
||||
ss-Operations (0) version12 (12)}
|
||||
|
||||
;
|
||||
|
||||
Supported-SS-Operations OPERATION ::= {forwardCheckSS-Indication | registerSS | eraseSS |
|
||||
activateSS | deactivateSS | interrogateSS | registerPassword | getPassword |
|
||||
processUnstructuredSS-Request | unstructuredSS-Request | unstructuredSS-Notify | eraseCC-Entry |
|
||||
processUnstructuredSS-Data | notifySS | forwardChargeAdvice | buildMPTY | holdMPTY |
|
||||
retrieveMPTY | splitMPTY | explicitCT | forwardCUG-Info | accessRegisterCCEntry |
|
||||
callDeflection | userUserService | lcs-LocationNotification | lcs-MOLR | lcs-AreaEventRequest | lcs-AreaEventReport | lcs-AreaEventCancellation | lcs-PeriodicLocationRequest | lcs-LocationUpdate | lcs-PeriodicLocationCancellation }
|
||||
|
||||
|
||||
|
||||
END
|
|
@ -0,0 +1,40 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Copyright Test Competence Center (TCC) ETH 2016 //
|
||||
// //
|
||||
// The copyright to the computer program(s) herein is the property of TCC. //
|
||||
// The program(s) may be used and/or copied only with the written permission //
|
||||
// of TCC or in accordance with the terms and conditions stipulated in the //
|
||||
// agreement/contract under which the program(s) has been supplied. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: SS_Types.ttcn
|
||||
// Rev: R1B
|
||||
// Prodnr: CNL 113 832
|
||||
// Contact: http://ttcn.ericsson.se
|
||||
// Reference: 3GPP TS 24.080 v13.0.0
|
||||
|
||||
module SS_Types
|
||||
{
|
||||
|
||||
import from SS_PDU_Defs all;
|
||||
|
||||
//Coding functions
|
||||
external function enc_SS_FacilityInformation (in SS_FacilityInformation pdu) return octetstring;
|
||||
external function dec_SS_FacilityInformation (in octetstring stream) return SS_FacilityInformation;
|
||||
external function dec_SS_FacilityInformation_backtrack (in octetstring stream, out SS_FacilityInformation pdu) return integer;
|
||||
|
||||
//Type for extracted facilityInformation in Facility IE
|
||||
type record of SS_Component SS_FacilityInformation;
|
||||
|
||||
//24.080 3.6.1
|
||||
type union SS_Component
|
||||
{
|
||||
SS_Invoke invoke,
|
||||
SS_ReturnResult returnResult,
|
||||
SS_ReturnError returnError,
|
||||
SS_Reject reject
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue