/******************************************************************************/
// @copyright   Copyright Notification
//   No part may be reproduced except as authorized by written permission.
//   The copyright and the foregoing restriction extend to reproduction in all media.
//   (c) 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).
//   All rights reserved.
// @version: IWD_23wk37
// $Date: 2023-07-21 18:08:50 +0200 (Fri, 21 Jul 2023) $
// $Rev: 36506 $
/******************************************************************************/

module NG_NAS_TypeDefs {

  import from CommonDefs all;
  import from NAS_CommonTypeDefs all;

  type enumerated NAS_5GC_AKA_Type {AKA_5G, AKAP_EAP};

  //****************************************************************************
  // NAS PROTOCOL DEFINITIONS: IEs
  //----------------------------------------------------------------------------
  // General Info Elements (24.501 cl. 9)
  //----------------------------------------------------------------------------

  type B8_Type     ExtdProtocolDiscriminator;                /* 24.501 cl. 9.2 */


  // Note: This IE is not needed when SECURITY PROTECTED NAS MESSAGE is
  // handled by the NAS emulation An alternative approach would be to
  // implement NAS_Message as a union of all NAS messages except
  // SECURITY PROTECTED NAS MESSAGE and SERVICE REQUEST - but this would
  // have impact on codec implementation and may reduce readability */
  type octetstring    NG_NAS_Message;                              /* 24.501 cl. 9.9 */

  //****************************************************************************
  // NAS PROTOCOL DEFINITIONS: PDUs
  //----------------------------------------------------------------------------
  // NG mobility management messages (24.501 cl. 8.2)
  //----------------------------------------------------------------------------

  type record NG_AUTHENTICATION_REQUEST {                          /* 24.501 cl. 8.2.1
                                                                   Significance:  dual
                                                                   Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7       M V 1   */
    SpareHalfOctet                      spareHalfOctet2,                        /* cl. 9.5       M V 1/2 */
    NAS_KeySetIdentifier                ngNasKeySetId,                          /* cl. 9.11.3.29 M V 1/2 */
    ABBA                                abba,                                   /* cl. 9.11.3.10 M LV 3-n Dec18 */
    RAND                                rand                     optional,      /* cl. 9.11.3.16 O TV 17  IEI=21 */
    AUTN                                autn                     optional,      /* cl. 9.11.3.15 O TLV 18 IEI=20 */
    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
                                                                   Direction:     UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    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
                                                                   Significance:  dual
                                                                   Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7       M V 1   */
    SpareHalfOctet                      spareHalfOctet2,                        /* cl. 9.5       M V 1/2 */
    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
                                                                   Significance:  dual
                                                                   Direction:     UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2        M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5        M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3        M V 1/2 */
    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
                                                                   Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2      M V 1/2 */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5      M V 1/2 */
    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
                                                                   Significance:  dual
                                                                   Direction:     UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7       M V 1   */
    NAS_KeySetIdentifier                ngNasKSI,                               /* cl. 9.11.3.32 M V 1/2 */
    RegistrationType                    registrationType,                       /* cl. 9.11.3.7  M V 1/2 Dec18 */
    NG_MobileIdentity                   ngMobileId,                             /* cl. 9.11.3.4  M LV-E 6-n  */
    NAS_KeySetIdentifier                nonCurrentNativeKSI           optional, /* cl. 9.11.3.32 O TV 1 IEI=C- */
    NG_GMM_Cap                          gmmCapability                 optional, /* cl. 9.11.3.1  O TLV 3-15 IEI=10 */
    NG_UE_SecurityCapability            ueSecurityCapability          optional, /* cl. 9.11.3.54 O TLV 4-10 IEI=2E */
    NSSAI                               requestedNSSAI                optional, /* cl. 9.11.3.37 O TLV 4-74 IEI=2F */
    NG_TrackingAreaId                   lastVisitedRegisteredTai      optional, /* cl. 9.11.3.8  O TV 7 IEI=52 */
    UE_NetworkCap                       s1_UE_Capability              optional, /* cl. 9.11.3.48 O LV 4-15 IEI=17 */
    ULDataStatus                        ulDataStatus                  optional, /* cl. 9.11.3.57 O TLV 4-34 IEI=40 */
    PDU_SessionStatus                   pduSessionStatus              optional, /* cl. 9.11.3.44 O TLV 4-34 IEI=50 */
    MICO_Ind                            micoInd                       optional, /* cl. 9.11.3.31 O TLV 1 IEI=B */
    UE_Status                           ueStatus                      optional, /* cl. 9.11.3.56 O TLV 3 IEI=2B */
    NG_MobileIdentity                   additionalGUTI                optional, /* cl. 9.11.3.4  O TLV-E 14 IEI=77 */
    AllowedPDU_SessionStatus            allowedPDUSessionStatus       optional, /* cl. 9.11.3.13 O TLV 4-34 IEI=25 */
    UE_UsageSetting                     ueUsageSetting                optional, /* cl. 9.11.3.55 O TLV 3 IEI=18 */
    NG_DRXparameter                     reqDRXParams                  optional, /* cl. 9.11.3.2A O TLV 3 IEI=51 */
    EPS_MessageContainer                epsMessage                    optional, /* cl. 9.11.3.24 O TLV-E ? IEI=70 */
    LADN_Ind                            ladnInd                       optional, /* cl. 9.11.3.29 O TLV-E 3-811 IEI=74 */
    PayloadContainerType                payloadContainerType          optional, /* cl. 9.11.3.40 O TV 1 IEI=8 Mar 19 @sic R5w190113 sic@*/
    PayloadContainer                    payload                       optional, /* cl. 9.11.3.39 O TLV-E 4-65538 IEI=7B */
    NetworkSlicingInd                   networkSlicingInd             optional, /* cl. 9.11.3.36 O TV 1 IEI=9 Dec18 */
    NG_UpdateType                       updateType                    optional, /* cl. 9.11.3.9A O TLV 3 IEI=53 Dec18 */
    MS_Clsmk2                           msClassmark2                  optional, /* cl. 9.11.3.31C O TLV 5 IEI=41 Sep20 @sic R5s201387 Baseline Moving sic@ */
    CodecList                           supportedCodecs               optional, /* cl. 9.11.3.51A O TLV 5-n IEI=42 Sep20 @sic R5s201387 Baseline Moving sic@ */
    NASMessageContainer                 nasMsg                        optional, /* cl. 9.11.3.33 O TLV-E 4-n IEI=71 Dec18 */
    EPS_BearerContextStatus             epsBearerContextStatus        optional, /* cl. 9.11.3.23A O TLV 4 IEI=60 Jun19 @sic R5s190543 sic@ */
    ExtdDRXParams                       requestedExtdDRXParams        optional, /* cl. 9.11.3.26A O TLV 3-4 IEI=6E Sep20 @sic R5s201387 Baseline Moving sic@ */
    GPRS_Timer3                         t3324Value                    optional, /* cl. 9.11.2.5   O TLV 3 IEI=6A Sep20 @sic R5s201387 Baseline Moving sic@ */
    UERadioCapId                        ueRadioCapabilityId           optional, /* cl. 9.11.3.68  O TLV 3-n IEI=67 Sep20 @sic R5s201387 Baseline Moving sic@ */
    MappedNSSAI                         requestedMappedNSSAI          optional, /* cl. 9.11.3.31B O TLV 3-42 IEI=35 Sep20 @sic R5s201387 Baseline Moving sic@ */
    AddInfoRequest                      additionalInfoReq             optional, /* cl. 9.11.3.12A O TLV 3 IEI=48 Sep20 @sic R5s201387 Baseline Moving sic@ */
    WUSAssistInfo                       requestedWUSAssistanceInfo    optional, /* cl. 9.11.3.71  O TLV 3-n IEI=1A Sep20 @sic R5s201387 Baseline Moving sic@ */
    N5GCInd                             n5GCInd                       optional, /* cl. 9.11.3.72  O TV  1 IEI=A Sep20 @sic R5s201387 Baseline Moving sic@ */
    NB_N1ModeDRXParams                  requestedNB_N1DRXParams       optional, /* cl. 9.11.3.73  O TLV 3 IEI=30 Sep20 @sic R5s201387 Baseline Moving sic@ */
    UE_RequestType                      ueRequestType                 optional, /* cl. 9.11.3.76  O TLV 3 IEI=29 Sep22 @sic R5s221179 Baseline Moving sic@ */
    NG_PagingRestriction                pagingRestrict                optional, /* cl. 9.11.3.77  O TLV 3-35 IEI=28 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@ */
    NID                                 nId                           optional, /* cl. 9.11.3.79  O TLV 8 IEI=32 Sep22 @sic R5s221179 Baseline Moving sic@ */
    PLMN_IdIE                           msPLMNwDisasterCondition      optional, /* cl. 9.11.3.85  O TLV 5 IEI=16 Sep22 @sic R5s221179 Baseline Moving sic@ */
    PEIPS_AssistInfo                    requestedPEIPS_AssistInfo     optional, /* cl. 9.11.3.80  O TLV 3-n IEI=2A Sep22 @sic R5s221179 Baseline Moving sic@ */
    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
                                                                   Significance:  dual
                                                                   Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7       M V 1   */
    RegistrationResult                  registrationResult,                     /* cl. 9.11.3.6  M LV 2 */
    NG_MobileIdentity                   guti                          optional, /* cl. 9.11.3.4  O TLV 13 IEI=77 Dec18 */
    PLMN_List                           equivalentPlmns               optional, /* cl. 9.11.3.45 O TLV 5-47 IEI=4A */
    NG_TrackingAreaIdList               taiList                       optional, /* cl. 9.11.3.9  O TLV 9-114 IEI=54 */
    NSSAI                               allowedNSSAI                  optional, /* cl. 9.11.3.37 O TLV 4-74 IEI=15 */
    RejectedNSSAI                       rejectedNSSAI                 optional, /* cl. 9.11.3.46 O TLV 4-42 IEI=11 */
    NSSAI                               configuredNSSAI               optional, /* cl. 9.11.3.37 O TLV 4-146 IEI=31 */
    NG_NetworkFeatureSupport            ngs_NetworkFeatureSupport     optional, /* cl. 9.11.3.5  O TLV 3-5  IEI=21 */
    PDU_SessionStatus                   pduSessionStatus              optional, /* cl. 9.11.3.44 O TLV 4-34 IEI=50 */
    PDU_SessionReactivationResult       pduSessionReactivationResult  optional, /* cl. 9.11.3.42 O TLV 4-34 IEI=26 */
    PDU_SessionReactivationError        pduSessionReactResultError    optional, /* cl. 9.11.3.43 O TLV-E 5-515 IEI=72 */
    LADN_Info                           ladnInfo                      optional, /* cl. 9.11.3.30 O TLV-E 12-1715 IEI=79 */
    MICO_Ind                            micoInd                       optional, /* cl. 9.11.3.31 O TV 1 IEI=B */
    NetworkSlicingInd                   networkSlicingInd             optional, /* cl. 9.11.3.36 O TV 1 IEI=9 */
    ServiceAreaIdList                   saiList                       optional, /* cl. 9.11.3.49 O TLV 6-114 IEI=27 */
    GPRS_Timer3                         t3512Value                    optional, /* cl. 9.11.2.5  O TLV 3 IEI=5E */
    GPRS_Timer2                         non3GPPDeregisterValue        optional, /* cl. 9.11.2.4  O TLV 3 IEI=5D */
    GPRS_Timer2                         t3502Value                    optional, /* cl. 9.11.2.4  O TLV 3 IEI=16 */
    EmergNumList                        emergencyNumberList           optional, /* cl. 9.11.3.23 O TLV 5-50 IEI=34 */
    ExtdEmergNumList                    xtdEmergencyNumberList        optional, /* cl. 9.11.3.26 O TLV-E 7-65538 IEI=7A */
    SORTransparentContainer             sorTransparentContainer       optional, /* cl. 9.11.3.51 O TLV-E 20-2048 IEI=73 */
    EAP_Message                         eapMessage                    optional, /* cl. 9.11.2.2  O TLV-E 7-1503 IEI=78*/
    InclusionModeNSSAI                  inclusionModeNSSAI            optional, /* cl. 9.11.3.37A O TV 1 IEI=A Dec18 */
    OperatorAccessCatDefinitions        operatorAccessCatDefs         optional, /* cl. 9.11.3.38 O TLV-E 4-n IEI=76 Dec18 */
    NG_DRXparameter                     negotiatedDRXParams           optional, /* cl. 9.11.3.2A O TLV 3 IEI=51 Dec18 */
    Non3GPP_NW_ProvidedPolicies         non3GPP_NW_ProvidedPolicies   optional, /* cl. 9.11.3.58 O TV 1 IEI = D Mar 19 @sic R5w190113 sic@ */
    EPS_BearerContextStatus             epsBearerContextStatus        optional, /* cl. 9.11.3.23A O TLV 4 IEI=60 Jun19 @sic R5s190543 sic@ */
    ExtdDRXParams                       negotiatedExtdDRXParams       optional, /* cl. 9.11.3.26A O TLV 3 IEI=6E Sep20 @sic R5s201387 Baseline Moving sic@ */
    GPRS_Timer3                         t3447Value                    optional, /* cl. 9.11.2.5   O TLV 3 IEI=6C Sep20 @sic R5s201387 Baseline Moving sic@ */
    GPRS_Timer2                         t3448Value                    optional, /* cl. 9.11.2.4   O TLV 3 IEI=6B Sep20 @sic R5s201387 Baseline Moving sic@ */
    GPRS_Timer3                         t3324Value                    optional, /* cl. 9.11.2.5   O TLV 3 IEI=6A Sep20 @sic R5s201387 Baseline Moving sic@ */
    UERadioCapId                        ueRadioCapabilityId           optional, /* cl. 9.11.3.68  O TLV 3-n IEI=67 Sep20 @sic R5s201387 Baseline Moving sic@ */
    UERadioCapIdDeletion                ueRadioCapIdDeletionInd       optional, /* cl. 9.11.3.69  O TV  1 IEI=E Sep20 @sic R5s201387 Baseline Moving sic@ */
    NSSAI                               pendingNSSAI                  optional, /* cl. 9.11.3.37  O TLV 4-146 IEI=39 Sep20 @sic R5s201387 Baseline Moving sic@ */
    NG_CipheringKeyData                 cipheringKeyData              optional, /* cl. 9.11.3.18C O TLV-E 34-n IEI=74 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@ */
    TruncatedS_TMSIConfig               truncatedS_TMSIConfig         optional, /* cl. 9.11.3.70  O TLV 3 IEI=1B Sep20 @sic R5s201387 Baseline Moving sic@ */
    WUSAssistInfo                       negotiatedWUSAssistanceInfo   optional, /* cl. 9.11.3.71  O TLV 3-n IEI=1C Sep20 @sic R5s201387 Baseline Moving sic@ */
    NB_N1ModeDRXParams                  negotiatedNB_N1DRXParams      optional, /* cl. 9.11.3.73  O TLV 3 IEI=29 Sep20 @sic R5s201387 Baseline Moving sic@ */
    ExtdRejectedNSSAI                   extdRejectedNSSAI             optional, /* cl. 9.11.3.75  O TLV 5-90 IEI=68 Sep22 @sic R5s221179 Baseline Moving sic@ */
    ServiceLvlAAContainer               serviceLvlAA                  optional, /* cl. 9.11.2.10  O TLV-E 6-n IEI=7B Sep22 @sic R5s221179 Baseline Moving sic@ */
    PEIPS_AssistInfo                    negotiatedPEIPS_AssistInfo    optional, /* cl. 9.11.3.80  O TLV 3-n IEI=33 Sep22 @sic R5s221179 Baseline Moving sic@ */
    NG_AddReqResult                     ngAddRequestResult            optional, /* cl. 9.11.3.81  O TLV 3 IEI=35 Sep22 @sic R5s221179 Baseline Moving sic@ */
    NSSRG_Info                          nssrgInfo                     optional, /* cl. 9.11.3.82  O TLV-E 7-65538 IEI=70 Sep22 @sic R5s221179 Baseline Moving sic@ */
    RegistrationWaitRange               disasterRoamingWaitRange      optional, /* cl. 9.11.3.84  O TLV 4 IEI=14 Sep22 @sic R5s221179 Baseline Moving sic@ */
    RegistrationWaitRange               disasterReturnWaitRange       optional, /* cl. 9.11.3.84  O TLV 4 IEI=2C Sep22 @sic R5s221179 Baseline Moving sic@ */
    DisasterPLMNList                    disasterPLMNList              optional, /* cl. 9.11.3.83  O TLV 2-n IEI=13 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@ */
    ExtdCAGInfoList                     extdCAGInfoList               optional, /* cl. 9.11.3.86  O TLV-E 3-n IEI=71 Sep22 @sic R5s221179 Baseline Moving sic@ */
    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
                                                                   Significance:  dual
                                                                   Direction:     UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7       M V 1   */
    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
                                                                   Significance:  dual
                                                                   Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5      M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3      M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7      M V 1   */
    GMM_GSM_Cause                       gmmCause,                               /* cl. 9.11.3.2 M V 1   */
    GPRS_Timer2                         t3346                         optional, /* cl. 9.11.2.4 O TLV 3 IEI=5F */
    GPRS_Timer2                         t3502                         optional, /* cl. 9.11.2.4 O TLV 3 IEI=16 */
    EAP_Message                         eapMessage                    optional, /* cl. 9.11.2.2  O TLV-E 7-1503 IEI=78 */
    RejectedNSSAI                       rejectedNSSAI                 optional, /* cl. 9.11.3.46 O TLV 4-42 IEI=69 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@ */
    ExtdRejectedNSSAI                   extdRejectedNSSAI             optional, /* cl. 9.11.3.75  O TLV 5-90 IEI=68 Sep22 @sic R5s221179 Baseline Moving sic@ */
    RegistrationWaitRange               disasterReturnWaitRange       optional, /* cl. 9.11.3.84  O TLV 4 IEI=2C Sep22 @sic R5s221179 Baseline Moving sic@ */
    ExtdCAGInfoList                     extdCAGInfoList               optional, /* cl. 9.11.3.86  O TLV 3-n IEI=71 Sep22 @sic R5s221179 Baseline Moving sic@ */
    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 (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
                                                                    Significance:  local
                                                                    Direction:     UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7       M V 1   */
    SpareHalfOctet                      spareHalfOctet2,                        /* cl. 9.5       M V 1/2 */
    PayloadContainerType                payloadContainerType,                   /* cl. 9.11.3.40 M V 1/2 */
    PayloadContainer                    payload,                                /* cl. 9.11.3.39 M LV-E 3-65537 */
    NG_PDU_SessionId                    pduSessionId                 optional,  /* cl. 9.11.3.41 C TV 2 IEI=12 */
    NG_PDU_SessionId                    oldPDUSessionId              optional,  /* cl. 9.11.3.41 O TV 3 IEI=59 */
    NG_Request_Type                     requestType                  optional,  /* cl. 9.`0.3.47 O TV 1 IEI=8 */
    S_NSSAI_Type                        s_NSSAI                      optional,  /* cl. 9.11.2.8  O TLV 3-10 IEI=22 */
    DNN                                 dnn                          optional,  /* cl. 9.11.3.21 O TLV 3-102 IEI=25 */
    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
                                                                    Direction:     Network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7       M V 1   */
    SpareHalfOctet                      spareHalfOctet2,                        /* cl. 9.5       M V 1/2 */
    PayloadContainerType                payloadContainerType,                   /* cl. 9.11.3.40 M V 1/2 */
    PayloadContainer                    payload,                                /* cl. 9.11.3.39 M LV-E 3-65537 */
    NG_PDU_SessionId                    pduSessionId                 optional,  /* cl. 9.11.3.41 C TV 2 IEI=12 */
    AdditionalInformation               additionalInfo               optional,  /* cl. 9.11.2.1  O TLV 3-n IEI=24 */
    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)";
      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
                                                                   Direction:     UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2        M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5        M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3        M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7        M V 1   */
    NAS_KeySetIdentifier                ngKSI,                                  /* cl. 9.11.3.32  M V 1/2 */
    DeregisterType                      deregistrationType,                     /* cl. 9.11.3.20  M V 1/2 */
    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)
                                                                   Significance:  dual
                                                                   Direction:     network to UE/ UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageType                         messageType                             /* cl. 9.7       M V 1   */
  } with {
    variant "FIELDORDER(msb)";
  }

  type record NG_DEREGISTRATION_REQUEST_MT {                       /* 24.501 cl. 8.2.14 (UE terminated deregister)
                                                                   Significance:  dual
                                                                   Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    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=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@ */
    ExtdRejectedNSSAI                   extdRejectedNSSAI             optional, /* cl. 9.11.3.75  O TLV 5-90 IEI=68 Sep22 @sic R5s221179 Baseline Moving sic@ */
    RegistrationWaitRange               disasterReturnWaitRange       optional, /* cl. 9.11.3.84  O TLV 4 IEI=2C Sep22 @sic R5s221179 Baseline Moving sic@ */
    ExtdCAGInfoList                     extdCAGInfoList               optional, /* cl. 9.11.3.86  O TLV 3-n IEI=71 Sep22 @sic R5s221179 Baseline Moving sic@ */
    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
                                                                   Significance:  dual
                                                                   Direction:     UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7       M V 1   */
    B4_Type                             serviceType,                            /* cl. 9.11.3.50 M V 1/2 */
    NAS_KeySetIdentifier                ngKSI,                                  /* cl. 9.11.3.32 M V 1/2 */
    NG_MobileIdentity                   s_TMSI,                                 /* cl. 9.11.3.4  M LV-E 8  */
    ULDataStatus                        ulDataStatus                  optional, /* cl. 9.11.2.57 O TLV 4-34 IEI=40 */
    PDU_SessionStatus                   pduSessionStatus              optional, /* cl. 9.11.2.44 O TLV 4-34 IEI=50 */
    AllowedPDU_SessionStatus            allowedPDUSessionStatus       optional, /* cl. 9.11.3.13 O TLV 4-34 IEI=25 */
    NASMessageContainer                 nasMsg                        optional, /* cl. 9.11.3.33 O TLV-E 3-n IEI=71 Dec18 */
    UE_RequestType                      ueRequestType                 optional, /* cl. 9.11.3.76 O TLV 3 IEI=29 Sep22 @sic R5s221179 Baseline Moving sic@ */
    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
                                                                   Significance:  dual
                                                                   Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7       M V 1   */
    PDU_SessionStatus                   pduSessionStatus              optional, /* cl. 9.11.2.44 O TLV 4-34 IEI=50 */
    PDU_SessionReactivationResult       pduSessionReactivationResult  optional, /* cl. 9.11.3.42 O TLV 4-32 IEI=26 */
    PDU_SessionReactivationError        pduSessionReactResultError    optional, /* cl. 9.11.3.43 O TLV-E 5-515 IEI=72 */
    EAP_Message                         eapMessage                    optional, /* cl. 9.11.2.2  O TLV-E 7-1503 IEI=78*/
    GPRS_Timer2                         t3448                         optional, /* cl. 9.11.2.4  O TLV 3 IEI=6B Sep20 @sic R5s201387 Baseline Moving sic@ */
    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)";
    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
                                                                   Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7       M V 1   */
    GMM_GSM_Cause                       gmmCause,                               /* cl. 9.11.3.2  M V 1   */
    PDU_SessionStatus                   pduSessionStatus              optional, /* cl. 9.11.2.44 O TLV 4-34 IEI=50 */
    GPRS_Timer2                         t3346                         optional, /* cl. 9.11.2.4  O TLV 3 IEI=5F */
    EAP_Message                         eapMessage                    optional, /* cl. 9.11.2.2  O TLV-E 7-1503 IEI=78 */
    GPRS_Timer2                         t3448                         optional, /* cl. 9.11.2.4  O TLV 3 IEI=6B 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@ */
    RegistrationWaitRange               disasterReturnWaitRange       optional, /* cl. 9.11.3.84  O TLV 4 IEI=2C Sep22 @sic R5s221179 Baseline Moving sic@ */
    ExtdCAGInfoList                     extdCAGInfoList               optional, /* cl. 9.11.3.86  O TLV 3-n IEI=71 Sep22 @sic R5s221179 Baseline Moving sic@ */
    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 (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
                                                                   Significance:  local
                                                                   Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7       M V 1   */
    ConfigUpdateInd                     configUpdateInd               optional, /* cl. 9.11.3.18 M TV 1 IEI=D */
    NG_MobileIdentity                   guti                          optional, /* cl. 9.11.3.4  O TLV 13 IEI=77 Dec18 */
    NG_TrackingAreaIdList               taiList                       optional, /* cl. 9.11.3.9  O TLV 9-114 IEI=54 */
    NSSAI                               allowedNSSAI                  optional, /* cl. 9.11.3.37 O TLV 4-74 IEI=15 */
    ServiceAreaIdList                   saiList                       optional, /* cl. 9.11.3.49 O TLV 6-114 IEI=27 */
    NetworkName                         fullNetworkName               optional, /* cl. 9.11.3.35 O TLV 3-? IEI=43 */
    NetworkName                         shortNetworkName              optional, /* cl. 9.11.3.35 O TLV 3-? IEI=45 */
    TimeZone                            localTimeZone                 optional, /* cl. 9.11.3.52 O TV 2    IEI=46 */
    TimeZoneAndTime                     localTimeZoneAndTime          optional, /* cl. 9.11.3.53 O TV 8    IEI=47 */
    DaylightSavingTime                  daylightSavingTime            optional, /* cl. 9.11.3.19 O TLV 3   IEI=49 */
    LADN_Info                           ladnInfo                      optional, /* cl. 9.11.3.30 O TLV-E 3-1715 IEI=79 */
    MICO_Ind                            micoInd                       optional, /* cl. 9.11.3.31 O TLV 1 IEI=B */
    NetworkSlicingInd                   networkSlicingInd             optional, /* cl. 9.11.3.36 O TV 1 IEI=9 */
    NSSAI                               configuredNSSAI               optional, /* cl. 9.11.3.37 O TLV 4-146 IEI=31 */
    RejectedNSSAI                       rejectedNSSAI                 optional, /* cl. 9.11.3.46 O TLV 4-42 IEI=11 */
    OperatorAccessCatDefinitions        operatorAccessCatDefs         optional, /* cl. 9.11.3.38 O TLV-E 4-n IEI=76 Dec18 */
    SMSInd                              smsInd                        optional, /* cl. 9.10.3.50A O TV 1 IEI=F Dec18 */
    GPRS_Timer3                         t3447Value                    optional, /* cl. 9.11.2.5   O TLV 3 IEI=6C 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@ */
    UERadioCapId                        ueRadioCapabilityId           optional, /* cl. 9.11.3.68  O TLV 3-n IEI=67 Sep20 @sic R5s201387 Baseline Moving sic@ */
    UERadioCapIdDeletion                ueRadioCapIdDeletionInd       optional, /* cl. 9.11.3.69  O TV  1 IEI=A Sep20 @sic R5s201387 Baseline Moving sic@ */
    RegistrationResult                  registrationResult            optional, /* cl. 9.11.3.6   O TLV 3 IEI=44 Sep20 @sic R5s201387 Baseline Moving sic@ */
    TruncatedS_TMSIConfig               truncatedS_TMSIConfig         optional, /* cl. 9.11.3.70  O TLV 3 IEI=1B Sep20 @sic R5s201387 Baseline Moving sic@ */
    AddConfigInfo                       addConfigInfo                 optional, /* cl. 9.11.3.74  O TV  1 IEI=C Sep20 @sic R5s201387 Baseline Moving sic@ */
    ExtdRejectedNSSAI                   extdRejectedNSSAI             optional, /* cl. 9.11.3.75  O TLV 5-90 IEI=68 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@ */
    NSSRG_Info                          nssrgInfo                     optional, /* cl. 9.11.3.82  O TLV-E 7-65538 IEI=70 Sep22 @sic R5s221179 Baseline Moving sic@ */
    RegistrationWaitRange               disasterRoamingWaitRange      optional, /* cl. 9.11.3.84  O TLV 4 IEI=14 Sep22 @sic R5s221179 Baseline Moving sic@ */
    RegistrationWaitRange               disasterReturnWaitRange       optional, /* cl. 9.11.3.84  O TLV 4 IEI=2C Sep22 @sic R5s221179 Baseline Moving sic@ */
    DisasterPLMNList                    disasterPLMNList              optional, /* cl. 9.11.3.83  O TLV 2-n IEI=13 Sep22 @sic R5s221179 Baseline Moving sic@ */
    ExtdCAGInfoList                     extdCAGInfoList               optional, /* cl. 9.11.3.86  O TLV 3-n IEI=71 Sep22 @sic R5s221179 Baseline Moving sic@ */
    PEIPS_AssistInfo                    updatedPEIPS_AssistInfo       optional, /* cl. 9.11.3.80  O TLV 3-n IEI=1F Sep22 @sic R5s221179 Baseline Moving sic@ */
    NSAG_Info                           nsagInfo                      optional, /* cl. 9.11.3.87  O TLV 10-n IEI=73 Sep22 @sic R5s221179 Baseline Moving sic@ */
    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
                                                                   Significance:  local
                                                                   Direction:     UE to Network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5      M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3      M V 1/2 */
    MessageType                         messageType                             /* cl. 9.7      M V 1   */
  } with {
    variant "FIELDORDER(msb)";
  }

  type record NG_IDENTITY_REQUEST {                                /* 24.501 cl. 8.2.21
                                                                   Significance:  dual
                                                                   Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5      M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3      M V 1/2 */
    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)";
  }

  type record NG_IDENTITY_RESPONSE {                               /* 24.501 cl. 8.2.22
                                                                   Significance:  dual
                                                                   Direction:     UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5      M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3      M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7      M V 1   */
    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
                                                                    Significance:  dual
                                                                    Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    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
                                                                    Significance:  dual
                                                                    Direction:     UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7       M V 1   */
    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
                                                                   Significance:  dual
                                                                   Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7       M V 1   */
    NG_NAS_SecurityAlgorithms           nasSecurityAlgorithms,                  /* cl. 9.11.3.34 M V 1   */
    SpareHalfOctet                      spareHalfOctet2,                        /* cl. 9.5       M V 1/2 */
    NAS_KeySetIdentifier                ngNasKSI,                               /* cl. 9.11.3.32 M V 1/2 */
    NG_UE_SecurityCapability            ueSecurityCapability,                   /* cl. 9.11.3.54 M LV 3-9 */
    IMEISV_Request                      imeisvRequest                 optional, /* cl. 9.11.3.28 O TV 1 IEI=E */
    NAS_SecurityAlgorithms              epsSecurityAlgorithms         optional, /* cl. 9.11.3.25 O TV 2 IEI=57 */
    AdditionalSecurityInfo              add5GSecurityInfo             optional, /* cl. 9.11.3.12 O TLV 3 IEI=36 */
    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 (nasSecurityAlgorithms) "FORCEOMIT(iei)";
    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
                                                                   Significance:  dual
                                                                   Direction:     UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7       M V 1   */
    NG_MobileIdentity                   imeisv                        optional, /* cl. 9.11.3.4  O TLV-E 11 IEI=77 Dec18 */
    NASMessageContainer                 nasMsg                        optional, /* cl. 9.11.3.33 O TLV-E 4-n IEI=71 */
    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
                                                                   Significance:  dual
                                                                   Direction:     UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7       M V 1   */
    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
                                                                   Significance:  dual
                                                                   Direction:     both */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageAuthenticationCode           messageAuthenticationCode,              /* cl. 9.8       M V 4   */
    NAS_SequenceNumber                  sequenceNumber,                         /* cl. 9.10      M V 1   */
    NG_NAS_Message                      plainNASMessage                         /* cl. 9.9       M V 3-n */
  } with {
    variant "FIELDORDER(msb)";
   }


  type record NG_GMM_STATUS {                       /* 24.501 cl. 8.2.29
                                                             Significance:  dual
                                                             Direction:     both */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7       M V 1   */
    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@
                                                                   Significance:  dual
                                                                   Direction:     UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2        M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5        M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3        M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7        M V 1   */
    NAS_KeySetIdentifier                ngKSI,                                  /* cl. 9.11.3.32  M V 1/2 */
    CP_ServiceType                      cpServiceType,                          /* cl. 9.11.3.18D M V 1/2 */
    CIoTSmallDataRxdString              cIoTSmallDataContainer        optional, /* cl. 9.11.3.18B O TLV 4-257 IEI=6F This is received as an encoded octetstring */
    PayloadContainerType                payloadContainerType          optional, /* cl. 9.11.3.40  O TV 1 IEI=8 */
    PayloadContainer                    payload                       optional, /* cl. 9.11.3.39  O TLV-E 4-65538 IEI=7B */
    NG_PDU_SessionId                    pduSessionId                  optional, /* cl. 9.11.3.41  C TV 2 IEI=12 */
    PDU_SessionStatus                   pduSessionStatus              optional, /* cl. 9.11.2.44 O TLV 4-34 IEI=50 */
    ReleaseAssistanceInd                releaseAssistanceInd          optional, /* cl. 9.11.3.46A  O TV 1 IEI=F */
    ULDataStatus                        ulDataStatus                  optional, /* cl. 9.11.2.57 O TLV 4-34 IEI=40 */
    NASMessageContainer                 nasMsg                        optional, /* cl. 9.11.3.33 O TLV-E 3-n IEI=71 */
    AdditionalInformation               additionalInfo                optional, /* cl. 9.11.2.1  O TLV 3-n IEI=24 */
    AllowedPDU_SessionStatus            allowedPDUSessionStatus       optional, /* cl. 9.11.3.13 O TLV 4-34 IEI=25 Sep22 @sic R5s221179 Baseline Moving sic@ */
    UE_RequestType                      ueRequestType                 optional, /* cl. 9.11.3.76 O TLV 3 IEI=29 Sep22 @sic R5s221179 Baseline Moving sic@ */
    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@
                                                                   Significance:  dual
                                                                   Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7       M V 1   */
    S_NSSAI_LV                          sNSSAI,                                 /* cl. 9.11.2.8  M LV 2-5 @sic R5s221179 Baseline Moving sic@  */
    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@
                                                                   Significance:  dual
                                                                   Direction:     UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7       M V 1   */
    S_NSSAI_LV                          sNSSAI,                                 /* cl. 9.11.2.8  M LV 2-5 @sic R5s221179 Baseline Moving sic@  */
    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@
                                                                   Significance:  dual
                                                                   Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    SpareHalfOctet                      spareHalfOctet,                         /* cl. 9.5       M V 1/2 */
    SecurityHeaderType                  securityHeaderType,                     /* cl. 9.3       M V 1/2 */
    MessageType                         messageType,                            /* cl. 9.7       M V 1   */
    S_NSSAI_LV                          sNSSAI,                                 /* cl. 9.11.2.8  M LV 2-5 @sic R5s221179 Baseline Moving sic@  */
    EAP_Message                         eapMessage                              /* cl. 9.11.2.2  M LV-E 6-1502 */
  } with {
    variant "FIELDORDER(msb)";
    variant (eapMessage) "FORCEOMIT(iei)";
  }

  //----------------------------------------------------------------------------
  // NG session management messages (24.501 cl. 8.3)
  //----------------------------------------------------------------------------

  type record NG_PDU_SESSION_ESTABLISHMENT_REQUEST {               /* 24.501 cl. 8.3.1
                                                                   Significance:  dual
                                                                   Direction:     UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                   /* cl. 9.2       M V 1   */
    NG_PDU_SessionId                    pduSessionId,                            /* cl. 9.4       M V 1   */
    ProcedureTransactionIdentifier      procedureTransactionIdentifier,          /* cl. 9.6       M V 1   */
    MessageType                         messageType,                             /* cl. 9.7       M V 1   */
    IntegrityProtMaxDataRate            integrityProtMaxDataRate,                /* cl. 9.11.4.7  M V 2 Dec18 */
    PDU_SessionType                     pduSessionType                optional,  /* cl. 9.11.4.11 O TV 1 IEI=9 */
    SSC_Mode                            sscMode                       optional,  /* cl. 9.11.4.16 O TV 1 IEI=A */
    NG_UE_SM_Cap                        smCapability                  optional,  /* cl. 9.11.4.1  O TLV 3-15 IEI=28 */
    MaxNumPacketFilters                 maxNumPacketFilters           optional,  /* c.  9.11.4.9  O TV 3 IEI=55 */
    AlwaysOnPDUSessionReq               alwaysOnPDUSessionReq         optional,  /* c.  9.11.4.4  O TV 1 IEI=B */
    SM_PDU_DN_RequestContainer          smPDU_RequestContainer        optional,  /* cl. 9.11.4.15 O TLV 3-255 IEI=39 */
    ExtdProtocolConfigOptions           extdProtocolConfigurationOptions optional, /* cl. 9.11.4.6 O TLV-E 4-65538 IEI=7B */
    IPHeaderCompressionConfig           ipHeaderCompressionConfig     optional, /* cl. 9.11.4.24   O TLV 5-257 IEI=66 Sep20 @sic R5s201387 Baseline Moving sic@ */
    DS_TT_EthernetPortMACAddr           ds_TT_EthernetPortMACAddr     optional, /* cl. 9.11.4.25  O TLV 8 IEI=6E Sep20 @sic R5s201387 Baseline Moving sic@ */
    UE_DS_TT_ResidenceTime              ueDS_TT_ResidenceTime         optional, /* cl. 9.11.4.26  O TLV 10 IEI=6F Sep20 @sic R5s201387 Baseline Moving sic@ */
    PortManagementInfoContainer         portManagementInfoContainer   optional, /* cl. 9.11.4.27  O TLV-E 8-65538 IEI=74 Sep20 @sic R5s201387, R5s210444 Baseline Moving sic@ */
    EthernetHeaderCompressConfig        ethernetHeaderCompressConfig  optional, /* cl. 9.11.4.28  O TLV 3 IEI=1F Sep20 @sic R5s201387 Baseline Moving sic@ */
    PDU_Address                         suggestedInterfaceId          optional, /* cl. 9.11.4.10  O TLV 11 IEI=29 Sep20 @sic R5s201387 Baseline Moving sic@ */
    ServiceLvlAAContainer               serviceLvlAA                  optional, /* cl. 9.11.2.10  O TLV-E 6-n IEI=72 Sep22 @sic R5s221179 Baseline Moving sic@ */
    RequestedMBSContainer               requestedMBS                  optional, /* cl. 9.11.4.30  O TLV-E 8-65538 IEI=70 Sep22 @sic R5s221179 Baseline Moving sic@ */
    PDUSessionPairId                    pduSessionPairId              optional, /* cl. 9.11.4.32  O TLV 3 IEI=34 Sep22 @sic R5s221179 Baseline Moving sic@ */
    RSN                                 rsn                           optional  /* cl. 9.11.4.33  O TLV 3 IEI=35 Sep22 @sic R5s221179 Baseline Moving sic@ */
  } with {
    variant "FIELDORDER(msb)";
    variant (pduSessionId) "FORCEOMIT(iei)";
    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
                                                                   Significance:  dual
                                                                   Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                   /* cl. 9.2       M V 1   */
    NG_PDU_SessionId                    pduSessionId,                            /* cl. 9.4       M V 1   */
    ProcedureTransactionIdentifier      procedureTransactionIdentifier,          /* cl. 9.6       M V 1   */
    MessageType                         messageType,                             /* cl. 9.7       M V 1   */
    SSC_Mode                            sscMode,                                 /* cl. 9.11.4.16 M V 1/2 */
    PDU_SessionType                     pduSessionType,                          /* cl. 9.11.4.11 M V 1/2 */
    QoS_Rules                           authorizedQoSRules,                      /* cl. 9.11.4.13 M LV-E 7-65538 */
    Session_AMBR                        sessionAMBR,                             /* cl. 9.11.4.14 M LV ? */
    GMM_GSM_Cause                       gsmCause                      optional,  /* cl. 9.11.4.2  O TV 2 IEI=59 */
    PDU_Address                         pduAddress                    optional,  /* cl. 9.11.4.10 O TLV 7-31 IEI=29 */
    GPRS_Timer                          rqTimerValue                  optional,  /* cl. 9.11.2.3  O TLV 2 IEI=56 */
    S_NSSAI_Type                        s_NSSAI                       optional,  /* cl. 9.11.2.8  O TLV 3-10 IEI=22 */
    AlwaysOnPDUSessionInd               alwaysOnPDUSessionInd         optional,  /* c.  9.11.4.3  O TV 1 IEI=8 */
    MappedEPSBearerContexts             mappedEPSContexts             optional,  /* cl. 9.11.4.8  O TLV-E 7-65538 IEI=75 */
    EAP_Message                         eapMessage                    optional,  /* cl. 9.11.2.2  O TLV-E 7-1503 IEI=78 */
    QoSFlowDescr                        authorizedQoSFlowDescr        optional,  /* cl. 9.11.4.12 O TLV-E 6-65538 IEI=79 */
    ExtdProtocolConfigOptions           extdProtocolConfigurationOptions optional, /* cl. 9.11.4.6 O TLV-E 4-65538 IEI=7B */
    DNN                                 dnn                           optional,  /* cl. 9.11.2.1A O TLV 3-102 IEI=25 Dec18 */
    NGSM_NetworkFeatureSupport          ngs_NetworkFeatureSupport     optional,  /* cl. 9.11.4.18 O TLV 3-15  IEI=17 Sep20 @sic R5s201387 Baseline Moving sic@ */
    ServingPLMNRateControl              servingPLMNRateControl        optional,  /* cl. 9.11.4.20 O TLV 4  IEI=18 Sep20 @sic R5s201387 Baseline Moving sic@ */
    ATSSSContainer                      atsssContainer                optional,  /* cl. 9.11.4.22 O TLV-E 3-65538  IEI=77 Sep20 @sic R5s201387 Baseline Moving sic@ */
    ControlPlaneInd                     controlPlaneOnlyIndication    optional,  /* cl. 9.11.4.23 O TV 1  IEI=C Sep20 @sic R5s201387 Baseline Moving sic@ */
    IPHeaderCompressionConfig           ipHeaderCompressionConfig     optional,  /* cl. 9.11.4.24 O TLV 5-257 IEI=66 Sep20 @sic R5s201387 Baseline Moving sic@ */
    EthernetHeaderCompressConfig        ethernetHeaderCompressConfig  optional,  /* cl. 9.11.4.28 O TLV 3 IEI=1F Sep20 @sic R5s201387 Baseline Moving sic@ */
    ServiceLvlAAContainer               serviceLvlAA                  optional,  /* cl. 9.11.2.10 O TLV-E 6-n IEI=72 Sep22 @sic R5s221179 Baseline Moving sic@ */
    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 (pduSessionId) "FORCEOMIT(iei)";
    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
                                                                   Significance:  dual
                                                                   Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                   /* cl. 9.2       M V 1   */
    NG_PDU_SessionId                    pduSessionId,                            /* cl. 9.4       M V 1   */
    ProcedureTransactionIdentifier      procedureTransactionIdentifier,          /* cl. 9.6       M V 1   */
    MessageType                         messageType,                             /* cl. 9.7       M V 1   */
    GMM_GSM_Cause                       gsmCause,                                /* cl. 9.11.4.2  M V 1   */
    GPRS_Timer3                         backOffTimerValue             optional,  /* cl. 9.11.2.5  O TLV 3 IEI=37 */
    AllowedSSCMode                      allowedSSCMode                optional,  /* cl. 9.11.4.5  O TV  1 IEI=F */
    EAP_Message                         eapMessage                    optional,  /* cl. 9.11.2.2  O TLV-E 7-1503 IEI=78 */
    NGSM_CongestionReattemptInd         ngsmCongestionReattemptInd    optional,  /* cl. 9.11.4.21 O TLV 3 IEI=61 Sep20 @sic R5s201387, R5s210444 Baseline Moving sic@ */
    ExtdProtocolConfigOptions           extdProtocolConfigurationOptions optional, /* cl. 9.11.4.6 O TLV-E 4-65538 IEI=7B */
    ReAttemptIndicator                  reattemptInd                  optional,  /* cl. 9.11.4.17 O TLV 3 IEI=1D Sep20 @sic R5s201387 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)";
    variant (pduSessionId) "FORCEOMIT(iei)";
    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
                                                                   Significance:  dual
                                                                   Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                     /* cl. 9.2       M V 1   */
    NG_PDU_SessionId                    pduSessionId,                              /* cl. 9.4       M V 1   */
    ProcedureTransactionIdentifier      procedureTransactionIdentifier,            /* cl. 9.6       M V 1   */
    MessageType                         messageType,                               /* cl. 9.7       M V 1   */
    EAP_Message                         eapMessage,                                /* cl. 9.11.2.2  M LV-E 6-1502 */
    ExtdProtocolConfigOptions           extdProtocolConfigurationOptions optional  /* cl. 9.11.4.6  O TLV-E 4-65538 IEI=0x7B */
  } with {
    variant "FIELDORDER(msb)";
    variant (pduSessionId) "FORCEOMIT(iei)";
    variant (eapMessage) "FORCEOMIT(iei)";
    variant "TAG(extdProtocolConfigurationOptions, iei = '7b'O)";
  }

  type record NG_PDU_SESSION_AUTHENTICATION_COMPLETE {             /* 24.501 cl. 8.3.5
                                                                   Significance:  dual
                                                                   Direction:     UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                     /* cl. 9.2       M V 1   */
    NG_PDU_SessionId                    pduSessionId,                              /* cl. 9.4       M V 1   */
    ProcedureTransactionIdentifier      procedureTransactionIdentifier,            /* cl. 9.6       M V 1   */
    MessageType                         messageType,                               /* cl. 9.7       M V 1   */
    EAP_Message                         eapMessage,                                /* cl. 9.11.2.2  M LV-E 6-1502 */
    ExtdProtocolConfigOptions           extdProtocolConfigurationOptions optional  /* cl. 9.11.4.6  O TLV-E 4-65538 IEI=0x7B */
  } with {
    variant "FIELDORDER(msb)";
    variant (pduSessionId) "FORCEOMIT(iei)";
    variant (eapMessage) "FORCEOMIT(iei)";
    variant "TAG(extdProtocolConfigurationOptions, iei = '7b'O)";
  }

  type record NG_PDU_SESSION_AUTHENTICATION_RESULT {               /* 24.501 cl. 8.3.6
                                                                   Significance:  dual
                                                                   Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                     /* cl. 9.2       M V 1   */
    NG_PDU_SessionId                    pduSessionId,                              /* cl. 9.4       M V 1   */
    ProcedureTransactionIdentifier      procedureTransactionIdentifier,            /* cl. 9.6       M V 1   */
    MessageType                         messageType,                               /* cl. 9.7       M V 1   */
    EAP_Message                         eapMessage                       optional, /* cl. 9.11.2.2  O TLV-E 7-1503 IEI=78 */
    ExtdProtocolConfigOptions           extdProtocolConfigurationOptions optional  /* cl. 9.11.4.6  O TLV-E 4-65538 IEI=0x7B */
  } with {
    variant "FIELDORDER(msb)";
    variant (pduSessionId) "FORCEOMIT(iei)";
    variant "TAG(eapMessage, iei = '78'O;
                 extdProtocolConfigurationOptions, iei = '7b'O)";
  }

  type record NG_PDU_SESSION_MODIFICATION_REQUEST {                  /* 24.501 cl. 8.3.7
                                                                     Significance:  dual
                                                                     Direction:     UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                    /* cl. 9.2       M V 1   */
    NG_PDU_SessionId                    pduSessionId,                             /* cl. 9.4       M V 1   */
    ProcedureTransactionIdentifier      procedureTransactionIdentifier,           /* cl. 9.6       M V 1   */
    MessageType                         messageType,                              /* cl. 9.7       M V 1   */
    NG_UE_SM_Cap                        smCapability                  optional,   /* cl. 9.11.4.1  O TLV 3-15 IEI=28 */
    GMM_GSM_Cause                       gsmCause                      optional,   /* cl. 9.11.4.2  O TV 2 IEI=59   */
    MaxNumPacketFilters                 maxNumPacketFilters           optional,   /* c.  9.11.4.9  O TV 3 IEI=55 */
    AlwaysOnPDUSessionReq               alwaysOnPDUSessionReq         optional,   /* c.  9.11.4.4  O TV 1 IEI=B */
    IntegrityProtMaxDataRate            integrityProtMaxDataRate      optional,   /* c.  9.11.4.7  O TV 2 IEI=13 */
    QoS_Rules                           requestedQoSRules             optional,   /* cl. 9.11.4.13 O TLV-E 7-65538 IEI=7A */
    QoSFlowDescr                        requestedQoSFlowDescr         optional,   /* cl. 9.11.4.12 O TLV-E 5-65538 IEI=79 */
    MappedEPSBearerContexts             mappedEPSbearerContexts       optional,   /* cl. 9.11.4.8  O TLV-E 7-65538 IEI=75 Dec18 */
    ExtdProtocolConfigOptions           extdProtocolConfigurationOptions optional,/* cl. 9.11.4.6  O TLV-E 4-65538 IEI=7B */
    PortManagementInfoContainer         portManagementInfoContainer   optional,   /* cl. 9.11.4.27 O TLV-E 8-65538 IEI=74 Sep20 @sic R5s201387, R5s210444 Baseline Moving sic@ */
    IPHeaderCompressionConfig           ipHeaderCompressionConfig     optional,   /* cl. 9.11.4.24 O TLV 5-257 IEI=66 Sep20 @sic R5s201387 Baseline Moving sic@ */
    EthernetHeaderCompressConfig        ethernetHeaderCompressConfig  optional,   /* cl. 9.11.4.28 O TLV 3 IEI=1F Sep20 @sic R5s201387 Baseline Moving sic@ */
    RequestedMBSContainer               requestedMBS                  optional,   /* cl. 9.11.4.30 O TLV-E 8-65538 IEI=70 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)";
    variant (pduSessionId) "FORCEOMIT(iei)";
    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
                                                                     Significance:  dual
                                                                     Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                   /* cl. 9.2       M V 1   */
    NG_PDU_SessionId                    pduSessionId,                            /* cl. 9.4       M V 1   */
    ProcedureTransactionIdentifier      procedureTransactionIdentifier,          /* cl. 9.6       M V 1   */
    MessageType                         messageType,                             /* cl. 9.7       M V 1   */
    GMM_GSM_Cause                       gsmCause,                                /* cl. 9.11.4.2  M V 1   */
    GPRS_Timer3                         backOffTimerValue             optional,  /* cl. 9.11.2.5  O TLV 3 IEI=37 */
    NGSM_CongestionReattemptInd         ngsmCongestionReattemptInd    optional,  /* cl. 9.11.4.21 O TLV 3 IEI=61 Sep20 @sic R5s201387, R5s210444 Baseline Moving sic@ */
    ExtdProtocolConfigOptions           extdProtocolConfigurationOptions optional, /* cl. 9.11.4.6 O TLV-E 4-65538 IEI=0x7B */
    ReAttemptIndicator                  reattemptInd                  optional   /* cl. 9.11.4.17 O TLV 3 IEI=1D Sep20 @sic R5s201387 Baseline Moving sic@ */
  } with {
    variant "FIELDORDER(msb)";
    variant (pduSessionId) "FORCEOMIT(iei)";
    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
                                                                   Significance:  dual
                                                                   Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2        M V 1   */
    NG_PDU_SessionId                    pduSessionId,                           /* cl. 9.4        M V 1   */
    ProcedureTransactionIdentifier      procedureTransactionIdentifier,         /* cl. 9.6        M V 1   */
    MessageType                         messageType,                            /* cl. 9.7        M V 1   */
    GMM_GSM_Cause                       gsmCause                      optional, /* cl. 9.11.4.2   O TV 2 IEI=59   */
    Session_AMBR                        sessionAMBR                   optional, /* cl. 9.11.4.14  O TLV 8 IEI=2A */
    GPRS_Timer                          rqTimerValue                  optional, /* cl. 9.11.2.3   O TV 2 IEI=56 */
    AlwaysOnPDUSessionInd               alwaysOnPDUSessionInd         optional, /* c.  9.11.4.3   O TV 1 IEI=8 */
    QoS_Rules                           authorizedQoSRules            optional, /* cl. 9.11.4.13  O TLV-E 7-65538 IEI=7A */
    MappedEPSBearerContexts             mappedEPSContexts             optional, /* cl. 9.11.4.8   O TLV-E 7-65538 IEI=7F or 75 */
    QoSFlowDescr                        authorizedQoSFlowDescr        optional, /* cl. 9.11.4.12  O TLV-E 6-65538 IEI=79 */
    ExtdProtocolConfigOptions           extdProtocolConfigurationOptions optional, /* cl. 9.11.4.6 O TLV-E 4-65538 IEI=7B */
    ATSSSContainer                      atsssContainer                optional, /* cl. 9.11.4.22  O TLV-E 3-65538  IEI=77 Sep20 @sic R5s201387 Baseline Moving sic@ */
    IPHeaderCompressionConfig           ipHeaderCompressionConfig     optional, /* cl. 9.11.4.24  O TLV 5-257 IEI=66 Sep20 @sic R5s201387 Baseline Moving sic@ */
    PortManagementInfoContainer         portManagementInfoContainer   optional, /* cl. 9.11.4.27  O TLV-E 8-65538 IEI=74 Sep20 @sic R5s201387, R5s210444 Baseline Moving sic@ */
    ServingPLMNRateControl              servingPLMNRateControl        optional, /* cl. 9.11.4.20  O TLV 4  IEI=1E Sep20 @sic R5s201387 Baseline Moving sic@ */
    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 { // 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 (pduSessionId) "FORCEOMIT(iei)";
    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
                                                                     Significance:  dual
                                                                     Direction:     UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                   /* cl. 9.2       M V 1   */
    NG_PDU_SessionId                    pduSessionId,                            /* cl. 9.4       M V 1   */
    ProcedureTransactionIdentifier      procedureTransactionIdentifier,          /* cl. 9.6       M V 1   */
    MessageType                         messageType,                             /* cl. 9.7       M V 1   */
    ExtdProtocolConfigOptions           extdProtocolConfigurationOptions optional,/* cl. 9.11.4.6 O TLV-E 4-65538 IEI=0 @sic R5s190543 sic@*/
    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 (pduSessionId) "FORCEOMIT(iei)";
    variant "TAG(extdProtocolConfigurationOptions, iei = '7B'O;
                 portManagementInfoContainer, iei = '74'O;
                 )";
  }

  type record NG_PDU_SESSION_MODIFICATION_COMMAND_REJECT {               /* 24.501 cl. 8.3.11
                                                                     Significance:  dual
                                                                     Direction:     UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                   /* cl. 9.2       M V 1   */
    NG_PDU_SessionId                    pduSessionId,                            /* cl. 9.4       M V 1   */
    ProcedureTransactionIdentifier      procedureTransactionIdentifier,          /* cl. 9.6       M V 1   */
    MessageType                         messageType,                             /* cl. 9.7       M V 1   */
    GMM_GSM_Cause                       gsmCause,                                /* cl. 9.11.4.2  M V 1   */
    ExtdProtocolConfigOptions           extdProtocolConfigurationOptions optional /* cl. 9.11.4.6 O TLV-E 4-65538 IEI=7B */
  } with {
    variant "FIELDORDER(msb)";
    variant (pduSessionId) "FORCEOMIT(iei)";
    variant (gsmCause) "FORCEOMIT(iei)";
    variant "TAG(extdProtocolConfigurationOptions, iei = '7B'O)";
  }

  type record NG_PDU_SESSION_RELEASE_REQUEST {                     /* 24.501 cl. 8.3.12
                                                                   Significance:  dual
                                                                   Direction:     UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                   /* cl. 9.2       M V 1   */
    NG_PDU_SessionId                    pduSessionId,                            /* cl. 9.4       M V 1   */
    ProcedureTransactionIdentifier      procedureTransactionIdentifier,          /* cl. 9.6       M V 1   */
    MessageType                         messageType,                             /* cl. 9.7       M V 1   */
    GMM_GSM_Cause                       gsmCause                      optional,  /* cl. 9.11.4.2  O TV 2 IEI=59  */
    ExtdProtocolConfigOptions           extdProtocolConfigurationOptions optional /* cl. 9.11.4.6 O TLV-E 4-65538 IEI=0x7B */
  } with {
    variant "FIELDORDER(msb)";
    variant (pduSessionId) "FORCEOMIT(iei)";
    variant "TAG(gsmCause, iei = '59'O;
                 extdProtocolConfigurationOptions, iei = '7b'O)";
  }

  type record NG_PDU_SESSION_RELEASE_REJECT {                      /* 24.501 cl. 8.3.13
                                                                   Significance:  dual
                                                                   Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                   /* cl. 9.2       M V 1   */
    NG_PDU_SessionId                    pduSessionId,                            /* cl. 9.4       M V 1   */
    ProcedureTransactionIdentifier      procedureTransactionIdentifier,          /* cl. 9.6       M V 1   */
    MessageType                         messageType,                             /* cl. 9.7       M V 1   */
    GMM_GSM_Cause                       gsmCause,                                /* cl. 9.11.4.2  M V 1   */
    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
                                                                   Significance:  dual
                                                                   Direction:     network to UE */
    ExtdProtocolDiscriminator           protocolDiscriminator,                   /* cl. 9.2       M V 1   */
    NG_PDU_SessionId                    pduSessionId,                            /* cl. 9.4       M V 1   */
    ProcedureTransactionIdentifier      procedureTransactionIdentifier,          /* cl. 9.6       M V 1   */
    MessageType                         messageType,                             /* cl. 9.7       M V 1   */
    GMM_GSM_Cause                       gsmCause,                                /* cl. 9.11.4.2  M V 1   */
    GPRS_Timer3                         backOffTimerValue             optional,  /* cl. 9.11.2.5  O TLV 3 IEI=37 */
    EAP_Message                         eapMessage                    optional,  /* cl. 9.11.2.2  O TLV-E 7-1503 IEI=78 */
    NGSM_CongestionReattemptInd         ngsmCongestionReattemptInd    optional,  /* cl. 9.11.4.2A O TLV 3 IEI=61 Jun19 @sic R5s190543 sic@ */
    ExtdProtocolConfigOptions           extdProtocolConfigurationOptions optional, /* cl. 9.11.4.6 O TLV-E 4-65538 IEI=0x7B */
    AccessType                          accessType                    optional,  /* cl. 9.11.2.1A O TV 1 IEI=D Sep20 @sic R5s201387 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)";
    variant (pduSessionId) "FORCEOMIT(iei)";
    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
                                                                   Significance:  dual
                                                                   Direction:     UE to network */
    ExtdProtocolDiscriminator           protocolDiscriminator,                   /* cl. 9.2       M V 1   */
    NG_PDU_SessionId                    pduSessionId,                            /* cl. 9.4       M V 1   */
    ProcedureTransactionIdentifier      procedureTransactionIdentifier,          /* cl. 9.6       M V 1   */
    MessageType                         messageType,                             /* cl. 9.7       M V 1   */
    GMM_GSM_Cause                       gsmCause                      optional,  /* cl. 9.11.4.2  O TV 2 IEI=59  */
    ExtdProtocolConfigOptions           extdProtocolConfigurationOptions optional /* cl. 9.11.4.6 O TLV-E 4-65538 IEI=0x7B */
  } with {
    variant "FIELDORDER(msb)";
    variant (pduSessionId) "FORCEOMIT(iei)";
    variant "TAG(gsmCause, iei = '59'O;
                 extdProtocolConfigurationOptions, iei = '7b'O)";
  }

  type record NG_GSM_STATUS {                                      /* 24.501 cl. 8.3.16
                                                                   Significance:  dual
                                                                   Direction:     both */
    ExtdProtocolDiscriminator           protocolDiscriminator,                  /* cl. 9.2       M V 1   */
    NG_PDU_SessionId                    pduSessionId,                           /* cl. 9.4       M V 1   */
    ProcedureTransactionIdentifier      procedureTransactionIdentifier,         /* cl. 9.6       M V 1   */
    MessageType                         messageType,                            /* cl. 9.7       M V 1   */
    GMM_GSM_Cause                       gsmCause                                /* cl. 9.11.4.2  M V 1   */
  } with {
    variant "FIELDORDER(msb)";
    variant (pduSessionId) "FORCEOMIT(iei)";
    variant (gsmCause) "FORCEOMIT(iei)";
  }

  //----------------------------------------------------------------------------
  // NG Mobility Management (GMM) information elements (24.501 cl. 9.11.3)
  //----------------------------------------------------------------------------

  type record DNN {                                            /* 24.501 cl. 9.11.2.1B */
    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)";
  };

  type record EAP_Message {                                     /* 24.501 cl. 9.11.2.2 */
    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 */
    octetstring                 eapMsg                           /* RFC 5448, RFC 4187 EAP_Message_Type will be encoded in NAS Emulator */
  } with {
    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
    O1_Type                     sst,
    O3_Type                     sd                    optional,
    O1_Type                     mappedSST             optional,
    O3_Type                     mappedSD              optional
  } with {
    variant "FIELDORDER(msb)";
  };

  type union ServiceLvlAAParam {
    SL_AA_DeviceId              id,
    SL_AA_ServerAddr            serverAddress,
    SL_AA_Response              response,
    SL_AA_PayloadType           payloadType,
    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 */
    IEI8_Type                   iei ('20'O),
    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 */
    IEI8_Type                   iei ('30'O),
    Type4Length_Type            iel,
    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@ */
    IEI8_Type                   iei,          // Jun23 version specifes IEI of 'B'H, but the IEI is defined as 1 octet.
    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 */
    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 */
    B1_Type                     sgc,                            /* Sep20 @sic R5s201387 Baseline Moving sic@ */
    B1_Type                     ngIPHC_CP_CIoT,                 /* Sep20 @sic R5s201387 Baseline Moving sic@ */
    B1_Type                     n3Data,                         /* Sep20 @sic R5s201387 Baseline Moving sic@ */
    B1_Type                     ng_CP_CIoT,                     /* Sep20 @sic R5s201387 Baseline Moving sic@ */
    B1_Type                     restrictEC,                     /* Sep20 @sic R5s201387 Baseline Moving sic@ */
    B1_Type                     lpp,                            /* Dec18 */
    B1_Type                     hoAttach,
    B1_Type                     s1Cap,
    B1_Type                     racs                  optional, /* Sep20 @sic R5s201387 Baseline Moving, R5s201526 sic@ */
    B1_Type                     nssaa                 optional, /* Sep20 @sic R5s201387 Baseline Moving, R5s201526 sic@ */
    B1_Type                     ngLCS                 optional, /* Sep20 @sic R5s201387 Baseline Moving, R5s201526 sic@ */
    B1_Type                     v2xNPC5               optional, /* Sep20 @sic R5s201387 Baseline Moving, R5s201526 sic@ */
    B1_Type                     v2xEPC5               optional, /* Sep20 @sic R5s201387 Baseline Moving, R5s201526 sic@ */
    B1_Type                     v2x                   optional, /* Sep20 @sic R5s201387 Baseline Moving, R5s201526 sic@ */
    B1_Type                     ng_UP_CIoT            optional, /* Sep20 @sic R5s201387 Baseline Moving, R5s201526 sic@ */
    B1_Type                     ngSRVCC               optional, /* Sep20 @sic R5s201387 Baseline Moving, R5s201526 sic@ */
    B1_Type                     ngProSeL2relay        optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     ngProSe_dc            optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     ngProSe_dd            optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     erNSSAI               optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     ngEHC_CP_CIoT         optional, /* Sep20 @sic R5s201387 Baseline Moving, R5s201526 sic@ */
    B1_Type                     multipleUP            optional, /* Sep20 @sic R5s201387 Baseline Moving, R5s201526 sic@ */
    B1_Type                     wusa                  optional, /* Sep20 @sic R5s201387 Baseline Moving, R5s201526 sic@ */
    B1_Type                     cag                   optional, /* Sep20 @sic R5s201387 Baseline Moving, R5s201526 sic@ */
    B1_Type                     pr                    optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     rpr                   optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     piv                   optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     ncr                   optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     nrPSSI                optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     ngProSeL3rmt          optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     ngProSeL2rmt          optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     ngProSeL3relay        optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     mpsiu                 optional, /* Jun23 @sic R5s230533 sic@  */
    B1_Type                     uas                   optional, /* Jun23 @sic R5s230533 sic@ */
    B1_Type                     nsag                  optional, /* Jun23 @sic R5s230533 sic@ */
    B1_Type                     exCAG                 optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     ssnpnsi               optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     eventNotification     optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     mint                  optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     nssrg                 optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B6_Type                     spareBits             optional, /* Jun23 @sic R5s230533 sic@ */
    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)";
  };

  type record NGSM_CongestionReattemptInd {                               /* 24.501 cl. 9.11.3.2, 9.11.4.21 */
    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,                      /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     catbo,                          /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     abo
  } 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

  type DRXParamCommon NB_N1ModeDRXParams;            // 24.501 cl. 9.11.3.73

  type record NG_MobileIdentity {                              // 24.501 cl. 9.11.3.4
    IEI8_Type            iei                   optional, /* present in case of TLV; omit in case of LV */
    Type6Length_Type     iel,
    BcdDigit_Bit         idDigit1,                // 1st identitity digit
    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)";
    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 */
    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 */
    B1_Type                     mpsi,
    B1_Type                     iwk_N26,
    B2_Type                     emf,
    B2_Type                     emc,
    B1_Type                     imsVoPS_n3GPP,
    B1_Type                     imsVoPS_3GPP,
    B1_Type                     ng_UP_CIoT            optional, /* Sep20 @sic R5s201387, R5s221179 Baseline Moving sic@ */
    B1_Type                     ngIPHC_CP_CIoT        optional, /* Sep20 @sic R5s201387, R5s221179 Baseline Moving sic@ */
    B1_Type                     n3Data                optional, /* Sep20 @sic R5s201387, R5s221179 Baseline Moving sic@ */
    B1_Type                     ng_CP_CIoT            optional, /* Sep20 @sic R5s201387, R5s221179 Baseline Moving sic@ */
    B2_Type                     restrictEC            optional, /* Sep20 @sic R5s201387, R5s221179 Baseline Moving sic@ */
    B1_Type                     mcsi                  optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     emcn3                 optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     spareBit              optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     pr                    optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     rpr                   optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     piv                   optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     ncr                   optional, /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    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 */
    // IEI is always skipped
    Type4Length_Type            iel                   optional, /* present in case of LV or TLV; omit in case of V */
    B1_Type                     spare,                          /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     disasterRoamingResult,          /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     emergencyRegistered,            /* Sep20 @sic R5s201387 Baseline Moving sic@ */
    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 "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
  }with{
    variant "FIELDORDER(msb)"                             /* NG TAC 3 octets */
  };

  type record length (1..16) of O3_Type NG_NAS_TacList;

  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;
  type record length (1..16) of NG_Type1Element NG_Type1List;
  type record length (1..16) of NG_Type2Element NG_Type2List;

  type union NG_PartialTaiType {
    NG_Type0List   type0List,
    NG_Type1List   type1List,
    NG_Type2List   type2List,
    NG_Type3Element   type3     // Type 3 elements only allowed in SAIList
  }with{
    variant "FIELDORDER(msb)"
  };

  type record NG_ListOfPartialTaiList {
    B1_Type                  allowedType,
    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 */
    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 */
    B2_Type                     spare,
    B2_Type                     eps_PNB_CIoT,                     /* Sep20 @sic R5s201387 Baseline Moving sic@ */
    B2_Type                     ng_PNB_CIoT,                      /* Sep20 @sic R5s201387 Baseline Moving sic@ */
    B1_Type                     ngRAN_RCU,
    B1_Type                     smsRequested
  } with {
    variant "FIELDORDER(msb)";
    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 */
    octetstring                 abbaValue
  } with {
    variant "FIELDORDER(msb)";
    variant (iel) "LENGTHTO (abbaValue)";
    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)";
  };

  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 */
    B6_Type                     spareBits,                      /* Dec18 */
    B1_Type                     rinmr,                          /* Dec18 */
    B1_Type                     hdp
  } with {
    variant "FIELDORDER(msb)";
    variant (iel) "LENGTHTO (spareBits, rinmr, hdp)";
    variant (iel) "BYTEORDER(last)";

  };

  type record AddInfoRequest {                         /* 24.501 cl 9.11.3.12A */
    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                     cipherKey
  } with {
    variant "FIELDORDER(msb)";
    variant (iel) "LENGTHTO (spareBits, cipherKey)";
    variant (iel) "BYTEORDER(last)";
  };

  type record ConfigUpdateInd {                          /* 24.501 cl. 9.11.3.18 */
    IEI4_Type                   iei,                      // currently only used as TV
    B2_Type                     spare,
    B1_Type                     red,                      //registration requested
    B1_Type                     ack                       //acknowledgement requested
  } with {
    variant "FIELDORDER(msb)";
  };

  type record CAGInfoList {                            /* 24.501 cl. 9.11.3.18A */
    IEI8_Type                   iei                   optional, /* present in case of TLV; omit in case of LV */
    Type6Length_Type            iel,
    record of CAG_Info  listOfCAGInfos optional
  } with {
    variant "FIELDORDER(msb)";
    variant (iel) "LENGTHTO (listOfCAGInfos)";
    variant (iel) "BYTEORDER(last)";
  };

  type record CAG_Info {                              /* 24.501 cl. 9.11.3.18A */
    Type4Length_Type            iel,
    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 */
    NAS_PlmnId                  plmn,
    B7_Type                     spareBits,
    B1_Type                     cagOnly,
    record of O4_Type  listOfCAGIds optional
  } with {
    variant "FIELDORDER(msb)";
  };

  type record ExtdCAGInfoList {                       /* 24.501 cl. 9.11.3.86 */
    IEI8_Type                   iei,
    Type6Length_Type            iel,
    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 */
    Type6Length_Type            iel,
    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 */
    /* The IEI will not be included in the encoded string */
    Type4Length_Type            iel,
    B3_Type                     dataType,
    B2_Type                     ddx,                 /* set to 00 for dataType = 001 */
    B3_Type                     pduSessionId,        /* set to 00 for dataType = 010 or 001 */
    Type4Length_Type            lengthOfAddInfo       optional,  /* only present for dataType = 010 */
    octetstring                 addInfo               optional,  /* not present for dataType = 000 or 001 */
    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
                                                   This is used in the received NAS and will then be
                                                   decoded later into the structured type defined above*/
    IEI8_Type                   iei,
    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 (iel) "LENGTHTO (listOfCipherKeyData)";
    variant (iel) "BYTEORDER(last)";
  };

  type record NG_CipherDataSet {                              /* 24.501 cl. 9.11.3.18C */
    O2_Type                     id,
    O16_Type                    key,
    B3_Type                     spareBits,
    B5_Type                     c0Length,
    octetstring                 c0  length (1..16),
    B4_Type                     eSpareBits,
    B4_Type                     eSIBLength,
    O1_Type                     eposSIB1            optional,
    O1_Type                     eposSIB2_O1         optional,
    O1_Type                     eposSIB2_O2         optional,
    O1_Type                     eposSIB2_O3         optional,
    O1_Type                     eposSIB2_SIB5       optional,
    B4_Type                     nSpareBits,
    B4_Type                     nSIBLength,
    O1_Type                     nposSIB1            optional,
    O1_Type                     nposSIB2_O1         optional,
    O1_Type                     nposSIB2_O2         optional,
    O1_Type                     nposSIB2_SIB3       optional,
    O1_Type                     nposSIB4_SIB6       optional,
    O5_Type                     validityStartTime,
    O2_Type                     validityDuration,
    Type4Length_Type            taiLength,
    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 */
    IEI4_Type                   iei                   optional, /* present in case of TV; omit in case of V */
    B1_Type                     tsc,                            // Type of security context: 0 = cached, 1 = mapped
    NAS_KsiValue                nasKeySetId
  } with {
    variant "FIELDORDER(msb)";
  };

  type record DeregisterType {                          // 24.501 cl. 9.11.3.20
    // IEI is always skipped
    B1_Type                     switchOff,
    B1_Type                     reRegistration,
    B2_Type                     accessType
  } with {
    variant "FIELDORDER(msb)";
  };

  type record EPS_MessageContainer {                          /* 24.501 cl. 9.11.3.24 */
    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 */
    octetstring                 epsMsg
  } with {
    variant "FIELDORDER(msb)";
    variant (iel) "LENGTHTO (epsMsg)";
    variant (iel) "BYTEORDER(last)";
    variant (epsMsg) "BYTEORDER(last)";
  };

  type record LADN_Ind {                                      /* 24.501 cl. 9.11.3.29 */
    IEI8_Type                   iei                   optional, /* present in case of TLV; omit in case of LV */
    Type6Length_Type            iel,
    octetstring  listOfLADN_DNNValues length (1..808)  optional  // @sic R5w190307 sic@
  } with {
    variant "FIELDORDER(msb)";
    variant (iel) "LENGTHTO (listOfLADN_DNNValues)";
    variant (iel) "BYTEORDER(last)";
    variant (listOfLADN_DNNValues) "BYTEORDER(last)";
  };

  type record ListOfLADN {
    IEI8_Type                   iei                   optional, /* present in case of TLV; omit in case of LV */
    Type4Length_Type            dnnLength,
    octetstring                 dnnValue,
    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)";
  };

  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
    IEI4_Type                   iei,
    B2_Type                     spare,
    B1_Type                     sprti,         /* Sep20 @sic R5s201387 Baseline Moving sic@ */
    B1_Type                     raai
  } with {
    variant "FIELDORDER(msb)";
  };

  type record MA_PDUSessionInfo {                  // 24.501 cl. 9.11.3.31A
    IEI4_Type                   iei,
    B4_Type                     maPDUSession
  } with {
    variant "FIELDORDER(msb)";
  };

  type record MappedNSSAI {                       // 24.501 cl. 9.11.3.31B
    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 length (1..8) of Mapped_S_NSSAIValue s_NSSAI
  } with {
    variant "FIELDORDER(msb)";
    variant (iel) "LENGTHTO (s_NSSAI)";
    variant (iel) "BYTEORDER(last)";
  };

  type record Mapped_S_NSSAIValue {
    Type4Length_Type            iel,
    O1_Type                     sst,
    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)";
  };

  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                 /* 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)";
  };

  type record NSSAI_LV {                               // 24.501 cl. 9.11.3.37
    Type4Length_Type            iel                   optional, /* present in case of LV or TLV; omit in case of V */
    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
    IEI4_Type                   iei                   optional, /* present in case of TLV; omit in case of LV  @sic R5w190307 sic@ */
    B2_Type                     spare,
    B2_Type                     inclusionMode
  } with {
    variant "FIELDORDER(msb)";
  };

  type record AccessCatDefinition {
    Type4Length_Type            iel,
    O1_Type                     precendence,        // @sic R5w200211 sic@
    B1_Type                     psac,
    B2_Type                     spare2,
    B5_Type                     catNum,
    Type4Length_Type            criteriaLength,
    octetstring                 criteria,
    B3_Type                     spare3              optional, // @sic R5s220680 sic@
    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 (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,
    octetstring                 payload
  } with {
    variant "FIELDORDER(msb)";
    variant (iel) "LENGTHTO (payload)";
    variant (iel) "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)";
  };

  type record NG_PDU_SessionId {                               /* 24.501 cl. 9.11.3.41 */
    IEI8_Type            iei  optional,
    O1_Type              sessionId
  } with {
    variant "FIELDORDER(msb)";
  };

  type record PDU_SessionErrorCause {
    O1_Type              sessionId,
    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 (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 {
    B4_Type                     len,                // Length of rejected S_NSSAI
    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 {
    B3_Type                     spare,                  /* Sep22 @sic R5s221179 Baseline Moving sic@ */
    B1_Type                     ap,                     // If data type = 1, value is always 0 (spare) Sep22 @sic R5s221179 Baseline Moving sic@
    B1_Type                     ack,                    // If data type = 1, value is always 0 (spare)
    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@
    SOR_Header                  header,
    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 */
    IEI8_Type                   iei                   optional, /* present in case of TLV; omit in case of LV @sic R5s190109 sic@ */
    Type4Length_Type            iel,
    O1_Type                     ngeaCap,
    O1_Type                     ngiaCap,
    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 */
    IEI8_Type                   iei                   optional, /* present in case of TLV; omit in case of LV @sic R5s190109 sic@ */
    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@
    PartialXtdRejectedNSSAIType0    type0,
    PartialXtdRejectedNSSAIType1    type1
  };

  type record of PartialXtdRejectedNSSAI   PartialXtdRejectedNSSAI_List;

  type record PartialXtdRejectedNSSAIType0 {
    B1_Type                     spare,
    B3_Type                     typeOfList  ('000'B),
    B4_Type                     numOfElements,
    XtdRejectedS_NSSAI_List     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)";
    variant (iel) "LENGTHTO(partialXtd)";
  };

  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,
    B4_Type                     spareBits,
    B4_Type                     typeOfRestriction,
    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 */
    H1_Type                     digit1,
    B4_Type                     assignmentMode,
    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)
  //----------------------------------------------------------------------------

  type record NG_UE_SM_Cap {                                   // 24.501 cl. 9.11.4.1
    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 */
    B1_Type                     tpmic,                      /* Sep20 @sic R5s201387 Baseline Moving sic@ */
    B4_Type                     atsssST,                    /* Sep20 @sic R5s201387 Baseline Moving sic@ */
    B1_Type                     ept_S1,                     /* Sep20 @sic R5s201387 Baseline Moving sic@ */
    B1_Type                     mh6_PDU,
    B1_Type                     rQoS,
    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,
    B2_Type                    operationCode,
    B1_Type                    spare,
    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 */
    B4_Type                     spare,
    B1_Type                     si16LLA,                    // @sic R5s201526 sic@
    B3_Type                     typeValue,
    octetstring                 adressInfo length(4..12) optional,
    octetstring                 ipv6Address length(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 (ipv6Address) "PRESENCE(si16LLA = '1'B)"
  };

  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 {
    B2_Type                     spare2,
    B6_Type                     qfi,
    B3_Type                     operationCode,
    B6_Type                     spare6,
    B1_Type                     eBit,
    B6_Type                     numOfParameters,
    QoSParametersList           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,
    QoS_FlowList                listofFlows
  } with {
    variant "FIELDORDER(msb)";
    variant (iel) "LENGTHTO (listofFlows)";
    variant (iel) "BYTEORDER(last)";
  };

  type record QoS_Rule {
    IEI8_Type                   identifier,
    Type6Length_Type            iel,
    QoS_RuleU                   u
  } with {
    variant "FIELDORDER(msb)";
    variant (iel) "LENGTHTO (u)";
    variant (iel) "BYTEORDER(last)";
  };

  type union QoS_RuleU {
    QoS_Rule_Create creat,
    QoS_Rule_Delete delete,
    QoS_Rule_Modify_and_add_PF modify_and_add_pf,
    QoS_Rule_Modify_and_replace_PF modify_and_replace_pf,
    QoS_Rule_Modify_and_delete_PF modify_and_delete_pf,
    QoS_Rule_Modify_no_PF modify_no_pf
  } with {
    variant "TAG(creat, ruleOperationCode = '001'B;
                 delete, ruleOperationCode = '010'B;
                 modify_and_add_pf, ruleOperationCode = '011'B;
                 modify_and_replace_pf, ruleOperationCode = '100'B;
                 modify_and_delete_pf, ruleOperationCode = '101'B;
                 modify_no_pf, ruleOperationCode = '110'B)"
  };

  type record QoS_Rule_Create {
    B3_Type                     ruleOperationCode ('001'B),
    B1_Type                     dqrBit,
    B4_Type                     numOfPacketFilters, /* >= 0 */
    NG_PacketFilterList_Type2   packetFilterList   optional,
    /*  For the "create new QoS rule" operation, the QoS rule precedence value field shall be included */
    O1_Type                     precedence,
    /* For the "create new QoS rule" operation, the QoS flow identifier value field shall be included. */
    B1_Type                     spare,
    B1_Type                     segregation,        /* Dec18 */
    B6_Type                     flowIdentifier
  } with {
    variant "FIELDORDER(msb)";
    variant (numOfPacketFilters) "LENGTHTO(packetFilterList)";
    variant (numOfPacketFilters) "UNIT(elements)"
  };

  type record QoS_Rule_Delete {
    B3_Type                     ruleOperationCode ('010'B),
    B1_Type                     dqrBit,
    /* For the "delete existing QoS rule" operation the number of packet filters shall be coded as 0. */
    B4_Type                     numOfPacketFilters ('0000'B)
    /* For the "delete existing QoS rule" operation, the QoS rule precedence
     * value field shall not be included */
    /* For the "delete existing QoS rule" operation, the QoS flow identifier
     * value field shall not be included. */
  } with {
    variant "FIELDORDER(msb)";
  };

  type record QoS_Rule_Modify_and_add_PF {
    B3_Type                     ruleOperationCode ('011'B),
    B1_Type                     dqrBit,
    B4_Type                     numOfPacketFilters, /* > 0 */
    NG_PacketFilterList_Type2   packetFilterList,
    O1_Type                     precedence         optional,
    B1_Type                     spare              optional,
    B1_Type                     segregation        optional,        /* Dec18 */
    B6_Type                     flowIdentifier     optional
  } with {
    variant "FIELDORDER(msb)";
    variant (numOfPacketFilters) "LENGTHTO(packetFilterList)";
    variant (numOfPacketFilters) "UNIT(elements)"
  };

  type record QoS_Rule_Modify_and_replace_PF {
    B3_Type                     ruleOperationCode ('100'B),
    B1_Type                     dqrBit,
    B4_Type                     numOfPacketFilters,  /* >= 0 */
    NG_PacketFilterList_Type2   packetFilterList   optional,
    O1_Type                     precedence         optional,
    B1_Type                     spare              optional,
    B1_Type                     segregation        optional,        /* Dec18 */
    B6_Type                     flowIdentifier     optional
  } with {
    variant "FIELDORDER(msb)";
    variant (numOfPacketFilters) "LENGTHTO(packetFilterList)";
    variant (numOfPacketFilters) "UNIT(elements)"
  };

  type record QoS_Rule_Modify_and_delete_PF {
    B3_Type                     ruleOperationCode ('101'B),
    B1_Type                     dqrBit,
    B4_Type                     numOfPacketFilters,  /* > 0 */
    NG_PacketFilterList_Type1   packetFilterList,
    O1_Type                     precedence         optional,
    B1_Type                     spare              optional,
    B1_Type                     segregation        optional,        /* Dec18 */
    B6_Type                     flowIdentifier     optional
  } with {
    variant "FIELDORDER(msb)";
    variant (numOfPacketFilters) "LENGTHTO(packetFilterList)";
    variant (numOfPacketFilters) "UNIT(elements)"
  };

  type record QoS_Rule_Modify_no_PF {
    B3_Type                     ruleOperationCode ('110'B),
    B1_Type                     dqrBit,
/* For the "modify existing QoS rule without modifying packet filters"
 * operation, the number of packet filters shall be coded as 0. */
    B4_Type                     numOfPacketFilters ('0000'B),
    O1_Type                     precedence         optional,
    B1_Type                     spare              optional,
    B1_Type                     segregation        optional,        /* Dec18 */
    B6_Type                     flowIdentifier     optional
  } with {
    variant "FIELDORDER(msb)";
  };

  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 {
    B2_Type                     spare,
    B2_Type                     direction,
    B4_Type                     packetFilterId,
    Type4Length_Type            len,
    octetstring                 contents length (0..255) // @sic R5w190307 sic@
  } with {
    variant "FIELDORDER(msb)";
    variant (len) "LENGTHTO (contents)";
    variant (len) "BYTEORDER(last)";
  };

  type record of QoS_Rule QoS_RuleList;
  type record QoS_Rules {                                        // 24.501 cl. 9.11.4.13
    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 */
    O1_Type                     unitDL,
    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,
    UPU_Header                  octet4,
    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@ */
    B1_Type                     spare,
    B1_Type                     profile104,
    B1_Type                     profile103,
    B1_Type                     profile102,
    B1_Type                     profile6,
    B1_Type                     profile4,
    B1_Type                     profile3,
    B1_Type                     profile2,
    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 */
    B4_Type                     spareBits,
    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,
    B3_Type                     md,
    B3_Type                     spareBits,                    //  @sic R5s230533 sic@
    B1_Type                     ipat,                         //  @sic R5s230533 sic@
    B1_Type                     msci,
    B2_Type                     mti,
    B1_Type                     ipae,
    TMGI_LV                     tmgi,
    octetstring                 sourceIPaddr        optional,
    octetstring                 destIPaddr          optional,
    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 {
    SkipIndicator                       skipIndicator,                  /*    M V 1/2    */
    ProtocolDiscriminator               protocolDiscriminator,          /*    M V 1/2    */
    MessageType                         messageType,                    /*    M V 1      */
    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)";
    variant (iel) "LENGTHTO(counterValue)";
  };

  type record UE_TEST_LOOP_NR_SIDELINK_COUNTER_RESPONSE {
    SkipIndicator                       skipIndicator,                  /*    M V 1/2    */
    ProtocolDiscriminator               protocolDiscriminator,          /*    M V 1/2    */
    MessageType                         messageType,                    /*    M V 1      */
    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.
                                             Therefore iei and iel are never used */
 //   IEI8_Type                   iei,
 //   Type4Length_Type            iel,
    O4_Type                     mac             optional,
    B4_Type                     ciphAlg,
    B4_Type                     intAlg,
    B1_Type                     spareBit,
    B3_Type                     ncc,
    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
                                             24.501 specifies that this has a length of 9 octets,
                                             but that only the value part is included in the RRC message.
                                             Therefore iei and iel are never used */
 //   IEI8_Type                   iei,
 //   Type4Length_Type            iel,
    O4_Type                     mac             optional,
    B4_Type                     ciphAlg,
    B4_Type                     intAlg,
    B3_Type                     spareBits,
    B1_Type                     kacf,
    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 {
  encode "RAW"/*"NAS Types"*/
}
