1 /* Do not modify this file. */
2 /* It is created automatically by the ASN.1 to Wireshark dissector compiler */
4 /* ../../tools/asn2wrs.py -b -p tcap -c tcap.cnf -s packet-tcap-template tcap.asn */
6 /* Input file: packet-tcap-template.c */
8 #line 1 "packet-tcap-template.c"
9 /* packet-tcap-template.c
11 * Copyright 2004 - 2005, Tim Endean <endeant@hotmail.com>
12 * Built from the gsm-map dissector Copyright 2004 - 2005, Anders Broman <anders.broman@ericsson.com>
16 * Wireshark - Network traffic analyzer
17 * By Gerald Combs <gerald@wireshark.org>
18 * Copyright 1998 Gerald Combs
20 * This program is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU General Public License
22 * as published by the Free Software Foundation; either version 2
23 * of the License, or (at your option) any later version.
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 * GNU General Public License for more details.
30 * You should have received a copy of the GNU General Public License
31 * along with this program; if not, write to the Free Software
32 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
33 * References: ETSI 300 374
41 #include <epan/packet.h>
42 #include <epan/prefs.h>
43 #include <epan/conversation.h>
44 #include <epan/oids.h>
45 #include <epan/emem.h>
46 #include <epan/asn1.h>
50 #include "packet-ber.h"
51 #include "packet-tcap.h"
52 #include "epan/tcap-persistentdata.h"
54 #define PNAME "Transaction Capabilities Application Part"
58 /* Initialize the protocol and registered fields */
60 static int hf_tcap_tag = -1;
61 static int hf_tcap_length = -1;
62 static int hf_tcap_data = -1;
63 static int hf_tcap_tid = -1;
65 int hf_tcapsrt_SessionId=-1;
66 int hf_tcapsrt_Duplicate=-1;
67 int hf_tcapsrt_BeginSession=-1;
68 int hf_tcapsrt_EndSession=-1;
69 int hf_tcapsrt_SessionTime=-1;
72 /*--- Included file: packet-tcap-hf.c ---*/
73 #line 1 "packet-tcap-hf.c"
74 static int hf_tcap_DialoguePDU_PDU = -1; /* DialoguePDU */
75 static int hf_tcap_UniDialoguePDU_PDU = -1; /* UniDialoguePDU */
76 static int hf_tcap_dialogueRequest = -1; /* AARQ_apdu */
77 static int hf_tcap_dialogueResponse = -1; /* AARE_apdu */
78 static int hf_tcap_dialogueAbort = -1; /* ABRT_apdu */
79 static int hf_tcap_oid = -1; /* OBJECT_IDENTIFIER */
80 static int hf_tcap_dialog = -1; /* Dialog1 */
81 static int hf_tcap_useroid = -1; /* UserInfoOID */
82 static int hf_tcap_externuserinfo = -1; /* ExternUserInfo */
83 static int hf_tcap_protocol_versionrq = -1; /* T_protocol_versionrq */
84 static int hf_tcap_application_context_name = -1; /* Applicationcontext */
85 static int hf_tcap_user_information = -1; /* User_information */
86 static int hf_tcap_protocol_versionre = -1; /* T_protocol_versionre */
87 static int hf_tcap_result = -1; /* Associate_result */
88 static int hf_tcap_result_source_diagnostic = -1; /* Associate_source_diagnostic */
89 static int hf_tcap_reasonrq = -1; /* Release_request_reason */
90 static int hf_tcap_reasonre = -1; /* Release_response_reason */
91 static int hf_tcap_abort_source = -1; /* ABRT_source */
92 static int hf_tcap_dialogue_service_user = -1; /* T_dialogue_service_user */
93 static int hf_tcap_dialogue_service_provider = -1; /* T_dialogue_service_provider */
94 static int hf_tcap_unidialoguePDU = -1; /* AUDT_apdu */
95 static int hf_tcap_protocol_version3 = -1; /* T_protocol_version3 */
96 static int hf_tcap_unidirectional = -1; /* Unidirectional */
97 static int hf_tcap_begin = -1; /* Begin */
98 static int hf_tcap_end = -1; /* End */
99 static int hf_tcap_continue = -1; /* Continue */
100 static int hf_tcap_abort = -1; /* Abort */
101 static int hf_tcap_ansiunidirectional = -1; /* UniTransactionPDU */
102 static int hf_tcap_ansiqueryWithPerm = -1; /* T_ansiqueryWithPerm */
103 static int hf_tcap_ansiqueryWithoutPerm = -1; /* T_ansiqueryWithoutPerm */
104 static int hf_tcap_ansiresponse = -1; /* T_ansiresponse */
105 static int hf_tcap_ansiconversationWithPerm = -1; /* T_ansiconversationWithPerm */
106 static int hf_tcap_ansiconversationWithoutPerm = -1; /* T_ansiconversationWithoutPerm */
107 static int hf_tcap_ansiabort = -1; /* AbortPDU */
108 static int hf_tcap_dialoguePortion = -1; /* DialoguePortion */
109 static int hf_tcap_components = -1; /* ComponentPortion */
110 static int hf_tcap_otid = -1; /* OrigTransactionID */
111 static int hf_tcap_dtid = -1; /* DestTransactionID */
112 static int hf_tcap_reason = -1; /* Reason */
113 static int hf_tcap_p_abortCause = -1; /* P_AbortCause */
114 static int hf_tcap_u_abortCause = -1; /* DialoguePortion */
115 static int hf_tcap__untag_item = -1; /* Component */
116 static int hf_tcap_invoke = -1; /* Invoke */
117 static int hf_tcap_returnResultLast = -1; /* ReturnResult */
118 static int hf_tcap_returnError = -1; /* ReturnError */
119 static int hf_tcap_reject = -1; /* Reject */
120 static int hf_tcap_returnResultNotLast = -1; /* ReturnResult */
121 static int hf_tcap_invokeID = -1; /* InvokeIdType */
122 static int hf_tcap_linkedID = -1; /* InvokeIdType */
123 static int hf_tcap_opCode = -1; /* OPERATION */
124 static int hf_tcap_parameter = -1; /* Parameter */
125 static int hf_tcap_resultretres = -1; /* T_resultretres */
126 static int hf_tcap_errorCode = -1; /* ErrorCode */
127 static int hf_tcap_invokeIDRej = -1; /* T_invokeIDRej */
128 static int hf_tcap_derivable = -1; /* InvokeIdType */
129 static int hf_tcap_not_derivable = -1; /* NULL */
130 static int hf_tcap_problem = -1; /* T_problem */
131 static int hf_tcap_generalProblem = -1; /* GeneralProblem */
132 static int hf_tcap_invokeProblem = -1; /* InvokeProblem */
133 static int hf_tcap_returnResultProblem = -1; /* ReturnResultProblem */
134 static int hf_tcap_returnErrorProblem = -1; /* ReturnErrorProblem */
135 static int hf_tcap_localValue = -1; /* INTEGER */
136 static int hf_tcap_globalValue = -1; /* OBJECT_IDENTIFIER */
137 static int hf_tcap_identifier = -1; /* TransactionID */
138 static int hf_tcap_dialoguePortionansi = -1; /* DialoguePortionANSI */
139 static int hf_tcap_componentPortion = -1; /* ComponentSequence */
140 static int hf_tcap_causeInformation = -1; /* T_causeInformation */
141 static int hf_tcap_abortCause = -1; /* P_Abort_cause */
142 static int hf_tcap_userInformation = -1; /* UserInformation */
143 static int hf_tcap_version = -1; /* ProtocolVersion */
144 static int hf_tcap_applicationContext = -1; /* T_applicationContext */
145 static int hf_tcap_integerApplicationId = -1; /* IntegerApplicationContext */
146 static int hf_tcap_objectApplicationId = -1; /* ObjectIDApplicationContext */
147 static int hf_tcap_securityContext = -1; /* T_securityContext */
148 static int hf_tcap_integerSecurityId = -1; /* INTEGER */
149 static int hf_tcap_objectSecurityId = -1; /* OBJECT_IDENTIFIER */
150 static int hf_tcap_confidentiality = -1; /* Confidentiality */
151 static int hf_tcap_confidentialityId = -1; /* T_confidentialityId */
152 static int hf_tcap_integerConfidentialityId = -1; /* INTEGER */
153 static int hf_tcap_objectConfidentialityId = -1; /* OBJECT_IDENTIFIER */
154 static int hf_tcap__untag_item_01 = -1; /* ComponentPDU */
155 static int hf_tcap_invokeLastansi = -1; /* InvokePDU */
156 static int hf_tcap_returnResultLastansi = -1; /* ReturnResultPDU */
157 static int hf_tcap_returnErroransi = -1; /* ReturnErrorPDU */
158 static int hf_tcap_rejectansi = -1; /* RejectPDU */
159 static int hf_tcap_invokeNotLastansi = -1; /* InvokePDU */
160 static int hf_tcap_returnResultNotLastansi = -1; /* ReturnResultPDU */
161 static int hf_tcap_componentIDs = -1; /* OCTET_STRING_SIZE_0_2 */
162 static int hf_tcap_operationCode = -1; /* OperationCode */
163 static int hf_tcap_parameterinv = -1; /* ANSIparamch */
164 static int hf_tcap_ansiparams = -1; /* ANSIParameters */
165 static int hf_tcap_ansiparams1 = -1; /* ANSIParameters */
166 static int hf_tcap_ansiparams2 = -1; /* ANSIParameters */
167 static int hf_tcap_ansiparams3 = -1; /* ANSIParameters */
168 static int hf_tcap_ansiparams4 = -1; /* ANSIParameters */
169 static int hf_tcap_ansiparams5 = -1; /* ANSIParameters */
170 static int hf_tcap_ansiparams6 = -1; /* ANSIParameters */
171 static int hf_tcap_ansiparams7 = -1; /* ANSIParameters */
172 static int hf_tcap_ansiparams8 = -1; /* ANSIParameters */
173 static int hf_tcap_ansiparams9 = -1; /* ANSIParameters */
174 static int hf_tcap_ansiparams10 = -1; /* ANSIParameters */
175 static int hf_tcap_ansiparams11 = -1; /* ANSIParameters */
176 static int hf_tcap_ansiparams12 = -1; /* ANSIParameters */
177 static int hf_tcap_ansiparams13 = -1; /* ANSIParameters */
178 static int hf_tcap_ansiparams14 = -1; /* ANSIParameters */
179 static int hf_tcap_ansiparams15 = -1; /* ANSIParameters */
180 static int hf_tcap_ansiparams16 = -1; /* ANSIParameters */
181 static int hf_tcap_ansiparams17 = -1; /* ANSIParameters */
182 static int hf_tcap_ansiparams18 = -1; /* ANSIParameters */
183 static int hf_tcap_ansiparams19 = -1; /* ANSIParameters */
184 static int hf_tcap_ansiparams20 = -1; /* ANSIParameters */
185 static int hf_tcap_ansiparams21 = -1; /* ANSIParameters */
186 static int hf_tcap_componentID = -1; /* ComponentID */
187 static int hf_tcap_parameterrr = -1; /* ANSIparamch */
188 static int hf_tcap_parameterre = -1; /* ANSIparamch */
189 static int hf_tcap_rejectProblem = -1; /* ProblemPDU */
190 static int hf_tcap_parameterrj = -1; /* ANSIparamch */
191 static int hf_tcap_national = -1; /* INTEGER_M32768_32767 */
192 static int hf_tcap_private = -1; /* INTEGER */
193 static int hf_tcap_nationaler = -1; /* INTEGER_M32768_32767 */
194 static int hf_tcap_privateer = -1; /* INTEGER */
196 static int hf_tcap_T_protocol_versionrq_version1 = -1;
197 static int hf_tcap_T_protocol_versionre_version1 = -1;
198 static int hf_tcap_T_protocol_version3_version1 = -1;
200 /*--- End of included file: packet-tcap-hf.c ---*/
201 #line 64 "packet-tcap-template.c"
203 /* Initialize the subtree pointers */
204 static gint ett_tcap = -1;
205 static gint ett_param = -1;
207 static gint ett_otid = -1;
208 static gint ett_dtid = -1;
209 gint ett_tcap_stat = -1;
211 static struct tcapsrt_info_t * gp_tcapsrt_info;
212 static gboolean tcap_subdissector_used=FALSE;
213 static dissector_handle_t requested_subdissector_handle = NULL;
215 static struct tcaphash_context_t * gp_tcap_context=NULL;
218 /*--- Included file: packet-tcap-ett.c ---*/
219 #line 1 "packet-tcap-ett.c"
220 static gint ett_tcap_DialoguePDU = -1;
221 static gint ett_tcap_ExternalPDU_U = -1;
222 static gint ett_tcap_UserInformation_U = -1;
223 static gint ett_tcap_AARQ_apdu_U = -1;
224 static gint ett_tcap_T_protocol_versionrq = -1;
225 static gint ett_tcap_AARE_apdu_U = -1;
226 static gint ett_tcap_T_protocol_versionre = -1;
227 static gint ett_tcap_RLRQ_apdu_U = -1;
228 static gint ett_tcap_RLRE_apdu_U = -1;
229 static gint ett_tcap_ABRT_apdu_U = -1;
230 static gint ett_tcap_Associate_source_diagnostic = -1;
231 static gint ett_tcap_UniDialoguePDU = -1;
232 static gint ett_tcap_AUDT_apdu_U = -1;
233 static gint ett_tcap_T_protocol_version3 = -1;
234 static gint ett_tcap_TCMessage = -1;
235 static gint ett_tcap_Unidirectional = -1;
236 static gint ett_tcap_Begin = -1;
237 static gint ett_tcap_End = -1;
238 static gint ett_tcap_Continue = -1;
239 static gint ett_tcap_Abort = -1;
240 static gint ett_tcap_Reason = -1;
241 static gint ett_tcap_SEQUENCE_SIZE_1_MAX_OF_Component = -1;
242 static gint ett_tcap_Component = -1;
243 static gint ett_tcap_Invoke = -1;
244 static gint ett_tcap_ReturnResult = -1;
245 static gint ett_tcap_T_resultretres = -1;
246 static gint ett_tcap_ReturnError = -1;
247 static gint ett_tcap_Reject = -1;
248 static gint ett_tcap_T_invokeIDRej = -1;
249 static gint ett_tcap_T_problem = -1;
250 static gint ett_tcap_OPERATION = -1;
251 static gint ett_tcap_ERROR = -1;
252 static gint ett_tcap_UniTransactionPDU = -1;
253 static gint ett_tcap_TransactionPDU = -1;
254 static gint ett_tcap_AbortPDU = -1;
255 static gint ett_tcap_T_causeInformation = -1;
256 static gint ett_tcap_DialoguePortionANSI_U = -1;
257 static gint ett_tcap_T_applicationContext = -1;
258 static gint ett_tcap_T_securityContext = -1;
259 static gint ett_tcap_Confidentiality = -1;
260 static gint ett_tcap_T_confidentialityId = -1;
261 static gint ett_tcap_SEQUENCE_OF_ComponentPDU = -1;
262 static gint ett_tcap_ComponentPDU = -1;
263 static gint ett_tcap_InvokePDU = -1;
264 static gint ett_tcap_ANSIparamch = -1;
265 static gint ett_tcap_ReturnResultPDU = -1;
266 static gint ett_tcap_ReturnErrorPDU = -1;
267 static gint ett_tcap_RejectPDU = -1;
268 static gint ett_tcap_OperationCode = -1;
269 static gint ett_tcap_ErrorCode = -1;
271 /*--- End of included file: packet-tcap-ett.c ---*/
272 #line 80 "packet-tcap-template.c"
275 static range_t *global_ssn_range;
276 static range_t *ssn_range;
277 struct tcap_private_t tcap_private;
279 gboolean gtcap_HandleSRT=FALSE;
280 extern gboolean gtcap_PersistentSRT;
281 extern gboolean gtcap_DisplaySRT;
282 extern guint gtcap_RepetitionTimeout;
283 extern guint gtcap_LostTimeout;
285 static dissector_handle_t tcap_handle = NULL;
286 static dissector_table_t ber_oid_dissector_table=NULL;
287 static const char * cur_oid;
288 static const char * tcapext_oid;
289 static proto_tree * tcap_top_tree=NULL;
290 static proto_tree * tcap_stat_tree=NULL;
292 static dissector_handle_t data_handle;
293 static dissector_handle_t ansi_tcap_handle;
295 static dissector_table_t sccp_ssn_table;
297 static void raz_tcap_private(struct tcap_private_t * p_tcap_private);
298 static int dissect_tcap_param(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset);
299 static int dissect_tcap_UserInformation(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_);
300 static int dissect_tcap_ITU_ComponentPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_);
301 static int dissect_tcap_ANSI_ComponentPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_);
302 static int dissect_tcap_TheExternUserInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_);
304 static GHashTable* ansi_sub_dissectors = NULL;
305 static GHashTable* itu_sub_dissectors = NULL;
307 static void dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree);
309 extern void add_ansi_tcap_subdissector(guint32 ssn, dissector_handle_t dissector) {
310 g_hash_table_insert(ansi_sub_dissectors,GUINT_TO_POINTER(ssn),dissector);
311 dissector_add("sccp.ssn",ssn,tcap_handle);
314 extern void add_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissector) {
315 g_hash_table_insert(itu_sub_dissectors,GUINT_TO_POINTER(ssn),dissector);
316 dissector_add("sccp.ssn",ssn,tcap_handle);
319 extern void delete_ansi_tcap_subdissector(guint32 ssn, dissector_handle_t dissector _U_) {
320 g_hash_table_remove(ansi_sub_dissectors,GUINT_TO_POINTER(ssn));
321 if (!get_itu_tcap_subdissector(ssn))
322 dissector_delete("sccp.ssn",ssn,tcap_handle);
324 extern void delete_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissector _U_) {
325 g_hash_table_remove(itu_sub_dissectors,GUINT_TO_POINTER(ssn));
326 if (!get_ansi_tcap_subdissector(ssn))
327 dissector_delete("sccp.ssn", ssn,tcap_handle);
330 dissector_handle_t get_ansi_tcap_subdissector(guint32 ssn) {
331 return g_hash_table_lookup(ansi_sub_dissectors,GUINT_TO_POINTER(ssn));
334 dissector_handle_t get_itu_tcap_subdissector(guint32 ssn) {
335 return g_hash_table_lookup(itu_sub_dissectors,GUINT_TO_POINTER(ssn));
341 /*--- Included file: packet-tcap-fn.c ---*/
342 #line 1 "packet-tcap-fn.c"
344 static const asn_namedbit T_protocol_versionrq_bits[] = {
345 { 0, &hf_tcap_T_protocol_versionrq_version1, -1, -1, "version1", NULL },
346 { 0, NULL, 0, 0, NULL, NULL }
350 dissect_tcap_T_protocol_versionrq(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
351 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
352 T_protocol_versionrq_bits, hf_index, ett_tcap_T_protocol_versionrq,
361 dissect_tcap_Applicationcontext(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
363 offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &cur_oid);
365 tcap_private.oid= (void*) cur_oid;
366 tcap_private.acv=TRUE;
376 dissect_tcap_User_information(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
379 return dissect_tcap_UserInformation(FALSE, tvb, offset, actx, tree, -1);
387 static const ber_sequence_t AARQ_apdu_U_sequence[] = {
388 { &hf_tcap_protocol_versionrq, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_T_protocol_versionrq },
389 { &hf_tcap_application_context_name, BER_CLASS_CON, 1, 0, dissect_tcap_Applicationcontext },
390 { &hf_tcap_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_User_information },
391 { NULL, 0, 0, 0, NULL }
395 dissect_tcap_AARQ_apdu_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
396 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
397 AARQ_apdu_U_sequence, hf_index, ett_tcap_AARQ_apdu_U);
405 dissect_tcap_AARQ_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
406 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
407 hf_index, BER_CLASS_APP, 0, TRUE, dissect_tcap_AARQ_apdu_U);
413 static const asn_namedbit T_protocol_versionre_bits[] = {
414 { 0, &hf_tcap_T_protocol_versionre_version1, -1, -1, "version1", NULL },
415 { 0, NULL, 0, 0, NULL, NULL }
419 dissect_tcap_T_protocol_versionre(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
420 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
421 T_protocol_versionre_bits, hf_index, ett_tcap_T_protocol_versionre,
428 static const value_string tcap_Associate_result_vals[] = {
430 { 1, "reject-permanent" },
436 dissect_tcap_Associate_result(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
437 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
444 static const value_string tcap_T_dialogue_service_user_vals[] = {
446 { 1, "no-reason-given" },
447 { 2, "application-context-name-not-supported" },
453 dissect_tcap_T_dialogue_service_user(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
454 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
461 static const value_string tcap_T_dialogue_service_provider_vals[] = {
463 { 1, "no-reason-given" },
464 { 2, "no-common-dialogue-portion" },
470 dissect_tcap_T_dialogue_service_provider(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
471 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
478 static const value_string tcap_Associate_source_diagnostic_vals[] = {
479 { 1, "dialogue-service-user" },
480 { 2, "dialogue-service-provider" },
484 static const ber_choice_t Associate_source_diagnostic_choice[] = {
485 { 1, &hf_tcap_dialogue_service_user, BER_CLASS_CON, 1, 0, dissect_tcap_T_dialogue_service_user },
486 { 2, &hf_tcap_dialogue_service_provider, BER_CLASS_CON, 2, 0, dissect_tcap_T_dialogue_service_provider },
487 { 0, NULL, 0, 0, 0, NULL }
491 dissect_tcap_Associate_source_diagnostic(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
492 offset = dissect_ber_choice(actx, tree, tvb, offset,
493 Associate_source_diagnostic_choice, hf_index, ett_tcap_Associate_source_diagnostic,
500 static const ber_sequence_t AARE_apdu_U_sequence[] = {
501 { &hf_tcap_protocol_versionre, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_T_protocol_versionre },
502 { &hf_tcap_application_context_name, BER_CLASS_CON, 1, 0, dissect_tcap_Applicationcontext },
503 { &hf_tcap_result , BER_CLASS_CON, 2, 0, dissect_tcap_Associate_result },
504 { &hf_tcap_result_source_diagnostic, BER_CLASS_CON, 3, BER_FLAGS_NOTCHKTAG, dissect_tcap_Associate_source_diagnostic },
505 { &hf_tcap_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_User_information },
506 { NULL, 0, 0, 0, NULL }
510 dissect_tcap_AARE_apdu_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
511 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
512 AARE_apdu_U_sequence, hf_index, ett_tcap_AARE_apdu_U);
520 dissect_tcap_AARE_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
521 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
522 hf_index, BER_CLASS_APP, 1, TRUE, dissect_tcap_AARE_apdu_U);
528 static const value_string tcap_ABRT_source_vals[] = {
529 { 0, "dialogue-service-user" },
530 { 1, "dialogue-service-provider" },
536 dissect_tcap_ABRT_source(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
537 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
544 static const ber_sequence_t ABRT_apdu_U_sequence[] = {
545 { &hf_tcap_abort_source , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_tcap_ABRT_source },
546 { &hf_tcap_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_User_information },
547 { NULL, 0, 0, 0, NULL }
551 dissect_tcap_ABRT_apdu_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
552 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
553 ABRT_apdu_U_sequence, hf_index, ett_tcap_ABRT_apdu_U);
561 dissect_tcap_ABRT_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
562 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
563 hf_index, BER_CLASS_APP, 4, TRUE, dissect_tcap_ABRT_apdu_U);
569 const value_string tcap_DialoguePDU_vals[] = {
570 { 0, "dialogueRequest" },
571 { 1, "dialogueResponse" },
572 { 4, "dialogueAbort" },
576 static const ber_choice_t DialoguePDU_choice[] = {
577 { 0, &hf_tcap_dialogueRequest, BER_CLASS_APP, 0, BER_FLAGS_NOOWNTAG, dissect_tcap_AARQ_apdu },
578 { 1, &hf_tcap_dialogueResponse, BER_CLASS_APP, 1, BER_FLAGS_NOOWNTAG, dissect_tcap_AARE_apdu },
579 { 4, &hf_tcap_dialogueAbort , BER_CLASS_APP, 4, BER_FLAGS_NOOWNTAG, dissect_tcap_ABRT_apdu },
580 { 0, NULL, 0, 0, 0, NULL }
584 dissect_tcap_DialoguePDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
585 offset = dissect_ber_choice(actx, tree, tvb, offset,
586 DialoguePDU_choice, hf_index, ett_tcap_DialoguePDU,
595 dissect_tcap_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
596 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
604 dissect_tcap_Dialog1(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
607 return dissect_tcap_DialoguePDU(TRUE, tvb, offset, actx, tree, -1);
615 static const ber_sequence_t ExternalPDU_U_sequence[] = {
616 { &hf_tcap_oid , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_tcap_OBJECT_IDENTIFIER },
617 { &hf_tcap_dialog , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_tcap_Dialog1 },
618 { NULL, 0, 0, 0, NULL }
622 dissect_tcap_ExternalPDU_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
623 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
624 ExternalPDU_U_sequence, hf_index, ett_tcap_ExternalPDU_U);
632 dissect_tcap_ExternalPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
635 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
636 hf_index, BER_CLASS_UNI, 8, TRUE, dissect_tcap_ExternalPDU_U);
647 dissect_tcap_UserInfoOID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
649 offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &tcapext_oid);
660 dissect_tcap_ExternUserInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
666 guint32 len, comp_offset;
669 comp_offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
670 comp_offset = dissect_ber_length(actx->pinfo, tree, tvb, comp_offset, &len, &ind_field);
671 /* we can believe the length now */
672 next_tvb = tvb_new_subset(tvb, offset, len+comp_offset-offset, len+comp_offset-offset);
677 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
681 dissect_tcap_TheExternUserInfo(implicit_tag, next_tvb, 0, actx, tcap_top_tree, hf_index);
683 return comp_offset+len;
691 static const ber_sequence_t UserInformation_U_sequence[] = {
692 { &hf_tcap_useroid , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_tcap_UserInfoOID },
693 { &hf_tcap_externuserinfo , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_tcap_ExternUserInfo },
694 { NULL, 0, 0, 0, NULL }
698 dissect_tcap_UserInformation_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
699 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
700 UserInformation_U_sequence, hf_index, ett_tcap_UserInformation_U);
708 dissect_tcap_UserInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
709 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
710 hf_index, BER_CLASS_UNI, 8, TRUE, dissect_tcap_UserInformation_U);
716 static const value_string tcap_Release_request_reason_vals[] = {
719 { 30, "user-defined" },
725 dissect_tcap_Release_request_reason(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
726 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
733 static const ber_sequence_t RLRQ_apdu_U_sequence[] = {
734 { &hf_tcap_reasonrq , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_Release_request_reason },
735 { &hf_tcap_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_User_information },
736 { NULL, 0, 0, 0, NULL }
740 dissect_tcap_RLRQ_apdu_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
741 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
742 RLRQ_apdu_U_sequence, hf_index, ett_tcap_RLRQ_apdu_U);
750 dissect_tcap_RLRQ_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
751 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
752 hf_index, BER_CLASS_APP, 2, TRUE, dissect_tcap_RLRQ_apdu_U);
758 static const value_string tcap_Release_response_reason_vals[] = {
760 { 1, "not-finished" },
761 { 30, "user-defined" },
767 dissect_tcap_Release_response_reason(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
768 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
775 static const ber_sequence_t RLRE_apdu_U_sequence[] = {
776 { &hf_tcap_reasonre , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_Release_response_reason },
777 { &hf_tcap_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_User_information },
778 { NULL, 0, 0, 0, NULL }
782 dissect_tcap_RLRE_apdu_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
783 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
784 RLRE_apdu_U_sequence, hf_index, ett_tcap_RLRE_apdu_U);
792 dissect_tcap_RLRE_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
793 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
794 hf_index, BER_CLASS_APP, 3, TRUE, dissect_tcap_RLRE_apdu_U);
800 static const asn_namedbit T_protocol_version3_bits[] = {
801 { 0, &hf_tcap_T_protocol_version3_version1, -1, -1, "version1", NULL },
802 { 0, NULL, 0, 0, NULL, NULL }
806 dissect_tcap_T_protocol_version3(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
807 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
808 T_protocol_version3_bits, hf_index, ett_tcap_T_protocol_version3,
815 static const ber_sequence_t AUDT_apdu_U_sequence[] = {
816 { &hf_tcap_protocol_version3, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_T_protocol_version3 },
817 { &hf_tcap_application_context_name, BER_CLASS_CON, 1, 0, dissect_tcap_Applicationcontext },
818 { &hf_tcap_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_User_information },
819 { NULL, 0, 0, 0, NULL }
823 dissect_tcap_AUDT_apdu_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
824 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
825 AUDT_apdu_U_sequence, hf_index, ett_tcap_AUDT_apdu_U);
833 dissect_tcap_AUDT_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
834 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
835 hf_index, BER_CLASS_APP, 0, TRUE, dissect_tcap_AUDT_apdu_U);
841 const value_string tcap_UniDialoguePDU_vals[] = {
842 { 0, "unidialoguePDU" },
846 static const ber_choice_t UniDialoguePDU_choice[] = {
847 { 0, &hf_tcap_unidialoguePDU , BER_CLASS_APP, 0, BER_FLAGS_NOOWNTAG, dissect_tcap_AUDT_apdu },
848 { 0, NULL, 0, 0, 0, NULL }
852 dissect_tcap_UniDialoguePDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
853 offset = dissect_ber_choice(actx, tree, tvb, offset,
854 UniDialoguePDU_choice, hf_index, ett_tcap_UniDialoguePDU,
863 dissect_tcap_DialogueOC(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
866 return dissect_tcap_ExternalPDU(FALSE /*implicit_tag*/, tvb, offset, actx, tree, -1);
876 dissect_tcap_DialoguePortion(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
877 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
878 hf_index, BER_CLASS_APP, 11, TRUE, dissect_tcap_DialogueOC);
886 dissect_tcap_InvokeIdType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
887 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
896 dissect_tcap_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
897 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
904 static const value_string tcap_OPERATION_vals[] = {
906 { 1, "globalValue" },
910 static const ber_choice_t OPERATION_choice[] = {
911 { 0, &hf_tcap_localValue , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tcap_INTEGER },
912 { 1, &hf_tcap_globalValue , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_tcap_OBJECT_IDENTIFIER },
913 { 0, NULL, 0, 0, 0, NULL }
917 dissect_tcap_OPERATION(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
918 offset = dissect_ber_choice(actx, tree, tvb, offset,
919 OPERATION_choice, hf_index, ett_tcap_OPERATION,
928 dissect_tcap_Parameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
931 return dissect_tcap_param(actx,tree,tvb,offset);
939 static const ber_sequence_t Invoke_sequence[] = {
940 { &hf_tcap_invokeID , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tcap_InvokeIdType },
941 { &hf_tcap_linkedID , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_InvokeIdType },
942 { &hf_tcap_opCode , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_tcap_OPERATION },
943 { &hf_tcap_parameter , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_Parameter },
944 { NULL, 0, 0, 0, NULL }
948 dissect_tcap_Invoke(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
949 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
950 Invoke_sequence, hf_index, ett_tcap_Invoke);
956 static const ber_sequence_t T_resultretres_sequence[] = {
957 { &hf_tcap_opCode , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_tcap_OPERATION },
958 { &hf_tcap_parameter , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_Parameter },
959 { NULL, 0, 0, 0, NULL }
963 dissect_tcap_T_resultretres(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
964 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
965 T_resultretres_sequence, hf_index, ett_tcap_T_resultretres);
971 static const ber_sequence_t ReturnResult_sequence[] = {
972 { &hf_tcap_invokeID , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tcap_InvokeIdType },
973 { &hf_tcap_resultretres , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_T_resultretres },
974 { NULL, 0, 0, 0, NULL }
978 dissect_tcap_ReturnResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
979 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
980 ReturnResult_sequence, hf_index, ett_tcap_ReturnResult);
988 dissect_tcap_INTEGER_M32768_32767(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
989 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
996 static const value_string tcap_ErrorCode_vals[] = {
997 { 19, "nationaler" },
1002 static const ber_choice_t ErrorCode_choice[] = {
1003 { 19, &hf_tcap_nationaler , BER_CLASS_PRI, 19, BER_FLAGS_IMPLTAG, dissect_tcap_INTEGER_M32768_32767 },
1004 { 20, &hf_tcap_privateer , BER_CLASS_PRI, 20, BER_FLAGS_IMPLTAG, dissect_tcap_INTEGER },
1005 { 0, NULL, 0, 0, 0, NULL }
1009 dissect_tcap_ErrorCode(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1010 offset = dissect_ber_choice(actx, tree, tvb, offset,
1011 ErrorCode_choice, hf_index, ett_tcap_ErrorCode,
1018 static const ber_sequence_t ReturnError_sequence[] = {
1019 { &hf_tcap_invokeID , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tcap_InvokeIdType },
1020 { &hf_tcap_errorCode , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_tcap_ErrorCode },
1021 { &hf_tcap_parameter , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_Parameter },
1022 { NULL, 0, 0, 0, NULL }
1026 dissect_tcap_ReturnError(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1027 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1028 ReturnError_sequence, hf_index, ett_tcap_ReturnError);
1036 dissect_tcap_NULL(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1037 offset = dissect_ber_null(implicit_tag, actx, tree, tvb, offset, hf_index);
1043 static const value_string tcap_T_invokeIDRej_vals[] = {
1045 { 1, "not-derivable" },
1049 static const ber_choice_t T_invokeIDRej_choice[] = {
1050 { 0, &hf_tcap_derivable , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tcap_InvokeIdType },
1051 { 1, &hf_tcap_not_derivable , BER_CLASS_UNI, BER_UNI_TAG_NULL, BER_FLAGS_NOOWNTAG, dissect_tcap_NULL },
1052 { 0, NULL, 0, 0, 0, NULL }
1056 dissect_tcap_T_invokeIDRej(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1057 offset = dissect_ber_choice(actx, tree, tvb, offset,
1058 T_invokeIDRej_choice, hf_index, ett_tcap_T_invokeIDRej,
1065 static const value_string tcap_GeneralProblem_vals[] = {
1066 { 0, "unrecognizedComponent" },
1067 { 1, "mistypedComponent" },
1068 { 2, "badlyStructuredComponent" },
1074 dissect_tcap_GeneralProblem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1075 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
1082 static const value_string tcap_InvokeProblem_vals[] = {
1083 { 0, "duplicateInvokeID" },
1084 { 1, "unrecognizedOperation" },
1085 { 2, "mistypedParameter" },
1086 { 3, "resourceLimitation" },
1087 { 4, "initiatingRelease" },
1088 { 5, "unrecognizedLinkedID" },
1089 { 6, "linkedResponseUnexpected" },
1090 { 7, "unexpectedLinkedOperation" },
1096 dissect_tcap_InvokeProblem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1097 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
1104 static const value_string tcap_ReturnResultProblem_vals[] = {
1105 { 0, "unrecognizedInvokeID" },
1106 { 1, "returnResultUnexpected" },
1107 { 2, "mistypedParameter" },
1113 dissect_tcap_ReturnResultProblem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1114 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
1121 static const value_string tcap_ReturnErrorProblem_vals[] = {
1122 { 0, "unrecognizedInvokeID" },
1123 { 1, "returnErrorUnexpected" },
1124 { 2, "unrecognizedError" },
1125 { 3, "unexpectedError" },
1126 { 4, "mistypedParameter" },
1132 dissect_tcap_ReturnErrorProblem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1133 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
1140 static const value_string tcap_T_problem_vals[] = {
1141 { 0, "generalProblem" },
1142 { 1, "invokeProblem" },
1143 { 2, "returnResultProblem" },
1144 { 3, "returnErrorProblem" },
1148 static const ber_choice_t T_problem_choice[] = {
1149 { 0, &hf_tcap_generalProblem , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_tcap_GeneralProblem },
1150 { 1, &hf_tcap_invokeProblem , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_tcap_InvokeProblem },
1151 { 2, &hf_tcap_returnResultProblem, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_tcap_ReturnResultProblem },
1152 { 3, &hf_tcap_returnErrorProblem, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_tcap_ReturnErrorProblem },
1153 { 0, NULL, 0, 0, 0, NULL }
1157 dissect_tcap_T_problem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1158 offset = dissect_ber_choice(actx, tree, tvb, offset,
1159 T_problem_choice, hf_index, ett_tcap_T_problem,
1166 static const ber_sequence_t Reject_sequence[] = {
1167 { &hf_tcap_invokeIDRej , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_tcap_T_invokeIDRej },
1168 { &hf_tcap_problem , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_tcap_T_problem },
1169 { NULL, 0, 0, 0, NULL }
1173 dissect_tcap_Reject(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1174 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1175 Reject_sequence, hf_index, ett_tcap_Reject);
1181 static const value_string tcap_Component_vals[] = {
1183 { 2, "returnResultLast" },
1184 { 3, "returnError" },
1186 { 7, "returnResultNotLast" },
1190 static const ber_choice_t Component_choice[] = {
1191 { 1, &hf_tcap_invoke , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_tcap_Invoke },
1192 { 2, &hf_tcap_returnResultLast, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_tcap_ReturnResult },
1193 { 3, &hf_tcap_returnError , BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_tcap_ReturnError },
1194 { 4, &hf_tcap_reject , BER_CLASS_CON, 4, BER_FLAGS_IMPLTAG, dissect_tcap_Reject },
1195 { 7, &hf_tcap_returnResultNotLast, BER_CLASS_CON, 7, BER_FLAGS_IMPLTAG, dissect_tcap_ReturnResult },
1196 { 0, NULL, 0, 0, 0, NULL }
1200 dissect_tcap_Component(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1206 guint32 len, comp_offset;
1209 comp_offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
1210 comp_offset = dissect_ber_length(actx->pinfo, tree, tvb, comp_offset, &len, &ind_field);
1211 /* we can believe the length now */
1212 next_tvb = tvb_new_subset(tvb, offset, len+comp_offset-offset, len+comp_offset-offset);
1217 offset = dissect_ber_choice(actx, tree, tvb, offset,
1218 Component_choice, hf_index, ett_tcap_Component,
1222 dissect_tcap_ITU_ComponentPDU(implicit_tag, next_tvb, 0, actx, tcap_top_tree, hf_index);
1224 /* return comp_offset+len; or return offset (will be automatically added */
1232 static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_Component_sequence_of[1] = {
1233 { &hf_tcap__untag_item , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_tcap_Component },
1237 dissect_tcap_SEQUENCE_SIZE_1_MAX_OF_Component(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1238 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
1239 SEQUENCE_SIZE_1_MAX_OF_Component_sequence_of, hf_index, ett_tcap_SEQUENCE_SIZE_1_MAX_OF_Component);
1247 dissect_tcap_ComponentPortion(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1248 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1249 hf_index, BER_CLASS_APP, 12, TRUE, dissect_tcap_SEQUENCE_SIZE_1_MAX_OF_Component);
1255 static const ber_sequence_t Unidirectional_sequence[] = {
1256 { &hf_tcap_dialoguePortion, BER_CLASS_APP, 11, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_DialoguePortion },
1257 { &hf_tcap_components , BER_CLASS_APP, 12, BER_FLAGS_NOOWNTAG, dissect_tcap_ComponentPortion },
1258 { NULL, 0, 0, 0, NULL }
1262 dissect_tcap_Unidirectional(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1263 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1264 Unidirectional_sequence, hf_index, ett_tcap_Unidirectional);
1272 dissect_tcap_OCTET_STRING_SIZE_1_4(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1273 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
1282 dissect_tcap_OrigTransactionID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1283 #line 143 "tcap.cnf"
1284 tvbuff_t *parameter_tvb;
1286 proto_item *tid_item;
1287 proto_tree *subtree;
1288 tid_item = proto_tree_add_text(tree, tvb, offset, -1, "Source Transaction ID");
1289 subtree = proto_item_add_subtree(tid_item, ett_otid);
1291 offset = dissect_ber_octet_string(implicit_tag, actx, subtree, tvb, offset, hf_tcap_tid,
1295 len = tvb_length_remaining(parameter_tvb, 0);
1298 gp_tcapsrt_info->src_tid=tvb_get_guint8(parameter_tvb, 0);
1301 gp_tcapsrt_info->src_tid=tvb_get_ntohs(parameter_tvb, 0);
1304 gp_tcapsrt_info->src_tid=tvb_get_ntohl(parameter_tvb, 0);
1307 gp_tcapsrt_info->src_tid=0;
1311 if ((len)&&(check_col(actx->pinfo->cinfo, COL_INFO))){
1312 col_append_str(actx->pinfo->cinfo, COL_INFO, "otid(");
1314 col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%02x",tvb_get_guint8(parameter_tvb,i));
1315 col_append_str(actx->pinfo->cinfo, COL_INFO, ") ");
1327 static const ber_sequence_t Begin_sequence[] = {
1328 { &hf_tcap_otid , BER_CLASS_APP, 8, BER_FLAGS_NOOWNTAG, dissect_tcap_OrigTransactionID },
1329 { &hf_tcap_dialoguePortion, BER_CLASS_APP, 11, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_DialoguePortion },
1330 { &hf_tcap_components , BER_CLASS_APP, 12, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ComponentPortion },
1331 { NULL, 0, 0, 0, NULL }
1335 dissect_tcap_Begin(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1336 #line 217 "tcap.cnf"
1337 gp_tcapsrt_info->ope=TC_BEGIN;
1339 /* Do not change col_add_str() to col_append_str() here: we _want_ this call
1340 * to overwrite whatever's currently in the INFO column (e.g., "UDT" from
1341 * the SCCP dissector).
1343 * If there's something there that should not be overwritten, whoever
1344 * put that info there should call col_set_fence() to protect it.
1346 if (check_col(actx->pinfo->cinfo, COL_INFO))
1347 col_set_str(actx->pinfo->cinfo, COL_INFO, "Begin ");
1349 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1350 Begin_sequence, hf_index, ett_tcap_Begin);
1358 dissect_tcap_DestTransactionID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1359 #line 182 "tcap.cnf"
1360 tvbuff_t *parameter_tvb;
1362 proto_item *tid_item;
1363 proto_tree *subtree;
1364 tid_item = proto_tree_add_text(tree, tvb, offset, -1, "Destination Transaction ID");
1365 subtree = proto_item_add_subtree(tid_item, ett_otid);
1367 offset = dissect_ber_octet_string(implicit_tag, actx, subtree, tvb, offset, hf_tcap_tid,
1371 len = tvb_length_remaining(parameter_tvb, 0);
1374 gp_tcapsrt_info->dst_tid=tvb_get_guint8(parameter_tvb, 0);
1377 gp_tcapsrt_info->dst_tid=tvb_get_ntohs(parameter_tvb, 0);
1380 gp_tcapsrt_info->dst_tid=tvb_get_ntohl(parameter_tvb, 0);
1383 gp_tcapsrt_info->dst_tid=0;
1387 if ((len)&&(check_col(actx->pinfo->cinfo, COL_INFO))){
1388 col_append_str(actx->pinfo->cinfo, COL_INFO, "dtid(");
1390 col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%02x",tvb_get_guint8(parameter_tvb,i));
1391 col_append_str(actx->pinfo->cinfo, COL_INFO, ") ");
1400 static const ber_sequence_t End_sequence[] = {
1401 { &hf_tcap_dtid , BER_CLASS_APP, 9, BER_FLAGS_NOOWNTAG, dissect_tcap_DestTransactionID },
1402 { &hf_tcap_dialoguePortion, BER_CLASS_APP, 11, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_DialoguePortion },
1403 { &hf_tcap_components , BER_CLASS_APP, 12, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ComponentPortion },
1404 { NULL, 0, 0, 0, NULL }
1408 dissect_tcap_End(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1409 #line 232 "tcap.cnf"
1410 gp_tcapsrt_info->ope=TC_END;
1412 if (check_col(actx->pinfo->cinfo, COL_INFO))
1413 col_set_str(actx->pinfo->cinfo, COL_INFO, "End ");
1415 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1416 End_sequence, hf_index, ett_tcap_End);
1422 static const ber_sequence_t Continue_sequence[] = {
1423 { &hf_tcap_otid , BER_CLASS_APP, 8, BER_FLAGS_NOOWNTAG, dissect_tcap_OrigTransactionID },
1424 { &hf_tcap_dtid , BER_CLASS_APP, 9, BER_FLAGS_NOOWNTAG, dissect_tcap_DestTransactionID },
1425 { &hf_tcap_dialoguePortion, BER_CLASS_APP, 11, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_DialoguePortion },
1426 { &hf_tcap_components , BER_CLASS_APP, 12, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ComponentPortion },
1427 { NULL, 0, 0, 0, NULL }
1431 dissect_tcap_Continue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1432 #line 240 "tcap.cnf"
1433 gp_tcapsrt_info->ope=TC_CONT;
1435 if (check_col(actx->pinfo->cinfo, COL_INFO))
1436 col_set_str(actx->pinfo->cinfo, COL_INFO, "Continue ");
1438 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1439 Continue_sequence, hf_index, ett_tcap_Continue);
1445 static const value_string tcap_P_AbortCause_U_vals[] = {
1446 { 0, "unrecognizedMessageType" },
1447 { 1, "unrecognizedTransactionID" },
1448 { 2, "badlyFormattedTransactionPortion" },
1449 { 3, "incorrectTransactionPortion" },
1450 { 4, "resourceLimitation" },
1456 dissect_tcap_P_AbortCause_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1457 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
1466 dissect_tcap_P_AbortCause(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1467 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1468 hf_index, BER_CLASS_APP, 10, TRUE, dissect_tcap_P_AbortCause_U);
1474 static const value_string tcap_Reason_vals[] = {
1475 { 10, "p-abortCause" },
1476 { 11, "u-abortCause" },
1480 static const ber_choice_t Reason_choice[] = {
1481 { 10, &hf_tcap_p_abortCause , BER_CLASS_APP, 10, BER_FLAGS_NOOWNTAG, dissect_tcap_P_AbortCause },
1482 { 11, &hf_tcap_u_abortCause , BER_CLASS_APP, 11, BER_FLAGS_NOOWNTAG, dissect_tcap_DialoguePortion },
1483 { 0, NULL, 0, 0, 0, NULL }
1487 dissect_tcap_Reason(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1488 offset = dissect_ber_choice(actx, tree, tvb, offset,
1489 Reason_choice, hf_index, ett_tcap_Reason,
1496 static const ber_sequence_t Abort_sequence[] = {
1497 { &hf_tcap_dtid , BER_CLASS_APP, 9, BER_FLAGS_NOOWNTAG, dissect_tcap_DestTransactionID },
1498 { &hf_tcap_reason , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_tcap_Reason },
1499 { NULL, 0, 0, 0, NULL }
1503 dissect_tcap_Abort(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1504 #line 248 "tcap.cnf"
1505 gp_tcapsrt_info->ope=TC_ABORT;
1507 if (check_col(actx->pinfo->cinfo, COL_INFO))
1508 col_set_str(actx->pinfo->cinfo, COL_INFO, "Abort ");
1510 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1511 Abort_sequence, hf_index, ett_tcap_Abort);
1519 dissect_tcap_TransactionID_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1520 #line 288 "tcap.cnf"
1525 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
1530 tcap_private.TransactionID_str = tvb_bytes_to_str(next_tvb, 0,tvb_length(next_tvb));
1531 len = tvb_length_remaining(next_tvb, 0);
1534 gp_tcapsrt_info->src_tid=tvb_get_guint8(next_tvb, 0);
1537 gp_tcapsrt_info->src_tid=tvb_get_ntohs(next_tvb, 0);
1540 gp_tcapsrt_info->src_tid=tvb_get_ntohl(next_tvb, 0);
1543 gp_tcapsrt_info->src_tid=0;
1556 dissect_tcap_TransactionID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1557 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1558 hf_index, BER_CLASS_PRI, 7, TRUE, dissect_tcap_TransactionID_U);
1566 dissect_tcap_OCTET_STRING_SIZE_1(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1567 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
1576 dissect_tcap_ProtocolVersion(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1577 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1578 hf_index, BER_CLASS_PRI, 26, TRUE, dissect_tcap_OCTET_STRING_SIZE_1);
1586 dissect_tcap_IntegerApplicationContext(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1587 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1588 hf_index, BER_CLASS_PRI, 27, TRUE, dissect_tcap_INTEGER);
1596 dissect_tcap_ObjectIDApplicationContext(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1597 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1598 hf_index, BER_CLASS_PRI, 28, TRUE, dissect_tcap_OBJECT_IDENTIFIER);
1604 static const value_string tcap_T_applicationContext_vals[] = {
1605 { 27, "integerApplicationId" },
1606 { 28, "objectApplicationId" },
1610 static const ber_choice_t T_applicationContext_choice[] = {
1611 { 27, &hf_tcap_integerApplicationId, BER_CLASS_PRI, 27, BER_FLAGS_NOOWNTAG, dissect_tcap_IntegerApplicationContext },
1612 { 28, &hf_tcap_objectApplicationId, BER_CLASS_PRI, 28, BER_FLAGS_NOOWNTAG, dissect_tcap_ObjectIDApplicationContext },
1613 { 0, NULL, 0, 0, 0, NULL }
1617 dissect_tcap_T_applicationContext(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1618 offset = dissect_ber_choice(actx, tree, tvb, offset,
1619 T_applicationContext_choice, hf_index, ett_tcap_T_applicationContext,
1626 static const value_string tcap_T_securityContext_vals[] = {
1627 { 0, "integerSecurityId" },
1628 { 1, "objectSecurityId" },
1632 static const ber_choice_t T_securityContext_choice[] = {
1633 { 0, &hf_tcap_integerSecurityId, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_tcap_INTEGER },
1634 { 1, &hf_tcap_objectSecurityId, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_tcap_OBJECT_IDENTIFIER },
1635 { 0, NULL, 0, 0, 0, NULL }
1639 dissect_tcap_T_securityContext(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1640 offset = dissect_ber_choice(actx, tree, tvb, offset,
1641 T_securityContext_choice, hf_index, ett_tcap_T_securityContext,
1648 static const value_string tcap_T_confidentialityId_vals[] = {
1649 { 0, "integerConfidentialityId" },
1650 { 1, "objectConfidentialityId" },
1654 static const ber_choice_t T_confidentialityId_choice[] = {
1655 { 0, &hf_tcap_integerConfidentialityId, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_tcap_INTEGER },
1656 { 1, &hf_tcap_objectConfidentialityId, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_tcap_OBJECT_IDENTIFIER },
1657 { 0, NULL, 0, 0, 0, NULL }
1661 dissect_tcap_T_confidentialityId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1662 offset = dissect_ber_choice(actx, tree, tvb, offset,
1663 T_confidentialityId_choice, hf_index, ett_tcap_T_confidentialityId,
1670 static const ber_sequence_t Confidentiality_sequence[] = {
1671 { &hf_tcap_confidentialityId, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_tcap_T_confidentialityId },
1672 { NULL, 0, 0, 0, NULL }
1676 dissect_tcap_Confidentiality(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1677 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1678 Confidentiality_sequence, hf_index, ett_tcap_Confidentiality);
1684 static const ber_sequence_t DialoguePortionANSI_U_sequence[] = {
1685 { &hf_tcap_version , BER_CLASS_PRI, 26, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ProtocolVersion },
1686 { &hf_tcap_applicationContext, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_tcap_T_applicationContext },
1687 { &hf_tcap_userInformation, BER_CLASS_UNI, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_UserInformation },
1688 { &hf_tcap_securityContext, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_tcap_T_securityContext },
1689 { &hf_tcap_confidentiality, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_Confidentiality },
1690 { NULL, 0, 0, 0, NULL }
1694 dissect_tcap_DialoguePortionANSI_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1695 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1696 DialoguePortionANSI_U_sequence, hf_index, ett_tcap_DialoguePortionANSI_U);
1704 dissect_tcap_DialoguePortionANSI(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1705 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1706 hf_index, BER_CLASS_PRI, 25, TRUE, dissect_tcap_DialoguePortionANSI_U);
1714 dissect_tcap_OCTET_STRING_SIZE_0_2(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1715 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
1722 static const value_string tcap_OperationCode_vals[] = {
1728 static const ber_choice_t OperationCode_choice[] = {
1729 { 16, &hf_tcap_national , BER_CLASS_PRI, 16, BER_FLAGS_IMPLTAG, dissect_tcap_INTEGER_M32768_32767 },
1730 { 17, &hf_tcap_private , BER_CLASS_PRI, 17, BER_FLAGS_IMPLTAG, dissect_tcap_INTEGER },
1731 { 0, NULL, 0, 0, 0, NULL }
1735 dissect_tcap_OperationCode(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1736 offset = dissect_ber_choice(actx, tree, tvb, offset,
1737 OperationCode_choice, hf_index, ett_tcap_OperationCode,
1746 dissect_tcap_ANSIParameters(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1747 #line 111 "tcap.cnf"
1748 /* we are doing the ParamSet here so need to look at the tags*/
1750 len = tvb_length_remaining(tvb, offset);
1751 if (len > 2) /* arghhh I dont know whether this is constructed or not! */
1752 offset = dissect_tcap_param(actx,tree,tvb,offset);
1754 offset = dissect_ber_octet_string(TRUE, actx, tree, tvb, 0, hf_index,
1763 static const ber_sequence_t ANSIparamch_sequence[] = {
1764 { &hf_tcap_ansiparams , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1765 { &hf_tcap_ansiparams1 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1766 { &hf_tcap_ansiparams2 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1767 { &hf_tcap_ansiparams3 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1768 { &hf_tcap_ansiparams4 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1769 { &hf_tcap_ansiparams5 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1770 { &hf_tcap_ansiparams6 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1771 { &hf_tcap_ansiparams7 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1772 { &hf_tcap_ansiparams8 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1773 { &hf_tcap_ansiparams9 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1774 { &hf_tcap_ansiparams10 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1775 { &hf_tcap_ansiparams11 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1776 { &hf_tcap_ansiparams12 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1777 { &hf_tcap_ansiparams13 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1778 { &hf_tcap_ansiparams14 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1779 { &hf_tcap_ansiparams15 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1780 { &hf_tcap_ansiparams16 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1781 { &hf_tcap_ansiparams17 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1782 { &hf_tcap_ansiparams18 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1783 { &hf_tcap_ansiparams19 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1784 { &hf_tcap_ansiparams20 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1785 { &hf_tcap_ansiparams21 , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIParameters },
1786 { NULL, 0, 0, 0, NULL }
1790 dissect_tcap_ANSIparamch(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1791 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1792 ANSIparamch_sequence, hf_index, ett_tcap_ANSIparamch);
1798 static const ber_sequence_t InvokePDU_sequence[] = {
1799 { &hf_tcap_componentIDs , BER_CLASS_PRI, 15, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_OCTET_STRING_SIZE_0_2 },
1800 { &hf_tcap_operationCode , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_tcap_OperationCode },
1801 { &hf_tcap_parameterinv , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIparamch },
1802 { NULL, 0, 0, 0, NULL }
1806 dissect_tcap_InvokePDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1807 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1808 InvokePDU_sequence, hf_index, ett_tcap_InvokePDU);
1816 dissect_tcap_ComponentID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1817 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1818 hf_index, BER_CLASS_PRI, 15, TRUE, dissect_tcap_OCTET_STRING_SIZE_1);
1824 static const ber_sequence_t ReturnResultPDU_sequence[] = {
1825 { &hf_tcap_componentID , BER_CLASS_PRI, 15, BER_FLAGS_NOOWNTAG, dissect_tcap_ComponentID },
1826 { &hf_tcap_parameterrr , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIparamch },
1827 { NULL, 0, 0, 0, NULL }
1831 dissect_tcap_ReturnResultPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1832 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1833 ReturnResultPDU_sequence, hf_index, ett_tcap_ReturnResultPDU);
1839 static const ber_sequence_t ReturnErrorPDU_sequence[] = {
1840 { &hf_tcap_componentID , BER_CLASS_PRI, 15, BER_FLAGS_NOOWNTAG, dissect_tcap_ComponentID },
1841 { &hf_tcap_errorCode , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_tcap_ErrorCode },
1842 { &hf_tcap_parameterre , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIparamch },
1843 { NULL, 0, 0, 0, NULL }
1847 dissect_tcap_ReturnErrorPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1848 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1849 ReturnErrorPDU_sequence, hf_index, ett_tcap_ReturnErrorPDU);
1855 static const value_string tcap_ProblemPDU_vals[] = {
1856 { 257, "general-unrecognisedComponentType" },
1857 { 258, "general-incorrectComponentPortion" },
1858 { 259, "general-badlyStructuredCompPortion" },
1864 dissect_tcap_ProblemPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1865 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
1872 static const ber_sequence_t RejectPDU_sequence[] = {
1873 { &hf_tcap_componentID , BER_CLASS_PRI, 15, BER_FLAGS_NOOWNTAG, dissect_tcap_ComponentID },
1874 { &hf_tcap_rejectProblem , BER_CLASS_PRI, 21, BER_FLAGS_IMPLTAG, dissect_tcap_ProblemPDU },
1875 { &hf_tcap_parameterrj , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_tcap_ANSIparamch },
1876 { NULL, 0, 0, 0, NULL }
1880 dissect_tcap_RejectPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1881 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1882 RejectPDU_sequence, hf_index, ett_tcap_RejectPDU);
1888 static const value_string tcap_ComponentPDU_vals[] = {
1889 { 9, "invokeLastansi" },
1890 { 10, "returnResultLastansi" },
1891 { 11, "returnErroransi" },
1892 { 12, "rejectansi" },
1893 { 13, "invokeNotLastansi" },
1894 { 14, "returnResultNotLastansi" },
1898 static const ber_choice_t ComponentPDU_choice[] = {
1899 { 9, &hf_tcap_invokeLastansi , BER_CLASS_PRI, 9, BER_FLAGS_IMPLTAG, dissect_tcap_InvokePDU },
1900 { 10, &hf_tcap_returnResultLastansi, BER_CLASS_PRI, 10, BER_FLAGS_IMPLTAG, dissect_tcap_ReturnResultPDU },
1901 { 11, &hf_tcap_returnErroransi, BER_CLASS_PRI, 11, BER_FLAGS_IMPLTAG, dissect_tcap_ReturnErrorPDU },
1902 { 12, &hf_tcap_rejectansi , BER_CLASS_PRI, 12, BER_FLAGS_IMPLTAG, dissect_tcap_RejectPDU },
1903 { 13, &hf_tcap_invokeNotLastansi, BER_CLASS_PRI, 13, BER_FLAGS_IMPLTAG, dissect_tcap_InvokePDU },
1904 { 14, &hf_tcap_returnResultNotLastansi, BER_CLASS_PRI, 14, BER_FLAGS_IMPLTAG, dissect_tcap_ReturnResultPDU },
1905 { 0, NULL, 0, 0, 0, NULL }
1909 dissect_tcap_ComponentPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1910 #line 122 "tcap.cnf"
1915 guint32 len, comp_offset;
1918 comp_offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
1919 comp_offset = dissect_ber_length(actx->pinfo, tree, tvb, comp_offset, &len, &ind_field);
1920 /* we can believe the length now */
1921 next_tvb = tvb_new_subset(tvb, offset, len+comp_offset-offset, len+comp_offset-offset);
1926 offset = dissect_ber_choice(actx, tree, tvb, offset,
1927 ComponentPDU_choice, hf_index, ett_tcap_ComponentPDU,
1931 dissect_tcap_ANSI_ComponentPDU(implicit_tag, next_tvb, 0, actx, tcap_top_tree, hf_index);
1939 static const ber_sequence_t SEQUENCE_OF_ComponentPDU_sequence_of[1] = {
1940 { &hf_tcap__untag_item_01 , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_tcap_ComponentPDU },
1944 dissect_tcap_SEQUENCE_OF_ComponentPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1945 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
1946 SEQUENCE_OF_ComponentPDU_sequence_of, hf_index, ett_tcap_SEQUENCE_OF_ComponentPDU);
1954 dissect_tcap_ComponentSequence(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1955 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1956 hf_index, BER_CLASS_PRI, 8, TRUE, dissect_tcap_SEQUENCE_OF_ComponentPDU);
1962 static const ber_sequence_t UniTransactionPDU_sequence[] = {
1963 { &hf_tcap_identifier , BER_CLASS_PRI, 7, BER_FLAGS_NOOWNTAG, dissect_tcap_TransactionID },
1964 { &hf_tcap_dialoguePortionansi, BER_CLASS_PRI, 25, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_DialoguePortionANSI },
1965 { &hf_tcap_componentPortion, BER_CLASS_PRI, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ComponentSequence },
1966 { NULL, 0, 0, 0, NULL }
1970 dissect_tcap_UniTransactionPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1971 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1972 UniTransactionPDU_sequence, hf_index, ett_tcap_UniTransactionPDU);
1978 static const ber_sequence_t TransactionPDU_sequence[] = {
1979 { &hf_tcap_identifier , BER_CLASS_PRI, 7, BER_FLAGS_NOOWNTAG, dissect_tcap_TransactionID },
1980 { &hf_tcap_dialoguePortionansi, BER_CLASS_PRI, 25, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_DialoguePortionANSI },
1981 { &hf_tcap_componentPortion, BER_CLASS_PRI, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_ComponentSequence },
1982 { NULL, 0, 0, 0, NULL }
1986 dissect_tcap_TransactionPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1987 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1988 TransactionPDU_sequence, hf_index, ett_tcap_TransactionPDU);
1996 dissect_tcap_T_ansiqueryWithPerm(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1997 #line 264 "tcap.cnf"
1998 gp_tcapsrt_info->ope=TC_ANSI_ALL;
1999 if (check_col(actx->pinfo->cinfo, COL_INFO))
2000 col_set_str(actx->pinfo->cinfo, COL_INFO, "QueryWithPerm ");
2002 offset = dissect_tcap_TransactionPDU(implicit_tag, tvb, offset, actx, tree, hf_index);
2010 dissect_tcap_T_ansiqueryWithoutPerm(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2011 #line 268 "tcap.cnf"
2012 gp_tcapsrt_info->ope=TC_ANSI_ALL;
2013 if (check_col(actx->pinfo->cinfo, COL_INFO))
2014 col_set_str(actx->pinfo->cinfo, COL_INFO, "QueryWithOutPerm ");
2016 offset = dissect_tcap_TransactionPDU(implicit_tag, tvb, offset, actx, tree, hf_index);
2024 dissect_tcap_T_ansiresponse(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2025 #line 272 "tcap.cnf"
2026 gp_tcapsrt_info->ope=TC_ANSI_ALL;
2027 if (check_col(actx->pinfo->cinfo, COL_INFO))
2028 col_set_str(actx->pinfo->cinfo, COL_INFO, "Response ");
2030 offset = dissect_tcap_TransactionPDU(implicit_tag, tvb, offset, actx, tree, hf_index);
2038 dissect_tcap_T_ansiconversationWithPerm(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2039 #line 276 "tcap.cnf"
2040 gp_tcapsrt_info->ope=TC_ANSI_ALL;
2041 if (check_col(actx->pinfo->cinfo, COL_INFO))
2042 col_set_str(actx->pinfo->cinfo, COL_INFO, "ConversationWithPerm ");
2044 offset = dissect_tcap_TransactionPDU(implicit_tag, tvb, offset, actx, tree, hf_index);
2052 dissect_tcap_T_ansiconversationWithoutPerm(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2053 #line 280 "tcap.cnf"
2054 gp_tcapsrt_info->ope=TC_ANSI_ALL;
2055 if (check_col(actx->pinfo->cinfo, COL_INFO))
2056 col_set_str(actx->pinfo->cinfo, COL_INFO, "ConversationWithoutPerm ");
2059 offset = dissect_tcap_TransactionPDU(implicit_tag, tvb, offset, actx, tree, hf_index);
2065 static const value_string tcap_P_Abort_cause_U_vals[] = {
2066 { 1, "unrecognizedPackageType" },
2067 { 2, "incorrestTransactionPortion" },
2068 { 3, "badlyStructuredTransactionPortion" },
2069 { 4, "unassignedRespondingTransactionID" },
2070 { 5, "permissionToReleaseProblem" },
2071 { 6, "resourceUnavilable" },
2072 { 7, "unrecognizedDialoguePortionID" },
2073 { 8, "badlyStructuredDialoguePortion" },
2074 { 9, "missingDialoguePortion" },
2075 { 10, "inconsistentDialoguePortion" },
2081 dissect_tcap_P_Abort_cause_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2082 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
2091 dissect_tcap_P_Abort_cause(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2092 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
2093 hf_index, BER_CLASS_PRI, 23, TRUE, dissect_tcap_P_Abort_cause_U);
2099 static const value_string tcap_T_causeInformation_vals[] = {
2100 { 0, "abortCause" },
2101 { 1, "userInformation" },
2105 static const ber_choice_t T_causeInformation_choice[] = {
2106 { 0, &hf_tcap_abortCause , BER_CLASS_PRI, 23, BER_FLAGS_NOOWNTAG, dissect_tcap_P_Abort_cause },
2107 { 1, &hf_tcap_userInformation, BER_CLASS_UNI, 8, BER_FLAGS_NOOWNTAG, dissect_tcap_UserInformation },
2108 { 0, NULL, 0, 0, 0, NULL }
2112 dissect_tcap_T_causeInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2113 offset = dissect_ber_choice(actx, tree, tvb, offset,
2114 T_causeInformation_choice, hf_index, ett_tcap_T_causeInformation,
2121 static const ber_sequence_t AbortPDU_sequence[] = {
2122 { &hf_tcap_identifier , BER_CLASS_PRI, 7, BER_FLAGS_NOOWNTAG, dissect_tcap_TransactionID },
2123 { &hf_tcap_dialoguePortionansi, BER_CLASS_PRI, 25, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcap_DialoguePortionANSI },
2124 { &hf_tcap_causeInformation, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_tcap_T_causeInformation },
2125 { NULL, 0, 0, 0, NULL }
2129 dissect_tcap_AbortPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2130 #line 256 "tcap.cnf"
2131 gp_tcapsrt_info->ope=TC_ANSI_ABORT;
2133 if (check_col(actx->pinfo->cinfo, COL_INFO))
2134 col_set_str(actx->pinfo->cinfo, COL_INFO, "Abort ");
2136 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
2137 AbortPDU_sequence, hf_index, ett_tcap_AbortPDU);
2143 static const value_string tcap_TCMessage_vals[] = {
2144 { 0, "unidirectional" },
2149 { 5, "ansiunidirectional" },
2150 { 6, "ansiqueryWithPerm" },
2151 { 7, "ansiqueryWithoutPerm" },
2152 { 8, "ansiresponse" },
2153 { 9, "ansiconversationWithPerm" },
2154 { 10, "ansiconversationWithoutPerm" },
2155 { 11, "ansiabort" },
2159 static const ber_choice_t TCMessage_choice[] = {
2160 { 0, &hf_tcap_unidirectional , BER_CLASS_APP, 1, BER_FLAGS_IMPLTAG, dissect_tcap_Unidirectional },
2161 { 1, &hf_tcap_begin , BER_CLASS_APP, 2, BER_FLAGS_IMPLTAG, dissect_tcap_Begin },
2162 { 2, &hf_tcap_end , BER_CLASS_APP, 4, BER_FLAGS_IMPLTAG, dissect_tcap_End },
2163 { 3, &hf_tcap_continue , BER_CLASS_APP, 5, BER_FLAGS_IMPLTAG, dissect_tcap_Continue },
2164 { 4, &hf_tcap_abort , BER_CLASS_APP, 7, BER_FLAGS_IMPLTAG, dissect_tcap_Abort },
2165 { 5, &hf_tcap_ansiunidirectional, BER_CLASS_PRI, 1, BER_FLAGS_IMPLTAG, dissect_tcap_UniTransactionPDU },
2166 { 6, &hf_tcap_ansiqueryWithPerm, BER_CLASS_PRI, 2, BER_FLAGS_IMPLTAG, dissect_tcap_T_ansiqueryWithPerm },
2167 { 7, &hf_tcap_ansiqueryWithoutPerm, BER_CLASS_PRI, 3, BER_FLAGS_IMPLTAG, dissect_tcap_T_ansiqueryWithoutPerm },
2168 { 8, &hf_tcap_ansiresponse , BER_CLASS_PRI, 4, BER_FLAGS_IMPLTAG, dissect_tcap_T_ansiresponse },
2169 { 9, &hf_tcap_ansiconversationWithPerm, BER_CLASS_PRI, 5, BER_FLAGS_IMPLTAG, dissect_tcap_T_ansiconversationWithPerm },
2170 { 10, &hf_tcap_ansiconversationWithoutPerm, BER_CLASS_PRI, 6, BER_FLAGS_IMPLTAG, dissect_tcap_T_ansiconversationWithoutPerm },
2171 { 11, &hf_tcap_ansiabort , BER_CLASS_PRI, 22, BER_FLAGS_IMPLTAG, dissect_tcap_AbortPDU },
2172 { 0, NULL, 0, 0, 0, NULL }
2176 dissect_tcap_TCMessage(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2177 offset = dissect_ber_choice(actx, tree, tvb, offset,
2178 TCMessage_choice, hf_index, ett_tcap_TCMessage,
2185 static const value_string tcap_ERROR_vals[] = {
2186 { 0, "localValue" },
2187 { 1, "globalValue" },
2191 static const ber_choice_t ERROR_choice[] = {
2192 { 0, &hf_tcap_localValue , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tcap_INTEGER },
2193 { 1, &hf_tcap_globalValue , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_tcap_OBJECT_IDENTIFIER },
2194 { 0, NULL, 0, 0, 0, NULL }
2198 dissect_tcap_ERROR(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2199 offset = dissect_ber_choice(actx, tree, tvb, offset,
2200 ERROR_choice, hf_index, ett_tcap_ERROR,
2208 static void dissect_DialoguePDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
2209 asn1_ctx_t asn1_ctx;
2210 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
2211 dissect_tcap_DialoguePDU(FALSE, tvb, 0, &asn1_ctx, tree, hf_tcap_DialoguePDU_PDU);
2213 static void dissect_UniDialoguePDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
2214 asn1_ctx_t asn1_ctx;
2215 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
2216 dissect_tcap_UniDialoguePDU(FALSE, tvb, 0, &asn1_ctx, tree, hf_tcap_UniDialoguePDU_PDU);
2220 /*--- End of included file: packet-tcap-fn.c ---*/
2221 #line 148 "packet-tcap-template.c"
2225 const value_string tcap_component_type_str[] = {
2226 { TCAP_COMP_INVOKE, "Invoke" },
2227 { TCAP_COMP_RRL, "Return Result(L)" },
2228 { TCAP_COMP_RE, "Return Error" },
2229 { TCAP_COMP_REJECT, "Reject" },
2230 { TCAP_COMP_RRN, "Return Result(NL)" },
2235 dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
2237 proto_item *item=NULL;
2238 proto_tree *tree=NULL;
2240 struct tcaphash_context_t * p_tcap_context;
2241 dissector_handle_t subdissector_handle;
2242 asn1_ctx_t asn1_ctx;
2247 /* Check if ANSI TCAP and call the ANSI TCAP dissector if that's the case
2248 * PackageType ::= CHOICE { unidirectional [PRIVATE 1] IMPLICIT UniTransactionPDU,
2249 * queryWithPerm [PRIVATE 2] IMPLICIT TransactionPDU,
2250 * queryWithoutPerm [PRIVATE 3] IMPLICIT TransactionPDU,
2251 * response [PRIVATE 4] IMPLICIT TransactionPDU,
2252 * conversationWithPerm [PRIVATE 5] IMPLICIT TransactionPDU,
2253 * conversationWithoutPerm [PRIVATE 6] IMPLICIT TransactionPDU,
2254 * abort [PRIVATE 22] IMPLICIT Abort
2259 get_ber_identifier(tvb, 0, &class, &pc, &tag);
2261 if(class == BER_CLASS_PRI){
2270 call_dissector(ansi_tcap_handle, tvb, pinfo, parent_tree);
2279 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
2281 tcap_top_tree = parent_tree;
2282 tcap_stat_tree = NULL;
2284 if (check_col(pinfo->cinfo, COL_PROTOCOL))
2286 col_set_str(pinfo->cinfo, COL_PROTOCOL, "TCAP");
2289 /* create display subtree for the protocol */
2291 item = proto_tree_add_item(parent_tree, proto_tcap, tvb, 0, -1, FALSE);
2292 tree = proto_item_add_subtree(item, ett_tcap);
2293 tcap_stat_tree=tree;
2297 raz_tcap_private(&tcap_private);
2299 pinfo->private_data = &tcap_private;
2300 gp_tcapsrt_info=tcapsrt_razinfo();
2301 tcap_subdissector_used=FALSE;
2302 gp_tcap_context=NULL;
2303 dissect_tcap_TCMessage(FALSE, tvb, 0, &asn1_ctx, tree, -1);
2305 if (gtcap_HandleSRT && !tcap_subdissector_used ) {
2306 p_tcap_context=tcapsrt_call_matching(tvb, pinfo, tcap_stat_tree, gp_tcapsrt_info);
2307 tcap_private.context=p_tcap_context;
2309 /* If the current message is TCAP only,
2310 * save the Application Context Name for the next messages
2312 if ( p_tcap_context && cur_oid && !p_tcap_context->oid_present ) {
2313 /* Save the application context and the sub dissector */
2314 ber_oid_dissector_table = find_dissector_table("ber.oid");
2315 strncpy(p_tcap_context->oid,cur_oid, LENGTH_OID);
2316 p_tcap_context->oid_present=TRUE;
2317 if ( (subdissector_handle = dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) {
2318 p_tcap_context->subdissector_handle=subdissector_handle;
2319 p_tcap_context->subdissector_present=TRUE;
2322 if (gtcap_HandleSRT && p_tcap_context && p_tcap_context->callback) {
2323 /* Callback fonction for the upper layer */
2324 (p_tcap_context->callback)(tvb, pinfo, tcap_stat_tree, p_tcap_context);
2330 proto_reg_handoff_tcap(void)
2333 static gboolean prefs_initialized = FALSE;
2335 if (! prefs_initialized) {
2336 sccp_ssn_table = find_dissector_table("sccp.ssn");
2337 prefs_initialized = TRUE;
2340 data_handle = find_dissector("data");
2341 ansi_tcap_handle = find_dissector("ansi_tcap");
2344 /*--- Included file: packet-tcap-dis-tab.c ---*/
2345 #line 1 "packet-tcap-dis-tab.c"
2346 register_ber_oid_dissector("0.0.17.773.1.1.1", dissect_DialoguePDU_PDU, proto_tcap, "dialogue-as-id");
2347 register_ber_oid_dissector("0.0.17.773.1.2.1", dissect_UniDialoguePDU_PDU, proto_tcap, "uniDialogue-as-id");
2350 /*--- End of included file: packet-tcap-dis-tab.c ---*/
2351 #line 270 "packet-tcap-template.c"
2354 static void init_tcap(void);
2357 proto_register_tcap(void)
2360 /* Setup list of header fields See Section 1.6.1 for details*/
2361 static hf_register_info hf[] = {
2363 { "Tag", "tcap.msgtype",
2364 FT_UINT8, BASE_HEX, NULL, 0,
2368 { "Length", "tcap.len",
2369 FT_UINT8, BASE_DEC, NULL, 0,
2373 { "Data", "tcap.data",
2374 FT_BYTES, BASE_HEX, NULL, 0,
2378 { "Transaction Id", "tcap.tid",
2379 FT_BYTES, BASE_HEX, NULL, 0,
2382 /* Tcap Service Response Time */
2383 { &hf_tcapsrt_SessionId,
2385 "tcap.srt.session_id",
2386 FT_UINT32, BASE_DEC, NULL, 0x0,
2389 { &hf_tcapsrt_BeginSession,
2392 FT_FRAMENUM, BASE_NONE, NULL, 0x0,
2393 "SRT Begin of Session", HFILL }
2395 { &hf_tcapsrt_EndSession,
2398 FT_FRAMENUM, BASE_NONE, NULL, 0x0,
2399 "SRT End of Session", HFILL }
2401 { &hf_tcapsrt_SessionTime,
2402 { "Session duration",
2403 "tcap.srt.sessiontime",
2404 FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
2405 "Duration of the TCAP session", HFILL }
2407 { &hf_tcapsrt_Duplicate,
2408 { "Session Duplicate",
2409 "tcap.srt.duplicate",
2410 FT_FRAMENUM, BASE_NONE, NULL, 0x0,
2411 "SRT Duplicated with Session", HFILL }
2414 /*--- Included file: packet-tcap-hfarr.c ---*/
2415 #line 1 "packet-tcap-hfarr.c"
2416 { &hf_tcap_DialoguePDU_PDU,
2417 { "DialoguePDU", "tcap.DialoguePDU",
2418 FT_UINT32, BASE_DEC, VALS(tcap_DialoguePDU_vals), 0,
2419 "tcap.DialoguePDU", HFILL }},
2420 { &hf_tcap_UniDialoguePDU_PDU,
2421 { "UniDialoguePDU", "tcap.UniDialoguePDU",
2422 FT_UINT32, BASE_DEC, VALS(tcap_UniDialoguePDU_vals), 0,
2423 "tcap.UniDialoguePDU", HFILL }},
2424 { &hf_tcap_dialogueRequest,
2425 { "dialogueRequest", "tcap.dialogueRequest",
2426 FT_NONE, BASE_NONE, NULL, 0,
2427 "tcap.AARQ_apdu", HFILL }},
2428 { &hf_tcap_dialogueResponse,
2429 { "dialogueResponse", "tcap.dialogueResponse",
2430 FT_NONE, BASE_NONE, NULL, 0,
2431 "tcap.AARE_apdu", HFILL }},
2432 { &hf_tcap_dialogueAbort,
2433 { "dialogueAbort", "tcap.dialogueAbort",
2434 FT_NONE, BASE_NONE, NULL, 0,
2435 "tcap.ABRT_apdu", HFILL }},
2437 { "oid", "tcap.oid",
2438 FT_OID, BASE_NONE, NULL, 0,
2439 "tcap.OBJECT_IDENTIFIER", HFILL }},
2441 { "dialog", "tcap.dialog",
2442 FT_BYTES, BASE_HEX, NULL, 0,
2443 "tcap.Dialog1", HFILL }},
2445 { "useroid", "tcap.useroid",
2446 FT_OID, BASE_NONE, NULL, 0,
2447 "tcap.UserInfoOID", HFILL }},
2448 { &hf_tcap_externuserinfo,
2449 { "externuserinfo", "tcap.externuserinfo",
2450 FT_BYTES, BASE_HEX, NULL, 0,
2451 "tcap.ExternUserInfo", HFILL }},
2452 { &hf_tcap_protocol_versionrq,
2453 { "protocol-versionrq", "tcap.protocol_versionrq",
2454 FT_BYTES, BASE_HEX, NULL, 0,
2455 "tcap.T_protocol_versionrq", HFILL }},
2456 { &hf_tcap_application_context_name,
2457 { "application-context-name", "tcap.application_context_name",
2458 FT_OID, BASE_NONE, NULL, 0,
2459 "tcap.Applicationcontext", HFILL }},
2460 { &hf_tcap_user_information,
2461 { "user-information", "tcap.user_information",
2462 FT_BYTES, BASE_HEX, NULL, 0,
2463 "tcap.User_information", HFILL }},
2464 { &hf_tcap_protocol_versionre,
2465 { "protocol-versionre", "tcap.protocol_versionre",
2466 FT_BYTES, BASE_HEX, NULL, 0,
2467 "tcap.T_protocol_versionre", HFILL }},
2469 { "result", "tcap.result",
2470 FT_INT32, BASE_DEC, VALS(tcap_Associate_result_vals), 0,
2471 "tcap.Associate_result", HFILL }},
2472 { &hf_tcap_result_source_diagnostic,
2473 { "result-source-diagnostic", "tcap.result_source_diagnostic",
2474 FT_UINT32, BASE_DEC, VALS(tcap_Associate_source_diagnostic_vals), 0,
2475 "tcap.Associate_source_diagnostic", HFILL }},
2476 { &hf_tcap_reasonrq,
2477 { "reasonrq", "tcap.reasonrq",
2478 FT_INT32, BASE_DEC, VALS(tcap_Release_request_reason_vals), 0,
2479 "tcap.Release_request_reason", HFILL }},
2480 { &hf_tcap_reasonre,
2481 { "reasonre", "tcap.reasonre",
2482 FT_INT32, BASE_DEC, VALS(tcap_Release_response_reason_vals), 0,
2483 "tcap.Release_response_reason", HFILL }},
2484 { &hf_tcap_abort_source,
2485 { "abort-source", "tcap.abort_source",
2486 FT_INT32, BASE_DEC, VALS(tcap_ABRT_source_vals), 0,
2487 "tcap.ABRT_source", HFILL }},
2488 { &hf_tcap_dialogue_service_user,
2489 { "dialogue-service-user", "tcap.dialogue_service_user",
2490 FT_INT32, BASE_DEC, VALS(tcap_T_dialogue_service_user_vals), 0,
2491 "tcap.T_dialogue_service_user", HFILL }},
2492 { &hf_tcap_dialogue_service_provider,
2493 { "dialogue-service-provider", "tcap.dialogue_service_provider",
2494 FT_INT32, BASE_DEC, VALS(tcap_T_dialogue_service_provider_vals), 0,
2495 "tcap.T_dialogue_service_provider", HFILL }},
2496 { &hf_tcap_unidialoguePDU,
2497 { "unidialoguePDU", "tcap.unidialoguePDU",
2498 FT_NONE, BASE_NONE, NULL, 0,
2499 "tcap.AUDT_apdu", HFILL }},
2500 { &hf_tcap_protocol_version3,
2501 { "protocol-version3", "tcap.protocol_version3",
2502 FT_BYTES, BASE_HEX, NULL, 0,
2503 "tcap.T_protocol_version3", HFILL }},
2504 { &hf_tcap_unidirectional,
2505 { "unidirectional", "tcap.unidirectional",
2506 FT_NONE, BASE_NONE, NULL, 0,
2507 "tcap.Unidirectional", HFILL }},
2509 { "begin", "tcap.begin",
2510 FT_NONE, BASE_NONE, NULL, 0,
2511 "tcap.Begin", HFILL }},
2513 { "end", "tcap.end",
2514 FT_NONE, BASE_NONE, NULL, 0,
2515 "tcap.End", HFILL }},
2516 { &hf_tcap_continue,
2517 { "continue", "tcap.continue",
2518 FT_NONE, BASE_NONE, NULL, 0,
2519 "tcap.Continue", HFILL }},
2521 { "abort", "tcap.abort",
2522 FT_NONE, BASE_NONE, NULL, 0,
2523 "tcap.Abort", HFILL }},
2524 { &hf_tcap_ansiunidirectional,
2525 { "ansiunidirectional", "tcap.ansiunidirectional",
2526 FT_NONE, BASE_NONE, NULL, 0,
2527 "tcap.UniTransactionPDU", HFILL }},
2528 { &hf_tcap_ansiqueryWithPerm,
2529 { "ansiqueryWithPerm", "tcap.ansiqueryWithPerm",
2530 FT_NONE, BASE_NONE, NULL, 0,
2531 "tcap.T_ansiqueryWithPerm", HFILL }},
2532 { &hf_tcap_ansiqueryWithoutPerm,
2533 { "ansiqueryWithoutPerm", "tcap.ansiqueryWithoutPerm",
2534 FT_NONE, BASE_NONE, NULL, 0,
2535 "tcap.T_ansiqueryWithoutPerm", HFILL }},
2536 { &hf_tcap_ansiresponse,
2537 { "ansiresponse", "tcap.ansiresponse",
2538 FT_NONE, BASE_NONE, NULL, 0,
2539 "tcap.T_ansiresponse", HFILL }},
2540 { &hf_tcap_ansiconversationWithPerm,
2541 { "ansiconversationWithPerm", "tcap.ansiconversationWithPerm",
2542 FT_NONE, BASE_NONE, NULL, 0,
2543 "tcap.T_ansiconversationWithPerm", HFILL }},
2544 { &hf_tcap_ansiconversationWithoutPerm,
2545 { "ansiconversationWithoutPerm", "tcap.ansiconversationWithoutPerm",
2546 FT_NONE, BASE_NONE, NULL, 0,
2547 "tcap.T_ansiconversationWithoutPerm", HFILL }},
2548 { &hf_tcap_ansiabort,
2549 { "ansiabort", "tcap.ansiabort",
2550 FT_NONE, BASE_NONE, NULL, 0,
2551 "tcap.AbortPDU", HFILL }},
2552 { &hf_tcap_dialoguePortion,
2553 { "dialoguePortion", "tcap.dialoguePortion",
2554 FT_BYTES, BASE_HEX, NULL, 0,
2555 "tcap.DialoguePortion", HFILL }},
2556 { &hf_tcap_components,
2557 { "components", "tcap.components",
2558 FT_UINT32, BASE_DEC, NULL, 0,
2559 "tcap.ComponentPortion", HFILL }},
2561 { "otid", "tcap.otid",
2562 FT_BYTES, BASE_HEX, NULL, 0,
2563 "tcap.OrigTransactionID", HFILL }},
2565 { "dtid", "tcap.dtid",
2566 FT_BYTES, BASE_HEX, NULL, 0,
2567 "tcap.DestTransactionID", HFILL }},
2569 { "reason", "tcap.reason",
2570 FT_UINT32, BASE_DEC, VALS(tcap_Reason_vals), 0,
2571 "tcap.Reason", HFILL }},
2572 { &hf_tcap_p_abortCause,
2573 { "p-abortCause", "tcap.p_abortCause",
2574 FT_UINT32, BASE_DEC, VALS(tcap_P_AbortCause_U_vals), 0,
2575 "tcap.P_AbortCause", HFILL }},
2576 { &hf_tcap_u_abortCause,
2577 { "u-abortCause", "tcap.u_abortCause",
2578 FT_BYTES, BASE_HEX, NULL, 0,
2579 "tcap.DialoguePortion", HFILL }},
2580 { &hf_tcap__untag_item,
2581 { "Item", "tcap._untag_item",
2582 FT_UINT32, BASE_DEC, VALS(tcap_Component_vals), 0,
2583 "tcap.Component", HFILL }},
2585 { "invoke", "tcap.invoke",
2586 FT_NONE, BASE_NONE, NULL, 0,
2587 "tcap.Invoke", HFILL }},
2588 { &hf_tcap_returnResultLast,
2589 { "returnResultLast", "tcap.returnResultLast",
2590 FT_NONE, BASE_NONE, NULL, 0,
2591 "tcap.ReturnResult", HFILL }},
2592 { &hf_tcap_returnError,
2593 { "returnError", "tcap.returnError",
2594 FT_NONE, BASE_NONE, NULL, 0,
2595 "tcap.ReturnError", HFILL }},
2597 { "reject", "tcap.reject",
2598 FT_NONE, BASE_NONE, NULL, 0,
2599 "tcap.Reject", HFILL }},
2600 { &hf_tcap_returnResultNotLast,
2601 { "returnResultNotLast", "tcap.returnResultNotLast",
2602 FT_NONE, BASE_NONE, NULL, 0,
2603 "tcap.ReturnResult", HFILL }},
2604 { &hf_tcap_invokeID,
2605 { "invokeID", "tcap.invokeID",
2606 FT_INT32, BASE_DEC, NULL, 0,
2607 "tcap.InvokeIdType", HFILL }},
2608 { &hf_tcap_linkedID,
2609 { "linkedID", "tcap.linkedID",
2610 FT_INT32, BASE_DEC, NULL, 0,
2611 "tcap.InvokeIdType", HFILL }},
2613 { "opCode", "tcap.opCode",
2614 FT_UINT32, BASE_DEC, VALS(tcap_OPERATION_vals), 0,
2615 "tcap.OPERATION", HFILL }},
2616 { &hf_tcap_parameter,
2617 { "parameter", "tcap.parameter",
2618 FT_NONE, BASE_NONE, NULL, 0,
2619 "tcap.Parameter", HFILL }},
2620 { &hf_tcap_resultretres,
2621 { "resultretres", "tcap.resultretres",
2622 FT_NONE, BASE_NONE, NULL, 0,
2623 "tcap.T_resultretres", HFILL }},
2624 { &hf_tcap_errorCode,
2625 { "errorCode", "tcap.errorCode",
2626 FT_UINT32, BASE_DEC, VALS(tcap_ErrorCode_vals), 0,
2627 "tcap.ErrorCode", HFILL }},
2628 { &hf_tcap_invokeIDRej,
2629 { "invokeIDRej", "tcap.invokeIDRej",
2630 FT_UINT32, BASE_DEC, VALS(tcap_T_invokeIDRej_vals), 0,
2631 "tcap.T_invokeIDRej", HFILL }},
2632 { &hf_tcap_derivable,
2633 { "derivable", "tcap.derivable",
2634 FT_INT32, BASE_DEC, NULL, 0,
2635 "tcap.InvokeIdType", HFILL }},
2636 { &hf_tcap_not_derivable,
2637 { "not-derivable", "tcap.not_derivable",
2638 FT_NONE, BASE_NONE, NULL, 0,
2639 "tcap.NULL", HFILL }},
2641 { "problem", "tcap.problem",
2642 FT_UINT32, BASE_DEC, VALS(tcap_T_problem_vals), 0,
2643 "tcap.T_problem", HFILL }},
2644 { &hf_tcap_generalProblem,
2645 { "generalProblem", "tcap.generalProblem",
2646 FT_INT32, BASE_DEC, VALS(tcap_GeneralProblem_vals), 0,
2647 "tcap.GeneralProblem", HFILL }},
2648 { &hf_tcap_invokeProblem,
2649 { "invokeProblem", "tcap.invokeProblem",
2650 FT_INT32, BASE_DEC, VALS(tcap_InvokeProblem_vals), 0,
2651 "tcap.InvokeProblem", HFILL }},
2652 { &hf_tcap_returnResultProblem,
2653 { "returnResultProblem", "tcap.returnResultProblem",
2654 FT_INT32, BASE_DEC, VALS(tcap_ReturnResultProblem_vals), 0,
2655 "tcap.ReturnResultProblem", HFILL }},
2656 { &hf_tcap_returnErrorProblem,
2657 { "returnErrorProblem", "tcap.returnErrorProblem",
2658 FT_INT32, BASE_DEC, VALS(tcap_ReturnErrorProblem_vals), 0,
2659 "tcap.ReturnErrorProblem", HFILL }},
2660 { &hf_tcap_localValue,
2661 { "localValue", "tcap.localValue",
2662 FT_INT32, BASE_DEC, NULL, 0,
2663 "tcap.INTEGER", HFILL }},
2664 { &hf_tcap_globalValue,
2665 { "globalValue", "tcap.globalValue",
2666 FT_OID, BASE_NONE, NULL, 0,
2667 "tcap.OBJECT_IDENTIFIER", HFILL }},
2668 { &hf_tcap_identifier,
2669 { "identifier", "tcap.identifier",
2670 FT_BYTES, BASE_HEX, NULL, 0,
2671 "tcap.TransactionID", HFILL }},
2672 { &hf_tcap_dialoguePortionansi,
2673 { "dialoguePortionansi", "tcap.dialoguePortionansi",
2674 FT_NONE, BASE_NONE, NULL, 0,
2675 "tcap.DialoguePortionANSI", HFILL }},
2676 { &hf_tcap_componentPortion,
2677 { "componentPortion", "tcap.componentPortion",
2678 FT_UINT32, BASE_DEC, NULL, 0,
2679 "tcap.ComponentSequence", HFILL }},
2680 { &hf_tcap_causeInformation,
2681 { "causeInformation", "tcap.causeInformation",
2682 FT_UINT32, BASE_DEC, VALS(tcap_T_causeInformation_vals), 0,
2683 "tcap.T_causeInformation", HFILL }},
2684 { &hf_tcap_abortCause,
2685 { "abortCause", "tcap.abortCause",
2686 FT_INT32, BASE_DEC, VALS(tcap_P_Abort_cause_U_vals), 0,
2687 "tcap.P_Abort_cause", HFILL }},
2688 { &hf_tcap_userInformation,
2689 { "userInformation", "tcap.userInformation",
2690 FT_NONE, BASE_NONE, NULL, 0,
2691 "tcap.UserInformation", HFILL }},
2693 { "version", "tcap.version",
2694 FT_BYTES, BASE_HEX, NULL, 0,
2695 "tcap.ProtocolVersion", HFILL }},
2696 { &hf_tcap_applicationContext,
2697 { "applicationContext", "tcap.applicationContext",
2698 FT_UINT32, BASE_DEC, VALS(tcap_T_applicationContext_vals), 0,
2699 "tcap.T_applicationContext", HFILL }},
2700 { &hf_tcap_integerApplicationId,
2701 { "integerApplicationId", "tcap.integerApplicationId",
2702 FT_INT32, BASE_DEC, NULL, 0,
2703 "tcap.IntegerApplicationContext", HFILL }},
2704 { &hf_tcap_objectApplicationId,
2705 { "objectApplicationId", "tcap.objectApplicationId",
2706 FT_OID, BASE_NONE, NULL, 0,
2707 "tcap.ObjectIDApplicationContext", HFILL }},
2708 { &hf_tcap_securityContext,
2709 { "securityContext", "tcap.securityContext",
2710 FT_UINT32, BASE_DEC, VALS(tcap_T_securityContext_vals), 0,
2711 "tcap.T_securityContext", HFILL }},
2712 { &hf_tcap_integerSecurityId,
2713 { "integerSecurityId", "tcap.integerSecurityId",
2714 FT_INT32, BASE_DEC, NULL, 0,
2715 "tcap.INTEGER", HFILL }},
2716 { &hf_tcap_objectSecurityId,
2717 { "objectSecurityId", "tcap.objectSecurityId",
2718 FT_OID, BASE_NONE, NULL, 0,
2719 "tcap.OBJECT_IDENTIFIER", HFILL }},
2720 { &hf_tcap_confidentiality,
2721 { "confidentiality", "tcap.confidentiality",
2722 FT_NONE, BASE_NONE, NULL, 0,
2723 "tcap.Confidentiality", HFILL }},
2724 { &hf_tcap_confidentialityId,
2725 { "confidentialityId", "tcap.confidentialityId",
2726 FT_UINT32, BASE_DEC, VALS(tcap_T_confidentialityId_vals), 0,
2727 "tcap.T_confidentialityId", HFILL }},
2728 { &hf_tcap_integerConfidentialityId,
2729 { "integerConfidentialityId", "tcap.integerConfidentialityId",
2730 FT_INT32, BASE_DEC, NULL, 0,
2731 "tcap.INTEGER", HFILL }},
2732 { &hf_tcap_objectConfidentialityId,
2733 { "objectConfidentialityId", "tcap.objectConfidentialityId",
2734 FT_OID, BASE_NONE, NULL, 0,
2735 "tcap.OBJECT_IDENTIFIER", HFILL }},
2736 { &hf_tcap__untag_item_01,
2737 { "Item", "tcap._untag_item",
2738 FT_UINT32, BASE_DEC, VALS(tcap_ComponentPDU_vals), 0,
2739 "tcap.ComponentPDU", HFILL }},
2740 { &hf_tcap_invokeLastansi,
2741 { "invokeLastansi", "tcap.invokeLastansi",
2742 FT_NONE, BASE_NONE, NULL, 0,
2743 "tcap.InvokePDU", HFILL }},
2744 { &hf_tcap_returnResultLastansi,
2745 { "returnResultLastansi", "tcap.returnResultLastansi",
2746 FT_NONE, BASE_NONE, NULL, 0,
2747 "tcap.ReturnResultPDU", HFILL }},
2748 { &hf_tcap_returnErroransi,
2749 { "returnErroransi", "tcap.returnErroransi",
2750 FT_NONE, BASE_NONE, NULL, 0,
2751 "tcap.ReturnErrorPDU", HFILL }},
2752 { &hf_tcap_rejectansi,
2753 { "rejectansi", "tcap.rejectansi",
2754 FT_NONE, BASE_NONE, NULL, 0,
2755 "tcap.RejectPDU", HFILL }},
2756 { &hf_tcap_invokeNotLastansi,
2757 { "invokeNotLastansi", "tcap.invokeNotLastansi",
2758 FT_NONE, BASE_NONE, NULL, 0,
2759 "tcap.InvokePDU", HFILL }},
2760 { &hf_tcap_returnResultNotLastansi,
2761 { "returnResultNotLastansi", "tcap.returnResultNotLastansi",
2762 FT_NONE, BASE_NONE, NULL, 0,
2763 "tcap.ReturnResultPDU", HFILL }},
2764 { &hf_tcap_componentIDs,
2765 { "componentIDs", "tcap.componentIDs",
2766 FT_BYTES, BASE_HEX, NULL, 0,
2767 "tcap.OCTET_STRING_SIZE_0_2", HFILL }},
2768 { &hf_tcap_operationCode,
2769 { "operationCode", "tcap.operationCode",
2770 FT_UINT32, BASE_DEC, VALS(tcap_OperationCode_vals), 0,
2771 "tcap.OperationCode", HFILL }},
2772 { &hf_tcap_parameterinv,
2773 { "parameterinv", "tcap.parameterinv",
2774 FT_NONE, BASE_NONE, NULL, 0,
2775 "tcap.ANSIparamch", HFILL }},
2776 { &hf_tcap_ansiparams,
2777 { "ansiparams", "tcap.ansiparams",
2778 FT_NONE, BASE_NONE, NULL, 0,
2779 "tcap.ANSIParameters", HFILL }},
2780 { &hf_tcap_ansiparams1,
2781 { "ansiparams1", "tcap.ansiparams1",
2782 FT_NONE, BASE_NONE, NULL, 0,
2783 "tcap.ANSIParameters", HFILL }},
2784 { &hf_tcap_ansiparams2,
2785 { "ansiparams2", "tcap.ansiparams2",
2786 FT_NONE, BASE_NONE, NULL, 0,
2787 "tcap.ANSIParameters", HFILL }},
2788 { &hf_tcap_ansiparams3,
2789 { "ansiparams3", "tcap.ansiparams3",
2790 FT_NONE, BASE_NONE, NULL, 0,
2791 "tcap.ANSIParameters", HFILL }},
2792 { &hf_tcap_ansiparams4,
2793 { "ansiparams4", "tcap.ansiparams4",
2794 FT_NONE, BASE_NONE, NULL, 0,
2795 "tcap.ANSIParameters", HFILL }},
2796 { &hf_tcap_ansiparams5,
2797 { "ansiparams5", "tcap.ansiparams5",
2798 FT_NONE, BASE_NONE, NULL, 0,
2799 "tcap.ANSIParameters", HFILL }},
2800 { &hf_tcap_ansiparams6,
2801 { "ansiparams6", "tcap.ansiparams6",
2802 FT_NONE, BASE_NONE, NULL, 0,
2803 "tcap.ANSIParameters", HFILL }},
2804 { &hf_tcap_ansiparams7,
2805 { "ansiparams7", "tcap.ansiparams7",
2806 FT_NONE, BASE_NONE, NULL, 0,
2807 "tcap.ANSIParameters", HFILL }},
2808 { &hf_tcap_ansiparams8,
2809 { "ansiparams8", "tcap.ansiparams8",
2810 FT_NONE, BASE_NONE, NULL, 0,
2811 "tcap.ANSIParameters", HFILL }},
2812 { &hf_tcap_ansiparams9,
2813 { "ansiparams9", "tcap.ansiparams9",
2814 FT_NONE, BASE_NONE, NULL, 0,
2815 "tcap.ANSIParameters", HFILL }},
2816 { &hf_tcap_ansiparams10,
2817 { "ansiparams10", "tcap.ansiparams10",
2818 FT_NONE, BASE_NONE, NULL, 0,
2819 "tcap.ANSIParameters", HFILL }},
2820 { &hf_tcap_ansiparams11,
2821 { "ansiparams11", "tcap.ansiparams11",
2822 FT_NONE, BASE_NONE, NULL, 0,
2823 "tcap.ANSIParameters", HFILL }},
2824 { &hf_tcap_ansiparams12,
2825 { "ansiparams12", "tcap.ansiparams12",
2826 FT_NONE, BASE_NONE, NULL, 0,
2827 "tcap.ANSIParameters", HFILL }},
2828 { &hf_tcap_ansiparams13,
2829 { "ansiparams13", "tcap.ansiparams13",
2830 FT_NONE, BASE_NONE, NULL, 0,
2831 "tcap.ANSIParameters", HFILL }},
2832 { &hf_tcap_ansiparams14,
2833 { "ansiparams14", "tcap.ansiparams14",
2834 FT_NONE, BASE_NONE, NULL, 0,
2835 "tcap.ANSIParameters", HFILL }},
2836 { &hf_tcap_ansiparams15,
2837 { "ansiparams15", "tcap.ansiparams15",
2838 FT_NONE, BASE_NONE, NULL, 0,
2839 "tcap.ANSIParameters", HFILL }},
2840 { &hf_tcap_ansiparams16,
2841 { "ansiparams16", "tcap.ansiparams16",
2842 FT_NONE, BASE_NONE, NULL, 0,
2843 "tcap.ANSIParameters", HFILL }},
2844 { &hf_tcap_ansiparams17,
2845 { "ansiparams17", "tcap.ansiparams17",
2846 FT_NONE, BASE_NONE, NULL, 0,
2847 "tcap.ANSIParameters", HFILL }},
2848 { &hf_tcap_ansiparams18,
2849 { "ansiparams18", "tcap.ansiparams18",
2850 FT_NONE, BASE_NONE, NULL, 0,
2851 "tcap.ANSIParameters", HFILL }},
2852 { &hf_tcap_ansiparams19,
2853 { "ansiparams19", "tcap.ansiparams19",
2854 FT_NONE, BASE_NONE, NULL, 0,
2855 "tcap.ANSIParameters", HFILL }},
2856 { &hf_tcap_ansiparams20,
2857 { "ansiparams20", "tcap.ansiparams20",
2858 FT_NONE, BASE_NONE, NULL, 0,
2859 "tcap.ANSIParameters", HFILL }},
2860 { &hf_tcap_ansiparams21,
2861 { "ansiparams21", "tcap.ansiparams21",
2862 FT_NONE, BASE_NONE, NULL, 0,
2863 "tcap.ANSIParameters", HFILL }},
2864 { &hf_tcap_componentID,
2865 { "componentID", "tcap.componentID",
2866 FT_BYTES, BASE_HEX, NULL, 0,
2867 "tcap.ComponentID", HFILL }},
2868 { &hf_tcap_parameterrr,
2869 { "parameterrr", "tcap.parameterrr",
2870 FT_NONE, BASE_NONE, NULL, 0,
2871 "tcap.ANSIparamch", HFILL }},
2872 { &hf_tcap_parameterre,
2873 { "parameterre", "tcap.parameterre",
2874 FT_NONE, BASE_NONE, NULL, 0,
2875 "tcap.ANSIparamch", HFILL }},
2876 { &hf_tcap_rejectProblem,
2877 { "rejectProblem", "tcap.rejectProblem",
2878 FT_INT32, BASE_DEC, VALS(tcap_ProblemPDU_vals), 0,
2879 "tcap.ProblemPDU", HFILL }},
2880 { &hf_tcap_parameterrj,
2881 { "parameterrj", "tcap.parameterrj",
2882 FT_NONE, BASE_NONE, NULL, 0,
2883 "tcap.ANSIparamch", HFILL }},
2884 { &hf_tcap_national,
2885 { "national", "tcap.national",
2886 FT_INT32, BASE_DEC, NULL, 0,
2887 "tcap.INTEGER_M32768_32767", HFILL }},
2889 { "private", "tcap.private",
2890 FT_INT32, BASE_DEC, NULL, 0,
2891 "tcap.INTEGER", HFILL }},
2892 { &hf_tcap_nationaler,
2893 { "nationaler", "tcap.nationaler",
2894 FT_INT32, BASE_DEC, NULL, 0,
2895 "tcap.INTEGER_M32768_32767", HFILL }},
2896 { &hf_tcap_privateer,
2897 { "privateer", "tcap.privateer",
2898 FT_INT32, BASE_DEC, NULL, 0,
2899 "tcap.INTEGER", HFILL }},
2900 { &hf_tcap_T_protocol_versionrq_version1,
2901 { "version1", "tcap.version1",
2902 FT_BOOLEAN, 8, NULL, 0x80,
2904 { &hf_tcap_T_protocol_versionre_version1,
2905 { "version1", "tcap.version1",
2906 FT_BOOLEAN, 8, NULL, 0x80,
2908 { &hf_tcap_T_protocol_version3_version1,
2909 { "version1", "tcap.version1",
2910 FT_BOOLEAN, 8, NULL, 0x80,
2913 /*--- End of included file: packet-tcap-hfarr.c ---*/
2914 #line 332 "packet-tcap-template.c"
2917 /* Setup protocol subtree array */
2918 static gint *ett[] = {
2925 /*--- Included file: packet-tcap-ettarr.c ---*/
2926 #line 1 "packet-tcap-ettarr.c"
2927 &ett_tcap_DialoguePDU,
2928 &ett_tcap_ExternalPDU_U,
2929 &ett_tcap_UserInformation_U,
2930 &ett_tcap_AARQ_apdu_U,
2931 &ett_tcap_T_protocol_versionrq,
2932 &ett_tcap_AARE_apdu_U,
2933 &ett_tcap_T_protocol_versionre,
2934 &ett_tcap_RLRQ_apdu_U,
2935 &ett_tcap_RLRE_apdu_U,
2936 &ett_tcap_ABRT_apdu_U,
2937 &ett_tcap_Associate_source_diagnostic,
2938 &ett_tcap_UniDialoguePDU,
2939 &ett_tcap_AUDT_apdu_U,
2940 &ett_tcap_T_protocol_version3,
2941 &ett_tcap_TCMessage,
2942 &ett_tcap_Unidirectional,
2948 &ett_tcap_SEQUENCE_SIZE_1_MAX_OF_Component,
2949 &ett_tcap_Component,
2951 &ett_tcap_ReturnResult,
2952 &ett_tcap_T_resultretres,
2953 &ett_tcap_ReturnError,
2955 &ett_tcap_T_invokeIDRej,
2956 &ett_tcap_T_problem,
2957 &ett_tcap_OPERATION,
2959 &ett_tcap_UniTransactionPDU,
2960 &ett_tcap_TransactionPDU,
2962 &ett_tcap_T_causeInformation,
2963 &ett_tcap_DialoguePortionANSI_U,
2964 &ett_tcap_T_applicationContext,
2965 &ett_tcap_T_securityContext,
2966 &ett_tcap_Confidentiality,
2967 &ett_tcap_T_confidentialityId,
2968 &ett_tcap_SEQUENCE_OF_ComponentPDU,
2969 &ett_tcap_ComponentPDU,
2970 &ett_tcap_InvokePDU,
2971 &ett_tcap_ANSIparamch,
2972 &ett_tcap_ReturnResultPDU,
2973 &ett_tcap_ReturnErrorPDU,
2974 &ett_tcap_RejectPDU,
2975 &ett_tcap_OperationCode,
2976 &ett_tcap_ErrorCode,
2978 /*--- End of included file: packet-tcap-ettarr.c ---*/
2979 #line 342 "packet-tcap-template.c"
2982 /*static enum_val_t tcap_options[] = {
2983 { "itu", "ITU", ITU_TCAP_STANDARD },
2984 { "ansi", "ANSI", ANSI_TCAP_STANDARD },
2988 module_t *tcap_module;
2990 /* Register the protocol name and description */
2991 proto_tcap = proto_register_protocol(PNAME, PSNAME, PFNAME);
2993 /* Required function calls to register the header fields and subtrees used */
2994 proto_register_field_array(proto_tcap, hf, array_length(hf));
2995 proto_register_subtree_array(ett, array_length(ett));
2997 tcap_module = prefs_register_protocol(proto_tcap, proto_reg_handoff_tcap);
3000 prefs_register_enum_preference(tcap_module, "standard", "ITU TCAP standard",
3001 "The SS7 standard used in ITU TCAP packets",
3002 &tcap_standard, tcap_options, FALSE);
3004 prefs_register_obsolete_preference(tcap_module, "standard");
3008 prefs_register_bool_preference(tcap_module, "lock_info_col", "Lock Info column",
3009 "Always show TCAP in Info column",
3012 prefs_register_obsolete_preference(tcap_module, "lock_info_col");
3015 /* Set default SSNs */
3016 range_convert_str(&global_ssn_range, "", MAX_SSN);
3017 ssn_range = range_empty();
3019 prefs_register_range_preference(tcap_module, "ssn", "SCCP SSNs",
3020 "SCCP (and SUA) SSNs to decode as TCAP",
3021 &global_ssn_range, MAX_SSN);
3023 prefs_register_bool_preference(tcap_module, "srt",
3024 "Service Response Time Analyse",
3025 "Activate the analyse for Response Time",
3028 prefs_register_bool_preference(tcap_module, "persistentsrt",
3029 "Persistent stats for SRT",
3030 "Statistics for Response Time",
3031 >cap_PersistentSRT);
3033 prefs_register_uint_preference(tcap_module, "repetitiontimeout",
3034 "Repetition timeout",
3035 "Maximal delay for message repetion",
3036 10, >cap_RepetitionTimeout);
3038 prefs_register_uint_preference(tcap_module, "losttimeout",
3040 "Maximal delay for message lost",
3041 10, >cap_LostTimeout);
3043 ansi_sub_dissectors = g_hash_table_new(g_direct_hash,g_direct_equal);
3044 itu_sub_dissectors = g_hash_table_new(g_direct_hash,g_direct_equal);
3046 /* 'globally' register dissector */
3047 register_dissector("tcap", dissect_tcap, proto_tcap);
3049 tcap_handle = create_dissector_handle(dissect_tcap, proto_tcap);
3051 register_init_routine(&init_tcap);
3055 static void range_delete_callback(guint32 ssn)
3057 if ( ssn && !get_ansi_tcap_subdissector(ssn) && !get_itu_tcap_subdissector(ssn) ) {
3058 dissector_delete("sccp.ssn", ssn, tcap_handle);
3062 static void range_add_callback(guint32 ssn)
3064 if (ssn && !get_ansi_tcap_subdissector(ssn) && !get_itu_tcap_subdissector(ssn) ) {
3065 dissector_add("sccp.ssn", ssn, tcap_handle);
3070 static void init_tcap(void) {
3072 range_foreach(ssn_range, range_delete_callback);
3076 ssn_range = range_copy(global_ssn_range);
3077 range_foreach(ssn_range, range_add_callback);
3078 tcapsrt_init_routine();
3082 dissect_tcap_param(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset)
3084 gint tag_offset, saved_offset, len_offset;
3086 proto_tree *subtree;
3096 while (tvb_reported_length_remaining(tvb, offset) > 0)
3098 saved_offset = offset;
3100 offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
3101 tag_offset = offset;
3102 offset = get_ber_length(tvb, offset, &len, &ind_field);
3103 len_offset = offset;
3105 tag_length = tag_offset - saved_offset;
3106 len_length = len_offset - tag_offset;
3110 pi = proto_tree_add_text(tree, tvb, saved_offset,
3111 len + (len_offset - saved_offset),
3113 subtree = proto_item_add_subtree(pi, ett_param);
3114 proto_tree_add_uint_format(subtree, hf_tcap_tag, tvb,
3115 saved_offset, tag_length, tag,
3117 proto_tree_add_uint(subtree, hf_tcap_tag, tvb, saved_offset,
3120 proto_tree_add_uint(subtree, hf_tcap_length, tvb, tag_offset,
3123 if (len-(2*ind_field)) /*should always be positive unless we get an empty contructor pointless? */
3125 next_tvb = tvb_new_subset(tvb, offset, len-(2*ind_field),
3127 dissect_tcap_param(actx, subtree,next_tvb,0);
3131 proto_tree_add_text(subtree, tvb, offset+len-2, 2, "CONSTRUCTOR EOC");
3137 pi = proto_tree_add_text(tree, tvb, saved_offset,
3138 len + (len_offset - saved_offset),
3139 "Parameter (0x%.2x)", tag);
3141 subtree = proto_item_add_subtree(pi, ett_param);
3143 proto_tree_add_uint(subtree, hf_tcap_tag, tvb, saved_offset,
3146 proto_tree_add_uint(subtree, hf_tcap_length, tvb,
3147 saved_offset+tag_length, len_length, len);
3149 if (len) /* check for NULLS */
3151 next_tvb = tvb_new_subset(tvb, offset, len, len);
3152 dissect_ber_octet_string(TRUE, actx, tree, next_tvb, 0,
3153 hf_tcap_data, NULL);
3162 static void raz_tcap_private(struct tcap_private_t * p_tcap_private)
3164 memset(p_tcap_private,0,sizeof(struct tcap_private_t) );
3168 * Call ITU Subdissector to decode the Tcap Component
3171 dissect_tcap_ITU_ComponentPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_)
3173 dissector_handle_t subdissector_handle=NULL;
3174 gboolean is_subdissector=FALSE;
3175 struct tcaphash_context_t * p_tcap_context=NULL;
3178 * ok lets look at the oid and ssn and try and find a dissector, otherwise lets decode it.
3180 ber_oid_dissector_table = find_dissector_table("ber.oid");
3183 * Handle The TCAP Service Response Time
3185 if ( gtcap_HandleSRT ) {
3186 if (!tcap_subdissector_used) {
3187 p_tcap_context=tcapsrt_call_matching(tvb, actx->pinfo, tcap_stat_tree, gp_tcapsrt_info);
3188 tcap_subdissector_used=TRUE;
3189 gp_tcap_context=p_tcap_context;
3190 tcap_private.context=p_tcap_context;
3192 /* Take the last TCAP context */
3193 p_tcap_context = gp_tcap_context;
3194 tcap_private.context=p_tcap_context;
3197 if (p_tcap_context) {
3199 if (p_tcap_context->oid_present) {
3200 /* We have already an Application Context, check if we have
3201 to fallback to a lower version */
3202 if ( strncmp(p_tcap_context->oid,cur_oid, LENGTH_OID)!=0) {
3203 /* ACN, changed, Fallback to lower version
3204 * and update the subdissector (purely formal)
3206 strncpy(p_tcap_context->oid,cur_oid, LENGTH_OID);
3207 if ( (subdissector_handle = dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) {
3208 p_tcap_context->subdissector_handle=subdissector_handle;
3209 p_tcap_context->subdissector_present=TRUE;
3213 /* We do not have the OID in the TCAP context, so store it */
3214 strncpy(p_tcap_context->oid,cur_oid, LENGTH_OID);
3215 p_tcap_context->oid_present=TRUE;
3216 /* Try to find a subdissector according to OID */
3217 if ( (subdissector_handle
3218 = dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) {
3219 p_tcap_context->subdissector_handle=subdissector_handle;
3220 p_tcap_context->subdissector_present=TRUE;
3222 /* Not found, so try to find a subdissector according to SSN */
3223 if ( (subdissector_handle = get_itu_tcap_subdissector(actx->pinfo->match_port))) {
3224 /* Found according to SSN */
3225 p_tcap_context->subdissector_handle=subdissector_handle;
3226 p_tcap_context->subdissector_present=TRUE;
3231 /* Copy the OID from the TCAP context to the current oid */
3232 if (p_tcap_context->oid_present) {
3233 tcap_private.oid= (void*) p_tcap_context->oid;
3234 tcap_private.acv=TRUE;
3237 } /* no TCAP context */
3241 && p_tcap_context->subdissector_present) {
3242 /* Take the subdissector from the context */
3243 subdissector_handle=p_tcap_context->subdissector_handle;
3244 is_subdissector=TRUE;
3247 /* Have SccpUsersTable protocol taking precedence over sccp.ssn table */
3248 if (!is_subdissector && requested_subdissector_handle) {
3249 is_subdissector = TRUE;
3250 subdissector_handle = requested_subdissector_handle;
3253 if (!is_subdissector) {
3255 * If we do not currently know the subdissector, we have to find it
3256 * - first, according to the OID
3257 * - then according to the SSN
3258 * - and at least, take the default Data handler
3260 if (ber_oid_dissector_table && cur_oid) {
3261 /* Search if we can find the sub protocol according to the A.C.N */
3262 if ( (subdissector_handle
3263 = dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) {
3265 is_subdissector=TRUE;
3267 /* Search if we can found the sub protocol according to the SSN table */
3268 if ( (subdissector_handle
3269 = get_itu_tcap_subdissector(actx->pinfo->match_port))) {
3270 /* Found according to SSN */
3271 is_subdissector=TRUE;
3273 /* Nothing found, take the Data handler */
3274 subdissector_handle = data_handle;
3275 is_subdissector=TRUE;
3279 /* There is no A.C.N for this transaction, so search in the SSN table */
3280 if ( (subdissector_handle = get_itu_tcap_subdissector(actx->pinfo->match_port))) {
3281 /* Found according to SSN */
3282 is_subdissector=TRUE;
3284 subdissector_handle = data_handle;
3285 is_subdissector=TRUE;
3289 /* We have it already */
3292 /* Call the sub dissector if present, and not already called */
3293 if (is_subdissector)
3294 call_dissector(subdissector_handle, tvb, actx->pinfo, tree);
3300 * Call ANSI Subdissector to decode the Tcap Component
3303 dissect_tcap_ANSI_ComponentPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_)
3305 dissector_handle_t subdissector_handle;
3306 gboolean is_subdissector=FALSE;
3307 struct tcaphash_context_t * p_tcap_context=NULL;
3313 * Handle The TCAP Service Response Time
3315 if ( gtcap_HandleSRT ) {
3316 if (!tcap_subdissector_used) {
3317 p_tcap_context=tcapsrt_call_matching(tvb, actx->pinfo, tcap_stat_tree, gp_tcapsrt_info);
3318 tcap_subdissector_used=TRUE;
3319 gp_tcap_context=p_tcap_context;
3320 tcap_private.context=p_tcap_context;
3322 /* Take the last TCAP context */
3323 p_tcap_context = gp_tcap_context;
3324 tcap_private.context=p_tcap_context;
3328 if (p_tcap_context) {
3329 /* tcap_private.TransactionID_str = bytes_to_str(&(p_tcap_context->session_id),4); */
3330 g_snprintf(str, sizeof(str), "(%d)",p_tcap_context->session_id);
3331 tcap_private.TransactionID_str = str;
3334 if ( (subdissector_handle
3335 = get_ansi_tcap_subdissector(actx->pinfo->match_port))) {
3336 /* Found according to SSN */
3337 is_subdissector=TRUE;
3339 /* Nothing found, take the Data handler */
3340 subdissector_handle = data_handle;
3341 is_subdissector=TRUE;
3344 /* Call the sub dissector if present, and not already called */
3345 if (is_subdissector)
3346 call_dissector(subdissector_handle, tvb, actx->pinfo, tree);
3352 dissect_tcap_TheExternUserInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_)
3355 * ok lets look at the oid and ssn and try and find a dissector, otherwise lets decode it.
3357 ber_oid_dissector_table = find_dissector_table("ber.oid");
3359 if (ber_oid_dissector_table && tcapext_oid){
3360 if(!dissector_try_string(ber_oid_dissector_table, tcapext_oid, tvb, actx->pinfo, tree))
3362 return dissect_tcap_param(actx,tree,tvb,0);
3369 void call_tcap_dissector(dissector_handle_t handle, tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree) {
3371 requested_subdissector_handle = handle;
3374 dissect_tcap(tvb, pinfo, tree);
3376 requested_subdissector_handle = NULL;
3380 requested_subdissector_handle = NULL;