aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/ansi_tcap/TCAPPackage.asn
blob: 7bd3361bf1ca630089bc0eb29bb5222618fca81d (plain)
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
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
		TCAP-Remote-Operations-Information-Objects{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,
						dialogPortion			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
-- 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 : general-incorrectComponentPortion),
	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 : general-incorrectComponentPortion),
	returnResultNotLast [PRIVATE 14] IMPLICIT ReturnResult {{Returnable}}
	}
	(CONSTRAINED BY { -- must conform to the above definition -- }
	! RejectProblem : general-unrecognisedComponentType)

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's.
									(CONSTRAINED BY { -- must be unambiguous -- }
									! RejectProblem : invoke-duplicateInvocation )
									(CONSTRAINED BY { -- correlation ID must identify an
									-- outstanding operation -- }
									! RejectProblem : invoke-unrecognisedCorrelationId )
						OPTIONAL,
	operationCode		OPERATION.&operationCode
						((Operations)
						! RejectProblem : invoke-unrecognisedOperation),
	parameter
						OPERATION.&ParameterType
						({Operations}{@opcode}
						! RejectProblem : invoke-mistypedArgument ) OPTIONAL
	}
	(CONSTRAINED BY { -- must conform to the above definition -- }
	! RejectProblem : general-incorrectComponentPortion )
	(CONSTRAINED BY { -- must have consistent encoding -- }
	! RejectProblem : general-badlyStructuredCompPortion )
	(CONSTRAINED BY { -- must conform to T1.114.3 encoding rules -- }
	! RejectProblem : general-incorrectComponentCoding )

ReturnResult{ OPERATION: Operations } ::= SEQUENCE {
	componentID			[PRIVATE 15] IMPLICIT OCTET STRING (SIZE(1))
						(CONSTRAINED BY { --must be that of an outstanding operation--}
						! RejectProblem : returnResult-unrecognisedCorrelationId)
						(CONSTRAINED BY { -- which returns a result -- }
						! RejectProblem : returnResult-unexpectedReturnResult),
	parameter			OPERATION.&ResultType
						({Operations}{@opcode}
						! RejectProblem : returnResult-incorrectParameter)
						OPTIONAL
	}
	(CONSTRAINED BY { -- must conform to the above definition -- }
	! RejectProblem : general-incorrectComponentPortion )
	(CONSTRAINED BY { -- must have consistent encoding -- }
	! RejectProblem : general-badlyStructuredCompPortion )
	(CONSTRAINED BY { -- must conform to T1.114.3 encoding rules -- }
	! RejectProblem : general-incorrectComponentCoding )

ReturnError{ ERROR: Errors } ::= SEQUENCE {
	componentID			[PRIVATE 15] IMPLICIT OCTET STRING (SIZE(1))
						(CONSTRAINED BY { --must be that of an outstanding operation--}
						! RejectProblem : returnError-unrecognisedCorrelationId)
						(CONSTRAINED BY { --which returns an error-- }
						! RejectProblem : returnError-unexpectedReturnError),
	errorCode			ERROR.&errorCode
						({Errors}
						! RejectProblem : returnError-unrecognisedError)
						(CONSTRAINED BY { -- must be in the &Errors field of the
						--associated operation -- }
						! RejectProblem : returnError-unexpectedError),
	parameter
						ERROR.&ParameterType
						({Errors}{@errorcode}
						! RejectProblem : returnError-incorrectParameter) OPTIONAL
	}
	(CONSTRAINED BY { -- must conform to the above definition -- }
	! RejectProblem : general-incorrectComponentPortion )
	(CONSTRAINED BY { -- must have consistent encoding -- }
	! RejectProblem : general-badlyStructuredCompPortion )
	(CONSTRAINED BY { -- must conform to T1.114.3 encoding rules -- }
	! RejectProblem : general-incorrectComponentCoding )

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 : general-incorrectComponentPortion )
	(CONSTRAINED BY { -- must have consistent encoding -- }
	! RejectProblem : general-badlyStructuredCompPortion )
	(CONSTRAINED BY { -- must conform to T1.114.3 encoding rules -- }
	! RejectProblem : general-incorrectComponentCoding )

-- PROBLEMS, the specification of Problems follows
Problem ::= INTEGER {
	general-unrecognisedComponentType (257),
	general-incorrectComponentPortion (258),
	general-badlyStructuredCompPortion (259),
	general-incorrectComponentCoding (260),
	invoke-duplicateInvocation (513),
	invoke-unrecognisedOperation (514),
	invoke-incorrectParameter (515),
	invoke-unrecognisedCorrelationID (516),
	returnResult-unrecognisedCorrelationID (769),
	returnResult-unexpectedReturnResult (770),
	returnResult-incorrectParameter (771),
	returnError-unrecognisedCorrelationID (1025),
	returnError-unexpectedReturnError (1026),
	returnError-unrecognisedError (1027),
	returnError-unexpectedError (1028),
	returnError-incorrectParameter (1029),
	-- Applications using T1.114-1988 report Transaction portion
	-- problems using a Reject component with a problem code in
	-- the range 1281-1286.
	-- It is preferred that other applications report
	-- these problems using the Abort package type
	transaction-unrecognizedPackageType (1281),
	transaction-incorrectTransPortion (1282),
	transaction-badlyStructuredTransPortion (1283),
	transaction-unassignedRespondingTransID (1284),
	transaction-permissionToReleaseProblem (1285),
	transaction-resourceUnavailable (1286)
	}

END -- end of the TCAPPackage Module