aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/asn1_SUITE_data/TCAPPackage.asn
blob: fcaeff3bfa290030cfb3e61cfcce7af27a352e49 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
TCAPPackage {iso(1) memberbody(2) usa(840) t1-114(10013) modules(0)
  tcapPackage(0) version4(4)} DEFINITIONS ::=

-- iso(1) memberbody(2)
-- usa(840) T1.114(10013)
BEGIN -- defining a module called TCAPPackage which contains type

-- definitions for the contents of any generic TCAP message
-- exports everything
IMPORTS
  OPERATION, ERROR
    FROM Remote-Operations-Information-Objects {joint-iso-itu-t remote-operations(4) informationObjects(5) version1(0)};
--   TCAPRemoteperationsInformationbjects {iso(1) memberbody(2) usa(840)
--      t1-114(10013) modules(0) information-objects(1) version4(4)};

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

--ComponentSequence ::= [PRIVATE 8] IMPLICIT SEQUENCE OF ComponentPDU
ComponentSequence ::= [PRIVATE 8] IMPLICIT SEQUENCE OF ComponentPDU{NoInvokeId,ProbeAndAcknowledge,ProbeAndAcknowledge}
-- Component Portion specification starts below
ComponentPDU{InvokeId:InvokeIdSet, OPERATION:Invocable, OPERATION:Returnable}
  ::= CHOICE {
  invokeLast
    [PRIVATE 9] IMPLICIT Invoke{{InvokeIdSet}, {Invocable}}
                           (CONSTRAINED BY {
                              --invocable.&invokeLast must be TRUE --} !
                            RejectProblem:generalincorrectComponentPortion),
  returnResultLast     [PRIVATE 10] IMPLICIT ReturnResult{{Returnable}},
  returnError
    [PRIVATE 11] IMPLICIT ReturnError{{Errors  {{Returnable}}}},
  reject               [PRIVATE 12] IMPLICIT Reject,
  invokeNotLast
    [PRIVATE 13] IMPLICIT Invoke{{InvokeIdSet}, {Invocable}}
                            (CONSTRAINED BY {
                               --invocable.&invokeLast must be FALSE --} !
                             RejectProblem:generalincorrectComponentPortion),
  returnResultNotLast  [PRIVATE 14] IMPLICIT ReturnResult{{Returnable}}}
  (CONSTRAINED BY { -- must conform to the above definition --} !
   RejectProblem:generalunrecognisedComponentType)

Invoke{InvokeId:InvokeIdSet, OPERATION:Operations} ::= SEQUENCE {
  componentIDs
    [PRIVATE 15] IMPLICIT OCTET STRING(SIZE (0..2))
                            -- The invoke ID precedes the correlation id. There may be no
                            -- identifier,only an invoke ID, or both invoke and correlation
                            -- ID.
                            (CONSTRAINED BY {-- must be unambiguous --} !
                             RejectProblem:invokeduplicateInvocation)
                            (CONSTRAINED BY {-- correlation ID must identify an--
                               -- outstanding operation --} !
                             RejectProblem:invokeunrecognisedCorrelationId)
      OPTIONAL,
  --  operationCode
  opcode
    OPERATION.&operationCode
  --      ((Operations) !RejectProblem:invokeunrecognisedOperation),
        ({Operations} !RejectProblem:invokeunrecognisedOperation),
  parameter
  --    OPERATION.&ParameterType
      OPERATION.&ResultType
      ({Operations}{@opcode} !RejectProblem:invoke-mistypedArgument) OPTIONAL}
  (CONSTRAINED BY { -- must conform to the above definition --} !
   RejectProblem:generalincorrectComponentPortion)
  (CONSTRAINED BY { -- must have consistent encoding --} !
   RejectProblem:generalbadlyStructuredCompPortion)
  (CONSTRAINED BY { -- must conform to T1.114.3 encoding rules --} !
   RejectProblem:generalincorrectComponentCoding)

ReturnResult{OPERATION:Operations} ::= SEQUENCE {
  componentID 
      [PRIVATE 15] IMPLICIT OCTET STRING(SIZE (1))
                            (CONSTRAINED BY {
                               --must be that of an outstanding operation--} !
                             RejectProblem:
                               returnResultunrecognisedCorrelationId)
                            (CONSTRAINED BY {-- which returns a result --} !
                             RejectProblem:returnResultunexpectedReturnResult),
  parameter
    OPERATION.&ResultType
  --      ({Operations}{@opcode} !RejectProblem:returnResultincorrectParameter)
--        ({Operations}{@componentID} !RejectProblem:returnResultincorrectParameter)
      OPTIONAL}
  (CONSTRAINED BY { -- must conform to the above definition --} !
   RejectProblem:generalincorrectComponentPortion)
  (CONSTRAINED BY { -- must have consistent encoding --} !
   RejectProblem:generalbadlyStructuredCompPortion)
  (CONSTRAINED BY { -- must conform to T1.114.3 encoding rules --} !
   RejectProblem:generalincorrectComponentCoding)

ReturnError{ERROR:Errors} ::= SEQUENCE {
  componentID
    [PRIVATE 15] IMPLICIT OCTET STRING(SIZE (1))
                            (CONSTRAINED BY {
                               --must be that of an outstanding operation--} !
                             RejectProblem:returnErrorunrecognisedCorrelationId)
                            (CONSTRAINED BY {--which returns an error--} !
                             RejectProblem:returnErrorunexpectedReturnError),
  errorCode
    ERROR.&errorCode({Errors} !RejectProblem:returnErrorunrecognisedError)
      (CONSTRAINED BY {-- must be in the &Errors field of the--
         -- associated operation --} !RejectProblem:returnErrorunexpectedError),
  parameter
  --    Error.&ParameterType
      ERROR.&ParameterType
  --      ({Errors}{@errorcode} !RejectProblem:returnErrorincorrectParameter)
        ({Errors}{@errorCode} !RejectProblem:returnErrorincorrectParameter)
      OPTIONAL}
  (CONSTRAINED BY { -- must conform to the above definition --} !
   RejectProblem:generalincorrectComponentPortion)
  (CONSTRAINED BY { -- must have consistent encoding --} !
   RejectProblem:generalbadlyStructuredCompPortion)
  (CONSTRAINED BY { -- must conform to T1.114.3 encoding rules --} !
   RejectProblem:generalincorrectComponentCoding)

Reject ::= SEQUENCE {
  componentID    [PRIVATE 15] IMPLICIT OCTET STRING(SIZE (0..1)),
  rejectProblem  [PRIVATE 21] IMPLICIT Problem,
  parameter
    CHOICE {paramSequence  [PRIVATE 16] IMPLICIT SEQUENCE {},
            paramSet       [PRIVATE 18] IMPLICIT SET {}}}
  -- The choice between paramSequence and paramSet is implementation
  -- dependent, however paramSequence is preferred.
  (CONSTRAINED BY { -- must conform to the above definition --} !
   RejectProblem:generalincorrectComponentPortion)
  (CONSTRAINED BY { -- must have consistent encoding --} !
   RejectProblem:generalbadlyStructuredCompPortion)
  (CONSTRAINED BY { -- must conform to T1.114.3 encoding rules --} !
   RejectProblem:generalincorrectComponentCoding)

-- PROBLEMS, the specification of Problems follows
Problem ::= INTEGER {
  generalunrecognisedComponentType(257), generalincorrectComponentPortion(258),
  generalbadlyStructuredCompPortion(259), generalincorrectComponentCoding(260),
  invokeduplicateInvocation(513), invokeunrecognisedOperation(514),
  invokeincorrectParameter(515), invokeunrecognisedCorrelationID(516),
  returnResultunrecognisedCorrelationID(769),
  returnResultunexpectedReturnResult(770), returnResultincorrectParameter(771),
  returnErrorunrecognisedCorrelationID(1025),
  returnErrorunexpectedReturnError(1026), returnErrorunrecognisedError(1027),
  returnErrorunexpectedError(1028),
  returnErrorincorrectParameter(1029),
  -- Applications using T1.114-1988 report Transaction portion
  -- problems using a Reject component with a problem code in
  -- the range 1281e6
  -- It is preferred that other applications report
  -- these problems using the Abort package type
  transactionunrecognizedPackageType(1281),
  transactionincorrectTransPortion(1282),
  transactionbadlyStructuredTransPortion(1283),
  transactionunassignedRespondingTransID(1284),
  transactionpermissionToReleaseProblem(1285),
  transactionresourceUnavailable(1286)}
								    
  --added imaginary defs by Bertil
  
  InvokeId ::= CHOICE
{
    present INTEGER,
    absent NULL
}
								  
noInvokeId InvokeId ::= absent:NULL

NoInvokeId InvokeId ::= {noInvokeId}

probe OPERATION ::= 
 { 
   ARGUMENT SEQUENCE 
    { 
      invokeId [0] InvokeId 
    } 
   RESULT ENUMERATED{running(0), finished(1), unknown(2), ...} 
   ERRORS ErrorSet
   ALWAYS RESPONDS TRUE 
   CODE local:-2 
 } 

acknowledge OPERATION ::= 
 { 
   ARGUMENT InvokeId 
   RESULT ENUMERATED{acknowledged(0), unknown(1), ...} 
   ALWAYS RESPONDS TRUE 
   CODE local:-3 
 } 

ProbeAndAcknowledge OPERATION ::= {probe | acknowledge} 

error1 ERROR ::= {PARAMETER INTEGER PRIORITY 25 CODE local:22}
error2 ERROR ::= {PARAMETER BOOLEAN PRIORITY 15 CODE local:21}
ErrorSet ERROR ::= {error1|error2}
--parameterized object set definition
Errors{OPERATION:OperationSet} ERROR  ::= {OperationSet.&Errors}
								    
END -- end of the TCAPPackage Module