diff --git a/ccsrc/Externals/LIB_NG_NAS_Functions_ext.cc b/ccsrc/Externals/LIB_NG_NAS_Functions_ext.cc index 3d6c46a6b9a7f1ae3cf1002cd9058d9f42083975..61e06ec54f29b77fd39fb328a1aa6502537cc229 100644 --- a/ccsrc/Externals/LIB_NG_NAS_Functions_ext.cc +++ b/ccsrc/Externals/LIB_NG_NAS_Functions_ext.cc @@ -16,8 +16,8 @@ namespace LIB__NG__NAS__Functions { } INTEGER fx__f1(const BITSTRING& p_authK, const BITSTRING& p_rand, const BITSTRING& p_sqn, const BITSTRING& p_amf, BITSTRING& p_mac_a) { - loggers::get_instance().log_msg(">>> fx__f1: p_authK: ", p_authK); - loggers::get_instance().log_msg(">>> fx__f1: p_rand: ", p_rand); + loggers::get_instance().log_msg(">>> fx__f1: p_authK: ", bit2oct(p_authK)); + loggers::get_instance().log_msg(">>> fx__f1: p_rand: ", bit2oct(p_rand)); rijndael r; OCTETSTRING authK = bit2oct(p_authK); @@ -74,8 +74,8 @@ namespace LIB__NG__NAS__Functions { } INTEGER fx__f1star(const BITSTRING& p_authK, const BITSTRING& p_rand, const BITSTRING& p_sqn, const BITSTRING& p_amf, BITSTRING& p_mac_s) { - loggers::get_instance().log_msg(">>> fx__f1star: p_authK: ", p_authK); - loggers::get_instance().log_msg(">>> fx__f1star: p_rand: ", p_rand); + loggers::get_instance().log_msg(">>> fx__f1star: p_authK: ", bit2oct(p_authK)); + loggers::get_instance().log_msg(">>> fx__f1star: p_rand: ", bit2oct(p_rand)); rijndael r; OCTETSTRING authK = bit2oct(p_authK); diff --git a/ccsrc/Externals/common_ext.cc b/ccsrc/Externals/common_ext.cc index 204741c9290aaf9800433793381f16fd46086e60..0addcb8d4b51a95724c12b8ea636e7cad64186a5 100644 --- a/ccsrc/Externals/common_ext.cc +++ b/ccsrc/Externals/common_ext.cc @@ -26,13 +26,17 @@ namespace CommonDefs { */ //INTEGER fx__KeyDerivationFunction(INTEGER const&, BITSTRING const&, OCTETSTRING const&){ BITSTRING fx__KeyDerivationFunction(const INTEGER& p__KDF, const BITSTRING& p__Key, const OCTETSTRING& p__String){ + loggers::get_instance().log_msg(">>> fx__KeyDerivationFunction: p__KDF: ", p__KDF); + loggers::get_instance().log_msg(">>> fx__KeyDerivationFunction: p__Key: ", bit2oct(p__Key)); hmac h; // hash_algorithms::sha_256: p__KDF == 1 (tsc_KDF_HMAC_SHA_256 see CommonDefs.ttcn) OCTETSTRING res; if (h.generate(p__String, bit2oct(p__Key), res) == -1) { + loggers::get_instance().error("fx__KeyDerivationFunction: Key derivation failed"); return int2bit(0, 0); } + loggers::get_instance().log_msg("<<< fx__KeyDerivationFunction: res: ", res); return oct2bit(res); } /** @@ -42,7 +46,12 @@ namespace CommonDefs { */ //INTEGER fx__GetSystemTime(CommonDefs::Struct__tm__Type&, INTEGER&){ void fx__GetSystemTime(CommonDefs::Struct__tm__Type& p__Struct__tm, INTEGER& p__TimezoneInfo){ -return; + const time_t t = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); + tm* now = std::localtime(&t); + p__Struct__tm = Struct__tm__Type(now->tm_sec, now->tm_min, now->tm_hour, now->tm_mday, now->tm_mon, now->tm_year, now->tm_wday, now->tm_yday, now->tm_isdst); + p__TimezoneInfo = 0; // TODO FSCOM + + return; } //void fx__CalculateFCS32(BITSTRING const&) { BITSTRING fx__CalculateFCS32(const BITSTRING& p__TMSI){ diff --git a/ccsrc/Ports/LibNGAP/NGAPPort.cc b/ccsrc/Ports/LibNGAP/NGAPPort.cc index 15486ccd870a6776ea0a1db869acbad4fadd271a..3257453195f2ec07464cf48016d239f588dda6ad 100644 --- a/ccsrc/Ports/LibNGAP/NGAPPort.cc +++ b/ccsrc/Ports/LibNGAP/NGAPPort.cc @@ -77,12 +77,12 @@ namespace LibNGAP__Interface { } static_cast(_layer)->add_upper_port(this); - // Create layer + /*IJ commented out // Create layer _layer = layer_stack_builder::get_instance()->create_layer_stack(it->second.c_str()); if (static_cast(_layer) == NULL) { loggers::get_instance().error("NGAPPort::user_map: Invalid stack configuration: %s", it->second.c_str()); } - static_cast(_layer)->add_upper_port(this); + static_cast(_layer)->add_upper_port(this);*/ } else { loggers::get_instance().error("NGAPPort::user_map: No layers defined in configuration file"); } diff --git a/titan-test-system-framework b/titan-test-system-framework index e7f13cca244490ee6f5fc6e80c6836384b562568..9ed59ebd3c0a769688262f2370f6d3c3507b2a5f 160000 --- a/titan-test-system-framework +++ b/titan-test-system-framework @@ -1 +1 @@ -Subproject commit e7f13cca244490ee6f5fc6e80c6836384b562568 +Subproject commit 9ed59ebd3c0a769688262f2370f6d3c3507b2a5f diff --git a/ttcn/Lib3GPP/Common/CommonDefs.ttcn b/ttcn/Lib3GPP/Common/CommonDefs.ttcn index 222a2ca4b326dcab1dad43d9a47e82f898f1f4b4..4e8a2260e50bc256561632020b4ff175512e4ed9 100644 --- a/ttcn/Lib3GPP/Common/CommonDefs.ttcn +++ b/ttcn/Lib3GPP/Common/CommonDefs.ttcn @@ -14,77 +14,77 @@ 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 B1_Type length(1) with { variant "FIELDLENGTH(1)" }; + type bitstring B2_Type length(2) with { variant "FIELDLENGTH(2)" }; + type bitstring B3_Type length(3) with { variant "FIELDLENGTH(3)" }; + type bitstring B4_Type length(4) with { variant "FIELDLENGTH(4)" }; + type bitstring B5_Type length(5) with { variant "FIELDLENGTH(5)" }; + type bitstring B6_Type length(6) with { variant "FIELDLENGTH(6)" }; + type bitstring B7_Type length(7) with { variant "FIELDLENGTH(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 B13_Type length(13); - type bitstring B14_Type length(14); - type bitstring B15_Type length(15); - type bitstring B16_Type length(16); - type bitstring B18_Type length(18); - type bitstring B20_Type length(20); - type bitstring B22_Type length(22); - 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 B42_Type length(42); - type bitstring B43_Type length(43); - type bitstring B45_Type length(45); - 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 B184_Type length(184); - type bitstring B192_Type length(192); - type bitstring B256_Type length(256); + type bitstring B8_Type length(8) with { variant "FIELDLENGTH(8)" }; + type bitstring B9_Type length(9) with { variant "FIELDLENGTH(9)" }; + type bitstring B10_Type length(10) with { variant "FIELDLENGTH(10)" }; + type bitstring B11_Type length(11) with { variant "FIELDLENGTH(11)" }; + type bitstring B12_Type length(12) with { variant "FIELDLENGTH(12)" }; + type bitstring B13_Type length(13) with { variant "FIELDLENGTH(13)" }; + type bitstring B14_Type length(14) with { variant "FIELDLENGTH(14)" }; + type bitstring B15_Type length(15) with { variant "FIELDLENGTH(15)" }; + type bitstring B16_Type length(16) with { variant "FIELDLENGTH(16)" }; + type bitstring B18_Type length(18) with { variant "FIELDLENGTH(18)" }; + type bitstring B20_Type length(20) with { variant "FIELDLENGTH(20)" }; + type bitstring B22_Type length(22) with { variant "FIELDLENGTH(22)" }; + type bitstring B24_Type length(24) with { variant "FIELDLENGTH(24)" }; + type bitstring B27_Type length(27) with { variant "FIELDLENGTH(27)" }; + type bitstring B28_Type length(28) with { variant "FIELDLENGTH(28)" }; + type bitstring B32_Type length(32) with { variant "FIELDLENGTH(32)" }; + type bitstring B36_Type length(36) with { variant "FIELDLENGTH(36)" }; + type bitstring B40_Type length(40) with { variant "FIELDLENGTH(40)" }; + type bitstring B41_Type length(41) with { variant "FIELDLENGTH(41)" }; + type bitstring B42_Type length(42) with { variant "FIELDLENGTH(42)" }; + type bitstring B43_Type length(43) with { variant "FIELDLENGTH(43)" }; + type bitstring B45_Type length(45) with { variant "FIELDLENGTH(45)" }; + type bitstring B47_Type length(47) with { variant "FIELDLENGTH(47)" }; + type bitstring B48_Type length(48) with { variant "FIELDLENGTH(48)" }; + type bitstring B56_Type length(56) with { variant "FIELDLENGTH(56)" }; + type bitstring B64_Type length(64) with { variant "FIELDLENGTH(64)" }; + type bitstring B80_Type length(80) with { variant "FIELDLENGTH(80)" }; + type bitstring B112_Type length(112) with { variant "FIELDLENGTH(112)" }; + type bitstring B128_Type length(128) with { variant "FIELDLENGTH(128)" }; + type bitstring B160_Type length(160) with { variant "FIELDLENGTH(160)" }; + type bitstring B184_Type length(184) with { variant "FIELDLENGTH(184)" }; + type bitstring B192_Type length(192) with { variant "FIELDLENGTH(192)" }; + type bitstring B256_Type length(256) with { variant "FIELDLENGTH(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 O13_Type length(13); - type octetstring O14_Type length(14); - type octetstring O15_Type length(15); - type octetstring O16_Type length(16); - type octetstring O28_Type length(28); - type octetstring O32_Type length(32); - type octetstring O43_Type length(43); - - type hexstring H1_Type length(1); - type hexstring H2_Type length(2); - type hexstring H4_Type length(4); - type hexstring H12_Type length(12); - type hexstring H14_Type length(14); + type octetstring O1_Type length(1) with { variant "FIELDLENGTH(1)" }; + type octetstring O2_Type length(2) with { variant "FIELDLENGTH(2)" }; + type octetstring O3_Type length(3) with { variant "FIELDLENGTH(3)" }; + type octetstring O4_Type length(4) with { variant "FIELDLENGTH(4)" }; + type octetstring O5_Type length(5) with { variant "FIELDLENGTH(5)" }; + type octetstring O6_Type length(6) with { variant "FIELDLENGTH(6)" }; + type octetstring O8_Type length(8) with { variant "FIELDLENGTH(8)" }; + type octetstring O9_Type length(9) with { variant "FIELDLENGTH(9)" }; + type octetstring O10_Type length(10) with { variant "FIELDLENGTH(10)" }; + type octetstring O13_Type length(13) with { variant "FIELDLENGTH(13)" }; + type octetstring O14_Type length(14) with { variant "FIELDLENGTH(14)" }; + type octetstring O15_Type length(15) with { variant "FIELDLENGTH(15)" }; + type octetstring O16_Type length(16) with { variant "FIELDLENGTH(16)" }; + type octetstring O28_Type length(28) with { variant "FIELDLENGTH(28)" }; + type octetstring O32_Type length(32) with { variant "FIELDLENGTH(32)" }; + type octetstring O43_Type length(43) with { variant "FIELDLENGTH(43)" }; + + type hexstring H1_Type length(1) with { variant "FIELDLENGTH(1)" }; + type hexstring H2_Type length(2) with { variant "FIELDLENGTH(2)" }; + type hexstring H4_Type length(4) with { variant "FIELDLENGTH(4)" }; + type hexstring H12_Type length(12) with { variant "FIELDLENGTH(12)" }; + type hexstring H14_Type length(14) with { variant "FIELDLENGTH(14)" }; type O1_Type Octet_Type; - type hexstring HalfOctet_Type length(1); + type hexstring HalfOctet_Type length(1) with { variant "FIELDLENGTH(1)" }; type record of B8_Type B8_List_Type; @@ -1695,4 +1695,6 @@ module CommonDefs { } return omit; } +} with { + encode "RAW" } diff --git a/ttcn/Lib3GPP/NAS/NAS_CommonTypeDefs.ttcn b/ttcn/Lib3GPP/NAS/NAS_CommonTypeDefs.ttcn index f0d43bf6a522c92acea9327c6bc3a576c5b1d079..f1c13cecef5e20869495c53c9071f98282f77987 100644 --- a/ttcn/Lib3GPP/NAS/NAS_CommonTypeDefs.ttcn +++ b/ttcn/Lib3GPP/NAS/NAS_CommonTypeDefs.ttcn @@ -29,7 +29,7 @@ module NAS_CommonTypeDefs { type HalfOctet_Type SpareHalfOctet; - type hexstring NAS_Mcc length(3); //* @desc Type which can be used to represent an MCC (as string of 3 decimal digits). + type hexstring NAS_Mcc length(3) with { variant "FIELDLENGTH(3)" }; //* @desc Type which can be used to represent an MCC (as string of 3 decimal digits). type record of hexstring EmergencyNumList; @@ -65,7 +65,7 @@ module NAS_CommonTypeDefs { type B3_Type PdnTypeValue; - type bitstring BcdDigit_Bit length(4); + type bitstring BcdDigit_Bit length(4) with { variant "FIELDLENGTH(4)" }; type B3_Type NAS_IdType; type B8_Type NAS_CauseValue_Type; @@ -92,6 +92,11 @@ module NAS_CommonTypeDefs { IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ Type4Length_Type iel, octetstring nameValue length(1..100) + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (nameValue)"; + variant (iel) "BYTEORDER(last)"; + variant (nameValue) "BYTEORDER(last)"; }; type record AdditionalUpdateType { /* 24.301 cl. 9.9.3.0B @sic R5s100135 sic@ */ @@ -99,6 +104,8 @@ module NAS_CommonTypeDefs { B2_Type pnb_CIOT, // 0=no additional info, 1=CP, 2=UP, 3=reserved @sic R5s160711 Baseline Moving sic@ B1_Type signallingActiveFlag, // @sic R5s160711 Baseline Moving sic@ B1_Type addUpdateTypeValue + } with { + variant "FIELDORDER(msb)"; }; // ============================================================================= @@ -110,6 +117,8 @@ module NAS_CommonTypeDefs { IEI4_Type iei optional, // '1000'B B1_Type spare1, KeySeq keySeq + } with { + variant "FIELDORDER(msb)"; }; // ============================================================================= @@ -120,6 +129,8 @@ module NAS_CommonTypeDefs { type record ConnectivityType { IEI4_Type iei, B4_Type connectivityValue + } with { + variant "FIELDORDER(msb)"; }; // ============================================================================= @@ -130,6 +141,8 @@ module NAS_CommonTypeDefs { // IEI is always skipped B1_Type switchOff, NAS_AttDetValue_Type typeOfDetach + } with { + variant "FIELDORDER(msb)"; }; // ============================================================================= @@ -141,6 +154,8 @@ module NAS_CommonTypeDefs { IEI4_Type iei, B3_Type spare, B1_Type lowPriority + } with { + variant "FIELDORDER(msb)"; }; // ============================================================================= @@ -154,6 +169,8 @@ module NAS_CommonTypeDefs { B4_Type cnDRXcoef, // CN specific DRX cycle length coefficient B1_Type splitOnCCCH, // Split on CCCCH B3_Type nonDRXtimer // non-DRX timer + } with { + variant "FIELDORDER(msb)"; }; // ============================================================================= @@ -164,6 +181,8 @@ module NAS_CommonTypeDefs { type record EmergServCat { B1_Type spare, B7_Type emergSCValue // Emergency Service Category value + } with { + variant "FIELDORDER(msb)"; }; // ============================================================================= @@ -175,6 +194,11 @@ module NAS_CommonTypeDefs { Type4Length_Type len, // length EmergServCat emergServCat, // Emergency Service Category octetstring digits length(0..10) // BCD numbers + } with { + variant "FIELDORDER(msb)"; + variant (len) "LENGTHTO (emergServCat, digits)"; + variant (len) "BYTEORDER(last)"; + variant (digits) "BYTEORDER(last)"; }; // ============================================================================= @@ -186,6 +210,10 @@ module NAS_CommonTypeDefs { IEI8_Type iei, // '00110100'B (34 hex) @sic R5s110420 sic@ Type4Length_Type iel, // length @sic R5s110420 sic@ record length (1..10) of EmergNum emergNum // Emergency Number + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (emergNum)"; + variant (iel) "BYTEORDER(last)"; }; // ============================================================================= @@ -197,6 +225,8 @@ module NAS_CommonTypeDefs { IEI8_Type iei optional, /* present in case of TV; omit in case of V */ GprsTimerUnit unit, B5_Type timerValue + } with { + variant "FIELDORDER(msb)"; }; type B3_Type GprsTimerUnit; @@ -211,6 +241,10 @@ module NAS_CommonTypeDefs { Type4Length_Type iel, // length @sic R5s110420 sic@ GprsTimerUnit unit, // Unit B5_Type gprsTimerValue // Timer value + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (unit, gprsTimerValue)"; + variant (iel) "BYTEORDER(last)"; }; type GPRS_Timer2 GPRS_Timer3; // definition is identical @sic R5s150329 Baseline Moving sic@ @@ -224,6 +258,8 @@ module NAS_CommonTypeDefs { IEI4_Type iei optional, /* present in case of TV; omit in case of V */ B1_Type spare, B3_Type requestValue + } with { + variant "FIELDORDER(msb)"; }; // ============================================================================= @@ -235,6 +271,8 @@ module NAS_CommonTypeDefs { IEI8_Type iei optional, NAS_PlmnId plmn, // MCC + MNC 3 digits each NAS_Lac lac // LAC + } with { + variant "FIELDORDER(msb)"; }; // ============================================================================= @@ -246,6 +284,8 @@ module NAS_CommonTypeDefs { IEI8_Type iei optional, /* present in case of TV; omit in case of V */ LocAreaId lai, /* MCC + MNC + LAC */ O1_Type rac /* RAC */ + } with { + variant "FIELDORDER(msb)"; }; // ============================================================================= @@ -256,6 +296,8 @@ module NAS_CommonTypeDefs { IEI8_Type iei optional, /* present in case of TV; omit in case of V */ B4_Type spare, B4_Type llcSapiValue + } with { + variant "FIELDORDER(msb)"; }; // ============================================================================= @@ -271,6 +313,11 @@ module NAS_CommonTypeDefs { B1_Type oddEvenInd, // Odd/even indicator NAS_IdType typeOfId, // Type of identity octetstring otherDigits length(0..10) // Other identity digits (10 octets rather than 8 to cover Guti as well) + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (idDigit1, oddEvenInd, typeOfId, otherDigits)"; + variant (iel) "BYTEORDER(last)"; + variant (otherDigits) "BYTEORDER(last)"; }; // ============================================================================= @@ -301,6 +348,10 @@ module NAS_CommonTypeDefs { B1_Type cMSP, // CM Service Prompt Support B1_Type a5_3, // Algorithm A5/3 Support B1_Type a5_2 // Algorithm A5/2 Support + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (spare1_1, revLvl, eSIND, a5_1, rFPwrCap, spare1_2, pSCap, sSSI, sMCap, vBS, vGCS, fC, cM3, spare1_3, lCSVA, uCS2, soLSA, cMSP, a5_3, a5_2)"; + variant (iel) "BYTEORDER(last)"; }; // ============================================================================= @@ -405,6 +456,11 @@ module NAS_CommonTypeDefs { B1_Type xtdTSCSetCap optional, // @sic R5s150329 Baseline Moving sic@ B1_Type xtdEARFCNValueRange optional, // @sic R5s160712 Baseline Moving sic@ bitstring spareBits2 optional + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (spareBit, multibandSupported, a5_7, a5_6, a5_5, a5_4, associatedRadioCapabilty2, spareBits1, associatedRadioCapabilty1, maskBit1, rGSM_RadioCapability, maskBit2, multiSlotClass, uCS2Treatment, extMeasurementCapability, maskBit3, msMeasurementCapability, maskBit4, msPositioningMethod, maskBit5, eDGE_MultiSlot, maskBit6, psk8_Struct, maskBit7, gSM400BandsSupported, gSM400AssociatedRadioCapability, maskBit8, gSM850AssociatedRadiioCapability, maskBit9, pCS1900AssociatedRadiioCapability, uMTS_FDD_RAT_Capability, uMTS384TDD_RAT_Capability, cDMA2000_RAT_Capability, maskBit10, dTM_GPRS_MultiSlotSubclass, singleSlotDTM, maskBit11, dTM_EGPRS_MultiSlorSubclass, maskBit12, singleBandSupport, maskBit13, gSM700AssociatedRadioCapability, uMTS128TDD_RAT_Capability, gERANFeatPack1, mask14, extDTM_GPRS_MultiSlotSubclass, etxDTM_EGPRS_MultiSlotSubclass, mask15, highMultislotCap, spare2, gERANFeatPack2, gMSKMultislotPowerProfile, pSKMultislotPowerProfile, mask17, tGSM400BandsSupported, tGSM400AssocRadioCap, spare, dlAdvancedRxPerf, dTMEhancCap, mask19, dTMGPRSHighMultislotClass, offsetReq, mask20, dTMEGPRSHighMultislotClass, rptdACCHCap, mask21, gsm710AssocRadioCap, mask22, tgsm810AssocRadioCap, cipheringModeSettingCap, addPositionCap, eutraFDDSupport, eutraTDDSupport, eutraMeasAndReporting, priorityBasedReselection, utraCSGCellsReporting, vamosLevel, tighterCap, selectCipheringDLSACCH, csPS_SRVCC_G2U, csPS_SRVCC_G2E, geranNwkSharing, eutraWidebandRSRQMeas, erBandSupport, utraMultipleFreqBandInd, eutraMultipleFreqBandInd, xtdTSCSetCap, xtdEARFCNValueRange)"; + variant (iel) "BYTEORDER(last)"; + variant (spareBits2) "BYTEORDER(last)"; }; // ============================================================================= @@ -417,6 +473,8 @@ module NAS_CommonTypeDefs { B2_Type eDGE_RF_PowerCapability1 optional, // not present if pwrMask1 = 0 B1_Type pwrMask2, B2_Type eDGE_RF_PowerCapability2 optional // not present if pwrMask2 = 0 + } with { + variant "FIELDORDER(msb)"; }; // ============================================================================= @@ -426,6 +484,8 @@ module NAS_CommonTypeDefs { type record MS_MeasCapability { B4_Type sMS_VALUE, B4_Type sM_VALUE + } with { + variant "FIELDORDER(msb)"; }; // ============================================================================= @@ -468,6 +528,11 @@ module NAS_CommonTypeDefs { B1_Type restrictEnhancedCoverageCap optional, // @sic R5s170598 Baseline Moving sic@ B1_Type dualConnectivityEUTRA_NR optional, // @sic R5s180553 Baseline Moving sic@ bitstring spareBits length (0..43) optional + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (gea1, smCapDedicated, smCapGPRS, ucs2, ssScreeningIndicator, soLSACap, revLevelIndicator, pfcFeatureMode, gea2, gea3, gea4, gea5, gea6, gea7, lcsVACap, psHOtoUTRAN_IuModeCap, psHOtoEUTRAN_S1ModeCap, emmCombinedCap, isrSupport, srvccToGERAN_UTRANCap, epcCap, nfCap, gERANNtwkShareCap, userPlaneIntegrityProtSupport, gia4, gia5, gia6, gia7, ePCOInd, restrictEnhancedCoverageCap, dualConnectivityEUTRA_NR, spareBits)"; + variant (iel) "BYTEORDER(last)"; + variant (spareBits) "BYTEORDER(last)"; }; // ============================================================================= @@ -479,6 +544,8 @@ type record Non3GPP_NW_ProvidedPolicies { IEI4_Type iei, B3_Type spareBits, B1_Type n3ENInd + } with { + variant "FIELDORDER(msb)"; }; // ============================================================================= @@ -491,6 +558,10 @@ type record Non3GPP_NW_ProvidedPolicies { Type4Length_Type iel, // B10_Type nriContainerValue, // @sic R5s140778 sic@ B6_Type spareBits // @sic R5s140778 sic@ + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (nriContainerValue, spareBits)"; + variant (iel) "BYTEORDER(last)"; }; // ============================================================================= @@ -503,6 +574,10 @@ type record Non3GPP_NW_ProvidedPolicies { Type4Length_Type iel, // @sic R5s110420 sic@ B1_Type spare, B7_Type idValue + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (spare, idValue)"; + variant (iel) "BYTEORDER(last)"; }; // ============================================================================= @@ -514,6 +589,10 @@ type record Non3GPP_NW_ProvidedPolicies { IEI8_Type iei, Type4Length_Type iel, NAS_PlmnId plmn + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (plmn)"; + variant (iel) "BYTEORDER(last)"; }; // ============================================================================= @@ -526,6 +605,10 @@ type record Non3GPP_NW_ProvidedPolicies { Type4Length_Type iel, // @sic R5s110420 sic@ record length(1..15) of NAS_PlmnId plmnList /* list of PLMNs */ + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (plmnList)"; + variant (iel) "BYTEORDER(last)"; }; // ============================================================================= @@ -537,6 +620,8 @@ type record Non3GPP_NW_ProvidedPolicies { IEI4_Type iei, B3_Type spare, B1_Type extdPeriodicTimers + } with { + variant "FIELDORDER(msb)"; }; type PLMN_List.plmnList NAS_PlmnIdList_Type; @@ -554,6 +639,11 @@ type record Non3GPP_NW_ProvidedPolicies { B3_Type configProtocol, record length (0..83) of ProtocolContainer pco optional + } with { + variant "FIELDORDER(msb)"; + // FIXME variant (pco) "FORCEOMIT(protocolLongLength)"; + variant (iel) "LENGTHTO (ext, spare, configProtocol, pco)"; + variant (iel) "BYTEORDER(last)"; }; type record ProtocolContainer { @@ -561,6 +651,11 @@ type record Non3GPP_NW_ProvidedPolicies { Type4Length_Type protocolLength optional, // @sic R5s201386 Baseline Moving sic@ Type6Length_Type protocolLongLength optional, // always set to omit in UL @sic R5s201386 Baseline Moving sic@ octetstring content optional + } with { + variant "FIELDORDER(msb)"; + variant (protocolLength) "LENGTHTO (content)"; + variant (protocolLength) "BYTEORDER(last)"; + variant (content) "BYTEORDER(last)"; }; type ProtocolConfigOptions.pco NAS_ProtocolConfigOptions_Type; @@ -570,6 +665,9 @@ type record Non3GPP_NW_ProvidedPolicies { B1_Type aer, B3_Type uplinkTimeUnit, O3_Type maxUplinkRate optional // @sic R5s170598 Baseline Moving sic@ + } with { + variant "FIELDORDER(msb)"; + variant (maxUplinkRate) "BYTEORDER(last)"; }; // ============================================================================= // Structured Type Definition @@ -580,6 +678,11 @@ type record Non3GPP_NW_ProvidedPolicies { IEI8_Type iei optional, /* present in case of TV; omit in case of V */ Type4Length_Type iel optional, // only present in 24.008 version of DETACH REQUEST message O3_Type signatureValue + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (signatureValue)"; + variant (iel) "BYTEORDER(last)"; + variant (signatureValue) "BYTEORDER(last)"; }; // ============================================================================= @@ -620,6 +723,10 @@ type record Non3GPP_NW_ProvidedPolicies { B8_Type guaranteedBitRateDL_Ext2 optional, // @sic R5s1300195 Baseline Moving sic@ B8_Type maxBitRateUL_Ext2 optional, // @sic R5s1300195 Baseline Moving sic@ B8_Type guaranteedBitRateUL_Ext2 optional // @sic R5s1300195 Baseline Moving sic@ + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (spare1, delayClass, relabilityClass, peakThroughput, spare2, precedenceClass, spare3, meanThroughput, trafficClass, deliveryOrder, deliveryErrorSDU, maxSduSize, maxBitRateUL, maxBitRateDL, residualBER, sduErrorRatio, transferDelay, trafficHandlingPrio, guaranteedBitRateUL, guaranteedBitRateDL, spare4, signallingInd, sourceStatisticsDescriptor, maxBitRateDL_Ext, guaranteedBitRateDL_Ext, maxBitRateUL_Ext, guaranteedBitRateUL_Ext, maxBitRateDL_Ext2, guaranteedBitRateDL_Ext2, maxBitRateUL_Ext2, guaranteedBitRateUL_Ext2)"; + variant (iel) "BYTEORDER(last)"; }; // ============================================================================= @@ -631,6 +738,8 @@ type record Non3GPP_NW_ProvidedPolicies { IEI4_Type iei optional, /* present in case of TV; omit in case of V */ B1_Type spare, B3_Type levelValue + } with { + variant "FIELDORDER(msb)"; }; // ============================================================================= @@ -643,6 +752,10 @@ type record Non3GPP_NW_ProvidedPolicies { Type4Length_Type len, // length B8_Type bitMap1to8, // codec bitmap bits 1-8 B8_Type bitMap9to16 optional // codec bitmap bits 9-16 + } with { + variant "FIELDORDER(msb)"; + variant (len) "LENGTHTO (bitMap1to8, bitMap9to16)"; + variant (len) "BYTEORDER(last)"; }; // ============================================================================= @@ -654,6 +767,10 @@ type record Non3GPP_NW_ProvidedPolicies { IEI8_Type iei, // '01000000'B (40 hex) @sic R5s110420 sic@ Type4Length_Type iel, // length @sic R5s110420 sic@ record of Codec codec// list of codecs + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (codec)"; + variant (iel) "BYTEORDER(last)"; }; // ============================================================================= @@ -665,6 +782,8 @@ type record Non3GPP_NW_ProvidedPolicies { // IEI is always skipped B1_Type spare, B3_Type typeValue + } with { + variant "FIELDORDER(msb)"; }; // ============================================================================= @@ -676,6 +795,8 @@ type record Non3GPP_NW_ProvidedPolicies { IEI4_Type iei optional, B3_Type spare3, TmsiStatusValue flag // Flag + } with { + variant "FIELDORDER(msb)"; }; // ============================================================================= @@ -691,12 +812,21 @@ type record Non3GPP_NW_ProvidedPolicies { B4_Type noOfPktFilter, record of PacketFilter packetFilterList optional, record of TftParameter parameterList optional + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (tftOperationCode, eBit, noOfPktFilter, packetFilterList, parameterList)"; + variant (iel) "BYTEORDER(last)"; }; type record TftParameter { IEI8_Type iei, Type4Length_Type iel, octetstring contents + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (contents)"; + variant (iel) "BYTEORDER(last)"; + variant (contents) "BYTEORDER(last)"; }; type record PacketFilter { @@ -706,6 +836,11 @@ type record Non3GPP_NW_ProvidedPolicies { B8_Type precedence optional, Type4Length_Type iel optional, PacketFilterContents contents optional + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (contents)"; + variant (iel) "BYTEORDER(last)"; + variant (contents) "BYTEORDER(last)"; }; type record of PacketFilterComponent PacketFilterContents; @@ -713,7 +848,9 @@ type record Non3GPP_NW_ProvidedPolicies { type record PacketFilterComponent { O1_Type id, PacketFilterComponentValue packetFilterComponentValue - } with { variant (id)"FIELDLENGTH(8)";}; + } with { + variant "FIELDORDER(msb)"; + }; type union PacketFilterComponentValue { O8_Type ipv4RemoteAddress, @@ -726,6 +863,17 @@ type record Non3GPP_NW_ProvidedPolicies { O4_Type securityParameterIndex, O2_Type typeOfServiceTrafficClass, O3_Type flowLabel + } with { + variant "FIELDORDER(msb)"; + variant (ipv4RemoteAddress) "BYTEORDER(last)"; + variant (ipv6RemoteAddress) "BYTEORDER(last)"; + variant (singleLocalPort) "BYTEORDER(last)"; + variant (localPortRange) "BYTEORDER(last)"; + variant (singleRemotePort) "BYTEORDER(last)"; + variant (remotePortRange) "BYTEORDER(last)"; + variant (securityParameterIndex) "BYTEORDER(last)"; + variant (typeOfServiceTrafficClass) "BYTEORDER(last)"; + variant (flowLabel) "BYTEORDER(last)"; }; type record UE_NetworkCap { // 24.301 cl. 9.9.3.34 @@ -743,6 +891,8 @@ type record Non3GPP_NW_ProvidedPolicies { octetstring spare optional // @sic R5s100135 sic@ } with { variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO(eeaCap, eiaCap, ueaCap, uiaCap, srvcc_LPP_ProSeCap, cIoT_proSeCap, cIoT_V2X, edt_WUS, musim, spare)"; + variant (iel) "BYTEORDER(last)"; } type record ReAttemptIndicator { // 24.301 cl. 9.9.4.13A, 24.008 cl. 10.5.6.5A @@ -755,6 +905,8 @@ type record Non3GPP_NW_ProvidedPolicies { B1_Type ratcValue } with { variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO(spare, eplmncValue, ratcValue)"; + variant (iel) "BYTEORDER(last)"; } // ============================================================================= @@ -768,8 +920,9 @@ type record Non3GPP_NW_ProvidedPolicies { B128_Type aUTN /* (as for UMTS) */ } with { variant "FIELDORDER(msb)"; - variant "PRESENCE (iei = '20'O)"; - variant (iel) "LENGTHTO (aUTN)" + variant (iel) "LENGTHTO (aUTN)"; + variant (iel) "BYTEORDER(last)"; + variant (aUTN) "BYTEORDER(last)"; } // ============================================================================= @@ -784,8 +937,9 @@ type record Non3GPP_NW_ProvidedPolicies { B112_Type auts // AUTS, 14 octets } with { variant "FIELDORDER(msb)"; - variant "PRESENCE (iei = '30'O)"; - variant (iel) "LENGTHTO (auts)" + variant (iel) "LENGTHTO (auts)"; + variant (iel) "BYTEORDER(last)"; + variant (auts) "BYTEORDER(last)"; } // ============================================================================= @@ -798,7 +952,7 @@ type record Non3GPP_NW_ProvidedPolicies { B128_Type randValue // Authentication Parameter RAND value } with { variant "FIELDORDER(msb)"; - variant "PRESENCE (iei = '21'O)" + variant (randValue) "BYTEORDER(last)"; } type record DaylightSavingTime { /* 24.301 cl. 9.9.3.5 -> 24.008 cl. 10.5.3.12 */ @@ -808,6 +962,8 @@ type record Non3GPP_NW_ProvidedPolicies { B2_Type val } with { variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (spare, val)"; + variant (iel) "BYTEORDER(last)"; }; type record NetworkName { /* 24.301 cl. 9.9.3.21 -> 24.008 cl. 10.5.3.5a */ @@ -820,6 +976,9 @@ type record Non3GPP_NW_ProvidedPolicies { octetstring text } with { variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (ext, codingScheme, addCI, spareBitCnt, text)"; + variant (iel) "BYTEORDER(last)"; + variant (text) "BYTEORDER(last)"; }; type record TimeZone { /* 24.301 cl. 9.9.3.26 -> 24.008 cl. 10.5.3.8 */ @@ -855,6 +1014,8 @@ type record Non3GPP_NW_ProvidedPolicies { B2_Type voiceDomainPrefEUTRA // @sic R5s110233 sic@ } with { variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (spareBits, ueUsageSetting, voiceDomainPrefEUTRA)"; + variant (iel) "BYTEORDER(last)"; }; type record IdentityType { /* 24.301 cl. 9.9.3.15 -> 24.008 cl. 10.5.3.4 */ @@ -919,6 +1080,9 @@ type record Non3GPP_NW_ProvidedPolicies { octetstring components // ASN.1 definitions BER encoded } with { variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (components)"; + variant (iel) "BYTEORDER(last)"; + variant (components) "BYTEORDER(last)"; }; // ============================================================================= @@ -946,6 +1110,8 @@ type record Non3GPP_NW_ProvidedPolicies { O1_Type sS_VersionInfo // ss version information } with { variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (sS_VersionInfo)"; + variant (iel) "BYTEORDER(last)"; }; // ============================================================================= @@ -972,8 +1138,8 @@ type record Non3GPP_NW_ProvidedPolicies { B2_Type spare, B1_Type utranOffload, B1_Type eutranOffload -} with { - variant "FIELDORDER(msb)"; + } with { + variant "FIELDORDER(msb)"; }; // ============================================================================= @@ -987,6 +1153,10 @@ type record ExtdDRXParams { B4_Type pagingTimeWindow, B4_Type eDRXValue, B8_Type extdPTW optional // @sic R5s221182 Baseline Moving Rel-17 sic@ + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (pagingTimeWindow, eDRXValue, extdPTW)"; + variant (iel) "BYTEORDER(last)"; }; // ============================================================================= @@ -998,6 +1168,11 @@ type record NBIFOMContainer { IEI8_Type iei, Type4Length_Type iel, // length octetstring containerContents + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (containerContents)"; + variant (iel) "BYTEORDER(last)"; + variant (containerContents) "BYTEORDER(last)"; }; // ============================================================================= @@ -1009,6 +1184,11 @@ type record NBIFOMContainer { IEI8_Type iei, Type4Length_Type iel, O2_Type dcnIdValue + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (dcnIdValue)"; + variant (iel) "BYTEORDER(last)"; + variant (dcnIdValue) "BYTEORDER(last)"; }; // ============================================================================= @@ -1023,6 +1203,10 @@ type record NBIFOMContainer { B4_Type spare, B3_Type configProtocol, record of ProtocolContainer pco optional + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (ext, spare, configProtocol, configProtocol)"; + variant (iel) "BYTEORDER(last)"; }; type record of ProtocolContainer NAS_ExtdProtocolConfigOptions_Type; /* @sic R5-2001649 sic@ @status APPROVED (LTE_A_PRO, NBIOT) */ @@ -1035,6 +1219,11 @@ type record NBIFOMContainer { IEI8_Type iei, Type4Length_Type iel, octetstring additionalInfo + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (additionalInfo)"; + variant (iel) "BYTEORDER(last)"; + variant (additionalInfo) "BYTEORDER(last)"; }; type record AuthenticationResponseParameter { /* 24.301 cl. 9.9.3.4 */ @@ -1042,8 +1231,10 @@ type record NBIFOMContainer { Type4Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ B32_128_Type res /* 4..16 octets */ } with { - variant "PRESENCE (iei = '2D'O)"; - variant (iel) "LENGTHTO (res)" + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (res)"; + variant (iel) "BYTEORDER(last)"; + variant (res) "BYTEORDER(last)"; } type record NAS_KeySetIdentifier { /* 24.301 cl. 9.9.3.21 */ @@ -1052,8 +1243,6 @@ type record NBIFOMContainer { NAS_KsiValue nasKeySetId } with { variant "FIELDORDER(msb)"; - variant "FORCEOMIT(iei)"; - variant "FIELDLENGTH(4)"; } type record HashMME { /* 24.301 cl. 9.9.3.50 @sic R5s170597 Baseline Moving sic@ */ @@ -1062,8 +1251,9 @@ type record NBIFOMContainer { O8_Type hashMME } with { variant "FIELDORDER(msb)"; - variant "FORCEOMIT(iei)"; - variant "FIELDLENGTH(4)"; + variant (iel) "LENGTHTO (hashMME)"; + variant (iel) "BYTEORDER(last)"; + variant (hashMME) "BYTEORDER(last)"; } type record PDN_Address { /* 24.301 cl. 9.9.4.9 */ @@ -1074,8 +1264,9 @@ type record NBIFOMContainer { octetstring adressInfo length(4..12) } with { variant "FIELDORDER(msb)"; - variant "FORCEOMIT(iei)"; - variant (iel) "LENGTHTO (adressInfo)"; + variant (iel) "LENGTHTO (spare, typeValue, adressInfo)"; + variant (iel) "BYTEORDER(last)"; + variant (adressInfo) "BYTEORDER(last)"; }; type record ReplayedNASMessageContainer { /* 24.301 cl. 9.9.3.51 @sic R5s170597 Baseline Moving sic@ */ @@ -1084,8 +1275,9 @@ type record NBIFOMContainer { octetstring replayedNASMsgContainerValue } with { variant "FIELDORDER(msb)"; - variant "FORCEOMIT(iei)"; - variant (iel) "LENGTHTO(replayedNASMsgContainerValue)"; + variant (iel) "LENGTHTO (replayedNASMsgContainerValue)"; + variant (iel) "BYTEORDER(last)"; + variant (replayedNASMsgContainerValue) "BYTEORDER(last)"; }; type record NAS_SecurityAlgorithms { /* 24.301 cl. 9.9.3.23 */ @@ -1094,6 +1286,8 @@ type record NBIFOMContainer { B3_Type cipheringType, /* Type of ciphering algorithm */ B1_Type spare2, B3_Type integrityType /* Type of integrity protection algorithm */ + } with { + variant "FIELDORDER(msb)"; }; type record Extd_EPS_QOS { /* 24.301 cl. 9.9.4.30 */ @@ -1109,6 +1303,10 @@ type record NBIFOMContainer { B8_Type guaranteedBitRateUl_2, B8_Type guaranteedBitRateDl_1, B8_Type guaranteedBitRateDl_2 + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (unitMaxBitRate, maxBitRateUl_1, maxBitRateUl_2, maxBitRateDl_1, maxBitRateDl_2, unitGuaranteedBitRate, guaranteedBitRateUl_1, guaranteedBitRateUl_2, guaranteedBitRateDl_1, guaranteedBitRateDl_2)"; + variant (iel) "BYTEORDER(last)"; }; type record UE_Status { // 24.501 cl. 9.11.3.56 @@ -1117,6 +1315,10 @@ type record NBIFOMContainer { B6_Type spare, B1_Type n1ModeRegistered, B1_Type s1ModeRegistered + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (spare, n1ModeRegistered, s1ModeRegistered)"; + variant (iel) "BYTEORDER(last)"; }; // ============================================================================= @@ -1130,6 +1332,10 @@ type record NBIFOMContainer { B7_Type spareBits, // @sic R5s201386 Baseline Moving sic@ B1_Type extdEmergNumListValidity, record of ExtdEmergNum emergNum + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (spareBits, extdEmergNumListValidity, emergNum)"; + variant (iel) "BYTEORDER(last)"; }; type record ExtdEmergNum { @@ -1137,6 +1343,12 @@ type record NBIFOMContainer { octetstring digits, // BCD numbers Type4Length_Type lengthOfSubService, octetstring subServices + } with { + variant "FIELDORDER(msb)"; + variant (lengthOfSubService) "LENGTHTO (subServices)"; + variant (lengthOfSubService) "BYTEORDER(last)"; + variant (digits) "BYTEORDER(last)"; + variant (subServices) "BYTEORDER(last)"; }; // ============================================================================= @@ -1151,6 +1363,10 @@ type record NBIFOMContainer { O1_Type ueaCap optional, // @sic R5s100135 sic@ O1_Type uiaCap optional, // @sic R5s100135 sic@ O1_Type geaCap optional // @sic R5s100135 sic@ + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (eeaCap, eiaCap, ueaCap, uiaCap, geaCap)"; + variant (iel) "BYTEORDER(last)"; }; type record EPS_QualityOfService { /* 24.301 cl. 9.9.4.3 */ @@ -1169,6 +1385,10 @@ type record NBIFOMContainer { B8_Type maxBitRateDL_Ext2 optional, // @sic R5s1300195 Baseline Moving, R5s180640 sic@ B8_Type guaranteedBitRateUL_Ext2 optional, // @sic R5s1300195 Baseline Moving, R5s180640 sic@ B8_Type guaranteedBitRateDL_Ext2 optional // @sic R5s1300195 Baseline Moving, R5s180640 sic@ + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (maxBitRateUl, maxBitRateDl, guaranteedBitRateUl, guaranteedBitRateDl, maxBitRateUlExt, maxBitRateDlExt, guaranteedBitRateUlExt, guaranteedBitRateDlExt, maxBitRateUL_Ext2, maxBitRateDL_Ext2, guaranteedBitRateUL_Ext2, guaranteedBitRateDL_Ext2)"; + variant (iel) "BYTEORDER(last)"; }; type record EPS_BearerContextStatus { /* 24.301 cl. 9.9.2.1 */ @@ -1178,18 +1398,29 @@ type record NBIFOMContainer { B4_Type ebi4_1, /* EBI(1)- EBI(4) @sic R5s180552 Baseline Moving 2018 Phase 2 sic@ */ B1_Type spare, /* EBI(0) is spare and shall be coded as zero @sic R5s180552 Baseline Moving 2018 Phase 2 sic@ */ B8_Type ebi8_15 /* EBI(8)- EBI(15)*/ + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (ebi5_7, ebi4_1, spare, ebi5_7)"; + variant (iel) "BYTEORDER(last)"; }; type record UERadioCapId { /* 24.501 cl. 9.11.3.68 */ IEI8_Type iei optional, /* present in case of TV or TLV; omit in case of V */ Type4Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ octetstring id + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (id)"; + variant (iel) "BYTEORDER(last)"; + variant (id) "BYTEORDER(last)"; }; type record UERadioCapIdDeletion { /* 24.501 cl. 9.11.3.69 */ IEI4_Type iei optional, B1_Type spare, B3_Type deleteReq + } with { + variant "FIELDORDER(msb)"; }; type record DRXParamCommon { /* 24.301 cl. 9.9.3.63 */ @@ -1197,42 +1428,67 @@ type record NBIFOMContainer { Type4Length_Type iel, B4_Type spare, B4_Type drxValue + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (spare, drxValue)"; + variant (iel) "BYTEORDER(last)"; }; type record ReleaseAssistanceInd { /* 24.301 cl. 9.9.4.25 */ IEI4_Type iei optional, B2_Type spare, B2_Type dlDataExpected + } with { + variant "FIELDORDER(msb)"; }; type record WUSAssistInfo { /* 24.301 cl. 9.9.3.62 */ IEI8_Type iei optional, Type4Length_Type iel, record of WusInfoType infoType + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (infoType)"; + variant (iel) "BYTEORDER(last)"; }; type record WusInfoType { B3_Type wusType, B5_Type pagingProbability, octetstring wusValue optional + } with { + variant "FIELDORDER(msb)"; + variant (wusValue) "BYTEORDER(last)"; }; type record ServingPLMNRateControl { /* 24.301 cl. 9.9.4.28 */ IEI8_Type iei optional, Type4Length_Type iel, O2_Type servingPLMNRate + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (servingPLMNRate)"; + variant (iel) "BYTEORDER(last)"; + variant (servingPLMNRate) "BYTEORDER(last)"; }; type record ControlPlaneInd { /* 24.301 cl. 9.9.4.23 */ IEI4_Type iei optional, B3_Type spare, B1_Type cpIndValue + } with { + variant "FIELDORDER(msb)"; }; type record QoSParameters { O1_Type id, Type4Length_Type lenOfContent, octetstring qosParam + } with { + variant "FIELDORDER(msb)"; + variant (lenOfContent) "LENGTHTO (qosParam)"; + variant (lenOfContent) "BYTEORDER(last)"; + variant (qosParam) "BYTEORDER(last)"; }; type record of QoSParameters QoSParametersList; @@ -1242,7 +1498,11 @@ type record NBIFOMContainer { Type4Length_Type iel, B4_Type spare, B4_Type requestType + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (spare, requestType)"; + variant (iel) "BYTEORDER(last)"; }; //} with { encode "NAS Types" } -} with { encode "RAW"; variant "" } +} with { encode "RAW" } diff --git a/ttcn/Lib3GPP/NG_NAS/NG_NAS_Common.ttcn b/ttcn/Lib3GPP/NG_NAS/NG_NAS_Common.ttcn index eadcbe258cbd72edcee1288c0eb55037f996bbbb..0908a567ead222cc2108df7c21242d0d121b6d03 100644 --- a/ttcn/Lib3GPP/NG_NAS/NG_NAS_Common.ttcn +++ b/ttcn/Lib3GPP/NG_NAS/NG_NAS_Common.ttcn @@ -29,6 +29,8 @@ module NG_NAS_Common { PDU_SessionStatus SessionStatus optional, EPS_BearerContextStatus EPSBearerStatus optional, // @sic R5-206426 sic@ UERadioCapId UERadioCapId optional // @sic R5-206419 sic@ + } with { + variant "FIELDORDER(msb)"; }; type record GSM_MobilityInfo_Type { /* structured type to be stored & passed in/out of GSM Msgs @@ -43,6 +45,8 @@ module NG_NAS_Common { integer EPS_Bearer optional, // @sic R5s201094 sic@ PDN_Index_Type PdnIndex optional, // @sic R5s201094 sic@ S_NSSAI_Type NSSAI optional // @sic R5s210148 sic@ + } with { + variant "FIELDORDER(msb)"; }; type record of GSM_MobilityInfo_Type PDUSessionInfoList_Type; /* @status APPROVED (IMS, NR5GC, NR5GC_IRAT, POS) */ diff --git a/ttcn/Lib3GPP/NG_NAS/NG_NAS_MsgContainers.ttcn b/ttcn/Lib3GPP/NG_NAS/NG_NAS_MsgContainers.ttcn index 7be34e7ff109a49996759d0667c995a7827a048d..1444d4020cee593e9384a4e6a94982019238c02a 100644 --- a/ttcn/Lib3GPP/NG_NAS/NG_NAS_MsgContainers.ttcn +++ b/ttcn/Lib3GPP/NG_NAS/NG_NAS_MsgContainers.ttcn @@ -56,17 +56,36 @@ module NG_NAS_MsgContainers SET_UAI_RESPONSE set_UAI_Response, SET_UL_MESSAGE_RESPONSE set_UL_Message_Response, UE_TEST_LOOP_NR_SIDELINK_COUNTER_RESPONSE test_Loop_Sidelink_Counter_Response // @sic R5-225291 sic@ - } with { + } with { // FIXME FSCOM Check messageType for deregistration_RequestMO variant "TAG( - security_Protected_Nas_Message, securityHeaderType = '0001'B; - security_Protected_Nas_Message, securityHeaderType = '0010'B; - security_Protected_Nas_Message, securityHeaderType = '0011'B; - security_Protected_Nas_Message, securityHeaderType = '0100'B; - registration_Request, messageType = '01000001'B; - registration_Complete, messageType = '01000011'B; - authentication_Response, messageType = '01010111'B; - security_Mode_Complete, messageType = '01011110'B; - ul_Nas_Transport, messageType = '01100111'B; + security_Protected_Nas_Message, securityHeaderType = '0001'B; + security_Protected_Nas_Message, securityHeaderType = '0010'B; + security_Protected_Nas_Message, securityHeaderType = '0011'B; + security_Protected_Nas_Message, securityHeaderType = '0100'B; + authentication_Failure, messageType = '01011001'B; + authentication_Response, messageType = '01010111'B; + configuration_Update_Complete, messageType = '01010101'B; + cp_Service_Request, messageType = '01001111'B; + deregistration_Accept, messageType = '01000110'B; + deregistration_RequestMO, messageType = '01001000'B; + gmm_Status, messageType = '01100100'B; + gsm_Status, messageType = '11010110'B; + network_Slice_Specific_Authentication_Complete, messageType = '01010001'B; + identity_Response, messageType = '01011100'B; + notification_Response, messageType = '01100110'B; + pdu_Session_Authentication_Complete, messageType = '11000110'B; + pdu_Session_Establishment_Request, messageType = '11000001'B; + pdu_Session_Modification_Command_Reject, messageType = '11001101'B; + pdu_Session_Modification_Complete, messageType = '11001100'B; + pdu_Session_Modification_Request, messageType = '11001001'B; + pdu_Session_Release_Complete, messageType = '11010100'B; + pdu_Session_Release_Request, messageType = '11010001'B; + registration_Request, messageType = '01000001'B; + registration_Complete, messageType = '01000011'B; + security_Mode_Complete, messageType = '01011110'B; + security_Mode_Reject, messageType = '01011111'B; + service_Request, messageType = '01001100'B; + ul_Nas_Transport, messageType = '01100111'B; )" } @@ -115,17 +134,38 @@ module NG_NAS_MsgContainers UPDATE_UE_LOCATION_INFORMATION update_Ue_Location_Information //@sic R5-213421 sic@ - } with { + } with { // FIXME FSCOM Check messageType for deregistration_RequestMT variant "TAG( - security_Protected_Nas_Message, securityHeaderType = '0001'B; - security_Protected_Nas_Message, securityHeaderType = '0010'B; - security_Protected_Nas_Message, securityHeaderType = '0011'B; - security_Protected_Nas_Message, securityHeaderType = '0100'B; - registration_Accept, messageType = '01000010'B; - authentication_Request, messageType = '01010110'B; - security_Mode_Command, messageType = '01011101'B; - configuration_Update_Command, messageType = '01010100'B; - dl_Nas_Transport, messageType = '01101000'B; + security_Protected_Nas_Message, securityHeaderType = '0001'B; + security_Protected_Nas_Message, securityHeaderType = '0010'B; + security_Protected_Nas_Message, securityHeaderType = '0011'B; + security_Protected_Nas_Message, securityHeaderType = '0100'B; + authentication_Reject, messageType = '01011000'B; + authentication_Request, messageType = '01010110'B; + authentication_Result, messageType = '01011010'B; + configuration_Update_Command, messageType = '01010100'B; + deregistration_Accept, messageType = '01000110'B; + deregistration_RequestMT, messageType = '01001000'B; + dl_Nas_Transport, messageType = '01101000'B; + gmm_Status, messageType = '01100100'B; + gsm_Status, messageType = '11010110'B; + identity_Request, messageType = '01011011'B; + network_Slice_Specific_Authentication_Command, messageType = '01010000'B; + network_Slice_Specific_Authentication_Result, messageType = '01010010'B; + notification, messageType = '01100101'B; + pdu_Session_Authentication_Command, messageType = '11000101'B; + pdu_Session_Authentication_Result, messageType = '11000111'B; + pdu_Session_Establishment_Accept, messageType = '11000010'B; + pdu_Session_Establishment_Reject, messageType = '11000011'B; + pdu_Session_Modification_Command, messageType = '11001011'B; + pdu_Session_Modification_Reject, messageType = '11001010'B; + pdu_Session_Release_Command, messageType = '11010011'B; + pdu_Session_Release_Reject, messageType = '11010010'B; + registration_Accept, messageType = '01000010'B; + registration_Reject, messageType = '01000100'B; + security_Mode_Command, messageType = '01011101'B; + service_Accept, messageType = '01001110'B; + service_Reject, messageType = '01001101'B; )" } diff --git a/ttcn/Lib3GPP/NG_NAS/NG_NAS_SecurityFunctions.ttcn b/ttcn/Lib3GPP/NG_NAS/NG_NAS_SecurityFunctions.ttcn index f524609bb9fd500b4d4e31d063a8259c2507362e..1822e7652643dc4e4e9076f6ffaca72a60a17eb4 100644 --- a/ttcn/Lib3GPP/NG_NAS/NG_NAS_SecurityFunctions.ttcn +++ b/ttcn/Lib3GPP/NG_NAS/NG_NAS_SecurityFunctions.ttcn @@ -387,25 +387,41 @@ module NG_NAS_SecurityFunctions { const octetstring const_S6B_FC :='6B'O; var octetstring v_S; var octetstring v_P0; - + + log(">>> f_NG_Authentication_A4: p_PLMN=", p_PLMN); + log(">>> f_NG_Authentication_A4: p_AuthParams=", p_AuthParams); + log(">>> f_NG_Authentication_A4: p_KDF=", p_KDF); + log(">>> f_NG_Authentication_A4: p_Key=", p_Key); + + // Generation of String v_S := const_S6B_FC; //FC = 0x6B v_P0 := fl_GetServingNetworkName(p_PLMN, p_NID); // @sic R5s220753 sic@ + log("f_NG_Authentication_A4: v_P0=", v_P0); v_S := (v_S & v_P0); + log("f_NG_Authentication_A4: v_S=", v_S); //P0 = serving network ID v_S := (v_S & int2oct(lengthof(v_P0), 2)) ; + log("f_NG_Authentication_A4: v_S=", v_S); //L0 = length of serving network ID v_S := ( v_S & bit2oct ( p_AuthParams.RandValue ) ); + log("f_NG_Authentication_A4: v_S=", v_S); //P1 = RAND v_S := ( v_S & '0010'O ); //L1 = length of RAND (i.e. 0x00 0x10) + log("f_NG_Authentication_A4: v_S=", v_S); v_S := ( v_S & bit2oct (substr(p_AuthParams.XRES, 0, px_NAS_5GC_XRES_Length*8))); // @sic R5s190394 sic@ + log("f_NG_Authentication_A4: v_S=", v_S); //P2 = RES or XRES v_S := ( v_S & int2oct(px_NAS_5GC_XRES_Length, 2) ); // @sic R5w190117 sic@ + log("f_NG_Authentication_A4: v_S=", v_S); //L2 = length of RES/XRES (e.g. 0x00 0x10) - return substr(fx_KeyDerivationFunction(p_KDF, p_Key, v_S), 128, 128); + var bitstring bs := fx_KeyDerivationFunction(p_KDF, p_Key, v_S); // Already 128 bits length + + return bs; + //return substr(fx_KeyDerivationFunction(p_KDF, p_Key, v_S), 128, 128); // returns LSB 128 bits[truncated] of the key generated } diff --git a/ttcn/Lib3GPP/NG_NAS/NG_NAS_TypeDefs.ttcn b/ttcn/Lib3GPP/NG_NAS/NG_NAS_TypeDefs.ttcn index ab9b629f40e252df16c09d7b2ef57e50048e29ad..596b10f84736d7dc000dcad6f1ce5093101614e5 100644 --- a/ttcn/Lib3GPP/NG_NAS/NG_NAS_TypeDefs.ttcn +++ b/ttcn/Lib3GPP/NG_NAS/NG_NAS_TypeDefs.ttcn @@ -13,7 +13,7 @@ module NG_NAS_TypeDefs { import from CommonDefs all; import from NAS_CommonTypeDefs all; - + type enumerated NAS_5GC_AKA_Type {AKA_5G, AKAP_EAP}; //**************************************************************************** @@ -53,7 +53,12 @@ module NG_NAS_TypeDefs { EAP_Message eapMessage optional /* cl. 9.11.2.2 O TLV-E 7-1503 IEI=78 */ } with { variant "FIELDORDER(msb)"; - } + variant (ngNasKeySetId) "FORCEOMIT(iei)"; + variant (abba) "FORCEOMIT(iei)"; + variant "TAG(rand, iei = '21'O; + autn, iei = '20'O; + eapMessage, iei = '78'O)"; + } type record NG_AUTHENTICATION_RESPONSE { /* 24.501 cl. 8.2.2 Significance: dual @@ -64,9 +69,10 @@ module NG_NAS_TypeDefs { MessageType messageType, /* cl. 9.7 M V 1 */ AuthenticationResponseParameter authResponseParam optional, /* cl. 9.11.3.17 O TLV 18 IEI=2D */ EAP_Message eapMessage optional /* cl. 9.11.2.2 O TLV-E 7-1503 IEI=78 */ - } with { variant "FIELDORDER(msb)"; + variant "TAG(authResponseParam, iei = '2D'O; + eapMessage, iei = '78'O)"; } type record NG_AUTHENTICATION_RESULT { /* 24.501 cl. 8.2.3 @@ -80,9 +86,11 @@ module NG_NAS_TypeDefs { NAS_KeySetIdentifier ngNasKeySetId, /* cl. 9.11.3.32 M V 1/2 */ EAP_Message eapMessage, /* cl. 9.11.2.2 M LV-E 6-1502 */ ABBA abba optional /* cl. 9.11.3.10 O TLV 3-n IEI=38 Dec18 */ - } with { variant "FIELDORDER(msb)"; + variant (ngNasKeySetId) "FORCEOMIT(iei)"; + variant (eapMessage) "FORCEOMIT(iei)"; + variant "TAG(abba, iei = '38'O)"; } type record NG_AUTHENTICATION_FAILURE { /* 24.501 cl. 8.2.4 @@ -94,10 +102,11 @@ module NG_NAS_TypeDefs { MessageType messageType, /* cl. 9.7 M V 1 */ GMM_GSM_Cause gmmCause, /* cl. 9.11.3.2 M V 1 */ AuthenticationFailureParameter authFailureParam optional /* cl. 9.11.3.14 O TLV 16 IEI=30 */ - } with { variant "FIELDORDER(msb)"; - } + variant (gmmCause) "FORCEOMIT(iei)"; + variant "TAG(authFailureParam, iei = '30'O)"; + } type record NG_AUTHENTICATION_REJECT { /* 24.501 cl. 8.2.5 Significance: dual @@ -107,9 +116,9 @@ module NG_NAS_TypeDefs { SecurityHeaderType securityHeaderType, /* cl. 9.3 M V 1/2 */ MessageType messageType, /* cl. 9.7 M V 1 */ EAP_Message eapMessage optional /* cl. 9.11.2.2 O TLV-E 7-1503 IEI=78 Dec18 */ - } with { variant "FIELDORDER(msb)"; + variant "TAG(eapMessage, iei = '78'O)"; } type record NG_REGISTRATION_REQUEST { /* 24.501 cl. 8.2.6 @@ -163,6 +172,47 @@ module NG_NAS_TypeDefs { GPRS_Timer3 t3512Value optional /* cl. 9.11.2.5 O TLV 3 IEI=3B Jun23 @sic R5s230533 sic@ */ } with { variant "FIELDORDER(msb)"; + variant (ngNasKSI) "FORCEOMIT(iei)"; + variant (ngMobileId) "FORCEOMIT(iei)"; + variant "TAG(nonCurrentNativeKSI, iei = 'B'H; + gmmCapability, iei = '10'O; + ueSecurityCapability, iei = '2E'O; + requestedNSSAI, iei = '2F'O; + lastVisitedRegisteredTai, iei = '52'O; + s1_UE_Capability, iei = '17'O; + ulDataStatus, iei = '40'O; + pduSessionStatus, iei = '50'O; + micoInd, iei = 'B'H; + ueStatus, iei = '2B'O; + additionalGUTI, iei = '77'O; + allowedPDUSessionStatus, iei = '25'O; + ueUsageSetting, iei = '18'O; + reqDRXParams, iei = '51'O; + epsMessage, iei = '70'O; + ladnInd, iei = '74'O; + payloadContainerType, iei = '8'H; + payload, iei = '7B'O; + networkSlicingInd, iei = '9'H; + updateType, iei = '53'O; + msClassmark2, iei = '41'O; + supportedCodecs, iei = '42'O; + nasMsg, iei = '71'O; + epsBearerContextStatus, iei = '60'O; + requestedExtdDRXParams, iei = '6E'O; + t3324Value, iei = '6A'O; + ueRadioCapabilityId, iei = '67'O; + requestedMappedNSSAI, iei = '35'O; + additionalInfoReq, iei = '48'O; + requestedWUSAssistanceInfo, iei = '1A'O; + n5GCInd, iei = 'A'H; + requestedNB_N1DRXParams, iei = '30'O; + ueRequestType, iei = '29'O; + pagingRestrict, iei = '28'O; + serviceLvlAA, iei = '72'O; + nId, iei = '32'O; + msPLMNwDisasterCondition, iei = '16'O; + requestedPEIPS_AssistInfo, iei = '2A'O; + t3512Value, iei = '3B'O)"; } type record NG_REGISTRATION_ACCEPT { /* 24.501 cl. 8.2.7 @@ -225,6 +275,56 @@ module NG_NAS_TypeDefs { NSAG_Info nsagInfo optional /* cl. 9.11.3.87 O TLV-E 10-n IEI=7C Sep22 @sic R5s221179 Baseline Moving sic@ */ } with { variant "FIELDORDER(msb)"; + variant "TAG(guti, iei = '77'O; + equivalentPlmns, iei = '4a'O; + taiList, iei = '54'O; + allowedNSSAI, iei = '15'O; + rejectedNSSAI, iei = '11'O; + configuredNSSAI, iei = '31'O; + ngs_NetworkFeatureSupport, iei = '21'O; + pduSessionStatus, iei = '50'O; + pduSessionReactivationResult, iei = '26'O; + pduSessionReactResultError, iei = '72'O; + ladnInfo, iei = '79'O; + micoInd, iei = 'B'H; + networkSlicingInd, iei = '9'H; + saiList, iei = '27'O; + t3512Value, iei = '5E'O; + non3GPPDeregisterValue, iei = '5D'O; + t3502Value, iei = '16'O; + emergencyNumberList, iei = '34'O; + xtdEmergencyNumberList, iei = '7A'O; + sorTransparentContainer, iei = '73'O; + eapMessage, iei = '78'O; + inclusionModeNSSAI, iei = 'A'H; + operatorAccessCatDefs, iei = '76'O; + negotiatedDRXParams, iei = '51'O; + non3GPP_NW_ProvidedPolicies, iei = 'D'H; + epsBearerContextStatus, iei = '60'O; + negotiatedExtdDRXParams, iei = '6E'O; + t3447Value, iei = '6C'O; + t3448Value, iei = '6B'O; + t3324Value, iei = '6A'O; + ueRadioCapabilityId, iei = '67'O; + ueRadioCapIdDeletionInd, iei = 'E'H; + pendingNSSAI, iei = '39'O; + cipheringKeyData, iei = '74'O; + cagInfoList, iei = '75'O; + truncatedS_TMSIConfig, iei = '1B'O; + negotiatedWUSAssistanceInfo, iei = '1C'O; + negotiatedNB_N1DRXParams, iei = '29'O; + extdRejectedNSSAI, iei = '68'O; + serviceLvlAA, iei = '7B'O; + negotiatedPEIPS_AssistInfo, iei = '33'O; + ngAddRequestResult, iei = '35'O; + nssrgInfo, iei = '70'O; + disasterRoamingWaitRange, iei = '14'O; + disasterReturnWaitRange, iei = '2C'O; + disasterPLMNList, iei = '13'O; + forbidTAIList_Roaming, iei = '1D'O; + forbidTAIList_RegProvService, iei = '1E'O; + extdCAGInfoList, iei = '71'O; + nsagInfo, iei = '7C'O)" } type record NG_REGISTRATION_COMPLETE { /* 24.501 cl. 8.2.8 @@ -237,6 +337,7 @@ module NG_NAS_TypeDefs { SORTransparentContainer sorTransparentContainer optional /* cl. 9.11.3.51 O TLV-E 20-2048 IEI=73 */ } with { variant "FIELDORDER(msb)"; + variant "TAG(sorTransparentContainer, iei = '73'O)" } type record NG_REGISTRATION_REJECT { /* 24.501 cl. 8.2.9 @@ -260,6 +361,18 @@ module NG_NAS_TypeDefs { NG_TrackingAreaIdList forbidTAIList_RegProvService optional /* cl. 9.11.3.9 O TLV 9-114 IEI=1E Sep22 @sic R5s221179 Baseline Moving sic@ */ } with { variant "FIELDORDER(msb)"; + variant (gmmCause) "FORCEOMIT(iei)"; + variant "TAG(t3346, iei = '5f'O; + t3502, iei = '16'O; + eapMessage, iei = '78'O; + rejectedNSSAI, iei = '69'O; + cagInfoList, iei = '75'O; + extdRejectedNSSAI, iei = '68'O; + disasterReturnWaitRange, iei = '2C'O; + extdCAGInfoList, iei = '71'O; + lowerBoundTimerValue, iei = '3A'O; + forbidTAIList_Roaming, iei = '1D'O; + forbidTAIList_RegProvService, iei = '1E'O)" } type record NG_UL_NAS_TRANSPORT { /* 24.501 cl. 8.2.10 @@ -280,10 +393,19 @@ module NG_NAS_TypeDefs { AdditionalInformation additionalInfo optional, /* cl. 9.11.2.1 O TLV 3-n IEI=24 */ MA_PDUSessionInfo maPDUSessionInfo optional, /* cl. 9.11.3.31A O TV 1 IEI=A Sep20 @sic R5s201387 Baseline Moving sic@ */ ReleaseAssistanceInd releaseAssistanceInd optional /* cl. 9.11.3.46A O TV 1 IEI=F Sep20 @sic R5s201387 Baseline Moving sic@ */ - } with { variant "FIELDORDER(msb)"; - } + variant (payloadContainerType) "FORCEOMIT(iei)"; + variant (payload) "FORCEOMIT(iei)"; + variant "TAG(pduSessionId, iei = '12'O; + oldPDUSessionId, iei = '59'O; + requestType, iei = '8'H; + s_NSSAI, iei = '22'O; + dnn, iei = '25'O; + additionalInfo, iei = '24'O; + maPDUSessionInfo, iei = 'A'H; + releaseAssistanceInd, iei = 'F'H)" + } type record NG_DL_NAS_TRANSPORT { /* 24.501 cl. 8.2.11 Significance: dual @@ -300,10 +422,16 @@ module NG_NAS_TypeDefs { GMM_GSM_Cause gmmCause optional, /* cl. 9.11.3.2 O TV 2 IEI=58 */ GPRS_Timer3 backOffTimerValue optional, /* cl. 9.11.2.5 O TLV 3 IEI=37 */ GPRS_Timer3 lowerBoundTimerValue optional /* cl. 9.11.2.5 O TLV 3 IEI=3A Sep22 @sic R5s221179 Baseline Moving sic@ */ - - } with { - variant "FIELDORDER(msb)"; - } + } with { + variant "FIELDORDER(msb)"; + variant (payloadContainerType) "FORCEOMIT(iei)"; + variant (payload) "FORCEOMIT(iei)"; + variant "TAG(pduSessionId, iei = '12'O; + additionalInfo, iei = '24'O; + gmmCause, iei = '58'O; + backOffTimerValue, iei = '37'O; + lowerBoundTimerValue, iei = '3a'O)"; + } type record NG_DEREGISTRATION_REQUEST_MO { /* 24.501 cl. 8.2.12 (UE originating deregister) Significance: dual @@ -317,6 +445,8 @@ module NG_NAS_TypeDefs { NG_MobileIdentity ngMobileId /* cl. 9.11.3.4 M LV-E 6-n */ } with { variant "FIELDORDER(msb)"; + variant (ngKSI) "FORCEOMIT(iei)"; + variant (ngMobileId) "FORCEOMIT(iei)"; } type record NG_DEREGISTRATION_ACCEPT { /* 24.501 cl. 8.2.13/15 (both directions) @@ -339,7 +469,7 @@ module NG_NAS_TypeDefs { MessageType messageType, /* cl. 9.7 M V 1 */ SpareHalfOctet spareHalfOctet2, /* cl. 9.5 M V 1/2 */ DeregisterType deregistrationType, /* cl. 9.11.3.20 M V 1/2 */ - GMM_GSM_Cause gmmCause optional, /* cl. 9.11.3.2 O TV 2 IEI=058 */ + GMM_GSM_Cause gmmCause optional, /* cl. 9.11.3.2 O TV 2 IEI=58 */ GPRS_Timer2 t3346 optional, /* cl. 9.11.2.4 O TLV 3 IEI=5F */ RejectedNSSAI rejectedNSSAI optional, /* cl. 9.11.3.46 O TLV 4-42 IEI=6D Sep20 @sic R5s201387 Baseline Moving sic@ */ CAGInfoList cagInfoList optional, /* cl. 9.11.3.18A O TLV-E 3-n IEI=75 Sep20 @sic R5s201387 Baseline Moving sic@ */ @@ -349,9 +479,18 @@ module NG_NAS_TypeDefs { GPRS_Timer3 lowerBoundTimerValue optional, /* cl. 9.11.2.5 O TLV 3 IEI=3A Sep22 @sic R5s221179 Baseline Moving sic@ */ NG_TrackingAreaIdList forbidTAIList_Roaming optional, /* cl. 9.11.3.9 O TLV 9-114 IEI=1D Sep22 @sic R5s221179 Baseline Moving sic@ */ NG_TrackingAreaIdList forbidTAIList_RegProvService optional /* cl. 9.11.3.9 O TLV 9-114 IEI=1E Sep22 @sic R5s221179 Baseline Moving sic@ */ - } with { variant "FIELDORDER(msb)"; + variant "TAG(gmmCause, iei = '58'O; + t3346, iei = '5f'O; + rejectedNSSAI, iei = '6d'O; + cagInfoList, iei = '75'O; + extdRejectedNSSAI, iei = '68'O; + disasterReturnWaitRange, iei = '2c'O; + extdCAGInfoList, iei = '71'O; + lowerBoundTimerValue, iei = '3a'O; + forbidTAIList_Roaming, iei = '1d'O; + forbidTAIList_RegProvService, iei = '1e'O)"; } type record NG_SERVICE_REQUEST { /* 24.501 cl. 8.2.16 @@ -372,6 +511,14 @@ module NG_NAS_TypeDefs { NG_PagingRestriction pagingRestrict optional /* cl. 9.11.3.77 O TLV 3-35 IEI=28 Sep22 @sic R5s221179 Baseline Moving sic@ */ } with { variant "FIELDORDER(msb)"; + variant (ngKSI) "FORCEOMIT(iei)"; + variant (s_TMSI) "FORCEOMIT(iei)"; + variant "TAG(ulDataStatus, iei = '40'O; + pduSessionStatus, iei = '50'O; + allowedPDUSessionStatus, iei = '25'O; + nasMsg, iei = '71'O; + ueRequestType, iei = '29'O; + pagingRestrict, iei = '28'O)"; } type record NG_SERVICE_ACCEPT { /* 24.501 cl. 8.2.17 @@ -389,9 +536,17 @@ module NG_NAS_TypeDefs { NG_AddReqResult ngAddRequestResult optional, /* cl. 9.11.3.81 O TLV 3 IEI=34 Sep22 @sic R5s221179 Baseline Moving sic@ */ NG_TrackingAreaIdList forbidTAIList_Roaming optional, /* cl. 9.11.3.9 O TLV 9-114 IEI=1D Sep22 @sic R5s221179 Baseline Moving sic@ */ NG_TrackingAreaIdList forbidTAIList_RegProvService optional /* cl. 9.11.3.9 O TLV 9-114 IEI=1E Sep22 @sic R5s221179 Baseline Moving sic@ */ - } with { - variant "FIELDORDER(msb)"; - } + } with { + variant "FIELDORDER(msb)"; + variant "TAG(pduSessionStatus, iei = '50'O; + pduSessionReactivationResult, iei = '26'O; + pduSessionReactResultError, iei = '72'O; + eapMessage, iei = '78'O; + t3448, iei = '6b'O; + ngAddRequestResult, iei = '34'O; + forbidTAIList_Roaming, iei = '1d'O; + forbidTAIList_RegProvService, iei = '1e'O)"; + } type record NG_SERVICE_REJECT { /* 24.501 cl. 8.2.18 Significance: dual @@ -413,6 +568,17 @@ module NG_NAS_TypeDefs { NG_TrackingAreaIdList forbidTAIList_RegProvService optional /* cl. 9.11.3.9 O TLV 9-114 IEI=1E Sep22 @sic R5s221179 Baseline Moving sic@ */ } with { variant "FIELDORDER(msb)"; + variant (gmmCause) "FORCEOMIT(iei)"; + variant "TAG(pduSessionStatus, iei = '50'O; + t3346, iei = '5f'O; + eapMessage, iei = '78'O; + t3448, iei = '6b'O; + cagInfoList, iei = '75'O; + disasterReturnWaitRange, iei = '2c'O; + extdCAGInfoList, iei = '71'O; + lowerBoundTimerValue, iei = '3a'O; + forbidTAIList_Roaming, iei = '1d'O; + forbidTAIList_RegProvService, iei = '1e'O)"; } type record NG_CONFIGURATION_UPDATE_COMMAND { /* 24.501 cl. 8.2.19 @@ -458,6 +624,39 @@ module NG_NAS_TypeDefs { PriorityInd priorityInd optional /* cl. 9.11.3.91 O TV 1 IEI=E- Sep22 @sic R5s221179 Baseline Moving sic@ */ } with { variant "FIELDORDER(msb)"; + variant "TAG(configUpdateInd, iei = 'D'H; + guti, iei = '77'O; + taiList, iei = '54'O; + allowedNSSAI, iei = '15'O; + saiList, iei = '27'O; + fullNetworkName, iei = '43'O; + shortNetworkName, iei = '45'O; + localTimeZone, iei = '46'O; + localTimeZoneAndTime, iei = '47'O; + daylightSavingTime, iei = '49'O; + ladnInfo, iei = '79'O; + micoInd, iei = 'B'H; + networkSlicingInd, iei = '9'H; + configuredNSSAI, iei = '31'O; + rejectedNSSAI, iei = '11'O; + operatorAccessCatDefs, iei = '76'O; + smsInd, iei = 'F'H; + t3447Value, iei = '6C'O; + cagInfoList, iei = '75'O; + ueRadioCapabilityId, iei = '67'O; + ueRadioCapIdDeletionInd, iei = 'A'H; + truncatedS_TMSIConfig, iei = '1B'O; + addConfigInfo, iei = 'C'H; + extdRejectedNSSAI, iei = '68'O; + serviceLvlAA, iei = '72'O; + nssrgInfo, iei = '70'O; + disasterRoamingWaitRange, iei = '14'O; + disasterReturnWaitRange, iei = '2C'O; + disasterPLMNList, iei = '13'O; + extdCAGInfoList, iei = '71'O; + updatedPEIPS_AssistInfo, iei = '1F'O; + nsagInfo, iei = '73'O; + priorityInd, iei = 'E'H)"; } type record NG_CONFIGURATION_UPDATE_COMPLETE { /* 24.301 cl. 8.2.20 @@ -480,7 +679,6 @@ module NG_NAS_TypeDefs { MessageType messageType, /* cl. 9.7 M V 1 */ SpareHalfOctet spareHalfOctet2, /* cl. 9.5 M V 1/2 */ IdentityType identityType /* cl. 9.11.3.3 M V 1/2 */ - } with { variant "FIELDORDER(msb)"; } @@ -495,6 +693,7 @@ module NG_NAS_TypeDefs { NG_MobileIdentity ngMobileId /* cl. 9.11.3.4 M LV-E 3-n */ } with { variant "FIELDORDER(msb)"; + variant (ngMobileId) "FORCEOMIT(iei)"; } type record NG_NOTIFICATION { /* 24.501 cl. 8.2.23 @@ -506,9 +705,9 @@ module NG_NAS_TypeDefs { MessageType messageType, /* cl. 9.7 M V 1 */ SpareHalfOctet spareHalfOctet2, /* cl. 9.5 M V 1/2 */ AccessType accessType /* cl. 9.11.3.11 M V 1/2 */ - } with { variant "FIELDORDER(msb)"; + variant (accessType) "FORCEOMIT(iei)"; } type record NG_NOTIFICATION_RESPONSE { /* 24.501 cl. 8.2.24 @@ -521,6 +720,7 @@ module NG_NAS_TypeDefs { PDU_SessionStatus pduSessionStatus optional /* cl. 9.11.2.44 O TLV 4-34 IEI=50 */ } with { variant "FIELDORDER(msb)"; + variant "TAG(pduSessionStatus, iei = '50'O)"; } type record NG_SECURITY_MODE_COMMAND { /* 24.501 cl. 8.2.25 @@ -540,9 +740,16 @@ module NG_NAS_TypeDefs { EAP_Message eapMessage optional, /* cl. 9.11.2.2 O TLV-E 7-1503 IEI=78 */ ABBA abba optional, /* cl. 9.11.3.10 O TLV 4-n IEI=38 Dec18 */ S1_UE_SecurityCapability replayedUESecurityCap optional /* cl. 9.11.3.48A O TLV 4-7 IEI=19 Dec18 @sic R5s190421 sic@*/ - } with { variant "FIELDORDER(msb)"; + variant (ngNasKSI) "FORCEOMIT(iei)"; + variant (ueSecurityCapability) "FORCEOMIT(iei)"; + variant "TAG(imeisvRequest, iei = 'E'H; + epsSecurityAlgorithms, iei = '57'O; + add5GSecurityInfo, iei = '36'O; + eapMessage, iei = '78'O; + abba, iei = '38'O; + replayedUESecurityCap, iei = '19'O)"; } type record NG_SECURITY_MODE_COMPLETE { /* 24.501 cl. 8.2.26 @@ -557,6 +764,9 @@ module NG_NAS_TypeDefs { NG_MobileIdentity nonIMEISV_PEI optional /* cl. 9.11.3.4 O TLV-E 7-n IEI=78 Sep20 @sic R5s201387 Baseline Moving sic@ */ } with { variant "FIELDORDER(msb)"; + variant "TAG(imeisv, iei = '77'O; + nasMsg, iei = '71'O; + nonIMEISV_PEI, iei = '78'O)"; } type record NG_SECURITY_MODE_REJECT { /* 24.501 cl. 8.2.27 @@ -569,6 +779,7 @@ module NG_NAS_TypeDefs { GMM_GSM_Cause gmmCause /* cl. 9.11.3.2 M V 1 */ } with { variant "FIELDORDER(msb)"; + variant (gmmCause) "FORCEOMIT(iei)"; } type record NG_SECURITY_PROTECTED_NAS_MESSAGE { /* 24.501 cl. 8.2.28 @@ -582,9 +793,11 @@ module NG_NAS_TypeDefs { NG_NAS_Message plainNASMessage /* cl. 9.9 M V 3-n */ } with { variant "FIELDORDER(msb)"; - } + variant (messageAuthenticationCode) "BYTEORDER(last)"; + variant (plainNASMessage) "BYTEORDER(last)"; + } + - type record NG_GMM_STATUS { /* 24.501 cl. 8.2.29 Significance: dual Direction: both */ @@ -595,6 +808,7 @@ module NG_NAS_TypeDefs { GMM_GSM_Cause gmmCause /* cl. 9.11.3.2 M V 1 */ } with { variant "FIELDORDER(msb)"; + variant (gmmCause) "FORCEOMIT(iei)"; } type record NG_CP_SERVICE_REQUEST { /* 24.501 cl. 8.2.30 @sic R5s201387 Baseline Moving sic@ @@ -620,6 +834,21 @@ module NG_NAS_TypeDefs { NG_PagingRestriction pagingRestrict optional /* cl. 9.11.3.77 O TLV 3-35 IEI=28 Sep22 @sic R5s221179 Baseline Moving sic@ */ } with { variant "FIELDORDER(msb)"; + variant (ngKSI) "FORCEOMIT(iei)"; + variant (cpServiceType) "FORCEOMIT(iei)"; + variant "TAG(cIoTSmallDataContainer, iei = '6f'O; + payloadContainerType, iei = '8'H; + payload, iei = '7B'O; + pduSessionId, iei = '12'O; + pduSessionStatus, iei = '50'O; + releaseAssistanceInd, iei = 'F'H; + ulDataStatus, iei = '40'O; + nasMsg, iei = '71'O; + additionalInfo, iei = '24'O; + allowedPDUSessionStatus, iei = '25'O; + ueRequestType, iei = '29'O; + pagingRestrict, iei = '28'O; + )"; } type record NG_NETWORK_SLICE_SPECIFIC_AUTHENTICATION_COMMAND { /* 24.501 cl. 8.2.31 @sic R5s201387 Baseline Moving sic@ @@ -633,6 +862,7 @@ module NG_NAS_TypeDefs { EAP_Message eapMessage /* cl. 9.11.2.2 M LV-E 6-1502 */ } with { variant "FIELDORDER(msb)"; + variant (eapMessage) "FORCEOMIT(iei)"; } type record NG_NETWORK_SLICE_SPECIFIC_AUTHENTICATION_COMPLETE { /* 24.501 cl. 8.2.32 @sic R5s201387 Baseline Moving sic@ @@ -646,6 +876,7 @@ module NG_NAS_TypeDefs { EAP_Message eapMessage /* cl. 9.11.2.2 M LV-E 6-1502 */ } with { variant "FIELDORDER(msb)"; + variant (eapMessage) "FORCEOMIT(iei)"; } type record NG_NETWORK_SLICE_SPECIFIC_AUTHENTICATION_RESULT { /* 24.501 cl. 8.2.33 @sic R5s201387 Baseline Moving sic@ @@ -659,6 +890,7 @@ module NG_NAS_TypeDefs { EAP_Message eapMessage /* cl. 9.11.2.2 M LV-E 6-1502 */ } with { variant "FIELDORDER(msb)"; + variant (eapMessage) "FORCEOMIT(iei)"; } //---------------------------------------------------------------------------- @@ -692,6 +924,25 @@ module NG_NAS_TypeDefs { RSN rsn optional /* cl. 9.11.4.33 O TLV 3 IEI=35 Sep22 @sic R5s221179 Baseline Moving sic@ */ } with { variant "FIELDORDER(msb)"; + variant (integrityProtMaxDataRate) "FORCEOMIT(iei)"; + variant "TAG(pduSessionType, iei = '9'H; + sscMode, iei = 'A'H; + smCapability, iei = '28'O; + maxNumPacketFilters, iei = '55'O; + alwaysOnPDUSessionReq, iei = 'B'H; + smPDU_RequestContainer, iei = '39'O; + extdProtocolConfigurationOptions, iei = '7B'O; + ipHeaderCompressionConfig, iei = '66'O; + ds_TT_EthernetPortMACAddr, iei = '6E'O; + ueDS_TT_ResidenceTime, iei = '6F'O; + portManagementInfoContainer, iei = '74'O; + ethernetHeaderCompressConfig, iei = '1F'O; + suggestedInterfaceId, iei = '29'O; + serviceLvlAA, iei = '72'O; + requestedMBS, iei = '70'O; + pduSessionPairId, iei = '34'O; + rsn, iei = '35'O; + )"; } type record NG_PDU_SESSION_ESTABLISHMENT_ACCEPT { /* 24.501 cl. 8.3.2 @@ -725,6 +976,28 @@ module NG_NAS_TypeDefs { ReceivedMBSContainer receivedMBS optional /* cl. 9.11.4.31 O TLV-E 9-65538 IEI=71 Sep22 @sic R5s221179 Baseline Moving sic@ */ } with { variant "FIELDORDER(msb)"; + variant (sscMode) "FORCEOMIT(iei)"; + variant (pduSessionType) "FORCEOMIT(iei)"; + variant (authorizedQoSRules) "FORCEOMIT(iei)"; + variant (sessionAMBR) "FORCEOMIT(iei)"; + variant "TAG(gsmCause, iei = '59'O; + pduAddress, iei = '29'O; + rqTimerValue, iei = '56'O; + s_NSSAI, iei = '22'O; + alwaysOnPDUSessionInd, iei = '8'H; + mappedEPSContexts, iei = '75'O; + eapMessage, iei = '78'O; + authorizedQoSFlowDescr, iei = '79'O; + extdProtocolConfigurationOptions, iei = '7b'O; + dnn, iei = '25'O; + ngs_NetworkFeatureSupport, iei = '27'O; + servingPLMNRateControl, iei = '18'O; + atsssContainer, iei = '77'O; + controlPlaneOnlyIndication, iei = 'C'H; + ipHeaderCompressionConfig, iei = '66'O; + ethernetHeaderCompressConfig, iei = '1f'O; + serviceLvlAA, iei = '72'O; + receivedMBS, iei = '71'O)"; } type record NG_PDU_SESSION_ESTABLISHMENT_REJECT { /* 24.501 cl. 8.3.3 @@ -744,6 +1017,14 @@ module NG_NAS_TypeDefs { ServiceLvlAAContainer serviceLvlAA optional /* cl. 9.11.2.10 O TLV-E 6-n IEI=72 Sep22 @sic R5s221179 Baseline Moving sic@ */ } with { variant "FIELDORDER(msb)"; + variant (gsmCause) "FORCEOMIT(iei)"; + variant "TAG(backOffTimerValue, iei = '37'O; + allowedSSCMode, iei = 'F'H; + eapMessage, iei = '78'O; + ngsmCongestionReattemptInd, iei = '61'O; + extdProtocolConfigurationOptions, iei = '7b'O; + reattemptInd, iei = '1d'O; + serviceLvlAA, iei = '72'O)"; } type record NG_PDU_SESSION_AUTHENTICATION_COMMAND { /* 24.501 cl. 8.3.4 @@ -757,6 +1038,8 @@ module NG_NAS_TypeDefs { ExtdProtocolConfigOptions extdProtocolConfigurationOptions optional /* cl. 9.11.4.6 O TLV-E 4-65538 IEI=0x7B */ } with { variant "FIELDORDER(msb)"; + variant (eapMessage) "FORCEOMIT(iei)"; + variant "TAG(extdProtocolConfigurationOptions, iei = '7b'O)"; } type record NG_PDU_SESSION_AUTHENTICATION_COMPLETE { /* 24.501 cl. 8.3.5 @@ -770,6 +1053,8 @@ module NG_NAS_TypeDefs { ExtdProtocolConfigOptions extdProtocolConfigurationOptions optional /* cl. 9.11.4.6 O TLV-E 4-65538 IEI=0x7B */ } with { variant "FIELDORDER(msb)"; + variant (eapMessage) "FORCEOMIT(iei)"; + variant "TAG(extdProtocolConfigurationOptions, iei = '7b'O)"; } type record NG_PDU_SESSION_AUTHENTICATION_RESULT { /* 24.501 cl. 8.3.6 @@ -783,6 +1068,8 @@ module NG_NAS_TypeDefs { ExtdProtocolConfigOptions extdProtocolConfigurationOptions optional /* cl. 9.11.4.6 O TLV-E 4-65538 IEI=0x7B */ } with { variant "FIELDORDER(msb)"; + variant "TAG(eapMessage, iei = '78'O; + extdProtocolConfigurationOptions, iei = '7b'O)"; } type record NG_PDU_SESSION_MODIFICATION_REQUEST { /* 24.501 cl. 8.3.7 @@ -808,6 +1095,21 @@ module NG_NAS_TypeDefs { ServiceLvlAAContainer serviceLvlAA optional /* cl. 9.11.2.10 O TLV-E 6-n IEI=72 Sep22 @sic R5s221179 Baseline Moving sic@ */ } with { variant "FIELDORDER(msb)"; + variant "TAG(smCapability, iei = '28'O; + gsmCause, iei = '59'O; + maxNumPacketFilters, iei = '55'O; + alwaysOnPDUSessionReq, iei = 'B'H; + integrityProtMaxDataRate, iei = '13'O; + requestedQoSRules, iei = '7A'O; + requestedQoSFlowDescr, iei = '79'O; + mappedEPSbearerContexts, iei = '75'O; + extdProtocolConfigurationOptions, iei = '7B'O; + portManagementInfoContainer, iei = '74'O; + ipHeaderCompressionConfig, iei = '66'O; + ethernetHeaderCompressConfig, iei = '1F'O; + requestedMBS, iei = '70'O; + serviceLvlAA, iei = '72'O; + )"; } type record NG_PDU_SESSION_MODIFICATION_REJECT { /* 24.501 cl. 8.3.8 @@ -824,6 +1126,12 @@ module NG_NAS_TypeDefs { ReAttemptIndicator reattemptInd optional /* cl. 9.11.4.17 O TLV 3 IEI=1D Sep20 @sic R5s201387 Baseline Moving sic@ */ } with { variant "FIELDORDER(msb)"; + variant (gsmCause) "FORCEOMIT(iei)"; + variant "TAG(backOffTimerValue, iei = '37'O; + ngsmCongestionReattemptInd, iei = '61'O; + extdProtocolConfigurationOptions, iei = '7b'O; + reattemptInd, iei = '1d'O; + )"; } type record NG_PDU_SESSION_MODIFICATION_COMMAND { /* 24.501 cl. 8.3.9 @@ -848,8 +1156,25 @@ module NG_NAS_TypeDefs { EthernetHeaderCompressConfig ethernetHeaderCompressConfig optional, /* cl. 9.11.4.28 O TLV 3 IEI=1F Sep20 @sic R5s201387 Baseline Moving sic@ */ ReceivedMBSContainer receivedMBS optional, /* cl. 9.11.4.31 O TLV-E 9-65538 IEI=71 Sep22 @sic R5s221179 Baseline Moving sic@ */ ServiceLvlAAContainer serviceLvlAA optional /* cl. 9.11.2.10 O TLV-E 6-n IEI=72 Sep22 @sic R5s221179 Baseline Moving sic@ */ - } with { - variant "FIELDORDER(msb)"; + } with { // Check code for mappedEPSContexts: ETSI TS 124 501 V16.14.0 (2023-09) Table 8.3.7.1.1: PDU SESSION MODIFICATION REQUEST message content + // Check code for mappedEPSContexts: ETSI TS 124 501 V16.14.0 (2023-09) Table 8.3.7.1.1 note + variant "FIELDORDER(msb)"; + variant "TAG(gsmCause, iei = '59'O; + sessionAMBR, iei = '2A'O; + rqTimerValue, iei = '56'O; + alwaysOnPDUSessionInd, iei = '8'H; + authorizedQoSRules, iei = '7A'O; + mappedEPSContexts, iei = '75'O; + authorizedQoSFlowDescr, iei = '79'O; + extdProtocolConfigurationOptions, iei = '7B'O; + atsssContainer, iei = '77'O; + ipHeaderCompressionConfig, iei = '66'O; + portManagementInfoContainer, iei = '74'O; + servingPLMNRateControl, iei = '1E'O; + ethernetHeaderCompressConfig, iei = '1F'O; + receivedMBS, iei = '71'O; + serviceLvlAA, iei = '72'O; + )"; } type record NG_PDU_SESSION_MODIFICATION_COMPLETE { /* 24.501 cl. 8.3.10 @@ -863,6 +1188,9 @@ module NG_NAS_TypeDefs { PortManagementInfoContainer portManagementInfoContainer optional /* cl. 9.11.4.27 O TLV-E 8-65538 IEI=74 Sep20 @sic R5s201387, R5s210444 Baseline Moving sic@ */ } with { variant "FIELDORDER(msb)"; + variant "TAG(extdProtocolConfigurationOptions, iei = '7B'O; + portManagementInfoContainer, iei = '74'O; + )"; } type record NG_PDU_SESSION_MODIFICATION_COMMAND_REJECT { /* 24.501 cl. 8.3.11 @@ -876,6 +1204,8 @@ module NG_NAS_TypeDefs { ExtdProtocolConfigOptions extdProtocolConfigurationOptions optional /* cl. 9.11.4.6 O TLV-E 4-65538 IEI=7B */ } with { variant "FIELDORDER(msb)"; + variant (gsmCause) "FORCEOMIT(iei)"; + variant "TAG(extdProtocolConfigurationOptions, iei = '7B'O)"; } type record NG_PDU_SESSION_RELEASE_REQUEST { /* 24.501 cl. 8.3.12 @@ -889,6 +1219,8 @@ module NG_NAS_TypeDefs { ExtdProtocolConfigOptions extdProtocolConfigurationOptions optional /* cl. 9.11.4.6 O TLV-E 4-65538 IEI=0x7B */ } with { variant "FIELDORDER(msb)"; + variant "TAG(gsmCause, iei = '59'O; + extdProtocolConfigurationOptions, iei = '7b'O)"; } type record NG_PDU_SESSION_RELEASE_REJECT { /* 24.501 cl. 8.3.13 @@ -902,6 +1234,8 @@ module NG_NAS_TypeDefs { ExtdProtocolConfigOptions extdProtocolConfigurationOptions optional /* cl. 9.11.4.6 O TLV-E 4-65538 IEI=0x7B */ } with { variant "FIELDORDER(msb)"; + variant (gsmCause) "FORCEOMIT(iei)"; + variant "TAG(extdProtocolConfigurationOptions, iei = '7b'O)"; } type record NG_PDU_SESSION_RELEASE_COMMAND { /* 24.501 cl. 8.3.14 @@ -920,6 +1254,14 @@ module NG_NAS_TypeDefs { ServiceLvlAAContainer serviceLvlAA optional /* cl. 9.11.2.10 O TLV-E 6-n IEI=72 Sep22 @sic R5s221179 Baseline Moving sic@ */ } with { variant "FIELDORDER(msb)"; + variant (gsmCause) "FORCEOMIT(iei)"; + variant "TAG(backOffTimerValue, iei = '37'O; + eapMessage, iei = '78'O; + ngsmCongestionReattemptInd, iei = '61'O; + extdProtocolConfigurationOptions, iei = '7B'O; + accessType, iei = 'D'H; + serviceLvlAA, iei = '72'O; + )"; } type record NG_PDU_SESSION_RELEASE_COMPLETE { /* 24.501 cl. 8.3.15 @@ -933,6 +1275,8 @@ module NG_NAS_TypeDefs { ExtdProtocolConfigOptions extdProtocolConfigurationOptions optional /* cl. 9.11.4.6 O TLV-E 4-65538 IEI=0x7B */ } with { variant "FIELDORDER(msb)"; + variant "TAG(gsmCause, iei = '59'O; + extdProtocolConfigurationOptions, iei = '7b'O)"; } type record NG_GSM_STATUS { /* 24.501 cl. 8.3.16 @@ -945,6 +1289,7 @@ module NG_NAS_TypeDefs { GMM_GSM_Cause gsmCause /* cl. 9.11.4.2 M V 1 */ } with { variant "FIELDORDER(msb)"; + variant (gsmCause) "FORCEOMIT(iei)"; } //---------------------------------------------------------------------------- @@ -955,6 +1300,11 @@ module NG_NAS_TypeDefs { IEI8_Type iei optional, /* present in case of TV; omit in case of V */ Type4Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ octetstring dnnValue + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (dnnValue)"; + variant (iel) "BYTEORDER(last)"; + variant (dnnValue) "BYTEORDER(last)"; }; type record EAP_Message { /* 24.501 cl. 9.11.2.2 */ @@ -962,17 +1312,26 @@ module NG_NAS_TypeDefs { Type6Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ octetstring eapMsg /* RFC 5448, RFC 4187 EAP_Message_Type will be encoded in NAS Emulator */ } with { - variant (iel) "LENGTHTO (eapMsg)" + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (eapMsg)"; + variant (iel) "BYTEORDER(last)"; + variant (eapMsg) "BYTEORDER(last)"; } type record S_NSSAI_Type { // 24.501 cl. 9.11.2.8 IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ S_NSSAI_LV lvPart /* separated definition into TLV, LV and V parts Sep22 @sic R5s221179 Baseline Moving sic@ */ + } with { + variant "FIELDORDER(msb)"; }; type record S_NSSAI_LV { // 24.501 cl. 9.11.2.8 Type4Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ S_NSSAI_V vPart + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (vPart)"; + variant (iel) "BYTEORDER(last)"; }; type record S_NSSAI_V { // 24.501 cl. 9.11.2.8 @@ -980,6 +1339,8 @@ module NG_NAS_TypeDefs { O3_Type sd optional, O1_Type mappedSST optional, O3_Type mappedSD optional + } with { + variant "FIELDORDER(msb)"; }; type union ServiceLvlAAParam { @@ -990,20 +1351,31 @@ module NG_NAS_TypeDefs { SL_AA_Payload payload, SL_AA_PendingInd pendingInd, SL_AA_StatusInd statusInd // @sic R5s230533 sic@ + } with { + variant ""; }; - + type record of ServiceLvlAAParam ServiceLvlAAParamList; type record ServiceLvlAAContainer { /* 24.501 cl. 9.11.2.10 */ IEI8_Type iei optional, /* present in case of TV; omit in case of V */ Type6Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ ServiceLvlAAParamList contents + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (contents)"; + variant (iel) "BYTEORDER(last)"; }; type record SL_AA_DeviceId { /* 24.501 cl. 9.11.2.11 */ IEI8_Type iei ('10'O), Type4Length_Type iel, octetstring id + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (id)"; + variant (iel) "BYTEORDER(last)"; + variant (id) "BYTEORDER(last)"; }; type record SL_AA_ServerAddr { /* 24.501 cl. 9.11.2.12 */ @@ -1011,6 +1383,11 @@ module NG_NAS_TypeDefs { Type4Length_Type iel, O1_Type addrType, octetstring addr + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (addrType, addr)"; + variant (iel) "BYTEORDER(last)"; + variant (addr) "BYTEORDER(last)"; }; type record SL_AA_Response { /* 24.501 cl. 9.11.2.14 */ @@ -1019,25 +1396,39 @@ module NG_NAS_TypeDefs { B4_Type spare, B2_Type c2ar, B2_Type slar - + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (spare, c2ar, slar)"; + variant (iel) "BYTEORDER(last)"; }; type record SL_AA_PayloadType { /* 24.501 cl. 9.11.2.15 */ IEI8_Type iei ('40'O), Type4Length_Type iel, O1_Type payloadType + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (payloadType)"; + variant (iel) "BYTEORDER(last)"; }; type record SL_AA_Payload { /* 24.501 cl. 9.11.2.13 */ IEI8_Type iei ('70'O), Type6Length_Type iel, octetstring payload + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (payload)"; + variant (iel) "BYTEORDER(last)"; + variant (payload) "BYTEORDER(last)"; }; type record SL_AA_PendingInd { /* 24.501 cl. 9.11.2.17 */ IEI4_Type iei ('A'H), B3_Type spare, B1_Type slapi + } with { + variant "FIELDORDER(msb)"; }; type record SL_AA_StatusInd { /* 24.501 cl. 9.11.2.18 @sic R5s230533 sic@ */ @@ -1045,6 +1436,10 @@ module NG_NAS_TypeDefs { Type4Length_Type iel, B7_Type spare, B1_Type uas + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (spare, uas)"; + variant (iel) "BYTEORDER(last)"; }; type record NG_GMM_Cap { /* 24.501 cl. 9.11.3.1 */ @@ -1094,13 +1489,18 @@ module NG_NAS_TypeDefs { B1_Type rcman optional, /* Jun23 @sic R5s230533 sic@ */ B1_Type rcmap optional, /* Jun23 @sic R5s230533 sic@ */ octetstring spare length (1..7) optional // @sic R5w190307, R5s230533 sic@ + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO(sgc, ngIPHC_CP_CIoT, n3Data, ng_CP_CIoT, restrictEC, lpp, hoAttach, s1Cap, racs, nssaa, ngLCS, v2xNPC5, v2xEPC5, v2x, ng_UP_CIoT, ngSRVCC, ngProSeL2relay, ngProSe_dc, ngProSe_dd, erNSSAI, ngEHC_CP_CIoT, multipleUP, wusa, cag, pr, rpr, piv, ncr, nrPSSI, ngProSeL3rmt, ngProSeL2rmt, ngProSeL3relay, mpsiu, uas, nsag, exCAG, ssnpnsi, eventNotification, mint, nssrg, spareBits, rcman, rcmap, spare)"; + variant (iel) "BYTEORDER(last)"; + variant (spare) "BYTEORDER(last)"; }; - + type record GMM_GSM_Cause { /* 24.501 cl. 9.11.3.2, 9.11.4.2 */ IEI8_Type iei optional, /* present in case of TV; omit in case of V */ NAS_CauseValue_Type causeValue - } with { - variant "FIELDORDER(msb),FORCEOMIT(iei)" + } with { + variant "FIELDORDER(msb)"; }; type record NGSM_CongestionReattemptInd { /* 24.501 cl. 9.11.3.2, 9.11.4.21 */ @@ -1109,8 +1509,10 @@ module NG_NAS_TypeDefs { B6_Type spareBits, /* Sep22 @sic R5s221179 Baseline Moving sic@ */ B1_Type catbo, /* Sep22 @sic R5s221179 Baseline Moving sic@ */ B1_Type abo - } with { - variant "FIELDORDER(msb),FORCEOMIT(iei)" + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO(spareBits, catbo, abo)"; + variant (iel) "BYTEORDER(last)"; }; type DRXParamCommon NG_DRXparameter; // 24.501 cl. 9.11.3.2A @@ -1124,8 +1526,11 @@ module NG_NAS_TypeDefs { B1_Type oddEvenInd, // Odd/even indicator or Spare NAS_IdType typeOfId, // Type of identity octetstring otherDigits length (1..infinity) optional // Other identity digits, could be any length @sic R5-192389, @sic R5w190307 sic@ sic@ - } with { - variant "FIELDORDER(msb),FORCEOMIT(iei)" + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO(idDigit1, oddEvenInd, typeOfId, otherDigits)"; + variant (iel) "BYTEORDER(last)"; + variant (otherDigits) "BYTEORDER(first)"; }; type record NG_NetworkFeatureSupport { /* 24.501 cl 9.11.3.5 */ @@ -1152,6 +1557,10 @@ module NG_NAS_TypeDefs { B1_Type ngEHC_CP_CIoT optional, /* Sep20 @sic R5s201387, R5s221179 Baseline Moving sic@ */ B1_Type atsInd optional, /* Sep20 @sic R5s201387, R5s221179 Baseline Moving sic@ */ B1_Type ngLCS optional /* Sep20 @sic R5s201387, R5s221179 Baseline Moving sic@ */ + } with { + variant "FIELDORDER(msb)" + variant (iel) "LENGTHTO(mpsi, iwk_N26, emf, emc, imsVoPS_n3GPP, imsVoPS_3GPP, ng_UP_CIoT, ngIPHC_CP_CIoT, n3Data, ng_CP_CIoT, restrictEC, mcsi, emcn3, spareBit, pr, rpr, piv, ncr, ngEHC_CP_CIoT, atsInd, ngLCS)"; + variant (iel) "BYTEORDER(last)"; }; type record RegistrationResult { /* 24.501 cl. 9.11.3.6 */ @@ -1163,18 +1572,26 @@ module NG_NAS_TypeDefs { B1_Type nssaaPerformed, /* Sep20 @sic R5s201387 Baseline Moving sic@ */ B1_Type smsAllowed, B3_Type resultValue + }with{ + variant "FIELDORDER(msb)" + variant (iel) "LENGTHTO(spare, disasterRoamingResult, emergencyRegistered, nssaaPerformed, smsAllowed, resultValue)"; + variant (iel) "BYTEORDER(last)"; }; type record RegistrationType { /* 24.501 cl. 9.11.3.7 */ // IEI is always skipped B1_Type fOR, B3_Type registrationType - }with{ variant "FIELDLENGTH(4), FIELDORDER(msb)"}; + }with{ + variant "FIELDORDER(msb)" + }; type record NG_TrackingAreaId { /* 24.501 cl. 9.11.3.8 */ IEI8_Type iei optional, /* present in case of TV; omit in case of V */ NAS_PlmnId plmnId, /* MCC + MNC 3 digits each */ - O3_Type tac /* NG TAC 3 octets */ + O3_Type tac + }with{ + variant "FIELDORDER(msb)" /* NG TAC 3 octets */ }; type record length (1..16) of O3_Type NG_NAS_TacList; @@ -1182,25 +1599,35 @@ module NG_NAS_TypeDefs { type record NG_PartialTai { NAS_PlmnId plmnId, /* MCC + MNC 3 digits each */ O3_Type tac + }with{ + variant "FIELDORDER(msb)" }; type record NG_Type0Element { NAS_PlmnId plmnId, /* MCC + MNC 3 digits each */ NG_NAS_TacList tacList + }with{ + variant "FIELDORDER(msb)" }; type record NG_Type1Element { NG_PartialTai partialTac + }with{ + variant "FIELDORDER(msb)" }; type record length (1..16) of NG_PartialTai NG_PlmnAndTacs; type record NG_Type2Element { NG_PlmnAndTacs plmnAndTacs + }with{ + variant "FIELDORDER(msb)" }; type record NG_Type3Element { NAS_PlmnId plmnId /* MCC + MNC 3 digits each */ + }with{ + variant "FIELDORDER(msb)" }; type record length (1..16) of NG_Type0Element NG_Type0List; @@ -1212,6 +1639,8 @@ module NG_NAS_TypeDefs { NG_Type1List type1List, NG_Type2List type2List, NG_Type3Element type3 // Type 3 elements only allowed in SAIList + }with{ + variant "FIELDORDER(msb)" }; type record NG_ListOfPartialTaiList { @@ -1219,18 +1648,26 @@ module NG_NAS_TypeDefs { B2_Type typeOfList, B5_Type numberOfElements, NG_PartialTaiType partialTaiList + }with{ + variant "FIELDORDER(msb)" }; type NG_TrackingAreaIdList ServiceAreaIdList; // 24.501 cl. 9.11.3.45 TAIList can be Type 0, 1 or 2; SAIList can be Type 0, 1, 2 or 3 - + type record NG_TrackingAreaIdList { /* 24.501 cl. 9.11.3.9 */ IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ NG_TrackingAreaIdList_LV lvPart /* separated definition into TLV and LV parts Sep22 @sic R5s221179 Baseline Moving sic@ */ + }with{ + variant "FIELDORDER(msb)" }; type record NG_TrackingAreaIdList_LV { /* 24.501 cl. 9.11.3.9 */ Type4Length_Type iel, record length (1..16) of NG_ListOfPartialTaiList listOfPartialTais + }with{ + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (listOfPartialTais)"; + variant (iel) "BYTEORDER(last)"; }; type record NG_UpdateType { /* 24.501 cl. 9.11.3.9A */ @@ -1243,9 +1680,10 @@ module NG_NAS_TypeDefs { B1_Type smsRequested } with { variant "FIELDORDER(msb)"; - variant "FORCEOMIT(iei)"; + variant (iel) "LENGTHTO (spare, eps_PNB_CIoT, ng_PNB_CIoT, ngRAN_RCU, smsRequested)"; + variant (iel) "BYTEORDER(last)"; }; - + type record ABBA { /* 24.501 cl. 9.11.3.10 */ IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ Type4Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ @@ -1253,18 +1691,17 @@ module NG_NAS_TypeDefs { } with { variant "FIELDORDER(msb)"; variant (iel) "LENGTHTO (abbaValue)"; - variant "FORCEOMIT(iei)"; + variant (iel) "BYTEORDER(last)"; } - + type record AccessType { /* 24.501 cl. 9.11.2.1A */ IEI4_Type iei optional, /* present in case of TV; omit in case of V */ B2_Type spare, B2_Type accessType } with { variant "FIELDORDER(msb)"; - variant "FORCEOMIT(iei)"; }; - + type record AdditionalSecurityInfo { /* 24.501 cl 9.11.3.12 */ IEI8_Type iei optional, /* present in case of TV; omit in case of V */ Type4Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ @@ -1273,7 +1710,9 @@ module NG_NAS_TypeDefs { B1_Type hdp } with { variant "FIELDORDER(msb)"; - variant "FORCEOMIT(iei)"; + variant (iel) "LENGTHTO (spareBits, rinmr, hdp)"; + variant (iel) "BYTEORDER(last)"; + }; type record AddInfoRequest { /* 24.501 cl 9.11.3.12A */ @@ -1283,7 +1722,8 @@ module NG_NAS_TypeDefs { B1_Type cipherKey } with { variant "FIELDORDER(msb)"; - variant "FORCEOMIT(iei)"; + variant (iel) "LENGTHTO (spareBits, cipherKey)"; + variant (iel) "BYTEORDER(last)"; }; type record ConfigUpdateInd { /* 24.501 cl. 9.11.3.18 */ @@ -1301,7 +1741,8 @@ module NG_NAS_TypeDefs { record of CAG_Info listOfCAGInfos optional } with { variant "FIELDORDER(msb)"; - variant "FORCEOMIT(iei)"; + variant (iel) "LENGTHTO (listOfCAGInfos)"; + variant (iel) "BYTEORDER(last)"; }; type record CAG_Info { /* 24.501 cl. 9.11.3.18A */ @@ -1309,6 +1750,8 @@ module NG_NAS_TypeDefs { CAG_Info_V cagValue // Sep22 @sic R5s221179 Baseline Moving sic@ } with { variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (cagValue)"; + variant (iel) "BYTEORDER(last)"; }; type record CAG_Info_V { /* 24.501 cl. 9.11.3.18A, 9.11.3.86 */ @@ -1326,6 +1769,8 @@ module NG_NAS_TypeDefs { record of ExtdCAG_Info listOfCAGInfos optional } with { variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (listOfCAGInfos)"; + variant (iel) "BYTEORDER(last)"; }; type record ExtdCAG_Info { /* 24.501 cl. 9.11.3.86 */ @@ -1333,6 +1778,8 @@ module NG_NAS_TypeDefs { CAG_Info_V cagValue // Sep22 @sic R5s221179 Baseline Moving sic@ } with { variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (cagValue)"; + variant (iel) "BYTEORDER(last)"; }; type record CIoTSmallDataContainer { /* 24.501 cl. 9.11.3.18B */ @@ -1346,6 +1793,10 @@ module NG_NAS_TypeDefs { octetstring dataContents } with { variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (dataType, ddx, pduSessionId, lengthOfAddInfo, addInfo, dataContents)"; + variant (iel) "BYTEORDER(last)"; + variant (addInfo) "BYTEORDER(last)"; + variant (dataContents) "BYTEORDER(last)"; }; type record CIoTSmallDataRxdString { /* 24.501 cl. 9.11.3.18B @@ -1355,15 +1806,17 @@ module NG_NAS_TypeDefs { octetstring encodedstring } with { variant "FIELDORDER(msb)"; + variant (encodedstring) "BYTEORDER(last)"; }; - + type record NG_CipheringKeyData { /* 24.501 cl. 9.11.3.18C Must differentiate between the 5G and the EPC versions */ IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ Type6Length_Type iel, record length (1..16) of NG_CipherDataSet listOfCipherKeyData optional } with { variant "FIELDORDER(msb)"; - variant "FORCEOMIT(iei)"; + variant (iel) "LENGTHTO (listOfCipherKeyData)"; + variant (iel) "BYTEORDER(last)"; }; type record NG_CipherDataSet { /* 24.501 cl. 9.11.3.18C */ @@ -1392,6 +1845,11 @@ module NG_NAS_TypeDefs { record length (1..16) of NG_ListOfPartialTaiList listOfPartialTais optional } with { variant "FIELDORDER(msb)"; + variant (c0Length) "LENGTHTO (c0)"; + variant (c0Length) "BYTEORDER(last)"; + variant (id) "BYTEORDER(last)"; + variant (key) "BYTEORDER(last)"; + variant (c0) "BYTEORDER(last)"; }; type record CP_ServiceType { /* 24.301 cl. 9.9.3.18D */ @@ -1400,7 +1858,6 @@ module NG_NAS_TypeDefs { NAS_KsiValue nasKeySetId } with { variant "FIELDORDER(msb)"; - variant "FORCEOMIT(iei)"; }; type record DeregisterType { // 24.501 cl. 9.11.3.20 @@ -1419,7 +1876,8 @@ module NG_NAS_TypeDefs { } with { variant "FIELDORDER(msb)"; variant (iel) "LENGTHTO (epsMsg)"; - variant "FORCEOMIT(iei)"; + variant (iel) "BYTEORDER(last)"; + variant (epsMsg) "BYTEORDER(last)"; }; type record LADN_Ind { /* 24.501 cl. 9.11.3.29 */ @@ -1429,7 +1887,8 @@ module NG_NAS_TypeDefs { } with { variant "FIELDORDER(msb)"; variant (iel) "LENGTHTO (listOfLADN_DNNValues)"; - variant "FORCEOMIT(iei)"; + variant (iel) "BYTEORDER(last)"; + variant (listOfLADN_DNNValues) "BYTEORDER(last)"; }; type record ListOfLADN { @@ -1439,14 +1898,19 @@ module NG_NAS_TypeDefs { record length (1..16) of NG_ListOfPartialTaiList listOfPartialTais // same as TAIList IE from 3rd octet } with { variant "FIELDORDER(msb)"; + variant (dnnLength) "LENGTHTO (dnnValue, listOfPartialTais)"; + variant (dnnLength) "BYTEORDER(last)"; + variant (dnnValue) "BYTEORDER(last)"; }; - + type record LADN_Info { /* 24.501 cl. 9.11.3.30 */ IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ Type6Length_Type iel, record of ListOfLADN listOfLADN } with { variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (listOfLADN)"; + variant (iel) "BYTEORDER(last)"; }; type record MICO_Ind { // 24.501 cl. 9.11.3.31 @@ -1457,7 +1921,7 @@ module NG_NAS_TypeDefs { } with { variant "FIELDORDER(msb)"; }; - + type record MA_PDUSessionInfo { // 24.501 cl. 9.11.3.31A IEI4_Type iei, B4_Type maPDUSession @@ -1472,7 +1936,7 @@ module NG_NAS_TypeDefs { } with { variant "FIELDORDER(msb)"; variant (iel) "LENGTHTO (s_NSSAI)"; - variant "FORCEOMIT(iei)"; + variant (iel) "BYTEORDER(last)"; }; type record Mapped_S_NSSAIValue { @@ -1481,36 +1945,36 @@ module NG_NAS_TypeDefs { O3_Type sd optional } with { variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (sst, sd)"; + variant (iel) "BYTEORDER(last)"; }; - + type ReplayedNASMessageContainer NASMessageContainer; // Contents the same 24.501 cl.9.11.3.33 & 24.301 cl. 9.9.3.51 - + type record NG_NAS_SecurityAlgorithms { /* 24.501 cl. 9.11.3.34 */ IEI8_Type iei optional, /* present in case of TV; omit in case of V */ B4_Type cipheringType, /* Type of ciphering algorithm */ B4_Type integrityType /* Type of integrity protection algorithm */ } with { variant "FIELDORDER(msb)"; - variant "FORCEOMIT(iei)"; }; type record NetworkSlicingInd { // 24.501 cl. 9.11.3.36 IEI4_Type iei, // @sic R5w190307 sic@ B2_Type spare, B1_Type dcni, - B1_Type nssci + B1_Type nssci /* Type of integrity protection algorithm */ } with { variant "FIELDORDER(msb)"; }; type record of S_NSSAI_LV S_NSSAI_TypeList; - + type record NSSAI { // 24.501 cl. 9.11.3.37 IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ NSSAI_LV lvPart /* separated definition into TLV and LV parts Sep22 @sic R5s221179 Baseline Moving sic@ */ } with { variant "FIELDORDER(msb)"; - variant "FORCEOMIT(iei)"; }; type record NSSAI_LV { // 24.501 cl. 9.11.3.37 @@ -1518,6 +1982,8 @@ module NG_NAS_TypeDefs { S_NSSAI_TypeList s_nssai /* separated definition into TLV and LV parts Sep22 @sic R5s221179 Baseline Moving sic@ */ } with { variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (s_nssai)"; + variant (iel) "BYTEORDER(last)"; }; type record InclusionModeNSSAI { // 24.501 cl. 9.11.3.37A @@ -1526,7 +1992,6 @@ module NG_NAS_TypeDefs { B2_Type inclusionMode } with { variant "FIELDORDER(msb)"; - variant "FORCEOMIT(iei)"; }; type record AccessCatDefinition { @@ -1541,17 +2006,23 @@ module NG_NAS_TypeDefs { B5_Type standardAccessCat optional // @sic R5s220680 sic@ } with { variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (precendence, psac, spare2, catNum, criteriaLength, criteria, spare3, standardAccessCat)"; + variant (iel) "BYTEORDER(last)"; + variant (criteriaLength) "LENGTHTO (criteria)"; + variant (criteriaLength) "BYTEORDER(last)"; + variant (criteria) "BYTEORDER(last)"; }; - + type record OperatorAccessCatDefinitions { // 24.501 cl. 9.11.3.38 IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ Type6Length_Type iel, record of AccessCatDefinition definitions } with { variant "FIELDORDER(msb)"; - variant "FORCEOMIT(iei)"; + variant (iel) "LENGTHTO (definitions)"; + variant (iel) "BYTEORDER(last)"; }; - + type record PayloadContainer { // 24.501 cl. 9.11.3.39 IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ Type6Length_Type iel, @@ -1559,15 +2030,15 @@ module NG_NAS_TypeDefs { } with { variant "FIELDORDER(msb)"; variant (iel) "LENGTHTO (payload)"; - variant "FORCEOMIT(iei)"; + variant (iel) "BYTEORDER(last)"; + variant (payload) "BYTEORDER(last)"; }; - + type record PayloadContainerType { /* 24.501 cl. 9.11.3.40 @sic R5w190208 sic@*/ IEI4_Type iei optional, /* present in case of TV; omit in case of V */ B4_Type container } with { variant "FIELDORDER(msb)"; - variant "FORCEOMIT(iei)"; }; type record NG_PDU_SessionId { /* 24.501 cl. 9.11.3.41 */ @@ -1575,7 +2046,6 @@ module NG_NAS_TypeDefs { O1_Type sessionId } with { variant "FIELDORDER(msb)"; - variant "FORCEOMIT(iei)"; }; type record PDU_SessionErrorCause { @@ -1583,27 +2053,33 @@ module NG_NAS_TypeDefs { O1_Type causeValue } with { variant "FIELDORDER(msb)"; - }; - + }; + type record PDU_SessionReactivationError { /* 24.501 cl. 9.11.3.43 */ IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ Type6Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ record of PDU_SessionErrorCause errorCause } with { variant "FIELDORDER(msb)"; - variant "FORCEOMIT(iei)"; + variant (iel) "LENGTHTO (errorCause)"; + variant (iel) "BYTEORDER(last)"; }; - + type PDU_SessionStatus AllowedPDU_SessionStatus; /* 24.501 cl. 9.11.3.11 */ type PDU_SessionStatus PDU_SessionReactivationResult; /* 24.501 cl. 9.11.3.38 */ type PDU_SessionStatus ULDataStatus; /* 24.501 cl. 9.11.3.57 */ - + type record PDU_SessionStatus { /* 24.501 cl. 9.11.3.44 */ IEI8_Type iei optional, /* present in case of TV or TLV; omit in case of V */ Type4Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ B8_Type psi0_7, /* PSI(0)- PSI(7) */ B8_Type psi8_15, /* PSI(8)- PSI(15)*/ octetstring spare length (1..30) optional // @sic R5w190307 sic@ + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (psi0_7, psi8_15, spare)"; + variant (iel) "BYTEORDER(last)"; + variant (spare) "BYTEORDER(last)"; }; type record RejectedS_NSSAI { @@ -1611,24 +2087,37 @@ module NG_NAS_TypeDefs { B4_Type causeValue, O1_Type sst, O3_Type sd optional + } with { + variant "FIELDORDER(msb)"; + variant (len) "LENGTHTO (causeValue, sst, sd)"; + variant (len) "BYTEORDER(last)"; + variant (sd) "BYTEORDER(last)"; }; type record RejectedNSSAI { // 24.501 cl. 9.11.3.46 IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ Type4Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ record of RejectedS_NSSAI rejectS_NSSAI + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (rejectS_NSSAI)"; + variant (iel) "BYTEORDER(last)"; }; type record NG_Request_Type { /* 24.501 cl. 9.11.3.47 */ IEI4_Type iei, // currently only used as TV B1_Type spare, B3_Type requestValue + } with { + variant "FIELDORDER(msb)"; }; type record SMSInd { /* 24.501 cl. 9.11.3.50A */ IEI4_Type iei, // currently only used as TV B3_Type spare, B1_Type sai + } with { + variant "FIELDORDER(msb)"; }; type record SOR_Header { @@ -1638,8 +2127,10 @@ module NG_NAS_TypeDefs { B1_Type listType_MSSNPNSI, /* Sep22 @sic R5s221179 Baseline Moving sic@ */ B1_Type listInd_MSSI, /* Sep22 @sic R5s221179 Baseline Moving sic@ */ B1_Type dataType + } with { + variant "FIELDORDER(msb)"; }; - + type record SORTransparentContainer { /* 24.501 cl. 9.11.3.51 */ IEI8_Type iei optional, // @sic R5s200739 sic@ Type6Length_Type iel optional, // @sic R5s200739 sic@ @@ -1647,6 +2138,13 @@ module NG_NAS_TypeDefs { O16_Type mac, O2_Type counter optional, octetstring data length (1..2026) optional // @sic R5w190307 sic@ + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (header, mac, counter, data)"; + variant (iel) "BYTEORDER(last)"; + variant (mac) "BYTEORDER(last)"; + variant (counter) "BYTEORDER(last)"; + variant (data) "BYTEORDER(last)"; }; type record NG_UE_SecurityCapability { /* 24.501 cl. 9.11.3.54 */ @@ -1657,18 +2155,29 @@ module NG_NAS_TypeDefs { O1_Type eeaCap optional, O1_Type eiaCap optional, octetstring spare length(1..4) optional // @sic R5w190307 sic@ + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO(ngeaCap, ngiaCap, eeaCap, eiaCap, spare)"; + variant (iel) "BYTEORDER(last)"; + variant (spare) "BYTEORDER(last)"; }; type record S1_UE_SecurityCapability { /* 24.501 cl. 9.11.3.48A */ IEI8_Type iei optional, UE_SecurityCapability ieValue + } with { + variant "FIELDORDER(msb)"; }; - + type record UE_UsageSetting { // 24.501 cl. 9.11.3.55 IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ Type4Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ B7_Type spare, B1_Type ueUsageSetting + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO(spare, ueUsageSetting)"; + variant (iel) "BYTEORDER(last)"; }; type record TruncatedS_TMSIConfig { /* 24.501 cl. 9.11.3.70 */ @@ -1676,18 +2185,26 @@ module NG_NAS_TypeDefs { Type4Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ B4_Type amfSetId, B4_Type amfPointer + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO(amfSetId, amfPointer)"; + variant (iel) "BYTEORDER(last)"; }; - + type record N5GCInd { /* 24.501 cl. 9.11.3.72 */ IEI4_Type iei optional, B3_Type spare, B1_Type ngReg + } with { + variant "FIELDORDER(msb)"; }; type record AddConfigInfo { /* 24.501 cl. 9.11.3.74 */ IEI4_Type iei optional, B3_Type spare, B1_Type scmr + } with { + variant "FIELDORDER(msb)"; }; type union PartialXtdRejectedNSSAI { // @sic RAN5#97 sidebar sic@ @@ -1696,36 +2213,44 @@ module NG_NAS_TypeDefs { }; type record of PartialXtdRejectedNSSAI PartialXtdRejectedNSSAI_List; - + type record PartialXtdRejectedNSSAIType0 { B1_Type spare, B3_Type typeOfList ('000'B), B4_Type numOfElements, record of XtdRejectedS_NSSAI rejectS_NSSAI // @sic RAN5#97 sidebar sic@ + } with { + variant "FIELDORDER(msb)"; }; - + type record PartialXtdRejectedNSSAIType1 { B1_Type spare, B3_Type typeOfList ('001'B), B4_Type numOfElements, O1_Type backOffTimerValue, XtdRejectedS_NSSAI_List rejectS_NSSAI // @sic RAN5#97 sidebar sic@ + } with { + variant "FIELDORDER(msb)"; }; - + type record of XtdRejectedS_NSSAI XtdRejectedS_NSSAI_List; - + type record XtdRejectedS_NSSAI { B4_Type len, // Length of rejected S_NSSAI B4_Type causeValue, S_NSSAI_V snssai + } with { + variant "FIELDORDER(msb)"; }; type record ExtdRejectedNSSAI { /* 24.501 cl. 9.11.3.75 */ IEI8_Type iei optional, /* present in case of TLV; omit in case of LV @sic R5s190109 sic@ */ Type4Length_Type iel, PartialXtdRejectedNSSAI_List partialXtd // @sic RAN5#97 sidebar sic@ + } with { + variant "FIELDORDER(msb)"; }; - + type record NG_PagingRestriction { /* 24.501 cl. 9.11.3.77 */ IEI8_Type iei optional, /* present in case of TLV; omit in case of LV @sic R5s190109 sic@ */ Type4Length_Type iel, @@ -1734,8 +2259,13 @@ module NG_NAS_TypeDefs { B8_Type psi7_0 optional, B8_Type psi15_8 optional, octetstring spare optional + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO(spareBits, typeOfRestriction, psi7_0, psi15_8, spare)"; + variant (iel) "BYTEORDER(last)"; + variant (spare) "BYTEORDER(last)"; }; - + type record NID { /* 24.301 cl. 9.11.3.79 */ IEI8_Type iei optional, /* present in case of TV; omit in case of V */ Type4Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ @@ -1744,76 +2274,116 @@ module NG_NAS_TypeDefs { hexstring digits2_9 length(8), B4_Type spare, H1_Type digit10 + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO(digit1, assignmentMode, digits2_9, spare, digit10)"; + variant (iel) "BYTEORDER(last)"; }; - + type record PEIPS_AssistIE { // @sic RAN5#97 sidebar sic@ B3_Type typeOfInfo, B5_Type peipsValue // equals paging subgroup id if typeOfInfo = 0 // equals UE paging probability info if typeOfInfo = 1 + } with { + variant "FIELDORDER(msb)"; }; - + type record of PEIPS_AssistIE PEIPS_AssistIEList; - + type record PEIPS_AssistInfo { /* 24.501 cl. 9.11.3.80 */ IEI8_Type iei, Type4Length_Type iel, PEIPS_AssistIEList list + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO(list)"; + variant (iel) "BYTEORDER(last)"; }; - + type record NG_AddReqResult { /* 24.501 cl. 9.11.3.81 */ IEI8_Type iei, Type4Length_Type iel, B6_Type spare, B2_Type prd + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO(spare, prd)"; + variant (iel) "BYTEORDER(last)"; }; - + type record NSSRG_Value { /* 24.501 cl. 9.11.3.82 */ Type4Length_Type iel, S_NSSAI_LV sNSSAI, record of O1_Type nssrgValues + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO(sNSSAI, nssrgValues)"; + variant (iel) "BYTEORDER(last)"; }; - + type record of NSSRG_Value NSSRG_ValueList; - + type record NSSRG_Info { /* 24.501 cl. 9.11.3.82 */ IEI8_Type iei, Type6Length_Type iel, NSSRG_ValueList valueList + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO(valueList)"; + variant (iel) "BYTEORDER(last)"; }; - + type record DisasterPLMNList { /* 24.501 cl. 9.11.3.83 */ IEI8_Type iei, Type4Length_Type iel, record of NAS_PlmnId plmnId optional + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO(plmnId)"; + variant (iel) "BYTEORDER(last)"; }; - + type record RegistrationWaitRange { /* 24.501 cl. 9.11.3.84 */ IEI8_Type iei, Type4Length_Type iel, O1_Type minWaitTime, O1_Type maxWaitTime + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO(minWaitTime, maxWaitTime)"; + variant (iel) "BYTEORDER(last)"; }; - + type record NSAG { /* 24.501 cl. 9.11.3.87 */ Type4Length_Type iel, // @sic R5s230533 sic@ O1_Type id, NSSAI_LV sNSSAIList, O1_Type priority, NG_TrackingAreaIdList_LV taiList + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO(id, sNSSAIList, priority, taiList)"; + variant (iel) "BYTEORDER(last)"; }; type record NSAG_Info { /* 24.501 cl. 9.11.3.87 */ IEI8_Type iei, Type6Length_Type iel, record of NSAG nsagList + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO(nsagList)"; + variant (iel) "BYTEORDER(last)"; }; - + type record PriorityInd { /* 24.501 cl. 9.11.3.91 */ IEI4_Type iei, B3_Type spare, B1_Type mpsi + } with { + variant "FIELDORDER(msb)"; }; - + //---------------------------------------------------------------------------- // NG Session Management (GSM) information elements (24.501 cl. 9.11.4) //---------------------------------------------------------------------------- @@ -1829,36 +2399,52 @@ module NG_NAS_TypeDefs { B7_Type spareBits optional, // @sic RAN5#97 sidebar sic@ B1_Type apmqf optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */ octetstring spare length (1..11) optional // @sic R5w190307 sic@ + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (tpmic, atsssST, ept_S1, mh6_PDU, rQoS, spareBits, apmqf, spare)"; + variant (iel) "BYTEORDER(last)"; + variant (spare) "BYTEORDER(last)"; }; - + type record AlwaysOnPDUSessionInd { // 24.501 cl. 9.11.4.3 IEI4_Type iei optional, B3_Type spare, B1_Type apsi + } with { + variant "FIELDORDER(msb)"; }; type AlwaysOnPDUSessionInd AlwaysOnPDUSessionReq; // 24.501 cl. 9.11.4.4 defintions the same - + type record AllowedSSCMode { // 24.501 cl. 9.11.4.5 IEI4_Type iei optional, B1_Type spare, B1_Type ssc3, B1_Type ssc2, B1_Type ssc1 + } with { + variant "FIELDORDER(msb)"; }; type record IntegrityProtMaxDataRate { // 24.501 cl. 9.11.4.7 IEI8_Type iei optional, O1_Type maxDataRateUL, O1_Type maxDataRateDL + } with { + variant "FIELDORDER(msb)"; }; - + type record EPSParameters { O1_Type id, Type4Length_Type lenOfContent optional, // this field can included in the epsParam field itself @sic R5s210302 sic@ octetstring epsParam + } with { + variant "FIELDORDER(msb)"; + variant (lenOfContent) "LENGTHTO (epsParam)"; + variant (lenOfContent) "BYTEORDER(last)"; + variant (epsParam) "BYTEORDER(last)"; }; - + type record MappedEPSContext { O1_Type epsBearerId, Type6Length_Type lenOfContext, @@ -1867,20 +2453,30 @@ module NG_NAS_TypeDefs { B1_Type eBit, B4_Type numOfParams, record of EPSParameters epsParamsList + } with { + variant "FIELDORDER(msb)"; + variant (lenOfContext) "LENGTHTO (operationCode, spare, eBit, numOfParams, epsParamsList)"; + variant (lenOfContext) "BYTEORDER(last)"; }; - + type record MappedEPSBearerContexts { /* 24.501 cl. 9.11.4.8 */ IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ Type6Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ record of MappedEPSContext mappedContextList + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (mappedContextList)"; + variant (iel) "BYTEORDER(last)"; }; - + type record MaxNumPacketFilters { /* 24.501 cl. 9.11.4.9 */ IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ B11_Type numOfFilters, B5_Type spareBits + } with { + variant "FIELDORDER(msb)"; }; - + type record PDU_Address { /* 24.501 cl. 9.11.4.10 */ IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ Type4Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ @@ -1889,12 +2485,20 @@ module NG_NAS_TypeDefs { B3_Type typeValue, octetstring adressInfo length(4..12), octetstring ipv6Address length(1..16) optional /* Sep20 @sic R5s201387 Baseline Moving sic@ */ + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (spare, si16LLA, typeValue, adressInfo, ipv6Address)"; + variant (iel) "BYTEORDER(last)"; + variant (adressInfo) "BYTEORDER(last)"; + variant (ipv6Address) "BYTEORDER(last)"; }; - + type record PDU_SessionType { /* 24.501 cl. 9.11.4.11 */ IEI4_Type iei optional, B1_Type spare, B3_Type typeValue + } with { + variant "FIELDORDER(msb)"; }; type record QoS_Flow { @@ -1905,13 +2509,19 @@ module NG_NAS_TypeDefs { B1_Type eBit, B6_Type numOfParameters, record of QoSParameters parameterList optional + } with { + variant "FIELDORDER(msb)"; }; - + type record of QoS_Flow QoS_FlowList; type record QoSFlowDescr { /* 24.501 cl. 9.11.4.12 */ IEI8_Type iei, // @sic R5s190470 sic@ Type6Length_Type iel, record of QoS_Flow listofFlows + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (listofFlows)"; + variant (iel) "BYTEORDER(last)"; }; type record QoS_Rule { @@ -1925,20 +2535,28 @@ module NG_NAS_TypeDefs { B1_Type spare optional, B1_Type segregation optional, /* Dec18 */ B6_Type flowIdentifier optional + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (ruleOperationCode, dqrBit, numOfPacketFilters, packetFilterList, precedence, spare, segregation, flowIdentifier)"; + variant (iel) "BYTEORDER(last)"; }; type union NG_PacketFilterList { NG_PacketFilterList_Type1 modify, NG_PacketFilterList_Type2 new + } with { + variant ""; }; - + type record of NG_PacketFilter_Type1 NG_PacketFilterList_Type1; - + type record NG_PacketFilter_Type1 { B4_Type spare, B4_Type packetFilterId + } with { + variant "FIELDORDER(msb)"; }; - + type record of NG_PacketFilter_Type2 NG_PacketFilterList_Type2; type record NG_PacketFilter_Type2 { @@ -1947,6 +2565,10 @@ module NG_NAS_TypeDefs { B4_Type packetFilterId, Type4Length_Type len optional, octetstring contents length (1..255) optional // @sic R5w190307 sic@ + } with { + variant "FIELDORDER(msb)"; + variant (len) "LENGTHTO (contents)"; + variant (len) "BYTEORDER(last)"; }; type record of QoS_Rule QoS_RuleList; @@ -1954,8 +2576,12 @@ module NG_NAS_TypeDefs { IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ Type6Length_Type iel, QoS_RuleList listofQoSRules + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (listofQoSRules)"; + variant (iel) "BYTEORDER(last)"; }; - + type record Session_AMBR { // 24.501 cl. 9.11.4.14 IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ Type4Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ @@ -1963,30 +2589,44 @@ module NG_NAS_TypeDefs { O2_Type downlink, O1_Type unitUL, O2_Type uplink + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (unitDL, downlink, unitUL, uplink)"; + variant (iel) "BYTEORDER(last)"; + variant (uplink) "BYTEORDER(last)"; }; type record SSC_Mode { // 24.501 cl. 9.11.4.16 IEI4_Type iei optional, B1_Type spare, B3_Type sscModeValue + } with { + variant "FIELDORDER(msb)"; }; - + type record UPU_Header { B5_Type spare, B1_Type reg, /* Set to spare for upuDataType = 1 */ B1_Type ack, /* Set to spare for upuDataType = 1 */ B1_Type upuDataType + } with { + variant "FIELDORDER(msb)"; }; - + type record UPU_Param { B4_Type spare, B4_Type dataSetType, Type6Length_Type len, octetstring dataSet + } with { + variant "FIELDORDER(msb)"; + variant (len) "LENGTHTO (dataSet)"; + variant (len) "BYTEORDER(last)"; + variant (dataSet) "BYTEORDER(last)"; }; - + type record of UPU_Param UPU_ParamList; - + type record UPU_TransparentContainer { IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ Type6Length_Type iel, @@ -1994,28 +2634,49 @@ module NG_NAS_TypeDefs { O16_Type upuMAC_I, O2_Type counter optional, /* only present if upuDataType = 0 (in octet4) */ UPU_ParamList upuList optional /* only present if upuDataType = 0 (in octet4) */ + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (octet4, upuMAC_I, counter, upuList)"; + variant (iel) "BYTEORDER(last)"; + variant (upuMAC_I) "BYTEORDER(last)"; + variant (counter) "BYTEORDER(last)"; }; type record SM_PDU_DN_RequestContainer { // 24.501 cl. 9.11.4.15 IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ Type4Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ octetstring dnSpecificId + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (dnSpecificId)"; + variant (iel) "BYTEORDER(last)"; + variant (dnSpecificId) "BYTEORDER(last)"; }; - + type record NGSM_NetworkFeatureSupport { /* 24.501 cl 9.11.4.18 */ IEI8_Type iei optional, /* present in case of TV; omit in case of V */ Type4Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ B7_Type spareBits, B1_Type ept_S1, octetstring spare length (1..12) + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (spareBits, ept_S1, spare)"; + variant (iel) "BYTEORDER(last)"; + variant (spare) "BYTEORDER(last)"; }; type record ATSSSContainer { // 24.501 cl. 9.11.4.22 IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ Type6Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ octetstring contents + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (contents)"; + variant (iel) "BYTEORDER(last)"; + variant (contents) "BYTEORDER(last)"; }; - + type record IPHeaderCompressionConfig { // 24.501 cl. 9.11.4.24 IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ Type4Length_Type iel optional, /* present in case of LV or TLV; omit in case of V @sic R5s201526 sic@ */ @@ -2030,31 +2691,55 @@ module NG_NAS_TypeDefs { O2_Type maxCID, O1_Type addParamsType optional, octetstring addParamsContainer optional + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (spare, profile104, profile103, profile102, profile6, profile4, profile3, profile2, maxCID, addParamsType, addParamsContainer)"; + variant (iel) "BYTEORDER(last)"; + variant (addParamsContainer) "BYTEORDER(last)"; }; - + type record DS_TT_EthernetPortMACAddr { // 24.501 cl. 9.11.4.25 IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ Type4Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ O6_Type addressContents + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (addressContents)"; + variant (iel) "BYTEORDER(last)"; + variant (addressContents) "BYTEORDER(last)"; }; - + type record UE_DS_TT_ResidenceTime { // 24.501 cl. 9.11.4.26 IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ Type4Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ O8_Type timeContents + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (timeContents)"; + variant (iel) "BYTEORDER(last)"; + variant (timeContents) "BYTEORDER(last)"; }; - + type record PortManagementInfoContainer { // 24.501 cl. 9.11.4.27 IEI8_Type iei optional, /* present in case of TLV; omit in case of LV */ Type6Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ octetstring contents + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (contents)"; + variant (iel) "BYTEORDER(last)"; + variant (contents) "BYTEORDER(last)"; }; - + type record EthernetHeaderCompressConfig { /* 24.501 cl 9.11.4.28 */ IEI8_Type iei optional, /* present in case of TV; omit in case of V */ Type4Length_Type iel optional, /* present in case of LV or TLV; omit in case of V */ B6_Type spareBits, B2_Type cidLength + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (spareBits, cidLength)"; + variant (iel) "BYTEORDER(last)"; }; type record MBSSessionInfo { /* 24.501 cl 9.11.4.30 */ @@ -2062,30 +2747,45 @@ module NG_NAS_TypeDefs { B2_Type operation, B2_Type typeOfSessionId, // @sic RAN5#97 sidebar sic@ octetstring sessionId + } with { + variant "FIELDORDER(msb)"; + variant (sessionId) "BYTEORDER(last)"; }; type record RequestedMBSContainer { /* 24.501 cl 9.11.4.30 */ IEI8_Type iei, Type6Length_Type iel, record of MBSSessionInfo sessionInfo + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (sessionInfo)"; + variant (iel) "BYTEORDER(last)"; }; type record NR_CGI { O5_Type cellId, NAS_PlmnId plmn + } with { + variant "FIELDORDER(msb)"; }; type record NR_CGI_List { Type4Length_Type iel, record of NR_CGI nrCGI + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (nrCGI)"; + variant (iel) "BYTEORDER(last)"; }; - + type record MBS_ServiceArea { // depending on value of ReceivedMBSInfo.msai either or both of these fields are included NG_TrackingAreaIdList_LV taiList optional, NR_CGI_List nrCGIList optional + } with { + variant "FIELDORDER(msb)"; }; - + type record ReceivedMBSInfo { /* 24.501 cl 9.11.4.31 */ B3_Type rejectCause, B2_Type msai, @@ -2101,30 +2801,53 @@ module NG_NAS_TypeDefs { MBS_ServiceArea serviceArea optional, octetstring timers optional, octetstring securityContainer optional + } with { + variant "FIELDORDER(msb)"; + variant (sourceIPaddr) "BYTEORDER(last)"; + variant (destIPaddr) "BYTEORDER(last)"; + variant (timers) "BYTEORDER(last)"; + variant (securityContainer) "BYTEORDER(last)"; }; type record ReceivedMBSContainer { /* 24.501 cl 9.11.4.31 */ IEI8_Type iei, Type6Length_Type iel, record of ReceivedMBSInfo info + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (info)"; + variant (iel) "BYTEORDER(last)"; }; type record TMGI_LV { Type4Length_Type iel, O3_Type serviceID, NAS_PlmnId plmn optional + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (serviceID, plmn)"; + variant (iel) "BYTEORDER(last)"; + variant (serviceID) "BYTEORDER(last)"; }; type record PDUSessionPairId { /* 24.501 cl 9.11.4.32 */ IEI8_Type iei, Type4Length_Type iel, O1_Type id + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (id)"; + variant (iel) "BYTEORDER(last)"; }; type record RSN { /* 24.501 cl 9.11.4.33 */ IEI8_Type iei, Type4Length_Type iel, O1_Type rsn + } with { + variant "FIELDORDER(msb)"; + variant (iel) "LENGTHTO (rsn)"; + variant (iel) "BYTEORDER(last)"; }; type record NSSAI_DELETE_REQUEST { @@ -2134,34 +2857,44 @@ module NG_NAS_TypeDefs { B8_Type deleteNSSAI_Type, NAS_PlmnId configuredNSSAI optional, /* only present if deleteNSSAI_Type = DeleteConfigured */ AllowedNSSAI allowedNSSAI optional /* only present if deleteNSSAI_Type = DeleteAllowed */ + } with { + variant "FIELDORDER(msb)"; }; - + type record AllowedNSSAI { NAS_PlmnId allowedNSSAI, B6_Type spareBits, B2_Type accessType + } with { + variant "FIELDORDER(msb)"; }; - + type record NSSAI_DELETE_RESPONSE { SkipIndicator skipIndicator, /* M V 1/2 */ ProtocolDiscriminator protocolDiscriminator, /* M V 1/2 */ MessageType messageType /* M V 1 */ + } with { + variant "FIELDORDER(msb)"; }; - + type record UE_TEST_LOOP_NR_SIDELINK_COUNTER_REQUEST { SkipIndicator skipIndicator, /* M V 1/2 */ ProtocolDiscriminator protocolDiscriminator, /* M V 1/2 */ MessageType messageType /* M V 1 */ + } with { + variant "FIELDORDER(msb)"; }; - + type record of O4_Type PacketCounterValueList; - + type record NR_SidelinkCounter { IEI8_Type iei, Type4Length_Type iel, PacketCounterValueList counterValue + } with { + variant "FIELDORDER(msb)"; }; - + type record UE_TEST_LOOP_NR_SIDELINK_COUNTER_RESPONSE { SkipIndicator skipIndicator, /* M V 1/2 */ ProtocolDiscriminator protocolDiscriminator, /* M V 1/2 */ @@ -2169,8 +2902,10 @@ module NG_NAS_TypeDefs { NR_SidelinkCounter pscch optional, /* only present if test loop E is active*/ NR_SidelinkCounter stch optional, /* only present if test loop E is active*/ NR_SidelinkCounter pssch optional /* only present if test loop E is active*/ + } with { + variant "FIELDORDER(msb)"; }; - + type record S1ToN1TransparentContainer { /* 24.501 cl. 9.11.2.9 24.501 specifies that this has a length of 10 octets, but that only the value part is included in the RRC message. @@ -2185,6 +2920,10 @@ module NG_NAS_TypeDefs { B1_Type tsc, B3_Type ksi5G, O2_Type spare + } with { + variant "FIELDORDER(msb)"; + variant (mac) "BYTEORDER(last)"; + variant (spare) "BYTEORDER(last)"; }; type record IntraN1TransparentContainer { /* 24.501 cl. 9.11.2.6 @@ -2201,23 +2940,29 @@ module NG_NAS_TypeDefs { B1_Type tsc, B3_Type ksi5G, O1_Type sequenceNum + } with { + variant "FIELDORDER(msb)"; + variant (mac) "BYTEORDER(last)"; }; - + type record SET_UAI_REQUEST { SkipIndicator skipIndicator, /* M V 1/2 */ ProtocolDiscriminator protocolDiscriminator, /* M V 1/2 */ MessageType messageType, /* M V 1 */ B6_Type spare, B2_Type preferredRRCState + } with { + variant "FIELDORDER(msb)"; }; - + type record SET_UAI_RESPONSE { SkipIndicator skipIndicator, /* M V 1/2 */ ProtocolDiscriminator protocolDiscriminator, /* M V 1/2 */ MessageType messageType /* M V 1 */ + } with { + variant "FIELDORDER(msb)"; }; - + } with { - variant "FIELDORDER(msb)"; encode "RAW"/*"NAS Types"*/ } diff --git a/ttcn/LibNGAP/lib/LibNGAP_Templates.ttcn b/ttcn/LibNGAP/lib/LibNGAP_Templates.ttcn index 8a73cfbce796e31d4da395f06b19318e8690af8b..014925b9e81f7b6df6d1444489e1cfbf01103556 100644 --- a/ttcn/LibNGAP/lib/LibNGAP_Templates.ttcn +++ b/ttcn/LibNGAP/lib/LibNGAP_Templates.ttcn @@ -5450,6 +5450,27 @@ module LibNGAP_Templates { group Receive { + /** + * @see ETSI TS 138 413 V16.12.0 (2023-05) Clause 9.2.5.2 DOWNLINK NAS TRANSPORT + */ + template (present) InitiatingMessage mw_n2_UplinkNASTransport_base_nas:= { + procedureCode := id_UplinkNASTransport, + criticality := ?, + value_ := { + UplinkNASTransport := { + protocolIEs := { + *, + { + id := id_NAS_PDU, + criticality := ?, + value_ := { NAS_PDU := ? } + }, + * + } + } + } + } // End of template mw_n2_UplinkNASTransport_base_nas + /** * @see ETSI TS 138 413 V16.12.0 (2023-05) Clause 9.2.5.2 DOWNLINK NAS TRANSPORT */ diff --git a/ttcn/Lib_NG_NAS/LIB_NG_NAS_Functions.ttcn b/ttcn/Lib_NG_NAS/LIB_NG_NAS_Functions.ttcn index 4cb5e0772c54d65e2b2eddc57cbfd7538c5ab6a6..581b0fa292ba564da022fa41810f10ecff3a0181 100644 --- a/ttcn/Lib_NG_NAS/LIB_NG_NAS_Functions.ttcn +++ b/ttcn/Lib_NG_NAS/LIB_NG_NAS_Functions.ttcn @@ -156,7 +156,7 @@ module LIB_NG_NAS_Functions { if (f_Check_5GAKA_NAS_DL_Message( vc_recvNAS_PDU, mw_NG_AUTHENTICATION_REQUEST( - '000'B, + '100'B, -, mw_GMM_AuthRAND, mw_GSM_AUTN @@ -322,9 +322,12 @@ module LIB_NG_NAS_Functions { if ( (vc_recvNGAP_PDU.initiatingMessage.value_.InitialUEMessage.protocolIEs[i].id) == 38 /*id_NAS_PDU*/){ vc_recvNAS_PDU := vc_recvNGAP_PDU.initiatingMessage.value_.InitialUEMessage.protocolIEs[i].value_.nAS_PDU; + var bitstring bs := oct2bit(vc_recvNAS_PDU); + var integer v_result := decvalue(bs,vc_recvNgNasUl_Msg); log("****************************************"); log("InitialUEMessage - NAS-PDU! "); log( vc_recvNAS_PDU ); + log( vc_recvNgNasUl_Msg ); log("****************************************"); } @@ -336,9 +339,29 @@ module LIB_NG_NAS_Functions { if ( (vc_recvNGAP_PDU.initiatingMessage.value_.DownlinkNASTransport.protocolIEs[i].id) == 38 /*id_NAS_PDU*/){ vc_recvNAS_PDU := vc_recvNGAP_PDU.initiatingMessage.value_.DownlinkNASTransport.protocolIEs[i].value_.nAS_PDU; + var bitstring bs := oct2bit(vc_recvNAS_PDU); + var integer v_result := decvalue(bs,vc_recvNgNasDl_Msg); log("****************************************"); log("DownlinkNASTransport - NAS-PDU! "); log( vc_recvNAS_PDU ); + log( vc_recvNgNasDl_Msg ); + log("****************************************"); + + } + } + }else if (match(vc_recvNGAP_PDU.initiatingMessage,mw_n2_UplinkNASTransport_base_nas)){ + var integer numOfIEs := lengthof(vc_recvNGAP_PDU.initiatingMessage.value_.UplinkNASTransport.protocolIEs) + + for (var integer i:=0;i65535 || a<0){ log_error("Port number must be between 0 and 65535, %d is given", remote_port_number);} +- else {remote_port_number=a;} ++ if (sscanf(parameter_value, "%d", &remote_port_number)!=1) log_error("Invalid input as port number given: %s", parameter_value); ++ if (remote_port_number>65535 || remote_port_number<0) log_error("Port number must be between 0 and 65535, %d is given", remote_port_number); + } else if(strcmp(parameter_name, ai_family_name()) == 0){ + if (strcasecmp(parameter_value,"IPv6")==0 || strcasecmp(parameter_value,"AF_INET6")==0) ai_family = AF_INET6; else if (strcasecmp(parameter_value,"IPv4")==0 || strcasecmp(parameter_value,"AF_INET")==0) ai_family = AF_INET; else if (strcasecmp(parameter_value,"UNSPEC")==0 || strcasecmp(parameter_value,"AF_UNSPEC")==0) ai_family = AF_UNSPEC; else log_error("Parameter value '%s' not recognized for parameter '%s'", parameter_value, ai_family_name()); -+ } else if(strcmp(parameter_name, ip_proto_name()) == 0){ -+ if (strcasecmp(parameter_value,"IPPROTO_TCP")==0) ip_proto = IPPROTO_TCP; -+ else if (strcasecmp(parameter_value,"IPPROTO_SCTP")==0) ip_proto = IPPROTO_SCTP; -+ else log_error("Parameter value '%s' not recognized for parameter '%s'", parameter_value, ip_proto_name()); } else if(strcmp(parameter_name, local_port_name()) == 0){ - int a; - if (sscanf(parameter_value, "%d", &a)!=1) log_error("Invalid input as port number given: %s", parameter_value); -@@ -760,6 +767,7 @@ int Abstract_Socket::open_listen_port(const char* localHostname, const char* loc - hints.ai_flags = /*AI_ALL|*/AI_ADDRCONFIG|AI_PASSIVE; - hints.ai_socktype = SOCK_STREAM; - hints.ai_family = ai_family; -+ hints.ai_protocol = ip_proto; - - error = getaddrinfo(localHostname, localServicename, &hints, &aip); - if (error != 0) { -@@ -1143,6 +1151,7 @@ int Abstract_Socket::open_client_connection(const char* remoteHostname, const ch +- int a; +- if (sscanf(parameter_value, "%d", &a)!=1) log_error("Invalid input as port number given: %s", parameter_value); +- if (a>65535 || a<0) {log_error("Port number must be between 0 and 65535, %d is given", local_port_number);} +- else {local_port_number=a;} ++ if (sscanf(parameter_value, "%d", &local_port_number)!=1) log_error("Invalid input as port number given: %s", parameter_value); ++ if (local_port_number>65535 || local_port_number<0) log_error("Port number must be between 0 and 65535, %d is given", local_port_number); + } else if (strcmp(parameter_name, nagling_name()) == 0) { + if (strcasecmp(parameter_value,"yes")==0) nagling = true; + else if (strcasecmp(parameter_value,"no")==0) nagling = false; +@@ -316,14 +301,16 @@ void Abstract_Socket::Handle_Socket_Event(int fd, boolean is_readable, boolean i + } else { + if(shutdown(fd, SHUT_RD) != 0) { + if(errno == ENOTCONN) { ++ remove_client(fd); ++ peer_disconnected(fd); + errno = 0; +- } else { ++ } else + log_error("shutdown(SHUT_RD) system call failed"); +- } ++ } else { ++ client_data->tcp_state = CLOSE_WAIT; ++ Remove_Fd_Read_Handler(fd); ++ peer_half_closed(fd); + } +- client_data->tcp_state = CLOSE_WAIT; +- Remove_Fd_Read_Handler(fd); +- peer_half_closed(fd); + } + } // switch (client_data->reading_state) + } else if (messageLength > 0) { +@@ -425,7 +412,6 @@ int Abstract_Socket::receive_message_on_fd(int client_id) + size_t end_len=AS_TCP_CHUNCK_SIZE; + recv_tb->get_end(end_ptr, end_len); + int messageLength = recv(client_id, (char *)end_ptr, end_len, 0); +- log_debug("========> receive_message_on_fd errno: '%d', '%s'", errno, strerror(errno)); + if (messageLength==0) return messageLength; // peer disconnected + else if (messageLength < 0) { + log_warning("Error when reading the received TCP PDU: %s", strerror(errno)); +@@ -464,11 +450,12 @@ int Abstract_Socket::send_message_on_nonblocking_fd(int client_id, + + log_debug("entering Abstract_Socket::" + "send_message_on_nonblocking_fd(id: %d)", client_id); +- as_client_struct * client_data = get_peer(client_id); ++ as_client_struct * client_data; + int sent_len = 0; + while(sent_len < length){ + int ret; + log_debug("Abstract_Socket::send_message_on_nonblocking_fd(id: %d): new iteration", client_id); ++ client_data = get_peer(client_id); + if (client_data->reading_state == STATE_DONT_CLOSE){ + goto client_closed_connection; + } else ret = send(client_id, send_par + sent_len, length - sent_len, 0); +@@ -549,7 +536,7 @@ const PacketHeaderDescr* Abstract_Socket::Get_Header_Descriptor() const + return NULL; + } + +-void Abstract_Socket::peer_connected(int /*client_id*/, sockaddr_in& /*remote_addr*/) ++void Abstract_Socket::peer_connected(int client_id, sockaddr_in& remote_addr) + { + } + +@@ -614,8 +601,8 @@ void Abstract_Socket::map_user() + + char remotePort[6]; + char localPort[6]; +- sprintf(localPort, "%u", local_port_number); +- sprintf(remotePort, "%u", remote_port_number); ++ sprintf(localPort, "%d", local_port_number); ++ sprintf(remotePort, "%d", remote_port_number); + + if(!use_connection_ASPs) + { +@@ -797,7 +784,6 @@ int Abstract_Socket::open_listen_port(const char* localHostname, const char* loc + log_warning("Cannot open socket when trying to open the listen port: %s", strerror(errno)); + listen_port_opened(-1); + errno = 0; +- freeaddrinfo(aip); + return -1; + } + else log_error("Cannot open socket"); +@@ -815,7 +801,6 @@ int Abstract_Socket::open_listen_port(const char* localHostname, const char* loc + log_warning("Setsockopt failed when trying to open the listen port: %s", strerror(errno)); + listen_port_opened(-1); + errno = 0; +- freeaddrinfo(aip); + return -1; + } + else log_error("Setsockopt failed"); +@@ -828,10 +813,10 @@ int Abstract_Socket::open_listen_port(const char* localHostname, const char* loc + + log_debug("Bind to port..."); + if (bind(listen_fd, res->ai_addr, res->ai_addrlen) == -1) { +- error = errno; // save it for the warning message + close(listen_fd); + listen_fd = -1; + log_debug("Cannot bind to port when trying to open the listen port: %s", strerror(errno)); ++ error = errno; // save it for the warning message + errno = 0; + continue; + } +@@ -843,8 +828,8 @@ int Abstract_Socket::open_listen_port(const char* localHostname, const char* loc + { + log_warning("Cannot bind to port when trying to open the listen port: %s", strerror(error)); + listen_port_opened(-1); ++ error = errno; // save it for the warning message + error = 0; +- freeaddrinfo(aip); + return -1; + } + else log_error("Cannot bind to port"); +@@ -858,7 +843,6 @@ int Abstract_Socket::open_listen_port(const char* localHostname, const char* loc + log_warning("Cannot listen at port when trying to open the listen port: %s", strerror(errno)); + listen_port_opened(-1); + errno = 0; +- freeaddrinfo(aip); + return -1; + } + else log_error("Cannot listen at port"); +@@ -877,14 +861,13 @@ int Abstract_Socket::open_listen_port(const char* localHostname, const char* loc + log_warning("getsockname() system call failed on the server socket when trying to open the listen port: %s", strerror(errno)); + listen_port_opened(-1); + errno = 0; +- freeaddrinfo(aip); + return -1; + } + else log_error("getsockname() system call failed on the server socket"); } - hints.ai_socktype = SOCK_STREAM; - hints.ai_family = ai_family; -+ hints.ai_protocol = ip_proto; + char hname[NI_MAXHOST]; + char sname[NI_MAXSERV]; +-/* error = getnameinfo(res->ai_addr, res->ai_addrlen, ++ error = getnameinfo(res->ai_addr, res->ai_addrlen, + hname, sizeof (hname), sname, sizeof (sname), NI_NUMERICSERV); + if (error) { + close(listen_fd); +@@ -893,14 +876,13 @@ int Abstract_Socket::open_listen_port(const char* localHostname, const char* loc + { + log_warning("getnameinfo() system call failed on the server socket when trying to open the listen port: %s", gai_strerror(error)); + listen_port_opened(-1); +- freeaddrinfo(aip); + return -1; + } + else log_error("getsockname() system call failed on the server socket"); + } else { + log_debug("Listening on (name): %s/%s\n", + hname, sname); +- }*/ ++ } + error = getnameinfo(res->ai_addr, res->ai_addrlen, + hname, sizeof (hname), sname, sizeof (sname), NI_NUMERICHOST|NI_NUMERICSERV); + if (error) { +@@ -910,7 +892,6 @@ int Abstract_Socket::open_listen_port(const char* localHostname, const char* loc + { + log_warning("getnameinfo() system call failed on the server socket when trying to open the listen port: %s", gai_strerror(error)); + listen_port_opened(-1); +- freeaddrinfo(aip); + return -1; + } + else log_error("getsockname() system call failed on the server socket"); +@@ -932,12 +913,11 @@ int Abstract_Socket::open_listen_port(const char* localHostname, const char* loc + if(use_connection_ASPs) + listen_port_opened(listenPort); - error = getaddrinfo(remoteHostname, remoteServicename, &hints, &res); - if (error != 0) { -@@ -1191,9 +1200,11 @@ int Abstract_Socket::open_client_connection(const char* remoteHostname, const ch +- freeaddrinfo(aip); + return listenPort; + #endif + } + +-void Abstract_Socket::listen_port_opened(int /*port_number*/) ++void Abstract_Socket::listen_port_opened(int port_number) + { + // Intentionally blank + } +@@ -1084,9 +1064,7 @@ int Abstract_Socket::open_client_connection(const struct sockaddr_in & new_remot + Add_Fd_Read_Handler(socket_fd); // Done here - as in case of error: remove_client expects the handler as added + log_debug("Abstract_Socket::open_client_connection(). Handler set to socket fd %d", socket_fd); + client_data->fd_buff = new TTCN_Buffer; +-// client_data->clientAddr = *(struct sockaddr_storage*)&new_remote_addr; +- memset(&client_data->clientAddr,0,sizeof(client_data->clientAddr)); +- memcpy(&client_data->clientAddr,&new_remote_addr,sizeof(new_remote_addr)); ++ client_data->clientAddr = *(struct sockaddr_storage*)&new_remote_addr; + client_data->clientAddrlen = sizeof(new_remote_addr); + client_data->tcp_state = ESTABLISHED; + client_data->reading_state = STATE_NORMAL; +@@ -1259,22 +1237,22 @@ int Abstract_Socket::open_client_connection(const char* remoteHostname, const ch + ); + + if(bind(socket_fd, aip2->ai_addr, aip2->ai_addrlen)<0) { +-/* if(use_connection_ASPs) // the if else branches are the same +- {*/ ++ if(use_connection_ASPs) ++ { + log_debug("Cannot bind to port when trying to open client connection: %s", strerror(errno)); + //client_connection_opened(-1); + //freeaddrinfo(localAddrinfo); + errno = 0; + continue; //aip2 cycle + //return -1; +-/* } ++ } + else { + //freeaddrinfo(localAddrinfo); + //log_error("Cannot bind to port."); + log_debug("Cannot bind to port when trying to open client connection: %s", strerror(errno)); + errno = 0; + continue; //aip2 cycle +- }*/ ++ } + } + log_debug("Bind successful on client."); + freeaddrinfo(localAddrinfo); +@@ -1358,7 +1336,7 @@ int Abstract_Socket::open_client_connection(const char* remoteHostname, const ch + } + char hname[NI_MAXHOST]; + char sname[NI_MAXSERV]; +-/* error = getnameinfo(aip->ai_addr, aip->ai_addrlen, ++ error = getnameinfo(aip->ai_addr, aip->ai_addrlen, + hname, sizeof (hname), sname, sizeof (sname), NI_NUMERICSERV); + if (error) { + close(socket_fd); +@@ -1373,19 +1351,18 @@ int Abstract_Socket::open_client_connection(const char* remoteHostname, const ch + log_debug("Connection established (name): %s/%s -> %s/%s\n", + hname, sname, + remoteHostname, remoteServicename); +- }*/ ++ } + error = getnameinfo(aip->ai_addr, aip->ai_addrlen, + hname, sizeof (hname), sname, sizeof (sname), NI_NUMERICHOST|NI_NUMERICSERV); + if (error) { +-/* close(socket_fd); ++ close(socket_fd); + if(use_connection_ASPs) + { + log_warning("getnameinfo() system call failed on the client socket when trying to connect to server: %s", gai_strerror(error)); +-// client_connection_opened(-1); +-// return -1; ++ client_connection_opened(-1); ++ return -1; + } +- else*/ +- log_warning("getnameinfo() system call failed on the client socket when trying to connect to server: %s", gai_strerror(error)); ++ else log_error("getnameinfo() system call failed on the client socket when trying to connect to server: %s", gai_strerror(error)); + } else { + log_debug("Connection established (addr): %s/%s -> %s/%s\n", + hname, sname, +@@ -1421,20 +1398,18 @@ int Abstract_Socket::open_client_connection(const char* remoteHostname, const ch + return -1; } + else log_error("Set blocking mode failed."); +- } ++ } + + as_client_struct * client_data=peer_list_add_peer(socket_fd); + Add_Fd_Read_Handler(socket_fd); // Done here - as in case of error: remove_client expects the handler as added + log_debug("Abstract_Socket::open_client_connection(). Handler set to socket fd %d", socket_fd); + client_data->fd_buff = new TTCN_Buffer; +-// client_data->clientAddr = *(struct sockaddr_storage*)aip->ai_addr; +- memset(&client_data->clientAddr,0,sizeof(client_data->clientAddr)); +- memcpy(&client_data->clientAddr,aip->ai_addr,sizeof(*aip->ai_addr)); ++ client_data->clientAddr = *(struct sockaddr_storage*)aip->ai_addr; + client_data->clientAddrlen = aip->ai_addrlen; + client_data->tcp_state = ESTABLISHED; + client_data->reading_state = STATE_NORMAL; + +- freeaddrinfo(res); ++ freeaddrinfo(res); + + if (!add_user_data(socket_fd)) { + remove_client(socket_fd); +@@ -1449,7 +1424,7 @@ int Abstract_Socket::open_client_connection(const char* remoteHostname, const ch + } + + +-void Abstract_Socket::client_connection_opened(int /*client_id*/) ++void Abstract_Socket::client_connection_opened(int client_id) + { + // Intentionally blank + } +@@ -1463,7 +1438,7 @@ void Abstract_Socket::unmap_user() + log_debug("leaving Abstract_Socket::unmap_user()"); + } + +-void Abstract_Socket::peer_disconnected(int /*fd*/) ++void Abstract_Socket::peer_disconnected(int fd) + { + // virtual peer_disconnected() needs to be overriden in test ports! + if(!use_connection_ASPs) { +@@ -1547,19 +1522,11 @@ void Abstract_Socket::send_outgoing(const unsigned char* send_par, int length, i + nrOfBytesSent = use_non_blocking_socket ? send_message_on_nonblocking_fd(dest_fd, send_par, length) : + send_message_on_fd(dest_fd, send_par, length); + +- if (nrOfBytesSent == -1){ +- log_debug("Client %d closed connection. Error: %d %s", client_id, errno, strerror(errno)); +- report_unsent(dest_fd,length,nrOfBytesSent,send_par,"Client closed the connection"); +- +- if(client_data->tcp_state == CLOSE_WAIT){ +- log_debug("Client %d waiting for close ASP.", client_id); +- } else { +- errno = 0; +- log_debug("Client %d closed connection", client_id); +- client_data->tcp_state = CLOSE_WAIT; +- Remove_Fd_Read_Handler(dest_fd); +- peer_half_closed(dest_fd); +- } ++ if (nrOfBytesSent == -1 && errno == EPIPE){ // means connection was interrupted by peer ++ errno = 0; ++ log_debug("Client %d closed connection", client_id); ++ remove_client(dest_fd); ++ peer_disconnected(dest_fd); + }else if (nrOfBytesSent != length) { + char *error_text=mprintf("Send system call failed: %d bytes were sent instead of %d", nrOfBytesSent, length); + report_error(client_id,length,nrOfBytesSent,send_par,error_text); +@@ -1570,16 +1537,11 @@ void Abstract_Socket::send_outgoing(const unsigned char* send_par, int length, i + log_debug("leaving Abstract_Socket::send_outgoing()"); + } + +-void Abstract_Socket::report_error(int /*client_id*/, int /*msg_length*/, int /*sent_length*/, const unsigned char* /*msg*/, const char* error_text) ++void Abstract_Socket::report_error(int client_id, int msg_length, int sent_length, const unsigned char* msg, const char* error_text) + { + log_error("%s",error_text); + } + +-void Abstract_Socket::report_unsent(int /*client_id*/, int /*msg_length*/, int /*sent_length*/, const unsigned char* /*msg*/, const char* error_text) +-{ +- log_debug("%s",error_text); +-} +- + void Abstract_Socket::all_mandatory_configparameters_present() + { + if(!use_connection_ASPs) +@@ -1813,6 +1775,7 @@ void Abstract_Socket::peer_list_resize_list(int client_id) { + new_length++; // index starts from 0 + log_debug("Abstract_Socket::peer_list_resize_list: Resizing to %d", new_length); + peer_list_root = (as_client_struct **)Realloc(peer_list_root, new_length*sizeof(as_client_struct *)); ++ log_debug("Abstract_Socket::peer_list_resize_list: After Resizing: %p", peer_list_root); + + // initialize new entries + for (int i = peer_list_length; i < new_length; i++) +@@ -1974,13 +1937,6 @@ SSL_Socket::SSL_Socket() + ssl_password=NULL; + test_port_type=NULL; + test_port_name=NULL; +- ssl_ctx = NULL; +- ssl_current_ssl = NULL; +- SSLv2=true; +- SSLv3=true; +- TLSv1=true; +- TLSv1_1=true; +- TLSv1_2=true; + } + + SSL_Socket::SSL_Socket(const char *tp_type, const char *tp_name) +@@ -1997,13 +1953,6 @@ SSL_Socket::SSL_Socket(const char *tp_type, const char *tp_name) + ssl_password=NULL; + test_port_type=tp_type; + test_port_name=tp_name; +- ssl_ctx = NULL; +- ssl_current_ssl = NULL; +- SSLv2=true; +- SSLv3=true; +- TLSv1=true; +- TLSv1_1=true; +- TLSv1_2=true; + } + + SSL_Socket::~SSL_Socket() +@@ -2056,26 +2005,6 @@ bool SSL_Socket::parameter_set(const char *parameter_name, + if(strcasecmp(parameter_value, "yes") == 0) ssl_verify_certificate = true; + else if(strcasecmp(parameter_value, "no") == 0) ssl_verify_certificate = false; + else log_error("Parameter value '%s' not recognized for parameter '%s'", parameter_value, ssl_verifycertificate_name()); +- } else if(strcasecmp(parameter_name, ssl_disable_SSLv2()) == 0) { +- if(strcasecmp(parameter_value, "yes") == 0) SSLv2= false; +- else if(strcasecmp(parameter_value, "no") == 0) SSLv2 = true; +- else log_error("Parameter value '%s' not recognized for parameter '%s'", parameter_value, ssl_disable_SSLv2()); +- } else if(strcasecmp(parameter_name, ssl_disable_SSLv3()) == 0) { +- if(strcasecmp(parameter_value, "yes") == 0) SSLv2 = false; +- else if(strcasecmp(parameter_value, "no") == 0) SSLv2 = true; +- else log_error("Parameter value '%s' not recognized for parameter '%s'", parameter_value, ssl_disable_SSLv3()); +- } else if(strcasecmp(parameter_name, ssl_disable_TLSv1()) == 0) { +- if(strcasecmp(parameter_value, "yes") == 0) TLSv1= false; +- else if(strcasecmp(parameter_value, "no") == 0) TLSv1 = true; +- else log_error("Parameter value '%s' not recognized for parameter '%s'", parameter_value, ssl_disable_TLSv1()); +- } else if(strcasecmp(parameter_name, ssl_disable_TLSv1_1()) == 0) { +- if(strcasecmp(parameter_value, "yes") == 0) TLSv1_1 = false; +- else if(strcasecmp(parameter_value, "no") == 0) TLSv1_1 = true; +- else log_error("Parameter value '%s' not recognized for parameter '%s'", parameter_value, ssl_disable_TLSv1_1()); +- } else if(strcasecmp(parameter_name, ssl_disable_TLSv1_2()) == 0) { +- if(strcasecmp(parameter_value, "yes") == 0) TLSv1_2 = false; +- else if(strcasecmp(parameter_value, "no") == 0) TLSv1_2 = true; +- else log_error("Parameter value '%s' not recognized for parameter '%s'", parameter_value, ssl_disable_TLSv1_2()); + } else { + log_debug("leaving SSL_Socket::parameter_set(%s, %s)", parameter_name, parameter_value); + return Abstract_Socket::parameter_set(parameter_name, parameter_value); +@@ -2102,32 +2031,6 @@ bool SSL_Socket::add_user_data(int client_id) { + + if (ssl_current_ssl==NULL) + log_error("Creation of SSL object failed"); +-#ifdef SSL_OP_NO_SSLv2 +- if(!SSLv2){ +- SSL_set_options(ssl_current_ssl,SSL_OP_NO_SSLv2); +- } +-#endif +-#ifdef SSL_OP_NO_SSLv3 +- if(!SSLv3){ +- SSL_set_options(ssl_current_ssl,SSL_OP_NO_SSLv3); +- } +-#endif +-#ifdef SSL_OP_NO_TLSv1 +- if(!TLSv1){ +- SSL_set_options(ssl_current_ssl,SSL_OP_NO_TLSv1); +- } +-#endif +-#ifdef SSL_OP_NO_TLSv1_1 +- if(!TLSv1_1){ +- SSL_set_options(ssl_current_ssl,SSL_OP_NO_TLSv1_1); +- } +-#endif +-#ifdef SSL_OP_NO_TLSv1_2 +- if(!TLSv1_2){ +- SSL_set_options(ssl_current_ssl,SSL_OP_NO_TLSv1_2); +- } +-#endif +- + set_user_data(client_id, ssl_current_ssl); + log_debug("New client added with key '%d'", client_id); + log_debug("Binding SSL to the socket"); +@@ -2362,10 +2265,9 @@ int SSL_Socket::send_message_on_fd(int client_id, const unsigned char* send_par, + log_debug("SSL_ERROR_ZERO_RETURN is received, setting SSL SHUTDOWN mode to QUIET"); + ssl_current_client=NULL; + log_debug("leaving SSL_Socket::send_message_on_fd()"); +- return -1; ++ return 0; + default: +- log_debug("SSL error occured"); +- return -1; ++ log_error("SSL error occured"); } - -- log_debug("Using address family for socket %d: %s",socket_fd, -+ log_debug("Using address family for socket %d: %s - %s",socket_fd, - ((aip->ai_family==AF_INET)?"IPv4": -- ((aip->ai_family==AF_INET6)?"IPv6":"unknown")) -+ ((aip->ai_family==AF_INET6)?"IPv6":"unknown")), -+ ((aip->ai_protocol==IPPROTO_TCP)?"IPPROTO_TCP": -+ ((aip->ai_protocol==IPPROTO_SCTP)?"IPPROTO_SCTP":"unknown")) - ); - - -@@ -1225,6 +1236,7 @@ int Abstract_Socket::open_client_connection(const char* remoteHostname, const ch - hints.ai_flags = AI_PASSIVE; - hints.ai_socktype = SOCK_STREAM; - hints.ai_family = ai_family;//aip->ai_family; // NOTE: On solaris 10 if is set to aip->ai_family, getaddrinfo will crash for IPv4-mapped addresses! -+ hints.ai_protocol = ip_proto; - - error = getaddrinfo(localHostname, localServicename, &hints, &localAddrinfo); - if (error != 0) { -@@ -1390,10 +1402,13 @@ int Abstract_Socket::open_client_connection(const char* remoteHostname, const ch + } + // avoid compiler warnings +@@ -2457,8 +2359,7 @@ int SSL_Socket::send_message_on_nonblocking_fd(int client_id, const unsigned cha + case SSL_ERROR_ZERO_RETURN: + goto client_closed_connection; + default: +- log_warning("SSL error occured"); +- return -1; ++ log_error("SSL error occured"); } + } + +@@ -2547,11 +2448,6 @@ const char* SSL_Socket::ssl_certificate_file_name() { return "ssl_certific + const char* SSL_Socket::ssl_password_name() { return "ssl_private_key_password";} + const char* SSL_Socket::ssl_cipher_list_name() { return "ssl_allowed_ciphers_list";} + const char* SSL_Socket::ssl_verifycertificate_name() { return "ssl_verify_certificate";} +-const char* SSL_Socket::ssl_disable_SSLv2() { return "ssl_disable_SSLv2";} +-const char* SSL_Socket::ssl_disable_SSLv3() { return "ssl_disable_SSLv3";} +-const char* SSL_Socket::ssl_disable_TLSv1() { return "ssl_disable_TLSv1";} +-const char* SSL_Socket::ssl_disable_TLSv1_1() { return "ssl_disable_TLSv1_1";} +-const char* SSL_Socket::ssl_disable_TLSv1_2() { return "ssl_disable_TLSv1_2";} + - log_debug( -- "connected to: host %s service %s via address family %s\n", -+ "connected to: host %s service %s via address family %s with ip_proto %s\n", - remoteHostname, remoteServicename, - ((aip->ai_family==AF_INET)?"IPv4": -- ((aip->ai_family==AF_INET6)?"IPv6":"unknown"))); -+ ((aip->ai_family==AF_INET6)?"IPv6":"unknown")), -+ ((aip->ai_protocol==IPPROTO_TCP)?"IPPROTO_TCP": -+ ((aip->ai_protocol==IPPROTO_SCTP)?"IPPROTO_SCTP":"unknown")) -+ ); - break; + void SSL_Socket::ssl_actions_to_seed_PRNG() { +@@ -2654,10 +2550,10 @@ void SSL_Socket::ssl_init_SSL() + + // check the other side's certificates + if (ssl_verify_certificate) { +- log_debug("Setting verification behaviour: verification required and do not allow to continue on failure.."); ++ log_debug("Setting verification behaviour: verification required and do not allow to continue on failure"); + SSL_CTX_set_verify(ssl_ctx, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, ssl_verify_callback); + } else { +- log_debug("Setting verification behaviour: verification not required and do allow to continue on failure.."); ++ log_debug("Setting verification behaviour: verification not required and do allow to continue on failure"); + SSL_CTX_set_verify(ssl_ctx, SSL_VERIFY_NONE, ssl_verify_callback); } - if (aip==NULL) { -@@ -1774,18 +1789,19 @@ const char* Abstract_Socket::remote_address_name() { return "destIPAddr - const char* Abstract_Socket::local_address_name() { return "serverIPAddr";} - const char* Abstract_Socket::remote_port_name() { return "destPort";} - const char* Abstract_Socket::ai_family_name() { return "ai_family";} -+const char* Abstract_Socket::ip_proto_name() { return "ip_proto";} - const char* Abstract_Socket::use_connection_ASPs_name() { return "use_connection_ASPs";} - const char* Abstract_Socket::halt_on_connection_reset_name(){ return "halt_on_connection_reset";} --const char* Abstract_Socket::client_TCP_reconnect_name() { return "client_TCP_reconnect";} -+const char* Abstract_Socket::client_TCP_reconnect_name() { return "client_TCP_reconnect";} - const char* Abstract_Socket::TCP_reconnect_attempts_name() { return "TCP_reconnect_attempts";} --const char* Abstract_Socket::TCP_reconnect_delay_name() { return "TCP_reconnect_delay";} -+const char* Abstract_Socket::TCP_reconnect_delay_name() { return "TCP_reconnect_delay";} - const char* Abstract_Socket::server_mode_name() { return "server_mode";} - const char* Abstract_Socket::socket_debugging_name() { return "socket_debugging";} - const char* Abstract_Socket::nagling_name() { return "nagling";} - const char* Abstract_Socket::use_non_blocking_socket_name() { return "use_non_blocking_socket";} - const char* Abstract_Socket::server_backlog_name() { return "server_backlog";} --bool Abstract_Socket::add_user_data(int) {return true;} --bool Abstract_Socket::remove_user_data(int) {return true;} -+bool Abstract_Socket::add_user_data(int) {return true;} -+bool Abstract_Socket::remove_user_data(int) {return true;} - bool Abstract_Socket::user_all_mandatory_configparameters_present() { return true; } +@@ -2757,7 +2653,7 @@ int SSL_Socket::ssl_getresult(int res) + return err; + } + +-int SSL_Socket::ssl_verify_certificates_at_handshake(int /*preverify_ok*/, X509_STORE_CTX */*ssl_ctx*/) { ++int SSL_Socket::ssl_verify_certificates_at_handshake(int preverify_ok, X509_STORE_CTX *ssl_ctx) { + // don't care by default + return -1; + } +@@ -2765,7 +2661,7 @@ int SSL_Socket::ssl_verify_certificates_at_handshake(int /*preverify_ok*/, X50 + // Callback function used by OpenSSL. + // Called when a password is needed to decrypt the private key file. + // NOTE: not thread safe +-int SSL_Socket::ssl_password_cb(char *buf, int num, int /*rwflag*/,void */*userdata*/) { ++int SSL_Socket::ssl_password_cb(char *buf, int num, int rwflag,void *userdata) { + + if (ssl_current_client!=NULL) { + char *ssl_client_password; +@@ -2795,23 +2691,18 @@ int SSL_Socket::ssl_verify_callback(int preverify_ok, X509_STORE_CTX *ssl_ctx) + ctx_pointer = SSL_get_SSL_CTX(ssl_pointer); + if (ssl_current_client!=NULL) { +- // if ssl_verifiycertificate == "no", then always accept connections +- if(((SSL_Socket *)ssl_current_client)->ssl_verify_certificate) { +- user_result=((SSL_Socket *)ssl_current_client)->ssl_verify_certificates_at_handshake(preverify_ok, ssl_ctx); +- if (user_result>=0) return user_result; +- } else { +- return 1; +- } ++ user_result=((SSL_Socket *)ssl_current_client)->ssl_verify_certificates_at_handshake(preverify_ok, ssl_ctx); ++ if (user_result>=0) return user_result; + } else { // go on with default authentication + fprintf(stderr, "Warning: no current SSL object found but ssl_verify_callback is called, programming error\n"); + } + + // if ssl_verifiycertificate == "no", then always accept connections +- if (SSL_CTX_get_verify_mode(ctx_pointer) == SSL_VERIFY_NONE) ++ if (SSL_CTX_get_verify_mode(ctx_pointer) && SSL_VERIFY_NONE) + return 1; + // if ssl_verifiycertificate == "yes", then accept connections only if the + // certificate is valid +- else if (SSL_CTX_get_verify_mode(ctx_pointer) & SSL_VERIFY_PEER) { ++ else if (SSL_CTX_get_verify_mode(ctx_pointer) && SSL_VERIFY_PEER) { + return preverify_ok; + } + // something went wrong diff --git a/ttcn/patch_abstract_socket/Abstract_Socket.hh.patch b/ttcn/patch_abstract_socket/Abstract_Socket.hh.patch index bce5667c9379427f8c787a494a45063e633ca6cb..2b4445e916cb402de628f5626322e94e9751d21b 100644 --- a/ttcn/patch_abstract_socket/Abstract_Socket.hh.patch +++ b/ttcn/patch_abstract_socket/Abstract_Socket.hh.patch @@ -1,38 +1,108 @@ -diff --git a/src/Abstract_Socket.hh b/src/Abstract_Socket.hh -index 6d7bc3d..a068662 100644 ---- a/src/Abstract_Socket.hh -+++ b/src/Abstract_Socket.hh -@@ -134,7 +134,7 @@ protected: - bool get_handle_half_close() const {return handle_half_close;} - int get_socket_fd() const; - int get_listen_fd() const {return listen_fd;} -- -+ - //set non-blocking mode - int set_non_block_mode(int fd, bool enable_nonblock); +diff --git a/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.hh b/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.hh +old mode 100644 +new mode 100755 +index 7de8446..ad2d65d +--- a/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.hh ++++ b/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.hh +@@ -1,28 +1,17 @@ + /****************************************************************************** +-* Copyright (c) 2000-2019 Ericsson Telecom AB +-* All rights reserved. This program and the accompanying materials +-* are made available under the terms of the Eclipse Public License v2.0 +-* which accompanies this distribution, and is available at +-* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html +-* +-* Contributors: +-* Zoltan Bibo - initial implementation and initial documentation +-* Gergely Futo +-* Oliver Ferenc Czerman +-* Balasko Jeno +-* Zoltan Bibo +-* Eduard Czimbalmos +-* Kulcsár Endre +-* Gabor Szalai +-* Jozsef Gyurusi +-* Csöndes Tibor +-* Zoltan Jasz +-******************************************************************************/ ++ * Copyright (c) 2000-2025 Ericsson Telecom AB ++ * All rights reserved. This program and the accompanying materials ++ * are made available under the terms of the Eclipse Public License v2.0 ++ * which accompanies this distribution, and is available at ++ * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html ++ ******************************************************************************/ + // + // File: Abstract_Socket.hh + // Description: Abstract_Socket header file +-// Rev: R9B ++// Rev: + // Prodnr: CNL 113 384 ++// Updated: 2010-11-24 ++// Contact: http://ttcn.ericsson.se + // -@@ -149,6 +149,8 @@ protected: + +@@ -120,7 +109,7 @@ protected: + // Shall be called from Handle_Fd_Event() + void Handle_Socket_Event(int fd, boolean is_readable, boolean is_writable, boolean is_error); + // Shall be called from Handle_Timeout() - for possible future development +- void Handle_Timeout_Event(double /*time_since_last_call*/) {}; ++ void Handle_Timeout_Event(double time_since_last_call) {}; + + // Shall be called from outgoing_send() + void send_outgoing(const unsigned char* message_buffer, int length, int client_id = -1); +@@ -144,9 +133,9 @@ protected: + bool increase_send_buffer(int fd, int &old_size, int& new_size); + + const char* get_local_host_name(){return local_host_name; }; +- unsigned int get_local_port_number(){return local_port_number; }; ++ const unsigned int get_local_port_number(){return local_port_number; }; + const char* get_remote_host_name(){return remote_host_name; }; +- unsigned int get_remote_port_number(){return remote_port_number; }; ++ const unsigned int get_remote_port_number(){return remote_port_number; }; + const struct sockaddr_in & get_remote_addr() {return remoteAddr; }; /* FIXME: This function is deprecated and should be removed! */ const struct sockaddr_in & get_local_addr() {return localAddr; }; /* FIXME: This function is deprecated and should be removed! */ const int& get_ai_family() const {return ai_family;} - void set_ai_family(int parameter_value) {ai_family=parameter_value;} -+ const int& get_ip_proto() const {return ip_proto;} -+ void set_ip_proto(int parameter_value) {ip_proto=parameter_value;} - bool get_ttcn_buffer_usercontrol() const {return ttcn_buffer_usercontrol; } - void set_nagling(bool parameter_value) {nagling=parameter_value;} - void set_server_mode(bool parameter_value) {server_mode=parameter_value;} -@@ -204,6 +206,7 @@ protected: - virtual const char* local_address_name(); - virtual const char* remote_port_name(); - virtual const char* ai_family_name(); -+ virtual const char* ip_proto_name(); - virtual const char* use_connection_ASPs_name(); - virtual const char* halt_on_connection_reset_name(); - virtual const char* client_TCP_reconnect_name(); -@@ -269,6 +272,7 @@ private: - char* remote_host_name; - unsigned int remote_port_number; - int ai_family; // address family to use -+ int ip_proto; // protocol to use (e.g. IPPROTO_TCP, IPPROTO_SCTP) - // remoteAddr and localAddr is filled when map_user is called - struct sockaddr_in remoteAddr; /* FIXME: not used! should be removed */ - struct sockaddr_in localAddr; /* FIXME: not used! should be removed */ +@@ -190,15 +179,13 @@ protected: + virtual int send_message_on_nonblocking_fd(int client_id, const unsigned char *message_buffer, int message_length); + // Called after a peer is connected + virtual void peer_connected(int client_id, sockaddr_in& remote_addr); /* This function should be removed! deprecated by: */ +- virtual void peer_connected(int /*client_id*/, const char * /*host*/, const int /*port*/) {}; ++ virtual void peer_connected(int client_id, const char * host, const int port) {}; + // Called after a peer is disconnected + virtual void peer_disconnected(int client_id); + // Called when a peer shut down its fd for writing + virtual void peer_half_closed(int client_id); + // Called after a send error + virtual void report_error(int client_id, int msg_length, int sent_length, const unsigned char* msg, const char* error_text); +- // Called after a unsent message +- virtual void report_unsent(int client_id, int msg_length, int sent_length, const unsigned char* msg, const char* error_text); + + // Test port parameters + virtual const char* local_port_name(); +@@ -365,11 +352,6 @@ protected: + virtual const char* ssl_password_name(); + virtual const char* ssl_cipher_list_name(); + virtual const char* ssl_verifycertificate_name(); +- virtual const char* ssl_disable_SSLv2(); +- virtual const char* ssl_disable_SSLv3(); +- virtual const char* ssl_disable_TLSv1(); +- virtual const char* ssl_disable_TLSv1_1(); +- virtual const char* ssl_disable_TLSv1_2(); + + private: + bool ssl_verify_certificate; // verify other part's certificate or not +@@ -377,13 +359,6 @@ private: + bool ssl_initialized; // whether SSL already initialized or not + bool ssl_use_session_resumption; // use SSL sessions or not + +- bool SSLv2; +- bool SSLv3; +- bool TLSv1; +- bool TLSv1_1; +- bool TLSv1_2; +- +- + char *ssl_key_file; // private key file + char *ssl_certificate_file; // own certificate file + char *ssl_trustedCAlist_file; // trusted CA list file