Coverage Report

Created: 2026-07-12 07:10

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wireshark/epan/dissectors/packet-ansi_tcap.c
Line
Count
Source
1
/* Do not modify this file. Changes will be overwritten.                      */
2
/* Generated automatically by the ASN.1 to Wireshark dissector compiler       */
3
/* packet-ansi_tcap.c                                                         */
4
/* asn2wrs.py -b -q -L -p ansi_tcap -c ./ansi_tcap.cnf -s ./packet-ansi_tcap-template -D . -O ../.. TCAP-Remote-Operations-Information-Objects.asn TCAPPackage.asn */
5
6
/* packet-ansi_tcap-template.c
7
 * Routines for ANSI TCAP
8
 * Copyright 2007 Anders Broman <anders.broman@ericsson.com>
9
 * Built from the gsm-map dissector Copyright 2004 - 2005, Anders Broman <anders.broman@ericsson.com>
10
 *
11
 * Wireshark - Network traffic analyzer
12
 * By Gerald Combs <gerald@wireshark.org>
13
 * Copyright 1998 Gerald Combs
14
 *
15
 * SPDX-License-Identifier: GPL-2.0-or-later
16
 * References: T1.114
17
 */
18
19
#include "config.h"
20
21
#include <epan/packet.h>
22
#include <epan/prefs.h>
23
#include <epan/expert.h>
24
#include <epan/oids.h>
25
#include <epan/asn1.h>
26
#include <epan/strutil.h>
27
#include <wsutil/array.h>
28
29
#include "packet-ber.h"
30
#include "packet-tcap.h"
31
#include "packet-ansi_tcap.h"
32
33
void proto_register_ansi_tcap(void);
34
void proto_reg_handoff_ansi_tcap(void);
35
36
/* Preference settings */
37
15
#define ANSI_TCAP_TID_ONLY            0
38
15
#define ANSI_TCAP_TID_AND_SOURCE      1
39
15
#define ANSI_TCAP_TID_SOURCE_AND_DEST 2
40
static int ansi_tcap_response_matching_type = ANSI_TCAP_TID_ONLY;
41
42
/* Initialize the protocol and registered fields */
43
static int proto_ansi_tcap;
44
45
#if 0
46
static int hf_ansi_tcapsrt_SessionId;
47
static int hf_ansi_tcapsrt_Duplicate;
48
static int hf_ansi_tcapsrt_BeginSession;
49
static int hf_ansi_tcapsrt_EndSession;
50
static int hf_ansi_tcapsrt_SessionTime;
51
#endif
52
static int hf_ansi_tcap_bit_h;
53
static int hf_ansi_tcap_op_family;
54
static int hf_ansi_tcap_op_specifier;
55
static int hf_ansi_tcap_parameter;
56
static int hf_ansi_tcap_parameter_length;
57
static int hf_ansi_tcap_parameter_timestamp_year;
58
static int hf_ansi_tcap_parameter_timestamp_month;
59
static int hf_ansi_tcap_parameter_timestamp_day;
60
static int hf_ansi_tcap_parameter_timestamp_hour;
61
static int hf_ansi_tcap_parameter_timestamp_minute;
62
static int hf_ansi_tcap_parameter_timestamp_difference;
63
static int hf_ansi_tcap_parameter_timestamp_local_hour;
64
static int hf_ansi_tcap_parameter_timestamp_local_minute;
65
static int hf_ansi_tcap_parameter_acg_control_cause_indicator;
66
static int hf_ansi_tcap_parameter_acg_duration_field;
67
static int hf_ansi_tcap_parameter_acg_gap;
68
static int hf_ansi_tcap_parameter_standard_announcement;
69
static int hf_ansi_tcap_parameter_customized_announcement;
70
static int hf_ansi_tcap_parameter_set;
71
static int hf_ansi_tcap_parameter_digits_type_of_digits;
72
static int hf_ansi_tcap_parameter_digits_nature_of_numbers;
73
static int hf_ansi_tcap_parameter_digits_number_planning;
74
static int hf_ansi_tcap_parameter_digits_encoding;
75
static int hf_ansi_tcap_parameter_digits_number_of_digits;
76
static int hf_ansi_tcap_parameter_digits;
77
static int hf_ansi_tcap_standard_user_error_code;
78
static int hf_ansi_tcap_sccp_calling_party_address;
79
static int hf_ansi_tcap_transaction_id;
80
static int hf_ansi_tcap_package_type;
81
static int hf_ansi_tcap_returned_data;
82
static int hf_ansi_tcap_service_key_identifier;
83
static int hf_ansi_tcap_digit_identifier;
84
static int hf_ansi_tcap_digit_length;
85
static int hf_ansi_tcap_destination_number_value;
86
static int hf_ansi_tcap_presentation_restriction;
87
static int hf_ansi_tcap_encoding_scheme;
88
static int hf_ansi_tcap_number_of_digits;
89
static int hf_ansi_tcap_destination_phone_number;
90
static int hf_ansi_tcap_return_phone_number;
91
static int hf_ansi_tcap_busy_idle_status;
92
static int hf_ansi_tcap_originating_restrictions;
93
static int hf_ansi_tcap_terminating_restrictions;
94
static int hf_ansi_tcap_parameter_set_start;
95
static int hf_ansi_tcap_parameter_call_forwarding_on_busy;
96
static int hf_ansi_tcap_parameter_call_forwarding_dont_answer;
97
static int hf_ansi_tcap_parameter_selective_forwarding;
98
static int hf_ansi_tcap_parameter_dn_match;
99
static int hf_ansi_tcap_parameter_dn_line_service;
100
static int hf_ansi_tcap_duration_hour;
101
static int hf_ansi_tcap_duration_minute;
102
static int hf_ansi_tcap_duration_second;
103
static int hf_ansi_tcap_parameter_bearer_capability_requested1;
104
static int hf_ansi_tcap_parameter_bearer_capability_requested2;
105
static int hf_ansi_tcap_parameter_bearer_capability_requested2a;
106
static int hf_ansi_tcap_parameter_bearer_capability_requested2b;
107
static int hf_ansi_tcap_parameter_bearer_capability_requested3;
108
static int hf_ansi_tcap_parameter_bearer_capability_requested3a;
109
static int hf_ansi_tcap_bearer_capability_supported;
110
static int hf_ansi_tcap_reference_id;
111
static int hf_ansi_tcap_parameter_business_group_length_spare;
112
static int hf_ansi_tcap_parameter_business_group_length_AttSt;
113
static int hf_ansi_tcap_parameter_business_group_length_BGID;
114
static int hf_ansi_tcap_parameter_business_group_length_LP11;
115
static int hf_ansi_tcap_parameter_business_group_length_Party_Selector;
116
static int hf_ansi_tcap_parameter_business_group_id;
117
static int hf_ansi_tcap_parameter_business_group_subgroup_id;
118
static int hf_ansi_tcap_parameter_business_group_line_privileges;
119
static int hf_ansi_tcap_parameter_signalling_networks_id;
120
static int hf_ansi_tcap_parameter_generic_name_type_name;
121
static int hf_ansi_tcap_parameter_generic_name_availability;
122
static int hf_ansi_tcap_parameter_generic_name_spare;
123
static int hf_ansi_tcap_parameter_generic_name_presentation;
124
static int hf_ansi_tcap_parameter_generic_name_characters;
125
static int hf_ansi_tcap_message_waiting_indicator_type;
126
static int hf_ansi_tcap_parameter_look_ahead_for_busy_ack_type;
127
static int hf_ansi_tcap_parameter_look_ahead_for_busy_spare;
128
static int hf_ansi_tcap_parameter_look_ahead_for_busy_location_field;
129
static int hf_ansi_tcap_parameter_CIC_lsb;
130
static int hf_ansi_tcap_parameter_CIC_spare;
131
static int hf_ansi_tcap_parameter_CIC_msb;
132
static int hf_ansi_tcap_parameter_precedence_level_spare;
133
static int hf_ansi_tcap_parameter_precedence_level;
134
static int hf_ansi_tcap_parameter_precedence_id1;
135
static int hf_ansi_tcap_parameter_precedence_id2;
136
static int hf_ansi_tcap_parameter_precedence_id3;
137
static int hf_ansi_tcap_parameter_precedence_id4;
138
static int hf_ansi_tcap_parameter_precedence_mlpp_service_domain;
139
static int hf_ansi_tcap_reference_id_call_identify;
140
static int hf_ansi_tcap_reference_id_point_code;
141
static int hf_ansi_tcap_parameter_authorization;
142
static int hf_ansi_tcap_integrity_algid_id;
143
static int hf_ansi_tcap_integrity_algid;
144
static int hf_ansi_tcap_integrity_value_id;
145
static int hf_ansi_tcap_integrity_value;
146
static int hf_ansi_tcap_sequence_number;
147
static int hf_ansi_tcap_num_messages;
148
static int hf_ansi_tcap_display_text;
149
static int hf_ansi_tcap_key_exchange_algid_id;
150
static int hf_ansi_tcap_key_exchange_algid;
151
static int hf_ansi_tcap_key_exchange_value_id;
152
static int hf_ansi_tcap_key_exchange_value;
153
154
155
static int hf_ansi_tcap_national;                 /* T_national */
156
static int hf_ansi_tcap_private;                  /* T_private */
157
static int hf_ansi_tcap_national_01;              /* INTEGER_M128_127 */
158
static int hf_ansi_tcap_ec_private;               /* ANSIMAPPrivateErrorcode */
159
static int hf_ansi_tcap_unidirectional;           /* T_unidirectional */
160
static int hf_ansi_tcap_queryWithPerm;            /* T_queryWithPerm */
161
static int hf_ansi_tcap_queryWithoutPerm;         /* T_queryWithoutPerm */
162
static int hf_ansi_tcap_response;                 /* T_response */
163
static int hf_ansi_tcap_conversationWithPerm;     /* T_conversationWithPerm */
164
static int hf_ansi_tcap_conversationWithoutPerm;  /* T_conversationWithoutPerm */
165
static int hf_ansi_tcap_abort;                    /* T_abort */
166
static int hf_ansi_tcap_identifier;               /* TransactionID */
167
static int hf_ansi_tcap_dialoguePortion;          /* DialoguePortion */
168
static int hf_ansi_tcap_componentPortion;         /* ComponentSequence */
169
static int hf_ansi_tcap_dialogPortion;            /* DialoguePortion */
170
static int hf_ansi_tcap_causeInformation;         /* T_causeInformation */
171
static int hf_ansi_tcap_abortCause;               /* P_Abort_cause */
172
static int hf_ansi_tcap_abort_userInformation;    /* UserAbortInformation */
173
static int hf_ansi_tcap_version;                  /* ProtocolVersion */
174
static int hf_ansi_tcap_applicationContext;       /* T_applicationContext */
175
static int hf_ansi_tcap_integerApplicationId;     /* IntegerApplicationContext */
176
static int hf_ansi_tcap_objectApplicationId;      /* ObjectIDApplicationContext */
177
static int hf_ansi_tcap_userInformation;          /* UserInformation */
178
static int hf_ansi_tcap_securityContext;          /* T_securityContext */
179
static int hf_ansi_tcap_integerSecurityId;        /* INTEGER */
180
static int hf_ansi_tcap_objectSecurityId;         /* OBJECT_IDENTIFIER */
181
static int hf_ansi_tcap_confidentiality;          /* Confidentiality */
182
static int hf_ansi_tcap__untag_item;              /* EXTERNAL */
183
static int hf_ansi_tcap_confidentialityId;        /* T_confidentialityId */
184
static int hf_ansi_tcap_integerConfidentialityId;  /* INTEGER */
185
static int hf_ansi_tcap_objectConfidentialityId;  /* OBJECT_IDENTIFIER */
186
static int hf_ansi_tcap__untag_item_01;           /* ComponentPDU */
187
static int hf_ansi_tcap_invokeLast;               /* Invoke */
188
static int hf_ansi_tcap_returnResultLast;         /* ReturnResult */
189
static int hf_ansi_tcap_returnError;              /* ReturnError */
190
static int hf_ansi_tcap_reject;                   /* Reject */
191
static int hf_ansi_tcap_invokeNotLast;            /* Invoke */
192
static int hf_ansi_tcap_returnResultNotLast;      /* ReturnResult */
193
static int hf_ansi_tcap_componentIDs;             /* T_componentIDs */
194
static int hf_ansi_tcap_operationCode;            /* OperationCode */
195
static int hf_ansi_tcap_invoke_parameter;         /* T_invoke_parameter */
196
static int hf_ansi_tcap_componentID;              /* T_componentID */
197
static int hf_ansi_tcap_returnResult_parameter;   /* T_returnResult_parameter */
198
static int hf_ansi_tcap_componentID_01;           /* T_componentID_01 */
199
static int hf_ansi_tcap_errorCode;                /* ErrorCode */
200
static int hf_ansi_tcap_returnError_parameter;    /* T_returnError_parameter */
201
static int hf_ansi_tcap_componentID_02;           /* OCTET_STRING_SIZE_0_1 */
202
static int hf_ansi_tcap_rejectProblem;            /* Problem */
203
static int hf_ansi_tcap_reject_parameter;         /* T_reject_parameter */
204
static int hf_ansi_tcap_paramSequence;            /* T_paramSequence */
205
static int hf_ansi_tcap_paramSet;                 /* T_paramSet */
206
207
/* Initialize the subtree pointers */
208
static int ett_tcap;
209
static int ett_param;
210
static int ett_ansi_tcap_op_code_nat;
211
static int ett_ansi_tcap_stat_timestamp;
212
static int ett_ansi_tcap_duration;
213
214
static int ett_otid;
215
static int ett_dtid;
216
static int ett_ansi_tcap_stat;
217
218
static expert_field ei_ansi_tcap_dissector_not_implemented;
219
static expert_field ei_ansi_tcap_no_parameters;
220
221
static struct tcapsrt_info_t * gp_tcapsrt_info;
222
static bool tcap_subdissector_used=false;
223
224
static struct tcaphash_context_t * gp_tcap_context;
225
226
/* Note the high bit should be masked off when registering in this table (0x7fff)*/
227
static dissector_table_t  ansi_tcap_national_opcode_table; /* National Operation Codes */
228
229
static int ett_ansi_tcap_OperationCode;
230
static int ett_ansi_tcap_ErrorCode;
231
static int ett_ansi_tcap_PackageType;
232
static int ett_ansi_tcap_UniTransactionPDU;
233
static int ett_ansi_tcap_TransactionPDU;
234
static int ett_ansi_tcap_Abort;
235
static int ett_ansi_tcap_T_causeInformation;
236
static int ett_ansi_tcap_DialoguePortion_U;
237
static int ett_ansi_tcap_T_applicationContext;
238
static int ett_ansi_tcap_T_securityContext;
239
static int ett_ansi_tcap_UserInformation_U;
240
static int ett_ansi_tcap_Confidentiality;
241
static int ett_ansi_tcap_T_confidentialityId;
242
static int ett_ansi_tcap_SEQUENCE_OF_ComponentPDU;
243
static int ett_ansi_tcap_ComponentPDU;
244
static int ett_ansi_tcap_Invoke;
245
static int ett_ansi_tcap_ReturnResult;
246
static int ett_ansi_tcap_ReturnError;
247
static int ett_ansi_tcap_Reject;
248
static int ett_ansi_tcap_T_reject_parameter;
249
static int ett_ansi_tcap_T_paramSequence;
250
static int ett_ansi_tcap_T_paramSet;
251
252
#define MAX_SSN 254
253
254
static dissector_table_t ber_oid_dissector_table;
255
static const char * cur_oid;
256
static const char * tcapext_oid;
257
258
static dissector_handle_t ansi_map_handle;
259
static dissector_handle_t ain_handle;
260
261
static struct ansi_tcap_private_t ansi_tcap_private;
262
0
#define MAX_TID_STR_LEN 1024
263
264
2
static void ansi_tcap_ctx_init(struct ansi_tcap_private_t *a_tcap_ctx) {
265
2
  memset(a_tcap_ctx, '\0', sizeof(*a_tcap_ctx));
266
2
  a_tcap_ctx->signature = ANSI_TCAP_CTX_SIGNATURE;
267
2
  a_tcap_ctx->oid_is_present = false;
268
2
  a_tcap_ctx->TransactionID_str = NULL;
269
2
}
270
271
/* Tables for register*/
272
273
static const value_string ansi_tcap_national_op_code_family_vals[] = {
274
  {  0x0, "All Families" },
275
  {  0x1, "Parameter" },
276
  {  0x2, "Charging" },
277
  {  0x3, "Provide Instructions" },
278
  {  0x4, "Connection Control" },
279
  {  0x5, "Caller Interaction" },
280
  {  0x6, "Send Notification" },
281
  {  0x7, "Network Management" },
282
  {  0x8, "Procedural" },
283
  {  0x9, "Operation Control" },
284
  {  0xa, "Report Event" },
285
  /* Spare */
286
  {  0x7e, "Miscellaneous" },
287
  {  0x7f, "Reserved" },
288
  { 0, NULL }
289
};
290
291
static const value_string ansi_tcap_national_parameter_control_cause_indication[] = {
292
 { 1, "Vacant Code" },
293
 { 2, "Out-of-Band" },
294
 { 3, "Database Overload" },
295
 { 4, "Destination Mass Calling" },
296
 { 5, "Operation Support System Initiated" },
297
 { 0, NULL },
298
};
299
300
301
static const value_string ansi_tcap_national_parameter_duration_field[] = {
302
 { 0x0, "Not Used" },
303
 { 0x1, "1 Second" },
304
 { 0x2, "2 Seconds" },
305
 { 0x3, "4 Seconds" },
306
 { 0x4, "8 Seconds" },
307
 { 0x5, "16 Seconds" },
308
 { 0x6, "32 Seconds" },
309
 { 0x7, "64 Seconds" },
310
 { 0x8, "128 Seconds" },
311
 { 0x9, "256 Seconds" },
312
 { 0xa, "512 Seconds" },
313
 { 0xb, "1024 Seconds" },
314
 { 0xc, "2048 Seconds" },
315
 { 0, NULL },
316
};
317
318
static const value_string ansi_tcap_national_parameter_gap[] = {
319
 { 0x0, "Remove Gap Control" },
320
 { 0x1, "0.00 Second" },
321
 { 0x2, "0.10 Seconds" },
322
 { 0x3, "0.25 Seconds" },
323
 { 0x4, "0.50 Seconds" },
324
 { 0x5, "1.00 Seconds" },
325
 { 0x6, "2.00 Seconds" },
326
 { 0x7, "5.00 Seconds" },
327
 { 0x8, "10.00 Seconds" },
328
 { 0x9, "15.00 Seconds" },
329
 { 0xa, "30.00 Seconds" },
330
 { 0xb, "60.00 Seconds" },
331
 { 0xc, "120.00 Seconds" },
332
 { 0xd, "300.00 Seconds" },
333
 { 0xe, "600.00 Seconds" },
334
 { 0xf, "Stop All Calls" },
335
 { 0, NULL },
336
};
337
338
static const value_string ansi_tcap_national_parameter_digits_type_of_digits[] = {
339
 { 0x00, "Not Used" },
340
 { 0x01, "Called Party Number" },
341
 { 0x02, "Calling Party Number" },
342
 { 0x03, "Caller Interaction" },
343
 { 0x04, "Routing Number" },
344
 { 0x05, "Billing Number" },
345
 { 0x06, "Destination Number" },
346
 { 0x07, "LATA" },
347
 { 0x08, "Carrier" },
348
 { 0x09, "Last Calling Party" },
349
 { 0x0a, "Last Party Called" },
350
 { 0x0b, "Calling Directory Number" },
351
 { 0x0c, "VMSR Identifier" },
352
 { 0x0d, "Original Called Number" },
353
 { 0x0e, "Redirecting Number" },
354
 { 0x0f, "Connected Number" },
355
 { 0, NULL },
356
};
357
358
static const value_string ansi_tcap_national_parameter_digits_nature_of_numbers[] = {
359
 { 0x0, "National" },
360
 { 0x1, "International" },
361
 { 0x2, "No Presentation Restriction" },
362
 { 0x3, "Presentation Restriction" },
363
 { 0, NULL },
364
};
365
366
static const value_string ansi_tcap_national_parameter_digits_encoding[] = {
367
 { 0x0, "Not Used" },
368
 { 0x1, "BCD" },
369
 { 0x2, "IA5" },
370
 { 0, NULL },
371
};
372
373
static const value_string ansi_tcap_national_parameter_digits_number_planning[] = {
374
 { 0x0, "Unknown or Not applicable" },
375
 { 0x1, "ISDN Numbering" },
376
 { 0x2, "Telephony Numbering" },
377
 { 0x3, "Data Numbering" },
378
 { 0x4, "Telex Numbering" },
379
 { 0x5, "Maritime Mobile Numbering" },
380
 { 0x6, "Land Mobile Numbering" },
381
 { 0x7, "Private Numbering Plan" },
382
 { 0, NULL },
383
};
384
385
static const value_string ansi_tcap_national_parameter_digits_number_of_digits[] = {
386
 { 0x0, "Digit 0 or filler" },
387
 { 0x1, "Digit 1" },
388
 { 0x2, "Digit 2" },
389
 { 0x3, "Digit 3" },
390
 { 0x4, "Digit 4" },
391
 { 0x5, "Digit 5" },
392
 { 0x6, "Digit 6" },
393
 { 0x7, "Digit 7" },
394
 { 0x8, "Digit 8" },
395
 { 0x9, "Digit 9" },
396
 { 0xa, "Spare" },
397
 { 0xb, "Code 11" },
398
 { 0xc, "Code 12" },
399
 { 0xd, "*" },
400
 { 0xe, "#" },
401
 { 0xf, "ST" },
402
 { 0, NULL },
403
};
404
405
static const value_string ansi_tcap_national_parameter_digits[] = {
406
 { 0x0, "Remove Gap Control" },
407
 { 0x1, "0.00 Second" },
408
 { 0x2, "0.10 Seconds" },
409
 { 0x3, "0.25 Seconds" },
410
 { 0x4, "0.50 Seconds" },
411
 { 0x5, "1.00 Seconds" },
412
 { 0, NULL },
413
};
414
415
static const value_string ansi_tcap_national_parameter_spare[] = {
416
 { 0, "Service Not Supported" },
417
 { 1, "Active" },
418
 { 2, "Not Active" },
419
 { 3, "Spare" },
420
 { 0, NULL },
421
};
422
423
static const value_string ansi_tcap_national_parameter_dn_match[] = {
424
 { 0, "spare" },
425
 { 1, "No Match" },
426
 { 2, "Match" },
427
 { 3, "Spare" },
428
 { 0, NULL },
429
};
430
431
static const value_string ansi_tcap_national_parameter_dn_service_type[] = {
432
 { 0, "Individual" },
433
 { 1, "Coin" },
434
 { 2, "Series Completion" },
435
 { 3, "Multiline Hunt" },
436
 { 4, "Unassigned" },
437
 { 5, "PBX" },
438
 { 6, "Multiparty (3 or more)" },
439
 { 7, "Choke" },
440
 { 8, "Nonspecific" },
441
 { 9, "Temporarily Out-of-Service" },
442
 { 0, NULL },
443
};
444
445
static const value_string ansi_tcap_national_parameter_generic_name_type_of_name[] = {
446
 { 0, "Spare" },
447
 { 1, "Calling name" },
448
 { 2, "Original called name" },
449
 { 3, "Redirected name" },
450
 { 4, "Connected name" },
451
 { 5, "Spare" },
452
 { 6, "Spare" },
453
 { 7, "Spare" },
454
 { 0, NULL },
455
};
456
457
static const value_string ansi_tcap_national_parameter_generic_name_availability[] = {
458
 { 0, "Name available/unknown" },
459
 { 1, "Name not available" },
460
 { 0, NULL },
461
};
462
463
static const value_string ansi_tcap_national_parameter_generic_name_presentation_field[] = {
464
 { 0, "Presentation Allowed" },
465
 { 1, "Presentation Restricted" },
466
 { 2, "Blocking Toggle" },
467
 { 3, "No Indication" },
468
 { 0, NULL },
469
};
470
471
static const value_string ansi_tcap_national_parameter_look_ahead_for_busy_ack[] = {
472
 { 0, "Path Reservation Denied" },
473
 { 1, "Negative Acknowledgement" },
474
 { 2, "Positive Acknowledgement" },
475
 { 3, "Spare" },
476
 { 0, NULL },
477
};
478
479
static const value_string ansi_tcap_national_parameter_look_ahead_for_busy_location_field[] = {
480
 { 0, "User" },
481
 { 1, "Private Network Serving The Local User" },
482
 { 3, "Public Network Serving The Local User" },
483
 { 4, "Transit Network" },
484
 { 5, "Public Network Serving The Remote User" },
485
 { 6, "Private Network Serving The Remote User" },
486
 { 8, "Reserved" },
487
 { 9, "Internation Network" },
488
 { 0xa, "Network Beyond Interworking Point" },
489
 { 0, NULL },
490
};
491
492
static const value_string ansi_tcap_national_parameter_level[] = {
493
 { 0, "Flash Override" },
494
 { 1, "Flash" },
495
 { 3, "Immediate" },
496
 { 4, "Priority" },
497
 { 5, "Routine" },
498
 { 0, NULL },
499
};
500
501
/* Parameter list*/
502
503
0
#define TIMESTAMP                               0x17
504
0
#define ACG_INDICATORS                          0x81
505
0
#define STANDARD_ANNOUNCEMENT                   0x82
506
0
#define CUSTOMIZED_ANNOUNCEMENT                 0x83
507
0
#define DIGITS                                  0x84
508
0
#define STANDARD_USER_ERROR_CODE                0x85
509
#define PROBLEM_DATA                            0x86
510
0
#define SCCP_CALLING_PARTY_ADDRESS              0x87
511
0
#define TRANSACTION_ID                          0x88
512
0
#define PACKAGE_TYPE                            0x89
513
0
#define SERVICE_KEY                             0x8a
514
0
#define BUSY_IDLE_STATUS                        0x8b
515
0
#define CALL_FORWARDING_STATUS                  0x8c
516
0
#define ORIGINATING_RESTRICTIONS                0x8d
517
0
#define TERMINATING_RESTRICTIONS                0x8e
518
0
#define DN_TO_LINE_SERVICE_TYPE_MAPPING         0x8f
519
0
#define DURATION                                0x90
520
0
#define RETURNED_DATA                           0x91
521
0
#define BEARER_CAPABILITY_REQUESTED             0x92
522
0
#define BEARER_CAPABILITY_SUPPORTED             0x93
523
0
#define REFERENCE_ID                            0x94
524
0
#define BUSINESS_GROUP                          0x95
525
0
#define SIGNALLING_NETWORKS_IDENTIFIER          0x96
526
0
#define GENERIC_NAME                            0x97
527
0
#define MESSAGE_WAITING_INDICATOR_TYPE          0x98
528
0
#define LOOK_AHEAD_FOR_BUSY                     0x99
529
0
#define CIRCUIT_IDENTIFICATION_CODE             0x9a
530
0
#define PRECEDENCE_IDENTIFIER                   0x9b
531
0
#define CALL_REFERENCE_IDENTIFIER               0x9c
532
0
#define AUTHORIZATION                           0x9d
533
0
#define INTEGRITY                               0x9e
534
0
#define SEQUENCE_NUMBER                         0x9f1f
535
0
#define NUMBER_OF_MESSAGES                      0x7f20
536
0
#define DISPLAY_TEXT                            0x7f21
537
0
#define KEY_EXCHANGE                            0x7f22
538
0
#define SCCP_CALLED_PARTY_ADDRESS               0x7f23
539
540
541
static const value_string ansi_tcap_parameter_vals[] = {
542
 { TIMESTAMP, "Timestamp" },
543
 { ACG_INDICATORS, "ACG Indicators" },
544
 { STANDARD_ANNOUNCEMENT, "Standard Announcement" },
545
 { CUSTOMIZED_ANNOUNCEMENT, "Customized Announcement Format" },
546
 { DIGITS, "Digits" },
547
 { STANDARD_USER_ERROR_CODE, "Standard User Error Code" },
548
 { PROBLEM_DATA, "Problem Data" },
549
 { SCCP_CALLING_PARTY_ADDRESS, "SCCP Calling Party Address" },
550
 { TRANSACTION_ID, "Transaction ID" },
551
 { PACKAGE_TYPE, "Package Type Identifier" },
552
 { SERVICE_KEY, "Service Key Identifier" },
553
 { BUSY_IDLE_STATUS, "Busy Idle Status" },
554
 { CALL_FORWARDING_STATUS, "Call Forwarding Status" },
555
 { ORIGINATING_RESTRICTIONS, "Originating Restrictions" },
556
 { TERMINATING_RESTRICTIONS, "Terminating Restrictions" },
557
 { DN_TO_LINE_SERVICE_TYPE_MAPPING, "DN To Line Service Type Mapping" },
558
 { DURATION, "Duration" },
559
 { RETURNED_DATA, "Returned Data" },
560
 { BEARER_CAPABILITY_REQUESTED, "Bearer Capability Requested" },
561
 { BEARER_CAPABILITY_SUPPORTED, "Bearer Capability Supported" },
562
 { REFERENCE_ID, "Reference ID" },
563
 { BUSINESS_GROUP, "Business Group" },
564
 { SIGNALLING_NETWORKS_IDENTIFIER, "Signalling Networks Identifier" },
565
 { GENERIC_NAME, "Generic Name Identifier" },
566
 { MESSAGE_WAITING_INDICATOR_TYPE, "Message Waiting Indicator Type" },
567
 { LOOK_AHEAD_FOR_BUSY, "Look Ahead For Busy" },
568
 { CIRCUIT_IDENTIFICATION_CODE, "Circuit Identification Code" },
569
 { PRECEDENCE_IDENTIFIER, "Precedence Level" },
570
 { CALL_REFERENCE_IDENTIFIER, "Call Reference Identifier" },
571
 { AUTHORIZATION, "Authorization" },
572
 { INTEGRITY, "Integrity" },
573
 { SEQUENCE_NUMBER, "Sequence Number" },
574
 { 0xaa, "Service Key Identifier" },
575
 { NUMBER_OF_MESSAGES, "Number of Messages" },
576
 { DISPLAY_TEXT, "Display Text" },
577
 { KEY_EXCHANGE, "Key Exchange" },
578
 { SCCP_CALLED_PARTY_ADDRESS, "SCCP Called Party Address" },
579
 { 0, NULL },
580
};
581
582
static const value_string ansi_tcap_standard_announcements[] = {
583
 { 0, "Not Used" },
584
 { 1, "Out-of-Band" },
585
 { 2, "Vacant Code" },
586
 { 3, "Disconnected Number" },
587
 { 4, "Reorder (120 IPM)" },
588
 { 5, "Busy (60 IPM)" },
589
 { 6, "No Circuit Available" },
590
 { 7, "Reorder" },
591
 { 8, "Audible Ring" },
592
 { 0, NULL },
593
};
594
595
static const value_string ansi_tcap_standard_user_error_code[] = {
596
 { 0, "Call Abandoned" },
597
 { 1, "Improper Caller Response" },
598
 { 0, NULL },
599
};
600
601
static const value_string ansi_tcap_package_types[] = {
602
 { 0xE1, "Unidirectional" },
603
 { 0xE2, "Query with Permission" },
604
 { 0xE3, "Query without Permission" },
605
 { 0xE4, "Response" },
606
 { 0xE5, "Conversation with Permission" },
607
 { 0xE6, "Conversation without Permission" },
608
 { 0xE7, "Abort" },
609
 { 0, NULL },
610
};
611
612
static const value_string ansi_tcap_status_identifier[] = {
613
 { 0, "IDLE" },
614
 { 1, "BUSY" },
615
 { 0, NULL },
616
};
617
618
static const value_string ansi_tcap_originating_restrictions[] = {
619
 { 0, "Denied Origination" },
620
 { 1, "Fully Restricted Origination" },
621
 { 2, "Semi-Restricted Origination" },
622
 { 3, "Unrestricted Origination" },
623
 { 0, NULL },
624
};
625
626
627
static const value_string ansi_tcap_terminating_restrictions[] = {
628
 { 0, "Denied Termination" },
629
 { 1, "Fully Restricted Termination" },
630
 { 2, "Semi-Restricted Termination" },
631
 { 3, "Unrestricted Termination" },
632
 { 4, "Call Rejections Applies" },
633
 { 0, NULL },
634
};
635
636
static const value_string ansi_tcap_bearer_capabilities_supported[] = {
637
 { 1, "Not Supported" },
638
 { 2, "Supported" },
639
 { 3, "Not Authorized" },
640
 { 4, "Not Presently Available" },
641
 { 5, "Not Implemented" },
642
 { 0, NULL },
643
};
644
645
646
/* Transaction tracking */
647
/* Transaction table */
648
struct ansi_tcap_invokedata_t {
649
    int OperationCode;
650
      /*
651
         0 : national,
652
         1 : private
653
      */
654
    int32_t OperationCode_private;
655
    int32_t OperationCode_national;
656
};
657
658
static wmem_multimap_t *TransactionId_table;
659
660
// nibble swap function
661
0
static unsigned char swap_nibbles(unsigned char x){
662
0
    return (x & 0x0F)<<4 | (x & 0xF0)>>4;
663
0
}
664
665
static int parameter_type(proto_tree *tree, tvbuff_t *tvb, unsigned offset_parameter_type)
666
0
{
667
0
  proto_tree *subtree;
668
0
  proto_item *ti, *subitem;
669
0
  uint8_t param_value = tvb_get_uint8(tvb, offset_parameter_type);
670
0
  uint32_t parameter, parameter_length;
671
672
  /* A general parameter decoding looks like: Identifier -> Length -> Value
673
   There is another case statement to account for the 'F' bit */
674
0
  if ((param_value & 0x0F) == 0x0F)
675
0
  {
676
0
      ti = proto_tree_add_item_ret_uint(tree, hf_ansi_tcap_parameter, tvb, offset_parameter_type, 2, ENC_BIG_ENDIAN, &parameter);
677
0
      offset_parameter_type += 2;
678
0
  }
679
0
  else
680
0
  {
681
0
      ti = proto_tree_add_item_ret_uint(tree, hf_ansi_tcap_parameter, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN, &parameter);
682
0
      offset_parameter_type += 1;
683
0
  }
684
0
  offset_parameter_type += 1;
685
686
0
  proto_tree_add_item_ret_uint(tree, hf_ansi_tcap_parameter_length, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN, &parameter_length);
687
0
  offset_parameter_type += 1;
688
0
  if (parameter_length == 0)
689
0
  {
690
0
    proto_item_append_text(ti, " (This parameter is asking to be returned)");
691
0
    return offset_parameter_type;
692
0
  }
693
694
0
  switch (parameter)
695
0
  {
696
0
    case TIMESTAMP:
697
0
    {
698
0
      int year, month, day, hour, minute, difference, local_hour, local_minute;
699
0
      subtree = proto_tree_add_subtree(tree, tvb, offset_parameter_type, 8, ett_ansi_tcap_stat_timestamp, &subitem, "Timestamp");
700
701
0
      proto_tree_add_item_ret_int(subtree, hf_ansi_tcap_parameter_timestamp_year, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN, &year);
702
0
      offset_parameter_type += 1;
703
0
      proto_tree_add_item_ret_int(subtree, hf_ansi_tcap_parameter_timestamp_month, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN, &month);
704
0
      offset_parameter_type += 1;
705
0
      proto_tree_add_item_ret_int(subtree, hf_ansi_tcap_parameter_timestamp_day, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN, &day);
706
0
      offset_parameter_type += 1;
707
0
      proto_tree_add_item_ret_int(subtree, hf_ansi_tcap_parameter_timestamp_hour, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN, &hour);
708
0
      offset_parameter_type += 1;
709
0
      proto_tree_add_item_ret_int(subtree, hf_ansi_tcap_parameter_timestamp_minute, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN, &minute);
710
0
      offset_parameter_type += 1;
711
0
      proto_tree_add_item_ret_int(subtree, hf_ansi_tcap_parameter_timestamp_difference, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN, &difference);
712
0
      offset_parameter_type += 1;
713
0
      proto_tree_add_item_ret_int(subtree, hf_ansi_tcap_parameter_timestamp_local_hour, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN, &local_hour);
714
0
      offset_parameter_type += 1;
715
0
      proto_tree_add_item_ret_int(subtree, hf_ansi_tcap_parameter_timestamp_local_minute, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN, &local_minute);
716
0
      offset_parameter_type += 1;
717
0
      proto_item_append_text(subitem, " (%02d/%02d/%02d %02d:%02d, diff=%d, local time=%02d:%02d)", day, month, year, hour, minute, difference, local_hour, local_minute);
718
0
    }
719
0
    break;
720
0
    case ACG_INDICATORS:
721
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_acg_control_cause_indicator, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
722
0
      offset_parameter_type += 1;
723
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_acg_duration_field, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
724
0
      offset_parameter_type += 1;
725
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_acg_gap, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
726
0
      offset_parameter_type += 1;
727
0
    break;
728
0
    case STANDARD_ANNOUNCEMENT:
729
0
        proto_tree_add_item(tree, hf_ansi_tcap_parameter_standard_announcement, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
730
0
        offset_parameter_type += 1;
731
0
    break;
732
0
    case CUSTOMIZED_ANNOUNCEMENT:
733
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_customized_announcement, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
734
0
      offset_parameter_type += (1 + tvb_get_uint8(tvb, offset_parameter_type));
735
0
      break;
736
0
    case DIGITS:
737
0
    {
738
0
        uint32_t num_digits;
739
0
        proto_tree_add_item(tree, hf_ansi_tcap_parameter_digits_type_of_digits, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
740
0
        offset_parameter_type += 1;
741
0
        proto_tree_add_item(tree, hf_ansi_tcap_parameter_digits_nature_of_numbers, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
742
0
        offset_parameter_type += 1;
743
0
        proto_tree_add_item(tree, hf_ansi_tcap_parameter_digits_number_planning, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
744
0
        proto_tree_add_item(tree, hf_ansi_tcap_parameter_digits_encoding, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
745
0
        offset_parameter_type += 1;
746
0
        proto_tree_add_item_ret_uint(tree, hf_ansi_tcap_parameter_digits_number_of_digits, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN, &num_digits);
747
0
        offset_parameter_type += 1;
748
0
        for (uint32_t i = 0; i <= num_digits; i++)
749
0
        {
750
0
            proto_tree_add_item(tree, hf_ansi_tcap_parameter_digits, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
751
0
            offset_parameter_type += 1;
752
0
        }
753
0
    }
754
0
    break;
755
0
    case STANDARD_USER_ERROR_CODE:
756
0
        proto_tree_add_item(tree, hf_ansi_tcap_standard_user_error_code, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
757
0
        offset_parameter_type += 1;
758
0
    break;
759
0
    case SCCP_CALLING_PARTY_ADDRESS:
760
0
        proto_tree_add_item(tree, hf_ansi_tcap_sccp_calling_party_address, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
761
0
        offset_parameter_type += 1;
762
0
    break;
763
0
    case TRANSACTION_ID:
764
0
        proto_tree_add_item(tree, hf_ansi_tcap_transaction_id, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
765
0
        offset_parameter_type += 1;
766
0
    break;
767
0
    case PACKAGE_TYPE:
768
0
        proto_tree_add_item(tree, hf_ansi_tcap_package_type, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
769
0
        offset_parameter_type += 1;
770
0
    break;
771
    /* extra case to account for form bit (F bit)*/
772
0
    case SERVICE_KEY: case 0xaa:
773
0
    {
774
0
      proto_tree_add_item(tree, hf_ansi_tcap_digit_identifier, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
775
0
      offset_parameter_type +=1;
776
0
      proto_tree_add_item(tree, hf_ansi_tcap_digit_length, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
777
0
      offset_parameter_type +=1;
778
0
      proto_tree_add_item(tree, hf_ansi_tcap_destination_number_value, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
779
0
      offset_parameter_type +=1;
780
0
      proto_tree_add_item(tree, hf_ansi_tcap_presentation_restriction, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
781
0
      offset_parameter_type +=1;
782
0
      proto_tree_add_item(tree, hf_ansi_tcap_encoding_scheme, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
783
0
      offset_parameter_type +=1;
784
0
      proto_tree_add_item(tree, hf_ansi_tcap_number_of_digits, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
785
0
      uint8_t phoneNumber[5];
786
0
      for (int j = 0; j < 5; j++)
787
0
        phoneNumber[j] = swap_nibbles(tvb_get_uint8(tvb, offset_parameter_type+j));
788
789
0
      proto_tree_add_bytes_format_value(tree, hf_ansi_tcap_destination_phone_number, tvb, offset_parameter_type, 5, phoneNumber,
790
0
            "%x%x%x-%x%x", phoneNumber[0], phoneNumber[1], phoneNumber[2], phoneNumber[3], phoneNumber[4]);
791
0
      offset_parameter_type += 5;
792
793
0
      proto_tree_add_item(tree, hf_ansi_tcap_digit_identifier, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
794
0
      offset_parameter_type +=1;
795
0
      proto_tree_add_item(tree, hf_ansi_tcap_digit_length, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
796
0
      offset_parameter_type +=1;
797
0
      proto_tree_add_item(tree, hf_ansi_tcap_destination_number_value, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
798
0
      offset_parameter_type +=1;
799
0
      proto_tree_add_item(tree, hf_ansi_tcap_presentation_restriction, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
800
0
      offset_parameter_type +=1;
801
0
      proto_tree_add_item(tree, hf_ansi_tcap_encoding_scheme, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
802
0
      offset_parameter_type +=1;
803
0
      proto_tree_add_item(tree, hf_ansi_tcap_number_of_digits, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
804
0
      uint8_t phoneNumberReturn[5];
805
0
      for (int k = 0; k < 5; k++)
806
0
        phoneNumberReturn[k] = swap_nibbles(tvb_get_uint8(tvb, offset_parameter_type+k));
807
808
0
      proto_tree_add_bytes_format_value(tree, hf_ansi_tcap_return_phone_number, tvb, offset_parameter_type, 5, phoneNumberReturn,
809
0
          "%x%x%x-%x%x", phoneNumberReturn[0], phoneNumberReturn[1], phoneNumberReturn[2], phoneNumberReturn[3], phoneNumberReturn[4]);
810
0
      offset_parameter_type += 5;
811
0
    }
812
0
    break;
813
0
    case BUSY_IDLE_STATUS:
814
0
        proto_tree_add_item(tree, hf_ansi_tcap_busy_idle_status, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
815
0
        offset_parameter_type += 1;
816
0
    break;
817
0
    case CALL_FORWARDING_STATUS:
818
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_call_forwarding_on_busy, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
819
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_call_forwarding_dont_answer, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
820
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_selective_forwarding, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
821
0
      offset_parameter_type += 1;
822
0
    break;
823
0
    case ORIGINATING_RESTRICTIONS:
824
0
        proto_tree_add_item(tree, hf_ansi_tcap_originating_restrictions, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
825
0
        offset_parameter_type += 1;
826
0
    break;
827
0
    case TERMINATING_RESTRICTIONS:
828
0
        proto_tree_add_item(tree, hf_ansi_tcap_terminating_restrictions, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
829
0
        offset_parameter_type += 1;
830
0
    break;
831
0
    case DN_TO_LINE_SERVICE_TYPE_MAPPING:
832
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_dn_match, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
833
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_dn_line_service, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
834
0
      offset_parameter_type += 1;
835
0
      break;
836
0
    case DURATION:
837
0
    {
838
0
        int hour, minute, second;
839
0
        subtree = proto_tree_add_subtree(tree, tvb, offset_parameter_type, 3, ett_ansi_tcap_duration, &subitem, "Call duration");
840
841
0
        proto_tree_add_item_ret_int(subtree, hf_ansi_tcap_duration_hour, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN, &hour);
842
0
        offset_parameter_type += 1;
843
0
        proto_tree_add_item_ret_int(subtree, hf_ansi_tcap_duration_minute, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN, &minute);
844
0
        offset_parameter_type += 1;
845
0
        proto_tree_add_item_ret_int(subtree, hf_ansi_tcap_duration_second, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN, &second);
846
0
        offset_parameter_type += 1;
847
0
        proto_item_append_text(subitem, " (%02d:%02d:%02d)", hour, minute, second);
848
0
    }
849
0
    break;
850
0
    case RETURNED_DATA:
851
0
        proto_tree_add_item(tree, hf_ansi_tcap_returned_data, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
852
0
        offset_parameter_type += 1;
853
0
    break;
854
0
    case BEARER_CAPABILITY_REQUESTED:
855
    // TODO finishing out bearer capability, look into ansi_map
856
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_bearer_capability_requested1, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
857
0
      offset_parameter_type +=1;
858
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_bearer_capability_requested2, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
859
0
      offset_parameter_type +=1;
860
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_bearer_capability_requested2a, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
861
0
      offset_parameter_type +=1;
862
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_bearer_capability_requested2b, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
863
0
      offset_parameter_type +=1;
864
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_bearer_capability_requested3, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
865
0
      offset_parameter_type +=1;
866
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_bearer_capability_requested3a, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
867
0
      offset_parameter_type += 1;
868
0
      break;
869
0
    case BEARER_CAPABILITY_SUPPORTED:
870
0
        proto_tree_add_item(tree, hf_ansi_tcap_bearer_capability_supported, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
871
0
        offset_parameter_type += 1;
872
0
    break;
873
0
    case REFERENCE_ID:
874
0
        proto_tree_add_item(tree, hf_ansi_tcap_reference_id, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
875
0
        offset_parameter_type += 1;
876
0
    break;
877
0
    case BUSINESS_GROUP:
878
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_business_group_length_spare, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
879
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_business_group_length_AttSt, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
880
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_business_group_length_BGID, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
881
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_business_group_length_LP11, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
882
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_business_group_length_Party_Selector, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
883
0
      offset_parameter_type +=1;
884
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_business_group_id, tvb, offset_parameter_type, 3, ENC_BIG_ENDIAN);
885
0
      offset_parameter_type +=3;
886
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_business_group_subgroup_id, tvb, offset_parameter_type, 2, ENC_BIG_ENDIAN);
887
0
      offset_parameter_type +=2;
888
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_business_group_line_privileges, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
889
0
      offset_parameter_type +=1;
890
0
      break;
891
0
    case SIGNALLING_NETWORKS_IDENTIFIER:
892
0
        proto_tree_add_item(tree, hf_ansi_tcap_parameter_signalling_networks_id, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
893
0
        offset_parameter_type += (1+tvb_get_uint8(tvb, offset_parameter_type));
894
0
    break;
895
0
    case GENERIC_NAME:
896
0
    {
897
0
      uint8_t character_number = tvb_get_uint8(tvb, offset_parameter_type);
898
0
      offset_parameter_type +=1;
899
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_generic_name_type_name, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
900
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_generic_name_availability, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
901
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_generic_name_spare, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
902
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_generic_name_presentation, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
903
0
      offset_parameter_type += 1;
904
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_generic_name_characters, tvb, offset_parameter_type, character_number, ENC_ASCII);
905
0
      offset_parameter_type += character_number;
906
0
    }
907
0
    break;
908
0
    case MESSAGE_WAITING_INDICATOR_TYPE:
909
0
      proto_tree_add_uint(tree, hf_ansi_tcap_message_waiting_indicator_type, tvb, offset_parameter_type, 1, swap_nibbles(tvb_get_uint8(tvb, offset_parameter_type)));
910
0
      offset_parameter_type += 1;
911
0
    break;
912
0
    case LOOK_AHEAD_FOR_BUSY:
913
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_look_ahead_for_busy_ack_type, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
914
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_look_ahead_for_busy_spare, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
915
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_look_ahead_for_busy_location_field, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
916
0
      offset_parameter_type += 1;
917
0
    break;
918
0
    case CIRCUIT_IDENTIFICATION_CODE:
919
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_CIC_lsb, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
920
0
      offset_parameter_type +=1;
921
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_CIC_spare, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
922
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_CIC_msb, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
923
0
      offset_parameter_type += 1;
924
0
      break;
925
0
    case PRECEDENCE_IDENTIFIER:
926
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_precedence_level_spare, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
927
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_precedence_level, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
928
0
      offset_parameter_type += 1;
929
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_precedence_id1, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
930
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_precedence_id2, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
931
0
      offset_parameter_type += 1;
932
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_precedence_id3, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
933
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_precedence_id4, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
934
0
      offset_parameter_type += 1;
935
0
      proto_tree_add_item(tree, hf_ansi_tcap_parameter_precedence_mlpp_service_domain, tvb, offset_parameter_type, 3, ENC_NA);
936
0
      offset_parameter_type += 3;
937
0
    break;
938
0
    case CALL_REFERENCE_IDENTIFIER:
939
0
        proto_tree_add_item(tree, hf_ansi_tcap_reference_id_call_identify, tvb, offset_parameter_type, 3, ENC_NA);
940
0
        offset_parameter_type += 3;
941
0
        proto_tree_add_item(tree, hf_ansi_tcap_reference_id_point_code, tvb, offset_parameter_type, 3, ENC_NA);
942
0
        offset_parameter_type += 3;
943
0
    break;
944
0
    case AUTHORIZATION:
945
0
        proto_tree_add_item(tree, hf_ansi_tcap_parameter_authorization, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
946
0
        offset_parameter_type += 1;
947
0
    break;
948
0
    case INTEGRITY:
949
0
        proto_tree_add_item(tree, hf_ansi_tcap_integrity_algid_id, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
950
0
        offset_parameter_type += 1;
951
0
        proto_tree_add_item(tree, hf_ansi_tcap_integrity_algid, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
952
0
        offset_parameter_type += (1+ tvb_get_uint8(tvb, offset_parameter_type));
953
0
        proto_tree_add_item(tree, hf_ansi_tcap_integrity_value_id, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
954
0
        offset_parameter_type += 1;
955
0
        proto_tree_add_item(tree, hf_ansi_tcap_integrity_value, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
956
0
        offset_parameter_type += (1+ tvb_get_uint8(tvb, offset_parameter_type));
957
0
    break;
958
959
    /* 2 octet length parameters identifiers */
960
0
    case SEQUENCE_NUMBER:
961
0
      proto_tree_add_item(tree, hf_ansi_tcap_sequence_number, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
962
0
      offset_parameter_type += (1 + tvb_get_uint8(tvb, offset_parameter_type));
963
0
    break;
964
0
    case NUMBER_OF_MESSAGES:
965
0
        proto_tree_add_item(tree, hf_ansi_tcap_num_messages, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
966
0
        offset_parameter_type += (1 + tvb_get_uint8(tvb, offset_parameter_type));
967
0
        break;
968
0
      case DISPLAY_TEXT:
969
0
          proto_tree_add_item(tree, hf_ansi_tcap_display_text, tvb, offset_parameter_type, 1, ENC_ASCII|ENC_BIG_ENDIAN);
970
0
          offset_parameter_type += (1 + tvb_get_uint8(tvb, offset_parameter_type));
971
0
        break;
972
973
0
      case KEY_EXCHANGE:
974
0
          proto_tree_add_item(tree, hf_ansi_tcap_key_exchange_algid_id, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
975
0
          offset_parameter_type += 1;
976
0
          proto_tree_add_item(tree, hf_ansi_tcap_key_exchange_algid, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
977
0
          offset_parameter_type += (1 + tvb_get_uint8(tvb, offset_parameter_type));
978
0
          proto_tree_add_item(tree, hf_ansi_tcap_key_exchange_value_id, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
979
0
          offset_parameter_type += 1;
980
0
          proto_tree_add_item(tree, hf_ansi_tcap_key_exchange_value, tvb, offset_parameter_type, 1, ENC_BIG_ENDIAN);
981
0
          offset_parameter_type += (1 + tvb_get_uint8(tvb, offset_parameter_type));
982
0
        break;
983
984
0
      case SCCP_CALLED_PARTY_ADDRESS:
985
      // TODO Parameter found in T1.112
986
0
        break;
987
988
0
    default:
989
0
    break;
990
0
  }
991
0
  return offset_parameter_type;
992
0
}
993
994
/* Store Invoke information needed for the corresponding reply */
995
static void
996
0
save_invoke_data(packet_info *pinfo, proto_tree *tree _U_, tvbuff_t *tvb _U_){
997
0
  struct ansi_tcap_invokedata_t *ansi_tcap_saved_invokedata;
998
0
  char *src, *dst;
999
0
  char *buf;
1000
1001
0
  src = address_to_str(pinfo->pool, &(pinfo->src));
1002
0
  dst = address_to_str(pinfo->pool, &(pinfo->dst));
1003
1004
0
  if ((!pinfo->fd->visited)&&(ansi_tcap_private.TransactionID_str)){
1005
1006
          /* Only do this once XXX I hope it's the right thing to do */
1007
          /* The hash string needs to contain src and dest to distinguish different flows */
1008
0
          switch(ansi_tcap_response_matching_type){
1009
0
                        case ANSI_TCAP_TID_ONLY:
1010
0
                                buf = wmem_strdup(pinfo->pool, ansi_tcap_private.TransactionID_str);
1011
0
                                break;
1012
0
                        case ANSI_TCAP_TID_AND_SOURCE:
1013
0
                                buf = wmem_strdup_printf(pinfo->pool, "%s%s",ansi_tcap_private.TransactionID_str,src);
1014
0
                                break;
1015
0
                        case ANSI_TCAP_TID_SOURCE_AND_DEST:
1016
0
                        default:
1017
0
                                buf = wmem_strdup_printf(pinfo->pool, "%s%s%s",ansi_tcap_private.TransactionID_str,src,dst);
1018
0
                                break;
1019
0
                }
1020
1021
0
          ansi_tcap_saved_invokedata = wmem_new(wmem_file_scope(), struct ansi_tcap_invokedata_t);
1022
0
          ansi_tcap_saved_invokedata->OperationCode = ansi_tcap_private.d.OperationCode;
1023
0
          ansi_tcap_saved_invokedata->OperationCode_national = ansi_tcap_private.d.OperationCode_national;
1024
0
          ansi_tcap_saved_invokedata->OperationCode_private = ansi_tcap_private.d.OperationCode_private;
1025
1026
0
          wmem_multimap_insert32(TransactionId_table,
1027
0
                        wmem_strdup(wmem_file_scope(), buf),
1028
0
                        pinfo->num,
1029
0
                        ansi_tcap_saved_invokedata);
1030
          /*
1031
          ws_warning("Tcap Invoke Hash string %s",buf);
1032
          */
1033
0
  }
1034
0
}
1035
1036
static bool
1037
0
find_saved_invokedata(packet_info *pinfo, proto_tree *tree _U_, tvbuff_t *tvb _U_){
1038
0
  struct ansi_tcap_invokedata_t *ansi_tcap_saved_invokedata;
1039
0
  char *src, *dst;
1040
0
  char *buf;
1041
1042
0
  if (!ansi_tcap_private.TransactionID_str) {
1043
0
    return false;
1044
0
  }
1045
1046
0
  src = address_to_str(pinfo->pool, &(pinfo->src));
1047
0
  dst = address_to_str(pinfo->pool, &(pinfo->dst));
1048
1049
  /* The hash string needs to contain src and dest to distinguish different flows */
1050
0
  buf = (char *)wmem_alloc(pinfo->pool, MAX_TID_STR_LEN);
1051
0
  buf[0] = '\0';
1052
  /* Reverse order to invoke */
1053
0
  switch(ansi_tcap_response_matching_type){
1054
0
        case ANSI_TCAP_TID_ONLY:
1055
0
                snprintf(buf,MAX_TID_STR_LEN,"%s",ansi_tcap_private.TransactionID_str);
1056
0
                break;
1057
0
        case ANSI_TCAP_TID_AND_SOURCE:
1058
0
                snprintf(buf,MAX_TID_STR_LEN,"%s%s",ansi_tcap_private.TransactionID_str,dst);
1059
0
                break;
1060
0
        case ANSI_TCAP_TID_SOURCE_AND_DEST:
1061
0
        default:
1062
0
                snprintf(buf,MAX_TID_STR_LEN,"%s%s%s",ansi_tcap_private.TransactionID_str,dst,src);
1063
0
                break;
1064
0
  }
1065
1066
0
  ansi_tcap_saved_invokedata = (struct ansi_tcap_invokedata_t *)wmem_multimap_lookup32_le(TransactionId_table, buf, pinfo->num);
1067
0
  if(ansi_tcap_saved_invokedata){
1068
0
          ansi_tcap_private.d.OperationCode                      = ansi_tcap_saved_invokedata->OperationCode;
1069
0
          ansi_tcap_private.d.OperationCode_national = ansi_tcap_saved_invokedata->OperationCode_national;
1070
0
          ansi_tcap_private.d.OperationCode_private  = ansi_tcap_saved_invokedata->OperationCode_private;
1071
0
          return true;
1072
0
  }
1073
0
  return false;
1074
0
}
1075
1076
/* As currently ANSI MAP is the only possible sub dissector this function
1077
 *  must be improved to handle general cases.
1078
 *
1079
 *
1080
 *
1081
 * TODO:
1082
 * 1)Handle national codes
1083
 *     Design option
1084
 *     - Create a ansi.tcap.national dissector table and have dissectors for
1085
 *       national codes register there and let ansi tcap call them.
1086
 * 2)Handle Private codes properly
1087
 *     Design question
1088
 *     Unclear how to differentiate between different private "code sets".
1089
 *     Use SCCP SSN table as before? or a ansi.tcap.private dissector table?
1090
 *
1091
 */
1092
static bool
1093
0
find_tcap_subdissector(tvbuff_t *tvb, asn1_ctx_t *actx, proto_tree *tree){
1094
0
        proto_item *item;
1095
1096
        /* If "DialoguePortion objectApplicationId ObjectIDApplicationContext
1097
         * points to the subdissector this code can be used.
1098
         *
1099
        if(ansi_tcap_private.d.oid_is_present){
1100
                call_ber_oid_callback(ansi_tcap_private.objectApplicationId_oid, tvb, 0, actx-pinfo, tree, NULL);
1101
                return true;
1102
        }
1103
        */
1104
0
        if(ansi_tcap_private.d.pdu == 1){
1105
                /* Save Invoke data for this transaction */
1106
0
                save_invoke_data(actx->pinfo, tree, tvb);
1107
0
        }else{
1108
                /* Get saved data for this transaction */
1109
0
                if(find_saved_invokedata(actx->pinfo, tree, tvb)){
1110
0
                        if(ansi_tcap_private.d.OperationCode == 0){
1111
                                /* national */
1112
0
                                item = proto_tree_add_int(tree, hf_ansi_tcap_national, tvb, 0, 0, ansi_tcap_private.d.OperationCode_national);
1113
0
                        }else{
1114
0
                                item = proto_tree_add_int(tree, hf_ansi_tcap_private, tvb, 0, 0, ansi_tcap_private.d.OperationCode_private);
1115
0
                        }
1116
0
                        proto_item_set_generated(item);
1117
0
                        ansi_tcap_private.d.OperationCode_item = item;
1118
0
                }
1119
0
        }
1120
0
        if(ansi_tcap_private.d.OperationCode == 0){
1121
                /* national */
1122
0
                proto_item          *item2;
1123
0
                proto_tree          *tree2=NULL;
1124
0
                uint8_t family = (ansi_tcap_private.d.OperationCode_national & 0x7f00)>>8;
1125
0
                uint8_t specifier = (uint8_t)(ansi_tcap_private.d.OperationCode_national & 0xff);
1126
0
                if(!dissector_try_uint(ansi_tcap_national_opcode_table, ansi_tcap_private.d.OperationCode_national, tvb, actx->pinfo, actx->subtree.top_tree)){
1127
0
                        proto_tree_add_expert_format_remaining(tree, actx->pinfo, &ei_ansi_tcap_dissector_not_implemented, tvb, 0,
1128
0
                                        "Dissector for ANSI TCAP NATIONAL code:0x%x(Family %u, Specifier %u) \n"
1129
0
                                        "not implemented. Contact Wireshark developers if you want this supported(Spec required)",
1130
0
                                        ansi_tcap_private.d.OperationCode_national, family, specifier);
1131
0
                        tree2 = proto_tree_add_subtree(tree, tvb, 0, 1, ett_tcap, &item2, "Parameters");
1132
0
                        int offset_parameter = 0;
1133
0
                        proto_tree_add_item(tree2, hf_ansi_tcap_parameter_set_start, tvb, 0, 1, ENC_BIG_ENDIAN);
1134
1135
0
                        if(((tvb_get_uint8(tvb, 0)) & 0xff) == 0xf2) {
1136
0
                            offset_parameter += 1;
1137
0
                            int parameter_length = tvb_get_uint8(tvb, offset_parameter);
1138
0
                            proto_tree_add_item(tree2, hf_ansi_tcap_parameter_length, tvb, offset_parameter, 1, ENC_BIG_ENDIAN);
1139
0
                            offset_parameter += 1;
1140
0
                            while (offset_parameter <= parameter_length)
1141
0
                            {
1142
0
                                offset_parameter = parameter_type(tree2, tvb, offset_parameter);
1143
0
                                offset_parameter +=1;
1144
0
                            }
1145
0
                        }else{
1146
0
                            expert_add_info(actx->pinfo, item2, &ei_ansi_tcap_no_parameters);
1147
0
                        }
1148
1149
0
                        return false;
1150
0
                }
1151
0
                return true;
1152
0
        }else if(ansi_tcap_private.d.OperationCode == 1){
1153
                /* private */
1154
0
                if((ansi_tcap_private.d.OperationCode_private & 0xff00) == 0x0900){
1155
                    /* This is abit of a hack as it assumes the private codes with a "family" of 0x09 is ANSI MAP
1156
                    * See TODO above.
1157
                    * N.S0005-0 v 1.0 TCAP Formats and Procedures 5-16 Application Services
1158
                    * 6.3.2 Component Portion
1159
                    * The Operation Code is partitioned into an Operation Family followed by a
1160
                    * Specifier associated with each Operation Family member. For TIA/EIA-41 the
1161
                    * Operation Family is coded as decimal 9. Bit H of the Operation Family is always
1162
                    * coded as 0.
1163
                    */
1164
0
                    call_dissector_with_data(ansi_map_handle, tvb, actx->pinfo, actx->subtree.top_tree, &ansi_tcap_private);
1165
1166
0
                    return true;
1167
0
                } else if ((ansi_tcap_private.d.OperationCode_private & 0xf000) == 0x6000) {
1168
0
                    call_dissector_with_data(ain_handle, tvb, actx->pinfo, actx->subtree.top_tree, &ansi_tcap_private);
1169
0
                    return true;
1170
0
                }
1171
0
        }
1172
0
        proto_tree_add_expert_format_remaining(tree, actx->pinfo, &ei_ansi_tcap_dissector_not_implemented, tvb, 0,
1173
0
            "Dissector for ANSI TCAP PRIVATE code:%u not implemented.\n"
1174
0
            "Contact Wireshark developers if you want this supported(Spec required)",
1175
0
            ansi_tcap_private.d.OperationCode_private);
1176
0
        return false;
1177
0
}
1178
1179
/*--- Cyclic dependencies ---*/
1180
1181
/* ReturnResult/parameter -> ReturnResult/parameter */
1182
static unsigned dissect_ansi_tcap_T_returnResult_parameter(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
1183
1184
/* ReturnError/parameter -> ReturnError/parameter */
1185
static unsigned dissect_ansi_tcap_T_returnError_parameter(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
1186
1187
1188
1189
1190
static unsigned
1191
0
dissect_ansi_tcap_T_national(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1192
0
 proto_tree *subtree;
1193
0
 proto_item *spcifier_item;
1194
0
 int start_offset = offset;
1195
0
 uint8_t family;
1196
0
 uint8_t specifier;
1197
1198
0
    offset = dissect_ber_constrained_integer(implicit_tag, actx, tree, tvb, offset,
1199
0
                                                            -32768, 32767U, hf_index, (uint32_t*)&ansi_tcap_private.d.OperationCode_national);
1200
1201
  /* mask off the H bit */
1202
0
  ansi_tcap_private.d.OperationCode_national = (ansi_tcap_private.d.OperationCode_national&0x7fff);
1203
1204
0
  subtree = proto_item_add_subtree(actx->created_item, ett_ansi_tcap_op_code_nat);
1205
  /* Bit H is used to distinguish between Operations that require a reply and those that do not. A value of 1
1206
   * indicates that a reply is required; a value of 0 indicates that a reply is not required.
1207
   */
1208
0
  family = (ansi_tcap_private.d.OperationCode_national & 0x7f00)>>8;
1209
0
  specifier = (uint8_t)(ansi_tcap_private.d.OperationCode_national & 0xff);
1210
0
  proto_tree_add_item(subtree, hf_ansi_tcap_bit_h, tvb, start_offset, 2, ENC_BIG_ENDIAN);
1211
0
  proto_tree_add_item(subtree, hf_ansi_tcap_op_family, tvb, start_offset, 2, ENC_BIG_ENDIAN);
1212
0
  spcifier_item = proto_tree_add_item(subtree, hf_ansi_tcap_op_specifier, tvb, start_offset, 2, ENC_BIG_ENDIAN);
1213
1214
0
  switch(family){
1215
0
  case 0:
1216
    /* All Families ( Not used ) */
1217
0
    break;
1218
0
  case 1:
1219
    /* Parameter */
1220
0
    if(specifier== 1){
1221
0
      proto_item_append_text(spcifier_item, " Provide Value");
1222
0
    }else if (specifier== 2){
1223
0
      proto_item_append_text(spcifier_item, " Set Value");
1224
0
    }
1225
0
    break;
1226
0
  case 2:
1227
    /* Charging */
1228
0
    if (specifier== 1){
1229
0
      proto_item_append_text(spcifier_item, " Bill Call");
1230
0
    }
1231
0
    break;
1232
0
  case 3:
1233
    /* Provide Instructions */
1234
0
    if (specifier== 1){
1235
0
      proto_item_append_text(spcifier_item, " Start");
1236
0
    }else if (specifier== 2){
1237
0
      proto_item_append_text(spcifier_item, " Assist");
1238
0
    }
1239
0
    break;
1240
0
  case 4:
1241
    /* Connection Control */
1242
0
    if (specifier== 1){
1243
0
      proto_item_append_text(spcifier_item, " Connect");
1244
0
    }else if (specifier== 2){
1245
0
      proto_item_append_text(spcifier_item, " Temporary Connect");
1246
0
    }else if (specifier== 3){
1247
0
      proto_item_append_text(spcifier_item, " Disconnect");
1248
0
    }else if (specifier== 4){
1249
0
      proto_item_append_text(spcifier_item, " Forward Disconnect");
1250
0
    }
1251
0
    break;
1252
0
  default:
1253
0
    break;
1254
0
  }
1255
1256
1257
1258
0
  return offset;
1259
0
}
1260
1261
1262
1263
static unsigned
1264
0
dissect_ansi_tcap_T_private(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1265
0
  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
1266
0
                                                (uint32_t*)&ansi_tcap_private.d.OperationCode_private);
1267
1268
0
  return offset;
1269
0
}
1270
1271
1272
static const value_string ansi_tcap_OperationCode_vals[] = {
1273
  {  16, "national" },
1274
  {  17, "private" },
1275
  { 0, NULL }
1276
};
1277
1278
static const ber_choice_t OperationCode_choice[] = {
1279
  {  16, &hf_ansi_tcap_national  , BER_CLASS_PRI, 16, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_national },
1280
  {  17, &hf_ansi_tcap_private   , BER_CLASS_PRI, 17, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_private },
1281
  { 0, NULL, 0, 0, 0, NULL }
1282
};
1283
1284
static unsigned
1285
0
dissect_ansi_tcap_OperationCode(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1286
0
  offset = dissect_ber_choice(actx, tree, tvb, offset,
1287
0
                                 OperationCode_choice, hf_index, ett_ansi_tcap_OperationCode,
1288
0
                                 &ansi_tcap_private.d.OperationCode);
1289
1290
0
  ansi_tcap_private.d.OperationCode_item = actx->created_item;
1291
0
  return offset;
1292
0
}
1293
1294
1295
1296
static unsigned
1297
0
dissect_ansi_tcap_INTEGER_M128_127(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1298
0
  offset = dissect_ber_constrained_integer(implicit_tag, actx, tree, tvb, offset,
1299
0
                                                            -128, 127U, hf_index, NULL);
1300
1301
0
  return offset;
1302
0
}
1303
1304
1305
static const value_string ansi_tcap_ANSIMAPPrivateErrorcode_vals[] = {
1306
  { 129, "unrecognized-MIN" },
1307
  { 130, "unrecognized-ESN" },
1308
  { 131, "mINorHLR-Mismatch" },
1309
  { 132, "operation-Sequence-Problem" },
1310
  { 133, "resource-Shortage" },
1311
  { 134, "operation-Not-Supported" },
1312
  { 135, "trunk-Unavailable" },
1313
  { 136, "parameter-Error" },
1314
  { 137, "system-Failure" },
1315
  { 138, "unrecognized-Parameter-Value" },
1316
  { 139, "feature-Inactive" },
1317
  { 140, "missing-Parameter" },
1318
  { 0, NULL }
1319
};
1320
1321
1322
static unsigned
1323
0
dissect_ansi_tcap_ANSIMAPPrivateErrorcode(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1324
0
  offset = dissect_ber_constrained_integer(implicit_tag, actx, tree, tvb, offset,
1325
0
                                                            0U, 255U, hf_index, NULL);
1326
1327
0
  return offset;
1328
0
}
1329
1330
1331
static const value_string ansi_tcap_ErrorCode_vals[] = {
1332
  {  19, "national" },
1333
  {  20, "private" },
1334
  { 0, NULL }
1335
};
1336
1337
static const ber_choice_t ErrorCode_choice[] = {
1338
  {  19, &hf_ansi_tcap_national_01, BER_CLASS_PRI, 19, 0, dissect_ansi_tcap_INTEGER_M128_127 },
1339
  {  20, &hf_ansi_tcap_ec_private, BER_CLASS_PRI, 20, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_ANSIMAPPrivateErrorcode },
1340
  { 0, NULL, 0, 0, 0, NULL }
1341
};
1342
1343
static unsigned
1344
0
dissect_ansi_tcap_ErrorCode(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1345
0
  offset = dissect_ber_choice(actx, tree, tvb, offset,
1346
0
                                 ErrorCode_choice, hf_index, ett_ansi_tcap_ErrorCode,
1347
0
                                 NULL);
1348
1349
0
  return offset;
1350
0
}
1351
1352
1353
1354
static unsigned
1355
0
dissect_ansi_tcap_TransactionID_U(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1356
1357
0
tvbuff_t *next_tvb;
1358
0
uint8_t len;
1359
1360
0
  offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
1361
0
                                       &next_tvb);
1362
1363
1364
0
if(next_tvb) {
1365
0
  len = tvb_reported_length_remaining(next_tvb, 0);
1366
0
  if(len !=0){
1367
    /* 0 octets for the Unidirectional,
1368
     * 4 octets for Query, Response & Abort
1369
     * 8 octets for Conversation in the order Originating then Responding TID
1370
     *
1371
     * In order to match this it seems like we should only use the last 4 octets
1372
     * in the 8 octets case.
1373
     */
1374
0
    if (len > 4){
1375
0
      ansi_tcap_private.TransactionID_str = tvb_bytes_to_str(actx->pinfo->pool, next_tvb, 4,len-4);
1376
0
    }else{
1377
0
      ansi_tcap_private.TransactionID_str = tvb_bytes_to_str(actx->pinfo->pool, next_tvb, 0,len);
1378
0
    }
1379
0
  }
1380
0
  switch(len) {
1381
0
  case 1:
1382
0
    gp_tcapsrt_info->src_tid=tvb_get_uint8(next_tvb, 0);
1383
0
    break;
1384
0
  case 2:
1385
0
    gp_tcapsrt_info->src_tid=tvb_get_ntohs(next_tvb, 0);
1386
0
    break;
1387
0
  case 4:
1388
0
    gp_tcapsrt_info->src_tid=tvb_get_ntohl(next_tvb, 0);
1389
0
    break;
1390
0
  default:
1391
0
    gp_tcapsrt_info->src_tid=0;
1392
0
    break;
1393
0
  }
1394
0
}
1395
1396
1397
0
  return offset;
1398
0
}
1399
1400
1401
1402
static unsigned
1403
0
dissect_ansi_tcap_TransactionID(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1404
0
  offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1405
0
                                      hf_index, BER_CLASS_PRI, 7, true, dissect_ansi_tcap_TransactionID_U);
1406
1407
0
  return offset;
1408
0
}
1409
1410
1411
1412
static unsigned
1413
0
dissect_ansi_tcap_OCTET_STRING_SIZE_1(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1414
0
  offset = dissect_ber_constrained_octet_string(implicit_tag, actx, tree, tvb, offset,
1415
0
                                                   1, 1, hf_index, NULL);
1416
1417
0
  return offset;
1418
0
}
1419
1420
1421
1422
static unsigned
1423
0
dissect_ansi_tcap_ProtocolVersion(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1424
0
  offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1425
0
                                      hf_index, BER_CLASS_PRI, 26, true, dissect_ansi_tcap_OCTET_STRING_SIZE_1);
1426
1427
0
  return offset;
1428
0
}
1429
1430
1431
1432
static unsigned
1433
0
dissect_ansi_tcap_INTEGER(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1434
0
  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
1435
0
                                                NULL);
1436
1437
0
  return offset;
1438
0
}
1439
1440
1441
1442
static unsigned
1443
0
dissect_ansi_tcap_IntegerApplicationContext(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1444
0
  offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1445
0
                                      hf_index, BER_CLASS_PRI, 27, true, dissect_ansi_tcap_INTEGER);
1446
1447
0
  return offset;
1448
0
}
1449
1450
1451
1452
static unsigned
1453
0
dissect_ansi_tcap_OBJECT_IDENTIFIER(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1454
0
  offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
1455
1456
0
  return offset;
1457
0
}
1458
1459
1460
1461
static unsigned
1462
0
dissect_ansi_tcap_ObjectIDApplicationContext(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1463
1464
0
 static const char * oid_str;
1465
1466
0
   offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1467
0
                                      hf_index, BER_CLASS_PRI, 28, true, dissect_ansi_tcap_OBJECT_IDENTIFIER);
1468
1469
0
  ansi_tcap_private.objectApplicationId_oid= (const void*) oid_str;
1470
0
  ansi_tcap_private.oid_is_present=true;
1471
1472
1473
0
  return offset;
1474
0
}
1475
1476
1477
static const value_string ansi_tcap_T_applicationContext_vals[] = {
1478
  {  27, "integerApplicationId" },
1479
  {  28, "objectApplicationId" },
1480
  { 0, NULL }
1481
};
1482
1483
static const ber_choice_t T_applicationContext_choice[] = {
1484
  {  27, &hf_ansi_tcap_integerApplicationId, BER_CLASS_PRI, 27, BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_IntegerApplicationContext },
1485
  {  28, &hf_ansi_tcap_objectApplicationId, BER_CLASS_PRI, 28, BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_ObjectIDApplicationContext },
1486
  { 0, NULL, 0, 0, 0, NULL }
1487
};
1488
1489
static unsigned
1490
0
dissect_ansi_tcap_T_applicationContext(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1491
0
  offset = dissect_ber_choice(actx, tree, tvb, offset,
1492
0
                                 T_applicationContext_choice, hf_index, ett_ansi_tcap_T_applicationContext,
1493
0
                                 NULL);
1494
1495
0
  return offset;
1496
0
}
1497
1498
1499
1500
static unsigned
1501
0
dissect_ansi_tcap_EXTERNAL(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1502
0
  offset = dissect_ber_external_type(implicit_tag, tree, tvb, offset, actx, hf_index, NULL);
1503
1504
0
  return offset;
1505
0
}
1506
1507
1508
static const ber_sequence_t UserInformation_U_sequence_of[1] = {
1509
  { &hf_ansi_tcap__untag_item, BER_CLASS_UNI, BER_UNI_TAG_EXTERNAL, BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_EXTERNAL },
1510
};
1511
1512
static unsigned
1513
0
dissect_ansi_tcap_UserInformation_U(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1514
0
  offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
1515
0
                                      UserInformation_U_sequence_of, hf_index, ett_ansi_tcap_UserInformation_U);
1516
1517
0
  return offset;
1518
0
}
1519
1520
1521
1522
static unsigned
1523
0
dissect_ansi_tcap_UserInformation(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1524
0
  offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1525
0
                                      hf_index, BER_CLASS_PRI, 29, true, dissect_ansi_tcap_UserInformation_U);
1526
1527
0
  return offset;
1528
0
}
1529
1530
1531
static const value_string ansi_tcap_T_securityContext_vals[] = {
1532
  {   0, "integerSecurityId" },
1533
  {   1, "objectSecurityId" },
1534
  { 0, NULL }
1535
};
1536
1537
static const ber_choice_t T_securityContext_choice[] = {
1538
  {   0, &hf_ansi_tcap_integerSecurityId, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_INTEGER },
1539
  {   1, &hf_ansi_tcap_objectSecurityId, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_OBJECT_IDENTIFIER },
1540
  { 0, NULL, 0, 0, 0, NULL }
1541
};
1542
1543
static unsigned
1544
0
dissect_ansi_tcap_T_securityContext(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1545
0
  offset = dissect_ber_choice(actx, tree, tvb, offset,
1546
0
                                 T_securityContext_choice, hf_index, ett_ansi_tcap_T_securityContext,
1547
0
                                 NULL);
1548
1549
0
  return offset;
1550
0
}
1551
1552
1553
static const value_string ansi_tcap_T_confidentialityId_vals[] = {
1554
  {   0, "integerConfidentialityId" },
1555
  {   1, "objectConfidentialityId" },
1556
  { 0, NULL }
1557
};
1558
1559
static const ber_choice_t T_confidentialityId_choice[] = {
1560
  {   0, &hf_ansi_tcap_integerConfidentialityId, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_INTEGER },
1561
  {   1, &hf_ansi_tcap_objectConfidentialityId, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_OBJECT_IDENTIFIER },
1562
  { 0, NULL, 0, 0, 0, NULL }
1563
};
1564
1565
static unsigned
1566
0
dissect_ansi_tcap_T_confidentialityId(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1567
0
  offset = dissect_ber_choice(actx, tree, tvb, offset,
1568
0
                                 T_confidentialityId_choice, hf_index, ett_ansi_tcap_T_confidentialityId,
1569
0
                                 NULL);
1570
1571
0
  return offset;
1572
0
}
1573
1574
1575
static const ber_sequence_t Confidentiality_sequence[] = {
1576
  { &hf_ansi_tcap_confidentialityId, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ansi_tcap_T_confidentialityId },
1577
  { NULL, 0, 0, 0, NULL }
1578
};
1579
1580
static unsigned
1581
0
dissect_ansi_tcap_Confidentiality(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1582
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1583
0
                                   Confidentiality_sequence, hf_index, ett_ansi_tcap_Confidentiality);
1584
1585
0
  return offset;
1586
0
}
1587
1588
1589
static const ber_sequence_t DialoguePortion_U_sequence[] = {
1590
  { &hf_ansi_tcap_version   , BER_CLASS_PRI, 26, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_ProtocolVersion },
1591
  { &hf_ansi_tcap_applicationContext, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ansi_tcap_T_applicationContext },
1592
  { &hf_ansi_tcap_userInformation, BER_CLASS_PRI, 29, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_UserInformation },
1593
  { &hf_ansi_tcap_securityContext, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ansi_tcap_T_securityContext },
1594
  { &hf_ansi_tcap_confidentiality, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_ansi_tcap_Confidentiality },
1595
  { NULL, 0, 0, 0, NULL }
1596
};
1597
1598
static unsigned
1599
0
dissect_ansi_tcap_DialoguePortion_U(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1600
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1601
0
                                   DialoguePortion_U_sequence, hf_index, ett_ansi_tcap_DialoguePortion_U);
1602
1603
0
  return offset;
1604
0
}
1605
1606
1607
1608
static unsigned
1609
0
dissect_ansi_tcap_DialoguePortion(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1610
0
  offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1611
0
                                      hf_index, BER_CLASS_PRI, 25, true, dissect_ansi_tcap_DialoguePortion_U);
1612
1613
0
  return offset;
1614
0
}
1615
1616
1617
1618
static unsigned
1619
0
dissect_ansi_tcap_T_componentIDs(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1620
0
  offset = dissect_ber_constrained_octet_string(implicit_tag, actx, tree, tvb, offset,
1621
0
                                                   0, 2, hf_index, NULL);
1622
1623
0
  return offset;
1624
0
}
1625
1626
1627
1628
static unsigned
1629
0
dissect_ansi_tcap_T_invoke_parameter(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1630
1631
0
  if(find_tcap_subdissector(tvb, actx, tree))
1632
0
    offset = tvb_reported_length(tvb);
1633
1634
1635
1636
0
  return offset;
1637
0
}
1638
1639
1640
static const ber_sequence_t Invoke_sequence[] = {
1641
  { &hf_ansi_tcap_componentIDs, BER_CLASS_PRI, 15, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_componentIDs },
1642
  { &hf_ansi_tcap_operationCode, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ansi_tcap_OperationCode },
1643
  { &hf_ansi_tcap_invoke_parameter, BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_T_invoke_parameter },
1644
  { NULL, 0, 0, 0, NULL }
1645
};
1646
1647
static unsigned
1648
0
dissect_ansi_tcap_Invoke(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1649
0
  ansi_tcap_private.d.pdu = 1;
1650
1651
1652
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1653
0
                                   Invoke_sequence, hf_index, ett_ansi_tcap_Invoke);
1654
1655
0
  return offset;
1656
0
}
1657
1658
1659
1660
static unsigned
1661
0
dissect_ansi_tcap_T_componentID(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1662
0
  offset = dissect_ber_constrained_octet_string(implicit_tag, actx, tree, tvb, offset,
1663
0
                                                   1, 1, hf_index, NULL);
1664
1665
0
  return offset;
1666
0
}
1667
1668
1669
1670
static unsigned
1671
0
dissect_ansi_tcap_T_returnResult_parameter(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1672
  // ReturnResult/parameter -> ReturnResult/parameter
1673
0
  increment_dissection_depth_by_n(actx->pinfo, 1);
1674
0
  if(find_tcap_subdissector(tvb, actx, tree))
1675
0
    offset = tvb_reported_length(tvb);
1676
1677
1678
0
  decrement_dissection_depth_by_n(actx->pinfo, 1);
1679
0
  return offset;
1680
0
}
1681
1682
1683
static const ber_sequence_t ReturnResult_sequence[] = {
1684
  { &hf_ansi_tcap_componentID, BER_CLASS_PRI, 15, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_componentID },
1685
  { &hf_ansi_tcap_returnResult_parameter, BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_T_returnResult_parameter },
1686
  { NULL, 0, 0, 0, NULL }
1687
};
1688
1689
static unsigned
1690
0
dissect_ansi_tcap_ReturnResult(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1691
0
  ansi_tcap_private.d.pdu = 2;
1692
1693
1694
1695
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1696
0
                                   ReturnResult_sequence, hf_index, ett_ansi_tcap_ReturnResult);
1697
1698
0
  return offset;
1699
0
}
1700
1701
1702
1703
static unsigned
1704
0
dissect_ansi_tcap_T_componentID_01(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1705
0
  offset = dissect_ber_constrained_octet_string(implicit_tag, actx, tree, tvb, offset,
1706
0
                                                   1, 1, hf_index, NULL);
1707
1708
0
  return offset;
1709
0
}
1710
1711
1712
1713
static unsigned
1714
0
dissect_ansi_tcap_T_returnError_parameter(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1715
  // ReturnError/parameter -> ReturnError/parameter
1716
0
  increment_dissection_depth_by_n(actx->pinfo, 1);
1717
0
  if(find_tcap_subdissector(tvb, actx, tree))
1718
0
    offset = tvb_reported_length(tvb);
1719
1720
1721
0
  decrement_dissection_depth_by_n(actx->pinfo, 1);
1722
0
  return offset;
1723
0
}
1724
1725
1726
static const ber_sequence_t ReturnError_sequence[] = {
1727
  { &hf_ansi_tcap_componentID_01, BER_CLASS_PRI, 15, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_componentID_01 },
1728
  { &hf_ansi_tcap_errorCode , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ansi_tcap_ErrorCode },
1729
  { &hf_ansi_tcap_returnError_parameter, BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_T_returnError_parameter },
1730
  { NULL, 0, 0, 0, NULL }
1731
};
1732
1733
static unsigned
1734
0
dissect_ansi_tcap_ReturnError(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1735
0
  ansi_tcap_private.d.pdu = 3;
1736
1737
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1738
0
                                   ReturnError_sequence, hf_index, ett_ansi_tcap_ReturnError);
1739
1740
0
  return offset;
1741
0
}
1742
1743
1744
1745
static unsigned
1746
0
dissect_ansi_tcap_OCTET_STRING_SIZE_0_1(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1747
0
  offset = dissect_ber_constrained_octet_string(implicit_tag, actx, tree, tvb, offset,
1748
0
                                                   0, 1, hf_index, NULL);
1749
1750
0
  return offset;
1751
0
}
1752
1753
1754
static const value_string ansi_tcap_Problem_vals[] = {
1755
  { 257, "general-unrecognisedComponentType" },
1756
  { 258, "general-incorrectComponentPortion" },
1757
  { 259, "general-badlyStructuredCompPortion" },
1758
  { 260, "general-incorrectComponentCoding" },
1759
  { 513, "invoke-duplicateInvocation" },
1760
  { 514, "invoke-unrecognisedOperation" },
1761
  { 515, "invoke-incorrectParameter" },
1762
  { 516, "invoke-unrecognisedCorrelationID" },
1763
  { 769, "returnResult-unrecognisedCorrelationID" },
1764
  { 770, "returnResult-unexpectedReturnResult" },
1765
  { 771, "returnResult-incorrectParameter" },
1766
  { 1025, "returnError-unrecognisedCorrelationID" },
1767
  { 1026, "returnError-unexpectedReturnError" },
1768
  { 1027, "returnError-unrecognisedError" },
1769
  { 1028, "returnError-unexpectedError" },
1770
  { 1029, "returnError-incorrectParameter" },
1771
  { 1281, "transaction-unrecognizedPackageType" },
1772
  { 1282, "transaction-incorrectTransPortion" },
1773
  { 1283, "transaction-badlyStructuredTransPortion" },
1774
  { 1284, "transaction-unassignedRespondingTransID" },
1775
  { 1285, "transaction-permissionToReleaseProblem" },
1776
  { 1286, "transaction-resourceUnavailable" },
1777
  { 0, NULL }
1778
};
1779
1780
1781
static unsigned
1782
0
dissect_ansi_tcap_Problem(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1783
0
  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
1784
0
                                                NULL);
1785
1786
0
  return offset;
1787
0
}
1788
1789
1790
static const ber_sequence_t T_paramSequence_sequence[] = {
1791
  { NULL, 0, 0, 0, NULL }
1792
};
1793
1794
static unsigned
1795
0
dissect_ansi_tcap_T_paramSequence(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1796
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1797
0
                                   T_paramSequence_sequence, hf_index, ett_ansi_tcap_T_paramSequence);
1798
1799
0
  return offset;
1800
0
}
1801
1802
1803
static const ber_sequence_t T_paramSet_set[] = {
1804
  { NULL, 0, 0, 0, NULL }
1805
};
1806
1807
static unsigned
1808
0
dissect_ansi_tcap_T_paramSet(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1809
0
  offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
1810
0
                              T_paramSet_set, hf_index, ett_ansi_tcap_T_paramSet);
1811
1812
0
  return offset;
1813
0
}
1814
1815
1816
static const value_string ansi_tcap_T_reject_parameter_vals[] = {
1817
  {  16, "paramSequence" },
1818
  {  18, "paramSet" },
1819
  { 0, NULL }
1820
};
1821
1822
static const ber_choice_t T_reject_parameter_choice[] = {
1823
  {  16, &hf_ansi_tcap_paramSequence, BER_CLASS_PRI, 16, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_paramSequence },
1824
  {  18, &hf_ansi_tcap_paramSet  , BER_CLASS_PRI, 18, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_paramSet },
1825
  { 0, NULL, 0, 0, 0, NULL }
1826
};
1827
1828
static unsigned
1829
0
dissect_ansi_tcap_T_reject_parameter(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1830
0
  offset = dissect_ber_choice(actx, tree, tvb, offset,
1831
0
                                 T_reject_parameter_choice, hf_index, ett_ansi_tcap_T_reject_parameter,
1832
0
                                 NULL);
1833
1834
0
  return offset;
1835
0
}
1836
1837
1838
static const ber_sequence_t Reject_sequence[] = {
1839
  { &hf_ansi_tcap_componentID_02, BER_CLASS_PRI, 15, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_OCTET_STRING_SIZE_0_1 },
1840
  { &hf_ansi_tcap_rejectProblem, BER_CLASS_PRI, 21, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_Problem },
1841
  { &hf_ansi_tcap_reject_parameter, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ansi_tcap_T_reject_parameter },
1842
  { NULL, 0, 0, 0, NULL }
1843
};
1844
1845
static unsigned
1846
0
dissect_ansi_tcap_Reject(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1847
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1848
0
                                   Reject_sequence, hf_index, ett_ansi_tcap_Reject);
1849
1850
0
  return offset;
1851
0
}
1852
1853
1854
static const value_string ansi_tcap_ComponentPDU_vals[] = {
1855
  {   9, "invokeLast" },
1856
  {  10, "returnResultLast" },
1857
  {  11, "returnError" },
1858
  {  12, "reject" },
1859
  {  13, "invokeNotLast" },
1860
  {  14, "returnResultNotLast" },
1861
  { 0, NULL }
1862
};
1863
1864
static const ber_choice_t ComponentPDU_choice[] = {
1865
  {   9, &hf_ansi_tcap_invokeLast, BER_CLASS_PRI, 9, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_Invoke },
1866
  {  10, &hf_ansi_tcap_returnResultLast, BER_CLASS_PRI, 10, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_ReturnResult },
1867
  {  11, &hf_ansi_tcap_returnError, BER_CLASS_PRI, 11, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_ReturnError },
1868
  {  12, &hf_ansi_tcap_reject    , BER_CLASS_PRI, 12, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_Reject },
1869
  {  13, &hf_ansi_tcap_invokeNotLast, BER_CLASS_PRI, 13, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_Invoke },
1870
  {  14, &hf_ansi_tcap_returnResultNotLast, BER_CLASS_PRI, 14, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_ReturnResult },
1871
  { 0, NULL, 0, 0, 0, NULL }
1872
};
1873
1874
static unsigned
1875
0
dissect_ansi_tcap_ComponentPDU(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1876
0
  offset = dissect_ber_choice(actx, tree, tvb, offset,
1877
0
                                 ComponentPDU_choice, hf_index, ett_ansi_tcap_ComponentPDU,
1878
0
                                 NULL);
1879
1880
0
  return offset;
1881
0
}
1882
1883
1884
static const ber_sequence_t SEQUENCE_OF_ComponentPDU_sequence_of[1] = {
1885
  { &hf_ansi_tcap__untag_item_01, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ansi_tcap_ComponentPDU },
1886
};
1887
1888
static unsigned
1889
0
dissect_ansi_tcap_SEQUENCE_OF_ComponentPDU(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1890
0
  offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
1891
0
                                      SEQUENCE_OF_ComponentPDU_sequence_of, hf_index, ett_ansi_tcap_SEQUENCE_OF_ComponentPDU);
1892
1893
0
  return offset;
1894
0
}
1895
1896
1897
1898
static unsigned
1899
0
dissect_ansi_tcap_ComponentSequence(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1900
0
  offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1901
0
                                      hf_index, BER_CLASS_PRI, 8, true, dissect_ansi_tcap_SEQUENCE_OF_ComponentPDU);
1902
1903
0
  return offset;
1904
0
}
1905
1906
1907
static const ber_sequence_t UniTransactionPDU_sequence[] = {
1908
  { &hf_ansi_tcap_identifier, BER_CLASS_PRI, 7, BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_TransactionID },
1909
  { &hf_ansi_tcap_dialoguePortion, BER_CLASS_PRI, 25, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_DialoguePortion },
1910
  { &hf_ansi_tcap_componentPortion, BER_CLASS_PRI, 8, BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_ComponentSequence },
1911
  { NULL, 0, 0, 0, NULL }
1912
};
1913
1914
static unsigned
1915
0
dissect_ansi_tcap_UniTransactionPDU(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1916
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1917
0
                                   UniTransactionPDU_sequence, hf_index, ett_ansi_tcap_UniTransactionPDU);
1918
1919
0
  return offset;
1920
0
}
1921
1922
1923
1924
static unsigned
1925
0
dissect_ansi_tcap_T_unidirectional(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1926
0
gp_tcapsrt_info->ope=TC_ANSI_ALL;
1927
0
col_set_str(actx->pinfo->cinfo, COL_INFO, "unidirectional ");
1928
1929
0
  offset = dissect_ansi_tcap_UniTransactionPDU(implicit_tag, tvb, offset, actx, tree, hf_index);
1930
1931
0
  return offset;
1932
0
}
1933
1934
1935
static const ber_sequence_t TransactionPDU_sequence[] = {
1936
  { &hf_ansi_tcap_identifier, BER_CLASS_PRI, 7, BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_TransactionID },
1937
  { &hf_ansi_tcap_dialoguePortion, BER_CLASS_PRI, 25, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_DialoguePortion },
1938
  { &hf_ansi_tcap_componentPortion, BER_CLASS_PRI, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_ComponentSequence },
1939
  { NULL, 0, 0, 0, NULL }
1940
};
1941
1942
static unsigned
1943
1
dissect_ansi_tcap_TransactionPDU(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1944
1
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1945
1
                                   TransactionPDU_sequence, hf_index, ett_ansi_tcap_TransactionPDU);
1946
1947
1
  return offset;
1948
1
}
1949
1950
1951
1952
static unsigned
1953
1
dissect_ansi_tcap_T_queryWithPerm(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1954
1
gp_tcapsrt_info->ope=TC_ANSI_ALL;
1955
1
col_set_str(actx->pinfo->cinfo, COL_INFO, "queryWithPerm ");
1956
1957
1
  offset = dissect_ansi_tcap_TransactionPDU(implicit_tag, tvb, offset, actx, tree, hf_index);
1958
1959
1
  return offset;
1960
1
}
1961
1962
1963
1964
static unsigned
1965
0
dissect_ansi_tcap_T_queryWithoutPerm(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1966
0
gp_tcapsrt_info->ope=TC_ANSI_ALL;
1967
0
col_set_str(actx->pinfo->cinfo, COL_INFO, "queryWithoutPerm ");
1968
1969
0
  offset = dissect_ansi_tcap_TransactionPDU(implicit_tag, tvb, offset, actx, tree, hf_index);
1970
1971
0
  return offset;
1972
0
}
1973
1974
1975
1976
static unsigned
1977
0
dissect_ansi_tcap_T_response(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1978
0
gp_tcapsrt_info->ope=TC_ANSI_ALL;
1979
0
col_set_str(actx->pinfo->cinfo, COL_INFO, "response ");
1980
1981
0
  offset = dissect_ansi_tcap_TransactionPDU(implicit_tag, tvb, offset, actx, tree, hf_index);
1982
1983
0
  return offset;
1984
0
}
1985
1986
1987
1988
static unsigned
1989
0
dissect_ansi_tcap_T_conversationWithPerm(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1990
0
gp_tcapsrt_info->ope=TC_ANSI_ALL;
1991
0
col_set_str(actx->pinfo->cinfo, COL_INFO, "conversationWithPerm ");
1992
1993
0
  offset = dissect_ansi_tcap_TransactionPDU(implicit_tag, tvb, offset, actx, tree, hf_index);
1994
1995
0
  return offset;
1996
0
}
1997
1998
1999
2000
static unsigned
2001
0
dissect_ansi_tcap_T_conversationWithoutPerm(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2002
0
gp_tcapsrt_info->ope=TC_ANSI_ALL;
2003
0
col_set_str(actx->pinfo->cinfo, COL_INFO, "conversationWithoutPerm ");
2004
2005
0
  offset = dissect_ansi_tcap_TransactionPDU(implicit_tag, tvb, offset, actx, tree, hf_index);
2006
2007
0
  return offset;
2008
0
}
2009
2010
2011
static const value_string ansi_tcap_P_Abort_cause_U_vals[] = {
2012
  {   1, "unrecognizedPackageType" },
2013
  {   2, "incorrectTransactionPortion" },
2014
  {   3, "badlyStructuredTransactionPortion" },
2015
  {   4, "unassignedRespondingTransactionID" },
2016
  {   5, "permissionToReleaseProblem" },
2017
  {   6, "resourceUnavailable" },
2018
  {   7, "unrecognizedDialoguePortionID" },
2019
  {   8, "badlyStructuredDialoguePortion" },
2020
  {   9, "missingDialoguePortion" },
2021
  {  10, "inconsistentDialoguePortion" },
2022
  { 0, NULL }
2023
};
2024
2025
2026
static unsigned
2027
0
dissect_ansi_tcap_P_Abort_cause_U(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2028
0
  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
2029
0
                                                NULL);
2030
2031
0
  return offset;
2032
0
}
2033
2034
2035
2036
static unsigned
2037
0
dissect_ansi_tcap_P_Abort_cause(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2038
0
  offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
2039
0
                                      hf_index, BER_CLASS_PRI, 23, true, dissect_ansi_tcap_P_Abort_cause_U);
2040
2041
0
  return offset;
2042
0
}
2043
2044
2045
2046
static unsigned
2047
0
dissect_ansi_tcap_UserAbortInformation(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2048
0
  offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
2049
0
                                      hf_index, BER_CLASS_PRI, 24, false, dissect_ansi_tcap_EXTERNAL);
2050
2051
0
  return offset;
2052
0
}
2053
2054
2055
static const value_string ansi_tcap_T_causeInformation_vals[] = {
2056
  {  23, "abortCause" },
2057
  {  24, "userInformation" },
2058
  { 0, NULL }
2059
};
2060
2061
static const ber_choice_t T_causeInformation_choice[] = {
2062
  {  23, &hf_ansi_tcap_abortCause, BER_CLASS_PRI, 23, BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_P_Abort_cause },
2063
  {  24, &hf_ansi_tcap_abort_userInformation, BER_CLASS_PRI, 24, BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_UserAbortInformation },
2064
  { 0, NULL, 0, 0, 0, NULL }
2065
};
2066
2067
static unsigned
2068
0
dissect_ansi_tcap_T_causeInformation(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2069
0
  offset = dissect_ber_choice(actx, tree, tvb, offset,
2070
0
                                 T_causeInformation_choice, hf_index, ett_ansi_tcap_T_causeInformation,
2071
0
                                 NULL);
2072
2073
0
  return offset;
2074
0
}
2075
2076
2077
static const ber_sequence_t Abort_sequence[] = {
2078
  { &hf_ansi_tcap_identifier, BER_CLASS_PRI, 7, BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_TransactionID },
2079
  { &hf_ansi_tcap_dialogPortion, BER_CLASS_PRI, 25, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_DialoguePortion },
2080
  { &hf_ansi_tcap_causeInformation, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ansi_tcap_T_causeInformation },
2081
  { NULL, 0, 0, 0, NULL }
2082
};
2083
2084
static unsigned
2085
0
dissect_ansi_tcap_Abort(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2086
0
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
2087
0
                                   Abort_sequence, hf_index, ett_ansi_tcap_Abort);
2088
2089
0
  return offset;
2090
0
}
2091
2092
2093
2094
static unsigned
2095
0
dissect_ansi_tcap_T_abort(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2096
0
gp_tcapsrt_info->ope=TC_ANSI_ABORT;
2097
0
col_set_str(actx->pinfo->cinfo, COL_INFO, "Abort ");
2098
2099
0
  offset = dissect_ansi_tcap_Abort(implicit_tag, tvb, offset, actx, tree, hf_index);
2100
2101
0
  return offset;
2102
0
}
2103
2104
2105
static const ber_choice_t PackageType_choice[] = {
2106
  {   1, &hf_ansi_tcap_unidirectional, BER_CLASS_PRI, 1, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_unidirectional },
2107
  {   2, &hf_ansi_tcap_queryWithPerm, BER_CLASS_PRI, 2, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_queryWithPerm },
2108
  {   3, &hf_ansi_tcap_queryWithoutPerm, BER_CLASS_PRI, 3, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_queryWithoutPerm },
2109
  {   4, &hf_ansi_tcap_response  , BER_CLASS_PRI, 4, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_response },
2110
  {   5, &hf_ansi_tcap_conversationWithPerm, BER_CLASS_PRI, 5, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_conversationWithPerm },
2111
  {   6, &hf_ansi_tcap_conversationWithoutPerm, BER_CLASS_PRI, 6, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_conversationWithoutPerm },
2112
  {  22, &hf_ansi_tcap_abort     , BER_CLASS_PRI, 22, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_abort },
2113
  { 0, NULL, 0, 0, 0, NULL }
2114
};
2115
2116
static unsigned
2117
2
dissect_ansi_tcap_PackageType(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2118
2
  offset = dissect_ber_choice(actx, tree, tvb, offset,
2119
2
                                 PackageType_choice, hf_index, ett_ansi_tcap_PackageType,
2120
2
                                 NULL);
2121
2122
2
  return offset;
2123
2
}
2124
2125
2126
2127
2128
2129
static int
2130
dissect_ansi_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_)
2131
2
{
2132
2
    proto_item          *item=NULL;
2133
2
    proto_tree          *tree=NULL;
2134
#if 0
2135
    proto_item          *stat_item=NULL;
2136
    proto_tree          *stat_tree=NULL;
2137
        int                     offset = 0;
2138
    struct tcaphash_context_t * p_tcap_context;
2139
    dissector_handle_t subdissector_handle;
2140
#endif
2141
2
        asn1_ctx_t asn1_ctx;
2142
2143
2
        asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
2144
2
        ansi_tcap_ctx_init(&ansi_tcap_private);
2145
2146
2
    asn1_ctx.subtree.top_tree = parent_tree;
2147
2
    col_set_str(pinfo->cinfo, COL_PROTOCOL, "ANSI TCAP");
2148
2149
    /* create display subtree for the protocol */
2150
2
    if(parent_tree){
2151
2
      item = proto_tree_add_item(parent_tree, proto_ansi_tcap, tvb, 0, -1, ENC_NA);
2152
2
      tree = proto_item_add_subtree(item, ett_tcap);
2153
2
    }
2154
2
    cur_oid = NULL;
2155
2
    tcapext_oid = NULL;
2156
2157
2
    gp_tcapsrt_info=tcapsrt_razinfo();
2158
2
    tcap_subdissector_used=false;
2159
2
    gp_tcap_context=NULL;
2160
2
    dissect_ansi_tcap_PackageType(false, tvb, 0, &asn1_ctx, tree, -1);
2161
2162
#if 0 /* Skip this part for now it will be rewritten */
2163
    if (g_ansi_tcap_HandleSRT && !tcap_subdissector_used ) {
2164
                if (gtcap_DisplaySRT && tree) {
2165
                        stat_tree = proto_tree_add_subtree(tree, tvb, 0, 0, ett_ansi_tcap_stat, &stat_item, "Stat");
2166
                        proto_item_set_generated(stat_item);
2167
                }
2168
                p_tcap_context=tcapsrt_call_matching(tvb, pinfo, stat_tree, gp_tcapsrt_info);
2169
                ansi_tcap_private.context=p_tcap_context;
2170
2171
                /* If the current message is TCAP only,
2172
                 * save the Application context name for the next messages
2173
                 */
2174
                if ( p_tcap_context && cur_oid && !p_tcap_context->oid_present ) {
2175
                        /* Save the application context and the sub dissector */
2176
                        (void) g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid));
2177
                        if ( (subdissector_handle = dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) {
2178
                                p_tcap_context->subdissector_handle=subdissector_handle;
2179
                                p_tcap_context->oid_present=true;
2180
                        }
2181
                }
2182
                if (g_ansi_tcap_HandleSRT && p_tcap_context && p_tcap_context->callback) {
2183
                        /* Callback function for the upper layer */
2184
                        (p_tcap_context->callback)(tvb, pinfo, stat_tree, p_tcap_context);
2185
                }
2186
        }
2187
#endif
2188
2
    return tvb_captured_length(tvb);
2189
2
}
2190
2191
2192
void
2193
proto_reg_handoff_ansi_tcap(void)
2194
15
{
2195
15
    ansi_map_handle = find_dissector_add_dependency("ansi_map", proto_ansi_tcap);
2196
15
    ain_handle = find_dissector_add_dependency("ain", proto_ansi_tcap);
2197
15
    ber_oid_dissector_table = find_dissector_table("ber.oid");
2198
15
}
2199
2200
2201
2202
void
2203
proto_register_ansi_tcap(void)
2204
15
{
2205
15
    module_t    *ansi_tcap_module;
2206
2207
2208
/* Setup list of header fields  See Section 1.6.1 for details*/
2209
15
    static hf_register_info hf[] = {
2210
#if 0
2211
        /* Tcap Service Response Time */
2212
        { &hf_ansi_tcapsrt_SessionId,
2213
          { "Session Id",
2214
            "ansi_tcap.srt.session_id",
2215
            FT_UINT32, BASE_DEC, NULL, 0x0,
2216
            NULL, HFILL }
2217
        },
2218
        { &hf_ansi_tcapsrt_BeginSession,
2219
          { "Begin Session",
2220
            "ansi_tcap.srt.begin",
2221
            FT_FRAMENUM, BASE_NONE, NULL, 0x0,
2222
            "SRT Begin of Session", HFILL }
2223
        },
2224
        { &hf_ansi_tcapsrt_EndSession,
2225
          { "End Session",
2226
            "ansi_tcap.srt.end",
2227
            FT_FRAMENUM, BASE_NONE, NULL, 0x0,
2228
            "SRT End of Session", HFILL }
2229
        },
2230
        { &hf_ansi_tcapsrt_SessionTime,
2231
          { "Session duration",
2232
            "ansi_tcap.srt.sessiontime",
2233
            FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
2234
            "Duration of the TCAP session", HFILL }
2235
        },
2236
        { &hf_ansi_tcapsrt_Duplicate,
2237
          { "Request Duplicate",
2238
            "ansi_tcap.srt.duplicate",
2239
            FT_UINT32, BASE_DEC, NULL, 0x0,
2240
            NULL, HFILL }
2241
        },
2242
#endif
2243
15
        { &hf_ansi_tcap_bit_h,
2244
15
          { "Require Reply", "ansi_tcap.req_rep",
2245
15
            FT_BOOLEAN, 16, NULL, 0x8000,
2246
15
            NULL, HFILL }
2247
15
        },
2248
15
        { &hf_ansi_tcap_op_family,
2249
15
          { "Family",
2250
15
            "ansi_tcap.op_family",
2251
15
            FT_UINT16, BASE_DEC, VALS(ansi_tcap_national_op_code_family_vals), 0x7f00,
2252
15
            NULL, HFILL }
2253
15
        },
2254
15
        { &hf_ansi_tcap_op_specifier,
2255
15
          { "Specifier",
2256
15
            "ansi_tcap.op_specifier",
2257
15
            FT_UINT16, BASE_DEC, NULL, 0x00ff,
2258
15
            NULL, HFILL }
2259
15
        },
2260
15
        { &hf_ansi_tcap_parameter_set,
2261
15
          { "Parameters",
2262
15
            "ansi_tcap.parameter_set",
2263
15
            FT_UINT8, BASE_HEX, NULL, 0,
2264
15
            NULL, HFILL }
2265
15
        },
2266
15
        { &hf_ansi_tcap_parameter_set_start,
2267
15
          { "Start of Parameters",
2268
15
            "ansi_tcap.parameter_set_start",
2269
15
            FT_UINT8, BASE_HEX, NULL, 0,
2270
15
            NULL, HFILL }
2271
15
        },
2272
15
        { &hf_ansi_tcap_parameter,
2273
15
          { "Parameter",
2274
15
            "ansi_tcap.parameter",
2275
15
            FT_UINT16, BASE_HEX, VALS(ansi_tcap_parameter_vals), 0,
2276
15
            NULL, HFILL }
2277
15
        },
2278
15
        { &hf_ansi_tcap_parameter_length,
2279
15
          { "The length of this Parameter set/sequence is",
2280
15
            "ansi_tcap.parameter_length",
2281
15
            FT_UINT8, BASE_HEX, NULL, 0,
2282
15
            NULL, HFILL }
2283
15
        },
2284
15
        { &hf_ansi_tcap_service_key_identifier,
2285
15
          { "Service key identifier",
2286
15
            "ansi_tcap.ansi_tcap_service_key_identifier",
2287
15
            FT_UINT8, BASE_HEX, NULL, 0,
2288
15
            NULL, HFILL }
2289
15
        },
2290
15
        { &hf_ansi_tcap_digit_identifier,
2291
15
          { "Service key digit identifier",
2292
15
            "ansi_tcap.ansi_tcap_digit_identifier",
2293
15
            FT_UINT8, BASE_HEX, NULL, 0,
2294
15
            NULL, HFILL }
2295
15
        },
2296
15
        { &hf_ansi_tcap_digit_length,
2297
15
          { "Service key digit length",
2298
15
            "ansi_tcap.ansi_tcap_digit_length",
2299
15
            FT_UINT8, BASE_HEX, NULL, 0,
2300
15
            NULL, HFILL }
2301
15
        },
2302
15
        { &hf_ansi_tcap_destination_number_value,
2303
15
          { "Destination number value",
2304
15
            "ansi_tcap.ansi_tcap_destination_number_value",
2305
15
            FT_UINT8, BASE_HEX, NULL, 0,
2306
15
            NULL, HFILL }
2307
15
        },
2308
15
        { &hf_ansi_tcap_presentation_restriction,
2309
15
          { "Presentation restriction indicator",
2310
15
            "ansi_tcap.ansi_tcap_presentation_restriction",
2311
15
            FT_BOOLEAN, 8, NULL, 0x02,
2312
15
            NULL, HFILL }
2313
15
        },
2314
15
        { &hf_ansi_tcap_encoding_scheme,
2315
15
          { "Encoding scheme and number planning is",
2316
15
            "ansi_tcap.ansi_tcap_encoding_scheme",
2317
15
            FT_UINT8, BASE_HEX, NULL, 0,
2318
15
            NULL, HFILL }
2319
15
        },
2320
15
        { &hf_ansi_tcap_number_of_digits,
2321
15
          { "Amount of digits in this phone number are",
2322
15
            "ansi_tcap.ansi_tcap_number_of_digits",
2323
15
            FT_UINT8, BASE_HEX, NULL, 0,
2324
15
            NULL, HFILL }
2325
15
        },
2326
15
        { &hf_ansi_tcap_destination_phone_number,
2327
15
          { "Destination Phone Number",
2328
15
            "ansi_tcap.destination_phone_number",
2329
15
            FT_BYTES, BASE_NONE, NULL, 0,
2330
15
            NULL, HFILL }
2331
15
        },
2332
15
        { &hf_ansi_tcap_return_phone_number,
2333
15
          { "Destination Phone Number",
2334
15
            "ansi_tcap.return_phone_number",
2335
15
            FT_BYTES, BASE_NONE, NULL, 0,
2336
15
            NULL, HFILL }
2337
15
        },
2338
15
        { &hf_ansi_tcap_busy_idle_status,
2339
15
          { "Status Identifier",
2340
15
            "ansi_tcap.busy_idle_status",
2341
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_status_identifier), 0,
2342
15
            NULL, HFILL }
2343
15
        },
2344
15
        { &hf_ansi_tcap_originating_restrictions,
2345
15
          { "Originating Restrictions",
2346
15
            "ansi_tcap.originating_restrictions",
2347
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_originating_restrictions), 0,
2348
15
            NULL, HFILL }
2349
15
        },
2350
15
        { &hf_ansi_tcap_terminating_restrictions,
2351
15
          { "Terminating Restrictions",
2352
15
            "ansi_tcap.terminating_restrictions",
2353
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_terminating_restrictions), 0,
2354
15
            NULL, HFILL }
2355
15
        },
2356
2357
        /* TODO: these were missing! */
2358
15
        { &hf_ansi_tcap_parameter_bearer_capability_requested1,
2359
15
          { "Capability Requested1",
2360
15
            "ansi_tcap.capability_requested1",
2361
15
            FT_UINT8, BASE_HEX, NULL, 0,
2362
15
            NULL, HFILL }
2363
15
        },
2364
15
        { &hf_ansi_tcap_parameter_bearer_capability_requested2,
2365
15
          { "Capability Requested2",
2366
15
            "ansi_tcap.capability_requested2",
2367
15
            FT_UINT8, BASE_HEX, NULL, 0,
2368
15
            NULL, HFILL }
2369
15
        },
2370
15
        { &hf_ansi_tcap_parameter_bearer_capability_requested2a,
2371
15
          { "Capability Requested2a",
2372
15
            "ansi_tcap.capability_requested2a",
2373
15
            FT_UINT8, BASE_HEX, NULL, 0,
2374
15
            NULL, HFILL }
2375
15
        },
2376
15
        { &hf_ansi_tcap_parameter_bearer_capability_requested2b,
2377
15
          { "Capability Requested2b",
2378
15
            "ansi_tcap.capability_requested2b",
2379
15
            FT_UINT8, BASE_HEX, NULL, 0,
2380
15
            NULL, HFILL }
2381
15
        },
2382
15
        { &hf_ansi_tcap_parameter_bearer_capability_requested3,
2383
15
          { "Capability Requested3",
2384
15
            "ansi_tcap.capability_requested3",
2385
15
            FT_UINT8, BASE_HEX, NULL, 0,
2386
15
            NULL, HFILL }
2387
15
        },
2388
15
        { &hf_ansi_tcap_parameter_bearer_capability_requested3a,
2389
15
          { "Capability Requested3a",
2390
15
            "ansi_tcap.capability_requested3a",
2391
15
            FT_UINT8, BASE_HEX, NULL, 0,
2392
15
            NULL, HFILL }
2393
15
        },
2394
2395
15
        { &hf_ansi_tcap_bearer_capability_supported,
2396
15
          { "Bearer Capability",
2397
15
            "ansi_tcap.bearer_capability_supported",
2398
15
            FT_UINT8, BASE_DEC, VALS(ansi_tcap_bearer_capabilities_supported), 0,
2399
15
            NULL, HFILL }
2400
15
        },
2401
15
        { &hf_ansi_tcap_reference_id,
2402
15
          { "Reference ID",
2403
15
            "ansi_tcap.reference_id",
2404
15
            FT_UINT8, BASE_HEX, NULL, 0,
2405
15
            NULL, HFILL }
2406
15
        },
2407
15
        { &hf_ansi_tcap_parameter_timestamp_year,
2408
15
          { "Year",
2409
15
            "ansi_tcap.timestamp.year",
2410
15
            FT_INT8, BASE_DEC, NULL, 0,
2411
15
            NULL, HFILL }
2412
15
        },
2413
15
        { &hf_ansi_tcap_parameter_timestamp_month,
2414
15
          { "Month",
2415
15
            "ansi_tcap.timestamp.month",
2416
15
            FT_INT8, BASE_DEC, NULL, 0,
2417
15
            NULL, HFILL }
2418
15
        },
2419
15
        { &hf_ansi_tcap_parameter_timestamp_day,
2420
15
          { "Day",
2421
15
            "ansi_tcap.timestamp.day",
2422
15
            FT_INT8, BASE_DEC, NULL, 0,
2423
15
            NULL, HFILL }
2424
15
        },
2425
15
        { &hf_ansi_tcap_parameter_timestamp_hour,
2426
15
          { "Hour",
2427
15
            "ansi_tcap.timestamp.hour",
2428
15
            FT_INT8, BASE_DEC, NULL, 0,
2429
15
            NULL, HFILL }
2430
15
        },
2431
15
        { &hf_ansi_tcap_parameter_timestamp_minute,
2432
15
          { "Minute",
2433
15
            "ansi_tcap.timestamp.minute",
2434
15
            FT_INT8, BASE_DEC, NULL, 0,
2435
15
            NULL, HFILL }
2436
15
        },
2437
15
        { &hf_ansi_tcap_parameter_timestamp_difference,
2438
15
          { "Time Difference",
2439
15
            "ansi_tcap.timestamp.difference",
2440
15
            FT_INT8, BASE_DEC, NULL, 0,
2441
15
            NULL, HFILL }
2442
15
        },
2443
15
        { &hf_ansi_tcap_parameter_timestamp_local_hour,
2444
15
          { "Local Hour",
2445
15
            "ansi_tcap.timestamp.local_hour",
2446
15
            FT_INT8, BASE_DEC, NULL, 0,
2447
15
            NULL, HFILL }
2448
15
        },
2449
15
        { &hf_ansi_tcap_parameter_timestamp_local_minute,
2450
15
          { "Local Minute",
2451
15
            "ansi_tcap.timestamp.local_minute",
2452
15
            FT_INT8, BASE_DEC, NULL, 0,
2453
15
            NULL, HFILL }
2454
15
        },
2455
15
        { &hf_ansi_tcap_parameter_call_forwarding_on_busy,
2456
15
          { "Call Forwarding On Busy",
2457
15
            "ansi_tcap.call_forwarding_on_busy",
2458
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_spare), 0x30,
2459
15
            NULL, HFILL }
2460
15
        },
2461
15
        { &hf_ansi_tcap_parameter_call_forwarding_dont_answer,
2462
15
          { "Call Forwarding Don't Answer",
2463
15
            "ansi_tcap.call_forwarding_dont_answer",
2464
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_spare), 0x0C,
2465
15
            NULL, HFILL }
2466
15
        },
2467
15
        { &hf_ansi_tcap_parameter_selective_forwarding,
2468
15
          { "Selective Forwarding",
2469
15
            "ansi_tcap.selective_forwarding",
2470
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_spare), 0x03,
2471
15
            NULL, HFILL }
2472
15
        },
2473
15
        { &hf_ansi_tcap_parameter_dn_match,
2474
15
          { "DN Match",
2475
15
            "ansi_tcap.dn_matc",
2476
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_dn_match), 0xC0,
2477
15
            NULL, HFILL }
2478
15
        },
2479
15
        { &hf_ansi_tcap_parameter_dn_line_service,
2480
15
          { "DN Line Service",
2481
15
            "ansi_tcap.dn_line_service",
2482
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_dn_service_type), 0x3F,
2483
15
            NULL, HFILL }
2484
15
        },
2485
15
        { &hf_ansi_tcap_duration_hour,
2486
15
          { "Hour",
2487
15
            "ansi_tcap.duration.hour",
2488
15
            FT_INT8, BASE_DEC, NULL, 0x0,
2489
15
            NULL, HFILL }
2490
15
        },
2491
15
        { &hf_ansi_tcap_duration_minute,
2492
15
          { "Minute",
2493
15
            "ansi_tcap.duration.minute",
2494
15
            FT_INT8, BASE_DEC, NULL, 0x0,
2495
15
            NULL, HFILL }
2496
15
        },
2497
15
        { &hf_ansi_tcap_duration_second,
2498
15
          { "Second",
2499
15
            "ansi_tcap.duration.second",
2500
15
            FT_INT8, BASE_DEC, NULL, 0x0,
2501
15
            NULL, HFILL }
2502
15
        },
2503
15
        { &hf_ansi_tcap_parameter_business_group_length_spare,
2504
15
          { "Spare",
2505
15
            "ansi_tcap.business_group.length_spare",
2506
15
            FT_UINT8, BASE_HEX, NULL, 0x80,
2507
15
            NULL, HFILL }
2508
15
        },
2509
15
        { &hf_ansi_tcap_parameter_business_group_length_AttSt,
2510
15
          { "AttSt",
2511
15
            "ansi_tcap.business_group.length_AttSt",
2512
15
            FT_BOOLEAN, 8, NULL, 0x40,
2513
15
            NULL, HFILL }
2514
15
        },
2515
15
        { &hf_ansi_tcap_parameter_business_group_length_BGID,
2516
15
          { "BGID",
2517
15
            "ansi_tcap.business_group.length_BGID",
2518
15
            FT_BOOLEAN, 8, NULL, 0x20,
2519
15
            NULL, HFILL }
2520
15
        },
2521
15
        { &hf_ansi_tcap_parameter_business_group_length_LP11,
2522
15
          { "LP11",
2523
15
            "ansi_tcap.business_group.length_LP11",
2524
15
            FT_BOOLEAN, 8, NULL, 0x08,
2525
15
            NULL, HFILL }
2526
15
        },
2527
15
        { &hf_ansi_tcap_parameter_business_group_length_Party_Selector,
2528
15
          { "Party Selector",
2529
15
            "ansi_tcap.business_group.length_Party_Selector",
2530
15
            FT_UINT8, BASE_HEX, NULL, 0x07,
2531
15
            NULL, HFILL }
2532
15
        },
2533
15
        { &hf_ansi_tcap_parameter_business_group_id,
2534
15
          { "Business Group ID",
2535
15
            "ansi_tcap.business_group.id",
2536
15
            FT_UINT24, BASE_HEX, NULL, 0x0,
2537
15
            NULL, HFILL }
2538
15
        },
2539
15
        { &hf_ansi_tcap_parameter_business_group_subgroup_id,
2540
15
          { "Sub-Group ID",
2541
15
            "ansi_tcap.business_group.subgroup_id",
2542
15
            FT_UINT16, BASE_HEX, NULL, 0x0,
2543
15
            NULL, HFILL }
2544
15
        },
2545
15
        { &hf_ansi_tcap_parameter_business_group_line_privileges,
2546
15
          { "Line Privileges",
2547
15
            "ansi_tcap.business_group.line_privileges",
2548
15
            FT_UINT8, BASE_HEX, NULL, 0x0,
2549
15
            NULL, HFILL }
2550
15
        },
2551
15
        { &hf_ansi_tcap_parameter_signalling_networks_id,
2552
15
          { "Signalling Networks ID",
2553
15
            "ansi_tcap.business_group.signalling_networks_id",
2554
15
            FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
2555
15
            NULL, HFILL }
2556
15
        },
2557
15
        { &hf_ansi_tcap_parameter_generic_name_type_name,
2558
15
          { "Generic Name Type",
2559
15
            "ansi_tcap.generic_name.type_name",
2560
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_generic_name_type_of_name), 0xD0,
2561
15
            NULL, HFILL }
2562
15
        },
2563
15
        { &hf_ansi_tcap_parameter_generic_name_availability,
2564
15
          { "Generic Name Availability",
2565
15
            "ansi_tcap.generic_name.availability",
2566
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_generic_name_availability), 0x10,
2567
15
            NULL, HFILL }
2568
15
        },
2569
15
        { &hf_ansi_tcap_parameter_generic_name_spare,
2570
15
          { "Generic Name Spare",
2571
15
            "ansi_tcap.generic_name.type_name_spare",
2572
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_spare), 0x0C,
2573
15
            NULL, HFILL }
2574
15
        },
2575
15
        { &hf_ansi_tcap_parameter_generic_name_presentation,
2576
15
          { "Generic Name Presentation",
2577
15
            "ansi_tcap.generic_name.type_name_presentation",
2578
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_generic_name_presentation_field), 0x03,
2579
15
            NULL, HFILL }
2580
15
        },
2581
15
        { &hf_ansi_tcap_message_waiting_indicator_type,
2582
15
          { "Message Waiting Indicator Type",
2583
15
            "ansi_tcap.message_waiting_indicator_type",
2584
15
            FT_UINT8, BASE_HEX, NULL, 0x0,
2585
15
            NULL, HFILL }
2586
15
        },
2587
15
        { &hf_ansi_tcap_parameter_generic_name_characters,
2588
15
          { "Name Characters",
2589
15
            "ansi_tcap.generic_name.characters",
2590
15
            FT_STRING, BASE_NONE, NULL, 0x0,
2591
15
            NULL, HFILL }
2592
15
        },
2593
15
        { &hf_ansi_tcap_parameter_look_ahead_for_busy_ack_type,
2594
15
          { "Act. Type",
2595
15
            "ansi_tcap.look_ahead_for_busy_ack_type",
2596
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_look_ahead_for_busy_ack), 0xC0,
2597
15
            NULL, HFILL }
2598
15
        },
2599
15
        { &hf_ansi_tcap_parameter_look_ahead_for_busy_spare,
2600
15
          { "Spare",
2601
15
            "ansi_tcap.look_ahead_for_busy_spare",
2602
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_spare), 0x30,
2603
15
            NULL, HFILL }
2604
15
        },
2605
15
        { &hf_ansi_tcap_parameter_look_ahead_for_busy_location_field,
2606
15
          { "Location",
2607
15
            "ansi_tcap.look_ahead_for_busy_location",
2608
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_look_ahead_for_busy_location_field), 0x0f,
2609
15
            NULL, HFILL }
2610
15
        },
2611
15
        { &hf_ansi_tcap_parameter_acg_control_cause_indicator,
2612
15
          { "Control Cause Indicator",
2613
15
            "ansi_tcap.acg_control_cause_indicator",
2614
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_control_cause_indication), 0x0,
2615
15
            NULL, HFILL }
2616
15
        },
2617
15
        { &hf_ansi_tcap_parameter_acg_duration_field,
2618
15
          { "Duration Field",
2619
15
            "ansi_tcap.acg_duration_field",
2620
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_duration_field), 0x0,
2621
15
            NULL, HFILL }
2622
15
        },
2623
15
        { &hf_ansi_tcap_parameter_acg_gap,
2624
15
          { "Gap",
2625
15
            "ansi_tcap.acg_gap",
2626
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_gap), 0x0,
2627
15
            NULL, HFILL }
2628
15
        },
2629
15
        { &hf_ansi_tcap_parameter_standard_announcement,
2630
15
          { "Standard Announcement",
2631
15
            "ansi_tcap.standard_announcement",
2632
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_standard_announcements), 0x0,
2633
15
            NULL, HFILL }
2634
15
        },
2635
15
        { &hf_ansi_tcap_parameter_customized_announcement,
2636
15
          { "Customized Announcement",
2637
15
            "ansi_tcap.customized_announcement",
2638
15
            FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
2639
15
            NULL, HFILL }
2640
15
        },
2641
15
        { &hf_ansi_tcap_parameter_digits_type_of_digits,
2642
15
          { "Gap",
2643
15
            "ansi_tcap.acg_gap",
2644
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_digits_type_of_digits), 0x0,
2645
15
            NULL, HFILL }
2646
15
        },
2647
15
        { &hf_ansi_tcap_parameter_digits_nature_of_numbers,
2648
15
          { "Gap",
2649
15
            "ansi_tcap.acg_gap",
2650
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_digits_nature_of_numbers), 0x0,
2651
15
            NULL, HFILL }
2652
15
        },
2653
15
        { &hf_ansi_tcap_parameter_digits_number_planning,
2654
15
          { "Gap",
2655
15
            "ansi_tcap.digits_number_planning",
2656
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_digits_number_planning), 0x0,
2657
15
            NULL, HFILL }
2658
15
        },
2659
15
        { &hf_ansi_tcap_parameter_digits_encoding,
2660
15
          { "Gap",
2661
15
            "ansi_tcap.digits_number_planning",
2662
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_digits_encoding), 0x0,
2663
15
            NULL, HFILL }
2664
15
        },
2665
15
        { &hf_ansi_tcap_parameter_digits_number_of_digits,
2666
15
          { "Gap",
2667
15
            "ansi_tcap.digits_number_planning",
2668
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_digits_number_of_digits), 0x0,
2669
15
            NULL, HFILL }
2670
15
        },
2671
15
        { &hf_ansi_tcap_parameter_digits,
2672
15
          { "Gap",
2673
15
            "ansi_tcap.digits_number_planning",
2674
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_digits), 0x0,
2675
15
            NULL, HFILL }
2676
15
        },
2677
15
        { &hf_ansi_tcap_standard_user_error_code,
2678
15
          { "User Error Code",
2679
15
            "ansi_tcap.standard_user_error_code",
2680
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_standard_user_error_code), 0x0,
2681
15
            NULL, HFILL }
2682
15
        },
2683
15
        { &hf_ansi_tcap_sccp_calling_party_address,
2684
15
          { "SCCP Calling Party Address",
2685
15
            "ansi_tcap.sccp_calling_party_address",
2686
15
            FT_UINT8, BASE_DEC, NULL, 0x0,
2687
15
            NULL, HFILL }
2688
15
        },
2689
15
        { &hf_ansi_tcap_transaction_id,
2690
15
          { "Transaction ID",
2691
15
            "ansi_tcap.transaction_id",
2692
15
            FT_UINT8, BASE_DEC, NULL, 0x0,
2693
15
            NULL, HFILL }
2694
15
        },
2695
15
        { &hf_ansi_tcap_package_type,
2696
15
          { "Package Type",
2697
15
            "ansi_tcap.package_type",
2698
15
            FT_UINT8, BASE_DEC, VALS(ansi_tcap_package_types), 0x0,
2699
15
            NULL, HFILL }
2700
15
        },
2701
15
        { &hf_ansi_tcap_returned_data,
2702
15
          { "Returned Data",
2703
15
            "ansi_tcap.returned_data",
2704
15
            FT_UINT8, BASE_HEX, NULL, 0x0,
2705
15
            NULL, HFILL }
2706
15
        },
2707
15
        { &hf_ansi_tcap_parameter_CIC_lsb,
2708
15
          { "CIC Least Significant Bits",
2709
15
            "ansi_tcap.CIC_lsb",
2710
15
            FT_UINT8, BASE_HEX, NULL, 0x0,
2711
15
            NULL, HFILL }
2712
15
        },
2713
15
        { &hf_ansi_tcap_parameter_CIC_spare,
2714
15
          { "CIC Spare",
2715
15
            "ansi_tcap.CIC_spare",
2716
15
            FT_UINT8, BASE_HEX, NULL, 0xC0,
2717
15
            NULL, HFILL }
2718
15
        },
2719
15
        { &hf_ansi_tcap_parameter_CIC_msb,
2720
15
          { "CIC Most Significant Bits",
2721
15
            "ansi_tcap.CIC_msb",
2722
15
            FT_UINT8, BASE_HEX, NULL, 0x3F,
2723
15
            NULL, HFILL }
2724
15
        },
2725
15
        { &hf_ansi_tcap_parameter_precedence_level_spare,
2726
15
          { "Precedence Level Spare",
2727
15
            "ansi_tcap.precedence_level_spare",
2728
15
            FT_UINT8, BASE_HEX, NULL, 0xF0,
2729
15
            NULL, HFILL }
2730
15
        },
2731
15
        { &hf_ansi_tcap_parameter_precedence_level,
2732
15
          { "Precedence Level",
2733
15
            "ansi_tcap.precedence_level",
2734
15
            FT_UINT8, BASE_HEX, VALS(ansi_tcap_national_parameter_level), 0x0F,
2735
15
            NULL, HFILL }
2736
15
        },
2737
15
        { &hf_ansi_tcap_parameter_precedence_id1,
2738
15
          { "NI digit #1",
2739
15
            "ansi_tcap.precedence_id1",
2740
15
            FT_UINT8, BASE_HEX, NULL, 0xF0,
2741
15
            NULL, HFILL }
2742
15
        },
2743
15
        { &hf_ansi_tcap_parameter_precedence_id2,
2744
15
          { "NI digit #2",
2745
15
            "ansi_tcap.precedence_id2",
2746
15
            FT_UINT8, BASE_HEX, NULL, 0x0F,
2747
15
            NULL, HFILL }
2748
15
        },
2749
15
        { &hf_ansi_tcap_parameter_precedence_id3,
2750
15
          { "NI digit #3",
2751
15
            "ansi_tcap.precedence_id3",
2752
15
            FT_UINT8, BASE_HEX, NULL, 0xF0,
2753
15
            NULL, HFILL }
2754
15
        },
2755
15
        { &hf_ansi_tcap_parameter_precedence_id4,
2756
15
          { "NI digit #4",
2757
15
            "ansi_tcap.precedence_id4",
2758
15
            FT_UINT8, BASE_HEX, NULL, 0x0F,
2759
15
            NULL, HFILL }
2760
15
        },
2761
15
        { &hf_ansi_tcap_parameter_precedence_mlpp_service_domain,
2762
15
          { "MLPP Service Domain",
2763
15
            "ansi_tcap.precedence_mlpp_service_domain",
2764
15
            FT_BYTES, BASE_NONE, NULL, 0x0,
2765
15
            NULL, HFILL }
2766
15
        },
2767
15
        { &hf_ansi_tcap_reference_id_call_identify,
2768
15
          { "Call Identify",
2769
15
            "ansi_tcap.reference_id.call_identify",
2770
15
            FT_BYTES, BASE_NONE, NULL, 0x0,
2771
15
            NULL, HFILL }
2772
15
        },
2773
15
        { &hf_ansi_tcap_reference_id_point_code,
2774
15
          { "Point Code",
2775
15
            "ansi_tcap.reference_id.point_code",
2776
15
            FT_BYTES, BASE_NONE, NULL, 0x0,
2777
15
            NULL, HFILL }
2778
15
        },
2779
15
        { &hf_ansi_tcap_parameter_authorization,
2780
15
          { "Authorization",
2781
15
            "ansi_tcap.authorization",
2782
15
            FT_UINT8, BASE_HEX, NULL, 0x0,
2783
15
            NULL, HFILL }
2784
15
        },
2785
15
        { &hf_ansi_tcap_integrity_algid_id,
2786
15
          { "Integrity AlgID ID",
2787
15
            "ansi_tcap.integrity.algid_id",
2788
15
            FT_UINT8, BASE_HEX, NULL, 0x0,
2789
15
            NULL, HFILL }
2790
15
        },
2791
15
        { &hf_ansi_tcap_integrity_algid,
2792
15
          { "Integrity AlgID",
2793
15
            "ansi_tcap.integrity.algid",
2794
15
            FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
2795
15
            NULL, HFILL }
2796
15
        },
2797
15
        { &hf_ansi_tcap_integrity_value_id,
2798
15
          { "Integrity Value AlgID ID",
2799
15
            "ansi_tcap.integrity.value_id",
2800
15
            FT_UINT8, BASE_HEX, NULL, 0x0,
2801
15
            NULL, HFILL }
2802
15
        },
2803
15
        { &hf_ansi_tcap_integrity_value,
2804
15
          { "Integrity Value AlgID",
2805
15
            "ansi_tcap.integrity.value",
2806
15
            FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
2807
15
            NULL, HFILL }
2808
15
        },
2809
15
        { &hf_ansi_tcap_sequence_number,
2810
15
          { "Sequence Number",
2811
15
            "ansi_tcap.sequence_number",
2812
15
            FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
2813
15
            NULL, HFILL }
2814
15
        },
2815
15
        { &hf_ansi_tcap_num_messages,
2816
15
          { "Number of Messages",
2817
15
            "ansi_tcap.num_messages",
2818
15
            FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
2819
15
            NULL, HFILL }
2820
15
        },
2821
15
        { &hf_ansi_tcap_display_text,
2822
15
          { "Display Text",
2823
15
            "ansi_tcap.display_text",
2824
15
            FT_UINT_STRING, BASE_NONE, NULL, 0x0,
2825
15
            NULL, HFILL }
2826
15
        },
2827
15
        { &hf_ansi_tcap_key_exchange_algid_id,
2828
15
          { "Key Exchange AlgID ID",
2829
15
            "ansi_tcap.key_exchange.algid_id",
2830
15
            FT_UINT8, BASE_HEX, NULL, 0x0,
2831
15
            NULL, HFILL }
2832
15
        },
2833
15
        { &hf_ansi_tcap_key_exchange_algid,
2834
15
          { "Key Exchange AlgID",
2835
15
            "ansi_tcap.key_exchange.algid",
2836
15
            FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
2837
15
            NULL, HFILL }
2838
15
        },
2839
15
        { &hf_ansi_tcap_key_exchange_value_id,
2840
15
          { "Key Exchange Value AlgID ID",
2841
15
            "ansi_tcap.key_exchange.value_id",
2842
15
            FT_UINT8, BASE_HEX, NULL, 0x0,
2843
15
            NULL, HFILL }
2844
15
        },
2845
15
        { &hf_ansi_tcap_key_exchange_value,
2846
15
          { "Key Exchange Value AlgID",
2847
15
            "ansi_tcap.key_exchange.value",
2848
15
            FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
2849
15
            NULL, HFILL }
2850
15
        },
2851
2852
15
    { &hf_ansi_tcap_national,
2853
15
      { "national", "ansi_tcap.national",
2854
15
        FT_INT32, BASE_DEC, NULL, 0,
2855
15
        NULL, HFILL }},
2856
15
    { &hf_ansi_tcap_private,
2857
15
      { "private", "ansi_tcap.private",
2858
15
        FT_INT32, BASE_DEC, NULL, 0,
2859
15
        NULL, HFILL }},
2860
15
    { &hf_ansi_tcap_national_01,
2861
15
      { "national", "ansi_tcap.national",
2862
15
        FT_INT32, BASE_DEC, NULL, 0,
2863
15
        "INTEGER_M128_127", HFILL }},
2864
15
    { &hf_ansi_tcap_ec_private,
2865
15
      { "private", "ansi_tcap.ec_private",
2866
15
        FT_UINT32, BASE_DEC, VALS(ansi_tcap_ANSIMAPPrivateErrorcode_vals), 0,
2867
15
        "ANSIMAPPrivateErrorcode", HFILL }},
2868
15
    { &hf_ansi_tcap_unidirectional,
2869
15
      { "unidirectional", "ansi_tcap.unidirectional_element",
2870
15
        FT_NONE, BASE_NONE, NULL, 0,
2871
15
        NULL, HFILL }},
2872
15
    { &hf_ansi_tcap_queryWithPerm,
2873
15
      { "queryWithPerm", "ansi_tcap.queryWithPerm_element",
2874
15
        FT_NONE, BASE_NONE, NULL, 0,
2875
15
        NULL, HFILL }},
2876
15
    { &hf_ansi_tcap_queryWithoutPerm,
2877
15
      { "queryWithoutPerm", "ansi_tcap.queryWithoutPerm_element",
2878
15
        FT_NONE, BASE_NONE, NULL, 0,
2879
15
        NULL, HFILL }},
2880
15
    { &hf_ansi_tcap_response,
2881
15
      { "response", "ansi_tcap.response_element",
2882
15
        FT_NONE, BASE_NONE, NULL, 0,
2883
15
        NULL, HFILL }},
2884
15
    { &hf_ansi_tcap_conversationWithPerm,
2885
15
      { "conversationWithPerm", "ansi_tcap.conversationWithPerm_element",
2886
15
        FT_NONE, BASE_NONE, NULL, 0,
2887
15
        NULL, HFILL }},
2888
15
    { &hf_ansi_tcap_conversationWithoutPerm,
2889
15
      { "conversationWithoutPerm", "ansi_tcap.conversationWithoutPerm_element",
2890
15
        FT_NONE, BASE_NONE, NULL, 0,
2891
15
        NULL, HFILL }},
2892
15
    { &hf_ansi_tcap_abort,
2893
15
      { "abort", "ansi_tcap.abort_element",
2894
15
        FT_NONE, BASE_NONE, NULL, 0,
2895
15
        NULL, HFILL }},
2896
15
    { &hf_ansi_tcap_identifier,
2897
15
      { "identifier", "ansi_tcap.identifier",
2898
15
        FT_BYTES, BASE_NONE, NULL, 0,
2899
15
        "TransactionID", HFILL }},
2900
15
    { &hf_ansi_tcap_dialoguePortion,
2901
15
      { "dialoguePortion", "ansi_tcap.dialoguePortion_element",
2902
15
        FT_NONE, BASE_NONE, NULL, 0,
2903
15
        NULL, HFILL }},
2904
15
    { &hf_ansi_tcap_componentPortion,
2905
15
      { "componentPortion", "ansi_tcap.componentPortion",
2906
15
        FT_UINT32, BASE_DEC, NULL, 0,
2907
15
        "ComponentSequence", HFILL }},
2908
15
    { &hf_ansi_tcap_dialogPortion,
2909
15
      { "dialogPortion", "ansi_tcap.dialogPortion_element",
2910
15
        FT_NONE, BASE_NONE, NULL, 0,
2911
15
        "DialoguePortion", HFILL }},
2912
15
    { &hf_ansi_tcap_causeInformation,
2913
15
      { "causeInformation", "ansi_tcap.causeInformation",
2914
15
        FT_UINT32, BASE_DEC, VALS(ansi_tcap_T_causeInformation_vals), 0,
2915
15
        NULL, HFILL }},
2916
15
    { &hf_ansi_tcap_abortCause,
2917
15
      { "abortCause", "ansi_tcap.abortCause",
2918
15
        FT_INT32, BASE_DEC, VALS(ansi_tcap_P_Abort_cause_U_vals), 0,
2919
15
        "P_Abort_cause", HFILL }},
2920
15
    { &hf_ansi_tcap_abort_userInformation,
2921
15
      { "userInformation", "ansi_tcap.abort_userInformation_element",
2922
15
        FT_NONE, BASE_NONE, NULL, 0,
2923
15
        "UserAbortInformation", HFILL }},
2924
15
    { &hf_ansi_tcap_version,
2925
15
      { "version", "ansi_tcap.version",
2926
15
        FT_BYTES, BASE_NONE, NULL, 0,
2927
15
        "ProtocolVersion", HFILL }},
2928
15
    { &hf_ansi_tcap_applicationContext,
2929
15
      { "applicationContext", "ansi_tcap.applicationContext",
2930
15
        FT_UINT32, BASE_DEC, VALS(ansi_tcap_T_applicationContext_vals), 0,
2931
15
        NULL, HFILL }},
2932
15
    { &hf_ansi_tcap_integerApplicationId,
2933
15
      { "integerApplicationId", "ansi_tcap.integerApplicationId",
2934
15
        FT_INT32, BASE_DEC, NULL, 0,
2935
15
        "IntegerApplicationContext", HFILL }},
2936
15
    { &hf_ansi_tcap_objectApplicationId,
2937
15
      { "objectApplicationId", "ansi_tcap.objectApplicationId",
2938
15
        FT_OID, BASE_NONE, NULL, 0,
2939
15
        "ObjectIDApplicationContext", HFILL }},
2940
15
    { &hf_ansi_tcap_userInformation,
2941
15
      { "userInformation", "ansi_tcap.userInformation",
2942
15
        FT_UINT32, BASE_DEC, NULL, 0,
2943
15
        NULL, HFILL }},
2944
15
    { &hf_ansi_tcap_securityContext,
2945
15
      { "securityContext", "ansi_tcap.securityContext",
2946
15
        FT_UINT32, BASE_DEC, VALS(ansi_tcap_T_securityContext_vals), 0,
2947
15
        NULL, HFILL }},
2948
15
    { &hf_ansi_tcap_integerSecurityId,
2949
15
      { "integerSecurityId", "ansi_tcap.integerSecurityId",
2950
15
        FT_INT32, BASE_DEC, NULL, 0,
2951
15
        "INTEGER", HFILL }},
2952
15
    { &hf_ansi_tcap_objectSecurityId,
2953
15
      { "objectSecurityId", "ansi_tcap.objectSecurityId",
2954
15
        FT_OID, BASE_NONE, NULL, 0,
2955
15
        "OBJECT_IDENTIFIER", HFILL }},
2956
15
    { &hf_ansi_tcap_confidentiality,
2957
15
      { "confidentiality", "ansi_tcap.confidentiality_element",
2958
15
        FT_NONE, BASE_NONE, NULL, 0,
2959
15
        NULL, HFILL }},
2960
15
    { &hf_ansi_tcap__untag_item,
2961
15
      { "_untag item", "ansi_tcap._untag_item_element",
2962
15
        FT_NONE, BASE_NONE, NULL, 0,
2963
15
        "EXTERNAL", HFILL }},
2964
15
    { &hf_ansi_tcap_confidentialityId,
2965
15
      { "confidentialityId", "ansi_tcap.confidentialityId",
2966
15
        FT_UINT32, BASE_DEC, VALS(ansi_tcap_T_confidentialityId_vals), 0,
2967
15
        NULL, HFILL }},
2968
15
    { &hf_ansi_tcap_integerConfidentialityId,
2969
15
      { "integerConfidentialityId", "ansi_tcap.integerConfidentialityId",
2970
15
        FT_INT32, BASE_DEC, NULL, 0,
2971
15
        "INTEGER", HFILL }},
2972
15
    { &hf_ansi_tcap_objectConfidentialityId,
2973
15
      { "objectConfidentialityId", "ansi_tcap.objectConfidentialityId",
2974
15
        FT_OID, BASE_NONE, NULL, 0,
2975
15
        "OBJECT_IDENTIFIER", HFILL }},
2976
15
    { &hf_ansi_tcap__untag_item_01,
2977
15
      { "ComponentPDU", "ansi_tcap.ComponentPDU",
2978
15
        FT_UINT32, BASE_DEC, VALS(ansi_tcap_ComponentPDU_vals), 0,
2979
15
        NULL, HFILL }},
2980
15
    { &hf_ansi_tcap_invokeLast,
2981
15
      { "invokeLast", "ansi_tcap.invokeLast_element",
2982
15
        FT_NONE, BASE_NONE, NULL, 0,
2983
15
        "Invoke", HFILL }},
2984
15
    { &hf_ansi_tcap_returnResultLast,
2985
15
      { "returnResultLast", "ansi_tcap.returnResultLast_element",
2986
15
        FT_NONE, BASE_NONE, NULL, 0,
2987
15
        "ReturnResult", HFILL }},
2988
15
    { &hf_ansi_tcap_returnError,
2989
15
      { "returnError", "ansi_tcap.returnError_element",
2990
15
        FT_NONE, BASE_NONE, NULL, 0,
2991
15
        NULL, HFILL }},
2992
15
    { &hf_ansi_tcap_reject,
2993
15
      { "reject", "ansi_tcap.reject_element",
2994
15
        FT_NONE, BASE_NONE, NULL, 0,
2995
15
        NULL, HFILL }},
2996
15
    { &hf_ansi_tcap_invokeNotLast,
2997
15
      { "invokeNotLast", "ansi_tcap.invokeNotLast_element",
2998
15
        FT_NONE, BASE_NONE, NULL, 0,
2999
15
        "Invoke", HFILL }},
3000
15
    { &hf_ansi_tcap_returnResultNotLast,
3001
15
      { "returnResultNotLast", "ansi_tcap.returnResultNotLast_element",
3002
15
        FT_NONE, BASE_NONE, NULL, 0,
3003
15
        "ReturnResult", HFILL }},
3004
15
    { &hf_ansi_tcap_componentIDs,
3005
15
      { "componentIDs", "ansi_tcap.componentIDs",
3006
15
        FT_BYTES, BASE_NONE, NULL, 0,
3007
15
        NULL, HFILL }},
3008
15
    { &hf_ansi_tcap_operationCode,
3009
15
      { "operationCode", "ansi_tcap.operationCode",
3010
15
        FT_UINT32, BASE_DEC, VALS(ansi_tcap_OperationCode_vals), 0,
3011
15
        NULL, HFILL }},
3012
15
    { &hf_ansi_tcap_invoke_parameter,
3013
15
      { "parameter", "ansi_tcap.invoke_parameter_element",
3014
15
        FT_NONE, BASE_NONE, NULL, 0,
3015
15
        "T_invoke_parameter", HFILL }},
3016
15
    { &hf_ansi_tcap_componentID,
3017
15
      { "componentID", "ansi_tcap.componentID",
3018
15
        FT_BYTES, BASE_NONE, NULL, 0,
3019
15
        NULL, HFILL }},
3020
15
    { &hf_ansi_tcap_returnResult_parameter,
3021
15
      { "parameter", "ansi_tcap.returnResult_parameter_element",
3022
15
        FT_NONE, BASE_NONE, NULL, 0,
3023
15
        "T_returnResult_parameter", HFILL }},
3024
15
    { &hf_ansi_tcap_componentID_01,
3025
15
      { "componentID", "ansi_tcap.componentID",
3026
15
        FT_BYTES, BASE_NONE, NULL, 0,
3027
15
        "T_componentID_01", HFILL }},
3028
15
    { &hf_ansi_tcap_errorCode,
3029
15
      { "errorCode", "ansi_tcap.errorCode",
3030
15
        FT_UINT32, BASE_DEC, VALS(ansi_tcap_ErrorCode_vals), 0,
3031
15
        NULL, HFILL }},
3032
15
    { &hf_ansi_tcap_returnError_parameter,
3033
15
      { "parameter", "ansi_tcap.returnError_parameter_element",
3034
15
        FT_NONE, BASE_NONE, NULL, 0,
3035
15
        "T_returnError_parameter", HFILL }},
3036
15
    { &hf_ansi_tcap_componentID_02,
3037
15
      { "componentID", "ansi_tcap.componentID",
3038
15
        FT_BYTES, BASE_NONE, NULL, 0,
3039
15
        "OCTET_STRING_SIZE_0_1", HFILL }},
3040
15
    { &hf_ansi_tcap_rejectProblem,
3041
15
      { "rejectProblem", "ansi_tcap.rejectProblem",
3042
15
        FT_INT32, BASE_DEC, VALS(ansi_tcap_Problem_vals), 0,
3043
15
        "Problem", HFILL }},
3044
15
    { &hf_ansi_tcap_reject_parameter,
3045
15
      { "parameter", "ansi_tcap.reject_parameter",
3046
15
        FT_UINT32, BASE_DEC, VALS(ansi_tcap_T_reject_parameter_vals), 0,
3047
15
        "T_reject_parameter", HFILL }},
3048
15
    { &hf_ansi_tcap_paramSequence,
3049
15
      { "paramSequence", "ansi_tcap.paramSequence_element",
3050
15
        FT_NONE, BASE_NONE, NULL, 0,
3051
15
        NULL, HFILL }},
3052
15
    { &hf_ansi_tcap_paramSet,
3053
15
      { "paramSet", "ansi_tcap.paramSet_element",
3054
15
        FT_NONE, BASE_NONE, NULL, 0,
3055
15
        NULL, HFILL }},
3056
15
    };
3057
3058
/* Setup protocol subtree array */
3059
15
    static int *ett[] = {
3060
15
        &ett_tcap,
3061
15
        &ett_param,
3062
15
        &ett_otid,
3063
15
        &ett_dtid,
3064
15
        &ett_ansi_tcap_stat,
3065
15
        &ett_ansi_tcap_op_code_nat,
3066
15
        &ett_ansi_tcap_stat_timestamp,
3067
15
        &ett_ansi_tcap_duration,
3068
15
    &ett_ansi_tcap_OperationCode,
3069
15
    &ett_ansi_tcap_ErrorCode,
3070
15
    &ett_ansi_tcap_PackageType,
3071
15
    &ett_ansi_tcap_UniTransactionPDU,
3072
15
    &ett_ansi_tcap_TransactionPDU,
3073
15
    &ett_ansi_tcap_Abort,
3074
15
    &ett_ansi_tcap_T_causeInformation,
3075
15
    &ett_ansi_tcap_DialoguePortion_U,
3076
15
    &ett_ansi_tcap_T_applicationContext,
3077
15
    &ett_ansi_tcap_T_securityContext,
3078
15
    &ett_ansi_tcap_UserInformation_U,
3079
15
    &ett_ansi_tcap_Confidentiality,
3080
15
    &ett_ansi_tcap_T_confidentialityId,
3081
15
    &ett_ansi_tcap_SEQUENCE_OF_ComponentPDU,
3082
15
    &ett_ansi_tcap_ComponentPDU,
3083
15
    &ett_ansi_tcap_Invoke,
3084
15
    &ett_ansi_tcap_ReturnResult,
3085
15
    &ett_ansi_tcap_ReturnError,
3086
15
    &ett_ansi_tcap_Reject,
3087
15
    &ett_ansi_tcap_T_reject_parameter,
3088
15
    &ett_ansi_tcap_T_paramSequence,
3089
15
    &ett_ansi_tcap_T_paramSet,
3090
15
    };
3091
3092
15
    static ei_register_info ei[] = {
3093
15
        { &ei_ansi_tcap_dissector_not_implemented, { "ansi_tcap.dissector_not_implemented", PI_UNDECODED, PI_WARN, "Dissector not implemented", EXPFILL }},
3094
15
        { &ei_ansi_tcap_no_parameters, { "ansi_tcap.no_parameters", PI_PROTOCOL, PI_NOTE, "No parameters exist", EXPFILL }},
3095
15
    };
3096
3097
15
    expert_module_t* expert_ansi_tcap;
3098
3099
15
    static const enum_val_t ansi_tcap_response_matching_type_values[] = {
3100
15
        {"tid",                  "Transaction ID only", ANSI_TCAP_TID_ONLY},
3101
15
        {"tid_source",           "Transaction ID and Source", ANSI_TCAP_TID_AND_SOURCE},
3102
15
        {"tid_source_dest",      "Transaction ID Source and Destination", ANSI_TCAP_TID_SOURCE_AND_DEST},
3103
15
        {NULL, NULL, -1}
3104
15
    };
3105
3106
/* Register the protocol name and description */
3107
15
    proto_ansi_tcap = proto_register_protocol("ANSI Transaction Capabilities Application Part", "ANSI_TCAP", "ansi_tcap");
3108
15
    register_dissector("ansi_tcap", dissect_ansi_tcap, proto_ansi_tcap);
3109
3110
   /* Note the high bit should be masked off when registering in this table (0x7fff)*/
3111
15
   ansi_tcap_national_opcode_table = register_dissector_table("ansi_tcap.nat.opcode", "ANSI TCAP National Opcodes", proto_ansi_tcap, FT_UINT16, BASE_DEC);
3112
/* Required function calls to register the header fields and subtrees used */
3113
15
    proto_register_field_array(proto_ansi_tcap, hf, array_length(hf));
3114
15
    proto_register_subtree_array(ett, array_length(ett));
3115
15
    expert_ansi_tcap = expert_register_protocol(proto_ansi_tcap);
3116
15
    expert_register_field_array(expert_ansi_tcap, ei, array_length(ei));
3117
3118
15
    ansi_tcap_module = prefs_register_protocol(proto_ansi_tcap, proto_reg_handoff_ansi_tcap);
3119
3120
15
    prefs_register_enum_preference(ansi_tcap_module, "transaction.matchtype",
3121
15
                                   "Type of matching invoke/response",
3122
15
                                   "Type of matching invoke/response, risk of mismatch if loose matching chosen",
3123
15
                                   &ansi_tcap_response_matching_type, ansi_tcap_response_matching_type_values, false);
3124
3125
15
    TransactionId_table = wmem_multimap_new_autoreset(wmem_epan_scope(), wmem_file_scope(), wmem_str_hash, g_str_equal);
3126
15
}