aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gdt.c
blob: 8ddfea08f6787086c235dac8ebd54a3cd6df1c3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
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
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
/* Do not modify this file. Changes will be overwritten.                      */
/* Generated automatically by the ASN.1 to Wireshark dissector compiler       */
/* packet-gdt.c                                                               */
/* asn2wrs.py -b -L -p gdt -c ./gdt.cnf -s ./packet-gdt-template -D . -O ../.. gdt.asn */

/* packet-gdt-template.c
 *
 * Copyright 2022, Damir Franusic <damir.franusic@gmail.com>
 *
 * 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 <glib.h>
#include <epan/packet.h>
#include <epan/conversation.h>
#include <epan/sctpppids.h>

#include <stdio.h>
#include <string.h>

#include "packet-ber.h"
#include "packet-gdt.h"

#define PNAME  "Generic Data Transfer Protocol"
#define PSNAME "GDT"
#define PFNAME "gdt"

/* Initialize the protocol and registered fields */
static int proto_gdt = -1;
static dissector_handle_t gdt_handle = NULL;

static int hf_gdt_GDTMessage_PDU = -1;            /* GDTMessage */
static int hf_gdt_version = -1;                   /* INTEGER */
static int hf_gdt_source = -1;                    /* EndPointDescriptor */
static int hf_gdt_destination = -1;               /* EndPointDescriptor */
static int hf_gdt_uuid = -1;                      /* OCTET_STRING */
static int hf_gdt_sequence_num = -1;              /* INTEGER */
static int hf_gdt_sequence_flag = -1;             /* SequenceFlag */
static int hf_gdt_enc_info = -1;                  /* EncryptionInfo */
static int hf_gdt_hop_info = -1;                  /* HopInfo */
static int hf_gdt_status = -1;                    /* ErrorCode */
static int hf_gdt_type = -1;                      /* IA5String */
static int hf_gdt_end_point_id = -1;              /* IA5String */
static int hf_gdt_encrypted_data = -1;            /* OCTET_STRING */
static int hf_gdt_packet_fwd = -1;                /* PacketFwdMessage */
static int hf_gdt_filter = -1;                    /* FilterMessage */
static int hf_gdt_data_retention = -1;            /* DataRetentionMessage */
static int hf_gdt_conf = -1;                      /* ConfigMessage */
static int hf_gdt_stats = -1;                     /* StatsMessage */
static int hf_gdt_auth = -1;                      /* AuthMessage */
static int hf_gdt_reg = -1;                       /* RegistrationMessage */
static int hf_gdt_ntfy = -1;                      /* NotifyMessage */
static int hf_gdt_data = -1;                      /* DataMessage */
static int hf_gdt_routing = -1;                   /* RoutingMessage */
static int hf_gdt_service_msg = -1;               /* ServiceMessage */
static int hf_gdt_state_msg = -1;                 /* StateMessage */
static int hf_gdt_stmch_id = -1;                  /* OCTET_STRING */
static int hf_gdt_state_action = -1;              /* StateAction */
static int hf_gdt_params = -1;                    /* Parameters */
static int hf_gdt_service_id = -1;                /* ServiceId */
static int hf_gdt_service_action = -1;            /* ServiceAction */
static int hf_gdt_routing_action = -1;            /* RoutingAction */
static int hf_gdt_reg_action = -1;                /* RegistrationAction */
static int hf_gdt_stats_action = -1;              /* StatsAction */
static int hf_gdt_auth_action = -1;               /* AuthAction */
static int hf_gdt_payload_type = -1;              /* PayloadType */
static int hf_gdt_payload = -1;                   /* OCTET_STRING */
static int hf_gdt_dr_action = -1;                 /* DataRetentionAction */
static int hf_gdt_filter_action = -1;             /* FilterAction */
static int hf_gdt_message_type = -1;              /* NotifyMessageType */
static int hf_gdt_message = -1;                   /* OCTET_STRING */
static int hf_gdt_action = -1;                    /* ConfigAction */
static int hf_gdt_parameter_type_id = -1;         /* ParameterType */
static int hf_gdt_value = -1;                     /* T_value */
static int hf_gdt_value_item = -1;                /* OCTET_STRING */
static int hf_gdt_Parameters_item = -1;           /* Parameter */
static int hf_gdt_current_hop = -1;               /* INTEGER */
static int hf_gdt_max_hops = -1;                  /* INTEGER */
static int hf_gdt_header = -1;                    /* Header */
static int hf_gdt_body = -1;                      /* Body */
static int hf_gdt_enc_type = -1;                  /* OCTET_STRING */

/* Initialize the subtree pointers */
static int ett_gdt = -1;
static gint ett_gdt_Header = -1;
static gint ett_gdt_EndPointDescriptor = -1;
static gint ett_gdt_Body = -1;
static gint ett_gdt_StateMessage = -1;
static gint ett_gdt_ServiceMessage = -1;
static gint ett_gdt_RoutingMessage = -1;
static gint ett_gdt_RegistrationMessage = -1;
static gint ett_gdt_StatsMessage = -1;
static gint ett_gdt_AuthMessage = -1;
static gint ett_gdt_DataRetentionMessage = -1;
static gint ett_gdt_FilterMessage = -1;
static gint ett_gdt_PacketFwdMessage = -1;
static gint ett_gdt_NotifyMessage = -1;
static gint ett_gdt_DataMessage = -1;
static gint ett_gdt_ConfigMessage = -1;
static gint ett_gdt_Parameter = -1;
static gint ett_gdt_T_value = -1;
static gint ett_gdt_Parameters = -1;
static gint ett_gdt_HopInfo = -1;
static gint ett_gdt_GDTMessage = -1;
static gint ett_gdt_EncryptionInfo = -1;



static int
dissect_gdt_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
                                                NULL);

  return offset;
}



static int
dissect_gdt_IA5String(gboolean 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_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
                                            actx, tree, tvb, offset, hf_index,
                                            NULL);

  return offset;
}


static const ber_sequence_t EndPointDescriptor_sequence[] = {
  { &hf_gdt_type            , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_gdt_IA5String },
  { &hf_gdt_end_point_id    , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_gdt_IA5String },
  { NULL, 0, 0, 0, NULL }
};

static int
dissect_gdt_EndPointDescriptor(gboolean 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,
                                   EndPointDescriptor_sequence, hf_index, ett_gdt_EndPointDescriptor);

  return offset;
}



static int
dissect_gdt_OCTET_STRING(gboolean 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 const value_string gdt_SequenceFlag_vals[] = {
  {   0, "sf-start" },
  {   1, "sf-continue" },
  {   2, "sf-end" },
  {   3, "sf-stateless-no-reply" },
  {   4, "sf-stateless" },
  {   5, "sf-stream-complete" },
  {   6, "sf-continue-wait" },
  {   7, "sf-heartbeat" },
  { 0, NULL }
};


static int
dissect_gdt_SequenceFlag(gboolean 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 const value_string gdt_ParameterType_vals[] = {
  { 6000, "pt-mink-daemon-type" },
  { 6001, "pt-mink-daemon-id" },
  { 6002, "pt-mink-auth-id" },
  { 6003, "pt-mink-auth-password" },
  { 6004, "pt-mink-daemon-ip" },
  { 6005, "pt-mink-daemon-port" },
  { 6006, "pt-mink-daemon-description" },
  { 6007, "pt-mink-action" },
  { 6008, "pt-mink-dpi" },
  { 6009, "pt-mink-spi" },
  { 6010, "pt-mink-timestamp" },
  { 6011, "pt-mink-timestamp-nsec" },
  { 6012, "pt-mink-security-phase" },
  { 6013, "pt-mink-loop-count" },
  { 6014, "pt-mink-checksum" },
  { 6015, "pt-mink-timeout" },
  { 6016, "pt-mink-error" },
  { 6017, "pt-mink-error-msg" },
  { 6018, "pt-mink-status" },
  { 6019, "pt-mink-status-msg" },
  { 6020, "pt-mink-persistent-correlation" },
  { 6100, "pt-mink-routing-destination" },
  { 6101, "pt-mink-routing-source" },
  { 6102, "pt-mink-routing-gateway" },
  { 6103, "pt-mink-routing-interface" },
  { 6104, "pt-mink-routing-priority" },
  { 6105, "pt-mink-router-status" },
  { 6106, "pt-mink-routing-destination-type" },
  { 6107, "pt-mink-routing-index" },
  { 6108, "pt-mink-trunk-label" },
  { 6109, "pt-mink-connection-type" },
  { 6110, "pt-mink-service-id" },
  { 6111, "pt-mink-command-id" },
  { 6112, "pt-mink-routing-sub-destination" },
  { 6113, "pt-mink-routing-sub-destination-type" },
  { 6114, "pt-mink-correlation-notification" },
  { 6115, "pt-mink-guid" },
  { 6116, "pt-mink-routing-service-id" },
  { 6200, "pt-mink-event-id" },
  { 6201, "pt-mink-event-description" },
  { 6202, "pt-mink-event-callback-id" },
  { 6203, "pt-mink-event-callback-priority" },
  { 6300, "pt-mink-enc-public-key" },
  { 6301, "pt-mink-enc-private-key" },
  { 6302, "pt-mink-enc-type" },
  { 6400, "pt-mink-stats-id" },
  { 6401, "pt-mink-stats-description" },
  { 6402, "pt-mink-stats-value" },
  { 6403, "pt-mink-stats-count" },
  { 7400, "pt-mink-config-param-name" },
  { 7401, "pt-mink-config-param-value" },
  { 7402, "pt-mink-config-ac-line" },
  { 7403, "pt-mink-config-cfg-item-name" },
  { 7404, "pt-mink-config-cfg-item-desc" },
  { 7405, "pt-mink-config-cfg-item-ns" },
  { 7406, "pt-mink-config-cfg-item-value" },
  { 7407, "pt-mink-config-cfg-item-nvalue" },
  { 7408, "pt-mink-config-cfg-item-nt" },
  { 7409, "pt-mink-config-cfg-cm-mode" },
  { 7410, "pt-mink-config-cfg-ac-err" },
  { 7411, "pt-mink-config-cli-path" },
  { 7412, "pt-mink-config-cfg-line" },
  { 7413, "pt-mink-config-ac-err-count" },
  { 7414, "pt-mink-config-cfg-line-count" },
  { 7415, "pt-mink-config-cfg-item-path" },
  { 7416, "pt-mink-config-cfg-item-notify" },
  { 7417, "pt-mink-config-cfg-item-count" },
  { 7418, "pt-mink-config-replication-line" },
  { 7500, "pt-mink-sms-status" },
  { 7501, "pt-mink-sms-uuid" },
  { 7600, "pt-mink-filter-result" },
  { 7601, "pt-mink-filter-exit" },
  { 7602, "pt-mink-filter-list-id" },
  { 7603, "pt-mink-filter-list-label" },
  { 7604, "pt-mink-filter-data" },
  { 7605, "pt-mink-filter-data-size" },
  { 600, "pt-eth-destination-mac" },
  { 601, "pt-eth-source-mac" },
  { 700, "pt-ip-destination-ip" },
  { 701, "pt-ip-source-ip" },
  { 800, "pt-tcp-destination-port" },
  { 801, "pt-tcp-source-port" },
  { 900, "pt-udp-destination-port" },
  { 901, "pt-udp-source-port" },
  { 1000, "pt-sctp-destination-port" },
  { 1001, "pt-sctp-source-port" },
  { 500, "pt-gsmmap-scoa-digits" },
  { 501, "pt-gsmmap-scoa-type-of-number" },
  { 502, "pt-gsmmap-scoa-numbering-plan" },
  { 503, "pt-gsmmap-scda-digits" },
  { 504, "pt-gsmmap-scda-type-of-number" },
  { 505, "pt-gsmmap-scda-numbering-plan" },
  { 506, "pt-gsmmap-imsi" },
  { 507, "pt-gsmmap-msisdn-digits" },
  { 508, "pt-gsmmap-msisdn-type-of-number" },
  { 509, "pt-gsmmap-msisdn-numbering-plan" },
  { 510, "pt-tcap-source-transaction-id" },
  { 511, "pt-tcap-destination-transaction-id" },
  { 512, "pt-tcap-opcode" },
  { 513, "pt-tcap-component-type" },
  { 514, "pt-tcap-component-invoke-id" },
  { 515, "pt-tcap-error-type" },
  { 516, "pt-tcap-error-code" },
  { 517, "pt-tcap-dialogue-context-oid" },
  { 518, "pt-tcap-message-type" },
  { 519, "pt-gsmmap-nnn-digits" },
  { 520, "pt-gsmmap-nnn-type-of-number" },
  { 521, "pt-gsmmap-nnn-numbering-plan" },
  { 522, "pt-gsmmap-an-digits" },
  { 523, "pt-gsmmap-an-type-of-number" },
  { 524, "pt-gsmmap-an-numbering-plan" },
  { 525, "pt-gsmmap-sca-digits" },
  { 526, "pt-gsmmap-sca-type-of-number" },
  { 527, "pt-gsmmap-sca-numbering-plan" },
  { 528, "pt-tcap-component-count" },
  { 529, "pt-tcap-dialogue-context-supported" },
  { 530, "pt-tcap-component-index" },
  { 531, "pt-tcap-source-transaction-id-length" },
  { 532, "pt-tcap-destination-transaction-id-length" },
  { 533, "pt-gsmmap-version" },
  { 400, "pt-smstpdu-tp-udhi" },
  { 401, "pt-smstpdu-tp-sri" },
  { 402, "pt-smstpdu-tp-mms" },
  { 403, "pt-smstpdu-tp-mti" },
  { 404, "pt-smstpdu-tp-oa-type-of-number" },
  { 405, "pt-smstpdu-tp-oa-numbering-plan" },
  { 406, "pt-smstpdu-tp-oa-digits" },
  { 407, "pt-smstpdu-tp-pid" },
  { 408, "pt-smstpdu-tp-dcs" },
  { 409, "pt-smstpdu-tp-scts" },
  { 410, "pt-smstpdu-tp-udl" },
  { 411, "pt-smstpdu-tp-ud" },
  { 412, "pt-smstpdu-tp-rp" },
  { 413, "pt-smstpdu-tp-srr" },
  { 414, "pt-smstpdu-tp-vpf" },
  { 415, "pt-smstpdu-tp-rd" },
  { 416, "pt-smstpdu-tp-da-type-of-number" },
  { 417, "pt-smstpdu-tp-da-numbering-plan" },
  { 418, "pt-smstpdu-tp-da-digits" },
  { 419, "pt-smstpdu-tp-vp" },
  { 420, "pt-smstpdu-msg-id" },
  { 421, "pt-smstpdu-msg-parts" },
  { 422, "pt-smstpdu-msg-part" },
  { 423, "pt-smstpdu-tp-mr" },
  { 424, "pt-smstpdu-message-class" },
  { 300, "pt-sccp-destination-local-reference" },
  { 301, "pt-sccp-source-local-reference" },
  { 302, "pt-sccp-called-party" },
  { 303, "pt-sccp-calling-party" },
  { 304, "pt-sccp-protocol-class" },
  { 305, "pt-sccp-segmenting-reassembling" },
  { 306, "pt-sccp-receive-sequence-number" },
  { 307, "pt-sccp-sequencing-segmenting" },
  { 308, "pt-sccp-credit" },
  { 309, "pt-sccp-release-cause" },
  { 310, "pt-sccp-return-cause" },
  { 311, "pt-sccp-reset-cause" },
  { 312, "pt-sccp-error-cause" },
  { 313, "pt-sccp-refusal-cause" },
  { 314, "pt-sccp-data" },
  { 315, "pt-sccp-segmentation" },
  { 316, "pt-sccp-hop-counter" },
  { 317, "pt-sccp-importance" },
  { 318, "pt-sccp-long-data" },
  { 319, "pt-sccp-called-pa-routing-indicator" },
  { 320, "pt-sccp-called-pa-global-title-indicator" },
  { 321, "pt-sccp-called-pa-ssn-indicator" },
  { 322, "pt-sccp-called-pa-point-code-indicator" },
  { 323, "pt-sccp-called-pa-point-code-number" },
  { 324, "pt-sccp-called-pa-subsystem-number" },
  { 325, "pt-sccp-called-pa-gt-numbering-plan" },
  { 326, "pt-sccp-called-pa-gt-encoding-scheme" },
  { 327, "pt-sccp-called-pa-gt-nature-of-address" },
  { 328, "pt-sccp-called-pa-gt-address" },
  { 329, "pt-sccp-called-pa-gt-translation-type" },
  { 330, "pt-sccp-calling-pa-routing-indicator" },
  { 331, "pt-sccp-calling-pa-global-title-indicator" },
  { 332, "pt-sccp-calling-pa-ssn-indicator" },
  { 333, "pt-sccp-calling-pa-point-code-indicator" },
  { 334, "pt-sccp-calling-pa-point-code-number" },
  { 335, "pt-sccp-calling-pa-subsystem-number" },
  { 336, "pt-sccp-calling-pa-gt-numbering-plan" },
  { 337, "pt-sccp-calling-pa-gt-encoding-scheme" },
  { 338, "pt-sccp-calling-pa-gt-nature-of-address" },
  { 339, "pt-sccp-calling-pa-gt-address" },
  { 340, "pt-sccp-calling-pa-gt-translation-type" },
  { 341, "pt-sccp-message-type" },
  { 200, "pt-m3ua-info-string" },
  { 201, "pt-m3ua-routing-context" },
  { 202, "pt-m3ua-diagnostic-info" },
  { 203, "pt-m3ua-heartbeat" },
  { 204, "pt-m3ua-traffic-mode-type" },
  { 205, "pt-m3ua-error-code" },
  { 206, "pt-m3ua-status" },
  { 207, "pt-m3ua-asp-identifier" },
  { 208, "pt-m3ua-affected-point-code" },
  { 209, "pt-m3ua-correlation-id" },
  { 210, "pt-m3ua-network-appearance" },
  { 211, "pt-m3ua-user-cause" },
  { 212, "pt-m3ua-congestion-indications" },
  { 213, "pt-m3ua-concerned-destination" },
  { 214, "pt-m3ua-routing-key" },
  { 215, "pt-m3ua-registration-result" },
  { 216, "pt-m3ua-deregistration-result" },
  { 217, "pt-m3ua-local-routing-key-identifier" },
  { 218, "pt-m3ua-destination-point-code" },
  { 219, "pt-m3ua-service-indicators" },
  { 220, "pt-m3ua-origination-point-code-list" },
  { 221, "pt-m3ua-circuit-range" },
  { 222, "pt-m3ua-protocol-data" },
  { 223, "pt-m3ua-protocol-data-service-indicator" },
  { 224, "pt-m3ua-protocol-data-network-indicator" },
  { 225, "pt-m3ua-protocol-data-message-priority" },
  { 226, "pt-m3ua-protocol-data-destination-point-code" },
  { 227, "pt-m3ua-protocol-data-originating-point-code" },
  { 228, "pt-m3ua-protocol-data-signalling-link-selection-code" },
  { 229, "pt-m3ua-registration-status" },
  { 230, "pt-m3ua-deregistration-status" },
  { 231, "pt-m3ua-header-data" },
  { 232, "pt-m3ua-as-label" },
  { 233, "pt-m3ua-asp-label" },
  { 0, NULL }
};


static int
dissect_gdt_ParameterType(gboolean 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 const ber_sequence_t T_value_sequence_of[1] = {
  { &hf_gdt_value_item      , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_gdt_OCTET_STRING },
};

static int
dissect_gdt_T_value(gboolean 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_of(implicit_tag, actx, tree, tvb, offset,
                                      T_value_sequence_of, hf_index, ett_gdt_T_value);

  return offset;
}


static const ber_sequence_t Parameter_sequence[] = {
  { &hf_gdt_parameter_type_id, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_ParameterType },
  { &hf_gdt_value           , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_T_value },
  { NULL, 0, 0, 0, NULL }
};

static int
dissect_gdt_Parameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
                                   Parameter_sequence, hf_index, ett_gdt_Parameter);

  return offset;
}


static const ber_sequence_t Parameters_sequence_of[1] = {
  { &hf_gdt_Parameters_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_gdt_Parameter },
};

static int
dissect_gdt_Parameters(gboolean 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_of(implicit_tag, actx, tree, tvb, offset,
                                      Parameters_sequence_of, hf_index, ett_gdt_Parameters);

  return offset;
}


static const ber_sequence_t EncryptionInfo_sequence[] = {
  { &hf_gdt_enc_type        , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_gdt_OCTET_STRING },
  { &hf_gdt_params          , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
  { NULL, 0, 0, 0, NULL }
};

static int
dissect_gdt_EncryptionInfo(gboolean 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,
                                   EncryptionInfo_sequence, hf_index, ett_gdt_EncryptionInfo);

  return offset;
}


static const ber_sequence_t HopInfo_sequence[] = {
  { &hf_gdt_current_hop     , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_gdt_INTEGER },
  { &hf_gdt_max_hops        , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_gdt_INTEGER },
  { NULL, 0, 0, 0, NULL }
};

static int
dissect_gdt_HopInfo(gboolean 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,
                                   HopInfo_sequence, hf_index, ett_gdt_HopInfo);

  return offset;
}


static const value_string gdt_ErrorCode_vals[] = {
  {   0, "err-ok" },
  {   1, "err-out-of-sequence" },
  {   2, "err-unknown-sequence" },
  {   3, "err-unsupported-version" },
  {   4, "err-timeout" },
  {   5, "err-unknown-route" },
  {   6, "err-routing-not-supported" },
  {   7, "err-max-hops-exceeded" },
  { 255, "err-unknown-error" },
  { 0, NULL }
};


static int
dissect_gdt_ErrorCode(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
                                                NULL);

  return offset;
}


static const ber_sequence_t Header_sequence[] = {
  { &hf_gdt_version         , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_gdt_INTEGER },
  { &hf_gdt_source          , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_gdt_EndPointDescriptor },
  { &hf_gdt_destination     , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_gdt_EndPointDescriptor },
  { &hf_gdt_uuid            , BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_gdt_OCTET_STRING },
  { &hf_gdt_sequence_num    , BER_CLASS_CON, 4, BER_FLAGS_IMPLTAG, dissect_gdt_INTEGER },
  { &hf_gdt_sequence_flag   , BER_CLASS_CON, 5, BER_FLAGS_IMPLTAG, dissect_gdt_SequenceFlag },
  { &hf_gdt_enc_info        , BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_gdt_EncryptionInfo },
  { &hf_gdt_hop_info        , BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_gdt_HopInfo },
  { &hf_gdt_status          , BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_gdt_ErrorCode },
  { NULL, 0, 0, 0, NULL }
};

static int
dissect_gdt_Header(gboolean 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,
                                   Header_sequence, hf_index, ett_gdt_Header);

  return offset;
}


static const value_string gdt_PayloadType_vals[] = {
  { 1000, "dmt-unknown" },
  { 2000, "dmt-r14p" },
  {   0, "dmt-layer2" },
  {   1, "dmt-ip" },
  {   2, "dmt-sctp" },
  {   3, "dmt-tcp" },
  {   4, "dmt-udp" },
  {   5, "dmt-m3ua" },
  {   6, "dmt-m2ua" },
  {   7, "dmt-mtp3" },
  {   8, "dmt-isup" },
  {   9, "dmt-h248" },
  {  10, "dmt-sccp" },
  {  11, "dmt-smstpdu" },
  {  12, "dmt-smpp" },
  {  13, "dmt-tcap" },
  {  14, "dmt-rtp" },
  {  15, "dmt-sip" },
  {  16, "dmt-pop3" },
  {  17, "dmt-imap" },
  {  18, "dmt-http" },
  {  19, "dmt-radius" },
  {  20, "dmt-dhcp" },
  {  21, "dmt-smtp" },
  {  22, "dmt-m2pa" },
  {  23, "dmt-mtp2" },
  { 0, NULL }
};


static int
dissect_gdt_PayloadType(gboolean 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 const ber_sequence_t PacketFwdMessage_sequence[] = {
  { &hf_gdt_payload_type    , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_PayloadType },
  { &hf_gdt_payload         , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_OCTET_STRING },
  { &hf_gdt_params          , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
  { NULL, 0, 0, 0, NULL }
};

static int
dissect_gdt_PacketFwdMessage(gboolean 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,
                                   PacketFwdMessage_sequence, hf_index, ett_gdt_PacketFwdMessage);

  return offset;
}


static const value_string gdt_FilterAction_vals[] = {
  {   0, "fa-filter-request" },
  {   1, "fa-filter-result" },
  { 0, NULL }
};


static int
dissect_gdt_FilterAction(gboolean 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 const ber_sequence_t FilterMessage_sequence[] = {
  { &hf_gdt_filter_action   , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_FilterAction },
  { &hf_gdt_params          , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
  { NULL, 0, 0, 0, NULL }
};

static int
dissect_gdt_FilterMessage(gboolean 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,
                                   FilterMessage_sequence, hf_index, ett_gdt_FilterMessage);

  return offset;
}


static const value_string gdt_DataRetentionAction_vals[] = {
  {   0, "ra-store" },
  {   1, "ra-delete" },
  {   2, "ra-fetch" },
  {   3, "ra-result" },
  { 0, NULL }
};


static int
dissect_gdt_DataRetentionAction(gboolean 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 const ber_sequence_t DataRetentionMessage_sequence[] = {
  { &hf_gdt_payload_type    , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_PayloadType },
  { &hf_gdt_payload         , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_OCTET_STRING },
  { &hf_gdt_dr_action       , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_DataRetentionAction },
  { &hf_gdt_params          , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
  { NULL, 0, 0, 0, NULL }
};

static int
dissect_gdt_DataRetentionMessage(gboolean 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,
                                   DataRetentionMessage_sequence, hf_index, ett_gdt_DataRetentionMessage);

  return offset;
}


static const value_string gdt_ConfigAction_vals[] = {
  {   0, "ca-cfg-get" },
  {   1, "ca-cfg-set" },
  {   2, "ca-cfg-replicate" },
  {   3, "ca-cfg-ac" },
  {   4, "ca-cfg-result" },
  {   5, "ca-cfg-user-login" },
  {   6, "ca-cfg-user-logout" },
  { 0, NULL }
};


static int
dissect_gdt_ConfigAction(gboolean 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 const ber_sequence_t ConfigMessage_sequence[] = {
  { &hf_gdt_action          , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_ConfigAction },
  { &hf_gdt_payload         , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_OCTET_STRING },
  { &hf_gdt_params          , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
  { NULL, 0, 0, 0, NULL }
};

static int
dissect_gdt_ConfigMessage(gboolean 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,
                                   ConfigMessage_sequence, hf_index, ett_gdt_ConfigMessage);

  return offset;
}


static const value_string gdt_StatsAction_vals[] = {
  {   0, "sa-request" },
  {   1, "sa-result" },
  { 0, NULL }
};


static int
dissect_gdt_StatsAction(gboolean 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 const ber_sequence_t StatsMessage_sequence[] = {
  { &hf_gdt_stats_action    , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_StatsAction },
  { &hf_gdt_params          , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
  { NULL, 0, 0, 0, NULL }
};

static int
dissect_gdt_StatsMessage(gboolean 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,
                                   StatsMessage_sequence, hf_index, ett_gdt_StatsMessage);

  return offset;
}


static const value_string gdt_AuthAction_vals[] = {
  {   0, "aa-auth-request" },
  {   1, "aa-auth-result" },
  { 0, NULL }
};


static int
dissect_gdt_AuthAction(gboolean 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 const ber_sequence_t AuthMessage_sequence[] = {
  { &hf_gdt_auth_action     , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_AuthAction },
  { &hf_gdt_params          , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
  { NULL, 0, 0, 0, NULL }
};

static int
dissect_gdt_AuthMessage(gboolean 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,
                                   AuthMessage_sequence, hf_index, ett_gdt_AuthMessage);

  return offset;
}


static const value_string gdt_RegistrationAction_vals[] = {
  {   0, "ra-reg-request" },
  {   1, "ra-reg-result" },
  { 0, NULL }
};


static int
dissect_gdt_RegistrationAction(gboolean 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 const ber_sequence_t RegistrationMessage_sequence[] = {
  { &hf_gdt_reg_action      , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_RegistrationAction },
  { &hf_gdt_params          , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
  { NULL, 0, 0, 0, NULL }
};

static int
dissect_gdt_RegistrationMessage(gboolean 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,
                                   RegistrationMessage_sequence, hf_index, ett_gdt_RegistrationMessage);

  return offset;
}



static int
dissect_gdt_NotifyMessageType(gboolean 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 const ber_sequence_t NotifyMessage_sequence[] = {
  { &hf_gdt_message_type    , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_NotifyMessageType },
  { &hf_gdt_message         , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_OCTET_STRING },
  { &hf_gdt_params          , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
  { NULL, 0, 0, 0, NULL }
};

static int
dissect_gdt_NotifyMessage(gboolean 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,
                                   NotifyMessage_sequence, hf_index, ett_gdt_NotifyMessage);

  return offset;
}


static const ber_sequence_t DataMessage_sequence[] = {
  { &hf_gdt_payload_type    , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_PayloadType },
  { &hf_gdt_payload         , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_OCTET_STRING },
  { &hf_gdt_params          , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
  { NULL, 0, 0, 0, NULL }
};

static int
dissect_gdt_DataMessage(gboolean 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,
                                   DataMessage_sequence, hf_index, ett_gdt_DataMessage);

  return offset;
}


static const value_string gdt_RoutingAction_vals[] = {
  {   0, "roua-route-set" },
  {   1, "roua-route-get" },
  {   2, "roua-route-result" },
  { 0, NULL }
};


static int
dissect_gdt_RoutingAction(gboolean 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 const ber_sequence_t RoutingMessage_sequence[] = {
  { &hf_gdt_routing_action  , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_RoutingAction },
  { &hf_gdt_params          , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
  { NULL, 0, 0, 0, NULL }
};

static int
dissect_gdt_RoutingMessage(gboolean 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,
                                   RoutingMessage_sequence, hf_index, ett_gdt_RoutingMessage);

  return offset;
}


static const value_string gdt_ServiceId_vals[] = {
  {  42, "sid-stp-routing" },
  {  43, "sid-sgn-forward" },
  {  44, "sid-fgn-filtering" },
  {  45, "sid-security" },
  {  46, "sid-pdn-filtering" },
  {  47, "sid-sysagent" },
  { 0, NULL }
};


static int
dissect_gdt_ServiceId(gboolean 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 const value_string gdt_ServiceAction_vals[] = {
  {   0, "srvca-request" },
  {   1, "srvca-result" },
  {   2, "srvca-default" },
  {   3, "srvca-na" },
  { 0, NULL }
};


static int
dissect_gdt_ServiceAction(gboolean 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 const ber_sequence_t ServiceMessage_sequence[] = {
  { &hf_gdt_service_id      , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_ServiceId },
  { &hf_gdt_service_action  , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_ServiceAction },
  { &hf_gdt_params          , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
  { NULL, 0, 0, 0, NULL }
};

static int
dissect_gdt_ServiceMessage(gboolean 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,
                                   ServiceMessage_sequence, hf_index, ett_gdt_ServiceMessage);

  return offset;
}


static const value_string gdt_StateAction_vals[] = {
  {   0, "sta-update" },
  { 0, NULL }
};


static int
dissect_gdt_StateAction(gboolean 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 const ber_sequence_t StateMessage_sequence[] = {
  { &hf_gdt_stmch_id        , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_gdt_OCTET_STRING },
  { &hf_gdt_state_action    , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_StateAction },
  { &hf_gdt_params          , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
  { NULL, 0, 0, 0, NULL }
};

static int
dissect_gdt_StateMessage(gboolean 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,
                                   StateMessage_sequence, hf_index, ett_gdt_StateMessage);

  return offset;
}


static const value_string gdt_Body_vals[] = {
  {   1, "encrypted-data" },
  {   2, "packet-fwd" },
  {   3, "filter" },
  {   4, "data-retention" },
  {   6, "conf" },
  {   7, "stats" },
  {   8, "auth" },
  {   9, "reg" },
  {  10, "ntfy" },
  {  11, "data" },
  {  12, "routing" },
  {  13, "service-msg" },
  {  14, "state-msg" },
  { 0, NULL }
};

static const ber_choice_t Body_choice[] = {
  {   1, &hf_gdt_encrypted_data  , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_gdt_OCTET_STRING },
  {   2, &hf_gdt_packet_fwd      , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_gdt_PacketFwdMessage },
  {   3, &hf_gdt_filter          , BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_gdt_FilterMessage },
  {   4, &hf_gdt_data_retention  , BER_CLASS_CON, 4, BER_FLAGS_IMPLTAG, dissect_gdt_DataRetentionMessage },
  {   6, &hf_gdt_conf            , BER_CLASS_CON, 6, BER_FLAGS_IMPLTAG, dissect_gdt_ConfigMessage },
  {   7, &hf_gdt_stats           , BER_CLASS_CON, 7, BER_FLAGS_IMPLTAG, dissect_gdt_StatsMessage },
  {   8, &hf_gdt_auth            , BER_CLASS_CON, 8, BER_FLAGS_IMPLTAG, dissect_gdt_AuthMessage },
  {   9, &hf_gdt_reg             , BER_CLASS_CON, 9, BER_FLAGS_IMPLTAG, dissect_gdt_RegistrationMessage },
  {  10, &hf_gdt_ntfy            , BER_CLASS_CON, 10, BER_FLAGS_IMPLTAG, dissect_gdt_NotifyMessage },
  {  11, &hf_gdt_data            , BER_CLASS_CON, 11, BER_FLAGS_IMPLTAG, dissect_gdt_DataMessage },
  {  12, &hf_gdt_routing         , BER_CLASS_CON, 12, BER_FLAGS_IMPLTAG, dissect_gdt_RoutingMessage },
  {  13, &hf_gdt_service_msg     , BER_CLASS_CON, 13, BER_FLAGS_IMPLTAG, dissect_gdt_ServiceMessage },
  {  14, &hf_gdt_state_msg       , BER_CLASS_CON, 14, BER_FLAGS_IMPLTAG, dissect_gdt_StateMessage },
  { 0, NULL, 0, 0, 0, NULL }
};

static int
dissect_gdt_Body(gboolean 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,
                                 Body_choice, hf_index, ett_gdt_Body,
                                 NULL);

  return offset;
}


static const ber_sequence_t GDTMessage_sequence[] = {
  { &hf_gdt_header          , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_gdt_Header },
  { &hf_gdt_body            , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_gdt_Body },
  { NULL, 0, 0, 0, NULL }
};

static int
dissect_gdt_GDTMessage(gboolean 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,
                                   GDTMessage_sequence, hf_index, ett_gdt_GDTMessage);

  return offset;
}

/*--- PDUs ---*/

static int dissect_GDTMessage_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_gdt_GDTMessage(FALSE, tvb, offset, &asn1_ctx, tree, hf_gdt_GDTMessage_PDU);
  return offset;
}


static int dissect_gdt(tvbuff_t *tvb,
                       packet_info *pinfo,
                       proto_tree *tree,
                       void *data _U_) {
    proto_item *gdt_item = NULL;
    proto_tree *gdt_tree = NULL;

    /* make entry in the Protocol column on summary display */
    col_set_str(pinfo->cinfo, COL_PROTOCOL, PNAME);

    /* create the gdt protocol tree */
    if (tree) {
        gdt_item = proto_tree_add_item(tree, proto_gdt, tvb, 0, -1, FALSE);
        gdt_tree = proto_item_add_subtree(gdt_item, ett_gdt);
        dissect_GDTMessage_PDU(tvb, pinfo, gdt_tree, 0);
    }
    return tvb_captured_length(tvb);
}

/*--- proto_register_gdt ----------------------------------------------*/
void proto_register_gdt(void) {
    /* List of fields */
    static hf_register_info hf[] = {
    { &hf_gdt_GDTMessage_PDU,
      { "GDTMessage", "gdt.GDTMessage_element",
        FT_NONE, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_gdt_version,
      { "version", "gdt.version",
        FT_INT32, BASE_DEC, NULL, 0,
        "INTEGER", HFILL }},
    { &hf_gdt_source,
      { "source", "gdt.source_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "EndPointDescriptor", HFILL }},
    { &hf_gdt_destination,
      { "destination", "gdt.destination_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "EndPointDescriptor", HFILL }},
    { &hf_gdt_uuid,
      { "uuid", "gdt.uuid",
        FT_BYTES, BASE_NONE, NULL, 0,
        "OCTET_STRING", HFILL }},
    { &hf_gdt_sequence_num,
      { "sequence-num", "gdt.sequence_num",
        FT_INT32, BASE_DEC, NULL, 0,
        "INTEGER", HFILL }},
    { &hf_gdt_sequence_flag,
      { "sequence-flag", "gdt.sequence_flag",
        FT_INT32, BASE_DEC, VALS(gdt_SequenceFlag_vals), 0,
        "SequenceFlag", HFILL }},
    { &hf_gdt_enc_info,
      { "enc-info", "gdt.enc_info_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "EncryptionInfo", HFILL }},
    { &hf_gdt_hop_info,
      { "hop-info", "gdt.hop_info_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "HopInfo", HFILL }},
    { &hf_gdt_status,
      { "status", "gdt.status",
        FT_INT32, BASE_DEC, VALS(gdt_ErrorCode_vals), 0,
        "ErrorCode", HFILL }},
    { &hf_gdt_type,
      { "type", "gdt.type",
        FT_STRING, BASE_NONE, NULL, 0,
        "IA5String", HFILL }},
    { &hf_gdt_end_point_id,
      { "id", "gdt.end_point_id",
        FT_STRING, BASE_NONE, NULL, 0,
        "IA5String", HFILL }},
    { &hf_gdt_encrypted_data,
      { "encrypted-data", "gdt.encrypted_data",
        FT_BYTES, BASE_NONE, NULL, 0,
        "OCTET_STRING", HFILL }},
    { &hf_gdt_packet_fwd,
      { "packet-fwd", "gdt.packet_fwd_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "PacketFwdMessage", HFILL }},
    { &hf_gdt_filter,
      { "filter", "gdt.filter_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "FilterMessage", HFILL }},
    { &hf_gdt_data_retention,
      { "data-retention", "gdt.data_retention_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "DataRetentionMessage", HFILL }},
    { &hf_gdt_conf,
      { "conf", "gdt.conf_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "ConfigMessage", HFILL }},
    { &hf_gdt_stats,
      { "stats", "gdt.stats_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "StatsMessage", HFILL }},
    { &hf_gdt_auth,
      { "auth", "gdt.auth_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "AuthMessage", HFILL }},
    { &hf_gdt_reg,
      { "reg", "gdt.reg_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "RegistrationMessage", HFILL }},
    { &hf_gdt_ntfy,
      { "ntfy", "gdt.ntfy_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "NotifyMessage", HFILL }},
    { &hf_gdt_data,
      { "data", "gdt.data_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "DataMessage", HFILL }},
    { &hf_gdt_routing,
      { "routing", "gdt.routing_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "RoutingMessage", HFILL }},
    { &hf_gdt_service_msg,
      { "service-msg", "gdt.service_msg_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "ServiceMessage", HFILL }},
    { &hf_gdt_state_msg,
      { "state-msg", "gdt.state_msg_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "StateMessage", HFILL }},
    { &hf_gdt_stmch_id,
      { "stmch-id", "gdt.stmch_id",
        FT_BYTES, BASE_NONE, NULL, 0,
        "OCTET_STRING", HFILL }},
    { &hf_gdt_state_action,
      { "state-action", "gdt.state_action",
        FT_INT32, BASE_DEC, VALS(gdt_StateAction_vals), 0,
        "StateAction", HFILL }},
    { &hf_gdt_params,
      { "params", "gdt.params",
        FT_UINT32, BASE_DEC, NULL, 0,
        "Parameters", HFILL }},
    { &hf_gdt_service_id,
      { "service-id", "gdt.service_id",
        FT_INT32, BASE_DEC, VALS(gdt_ServiceId_vals), 0,
        "ServiceId", HFILL }},
    { &hf_gdt_service_action,
      { "service-action", "gdt.service_action",
        FT_INT32, BASE_DEC, VALS(gdt_ServiceAction_vals), 0,
        "ServiceAction", HFILL }},
    { &hf_gdt_routing_action,
      { "routing-action", "gdt.routing_action",
        FT_INT32, BASE_DEC, VALS(gdt_RoutingAction_vals), 0,
        "RoutingAction", HFILL }},
    { &hf_gdt_reg_action,
      { "reg-action", "gdt.reg_action",
        FT_INT32, BASE_DEC, VALS(gdt_RegistrationAction_vals), 0,
        "RegistrationAction", HFILL }},
    { &hf_gdt_stats_action,
      { "stats-action", "gdt.stats_action",
        FT_INT32, BASE_DEC, VALS(gdt_StatsAction_vals), 0,
        "StatsAction", HFILL }},
    { &hf_gdt_auth_action,
      { "auth-action", "gdt.auth_action",
        FT_INT32, BASE_DEC, VALS(gdt_AuthAction_vals), 0,
        "AuthAction", HFILL }},
    { &hf_gdt_payload_type,
      { "payload-type", "gdt.payload_type",
        FT_INT32, BASE_DEC, VALS(gdt_PayloadType_vals), 0,
        "PayloadType", HFILL }},
    { &hf_gdt_payload,
      { "payload", "gdt.payload",
        FT_BYTES, BASE_NONE, NULL, 0,
        "OCTET_STRING", HFILL }},
    { &hf_gdt_dr_action,
      { "dr-action", "gdt.dr_action",
        FT_INT32, BASE_DEC, VALS(gdt_DataRetentionAction_vals), 0,
        "DataRetentionAction", HFILL }},
    { &hf_gdt_filter_action,
      { "filter-action", "gdt.filter_action",
        FT_INT32, BASE_DEC, VALS(gdt_FilterAction_vals), 0,
        "FilterAction", HFILL }},
    { &hf_gdt_message_type,
      { "message-type", "gdt.message_type",
        FT_INT32, BASE_DEC, NULL, 0,
        "NotifyMessageType", HFILL }},
    { &hf_gdt_message,
      { "message", "gdt.message",
        FT_BYTES, BASE_NONE, NULL, 0,
        "OCTET_STRING", HFILL }},
    { &hf_gdt_action,
      { "action", "gdt.action",
        FT_INT32, BASE_DEC, VALS(gdt_ConfigAction_vals), 0,
        "ConfigAction", HFILL }},
    { &hf_gdt_parameter_type_id,
      { "id", "gdt.parameter_type_id",
        FT_INT32, BASE_DEC, VALS(gdt_ParameterType_vals), 0,
        "ParameterType", HFILL }},
    { &hf_gdt_value,
      { "value", "gdt.value",
        FT_UINT32, BASE_DEC, NULL, 0,
        NULL, HFILL }},
    { &hf_gdt_value_item,
      { "value item", "gdt.value_item",
        FT_BYTES, BASE_NONE, NULL, 0,
        "OCTET_STRING", HFILL }},
    { &hf_gdt_Parameters_item,
      { "Parameter", "gdt.Parameter_element",
        FT_NONE, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_gdt_current_hop,
      { "current-hop", "gdt.current_hop",
        FT_INT32, BASE_DEC, NULL, 0,
        "INTEGER", HFILL }},
    { &hf_gdt_max_hops,
      { "max-hops", "gdt.max_hops",
        FT_INT32, BASE_DEC, NULL, 0,
        "INTEGER", HFILL }},
    { &hf_gdt_header,
      { "header", "gdt.header_element",
        FT_NONE, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_gdt_body,
      { "body", "gdt.body",
        FT_UINT32, BASE_DEC, VALS(gdt_Body_vals), 0,
        NULL, HFILL }},
    { &hf_gdt_enc_type,
      { "enc-type", "gdt.enc_type",
        FT_BYTES, BASE_NONE, NULL, 0,
        "OCTET_STRING", HFILL }},
    };

    /* List of subtrees */
    static gint *ett[] = {
        &ett_gdt,
    &ett_gdt_Header,
    &ett_gdt_EndPointDescriptor,
    &ett_gdt_Body,
    &ett_gdt_StateMessage,
    &ett_gdt_ServiceMessage,
    &ett_gdt_RoutingMessage,
    &ett_gdt_RegistrationMessage,
    &ett_gdt_StatsMessage,
    &ett_gdt_AuthMessage,
    &ett_gdt_DataRetentionMessage,
    &ett_gdt_FilterMessage,
    &ett_gdt_PacketFwdMessage,
    &ett_gdt_NotifyMessage,
    &ett_gdt_DataMessage,
    &ett_gdt_ConfigMessage,
    &ett_gdt_Parameter,
    &ett_gdt_T_value,
    &ett_gdt_Parameters,
    &ett_gdt_HopInfo,
    &ett_gdt_GDTMessage,
    &ett_gdt_EncryptionInfo,
    };

    /* Register protocol */
    proto_gdt = proto_register_protocol(PNAME, PSNAME, PFNAME);

    /* Register fields and subtrees */
    proto_register_field_array(proto_gdt, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));
}

/*--- proto_reg_handoff_gdt -------------------------------------------*/
void proto_reg_handoff_gdt(void) {
    static gboolean initialized = FALSE;

    if (!initialized) {
        gdt_handle = create_dissector_handle(dissect_gdt, proto_gdt);
        dissector_add_for_decode_as("sctp.ppi", gdt_handle);
        dissector_add_uint("sctp.ppi", GDT_PROTOCOL_ID, gdt_handle);
        initialized = TRUE;
    }
}