TR
{joint-iso-itu-t(2) country(16) ca(124) motivity(113594) tcap(10) modules(0) ansi(1) tr(0) version1(1)} DEFINITIONS ::=

BEGIN

PackageType ::= CHOICE {
   unidirectional           [PRIVATE 1]  IMPLICIT UniTransactionPDU,
   queryWithPerm            [PRIVATE 2]  IMPLICIT TransactionPDU,
   queryWithoutPerm         [PRIVATE 3]  IMPLICIT TransactionPDU,
   response                 [PRIVATE 4]  IMPLICIT TransactionPDU,
   conversationWithPerm     [PRIVATE 5]  IMPLICIT TransactionPDU,
   conversationWithoutPerm  [PRIVATE 6]  IMPLICIT TransactionPDU,
   abort                    [PRIVATE 22] IMPLICIT Abort
}

UniTransactionPDU ::= SEQUENCE {
   identifier               TransactionID,
   dialoguePortion          DialoguePortion OPTIONAL,
   componentPortion         ComponentSequence
}

TransactionPDU ::= SEQUENCE {
   identifier               TransactionID,
   dialoguePortion          DialoguePortion OPTIONAL,
   componentPortion         ComponentSequence OPTIONAL
}
-- TransactionPDU should include either a Dialogue Portion, 
-- a Component Sequence or both

TransactionID ::= [PRIVATE 7] IMPLICIT OCTET STRING
-- 0 octets for the Unidirectional, 4 octets for Query, Response & Abort
-- 8 octets for Conversation in the order Originating then Responding TID

Abort ::= SEQUENCE {
   identifier               TransactionID,
   dialoguePortion          DialoguePortion OPTIONAL,
   causeInformation         CHOICE {
                               abortCause       P-Abort-cause,
                               userInformation  UserAbortInformation
                            } OPTIONAL
}
-- When the Abort package is generated by the Transaction sublayer,
-- the P-Abort-cause must be present

P-Abort-cause ::= [PRIVATE 23] IMPLICIT INTEGER {
   unrecognizedPackageType(1),
   incorrectTransactionPortion(2),
   badlyStructuredTransactionPortion(3),
   unassignedRespondingTransactionID(4),
   permissionToReleaseProblem(5), -- for further study
   resourceUnavailable(6),
   unrecognizedDialoguePortionID(7),
   badlyStructuredDialoguePortion(8),
   missingDialoguePortion(9),
   inconsistentDialoguePortion(10)
}

DialoguePortion ::= [PRIVATE 25] IMPLICIT SEQUENCE {
   version                  ProtocolVersion OPTIONAL,
   applicationContext       CHOICE {
                               integerApplicationId  IntegerApplicationContext,
                               objectApplicationId   ObjectIDApplicationContext
                            } OPTIONAL,
   userInformation          UserInformation OPTIONAL,
   securityContext          CHOICE {
                               integerSecurityId  [0] IMPLICIT INTEGER,
                               objectSecurityId   [1] IMPLICIT OBJECT IDENTIFIER
                            } OPTIONAL,
   confidentiality          [2] IMPLICIT Confidentiality OPTIONAL
}

ProtocolVersion ::= [PRIVATE 26] IMPLICIT OCTET STRING(SIZE (1))
-- 0000 0000 not used
-- 0000 0001 T1.114-1996
-- 0000 0010 T1.114-2000
-- other reserved
-- These values can be combined using the bit-wise logical or operation
-- to indicate support for more than one version, e.g. the value 0000 0011
-- means that both 1996 and 2000 versions are supported

IntegerApplicationContext ::= [PRIVATE 27] IMPLICIT INTEGER

ObjectIDApplicationContext ::= [PRIVATE 28] IMPLICIT OBJECT IDENTIFIER

UserInformation ::= [PRIVATE 29] IMPLICIT SEQUENCE OF EXTERNAL

Confidentiality ::= SEQUENCE {
   confidentialityId        CHOICE {
                               integerConfidentialityId  [0] IMPLICIT INTEGER,
	                            objectConfidentialityId   [1] IMPLICIT OBJECT IDENTIFIER
                            } OPTIONAL,
   ...
   -- The extension marker indicates the possible presence of items
   -- in the confidentiality set that are used by the confidentiality
   -- algorithm.
}

UserAbortInformation ::= [PRIVATE 24]  EXTERNAL

-- leave this portion undecoded
ComponentSequence ::= TYPE-IDENTIFIER.&Type

END
