add CommonIP.ttcn (+ dependencies) from 3GPP TS 36.523)

This commit is contained in:
Harald Welte 2017-07-06 10:02:30 +01:00
parent bae934d467
commit 5224db9da9
5 changed files with 1829 additions and 0 deletions

595
testproject/CommonDefs.ttcn Normal file
View File

@ -0,0 +1,595 @@
/******************************************************************************/
// @copyright Copyright Notification
// No part may be reproduced except as authorized by written permission.
// The copyright and the foregoing restriction extend to reproduction in all media.
// Trademark 2012, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC).
// All rights reserved.
// @version: 36.523-3v10.1.0
// $Date: 2012-09-03 10:54:34 +0200 (Mon, 03 Sep 2012) $
// $Rev: 7249 $
/******************************************************************************/
module CommonDefs {
//----------------------------------------------------------------------------
// type definitions:
type bitstring B1_Type length(1);
type bitstring B2_Type length(2);
type bitstring B3_Type length(3);
type bitstring B4_Type length(4);
type bitstring B5_Type length(5);
type bitstring B6_Type length(6);
type bitstring B7_Type length(7);
type bitstring B7_15_Type length(7..15); // NOTE: length restriction can only be a range but not two destinct lengths
type bitstring B8_Type length(8);
type bitstring B9_Type length(9);
type bitstring B10_Type length(10);
type bitstring B11_Type length(11);
type bitstring B12_Type length(12);
type bitstring B14_Type length(14);
type bitstring B15_Type length(15);
type bitstring B16_Type length(16);
type bitstring B20_Type length(20);
type bitstring B24_Type length(24);
type bitstring B27_Type length(27);
type bitstring B28_Type length(28);
type bitstring B32_Type length(32);
type bitstring B36_Type length(36);
type bitstring B40_Type length(40);
type bitstring B41_Type length(41);
type bitstring B43_Type length(43);
type bitstring B47_Type length(47);
type bitstring B48_Type length(48);
type bitstring B56_Type length(56);
type bitstring B64_Type length(64);
type bitstring B80_Type length(80);
type bitstring B112_Type length(112);
type bitstring B128_Type length(128);
type bitstring B160_Type length(160);
type bitstring B192_Type length(192);
type bitstring B256_Type length(256);
type bitstring B32_128_Type length(32..128);
type B128_Type B128_Key_Type; /* 128 bit security key */
type B256_Type B256_Key_Type; /* 256 bit security key */
type octetstring O1_Type length(1);
type octetstring O2_Type length(2);
type octetstring O3_Type length(3);
type octetstring O4_Type length(4);
type octetstring O5_Type length(5);
type octetstring O6_Type length(6);
type octetstring O8_Type length(8);
type octetstring O9_Type length(9);
type octetstring O10_Type length(10);
type octetstring O14_Type length(14);
type octetstring O13_Type length(14);
type octetstring O15_Type length(15);
type octetstring O16_Type length(16);
type octetstring O32_Type length(32);
type octetstring O43_Type length(43);
type hexstring H2_Type length(2);
type hexstring H4_Type length(4);
type boolean Null_Type (true); // dummy type for 'typeless' fields in unions
type boolean Dummy_Type (true); // dummy type for temporary purposes only
const integer tsc_UInt8Max := 255;
const integer tsc_UInt16Max := 65535;
const integer tsc_UInt20Max := 1048575;
const integer tsc_UInt32Max := 4294967295;
type integer UInt_Type (0 .. infinity);
type integer UInt8_Type (0 .. tsc_UInt8Max);
type integer UInt16_Type (0 .. tsc_UInt16Max);
type integer UInt20_Type (0 .. tsc_UInt20Max);
type integer UInt32_Type (0 .. tsc_UInt32Max);
type charstring Char1_Type length (1);
type record of Char1_Type Char1List_Type;
type record of charstring CharStringList_Type;
type record of integer IntegerList_Type;
type enumerated SinglePLMN_TestedType {SinglePLMN, MultiPLMN, MultiPLMNinPrimaryBand, MultiPLMNinSecondaryBand}; // @sic R5-123667 sic@
type enumerated EUTRA_ATTACH_TESTED_Type { EPS_ATTACH_ONLY, COMBINED_ATTACH};
type enumerated NAS_ATTACH_STATE_Type {ATTACHED, DETACHED};
type enumerated UTRAN_FDD_TDD_Type {UTRAN_FDD, UTRAN_TDD};
type enumerated RATComb_Tested_Type {EUTRA_UTRA, EUTRA_GERAN, EUTRA_Only};
type enumerated EUTRA_CellId_Type {
eutra_Cell_NonSpecific,
eutra_Cell1,
eutra_Cell2,
eutra_Cell3,
eutra_Cell4,
eutra_Cell6,
eutra_Cell10,
eutra_Cell11,
eutra_Cell12,
eutra_Cell13,
eutra_Cell14,
eutra_Cell23,
eutra_Cell28,
eutra_Cell29,
eutra_Cell30,
eutra_CellA,
eutra_CellB,
eutra_CellC,
eutra_CellD,
eutra_CellE,
eutra_CellG,
eutra_CellH,
eutra_CellI,
eutra_CellJ,
eutra_CellK,
eutra_CellL,
eutra_CellM
};
// To indicate which PTCs are configured (EUTRA alone is included for completeness)
type enumerated IRAT_ConfiguredPTCs_Type { EUTRA_Only, EUTRA_UTRAN, EUTRA_GERAN, EUTRA_UTRAN_GERAN, EUTRA_CDMA2000, UTRAN_Only } /* @status APPROVED */
// definitions needed for IP and IMS handling
const integer tsc_NoOfPDNs := 2; /* @status APPROVED */
const integer tsc_Index_PDN1 := 0; /* @status APPROVED */
const integer tsc_Index_PDN2 := 1; /* @status APPROVED */
type enumerated PDN_Index_Type { PDN_1 (0), PDN_2 (1) };
//----------------------------------------------------------------------------
// constant to generate PRBS sequence
const octetstring tsc_RandomPRBS := /* @status APPROVED */
'FFE665A5C5CA3452085408ABEECE4B0B813FD337873F2CD1E29AE91BD6C8E14F'O
& 'DE630F8195688EBE465F09816A8EEB1B83953DD362DAE3B06D5B76D8E3E53087'O
& 'EA645A09017FD99C3CACBB46DF1CD61DA9C435F89943DF9CC34ADEE31AD6E24F'O
& 'A1903D53778D949742750DD49DE9CE9E430AD448A14575D89C16025508814020'O //octets 0 .. 127
& '0555DDC9CBCB9EC31F833F866A5BA390680EAB11282EAE44F5E7658F6B247A0C'O
& '54A21057F73278595C235077F267A59097E8CEB4EDE49A16FDB36D2485EA3107'O
& 'D59DC360700D5488BEB9B96C24AF44DF498BC135788C14A8BBEC64A5EF64DA1C'O
& '5608FEB312D7B738D3E2CFB4C74A7458A3EF9B3C79F3CD348740DFE330780C01'O //octets 128 .. 255
& 'FFCCCB4B8B9468A410A81157DD9C9617027FA66F0E7E59A3C535D237AD91C29F'O
& 'BCC61F032AD11D7C8CBE1302D51DD637072A7BA6C5B5C760DAB6EDB1C7CA610F'O
& 'D4C8B41202FFB3387959768DBE39AC3B53886BF13287BF398695BDC635ADC49F'O
& '43207AA6EF1B292E84EA1BA93BD39D3C8615A891428AEBB1382C04AA11028040'O //octets 256 .. 383
& '0AABBB9397973D863F067F0CD4B74720D01D5622505D5C89EBCECB1ED648F418'O
& 'A94420AFEE64F0B2B846A0EFE4CF4B212FD19D69DBC9342DFB66DA490BD4620F'O
& 'AB3B86C0E01AA9117D7372D8495E89BE9317826AF118295177D8C94BDEC9B438'O
& 'AC11FD6625AF6E71A7C59F698E94E8B147DF3678F3E79A690E81BFC660F01803'O //octets 384 .. 511
& 'FF9996971728D148215022AFBB392C2E04FF4CDE1CFCB3478A6BA46F5B23853F'O
& '798C3E0655A23AF9197C2605AA3BAC6E0E54F74D8B6B8EC1B56DDB638F94C21F'O
& 'A991682405FF6670F2B2ED1B7C735876A710D7E2650F7E730D2B7B8C6B5B893E'O
& '8640F54DDE36525D09D4375277A73A790C2B51228515D7627058095422050080'O //octets 512 .. 639
& '155777272F2E7B0C7E0CFE19A96E8E41A03AAC44A0BAB913D79D963DAC91E831'O
& '5288415FDCC9E165708D41DFC99E96425FA33AD3B792685BF6CDB49217A8C41F'O
& '56770D81C0355222FAE6E5B092BD137D262F04D5E23052A2EFB19297BD936871'O
& '5823FACC4B5EDCE34F8B3ED31D29D1628FBE6CF1E7CF34D21D037F8CC1E03007'O //octets 640 .. 767
& 'FF332D2E2E51A29042A0455F7672585C09FE99BC39F9668F14D748DEB6470A7E'O
& 'F3187C0CAB4475F232F84C0B547758DC1CA9EE9B16D71D836ADBB6C71F29843F'O
& '5322D0480BFECCE1E565DA36F8E6B0ED4E21AFC4CA1EFCE61A56F718D6B7127D'O
& '0C81EA9BBC6CA4BA13A86EA4EF4E74F21856A2450A2BAEC4E0B012A8440A0100'O //octets 768 .. 895
& '2AAEEE4E5E5CF618FC19FC3352DD1C834075588941757227AF3B2C7B5923D062'O
& 'A51082BFB993C2CAE11A83BF933D2C84BF4675A76F24D0B7ED9B69242F51883E'O
& 'ACEE1B03806AA445F5CDCB61257A26FA4C5E09ABC460A545DF63252F7B26D0E2'O
& 'B047F59896BDB9C69F167DA63A53A2C51F7CD9E3CF9E69A43A06FF1983C0600F'O //octets 896 .. 1023
& 'FE665A5C5CA3452085408ABEECE4B0B813FD337873F2CD1E29AE91BD6C8E14FD'O
& 'E630F8195688EBE465F09816A8EEB1B83953DD362DAE3B06D5B76D8E3E53087E'O
& 'A645A09017FD99C3CACBB46DF1CD61DA9C435F89943DF9CC34ADEE31AD6E24FA'O
& '1903D53778D949742750DD49DE9CE9E430AD448A14575D89C160255088140200'O //octets 1024 .. 1151
& '555DDC9CBCB9EC31F833F866A5BA390680EAB11282EAE44F5E7658F6B247A0C5'O
& '4A21057F73278595C235077F267A59097E8CEB4EDE49A16FDB36D2485EA3107D'O
& '59DC360700D5488BEB9B96C24AF44DF498BC135788C14A8BBEC64A5EF64DA1C5'O
& '608FEB312D7B738D3E2CFB4C74A7458A3EF9B3C79F3CD348740DFE330780C01F'O //octets 1152 .. 1279
& 'FCCCB4B8B9468A410A81157DD9C9617027FA66F0E7E59A3C535D237AD91C29FB'O
& 'CC61F032AD11D7C8CBE1302D51DD637072A7BA6C5B5C760DAB6EDB1C7CA610FD'O
& '4C8B41202FFB3387959768DBE39AC3B53886BF13287BF398695BDC635ADC49F4'O
& '3207AA6EF1B292E84EA1BA93BD39D3C8615A891428AEBB1382C04AA110280400'O //octets 1280 .. 1407
& 'AABBB9397973D863F067F0CD4B74720D01D5622505D5C89EBCECB1ED648F418A'O
& '94420AFEE64F0B2B846A0EFE4CF4B212FD19D69DBC9342DFB66DA490BD4620FA'O
& 'B3B86C0E01AA9117D7372D8495E89BE9317826AF118295177D8C94BDEC9B438A'O
& 'C11FD6625AF6E71A7C59F698E94E8B147DF3678F3E79A690E81BFC660F01803F'O //octets 1408 .. 1535
& 'F9996971728D148215022AFBB392C2E04FF4CDE1CFCB3478A6BA46F5B23853F7'O
& '98C3E0655A23AF9197C2605AA3BAC6E0E54F74D8B6B8EC1B56DDB638F94C21FA'O
& '991682405FF6670F2B2ED1B7C735876A710D7E2650F7E730D2B7B8C6B5B893E8'O
& '640F54DDE36525D09D4375277A73A790C2B51228515D76270580954220500801'O //octets 1536 .. 1663
& '55777272F2E7B0C7E0CFE19A96E8E41A03AAC44A0BAB913D79D963DAC91E8315'O
& '288415FDCC9E165708D41DFC99E96425FA33AD3B792685BF6CDB49217A8C41F5'O
& '6770D81C0355222FAE6E5B092BD137D262F04D5E23052A2EFB19297BD9368715'O
& '823FACC4B5EDCE34F8B3ED31D29D1628FBE6CF1E7CF34D21D037F8CC1E03007F'O //octets 1664 .. 1791
& 'F332D2E2E51A29042A0455F7672585C09FE99BC39F9668F14D748DEB6470A7EF'O
& '3187C0CAB4475F232F84C0B547758DC1CA9EE9B16D71D836ADBB6C71F29843F5'O
& '322D0480BFECCE1E565DA36F8E6B0ED4E21AFC4CA1EFCE61A56F718D6B7127D0'O
& 'C81EA9BBC6CA4BA13A86EA4EF4E74F21856A2450A2BAEC4E0B012A8440A01002'O //octets 1792 .. 1919
& 'AAEEE4E5E5CF618FC19FC3352DD1C834075588941757227AF3B2C7B5923D062A'O
& '51082BFB993C2CAE11A83BF933D2C84BF4675A76F24D0B7ED9B69242F51883EA'O
& 'CEE1B03806AA445F5CDCB61257A26FA4C5E09ABC460A545DF63252F7B26D0E2B'O
& '047F59896BDB9C69F167DA63A53A2C51F7CD9E3CF9E69A43A06FF1983C0600'O; //octets 1920 .. 2046
//----------------------------------------------------------------------------
// common functions:
type integer LineNo_Type;
/*
* @desc local function
* @param p_FileName
* @param p_LineNo
* @param p_Msg
* @return charstring
* @status APPROVED
*/
function fl_FormatLog(charstring p_FileName,
LineNo_Type p_LineNo,
charstring p_Msg) return charstring
{
var charstring v_LineNoStr := int2str(p_LineNo);
return p_FileName & ":" & v_LineNoStr & ": " & p_Msg; /* common "UNIX style" format as e.g. used by grep;
* the final format for this output is FFS */
}
//----------------------------------------------------------------------------
/*
* @desc function for common error logging
* @param p_FileName
* @param p_LineNo
* @param p_Msg
* @status APPROVED
*/
function f_ErrorLog(charstring p_FileName,
LineNo_Type p_LineNo,
charstring p_Msg)
{
log(fl_FormatLog(p_FileName, p_LineNo, p_Msg));
};
//----------------------------------------------------------------------------
/*
* @desc common function for verdict assignment
* @param p_Verdict
* @param p_FileName
* @param p_LineNo
* @param p_Msg
* @status APPROVED
*/
function f_SetVerdict(verdicttype p_Verdict,
charstring p_FileName,
LineNo_Type p_LineNo,
charstring p_Msg)
{
var charstring v_OutputLine := fl_FormatLog(p_FileName, p_LineNo, p_Msg);
setverdict(p_Verdict, v_OutputLine);
}
//----------------------------------------------------------------------------
/*
* @desc Common functions to be called in case unrecoverable errors
* (i.e. runtimer errors generated by TTCN)
* @param p_FileName
* @param p_LineNo
* @param p_Msg
* @status APPROVED
*/
function FatalError(charstring p_FileName,
LineNo_Type p_LineNo,
charstring p_Msg)
{
// setverdict(inconc); // setverdict causes problems when FatalError is used in a function called from within a template
f_ErrorLog(p_FileName, p_LineNo, p_Msg);
testcase.stop (p_Msg); // This operation now defined in TTCN3 v4.2.1
};
//----------------------------------------------------------------------------
/*
* @desc Common function to delay the test case for the given time
* @param p_DelayTime
* @status APPROVED
*/
function f_Delay ( float p_DelayTime )
{
timer t_Delay;
t_Delay.start ( p_DelayTime );
t_Delay.timeout;
};
//----------------------------------------------------------------------------
function f_TemplateBit2Int(template (present) integer p_Val,
integer p_Length) return template bitstring
{ /* Auxiliary function
* note: there is no possibility in TTCN-3 to check whether a template parameter
* which is not a value is "*", "?" or omit
* => we restrict p_Val to "template (present)", i.e it shall be a value or "?" */
if (isvalue(p_Val)) {
return int2bit(valueof(p_Val), p_Length);
} else {
return ?;
}
}
//----------------------------------------------------------------------------
/*
* @desc returns index of first occurency of any char of p_CharList in p_String starting from p_StartIndex;
* returns -1 if there is no occurency
* @param p_String
* @param p_CharList
* @param p_StartIndex
* @return integer
* @status APPROVED
*/
function f_StringFindChar(charstring p_String,
Char1List_Type p_CharList,
UInt_Type p_StartIndex) return integer
{
var integer v_NoOfChars := lengthof(p_CharList);
var integer v_Index;
var integer i;
var Char1_Type v_Char;
if (v_NoOfChars == 0) {
return -1;
}
for (v_Index:=p_StartIndex; v_Index<lengthof(p_String); v_Index:=v_Index+1) {
v_Char := p_String[v_Index];
for (i:=0; i<v_NoOfChars; i:=i+1) {
if (v_Char == p_CharList[i]) {
return v_Index;
}
}
}
return -1;
}
function f_StringToLower(charstring p_String) return charstring
{
var integer i;
var integer v_StrLen := lengthof(p_String);
var integer v_Value;
var charstring v_String := "";
for (i := 0; i < v_StrLen; i := i+1) {
v_Value := char2int(p_String[i]);
if ((64 < v_Value) and (v_Value < 91)) {
v_Value := v_Value + 32;
}
v_String[i] := int2char(v_Value);
}
return v_String;
}
//----------------------------------------------------------------------------
/*
* @desc returns list of strings after split
* @param p_String
* @param p_SplitCharList
* @return CharStringList_Type
* @status APPROVED
*/
function f_StringSplit(charstring p_String,
Char1List_Type p_SplitCharList) return CharStringList_Type
{
var CharStringList_Type v_StringList;
var integer v_Index;
var integer v_SubStrLen;
var integer v_StartIndex := 0;
var integer v_StrLen := lengthof(p_String);
var integer v_StrCnt := 0;
var boolean v_Break := false;
while (not v_Break) {
v_Index := f_StringFindChar(p_String, p_SplitCharList, v_StartIndex);
if (v_Index<0) {
v_SubStrLen := v_StrLen - v_StartIndex;
v_Break := true;
} else {
v_SubStrLen := v_Index - v_StartIndex;
}
v_StringList[v_StrCnt] := substr(p_String, v_StartIndex, v_SubStrLen);
v_StrCnt := v_StrCnt + 1;
v_StartIndex := v_Index + 1; // skip the split char
}
return v_StringList;
}
//----------------------------------------------------------------------------
function f_ConvertBoolToBit(boolean p_Bool) return B1_Type
{
var B1_Type v_Bit := '0'B;
if (p_Bool) {
v_Bit := '1'B;
}
return v_Bit;
}
//----------------------------------------------------------------------------
/*
* @desc return octet-aligned bitstring
* @param p_Bitstring
* @return bitstring
* @status APPROVED
*/
function f_OctetAlignedBitString( bitstring p_Bitstring) return bitstring
{ // @sic R5s100324 change 3 sic@
var bitstring v_Bitstring := p_Bitstring;
var integer v_BitLength := lengthof(p_Bitstring);
var integer v_PaddingLength;
var integer i;
if ((v_BitLength mod 8) > 0) // if not already byte aligned
{
v_PaddingLength := 8 - (v_BitLength mod 8);
for (i:=0; i < v_PaddingLength; i := i+1)
{
v_Bitstring := v_Bitstring & '0'B;
}
}
return v_Bitstring;
}
//----------------------------------------------------------------------------
/*
* @desc function to extract output string from random test pattern of a certain length and at a starting point
* @param p_Start
* @param p_N
* @return octetstring
* @status APPROVED
*/
function f_GetN_OctetsFromPRBS(UInt_Type p_Start,
UInt_Type p_N)
return octetstring
{
var integer i;
var integer k;
var octetstring v_Noctets :=''O; // output string to be extracted from random test pattern
for (i:= 0; i< p_N; i := i+1) {
k := p_Start + i;
k := k mod 2047;
v_Noctets := v_Noctets & tsc_RandomPRBS[k];
}
return v_Noctets;
}
//----------------------------------------------------------------------------
/*
* @desc check whether given testase name fits L2 test case
* @return boolean
* @status APPROVED
*/
function f_TestcaseIsL2Testcase() return boolean
{
var charstring v_TestcaseName := testcasename(); // This operation now defined in TTCN3 v4.2.1
var template charstring v_L2TestcasePattern := pattern "TC_7_*"; /* @sic R5s100136 sic@ */
return (match(v_TestcaseName, v_L2TestcasePattern));
}
//----------------------------------------------------------------------------
function f_TestcaseIsDrbTestcase() return boolean
{
var charstring v_TestcaseName := testcasename(); // This operation now defined in TTCN3 v4.2.1
var template charstring v_L2TestcasePattern := pattern "TC_12_*";
return (match(v_TestcaseName, v_L2TestcasePattern));
}
//----------------------------------------------------------------------------
type enumerated Gsm7BitPacking_Type { SMS_Packing, CBS_Packing, USSD_Packing };
/*
* @desc Packing of a 7 bit ASCII string to an 8 bit octet string (TS 23.038 cl. 6.1.2):
* SMS Packing (TS 23.038 cl. 6.1.2.1)
* CBS Packing (TS 23.038 cl. 6.1.2.2)
* USSD Packing (TS 23.038 cl. 6.1.2.3)
* @param p_Text
* @param p_Packing
* @return octetstring
* @status APPROVED
*/
function f_CharPacking_IA5toGsm7Bit(charstring p_Text,
Gsm7BitPacking_Type p_Packing) return octetstring
{
var octetstring v_OctetString := char2oct(p_Text); // "Hallo" -> '48616C6C6F'O
var bitstring v_BitString := ''B;
var bitstring v_Padding := ''B;
var integer v_TextLength := lengthof(p_Text);
var integer v_BitStringLength := 0;
var integer v_IntValue;
var integer v_NoOfOctets;
var integer v_NoOfPaddingBits;
var integer v_Index;
var integer i;
if (((p_Packing == SMS_Packing) and (v_TextLength > 160)) or // a maximum of 160 characters for SMS (i.e. 140 octets)
((p_Packing == CBS_Packing) and (v_TextLength > 93)) or // a maximum of 93 characters for CBS (i.e. 82 octets)
((p_Packing == USSD_Packing) and (v_TextLength > 182))) { // a maximum of 182 characters for USSD (i.e. 160 octets)
FatalError(__FILE__, __LINE__, "input string is too long");
}
for (i:=0; i<v_TextLength; i:=i+1) {
v_IntValue := oct2int(v_OctetString[i]);
v_BitString := int2bit(v_IntValue, 7) & v_BitString; // concat 7 bits only
v_BitStringLength := v_BitStringLength + 7;
}
// add padding:
v_NoOfOctets := (v_BitStringLength + 7) / 8;
v_NoOfPaddingBits := (v_NoOfOctets * 8) - v_BitStringLength;
if (v_NoOfPaddingBits > 0) {
if ((p_Packing == USSD_Packing) and (v_NoOfPaddingBits == 7)) {
v_Padding := '0001101'B; // use <CR> instead of the @ character; see TS 23.038 cl. 6.1.2.3.1
} else {
v_Padding := int2bit(0, v_NoOfPaddingBits); // 1..7 padding bits, all 0
}
}
v_BitString := v_Padding & v_BitString;
// convert bitstring back to octetstring: the first character is at the end of the bitstring
// => we need to take the octets from the end of the bitstring
v_OctetString := ''O;
for (i:=0; i < v_NoOfOctets; i:=i+1) {
v_Index := (v_NoOfOctets - (i+1)) * 8; // get start index of the next octet
v_OctetString[i] := bit2oct(substr(v_BitString, v_Index, 8));
}
return v_OctetString;
}
function f_CharPacking_IA5toBCD(charstring p_ASCII_String) return octetstring
{ /* Packed BCD coding with "swaping of nibbles" as reuired e.g. for encoding of called and calling party numbers in NAS messages (e.g. TS 24.004 cl. 10.5.4.7 and 10.5.4.9);
when the length of the input string is odd 'F' is aded as padding:
"0613454120" -> '6031541402'O - even number of digits
"06134541209" -> '6031541402F9'O - odd number of digits (padding)
"A6134541209" -> error */
var integer i;
var charstring v_BcdString;
var integer v_Length := lengthof(p_ASCII_String);
var charstring v_ASCII_String := p_ASCII_String;
// check input string
for (i := 0; i < v_Length; i := i+1) {
if (not match(p_ASCII_String[i], pattern "[0-9]")) {
FatalError(__FILE__, __LINE__, "invalid character for BCD string");
}
}
// add padding (if needed)
if (v_Length mod 2 != 0) {
v_ASCII_String := v_ASCII_String & "F";
}
// swap digits
for (i := 0; i < v_Length; i := i+2) {
v_BcdString[i] := v_ASCII_String[i+1];
v_BcdString[i+1] := v_ASCII_String[i];
}
return str2oct(v_BcdString);
}
//----------------------------------------------------------------------------
function f_BitstringReplaceMSB(bitstring p_Bitstring,
B1_Type p_NewMSB) return bitstring
{
return replace(p_Bitstring, 0, 1, p_NewMSB);
}
//----------------------------------------------------------------------------
function f_Bitstring_BitIsSet(bitstring p_Bitstring,
integer p_Index) return boolean
{
if (p_Index >= lengthof(p_Bitstring)) {
FatalError(__FILE__, __LINE__, "invalid bit position");
}
return (substr(p_Bitstring, p_Index, 1) == '1'B);
}
}

445
testproject/CommonIP.ttcn Normal file
View File

@ -0,0 +1,445 @@
/******************************************************************************/
// @copyright Copyright Notification
// No part may be reproduced except as authorized by written permission.
// The copyright and the foregoing restriction extend to reproduction in all media.
// Trademark 2012, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC).
// All rights reserved.
// @version: 36.523-3v10.1.0
// $Date: 2012-09-03 00:32:42 +0200 (Mon, 03 Sep 2012) $
// $Rev: 7245 $
/******************************************************************************/
module CommonIP {
import from CommonDefs all;
import from Parameters all;
const UInt8_Type tsc_IP_Protocol_ICMP := 1; /* @status APPROVED */
const UInt8_Type tsc_IP_Protocol_UDP := 17; /* @status APPROVED */
const UInt8_Type tsc_ICMP_Type_EchoReply := 0; /* @status APPROVED */
const UInt8_Type tsc_IP_Protocol_TCP := 6; /* @status APPROVED */
const UInt8_Type tsc_IP_Protocol_IPSec := 50; /* @status APPROVED */
const integer tsc_IMS_PortNumber_5060 := 5060; /* @status APPROVED */
const octetstring tsc_IP_AnyData := '00112233445566778899AABBCCDDEEFF'O; /* @status APPROVED */
function fl_LoopbackModeB_IPv4IPv6Address(boolean p_UseIPv4,
charstring p_IPv4Addr,
charstring p_IPv6Addr) return charstring
{
if (p_UseIPv4) { return p_IPv4Addr; }
else { return p_IPv6Addr; }
}
function f_LoopbackModeB_IP_Address_UE(boolean p_UseIPv4 := pc_IPv4,
PDN_Index_Type p_PdnIndex := PDN_1) return charstring
{
var charstring v_IPAddr := "";
select (p_PdnIndex) {
case (PDN_1) { v_IPAddr := fl_LoopbackModeB_IPv4IPv6Address(p_UseIPv4, px_IPv4_Address1_UE, px_IPv6_Address1_UE); }
case (PDN_2) { v_IPAddr := fl_LoopbackModeB_IPv4IPv6Address(p_UseIPv4, px_IPv4_Address2_UE, px_IPv6_Address2_UE); }
}
return v_IPAddr;
}
function f_LoopbackModeB_IP_Address_NW(boolean p_UseIPv4 := pc_IPv4,
PDN_Index_Type p_PdnIndex := PDN_1) return charstring
{
var charstring v_IPAddr := "";
select (p_PdnIndex) {
case (PDN_1) { v_IPAddr := fl_LoopbackModeB_IPv4IPv6Address(p_UseIPv4, px_IPv4_Address1_NW, px_IPv6_Address1_NW); }
case (PDN_2) { v_IPAddr := fl_LoopbackModeB_IPv4IPv6Address(p_UseIPv4, px_IPv4_Address2_NW, px_IPv6_Address2_NW); }
}
return v_IPAddr;
}
function f_IpAddressIsIPv4(charstring p_IpAddress) return boolean
{
var template charstring v_Pattern := pattern "[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+";
return match(p_IpAddress, v_Pattern);
};
function f_IpAddressIsIPv6(charstring p_IpAddress) return boolean
{
var Char1List_Type v_SplitCharList := {":"};
var CharStringList_Type v_FieldList := f_StringSplit(p_IpAddress, v_SplitCharList);
var integer v_FieldCnt := lengthof(v_FieldList);
var charstring v_Field;
var charstring v_Pattern;
var integer v_FieldLength;
var integer i;
if ((v_FieldCnt == 1) or (v_FieldCnt > 8)) { return false; }
for (i:=0; i<v_FieldCnt; i:=i+1) {
v_Field := v_FieldList[i];
v_FieldLength := lengthof(v_Field);
v_Pattern := "[0-9a-f]#(" & int2str(v_FieldLength) & ")";
if (v_FieldLength > 4) { return false; }
if (not match(v_Field, pattern v_Pattern)) { return false; }
}
return true;
}
function f_Convert_IPv4Addr2OctString(charstring p_IPv4AddrChar) return O4_Type
{
var Char1List_Type v_SplitCharList := {"."};
var CharStringList_Type v_FieldList := f_StringSplit(p_IPv4AddrChar, v_SplitCharList);
var octetstring v_IPv4AddrOct := ''O;
var integer v_FieldCnt := lengthof(v_FieldList);
var integer v_IntVal;
var integer i;
if (v_FieldCnt != 4) {
FatalError(__FILE__, __LINE__, "invalid IP Address");
}
for (i:=0; i<v_FieldCnt; i:=i+1) {
v_IntVal := str2int(v_FieldList[i]);
v_IPv4AddrOct := v_IPv4AddrOct & int2oct(v_IntVal, 1);
}
return v_IPv4AddrOct;
}
function f_Convert_IPv6Addr2OctString(charstring p_IPv6AddrChar) return O16_Type
{
var Char1List_Type v_SplitCharList := {":"};
var CharStringList_Type v_FieldList := f_StringSplit(p_IPv6AddrChar, v_SplitCharList);
var octetstring v_IPv6AddrOct := ''O;
var integer v_FieldCnt := lengthof(v_FieldList);
var boolean v_EmptyBlocksExpanded := false; /* set to true when "::" has been expanded => subsequent empty fields will just be replaced by '0000' */
var charstring v_Field;
var integer v_NoOfEmptyBlocks;
var integer i;
var integer k;
if (v_FieldCnt > 8) {
FatalError(__FILE__, __LINE__, "invalid IP Address");
}
for (i:=0; i<v_FieldCnt; i:=i+1) {
v_Field := v_FieldList[i];
select (lengthof(v_Field)) {
case (0) { // empty block
if (not v_EmptyBlocksExpanded) { /* e.g. for "2001:0ba0::" we have two empty blocks at the end of the address but only one of them shall be expanded; @sic R5s110645 change 5 sic@ */
v_EmptyBlocksExpanded := true;
v_NoOfEmptyBlocks := 8 - (v_FieldCnt - 1); /* "-1" because one empty block is already contained in v_FieldCnt */
for (k:=0; k < v_NoOfEmptyBlocks; k:=k+1) {
v_IPv6AddrOct := v_IPv6AddrOct & '0000'O;
}
} else { /* "::" has already been expanded */
v_IPv6AddrOct := v_IPv6AddrOct & '0000'O;
}
}
case (1) {
v_IPv6AddrOct := v_IPv6AddrOct & str2oct("000" & v_Field);
}
case (2) {
v_IPv6AddrOct := v_IPv6AddrOct & str2oct("00" & v_Field);
}
case (3) {
v_IPv6AddrOct := v_IPv6AddrOct & str2oct("0" & v_Field);
}
case (4) {
v_IPv6AddrOct := v_IPv6AddrOct & str2oct(v_Field);
}
case else {
FatalError(__FILE__, __LINE__, "invalid IP Address");
}
}
}
return v_IPv6AddrOct;
}
function f_Convert_OctString2IPv6Addr(O16_Type p_IPv6AddrOct) return charstring
{ /* @sic R5s110603 change 2 sic@ */
var charstring v_IPv6Addr := "";
var integer v_AddrLength := lengthof(p_IPv6AddrOct);
var integer i := 0;
while (i < v_AddrLength) {
v_IPv6Addr := v_IPv6Addr & oct2str(substr(p_IPv6AddrOct, i, 2));
i:=i+2;
if (i < v_AddrLength) {
v_IPv6Addr := v_IPv6Addr & ":";
}
}
return v_IPv6Addr;
}
function f_IpChecksum(octetstring p_OctetString) return O2_Type
{ /* calculate header checksum; within the given octetstring the header checksum shall be set to '0000'O */
var integer i;
var octetstring v_Word;
var integer v_DataLength := lengthof(p_OctetString);
var integer v_Sum := 0;
if (v_DataLength mod 2 != 0) {
p_OctetString := p_OctetString & '00'O;
}
// accumulate all words of the IP header
for (i:=0; i < v_DataLength; i := i+2) {
v_Word := p_OctetString[i] & p_OctetString[i+1];
v_Sum := v_Sum + oct2int(v_Word);
}
// deal with the
while (v_Sum > tsc_UInt16Max) {
v_Sum := (v_Sum mod (tsc_UInt16Max+1)) + (v_Sum / (tsc_UInt16Max+1));
}
// get complement
v_Sum := tsc_UInt16Max - v_Sum;
return int2oct(v_Sum, 2);
}
function f_IPv4Packet_Create(O2_Type p_Identification := '6d7d'O, // Identification; random value (can be used to generate different packets
O1_Type p_TOS := '00'O, // Differentiated services (RFC 2474), Explicit Congestion Notification (ECN, RFC 3168), former TOS (RFC 791)
UInt8_Type p_Protocol,
charstring p_SourceAddr,
charstring p_DestAddr,
octetstring p_IPPayload)
return octetstring
{
var integer v_TotalLength := lengthof(p_IPPayload) + 20; // 20 bytes IP header
var O4_Type v_SourceAddrStr := f_Convert_IPv4Addr2OctString(p_SourceAddr);
var O4_Type v_DestAddrStr := f_Convert_IPv4Addr2OctString(p_DestAddr);
var octetstring v_OctetString;
// IP header
v_OctetString := '45'O; // version and header length
v_OctetString := v_OctetString & p_TOS;
v_OctetString := v_OctetString & int2oct(v_TotalLength, 2);
v_OctetString := v_OctetString & p_Identification;
v_OctetString := v_OctetString & '0000'O; // flags (3 bits; typically 0 for UDP) and fragment offset (13 bits; typically 0 for UDP)
v_OctetString := v_OctetString & '80'O; // Time to live (random value)
v_OctetString := v_OctetString & int2oct(p_Protocol, 1);
v_OctetString := v_OctetString & f_IpChecksum(v_OctetString & '0000'O & v_SourceAddrStr & v_DestAddrStr);
v_OctetString := v_OctetString & v_SourceAddrStr;
v_OctetString := v_OctetString & v_DestAddrStr;
v_OctetString := v_OctetString & p_IPPayload;
return v_OctetString;
}
function f_IPv6Packet_Create(O1_Type p_TrafficClass := '00'O,
UInt20_Type p_FlowLabel := 0,
UInt8_Type p_Protocol,
charstring p_SourceAddr,
charstring p_DestAddr,
octetstring p_IPPayload)
return octetstring
{
var hexstring v_Version := '6'H;
var hexstring v_TrafficClass := oct2hex (p_TrafficClass);
var hexstring v_FlowLabel := int2hex (p_FlowLabel, 5);
var O16_Type v_SourceAddrStr := f_Convert_IPv6Addr2OctString(p_SourceAddr);
var O16_Type v_DestAddrStr := f_Convert_IPv6Addr2OctString(p_DestAddr);
var octetstring v_OctetString;
// IP header
v_OctetString := hex2oct(v_Version & v_TrafficClass & v_FlowLabel); // Version, Traffic Class and Flow Label to be revised
v_OctetString := v_OctetString & int2oct (lengthof(p_IPPayload), 2); // Payload Length
v_OctetString := v_OctetString & int2oct(p_Protocol, 1); // Next header
v_OctetString := v_OctetString & '40'O; // Hop Limit
v_OctetString := v_OctetString & v_SourceAddrStr;
v_OctetString := v_OctetString & v_DestAddrStr;
v_OctetString := v_OctetString & p_IPPayload;
return v_OctetString;
}
function f_IPv4UdpDatagram_Create(charstring p_SourceAddr,
charstring p_DestAddr,
UInt16_Type p_SourcePort,
UInt16_Type p_DestPort,
octetstring p_UdpPayload)
return octetstring
{ /* @desc create UDP datagram */
var integer v_UdpDatagramLength := lengthof(p_UdpPayload) + 8; // 8 bytes UDP header
// Pseudo Header:
var O4_Type v_SourceAddrStr := f_Convert_IPv4Addr2OctString(p_SourceAddr);
var O4_Type v_DestAddrStr := f_Convert_IPv4Addr2OctString(p_DestAddr);
var O2_Type v_LengthStr := int2oct(v_UdpDatagramLength, 2);
var O1_Type v_Protocol := '11'O; // UDP
var octetstring v_PseudoHeader := v_SourceAddrStr & v_DestAddrStr &'00'O & v_Protocol & v_LengthStr;
var O2_Type v_ChecksumDummy := '0000'O;
var octetstring v_OctetString := ''O;
v_OctetString := v_OctetString & int2oct(p_SourcePort, 2);
v_OctetString := v_OctetString & int2oct(p_DestPort, 2);
v_OctetString := v_OctetString & v_LengthStr;
v_OctetString := v_OctetString & f_IpChecksum(v_PseudoHeader & v_OctetString & v_ChecksumDummy & p_UdpPayload); /* Note: the UDP checksum can also be '0000'O what means "no chcksum"; but that is not the usual case */
v_OctetString := v_OctetString & p_UdpPayload;
return v_OctetString;
}
function f_IPv6UdpDatagram_Create(charstring p_SourceAddr,
charstring p_DestAddr,
UInt16_Type p_SourcePort,
UInt16_Type p_DestPort,
octetstring p_UdpPayload)
return octetstring
{
var integer v_UdpDatagramLength := lengthof(p_UdpPayload) + 8; // 8 bytes UDP header
var O16_Type v_SourceAddrStr := f_Convert_IPv6Addr2OctString(p_SourceAddr);
var O16_Type v_DestAddrStr := f_Convert_IPv6Addr2OctString(p_DestAddr);
var O4_Type v_LengthStr := int2oct(v_UdpDatagramLength, 4); // RFC 2460 clause 8.1
var octetstring v_PseudoHeader;
var octetstring v_OctetString;
// Prepare the pseudo header, see RFC 2460 and illustration in Wikipedia
v_PseudoHeader := v_SourceAddrStr & v_DestAddrStr & v_LengthStr;
v_PseudoHeader := v_PseudoHeader & v_LengthStr; // UDP length
v_PseudoHeader := v_PseudoHeader & '000000'O & '11'O; // Zeros and Next header (= Protocol)
v_PseudoHeader := v_PseudoHeader & int2oct(p_SourcePort, 2) & int2oct(p_DestPort, 2) & int2oct(v_UdpDatagramLength, 2) & '0000'O;
v_PseudoHeader := v_PseudoHeader & p_UdpPayload;
// Now set the UDP packet
v_OctetString := int2oct(p_SourcePort, 2);
v_OctetString := v_OctetString & int2oct(p_DestPort, 2);
v_OctetString := v_OctetString & int2oct(v_UdpDatagramLength, 2);
v_OctetString := v_OctetString & f_IpChecksum(v_PseudoHeader);
v_OctetString := v_OctetString & p_UdpPayload;
return v_OctetString;
}
function f_IPv4TcpDatagram_Create(charstring p_SourceAddr,
charstring p_DestAddr,
UInt16_Type p_SourcePort,
UInt16_Type p_DestPort,
octetstring p_TcpPayload)
return octetstring
{
var integer v_TcpDatagramLength := lengthof(p_TcpPayload) + 20; // 20 bytes TCP header
// Pseudo Header:
var O4_Type v_SourceAddrStr := f_Convert_IPv4Addr2OctString(p_SourceAddr);
var O4_Type v_DestAddrStr := f_Convert_IPv4Addr2OctString(p_DestAddr);
var O2_Type v_LengthStr := int2oct(v_TcpDatagramLength, 2);
var O1_Type v_Protocol := int2oct(tsc_IP_Protocol_TCP, 1);
var octetstring v_PseudoHeader := v_SourceAddrStr & v_DestAddrStr &'00'O & v_Protocol & v_LengthStr;
var O2_Type v_ChecksumDummy := '0000'O;
var octetstring v_UrgPointer := '0000'O;
var octetstring v_OctetString := ''O;
v_OctetString := v_OctetString & int2oct(p_SourcePort, 2);
v_OctetString := v_OctetString & int2oct(p_DestPort, 2);
v_OctetString := v_OctetString & int2oct(0, 4); // Sequence Number
v_OctetString := v_OctetString & int2oct(0, 4); // Acknowledgment Number
v_OctetString := v_OctetString & '5011'O; // 4bits HeaderLen/6bits Reserved/URG/ACK/PSH/RST/SYN/FIN
v_OctetString := v_OctetString & int2oct(256, 4); // How to set the windows size?
v_OctetString := v_OctetString & f_IpChecksum(v_PseudoHeader & v_OctetString & v_ChecksumDummy & v_UrgPointer & p_TcpPayload); /* Note: the TCP checksum can also be '0000'O what means "no chcksum"; but that is not the usual case */
v_OctetString := v_OctetString & v_UrgPointer;
v_OctetString := v_OctetString & p_TcpPayload;
return v_OctetString;
}
function f_IPv6TcpDatagram_Create(charstring p_SourceAddr,
charstring p_DestAddr,
UInt16_Type p_SourcePort,
UInt16_Type p_DestPort,
octetstring p_TcpPayload)
return octetstring
{ /* @sic R5s110645 change 4: IPv6 address instead of IPv4 sic@ */
var integer v_TcpDatagramLength := lengthof(p_TcpPayload) + 20; // 20 bytes TCP header
// Pseudo Header:
var O16_Type v_SourceAddrStr := f_Convert_IPv6Addr2OctString(p_SourceAddr);
var O16_Type v_DestAddrStr := f_Convert_IPv6Addr2OctString(p_DestAddr);
var O4_Type v_LengthStr := int2oct(v_TcpDatagramLength, 4); // 2460 clause 8.1
var O1_Type v_Protocol := int2oct(tsc_IP_Protocol_TCP, 1);
var octetstring v_PseudoHeader;
var O2_Type v_ChecksumDummy := '0000'O;
var octetstring v_UrgPointer := '0000'O;
var octetstring v_OctetString := ''O;
// Prepare the pseudo header, see RFC 2460 and illustration in Wikipedia
v_PseudoHeader := v_SourceAddrStr & v_DestAddrStr & v_LengthStr;
v_PseudoHeader := v_PseudoHeader & '000000'O & v_Protocol; // Zeros and Next header (= Protocol)
v_OctetString := v_OctetString & int2oct(p_SourcePort, 2);
v_OctetString := v_OctetString & int2oct(p_DestPort, 2);
v_OctetString := v_OctetString & int2oct(0, 4); // Sequence Number
v_OctetString := v_OctetString & int2oct(0, 4); // Acknowledgment Number
v_OctetString := v_OctetString & '5011'O; // 4bits HeaderLen/6bits Reserved/URG/ACK/PSH/RST/SYN/FIN
v_OctetString := v_OctetString & int2oct(256, 4); // How to set the windows size?
v_OctetString := v_OctetString & f_IpChecksum(v_PseudoHeader & v_OctetString & v_ChecksumDummy & v_UrgPointer & p_TcpPayload); /* Note: the TCP checksum can also be '0000'O what means "no chcksum"; but that is not the usual case */
v_OctetString := v_OctetString & v_UrgPointer;
v_OctetString := v_OctetString & p_TcpPayload;
return v_OctetString;
}
function fl_IcmpDatagram_Create(UInt8_Type p_IcmpType,
O2_Type p_SequenceNumber,
octetstring p_Data)
return octetstring
{ /* @desc create ICMP datagram */
var O2_Type v_ChecksumDummy := '0000'O;
var O2_Type v_Id := '0001'O;
var octetstring v_OctetString := ''O;
v_OctetString := v_OctetString & int2oct(p_IcmpType, 1); // Type
v_OctetString := v_OctetString & '00'O; // Code
v_OctetString := v_OctetString & f_IpChecksum(v_OctetString & v_ChecksumDummy & v_Id & p_Data);
v_OctetString := v_OctetString & v_Id;
v_OctetString := v_OctetString & p_SequenceNumber;
v_OctetString := v_OctetString & p_Data;
return v_OctetString;
}
function f_IcmpEchoReply(integer p_SequenceNumber) return octetstring
{
var O2_Type v_IcmpSequenceNumber := int2oct(p_SequenceNumber, 2);
var octetstring v_IcmpPayload := ''O;
var integer i;
for (i:=0; i<p_SequenceNumber; i:=i+1) {
v_IcmpPayload := v_IcmpPayload & tsc_IP_AnyData;
}
return fl_IcmpDatagram_Create(tsc_ICMP_Type_EchoReply, v_IcmpSequenceNumber, v_IcmpPayload);
}
function f_IPv4IPv6_IcmpEchoReply(charstring p_SourceAddr,
charstring p_DestAddr := "",
integer p_SequenceNumber := 1) return octetstring
{
var charstring v_DestAddr:= p_DestAddr;
var octetstring v_Payload := f_IcmpEchoReply(p_SequenceNumber);
var UInt8_Type v_Protocol := tsc_IP_Protocol_ICMP;
var octetstring v_IpPacket;
if (v_DestAddr == "") { v_DestAddr := p_SourceAddr; }
if (f_IpAddressIsIPv4(p_SourceAddr)) {
v_IpPacket := f_IPv4Packet_Create('10'O & int2oct(p_SequenceNumber, 1), -, v_Protocol, p_SourceAddr, p_DestAddr, v_Payload);
} else {
v_IpPacket := f_IPv6Packet_Create(-, -, v_Protocol, p_SourceAddr, v_DestAddr, v_Payload);
}
return v_IpPacket;
}
function f_IPv4IPv6_AnyUdpPacket(charstring p_SourceAddr,
charstring p_DestAddr,
UInt16_Type p_SourcePort,
UInt16_Type p_DestPort) return octetstring
{
var UInt8_Type v_Protocol := tsc_IP_Protocol_UDP;
var octetstring v_Payload := tsc_IP_AnyData;
var octetstring v_IpPacket;
if (f_IpAddressIsIPv4(p_SourceAddr)) {
v_IpPacket := f_IPv4Packet_Create(-, -, v_Protocol, p_SourceAddr, p_DestAddr, f_IPv4UdpDatagram_Create(p_SourceAddr, p_DestAddr, p_SourcePort, p_DestPort, v_Payload));
} else {
v_IpPacket := f_IPv6Packet_Create(-, -, v_Protocol, p_SourceAddr, p_DestAddr, f_IPv6UdpDatagram_Create(p_SourceAddr, p_DestAddr, p_SourcePort, p_DestPort, v_Payload));
}
return v_IpPacket;
}
}

View File

@ -0,0 +1,8 @@
[TESTPORT_PARAMETERS]
*.TUN.device_name := "foo"
*.TUN.debugging := "YES"
*.TUN2.device_name := "bar"
*.TUN2.debugging := "YES"
#[MODUlE_PARAMETERS]
#IPL4_demo.px_IPv4_Address1_UE = "127.0.0.1"

View File

@ -0,0 +1,58 @@
module IPL4_example {
import from TunDevice_PortType all;
import from TunDevice_Types all;
import from NetfilterConntrack_Functions all;
import from http_www_netfilter_org_xml_libnetfilter_conntrack all;
external function enc_Flow(in Flow pdu) return octetstring
with { extension "prototype (convert) encode(XER:XER_EXTENDED)" }
external function dec_Flow(in octetstring stream) return Flow
with { extension "prototype (convert) decode(XER:XER_EXTENDED)" }
external function enc_Flows(in Flows pdu) return octetstring
with { extension "prototype (convert) encode(XER:XER_EXTENDED)" }
external function dec_Flows(in octetstring stream) return Flows
with { extension "prototype (convert) decode(XER:XER_EXTENDED)" }
type component dummy_CT {
port TunDevice_PT TUN;
port TunDevice_PT TUN2;
}
testcase TC_xml() runs on dummy_CT {
var charstring xml;
xml := f_get_conntracks_xml()
log(xml)
log(dec_Flows(unichar2oct(xml)))
}
/*
var Result result;
result := IPL4asp_PortType.f_IPL4_listen(IPL4, "127.0.0.1", 2342, {udp := {}})
if (ispresent(result.errorCode)) {
setverdict(fail);
stop;
}
*/
testcase TC_dummy() runs on dummy_CT {
map(self:TUN, system:TUN);
map(self:TUN2, system:TUN);
var Tun_send s
s.msg := unichar2oct("foo")
TUN.send(s);
s.msg := unichar2oct("bar")
TUN2.send(s);
setverdict(pass);
}
control {
execute(TC_xml());
execute(TC_dummy());
}
}

723
testproject/Parameters.ttcn Normal file
View File

@ -0,0 +1,723 @@
/******************************************************************************/
// @copyright Copyright Notification
// No part may be reproduced except as authorized by written permission.
// The copyright and the foregoing restriction extend to reproduction in all media.
// Trademark 2012, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC).
// All rights reserved.
// @version: 36.523-3v10.1.0
/******************************************************************************/
/******************************************************************************/
// AUTOMATICLLY GENERATED MODUEL - DO NOT MODIFY
// $Date:
// $Author:
// $Rev:
/******************************************************************************/
module Parameters {
import from CommonDefs all;
//import from NAS_CommonTypeDefs all;
//****************************************************************************
// PIXIT Parameters
//----------------------------------------------------------------------------
modulepar octetstring px_AccessPointName; // @desc Access Point Name
modulepar EUTRA_ATTACH_TESTED_Type px_AttachTypeTested := EPS_ATTACH_ONLY; // @desc Attach Type to be tested, if UE supports both pc_Attach and pc_Combined_Attach
// Supported values: EPS_ATTACH_ONLY, COMBINED_ATTACH
modulepar B16_Type px_AuthAMF; // @desc Authentication Management Field (16 bits). The value shall be different from '1111 1111 1111 111'B (AMFresynch).
// Default value: no default value can be proposed
// Reference to other Spec: 34.123-3, Table B.1
modulepar B128_Type px_AuthK := oct2bit('000102030405060708090A0B0C0D0E0F'O);
// @desc Authentication Key
// Reference to other Spec: 34.123-3, Table B.1
modulepar O43_Type px_ETWS_DigitalSignature; // @desc ETWS Digital Signature
modulepar charstring px_EmergencyCallNumber := "112"; // @desc Emergency Number used by UE to initiate an emergency call
// Reference to other Spec: 34.123-3, Table B.1.2
// modulepar EmergencyLocalNumberList px_EmergencyLocalNumberList := {"301", "302", "303", "304", "305", "306", "307", "308", "309", "310"};
// @desc This list must not contain any emergency numbers already stored in the USIM or UE
modulepar hexstring px_IMEI_Def; // @desc Default IMEI value. No default can be proposed as this is a manufacturer defined value
// Reference to other Spec: 34.123-3, Table B.1
modulepar hexstring px_IMSI_Def := '001010123456063'H;
// @desc Default IMSI
// Reference to other Spec: 34.123-3, Table B.1
modulepar charstring px_IPv4_Address1_NW; // @desc IPv4 Gateway Address in PDN1
modulepar charstring px_IPv4_Address1_UE; // @desc IPv4 Address connected to PDN1
modulepar charstring px_IPv4_Address2_NW; // @desc IPv4 Gateway Address in PDN2
modulepar charstring px_IPv4_Address2_UE; // @desc IPv4 Address connected to PDN2
modulepar charstring px_IPv4_Address_HomeAgent; // @desc IPv4 Home Address Agent
modulepar charstring px_IPv6_Address1_NW; // @desc IPv6 Gateway Address in PDN1
modulepar charstring px_IPv6_Address1_UE; // @desc IPv6 Address in PDN1
modulepar charstring px_IPv6_Address2_NW; // @desc IPv6 Gateway Address in PDN2
modulepar charstring px_IPv6_Address2_UE; // @desc IPv6 Address in PDN2
modulepar charstring px_IPv6_Address_HomeAgent; // @desc IPv6 Home Address Agent
modulepar octetstring px_PTMSI_Def := 'C2345678'O; // @desc Default PTMSI
// Reference to other Spec: 34.123-3, Table B.1
modulepar octetstring px_PTMSI_SigDef := 'AB1234'O; // @desc Default PTMSI signature (3 octets, 3GPP 24.008 / 10.5.5.8).
// Reference to other Spec: 34.123-3, Table B.1
modulepar charstring px_PWS_CB_DataPage1; // @desc ETWS or CMAS Page 1 warning data message
modulepar charstring px_PWS_CB_DataPage2; // @desc ETWS or CMAS Page 2 warning data message
modulepar charstring px_PWS_CB_DataPage3; // @desc CMAS or ETWS Page 3 warning data message
modulepar charstring px_PWS_CB_DataPage4; // @desc CMAS or ETWS Page 4 warning data message
modulepar RATComb_Tested_Type px_RATComb_Tested := EUTRA_UTRA; // @desc This parameter represents the network RAT capability/preference and indicates which, if any is supported, RAT combination is to be tested
// Supported values: EUTRA_UTRA, EUTRA_GERAN, EUTRA_Only
modulepar boolean px_SMS_ChkMsgReceived := true; // @desc Whether the operator can check an MT Short Message received
modulepar integer px_SMS_IndexOffset := 0; // @desc Memory location index at UE for SMS storage, used in +CMSS command
// Reference to other Spec: 34.123-3, Table B.1.2
modulepar charstring px_SMS_MsgFrmt := "1"; // @desc UE which only supports PDU mode will be configured for text mode @sic R5s110750 sic@
modulepar charstring px_SMS_PrefMem1 := "SM"; // @desc SMS Preferred Memory 1 <mem1> of TS 27.005 [31], clause 3.2.2
// Reference to other Spec: 34.123-3, Table B.1.2
modulepar charstring px_SMS_PrefMem2 := "SM"; // @desc SMS Preferred Memory 2 <mem2> of TS 27.005 [31], clause 3.2.2
// Reference to other Spec: 34.123-3, Table B.1.2
modulepar charstring px_SMS_PrefMem3 := "MT"; // @desc SMS Preferred Memory 3 <mem3> of TS 27.005 [31], clause 3.2.2
// Reference to other Spec: 34.123-3, Table B.1.2
modulepar charstring px_SMS_Service := "0"; // @desc SMS Service <service> of TS 27.005 [31], clause 3.2.1
// Reference to other Spec: 34.123-3, Table B.1.2
modulepar SinglePLMN_TestedType px_SinglePLMN_Tested := MultiPLMN; // @desc This parameter represents the network capability/preference to support multi PLMNs on the same test Band and indicates the preference of multi PLMNs or single PLMN test environment
// Supported values: SinglePLMN, MultiPLMN, MultiPLMNinPrimaryBand, MultiPLMNinSecondaryBand
modulepar octetstring px_TMSI_Def := '12345678'O; // @desc Default TMSI
// Reference to other Spec: 34.123-3, Table B.1
/*
modulepar CS_PS_MODE px_UE_CS_PS_UsageSetting_Tested := VOICE_CENTRIC;
// @desc specifies which CS/PS mode is under test @sic R5s120274 sic@
// Supported values: VOICE_CENTRIC, DATA_CENTRIC
modulepar PS_MODE px_UE_PS_UsageSetting_Tested := VOICE_CENTRIC; // @desc specifies which PS mode is under test @sic R5s120274 sic@
// Supported values: VOICE_CENTRIC, DATA_CENTRIC
*/
modulepar UTRAN_FDD_TDD_Type px_UTRAN_ModeUnderTest := UTRAN_FDD; // @desc specifies which radio access technology is being tested in UTRAN
// Supported values: UTRAN_FDD, UTRAN_TDD
modulepar B128_Type px_eAuthRAND := oct2bit('A3DE0C6D363E30C364A4078F1BF8D577'O);
// @desc Random Challenge
//modulepar NAS_Mcc px_eJapanMCC_Band6 := '442'H; // @desc Japan MCC code to be used for Band 6. The same value will be used for E-UTRAN and Inter-RAT cells. Type is different to that defined in 34.123-3.
//****************************************************************************
// PICS Parameters
//----------------------------------------------------------------------------
modulepar boolean pc_1xCSfallback := false; // @desc Support of 1xCS fallback
// Reference: 36.523-2, A.4.2.1.1-1/3
modulepar boolean pc_1xRTT := false; // @desc UE supports CDMA2000 1xRTT band class
// Reference: 36.523-2, A.4.1-1/4
modulepar boolean pc_Allowed_CSG_list := false; // @desc Support of Allowed CSG list
// Reference: 36.523-2 A.4.4-1/2
modulepar boolean pc_Attach := false; // @desc Support EPS attach (with or without pre-configuration)
// Reference: 36.523-2 A.4.4-2/1
modulepar boolean pc_Auto_Attach_after_TAU_Reject := false; // @desc Support of automatic re-activation of the EPS bearer(s) after the TAU Reject
// Reference: 36.523-2 A.4.4-1/xx
modulepar boolean pc_Automatic_EPS_Re_Attach := false; // @desc Support of automatic re-activation of the EPS bearer(s)
// Reference: 36.523-2 A.4.4-1/xx
modulepar boolean pc_Automatic_Re_Attach := false; // @desc Support of automatic re-activation of the EPS bearer(s) during Network Initiated Detach with detach type set to re-attach required
// Reference: 36.523-2 A.4.4-1/27
modulepar boolean pc_CMAS_Message := false; // @desc Support of CMAS message
// Reference: 36.523-2 ??/58
modulepar boolean pc_CS := false; // @desc UE supports CS domain services
// Reference: 34.123-2 A.3/1
modulepar boolean pc_CS_Em_Call_in_1xRTT := false; // @desc Support for establishing the emergency call using the CS domain in 1xRTT
// Reference: 36.523-2 A.4.4-1/37
modulepar boolean pc_CS_Em_Call_in_GERAN := false; // @desc Support for establishing the emergency call using the CS domain in GERAN
// Reference: 36.523-2 A.4.4-1/36
modulepar boolean pc_CS_Em_Call_in_UTRA := false; // @desc Support for establishing the emergency call using the CS domain in UTRA
// Reference: 36.523-2 A.4.4-1/35
modulepar boolean pc_CS_Fallback := false; // @desc The UE supports CS fallback for voice calls. If true, pc_CS and at least one of pc_FDD, pc_TDD_HCR, pc_TDD_LCR, pc_TDD_VHCR or pc_UMTS_GSM is also true.
// Reference: 36.523-2, A.4.2.1.1-1/1
modulepar boolean pc_CS_PS_data_centric := false; // @desc Support of CS/PS mode 2
// Reference: 36.523-2 A.4.4-2/5
modulepar boolean pc_CS_PS_voice_centric := false; // @desc Support of configuring the UE to voice centric
// Reference: 36.523-2 A.4.4-2/4
modulepar boolean pc_Combined_Attach := false; // @desc Support combined EPS/IMSI attach (with or without pre-configuration)
// Reference: 36.523-2 A.4.4-2/2
modulepar boolean pc_DSMIPv6 := false; // @desc Support of Mobility management based on Dual-Stack Mobile IPv6
// Reference: 36.523-2 A.4.4-1/6
modulepar boolean pc_EDTM := false; // @desc Support for EDTM
// Reference: 36.523-2 A.4.4-1/38
modulepar boolean pc_EMM_Information := false; // @desc Support of EMM Information message
// Reference: 36.523-2 A.4.4-1/9
modulepar boolean pc_EPS_Disable := false; // @desc Support of disabling of EPS capability
// Reference: 36.523-2 A.4.4-1/26
modulepar boolean pc_ESM_MO_Bearer_Allocation := false; // @desc Support of ESM UE requested bearer resource allocation procedure
// Reference: 36.523-2 A.4.4-1/10
modulepar boolean pc_ESM_MO_Bearer_Modification := false; // @desc Support of ESM UE requested bearer resource modification procedure
// Reference: 36.523-2 A.4.4-1/11
modulepar boolean pc_ESM_UE_Modification_NW_TFT := false; // @desc Support for UE requested modification of network allocated TFTs
// Reference: 36.523-2 A.4.4-1/zz
modulepar boolean pc_ETWS_message := false; // @desc Support of ETWS message
// Reference: 36.523-2 A.4.4-1/20
modulepar boolean pc_ETWS_message_security := false; // @desc Support of ETWS message with security
// Reference: 36.523-2 A.4.4-1/24
modulepar boolean pc_E_UTRAN_2_GERAN_PSHO := false; // @desc Support for inter-RAT PS handover from E_UTRAN to GERAN
// Reference: 36.523-2 A.4.4-1/xx
modulepar boolean pc_Enhanced_1xCSfallback := false; // @desc Support of Enhanced 1xCS fallback
// Reference: 36.523-2, A.4.2.1.1-1/x
modulepar boolean pc_FDD := true; // @desc UE supports UTRA band as defined in TS 25.101
// Reference: 34.123-2 A.1/1
modulepar boolean pc_FeatrGrp_1 := false; // @desc ########################################################################################################################################
// Reference: 36.523-2 A.4.5-1/1
modulepar boolean pc_FeatrGrp_10 := false; // @desc Support of EUTRA RRC_CONNECTED to GERAN (Packet_)Idle by Cell Change Order, EUTRA RRC_CONNECTED to GERAN (Packet_)Idle by Cell Change Order with NACC (Network Assisted Cell Change)
// Reference: 36.523-2 A.4.5-1/10
modulepar boolean pc_FeatrGrp_10_F := false; // @desc Support of EUTRA RRC_CONNECTED to GERAN (Packet_)Idle by Cell Change Order, EUTRA RRC_CONNECTED to GERAN (Packet_)Idle by Cell Change Order with NACC (Network Assisted Cell Change)
// Reference: 36.523-2 A.4.5-1a/10
modulepar boolean pc_FeatrGrp_10_T := false; // @desc Support of EUTRA RRC_CONNECTED to GERAN (Packet_)Idle by Cell Change Order, EUTRA RRC_CONNECTED to GERAN (Packet_)Idle by Cell Change Order with NACC (Network Assisted Cell Change)
// Reference: 36.523-2 A.4.5-1b/10
modulepar boolean pc_FeatrGrp_11 := false; // @desc Support of EUTRA RRC_CONNECTED to 1xRTT CS Active handover
// Reference: 36.523-2 A.4.5-1/11
modulepar boolean pc_FeatrGrp_11_F := false; // @desc Support of EUTRA RRC_CONNECTED to 1xRTT CS Active handover
// Reference: 36.523-2 A.4.5-1a/11
modulepar boolean pc_FeatrGrp_11_T := false; // @desc Support of EUTRA RRC_CONNECTED to 1xRTT CS Active handover
// Reference: 36.523-2 A.4.5-1b/11
modulepar boolean pc_FeatrGrp_12 := false; // @desc Support of EUTRA RRC_CONNECTED to HRPD Active handover
// Reference: 36.523-2 A.4.5-1/12
modulepar boolean pc_FeatrGrp_12_F := false; // @desc Support of EUTRA RRC_CONNECTED to HRPD Active handover
// Reference: 36.523-2 A.4.5-1a/12
modulepar boolean pc_FeatrGrp_12_T := false; // @desc Support of EUTRA RRC_CONNECTED to HRPD Active handover
// Reference: 36.523-2 A.4.5-1b/12
modulepar boolean pc_FeatrGrp_13 := false; // @desc Support of Inter-frequency handover (within FDD or TDD)
// Reference: 36.523-2 A.4.5-1/13
modulepar boolean pc_FeatrGrp_13_F := false; // @desc Support of Inter-frequency handover (within FDD or TDD)
// Reference: 36.523-2 A.4.5-1a/13
modulepar boolean pc_FeatrGrp_13_T := false; // @desc Support of Inter-frequency handover (within FDD or TDD)
// Reference: 36.523-2 A.4.5-1b/13
modulepar boolean pc_FeatrGrp_14 := false; // @desc Support of Measurement reporting event: Event A4 - Neighbour > threshold, Measurement reporting event: Event A5 - Serving < threshold1 & Neighbour > threshold2
// Reference: 36.523-2 A.4.5-1/14
modulepar boolean pc_FeatrGrp_14_F := false; // @desc Support of Measurement reporting event: Event A4 - Neighbour > threshold, Measurement reporting event: Event A5 - Serving < threshold1 & Neighbour > threshold2
// Reference: 36.523-2 A.4.5-1a/14
modulepar boolean pc_FeatrGrp_14_T := false; // @desc Support of Measurement reporting event: Event A4 - Neighbour > threshold, Measurement reporting event: Event A5 - Serving < threshold1 & Neighbour > threshold2
// Reference: 36.523-2 A.4.5-1b/14
modulepar boolean pc_FeatrGrp_15 := false; // @desc Support of Measurement reporting event: Event B1 - Neighbour > threshold
// Reference: 36.523-2 A.4.5-1/15
modulepar boolean pc_FeatrGrp_15_F := false; // @desc Support of Measurement reporting event: Event B1 - Neighbour > threshold
// Reference: 36.523-2 A.4.5-1a/15
modulepar boolean pc_FeatrGrp_15_T := false; // @desc Support of Measurement reporting event: Event B1 - Neighbour > threshold
// Reference: 36.523-2 A.4.5-1b/15
modulepar boolean pc_FeatrGrp_16 := false; // @desc Support of Periodical measurement reporting for non-ANR related measurements
// Reference: 36.523-2 A.4.5-1/16
modulepar boolean pc_FeatrGrp_16_F := false; // @desc Support of Periodical measurement reporting for non-ANR related measurements
// Reference: 36.523-2 A.4.5-1a/16
modulepar boolean pc_FeatrGrp_16_T := false; // @desc Support of Periodical measurement reporting for non-ANR related measurements
// Reference: 36.523-2 A.4.5-1b/16
modulepar boolean pc_FeatrGrp_17 := false; // @desc Support of Periodical measurement reporting for SON / ANR and ANR related intra-frequency measurement reporting events
// Reference: 36.523-2 A.4.5-1/17
modulepar boolean pc_FeatrGrp_17_F := false; // @desc Support of Periodical measurement reporting for SON / ANR and ANR related intra-frequency measurement reporting events
// Reference: 36.523-2 A.4.5-1a/17
modulepar boolean pc_FeatrGrp_17_T := false; // @desc Support of Periodical measurement reporting for SON / ANR and ANR related intra-frequency measurement reporting events
// Reference: 36.523-2 A.4.5-1b/17
modulepar boolean pc_FeatrGrp_18 := false; // @desc Support of ANR related inter-frequency measurement reporting events
// Reference: 36.523-2 A.4.5-1/18
modulepar boolean pc_FeatrGrp_18_F := false; // @desc Support of ANR related inter-frequency measurement reporting events
// Reference: 36.523-2 A.4.5-1a/18
modulepar boolean pc_FeatrGrp_18_T := false; // @desc Support of ANR related inter-frequency measurement reporting events
// Reference: 36.523-2 A.4.5-1b/18
modulepar boolean pc_FeatrGrp_19 := false; // @desc Support of ANR related inter-RAT measurement reporting events
// Reference: 36.523-2 A.4.5-1/19
modulepar boolean pc_FeatrGrp_19_F := false; // @desc Support of ANR related inter-RAT measurement reporting events
// Reference: 36.523-2 A.4.5-1a/19
modulepar boolean pc_FeatrGrp_19_T := false; // @desc Support of ANR related inter-RAT measurement reporting events
// Reference: 36.523-2 A.4.5-1b/19
modulepar boolean pc_FeatrGrp_1_F := false; // @desc ########################################################################################################################################
// Reference: 36.523-2 A.4.5-1a/1
modulepar boolean pc_FeatrGrp_1_T := false; // @desc ########################################################################################################################################
// Reference: 36.523-2 A.4.5-1b/1
modulepar boolean pc_FeatrGrp_2 := false; // @desc ########################################################################################################################################
// Reference: 36.523-2 A.4.5-1/2
modulepar boolean pc_FeatrGrp_20 := false; // @desc Support of RB combination: SRB1 and SRB2 for DCCH + x AM DRB + x UM DRB
// Reference: 36.523-2 A.4.5-1/20
modulepar boolean pc_FeatrGrp_20_F := false; // @desc Support of RB combination: SRB1 and SRB2 for DCCH + x AM DRB + x UM DRB
// Reference: 36.523-2 A.4.5-1a/20
modulepar boolean pc_FeatrGrp_20_T := false; // @desc Support of RB combination: SRB1 and SRB2 for DCCH + x AM DRB + x UM DRB
// Reference: 36.523-2 A.4.5-1b/20
modulepar boolean pc_FeatrGrp_21 := false; // @desc Support of Predefined intra-subframe frequency hopping for PUSCH with N_sb > 1, Predefined inter-subframe frequency hopping for PUSCH with N_sb > 1
// Reference: 36.523-2 A.4.5-1/21
modulepar boolean pc_FeatrGrp_21_F := false; // @desc Support of Predefined intra-subframe frequency hopping for PUSCH with N_sb > 1, Predefined inter-subframe frequency hopping for PUSCH with N_sb > 1
// Reference: 36.523-2 A.4.5-1a/21
modulepar boolean pc_FeatrGrp_21_T := false; // @desc Support of Predefined intra-subframe frequency hopping for PUSCH with N_sb > 1, Predefined inter-subframe frequency hopping for PUSCH with N_sb > 1
// Reference: 36.523-2 A.4.5-1b/21
modulepar boolean pc_FeatrGrp_22 := false; // @desc Support of UTRAN measurements and reporting in E-UTRA connected mode
// Reference: 36.523-2 A.4.5-1/22
modulepar boolean pc_FeatrGrp_22_F := false; // @desc Support of UTRAN measurements and reporting in E-UTRA connected mode
// Reference: 36.523-2 A.4.5-1a/22
modulepar boolean pc_FeatrGrp_22_T := false; // @desc Support of UTRAN measurements and reporting in E-UTRA connected mode
// Reference: 36.523-2 A.4.5-1b/22
modulepar boolean pc_FeatrGrp_23 := false; // @desc Support of GERAN measurements and reporting in E-UTRA connected mode
// Reference: 36.523-2 A.4.5-1/23
modulepar boolean pc_FeatrGrp_23_F := false; // @desc Support of GERAN measurements and reporting in E-UTRA connected mode
// Reference: 36.523-2 A.4.5-1a/23
modulepar boolean pc_FeatrGrp_23_T := false; // @desc Support of GERAN measurements and reporting in E-UTRA connected mode
// Reference: 36.523-2 A.4.5-1b/23
modulepar boolean pc_FeatrGrp_24 := false; // @desc Support of cdma2000 measurements and reporting in E-UTRA connected mode
// Reference: 36.523-2 A.4.5-1/24
modulepar boolean pc_FeatrGrp_24_F := false; // @desc Support of cdma2000 measurements and reporting in E-UTRA connected mode
// Reference: 36.523-2 A.4.5-1a/24
modulepar boolean pc_FeatrGrp_24_T := false; // @desc Support of cdma2000 measurements and reporting in E-UTRA connected mode
// Reference: 36.523-2 A.4.5-1b/24
modulepar boolean pc_FeatrGrp_25 := false; // @desc Support of Inter-frequency measurements and reporting in E-UTRA connected mode
// Reference: 36.523-2 A.4.5-1/25
modulepar boolean pc_FeatrGrp_25_F := false; // @desc Support of Inter-frequency measurements and reporting in E-UTRA connected mode
// Reference: 36.523-2 A.4.5-1a/25
modulepar boolean pc_FeatrGrp_25_T := false; // @desc Support of Inter-frequency measurements and reporting in E-UTRA connected mode
// Reference: 36.523-2 A.4.5-1b/25
modulepar boolean pc_FeatrGrp_26 := false; // @desc Support of HRPD measurements, reporting and measurement reporting event B2 in E-UTRA connected mode
// Reference: 36.523-2 A.4.5-1/26
modulepar boolean pc_FeatrGrp_26_F := false; // @desc Support of HRPD measurements, reporting and measurement reporting event B2 in E-UTRA connected mode
// Reference: 36.523-2 A.4.5-1a/26
modulepar boolean pc_FeatrGrp_26_T := false; // @desc Support of HRPD measurements, reporting and measurement reporting event B2 in E-UTRA connected mode
// Reference: 36.523-2 A.4.5-1b/26
modulepar boolean pc_FeatrGrp_27 := false; // @desc Support of EUTRA RRC_CONNECTED to UTRA CELL_DCH CS handover
// Reference: 36.523-2 A.4.5-1/27
modulepar boolean pc_FeatrGrp_27_F := false; // @desc Support of EUTRA RRC_CONNECTED to UTRA CELL_DCH CS handover
// Reference: 36.523-2 A.4.5-1a/27
modulepar boolean pc_FeatrGrp_27_T := false; // @desc Support of EUTRA RRC_CONNECTED to UTRA CELL_DCH CS handover
// Reference: 36.523-2 A.4.5-1b/27
modulepar boolean pc_FeatrGrp_28 := false; // @desc Support of TTI bundling
// Reference: 36.523-2 A.4.5-1/28
modulepar boolean pc_FeatrGrp_28_F := false; // @desc Support of TTI bundling
// Reference: 36.523-2 A.4.5-1a/28
modulepar boolean pc_FeatrGrp_28_T := false; // @desc Support of TTI bundling
// Reference: 36.523-2 A.4.5-1b/28
modulepar boolean pc_FeatrGrp_29 := false; // @desc Support of Semi-Persistent Scheduling
// Reference: 36.523-2 A.4.5-1/29
modulepar boolean pc_FeatrGrp_29_F := false; // @desc Support of Semi-Persistent Scheduling
// Reference: 36.523-2 A.4.5-1a/29
modulepar boolean pc_FeatrGrp_29_T := false; // @desc Support of Semi-Persistent Scheduling
// Reference: 36.523-2 A.4.5-1b/29
modulepar boolean pc_FeatrGrp_2_F := false; // @desc ########################################################################################################################################
// Reference: 36.523-2 A.4.5-1a/2
modulepar boolean pc_FeatrGrp_2_T := false; // @desc ########################################################################################################################################
// Reference: 36.523-2 A.4.5-1b/2
modulepar boolean pc_FeatrGrp_3 := false; // @desc Support of Semi-persistent scheduling, TTI bundling, 5bit RLC UM SN, 7bit PDCP SN
// Reference: 36.523-2 A.4.5-1/3
modulepar boolean pc_FeatrGrp_30 := false; // @desc Support of Handover between FDD and TDD
// Reference: 36.523-2 A.4.5-1/30
modulepar boolean pc_FeatrGrp_30_F := false; // @desc Support of Handover between FDD and TDD
// Reference: 36.523-2 A.4.5-1a/30
modulepar boolean pc_FeatrGrp_30_T := false; // @desc Support of Handover between FDD and TDD
// Reference: 36.523-2 A.4.5-1b/30
modulepar boolean pc_FeatrGrp_33 := false; // @desc ########################################################################################################################################
// Reference: 36.523-2 A.4.5-1d/1
modulepar boolean pc_FeatrGrp_33_F := false; // @desc ########################################################################################################################################
// Reference: 36.523-2 A.4.5-1d/1
modulepar boolean pc_FeatrGrp_33_T := false; // @desc ########################################################################################################################################
// Reference: 36.523-2 A.4.5-1e/1
modulepar boolean pc_FeatrGrp_34 := false; // @desc ########################################################################################################################################
// Reference: 36.523-2 A.4.5-1d/2
modulepar boolean pc_FeatrGrp_34_F := false; // @desc ########################################################################################################################################
// Reference: 36.523-2 A.4.5-1d/2
modulepar boolean pc_FeatrGrp_34_T := false; // @desc ########################################################################################################################################
// Reference: 36.523-2 A.4.5-1e/2
modulepar boolean pc_FeatrGrp_35 := false; // @desc ########################################################################################################################################
// Reference: 36.523-2 A.4.5-1d/3
modulepar boolean pc_FeatrGrp_35_F := false; // @desc ########################################################################################################################################
// Reference: 36.523-2 A.4.5-1d/3
modulepar boolean pc_FeatrGrp_35_T := false; // @desc ########################################################################################################################################
// Reference: 36.523-2 A.4.5-1e/3
modulepar boolean pc_FeatrGrp_36 := false; // @desc ########################################################################################################################################
// Reference: 36.523-2 A.4.5-1d/4
modulepar boolean pc_FeatrGrp_36_F := false; // @desc ########################################################################################################################################
// Reference: 36.523-2 A.4.5-1d/4
modulepar boolean pc_FeatrGrp_36_T := false; // @desc ########################################################################################################################################
// Reference: 36.523-2 A.4.5-1e/4
modulepar boolean pc_FeatrGrp_3_F := false; // @desc Support of Semi-persistent scheduling, TTI bundling, 5bit RLC UM SN, 7bit PDCP SN
// Reference: 36.523-2 A.4.5-1a/3
modulepar boolean pc_FeatrGrp_3_T := false; // @desc Support of Semi-persistent scheduling, TTI bundling, 5bit RLC UM SN, 7bit PDCP SN
// Reference: 36.523-2 A.4.5-1b/3
modulepar boolean pc_FeatrGrp_4 := false; // @desc Support of Short DRX cycle
// Reference: 36.523-2 A.4.5-1/4
modulepar boolean pc_FeatrGrp_4_F := false; // @desc Support of Short DRX cycle
// Reference: 36.523-2 A.4.5-1a/4
modulepar boolean pc_FeatrGrp_4_T := false; // @desc Support of Short DRX cycle
// Reference: 36.523-2 A.4.5-1b/4
modulepar boolean pc_FeatrGrp_5 := false; // @desc Support of Long DRX cycle, DRX command MAC control element
// Reference: 36.523-2 A.4.5-1/5
modulepar boolean pc_FeatrGrp_5_F := false; // @desc Support of Long DRX cycle, DRX command MAC control element
// Reference: 36.523-2 A.4.5-1a/5
modulepar boolean pc_FeatrGrp_5_T := false; // @desc Support of Long DRX cycle, DRX command MAC control element
// Reference: 36.523-2 A.4.5-1b/5
modulepar boolean pc_FeatrGrp_6 := false; // @desc Support of Piroritized bit rate
// Reference: 36.523-2 A.4.5-1/6
modulepar boolean pc_FeatrGrp_6_F := false; // @desc Support of Piroritized bit rate
// Reference: 36.523-2 A.4.5-1a/6
modulepar boolean pc_FeatrGrp_6_T := false; // @desc Support of Piroritized bit rate
// Reference: 36.523-2 A.4.5-1b/6
modulepar boolean pc_FeatrGrp_7 := false; // @desc Support of RLC UM
// Reference: 36.523-2 A.4.5-1/7
modulepar boolean pc_FeatrGrp_7_F := false; // @desc Support of RLC UM
// Reference: 36.523-2 A.4.5-1a/7
modulepar boolean pc_FeatrGrp_7_T := false; // @desc Support of RLC UM
// Reference: 36.523-2 A.4.5-1b/7
modulepar boolean pc_FeatrGrp_8 := false; // @desc Support of EUTRA RRC_CONNECTED to UTRA CELL_DCH PS handover
// Reference: 36.523-2 A.4.5-1/8
modulepar boolean pc_FeatrGrp_8_F := false; // @desc Support of EUTRA RRC_CONNECTED to UTRA CELL_DCH PS handover
// Reference: 36.523-2 A.4.5-1a/8
modulepar boolean pc_FeatrGrp_8_T := false; // @desc Support of EUTRA RRC_CONNECTED to UTRA CELL_DCH PS handover
// Reference: 36.523-2 A.4.5-1b/8
modulepar boolean pc_FeatrGrp_9 := false; // @desc Support of EUTRA RRC_CONNECTED to GERAN GSM_Dedicated handover
// Reference: 36.523-2 A.4.5-1/9
modulepar boolean pc_FeatrGrp_9_F := false; // @desc Support of EUTRA RRC_CONNECTED to GERAN GSM_Dedicated handover
// Reference: 36.523-2 A.4.5-1a/9
modulepar boolean pc_FeatrGrp_9_T := false; // @desc Support of EUTRA RRC_CONNECTED to GERAN GSM_Dedicated handover
// Reference: 36.523-2 A.4.5-1b/9
modulepar boolean pc_FullNameNetwork := false; // @desc Support of storage of the network full name
// Reference: 36.523-2 A.4.4-1/12
modulepar boolean pc_GERAN := false; // @desc UE Supports GSM and/or GPRS
// Reference: 36.523-2 A.4.1-1/6
modulepar boolean pc_GERAN_2_E_UTRAN_PSHO := false; // @desc Support of GERAN to E-UTRAN PS Handover
// Reference: 36.523-2 A.4.4-1/29
modulepar boolean pc_GERAN_2_E_UTRAN_meas
:= false; // @desc Supports Neighbour Cell measurements and Network controlled & autonomous cell reselection to E-UTRAN
// Reference: 36.523-2 A.4.4-1/21
modulepar boolean pc_GERAN_2_E_UTRAN_measreporting_CCN := false; // @desc Supports CCN towards E-UTRAN, E-UTRAN Neighbour cell measurement reporting and Network controlled cell reselection to E-UTRAN
// Reference: 36.523-2 A.4.4-1/39
modulepar boolean pc_HO_from_UTRA_to_eFDD := false; // @desc Support of Inter-RAT PS handover to E-UTRA from UTRA (FDD)
// Reference: 36.523-2 A.4.4-1/8
modulepar boolean pc_HO_from_UTRA_to_eTDD := false; // @desc Support of Inter-RAT PS handover to E-UTRA from UTRA (TDD)
// Reference: 36.523-2 A.4.4-1/aa
modulepar boolean pc_HRPD := false; // @desc UE supports CDMA2000 HRPD band class
// Reference: 36.523-2, A.4.1-1/3
modulepar boolean pc_IMS := false; // @desc Support of IMS
// Reference: 36.523-2 A.4.4-1/25
modulepar boolean pc_IMSI_Detach := false; // @desc Support of detach for non-EPS services
// Reference: 36.523-2 A.4.4-1/34
modulepar boolean pc_IMS_emergency_call := false; // @desc Support of MS emergency call
// Reference: 36.523-2, A.4.2.1.1-1/4
modulepar boolean pc_IPv4 := true; // @desc UE supports IPv4 (used IMS PICS as currently not defined in LTE)
// Reference: 34.229-2 A.7/1
modulepar boolean pc_IPv6 := false; // @desc UE supports IPv6 (used IMS PICS as currently not defined in LTE)
// Reference: 34.229-2 A.7/2
modulepar boolean pc_ISR := false; // @desc Support of ISR
// Reference: 36.523-2 A.4.4-1/5
modulepar boolean pc_ImmConnect := false; // @desc Immediate connection supported for all circuit switched basic services
// Reference: 34.123 A.4.4/6
modulepar boolean pc_LocalTimeZone := false; // @desc Support of storage of the local time zone
// Reference: 36.523-2 A.4.4-1/14
modulepar boolean pc_Manual_CSG_Selection := false; // @desc Support of Manual CSG selection
// Reference: 36.523-2 A.4.4-1/49
modulepar boolean pc_Multiple_PDN := false; // @desc Support for multiple PDN connections
// Reference: 36.523-2 A.4.4-1/29
modulepar boolean pc_PS := true; // @desc Packet Switched
// Reference: 34.123-2 A.3/2
modulepar boolean pc_PS_data_centric := false; // @desc Support of configuring the UE to PS data centric
// Reference: 36.523-2 A.4.4-2/8
modulepar boolean pc_PS_voice_centric := false; // @desc Support of configuring the UE to PS voice centric
// Reference: 36.523-2 A.4.4-2/7
modulepar boolean pc_PWS_UpperLayer := false; // @desc Presence of PWS upper layer for functions like duplicate definition
// Reference: 36.523-2 A.4.4-1/6x
modulepar boolean pc_ROHC_profile0x0001 := false; // @desc Support for ROHC profile0x0001
// Reference: 36.523-2 A.4.4-1/aa
modulepar boolean pc_ROHC_profile0x0002 := false; // @desc Support for ROHC profile0x0002
// Reference: 36.523-2 A.4.4-1/bb
modulepar boolean pc_ROHC_profile0x0003 := false; // @desc Support for ROHC profile0x0003
// Reference: 36.523-2 A.4.4-1/cc
modulepar boolean pc_ROHC_profile0x0004 := false; // @desc Support for ROHC profile0x0004
// Reference: 36.523-2 A.4.4-1/dd
modulepar boolean pc_ROHC_profile0x0006 := false; // @desc Support for ROHC profile0x0006
// Reference: 36.523-2 A.4.4-1/ee
modulepar boolean pc_ROHC_profile0x0101 := false; // @desc Support for ROHC profile0x0101
// Reference: 36.523-2 A.4.4-1/ff
modulepar boolean pc_ROHC_profile0x0102 := false; // @desc Support for ROHC profile0x0102
// Reference: 36.523-2 A.4.4-1/gg
modulepar boolean pc_ROHC_profile0x0103 := false; // @desc Support for ROHC profile0x0103
// Reference: 36.523-2 A.4.4-1/hh
modulepar boolean pc_ROHC_profile0x0104 := false; // @desc Support for ROHC profile0x0104
// Reference: 36.523-2 A.4.4-1/ii
modulepar boolean pc_Re_Attach_AfterDetachColl := false; // @desc Support of automatic re-activation of the EPS bearers during network initiated detach, even though UE has initiated a detach procedure with detach type set to EPS detach or combined EPS/IMSI detach
// Reference: 36.523-2 A.4.4-1/55
modulepar boolean pc_RequestIPv4HAAddress_DuringAttach := false; // @desc Support for being configured to request the IPv4 address of the Home Agent during Attach procedure
// Reference: 36.523-2 A.4.4-1/23
modulepar boolean pc_RequestIPv6HAAddress_DuringAttach := false; // @desc Support for being configured to request the IPv6 address of the Home Agent during Attach procedure
// Reference: 36.523-2 A.4.4-1/22
modulepar boolean pc_SMS_SGs := false; // @desc The UE supports SMS over SGs and is configured for SMS over SGs. If true, at least one of pc_SMS_SGs_MT and pc_SMS_SGs_MO is true.
//
// Reference: 36.523-2, A.4.2.1.1-1/2
modulepar boolean pc_SMS_SGs_MO := false; // @desc Support of Short Message Service (SMS) MO over SGs
// Reference: 36.523-2 A.4.4-1/4
modulepar boolean pc_SMS_SGs_MT := false; // @desc Support of Short Message Service (SMS) MT over SGs
// Reference: 36.523-2 A.4.4-1/3
modulepar boolean pc_SRVCC_GERAN_UTRAN := false; // @desc Support for SRVCC from E-UTRAN to GERAN/UTRAN
// Reference: 36.523-2 A.4.4-1/32
modulepar boolean pc_Semi_Persistence_Scheduling := false; // @desc Support of semi persistance scheduling
// Reference: 36.523-2 A.4.4-1/50
modulepar boolean pc_ShortNameNetwork := false; // @desc Support of storage of the network short name
// Reference: 36.523-2 A.4.4-1/13
modulepar boolean pc_Speech := false; // @desc UE supports Speech
// Reference: 34.123-2 A.2/1
modulepar boolean pc_Squal_based_CellReselection_to_E_UTRAN_from_UTRAN := false;
// @desc Support of Squal based cell reselection to E-UTRAN from UTRAN
// Reference: 36.523-2 A.4.4-1/yy
modulepar boolean pc_Squal_based_CellReselection_to_UTRAN_from_E_UTRAN := false;
// @desc Support of Squal based cell reselection to UTRAN from E-UTRAN
// Reference: 36.523-2 A.4.4-1/zz
modulepar boolean pc_SupportOpModeA := false; // @desc UE supports Operation Mode A
// Reference: 34.123-2 A.3/3
modulepar boolean pc_SwitchOnOff := true; // @desc switch on/off supported
// Reference: 36.523-2, A4.4-1/10
modulepar boolean pc_TDD_HCR := false; // @desc UE supports UTRA band as defined in TS 25.102
// Reference: 34.123-2 A.1/2
modulepar boolean pc_TDD_LCR := false; // @desc UE supports UTRA band as defined in TS 25.102
// Reference: 34.123-2 A.1/3
modulepar boolean pc_TDD_VHCR := false; // @desc UE supports UTRA band as defined in TS 25.102
// Reference: 34.123-2 A.1/8
modulepar boolean pc_TTI_Bundling := false; // @desc Support of TTI Bundling
// Reference: 36.523-2 A.4.4-1/51
modulepar boolean pc_UMI_ProcNeeded_DuringCSFB := false; // @desc Requiring UMI proceeding to paging response
// Reference: 36.523-2 A.4.4-2/6
modulepar boolean pc_USIM_Removal := false; // @desc USIM removable without power down supported
// Reference: 36.523-2, A4.4-1/1
modulepar boolean pc_UTRA := false; // @desc UE supports UTRA
// Reference: 36.523-2 A.4.1-1/5
modulepar boolean pc_UTRA_FeatrGrp_1 := false; // @desc Support of UTRA CELL_PCH and URA_PCH to RRC_IDLE cell reselection
// Reference: 36.523-2 A.4.5-2/1
modulepar boolean pc_UTRA_FeatrGrp_2 := false; // @desc Support of EUTRAN measurements and reporting in connected mode
// Reference: 36.523-2 A.4.5-2/2
modulepar boolean pc_UniversalAndLocalTimeZone := false; // @desc Support of storage of the universal time and local time zone
// Reference: 36.523-2 A.4.4-1/15
modulepar boolean pc_VoLTE := false; // @desc Support of VoLTE in GSMA PRD IR.92: "IMS profile for Voice and SMS"
// Reference: 36.523-2 A.4.4-1/yy
modulepar boolean pc_eFDD := false; // @desc UE supports EUTRA FDD
// Reference: 36.523-2 A.4.1-1/1
modulepar boolean pc_eRedirectionUTRA := false; // @desc Support of use of the UTRA system information provided by RRCConnectionRelease upon redirection
// Reference: 36.523-2 A.4.4-1/31
modulepar boolean pc_eTDD := false; // @desc UE supports EUTRA TDD
// Reference: 36.523-2 A.4.1-1/2
modulepar boolean pc_ue_Category_1 := false; // @desc UE Category 1
// Reference: 36.523-2 A.4.3.2-1/1
modulepar boolean pc_ue_Category_2 := false; // @desc UE Category 2
// Reference: 36.523-2 A.4.3.2-1/2
modulepar boolean pc_ue_Category_3 := false; // @desc UE Category 3
// Reference: 36.523-2 A.4.3.2-1/3
modulepar boolean pc_ue_Category_4 := false; // @desc UE Category 4
// Reference: 36.523-2 A.4.3.2-1/4
modulepar boolean pc_ue_Category_5 := false; // @desc UE Category 5
// Reference: 36.523-2 A.4.3.2-1/5
}