1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
|
/* Do not modify this file. Changes will be overwritten. */
/* Generated automatically by the ASN.1 to Wireshark dissector compiler */
/* packet-t125.c */
/* asn2wrs.py -b -L -p t125 -c ./t125.cnf -s ./packet-t125-template -D . -O ../.. MCS-PROTOCOL.asn */
/* packet-t125.c
* Routines for t125 packet dissection
* Copyright 2007, Ronnie Sahlberg
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* SPDX-License-Identifier: GPL-2.0-or-later
*
*/
#include "config.h"
#include <epan/packet.h>
#include <epan/exceptions.h>
#include <epan/asn1.h>
#include "packet-ber.h"
#include "packet-per.h"
#include "packet-t124.h"
#define PNAME "MULTIPOINT-COMMUNICATION-SERVICE T.125"
#define PSNAME "T.125"
#define PFNAME "t125"
#define HF_T125_ERECT_DOMAIN_REQUEST 1
#define HF_T125_DISCONNECT_PROVIDER_ULTIMATUM 8
#define HF_T125_ATTACH_USER_REQUEST 10
#define HF_T125_ATTACH_USER_CONFIRM 11
#define HF_T125_CHANNEL_JOIN_REQUEST 14
#define HF_T125_CHANNEL_JOIN_CONFIRM 15
#define HF_T125_SEND_DATA_REQUEST 25
#define HF_T125_SEND_DATA_INDICATION 26
void proto_register_t125(void);
void proto_reg_handoff_t125(void);
/* Initialize the protocol and registered fields */
static int proto_t125 = -1;
static proto_tree *top_tree = NULL;
static int hf_t125_ConnectMCSPDU_PDU = -1; /* ConnectMCSPDU */
static int hf_t125_maxChannelIds = -1; /* INTEGER_0_MAX */
static int hf_t125_maxUserIds = -1; /* INTEGER_0_MAX */
static int hf_t125_maxTokenIds = -1; /* INTEGER_0_MAX */
static int hf_t125_numPriorities = -1; /* INTEGER_0_MAX */
static int hf_t125_minThroughput = -1; /* INTEGER_0_MAX */
static int hf_t125_maxHeight = -1; /* INTEGER_0_MAX */
static int hf_t125_maxMCSPDUsize = -1; /* INTEGER_0_MAX */
static int hf_t125_protocolVersion = -1; /* INTEGER_0_MAX */
static int hf_t125_callingDomainSelector = -1; /* OCTET_STRING */
static int hf_t125_calledDomainSelector = -1; /* OCTET_STRING */
static int hf_t125_upwardFlag = -1; /* BOOLEAN */
static int hf_t125_targetParameters = -1; /* DomainParameters */
static int hf_t125_minimumParameters = -1; /* DomainParameters */
static int hf_t125_maximumParameters = -1; /* DomainParameters */
static int hf_t125_userData = -1; /* T_userData */
static int hf_t125_result = -1; /* Result */
static int hf_t125_calledConnectId = -1; /* INTEGER_0_MAX */
static int hf_t125_domainParameters = -1; /* DomainParameters */
static int hf_t125_userData_01 = -1; /* T_userData_01 */
static int hf_t125_dataPriority = -1; /* DataPriority */
static int hf_t125_connect_initial = -1; /* Connect_Initial */
static int hf_t125_connect_response = -1; /* Connect_Response */
static int hf_t125_connect_additional = -1; /* Connect_Additional */
static int hf_t125_connect_result = -1; /* Connect_Result */
/* Initialize the subtree pointers */
static int ett_t125 = -1;
static gint ett_t125_DomainParameters = -1;
static gint ett_t125_Connect_Initial_U = -1;
static gint ett_t125_Connect_Response_U = -1;
static gint ett_t125_Connect_Additional_U = -1;
static gint ett_t125_Connect_Result_U = -1;
static gint ett_t125_ConnectMCSPDU = -1;
static heur_dissector_list_t t125_heur_subdissector_list;
static const value_string t125_DataPriority_vals[] = {
{ 0, "top" },
{ 1, "high" },
{ 2, "medium" },
{ 3, "low" },
{ 0, NULL }
};
static int
dissect_t125_DataPriority(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
NULL);
return offset;
}
static int
dissect_t125_INTEGER_0_MAX(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_integer64(implicit_tag, actx, tree, tvb, offset, hf_index,
NULL);
return offset;
}
static const ber_sequence_t DomainParameters_sequence[] = {
{ &hf_t125_maxChannelIds , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_t125_INTEGER_0_MAX },
{ &hf_t125_maxUserIds , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_t125_INTEGER_0_MAX },
{ &hf_t125_maxTokenIds , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_t125_INTEGER_0_MAX },
{ &hf_t125_numPriorities , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_t125_INTEGER_0_MAX },
{ &hf_t125_minThroughput , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_t125_INTEGER_0_MAX },
{ &hf_t125_maxHeight , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_t125_INTEGER_0_MAX },
{ &hf_t125_maxMCSPDUsize , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_t125_INTEGER_0_MAX },
{ &hf_t125_protocolVersion, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_t125_INTEGER_0_MAX },
{ NULL, 0, 0, 0, NULL }
};
static int
dissect_t125_DomainParameters(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
DomainParameters_sequence, hf_index, ett_t125_DomainParameters);
return offset;
}
static int
dissect_t125_OCTET_STRING(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
NULL);
return offset;
}
static int
dissect_t125_BOOLEAN(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
return offset;
}
static int
dissect_t125_T_userData(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
tvbuff_t *next_tvb = NULL;
heur_dtbl_entry_t *hdtbl_entry;
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
&next_tvb);
if(next_tvb)
dissector_try_heuristic(t125_heur_subdissector_list, next_tvb,
actx->pinfo, top_tree, &hdtbl_entry, NULL);
return offset;
}
static const ber_sequence_t Connect_Initial_U_sequence[] = {
{ &hf_t125_callingDomainSelector, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_t125_OCTET_STRING },
{ &hf_t125_calledDomainSelector, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_t125_OCTET_STRING },
{ &hf_t125_upwardFlag , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_NOOWNTAG, dissect_t125_BOOLEAN },
{ &hf_t125_targetParameters, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_t125_DomainParameters },
{ &hf_t125_minimumParameters, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_t125_DomainParameters },
{ &hf_t125_maximumParameters, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_t125_DomainParameters },
{ &hf_t125_userData , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_t125_T_userData },
{ NULL, 0, 0, 0, NULL }
};
static int
dissect_t125_Connect_Initial_U(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
Connect_Initial_U_sequence, hf_index, ett_t125_Connect_Initial_U);
return offset;
}
static int
dissect_t125_Connect_Initial(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
hf_index, BER_CLASS_APP, 101, TRUE, dissect_t125_Connect_Initial_U);
return offset;
}
static const value_string t125_Result_vals[] = {
{ 0, "rt-successful" },
{ 1, "rt-domain-merging" },
{ 2, "rt-domain-not-hierarchical" },
{ 3, "rt-no-such-channel" },
{ 4, "rt-no-such-domain" },
{ 5, "rt-no-such-user" },
{ 6, "rt-not-admitted" },
{ 7, "rt-other-user-id" },
{ 8, "rt-parameters-unacceptable" },
{ 9, "rt-token-not-available" },
{ 10, "rt-token-not-possessed" },
{ 11, "rt-too-many-channels" },
{ 12, "rt-too-many-tokens" },
{ 13, "rt-too-many-users" },
{ 14, "rt-unspecified-failure" },
{ 15, "rt-user-rejected" },
{ 0, NULL }
};
static int
dissect_t125_Result(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
NULL);
return offset;
}
static int
dissect_t125_T_userData_01(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
tvbuff_t *next_tvb = NULL;
heur_dtbl_entry_t *hdtbl_entry;
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
&next_tvb);
if(next_tvb)
dissector_try_heuristic(t125_heur_subdissector_list, next_tvb,
actx->pinfo, top_tree, &hdtbl_entry, NULL);
return offset;
}
static const ber_sequence_t Connect_Response_U_sequence[] = {
{ &hf_t125_result , BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_t125_Result },
{ &hf_t125_calledConnectId, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_t125_INTEGER_0_MAX },
{ &hf_t125_domainParameters, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_t125_DomainParameters },
{ &hf_t125_userData_01 , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_t125_T_userData_01 },
{ NULL, 0, 0, 0, NULL }
};
static int
dissect_t125_Connect_Response_U(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
Connect_Response_U_sequence, hf_index, ett_t125_Connect_Response_U);
return offset;
}
static int
dissect_t125_Connect_Response(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
hf_index, BER_CLASS_APP, 102, TRUE, dissect_t125_Connect_Response_U);
return offset;
}
static const ber_sequence_t Connect_Additional_U_sequence[] = {
{ &hf_t125_calledConnectId, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_t125_INTEGER_0_MAX },
{ &hf_t125_dataPriority , BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_t125_DataPriority },
{ NULL, 0, 0, 0, NULL }
};
static int
dissect_t125_Connect_Additional_U(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
Connect_Additional_U_sequence, hf_index, ett_t125_Connect_Additional_U);
return offset;
}
static int
dissect_t125_Connect_Additional(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
hf_index, BER_CLASS_APP, 103, TRUE, dissect_t125_Connect_Additional_U);
return offset;
}
static const ber_sequence_t Connect_Result_U_sequence[] = {
{ &hf_t125_result , BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_t125_Result },
{ NULL, 0, 0, 0, NULL }
};
static int
dissect_t125_Connect_Result_U(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
Connect_Result_U_sequence, hf_index, ett_t125_Connect_Result_U);
return offset;
}
static int
dissect_t125_Connect_Result(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
hf_index, BER_CLASS_APP, 104, TRUE, dissect_t125_Connect_Result_U);
return offset;
}
static const value_string t125_ConnectMCSPDU_vals[] = {
{ 101, "connect-initial" },
{ 102, "connect-response" },
{ 103, "connect-additional" },
{ 104, "connect-result" },
{ 0, NULL }
};
static const ber_choice_t ConnectMCSPDU_choice[] = {
{ 101, &hf_t125_connect_initial, BER_CLASS_APP, 101, BER_FLAGS_NOOWNTAG, dissect_t125_Connect_Initial },
{ 102, &hf_t125_connect_response, BER_CLASS_APP, 102, BER_FLAGS_NOOWNTAG, dissect_t125_Connect_Response },
{ 103, &hf_t125_connect_additional, BER_CLASS_APP, 103, BER_FLAGS_NOOWNTAG, dissect_t125_Connect_Additional },
{ 104, &hf_t125_connect_result , BER_CLASS_APP, 104, BER_FLAGS_NOOWNTAG, dissect_t125_Connect_Result },
{ 0, NULL, 0, 0, 0, NULL }
};
static int
dissect_t125_ConnectMCSPDU(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_choice(actx, tree, tvb, offset,
ConnectMCSPDU_choice, hf_index, ett_t125_ConnectMCSPDU,
NULL);
return offset;
}
/*--- PDUs ---*/
static int dissect_ConnectMCSPDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
int offset = 0;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
offset = dissect_t125_ConnectMCSPDU(FALSE, tvb, offset, &asn1_ctx, tree, hf_t125_ConnectMCSPDU_PDU);
return offset;
}
static int
dissect_t125(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_)
{
proto_item *item = NULL;
proto_tree *tree = NULL;
gint8 ber_class;
bool pc;
gint32 tag;
top_tree = parent_tree;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "T.125");
col_clear(pinfo->cinfo, COL_INFO);
item = proto_tree_add_item(parent_tree, proto_t125, tvb, 0, tvb_captured_length(tvb), ENC_NA);
tree = proto_item_add_subtree(item, ett_t125);
get_ber_identifier(tvb, 0, &ber_class, &pc, &tag);
if ( (ber_class==BER_CLASS_APP) && (tag>=101) && (tag<=104) ){
dissect_ConnectMCSPDU_PDU(tvb, pinfo, tree, NULL);
} else {
t124_set_top_tree(top_tree);
dissect_DomainMCSPDU_PDU(tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
static gboolean
dissect_t125_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_)
{
gint8 ber_class;
bool pc;
gint32 tag;
volatile bool failed;
/*
* We must catch all the "ran past the end of the packet" exceptions
* here and, if we catch one, just return FALSE. It's too painful
* to have a version of dissect_per_sequence() that checks all
* references to the tvbuff before making them and returning "no"
* if they would fail.
*/
failed = FALSE;
TRY {
/* could be BER */
get_ber_identifier(tvb, 0, &ber_class, &pc, &tag);
} CATCH_BOUNDS_ERRORS {
failed = TRUE;
} ENDTRY;
if (failed) {
return FALSE;
}
if (((ber_class==BER_CLASS_APP) && ((tag>=101) && (tag<=104)))) {
dissect_t125(tvb, pinfo, parent_tree, NULL);
return TRUE;
}
/*
* Check that the first byte of the packet is a valid t125/MCS header.
* This might not be enough, but since t125 only catch COTP packets,
* it should not be a problem.
*/
guint8 first_byte = tvb_get_guint8(tvb, 0) >> 2;
switch (first_byte) {
case HF_T125_ERECT_DOMAIN_REQUEST:
case HF_T125_ATTACH_USER_REQUEST:
case HF_T125_ATTACH_USER_CONFIRM:
case HF_T125_CHANNEL_JOIN_REQUEST:
case HF_T125_CHANNEL_JOIN_CONFIRM:
case HF_T125_DISCONNECT_PROVIDER_ULTIMATUM:
case HF_T125_SEND_DATA_REQUEST:
case HF_T125_SEND_DATA_INDICATION:
dissect_t125(tvb, pinfo, parent_tree, NULL);
return TRUE;
}
return FALSE;
}
/*--- proto_register_t125 -------------------------------------------*/
void proto_register_t125(void) {
/* List of fields */
static hf_register_info hf[] = {
{ &hf_t125_ConnectMCSPDU_PDU,
{ "ConnectMCSPDU", "t125.ConnectMCSPDU",
FT_UINT32, BASE_DEC, VALS(t125_ConnectMCSPDU_vals), 0,
NULL, HFILL }},
{ &hf_t125_maxChannelIds,
{ "maxChannelIds", "t125.maxChannelIds",
FT_UINT64, BASE_DEC, NULL, 0,
"INTEGER_0_MAX", HFILL }},
{ &hf_t125_maxUserIds,
{ "maxUserIds", "t125.maxUserIds",
FT_UINT64, BASE_DEC, NULL, 0,
"INTEGER_0_MAX", HFILL }},
{ &hf_t125_maxTokenIds,
{ "maxTokenIds", "t125.maxTokenIds",
FT_UINT64, BASE_DEC, NULL, 0,
"INTEGER_0_MAX", HFILL }},
{ &hf_t125_numPriorities,
{ "numPriorities", "t125.numPriorities",
FT_UINT64, BASE_DEC, NULL, 0,
"INTEGER_0_MAX", HFILL }},
{ &hf_t125_minThroughput,
{ "minThroughput", "t125.minThroughput",
FT_UINT64, BASE_DEC, NULL, 0,
"INTEGER_0_MAX", HFILL }},
{ &hf_t125_maxHeight,
{ "maxHeight", "t125.maxHeight",
FT_UINT64, BASE_DEC, NULL, 0,
"INTEGER_0_MAX", HFILL }},
{ &hf_t125_maxMCSPDUsize,
{ "maxMCSPDUsize", "t125.maxMCSPDUsize",
FT_UINT64, BASE_DEC, NULL, 0,
"INTEGER_0_MAX", HFILL }},
{ &hf_t125_protocolVersion,
{ "protocolVersion", "t125.protocolVersion",
FT_UINT64, BASE_DEC, NULL, 0,
"INTEGER_0_MAX", HFILL }},
{ &hf_t125_callingDomainSelector,
{ "callingDomainSelector", "t125.callingDomainSelector",
FT_BYTES, BASE_NONE, NULL, 0,
"OCTET_STRING", HFILL }},
{ &hf_t125_calledDomainSelector,
{ "calledDomainSelector", "t125.calledDomainSelector",
FT_BYTES, BASE_NONE, NULL, 0,
"OCTET_STRING", HFILL }},
{ &hf_t125_upwardFlag,
{ "upwardFlag", "t125.upwardFlag",
FT_BOOLEAN, BASE_NONE, NULL, 0,
"BOOLEAN", HFILL }},
{ &hf_t125_targetParameters,
{ "targetParameters", "t125.targetParameters_element",
FT_NONE, BASE_NONE, NULL, 0,
"DomainParameters", HFILL }},
{ &hf_t125_minimumParameters,
{ "minimumParameters", "t125.minimumParameters_element",
FT_NONE, BASE_NONE, NULL, 0,
"DomainParameters", HFILL }},
{ &hf_t125_maximumParameters,
{ "maximumParameters", "t125.maximumParameters_element",
FT_NONE, BASE_NONE, NULL, 0,
"DomainParameters", HFILL }},
{ &hf_t125_userData,
{ "userData", "t125.userData",
FT_BYTES, BASE_NONE, NULL, 0,
NULL, HFILL }},
{ &hf_t125_result,
{ "result", "t125.result",
FT_UINT32, BASE_DEC, VALS(t125_Result_vals), 0,
NULL, HFILL }},
{ &hf_t125_calledConnectId,
{ "calledConnectId", "t125.calledConnectId",
FT_UINT64, BASE_DEC, NULL, 0,
"INTEGER_0_MAX", HFILL }},
{ &hf_t125_domainParameters,
{ "domainParameters", "t125.domainParameters_element",
FT_NONE, BASE_NONE, NULL, 0,
NULL, HFILL }},
{ &hf_t125_userData_01,
{ "userData", "t125.userData",
FT_BYTES, BASE_NONE, NULL, 0,
"T_userData_01", HFILL }},
{ &hf_t125_dataPriority,
{ "dataPriority", "t125.dataPriority",
FT_UINT32, BASE_DEC, VALS(t125_DataPriority_vals), 0,
NULL, HFILL }},
{ &hf_t125_connect_initial,
{ "connect-initial", "t125.connect_initial_element",
FT_NONE, BASE_NONE, NULL, 0,
NULL, HFILL }},
{ &hf_t125_connect_response,
{ "connect-response", "t125.connect_response_element",
FT_NONE, BASE_NONE, NULL, 0,
NULL, HFILL }},
{ &hf_t125_connect_additional,
{ "connect-additional", "t125.connect_additional_element",
FT_NONE, BASE_NONE, NULL, 0,
NULL, HFILL }},
{ &hf_t125_connect_result,
{ "connect-result", "t125.connect_result_element",
FT_NONE, BASE_NONE, NULL, 0,
NULL, HFILL }},
};
/* List of subtrees */
static gint *ett[] = {
&ett_t125,
&ett_t125_DomainParameters,
&ett_t125_Connect_Initial_U,
&ett_t125_Connect_Response_U,
&ett_t125_Connect_Additional_U,
&ett_t125_Connect_Result_U,
&ett_t125_ConnectMCSPDU,
};
/* Register protocol */
proto_t125 = proto_register_protocol(PNAME, PSNAME, PFNAME);
/* Register fields and subtrees */
proto_register_field_array(proto_t125, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
t125_heur_subdissector_list= register_heur_dissector_list("t125", proto_t125);
register_dissector("t125", dissect_t125, proto_t125);
}
/*--- proto_reg_handoff_t125 ---------------------------------------*/
void proto_reg_handoff_t125(void) {
heur_dissector_add("cotp", dissect_t125_heur, "T.125 over COTP", "t125_cotp", proto_t125, HEURISTIC_ENABLE);
heur_dissector_add("cotp_is", dissect_t125_heur, "T.125 over COTP (inactive subset)", "t125_cotp_is", proto_t125, HEURISTIC_ENABLE);
}
|