Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-gdt.c
blob62e1d79e1fef84fccc4ca3cb2a4c9811225b4d8d
1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
3 /* packet-gdt.c */
4 /* asn2wrs.py -b -q -L -p gdt -c ./gdt.cnf -s ./packet-gdt-template -D . -O ../.. gdt.asn */
6 /* packet-gdt-template.c
8 * Copyright 2022, Damir Franusic <damir.franusic@gmail.com>
10 * Wireshark - Network traffic analyzer
11 * By Gerald Combs <gerald@wireshark.org>
12 * Copyright 1998 Gerald Combs
14 * SPDX-License-Identifier: GPL-2.0-or-later
18 # include "config.h"
20 #include <epan/packet.h>
21 #include <epan/sctpppids.h>
22 #include <wsutil/array.h>
24 #include "packet-ber.h"
25 #include "packet-gdt.h"
27 #define PNAME "Generic Data Transfer Protocol"
28 #define PSNAME "GDT"
29 #define PFNAME "gdt"
31 /* Initialize the protocol and registered fields */
32 static int proto_gdt;
33 static dissector_handle_t gdt_handle;
35 static int hf_gdt_GDTMessage_PDU; /* GDTMessage */
36 static int hf_gdt_version; /* INTEGER */
37 static int hf_gdt_source; /* EndPointDescriptor */
38 static int hf_gdt_destination; /* EndPointDescriptor */
39 static int hf_gdt_uuid; /* OCTET_STRING */
40 static int hf_gdt_sequence_num; /* INTEGER */
41 static int hf_gdt_sequence_flag; /* SequenceFlag */
42 static int hf_gdt_enc_info; /* EncryptionInfo */
43 static int hf_gdt_hop_info; /* HopInfo */
44 static int hf_gdt_status; /* ErrorCode */
45 static int hf_gdt_type; /* IA5String */
46 static int hf_gdt_end_point_id; /* IA5String */
47 static int hf_gdt_encrypted_data; /* OCTET_STRING */
48 static int hf_gdt_packet_fwd; /* PacketFwdMessage */
49 static int hf_gdt_filter; /* FilterMessage */
50 static int hf_gdt_data_retention; /* DataRetentionMessage */
51 static int hf_gdt_conf; /* ConfigMessage */
52 static int hf_gdt_stats; /* StatsMessage */
53 static int hf_gdt_auth; /* AuthMessage */
54 static int hf_gdt_reg; /* RegistrationMessage */
55 static int hf_gdt_ntfy; /* NotifyMessage */
56 static int hf_gdt_data; /* DataMessage */
57 static int hf_gdt_routing; /* RoutingMessage */
58 static int hf_gdt_service_msg; /* ServiceMessage */
59 static int hf_gdt_state_msg; /* StateMessage */
60 static int hf_gdt_stmch_id; /* OCTET_STRING */
61 static int hf_gdt_state_action; /* StateAction */
62 static int hf_gdt_params; /* Parameters */
63 static int hf_gdt_service_id; /* ServiceId */
64 static int hf_gdt_service_action; /* ServiceAction */
65 static int hf_gdt_routing_action; /* RoutingAction */
66 static int hf_gdt_reg_action; /* RegistrationAction */
67 static int hf_gdt_stats_action; /* StatsAction */
68 static int hf_gdt_auth_action; /* AuthAction */
69 static int hf_gdt_payload_type; /* PayloadType */
70 static int hf_gdt_payload; /* OCTET_STRING */
71 static int hf_gdt_dr_action; /* DataRetentionAction */
72 static int hf_gdt_filter_action; /* FilterAction */
73 static int hf_gdt_message_type; /* NotifyMessageType */
74 static int hf_gdt_message; /* OCTET_STRING */
75 static int hf_gdt_action; /* ConfigAction */
76 static int hf_gdt_parameter_type_id; /* ParameterType */
77 static int hf_gdt_value; /* T_value */
78 static int hf_gdt_value_item; /* OCTET_STRING */
79 static int hf_gdt_Parameters_item; /* Parameter */
80 static int hf_gdt_current_hop; /* INTEGER */
81 static int hf_gdt_max_hops; /* INTEGER */
82 static int hf_gdt_header; /* Header */
83 static int hf_gdt_body; /* Body */
84 static int hf_gdt_enc_type; /* OCTET_STRING */
86 /* Initialize the subtree pointers */
87 static int ett_gdt;
88 static int ett_gdt_Header;
89 static int ett_gdt_EndPointDescriptor;
90 static int ett_gdt_Body;
91 static int ett_gdt_StateMessage;
92 static int ett_gdt_ServiceMessage;
93 static int ett_gdt_RoutingMessage;
94 static int ett_gdt_RegistrationMessage;
95 static int ett_gdt_StatsMessage;
96 static int ett_gdt_AuthMessage;
97 static int ett_gdt_DataRetentionMessage;
98 static int ett_gdt_FilterMessage;
99 static int ett_gdt_PacketFwdMessage;
100 static int ett_gdt_NotifyMessage;
101 static int ett_gdt_DataMessage;
102 static int ett_gdt_ConfigMessage;
103 static int ett_gdt_Parameter;
104 static int ett_gdt_T_value;
105 static int ett_gdt_Parameters;
106 static int ett_gdt_HopInfo;
107 static int ett_gdt_GDTMessage;
108 static int ett_gdt_EncryptionInfo;
112 static int
113 dissect_gdt_INTEGER(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
114 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
115 NULL);
117 return offset;
122 static int
123 dissect_gdt_IA5String(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
124 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
125 actx, tree, tvb, offset, hf_index,
126 NULL);
128 return offset;
132 static const ber_sequence_t EndPointDescriptor_sequence[] = {
133 { &hf_gdt_type , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_gdt_IA5String },
134 { &hf_gdt_end_point_id , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_gdt_IA5String },
135 { NULL, 0, 0, 0, NULL }
138 static int
139 dissect_gdt_EndPointDescriptor(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
140 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
141 EndPointDescriptor_sequence, hf_index, ett_gdt_EndPointDescriptor);
143 return offset;
148 static int
149 dissect_gdt_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_) {
150 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
151 NULL);
153 return offset;
157 static const value_string gdt_SequenceFlag_vals[] = {
158 { 0, "sf-start" },
159 { 1, "sf-continue" },
160 { 2, "sf-end" },
161 { 3, "sf-stateless-no-reply" },
162 { 4, "sf-stateless" },
163 { 5, "sf-stream-complete" },
164 { 6, "sf-continue-wait" },
165 { 7, "sf-heartbeat" },
166 { 0, NULL }
170 static int
171 dissect_gdt_SequenceFlag(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
172 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
173 NULL);
175 return offset;
179 static const value_string gdt_ParameterType_vals[] = {
180 { 6000, "pt-mink-daemon-type" },
181 { 6001, "pt-mink-daemon-id" },
182 { 6002, "pt-mink-auth-id" },
183 { 6003, "pt-mink-auth-password" },
184 { 6004, "pt-mink-daemon-ip" },
185 { 6005, "pt-mink-daemon-port" },
186 { 6006, "pt-mink-daemon-description" },
187 { 6007, "pt-mink-action" },
188 { 6008, "pt-mink-dpi" },
189 { 6009, "pt-mink-spi" },
190 { 6010, "pt-mink-timestamp" },
191 { 6011, "pt-mink-timestamp-nsec" },
192 { 6012, "pt-mink-security-phase" },
193 { 6013, "pt-mink-loop-count" },
194 { 6014, "pt-mink-checksum" },
195 { 6015, "pt-mink-timeout" },
196 { 6016, "pt-mink-error" },
197 { 6017, "pt-mink-error-msg" },
198 { 6018, "pt-mink-status" },
199 { 6019, "pt-mink-status-msg" },
200 { 6020, "pt-mink-persistent-correlation" },
201 { 6100, "pt-mink-routing-destination" },
202 { 6101, "pt-mink-routing-source" },
203 { 6102, "pt-mink-routing-gateway" },
204 { 6103, "pt-mink-routing-interface" },
205 { 6104, "pt-mink-routing-priority" },
206 { 6105, "pt-mink-router-status" },
207 { 6106, "pt-mink-routing-destination-type" },
208 { 6107, "pt-mink-routing-index" },
209 { 6108, "pt-mink-trunk-label" },
210 { 6109, "pt-mink-connection-type" },
211 { 6110, "pt-mink-service-id" },
212 { 6111, "pt-mink-command-id" },
213 { 6112, "pt-mink-routing-sub-destination" },
214 { 6113, "pt-mink-routing-sub-destination-type" },
215 { 6114, "pt-mink-correlation-notification" },
216 { 6115, "pt-mink-guid" },
217 { 6116, "pt-mink-routing-service-id" },
218 { 6200, "pt-mink-event-id" },
219 { 6201, "pt-mink-event-description" },
220 { 6202, "pt-mink-event-callback-id" },
221 { 6203, "pt-mink-event-callback-priority" },
222 { 6300, "pt-mink-enc-public-key" },
223 { 6301, "pt-mink-enc-private-key" },
224 { 6302, "pt-mink-enc-type" },
225 { 6400, "pt-mink-stats-id" },
226 { 6401, "pt-mink-stats-description" },
227 { 6402, "pt-mink-stats-value" },
228 { 6403, "pt-mink-stats-count" },
229 { 7400, "pt-mink-config-param-name" },
230 { 7401, "pt-mink-config-param-value" },
231 { 7402, "pt-mink-config-ac-line" },
232 { 7403, "pt-mink-config-cfg-item-name" },
233 { 7404, "pt-mink-config-cfg-item-desc" },
234 { 7405, "pt-mink-config-cfg-item-ns" },
235 { 7406, "pt-mink-config-cfg-item-value" },
236 { 7407, "pt-mink-config-cfg-item-nvalue" },
237 { 7408, "pt-mink-config-cfg-item-nt" },
238 { 7409, "pt-mink-config-cfg-cm-mode" },
239 { 7410, "pt-mink-config-cfg-ac-err" },
240 { 7411, "pt-mink-config-cli-path" },
241 { 7412, "pt-mink-config-cfg-line" },
242 { 7413, "pt-mink-config-ac-err-count" },
243 { 7414, "pt-mink-config-cfg-line-count" },
244 { 7415, "pt-mink-config-cfg-item-path" },
245 { 7416, "pt-mink-config-cfg-item-notify" },
246 { 7417, "pt-mink-config-cfg-item-count" },
247 { 7418, "pt-mink-config-replication-line" },
248 { 7500, "pt-mink-sms-status" },
249 { 7501, "pt-mink-sms-uuid" },
250 { 7600, "pt-mink-filter-result" },
251 { 7601, "pt-mink-filter-exit" },
252 { 7602, "pt-mink-filter-list-id" },
253 { 7603, "pt-mink-filter-list-label" },
254 { 7604, "pt-mink-filter-data" },
255 { 7605, "pt-mink-filter-data-size" },
256 { 600, "pt-eth-destination-mac" },
257 { 601, "pt-eth-source-mac" },
258 { 700, "pt-ip-destination-ip" },
259 { 701, "pt-ip-source-ip" },
260 { 800, "pt-tcp-destination-port" },
261 { 801, "pt-tcp-source-port" },
262 { 900, "pt-udp-destination-port" },
263 { 901, "pt-udp-source-port" },
264 { 1000, "pt-sctp-destination-port" },
265 { 1001, "pt-sctp-source-port" },
266 { 500, "pt-gsmmap-scoa-digits" },
267 { 501, "pt-gsmmap-scoa-type-of-number" },
268 { 502, "pt-gsmmap-scoa-numbering-plan" },
269 { 503, "pt-gsmmap-scda-digits" },
270 { 504, "pt-gsmmap-scda-type-of-number" },
271 { 505, "pt-gsmmap-scda-numbering-plan" },
272 { 506, "pt-gsmmap-imsi" },
273 { 507, "pt-gsmmap-msisdn-digits" },
274 { 508, "pt-gsmmap-msisdn-type-of-number" },
275 { 509, "pt-gsmmap-msisdn-numbering-plan" },
276 { 510, "pt-tcap-source-transaction-id" },
277 { 511, "pt-tcap-destination-transaction-id" },
278 { 512, "pt-tcap-opcode" },
279 { 513, "pt-tcap-component-type" },
280 { 514, "pt-tcap-component-invoke-id" },
281 { 515, "pt-tcap-error-type" },
282 { 516, "pt-tcap-error-code" },
283 { 517, "pt-tcap-dialogue-context-oid" },
284 { 518, "pt-tcap-message-type" },
285 { 519, "pt-gsmmap-nnn-digits" },
286 { 520, "pt-gsmmap-nnn-type-of-number" },
287 { 521, "pt-gsmmap-nnn-numbering-plan" },
288 { 522, "pt-gsmmap-an-digits" },
289 { 523, "pt-gsmmap-an-type-of-number" },
290 { 524, "pt-gsmmap-an-numbering-plan" },
291 { 525, "pt-gsmmap-sca-digits" },
292 { 526, "pt-gsmmap-sca-type-of-number" },
293 { 527, "pt-gsmmap-sca-numbering-plan" },
294 { 528, "pt-tcap-component-count" },
295 { 529, "pt-tcap-dialogue-context-supported" },
296 { 530, "pt-tcap-component-index" },
297 { 531, "pt-tcap-source-transaction-id-length" },
298 { 532, "pt-tcap-destination-transaction-id-length" },
299 { 533, "pt-gsmmap-version" },
300 { 400, "pt-smstpdu-tp-udhi" },
301 { 401, "pt-smstpdu-tp-sri" },
302 { 402, "pt-smstpdu-tp-mms" },
303 { 403, "pt-smstpdu-tp-mti" },
304 { 404, "pt-smstpdu-tp-oa-type-of-number" },
305 { 405, "pt-smstpdu-tp-oa-numbering-plan" },
306 { 406, "pt-smstpdu-tp-oa-digits" },
307 { 407, "pt-smstpdu-tp-pid" },
308 { 408, "pt-smstpdu-tp-dcs" },
309 { 409, "pt-smstpdu-tp-scts" },
310 { 410, "pt-smstpdu-tp-udl" },
311 { 411, "pt-smstpdu-tp-ud" },
312 { 412, "pt-smstpdu-tp-rp" },
313 { 413, "pt-smstpdu-tp-srr" },
314 { 414, "pt-smstpdu-tp-vpf" },
315 { 415, "pt-smstpdu-tp-rd" },
316 { 416, "pt-smstpdu-tp-da-type-of-number" },
317 { 417, "pt-smstpdu-tp-da-numbering-plan" },
318 { 418, "pt-smstpdu-tp-da-digits" },
319 { 419, "pt-smstpdu-tp-vp" },
320 { 420, "pt-smstpdu-msg-id" },
321 { 421, "pt-smstpdu-msg-parts" },
322 { 422, "pt-smstpdu-msg-part" },
323 { 423, "pt-smstpdu-tp-mr" },
324 { 424, "pt-smstpdu-message-class" },
325 { 300, "pt-sccp-destination-local-reference" },
326 { 301, "pt-sccp-source-local-reference" },
327 { 302, "pt-sccp-called-party" },
328 { 303, "pt-sccp-calling-party" },
329 { 304, "pt-sccp-protocol-class" },
330 { 305, "pt-sccp-segmenting-reassembling" },
331 { 306, "pt-sccp-receive-sequence-number" },
332 { 307, "pt-sccp-sequencing-segmenting" },
333 { 308, "pt-sccp-credit" },
334 { 309, "pt-sccp-release-cause" },
335 { 310, "pt-sccp-return-cause" },
336 { 311, "pt-sccp-reset-cause" },
337 { 312, "pt-sccp-error-cause" },
338 { 313, "pt-sccp-refusal-cause" },
339 { 314, "pt-sccp-data" },
340 { 315, "pt-sccp-segmentation" },
341 { 316, "pt-sccp-hop-counter" },
342 { 317, "pt-sccp-importance" },
343 { 318, "pt-sccp-long-data" },
344 { 319, "pt-sccp-called-pa-routing-indicator" },
345 { 320, "pt-sccp-called-pa-global-title-indicator" },
346 { 321, "pt-sccp-called-pa-ssn-indicator" },
347 { 322, "pt-sccp-called-pa-point-code-indicator" },
348 { 323, "pt-sccp-called-pa-point-code-number" },
349 { 324, "pt-sccp-called-pa-subsystem-number" },
350 { 325, "pt-sccp-called-pa-gt-numbering-plan" },
351 { 326, "pt-sccp-called-pa-gt-encoding-scheme" },
352 { 327, "pt-sccp-called-pa-gt-nature-of-address" },
353 { 328, "pt-sccp-called-pa-gt-address" },
354 { 329, "pt-sccp-called-pa-gt-translation-type" },
355 { 330, "pt-sccp-calling-pa-routing-indicator" },
356 { 331, "pt-sccp-calling-pa-global-title-indicator" },
357 { 332, "pt-sccp-calling-pa-ssn-indicator" },
358 { 333, "pt-sccp-calling-pa-point-code-indicator" },
359 { 334, "pt-sccp-calling-pa-point-code-number" },
360 { 335, "pt-sccp-calling-pa-subsystem-number" },
361 { 336, "pt-sccp-calling-pa-gt-numbering-plan" },
362 { 337, "pt-sccp-calling-pa-gt-encoding-scheme" },
363 { 338, "pt-sccp-calling-pa-gt-nature-of-address" },
364 { 339, "pt-sccp-calling-pa-gt-address" },
365 { 340, "pt-sccp-calling-pa-gt-translation-type" },
366 { 341, "pt-sccp-message-type" },
367 { 200, "pt-m3ua-info-string" },
368 { 201, "pt-m3ua-routing-context" },
369 { 202, "pt-m3ua-diagnostic-info" },
370 { 203, "pt-m3ua-heartbeat" },
371 { 204, "pt-m3ua-traffic-mode-type" },
372 { 205, "pt-m3ua-error-code" },
373 { 206, "pt-m3ua-status" },
374 { 207, "pt-m3ua-asp-identifier" },
375 { 208, "pt-m3ua-affected-point-code" },
376 { 209, "pt-m3ua-correlation-id" },
377 { 210, "pt-m3ua-network-appearance" },
378 { 211, "pt-m3ua-user-cause" },
379 { 212, "pt-m3ua-congestion-indications" },
380 { 213, "pt-m3ua-concerned-destination" },
381 { 214, "pt-m3ua-routing-key" },
382 { 215, "pt-m3ua-registration-result" },
383 { 216, "pt-m3ua-deregistration-result" },
384 { 217, "pt-m3ua-local-routing-key-identifier" },
385 { 218, "pt-m3ua-destination-point-code" },
386 { 219, "pt-m3ua-service-indicators" },
387 { 220, "pt-m3ua-origination-point-code-list" },
388 { 221, "pt-m3ua-circuit-range" },
389 { 222, "pt-m3ua-protocol-data" },
390 { 223, "pt-m3ua-protocol-data-service-indicator" },
391 { 224, "pt-m3ua-protocol-data-network-indicator" },
392 { 225, "pt-m3ua-protocol-data-message-priority" },
393 { 226, "pt-m3ua-protocol-data-destination-point-code" },
394 { 227, "pt-m3ua-protocol-data-originating-point-code" },
395 { 228, "pt-m3ua-protocol-data-signalling-link-selection-code" },
396 { 229, "pt-m3ua-registration-status" },
397 { 230, "pt-m3ua-deregistration-status" },
398 { 231, "pt-m3ua-header-data" },
399 { 232, "pt-m3ua-as-label" },
400 { 233, "pt-m3ua-asp-label" },
401 { 0, NULL }
405 static int
406 dissect_gdt_ParameterType(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
407 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
408 NULL);
410 return offset;
414 static const ber_sequence_t T_value_sequence_of[1] = {
415 { &hf_gdt_value_item , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_gdt_OCTET_STRING },
418 static int
419 dissect_gdt_T_value(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
420 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
421 T_value_sequence_of, hf_index, ett_gdt_T_value);
423 return offset;
427 static const ber_sequence_t Parameter_sequence[] = {
428 { &hf_gdt_parameter_type_id, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_ParameterType },
429 { &hf_gdt_value , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_T_value },
430 { NULL, 0, 0, 0, NULL }
433 static int
434 dissect_gdt_Parameter(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
435 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
436 Parameter_sequence, hf_index, ett_gdt_Parameter);
438 return offset;
442 static const ber_sequence_t Parameters_sequence_of[1] = {
443 { &hf_gdt_Parameters_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_gdt_Parameter },
446 static int
447 dissect_gdt_Parameters(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
448 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
449 Parameters_sequence_of, hf_index, ett_gdt_Parameters);
451 return offset;
455 static const ber_sequence_t EncryptionInfo_sequence[] = {
456 { &hf_gdt_enc_type , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_gdt_OCTET_STRING },
457 { &hf_gdt_params , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
458 { NULL, 0, 0, 0, NULL }
461 static int
462 dissect_gdt_EncryptionInfo(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
463 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
464 EncryptionInfo_sequence, hf_index, ett_gdt_EncryptionInfo);
466 return offset;
470 static const ber_sequence_t HopInfo_sequence[] = {
471 { &hf_gdt_current_hop , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_gdt_INTEGER },
472 { &hf_gdt_max_hops , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_gdt_INTEGER },
473 { NULL, 0, 0, 0, NULL }
476 static int
477 dissect_gdt_HopInfo(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
478 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
479 HopInfo_sequence, hf_index, ett_gdt_HopInfo);
481 return offset;
485 static const value_string gdt_ErrorCode_vals[] = {
486 { 0, "err-ok" },
487 { 1, "err-out-of-sequence" },
488 { 2, "err-unknown-sequence" },
489 { 3, "err-unsupported-version" },
490 { 4, "err-timeout" },
491 { 5, "err-unknown-route" },
492 { 6, "err-routing-not-supported" },
493 { 7, "err-max-hops-exceeded" },
494 { 255, "err-unknown-error" },
495 { 0, NULL }
499 static int
500 dissect_gdt_ErrorCode(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
501 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
502 NULL);
504 return offset;
508 static const ber_sequence_t Header_sequence[] = {
509 { &hf_gdt_version , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_gdt_INTEGER },
510 { &hf_gdt_source , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_gdt_EndPointDescriptor },
511 { &hf_gdt_destination , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_gdt_EndPointDescriptor },
512 { &hf_gdt_uuid , BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_gdt_OCTET_STRING },
513 { &hf_gdt_sequence_num , BER_CLASS_CON, 4, BER_FLAGS_IMPLTAG, dissect_gdt_INTEGER },
514 { &hf_gdt_sequence_flag , BER_CLASS_CON, 5, BER_FLAGS_IMPLTAG, dissect_gdt_SequenceFlag },
515 { &hf_gdt_enc_info , BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_gdt_EncryptionInfo },
516 { &hf_gdt_hop_info , BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_gdt_HopInfo },
517 { &hf_gdt_status , BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_gdt_ErrorCode },
518 { NULL, 0, 0, 0, NULL }
521 static int
522 dissect_gdt_Header(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
523 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
524 Header_sequence, hf_index, ett_gdt_Header);
526 return offset;
530 static const value_string gdt_PayloadType_vals[] = {
531 { 1000, "dmt-unknown" },
532 { 2000, "dmt-r14p" },
533 { 0, "dmt-layer2" },
534 { 1, "dmt-ip" },
535 { 2, "dmt-sctp" },
536 { 3, "dmt-tcp" },
537 { 4, "dmt-udp" },
538 { 5, "dmt-m3ua" },
539 { 6, "dmt-m2ua" },
540 { 7, "dmt-mtp3" },
541 { 8, "dmt-isup" },
542 { 9, "dmt-h248" },
543 { 10, "dmt-sccp" },
544 { 11, "dmt-smstpdu" },
545 { 12, "dmt-smpp" },
546 { 13, "dmt-tcap" },
547 { 14, "dmt-rtp" },
548 { 15, "dmt-sip" },
549 { 16, "dmt-pop3" },
550 { 17, "dmt-imap" },
551 { 18, "dmt-http" },
552 { 19, "dmt-radius" },
553 { 20, "dmt-dhcp" },
554 { 21, "dmt-smtp" },
555 { 22, "dmt-m2pa" },
556 { 23, "dmt-mtp2" },
557 { 0, NULL }
561 static int
562 dissect_gdt_PayloadType(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
563 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
564 NULL);
566 return offset;
570 static const ber_sequence_t PacketFwdMessage_sequence[] = {
571 { &hf_gdt_payload_type , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_PayloadType },
572 { &hf_gdt_payload , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_OCTET_STRING },
573 { &hf_gdt_params , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
574 { NULL, 0, 0, 0, NULL }
577 static int
578 dissect_gdt_PacketFwdMessage(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
579 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
580 PacketFwdMessage_sequence, hf_index, ett_gdt_PacketFwdMessage);
582 return offset;
586 static const value_string gdt_FilterAction_vals[] = {
587 { 0, "fa-filter-request" },
588 { 1, "fa-filter-result" },
589 { 0, NULL }
593 static int
594 dissect_gdt_FilterAction(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
595 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
596 NULL);
598 return offset;
602 static const ber_sequence_t FilterMessage_sequence[] = {
603 { &hf_gdt_filter_action , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_FilterAction },
604 { &hf_gdt_params , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
605 { NULL, 0, 0, 0, NULL }
608 static int
609 dissect_gdt_FilterMessage(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
610 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
611 FilterMessage_sequence, hf_index, ett_gdt_FilterMessage);
613 return offset;
617 static const value_string gdt_DataRetentionAction_vals[] = {
618 { 0, "ra-store" },
619 { 1, "ra-delete" },
620 { 2, "ra-fetch" },
621 { 3, "ra-result" },
622 { 0, NULL }
626 static int
627 dissect_gdt_DataRetentionAction(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
628 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
629 NULL);
631 return offset;
635 static const ber_sequence_t DataRetentionMessage_sequence[] = {
636 { &hf_gdt_payload_type , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_PayloadType },
637 { &hf_gdt_payload , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_OCTET_STRING },
638 { &hf_gdt_dr_action , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_DataRetentionAction },
639 { &hf_gdt_params , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
640 { NULL, 0, 0, 0, NULL }
643 static int
644 dissect_gdt_DataRetentionMessage(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
645 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
646 DataRetentionMessage_sequence, hf_index, ett_gdt_DataRetentionMessage);
648 return offset;
652 static const value_string gdt_ConfigAction_vals[] = {
653 { 0, "ca-cfg-get" },
654 { 1, "ca-cfg-set" },
655 { 2, "ca-cfg-replicate" },
656 { 3, "ca-cfg-ac" },
657 { 4, "ca-cfg-result" },
658 { 5, "ca-cfg-user-login" },
659 { 6, "ca-cfg-user-logout" },
660 { 0, NULL }
664 static int
665 dissect_gdt_ConfigAction(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
666 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
667 NULL);
669 return offset;
673 static const ber_sequence_t ConfigMessage_sequence[] = {
674 { &hf_gdt_action , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_ConfigAction },
675 { &hf_gdt_payload , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_OCTET_STRING },
676 { &hf_gdt_params , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
677 { NULL, 0, 0, 0, NULL }
680 static int
681 dissect_gdt_ConfigMessage(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
682 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
683 ConfigMessage_sequence, hf_index, ett_gdt_ConfigMessage);
685 return offset;
689 static const value_string gdt_StatsAction_vals[] = {
690 { 0, "sa-request" },
691 { 1, "sa-result" },
692 { 0, NULL }
696 static int
697 dissect_gdt_StatsAction(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
698 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
699 NULL);
701 return offset;
705 static const ber_sequence_t StatsMessage_sequence[] = {
706 { &hf_gdt_stats_action , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_StatsAction },
707 { &hf_gdt_params , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
708 { NULL, 0, 0, 0, NULL }
711 static int
712 dissect_gdt_StatsMessage(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
713 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
714 StatsMessage_sequence, hf_index, ett_gdt_StatsMessage);
716 return offset;
720 static const value_string gdt_AuthAction_vals[] = {
721 { 0, "aa-auth-request" },
722 { 1, "aa-auth-result" },
723 { 0, NULL }
727 static int
728 dissect_gdt_AuthAction(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
729 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
730 NULL);
732 return offset;
736 static const ber_sequence_t AuthMessage_sequence[] = {
737 { &hf_gdt_auth_action , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_AuthAction },
738 { &hf_gdt_params , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
739 { NULL, 0, 0, 0, NULL }
742 static int
743 dissect_gdt_AuthMessage(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
744 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
745 AuthMessage_sequence, hf_index, ett_gdt_AuthMessage);
747 return offset;
751 static const value_string gdt_RegistrationAction_vals[] = {
752 { 0, "ra-reg-request" },
753 { 1, "ra-reg-result" },
754 { 0, NULL }
758 static int
759 dissect_gdt_RegistrationAction(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
760 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
761 NULL);
763 return offset;
767 static const ber_sequence_t RegistrationMessage_sequence[] = {
768 { &hf_gdt_reg_action , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_RegistrationAction },
769 { &hf_gdt_params , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
770 { NULL, 0, 0, 0, NULL }
773 static int
774 dissect_gdt_RegistrationMessage(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
775 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
776 RegistrationMessage_sequence, hf_index, ett_gdt_RegistrationMessage);
778 return offset;
783 static int
784 dissect_gdt_NotifyMessageType(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
785 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
786 NULL);
788 return offset;
792 static const ber_sequence_t NotifyMessage_sequence[] = {
793 { &hf_gdt_message_type , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_NotifyMessageType },
794 { &hf_gdt_message , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_OCTET_STRING },
795 { &hf_gdt_params , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
796 { NULL, 0, 0, 0, NULL }
799 static int
800 dissect_gdt_NotifyMessage(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
801 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
802 NotifyMessage_sequence, hf_index, ett_gdt_NotifyMessage);
804 return offset;
808 static const ber_sequence_t DataMessage_sequence[] = {
809 { &hf_gdt_payload_type , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_PayloadType },
810 { &hf_gdt_payload , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_OCTET_STRING },
811 { &hf_gdt_params , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
812 { NULL, 0, 0, 0, NULL }
815 static int
816 dissect_gdt_DataMessage(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
817 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
818 DataMessage_sequence, hf_index, ett_gdt_DataMessage);
820 return offset;
824 static const value_string gdt_RoutingAction_vals[] = {
825 { 0, "roua-route-set" },
826 { 1, "roua-route-get" },
827 { 2, "roua-route-result" },
828 { 0, NULL }
832 static int
833 dissect_gdt_RoutingAction(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
834 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
835 NULL);
837 return offset;
841 static const ber_sequence_t RoutingMessage_sequence[] = {
842 { &hf_gdt_routing_action , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_RoutingAction },
843 { &hf_gdt_params , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
844 { NULL, 0, 0, 0, NULL }
847 static int
848 dissect_gdt_RoutingMessage(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
849 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
850 RoutingMessage_sequence, hf_index, ett_gdt_RoutingMessage);
852 return offset;
856 static const value_string gdt_ServiceId_vals[] = {
857 { 42, "sid-stp-routing" },
858 { 43, "sid-sgn-forward" },
859 { 44, "sid-fgn-filtering" },
860 { 45, "sid-security" },
861 { 46, "sid-pdn-filtering" },
862 { 47, "sid-sysagent" },
863 { 0, NULL }
867 static int
868 dissect_gdt_ServiceId(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
869 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
870 NULL);
872 return offset;
876 static const value_string gdt_ServiceAction_vals[] = {
877 { 0, "srvca-request" },
878 { 1, "srvca-result" },
879 { 2, "srvca-default" },
880 { 3, "srvca-na" },
881 { 0, NULL }
885 static int
886 dissect_gdt_ServiceAction(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
887 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
888 NULL);
890 return offset;
894 static const ber_sequence_t ServiceMessage_sequence[] = {
895 { &hf_gdt_service_id , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_ServiceId },
896 { &hf_gdt_service_action , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_ServiceAction },
897 { &hf_gdt_params , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
898 { NULL, 0, 0, 0, NULL }
901 static int
902 dissect_gdt_ServiceMessage(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
903 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
904 ServiceMessage_sequence, hf_index, ett_gdt_ServiceMessage);
906 return offset;
910 static const value_string gdt_StateAction_vals[] = {
911 { 0, "sta-update" },
912 { 0, NULL }
916 static int
917 dissect_gdt_StateAction(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
918 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
919 NULL);
921 return offset;
925 static const ber_sequence_t StateMessage_sequence[] = {
926 { &hf_gdt_stmch_id , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_gdt_OCTET_STRING },
927 { &hf_gdt_state_action , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_gdt_StateAction },
928 { &hf_gdt_params , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_gdt_Parameters },
929 { NULL, 0, 0, 0, NULL }
932 static int
933 dissect_gdt_StateMessage(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
934 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
935 StateMessage_sequence, hf_index, ett_gdt_StateMessage);
937 return offset;
941 static const value_string gdt_Body_vals[] = {
942 { 1, "encrypted-data" },
943 { 2, "packet-fwd" },
944 { 3, "filter" },
945 { 4, "data-retention" },
946 { 6, "conf" },
947 { 7, "stats" },
948 { 8, "auth" },
949 { 9, "reg" },
950 { 10, "ntfy" },
951 { 11, "data" },
952 { 12, "routing" },
953 { 13, "service-msg" },
954 { 14, "state-msg" },
955 { 0, NULL }
958 static const ber_choice_t Body_choice[] = {
959 { 1, &hf_gdt_encrypted_data , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_gdt_OCTET_STRING },
960 { 2, &hf_gdt_packet_fwd , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_gdt_PacketFwdMessage },
961 { 3, &hf_gdt_filter , BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_gdt_FilterMessage },
962 { 4, &hf_gdt_data_retention , BER_CLASS_CON, 4, BER_FLAGS_IMPLTAG, dissect_gdt_DataRetentionMessage },
963 { 6, &hf_gdt_conf , BER_CLASS_CON, 6, BER_FLAGS_IMPLTAG, dissect_gdt_ConfigMessage },
964 { 7, &hf_gdt_stats , BER_CLASS_CON, 7, BER_FLAGS_IMPLTAG, dissect_gdt_StatsMessage },
965 { 8, &hf_gdt_auth , BER_CLASS_CON, 8, BER_FLAGS_IMPLTAG, dissect_gdt_AuthMessage },
966 { 9, &hf_gdt_reg , BER_CLASS_CON, 9, BER_FLAGS_IMPLTAG, dissect_gdt_RegistrationMessage },
967 { 10, &hf_gdt_ntfy , BER_CLASS_CON, 10, BER_FLAGS_IMPLTAG, dissect_gdt_NotifyMessage },
968 { 11, &hf_gdt_data , BER_CLASS_CON, 11, BER_FLAGS_IMPLTAG, dissect_gdt_DataMessage },
969 { 12, &hf_gdt_routing , BER_CLASS_CON, 12, BER_FLAGS_IMPLTAG, dissect_gdt_RoutingMessage },
970 { 13, &hf_gdt_service_msg , BER_CLASS_CON, 13, BER_FLAGS_IMPLTAG, dissect_gdt_ServiceMessage },
971 { 14, &hf_gdt_state_msg , BER_CLASS_CON, 14, BER_FLAGS_IMPLTAG, dissect_gdt_StateMessage },
972 { 0, NULL, 0, 0, 0, NULL }
975 static int
976 dissect_gdt_Body(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
977 offset = dissect_ber_choice(actx, tree, tvb, offset,
978 Body_choice, hf_index, ett_gdt_Body,
979 NULL);
981 return offset;
985 static const ber_sequence_t GDTMessage_sequence[] = {
986 { &hf_gdt_header , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_gdt_Header },
987 { &hf_gdt_body , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_gdt_Body },
988 { NULL, 0, 0, 0, NULL }
991 static int
992 dissect_gdt_GDTMessage(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
993 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
994 GDTMessage_sequence, hf_index, ett_gdt_GDTMessage);
996 return offset;
999 /*--- PDUs ---*/
1001 static int dissect_GDTMessage_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
1002 int offset = 0;
1003 asn1_ctx_t asn1_ctx;
1004 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
1005 offset = dissect_gdt_GDTMessage(false, tvb, offset, &asn1_ctx, tree, hf_gdt_GDTMessage_PDU);
1006 return offset;
1010 static int dissect_gdt(tvbuff_t *tvb,
1011 packet_info *pinfo,
1012 proto_tree *tree,
1013 void *data _U_) {
1014 proto_item *gdt_item = NULL;
1015 proto_tree *gdt_tree = NULL;
1017 /* make entry in the Protocol column on summary display */
1018 col_set_str(pinfo->cinfo, COL_PROTOCOL, PNAME);
1020 /* create the gdt protocol tree */
1021 if (tree) {
1022 gdt_item = proto_tree_add_item(tree, proto_gdt, tvb, 0, -1, ENC_NA);
1023 gdt_tree = proto_item_add_subtree(gdt_item, ett_gdt);
1024 dissect_GDTMessage_PDU(tvb, pinfo, gdt_tree, 0);
1026 return tvb_captured_length(tvb);
1029 /*--- proto_register_gdt ----------------------------------------------*/
1030 void proto_register_gdt(void) {
1031 /* List of fields */
1032 static hf_register_info hf[] = {
1033 { &hf_gdt_GDTMessage_PDU,
1034 { "GDTMessage", "gdt.GDTMessage_element",
1035 FT_NONE, BASE_NONE, NULL, 0,
1036 NULL, HFILL }},
1037 { &hf_gdt_version,
1038 { "version", "gdt.version",
1039 FT_INT32, BASE_DEC, NULL, 0,
1040 "INTEGER", HFILL }},
1041 { &hf_gdt_source,
1042 { "source", "gdt.source_element",
1043 FT_NONE, BASE_NONE, NULL, 0,
1044 "EndPointDescriptor", HFILL }},
1045 { &hf_gdt_destination,
1046 { "destination", "gdt.destination_element",
1047 FT_NONE, BASE_NONE, NULL, 0,
1048 "EndPointDescriptor", HFILL }},
1049 { &hf_gdt_uuid,
1050 { "uuid", "gdt.uuid",
1051 FT_BYTES, BASE_NONE, NULL, 0,
1052 "OCTET_STRING", HFILL }},
1053 { &hf_gdt_sequence_num,
1054 { "sequence-num", "gdt.sequence_num",
1055 FT_INT32, BASE_DEC, NULL, 0,
1056 "INTEGER", HFILL }},
1057 { &hf_gdt_sequence_flag,
1058 { "sequence-flag", "gdt.sequence_flag",
1059 FT_INT32, BASE_DEC, VALS(gdt_SequenceFlag_vals), 0,
1060 "SequenceFlag", HFILL }},
1061 { &hf_gdt_enc_info,
1062 { "enc-info", "gdt.enc_info_element",
1063 FT_NONE, BASE_NONE, NULL, 0,
1064 "EncryptionInfo", HFILL }},
1065 { &hf_gdt_hop_info,
1066 { "hop-info", "gdt.hop_info_element",
1067 FT_NONE, BASE_NONE, NULL, 0,
1068 "HopInfo", HFILL }},
1069 { &hf_gdt_status,
1070 { "status", "gdt.status",
1071 FT_INT32, BASE_DEC, VALS(gdt_ErrorCode_vals), 0,
1072 "ErrorCode", HFILL }},
1073 { &hf_gdt_type,
1074 { "type", "gdt.type",
1075 FT_STRING, BASE_NONE, NULL, 0,
1076 "IA5String", HFILL }},
1077 { &hf_gdt_end_point_id,
1078 { "id", "gdt.end_point_id",
1079 FT_STRING, BASE_NONE, NULL, 0,
1080 "IA5String", HFILL }},
1081 { &hf_gdt_encrypted_data,
1082 { "encrypted-data", "gdt.encrypted_data",
1083 FT_BYTES, BASE_NONE, NULL, 0,
1084 "OCTET_STRING", HFILL }},
1085 { &hf_gdt_packet_fwd,
1086 { "packet-fwd", "gdt.packet_fwd_element",
1087 FT_NONE, BASE_NONE, NULL, 0,
1088 "PacketFwdMessage", HFILL }},
1089 { &hf_gdt_filter,
1090 { "filter", "gdt.filter_element",
1091 FT_NONE, BASE_NONE, NULL, 0,
1092 "FilterMessage", HFILL }},
1093 { &hf_gdt_data_retention,
1094 { "data-retention", "gdt.data_retention_element",
1095 FT_NONE, BASE_NONE, NULL, 0,
1096 "DataRetentionMessage", HFILL }},
1097 { &hf_gdt_conf,
1098 { "conf", "gdt.conf_element",
1099 FT_NONE, BASE_NONE, NULL, 0,
1100 "ConfigMessage", HFILL }},
1101 { &hf_gdt_stats,
1102 { "stats", "gdt.stats_element",
1103 FT_NONE, BASE_NONE, NULL, 0,
1104 "StatsMessage", HFILL }},
1105 { &hf_gdt_auth,
1106 { "auth", "gdt.auth_element",
1107 FT_NONE, BASE_NONE, NULL, 0,
1108 "AuthMessage", HFILL }},
1109 { &hf_gdt_reg,
1110 { "reg", "gdt.reg_element",
1111 FT_NONE, BASE_NONE, NULL, 0,
1112 "RegistrationMessage", HFILL }},
1113 { &hf_gdt_ntfy,
1114 { "ntfy", "gdt.ntfy_element",
1115 FT_NONE, BASE_NONE, NULL, 0,
1116 "NotifyMessage", HFILL }},
1117 { &hf_gdt_data,
1118 { "data", "gdt.data_element",
1119 FT_NONE, BASE_NONE, NULL, 0,
1120 "DataMessage", HFILL }},
1121 { &hf_gdt_routing,
1122 { "routing", "gdt.routing_element",
1123 FT_NONE, BASE_NONE, NULL, 0,
1124 "RoutingMessage", HFILL }},
1125 { &hf_gdt_service_msg,
1126 { "service-msg", "gdt.service_msg_element",
1127 FT_NONE, BASE_NONE, NULL, 0,
1128 "ServiceMessage", HFILL }},
1129 { &hf_gdt_state_msg,
1130 { "state-msg", "gdt.state_msg_element",
1131 FT_NONE, BASE_NONE, NULL, 0,
1132 "StateMessage", HFILL }},
1133 { &hf_gdt_stmch_id,
1134 { "stmch-id", "gdt.stmch_id",
1135 FT_BYTES, BASE_NONE, NULL, 0,
1136 "OCTET_STRING", HFILL }},
1137 { &hf_gdt_state_action,
1138 { "state-action", "gdt.state_action",
1139 FT_INT32, BASE_DEC, VALS(gdt_StateAction_vals), 0,
1140 "StateAction", HFILL }},
1141 { &hf_gdt_params,
1142 { "params", "gdt.params",
1143 FT_UINT32, BASE_DEC, NULL, 0,
1144 "Parameters", HFILL }},
1145 { &hf_gdt_service_id,
1146 { "service-id", "gdt.service_id",
1147 FT_INT32, BASE_DEC, VALS(gdt_ServiceId_vals), 0,
1148 "ServiceId", HFILL }},
1149 { &hf_gdt_service_action,
1150 { "service-action", "gdt.service_action",
1151 FT_INT32, BASE_DEC, VALS(gdt_ServiceAction_vals), 0,
1152 "ServiceAction", HFILL }},
1153 { &hf_gdt_routing_action,
1154 { "routing-action", "gdt.routing_action",
1155 FT_INT32, BASE_DEC, VALS(gdt_RoutingAction_vals), 0,
1156 "RoutingAction", HFILL }},
1157 { &hf_gdt_reg_action,
1158 { "reg-action", "gdt.reg_action",
1159 FT_INT32, BASE_DEC, VALS(gdt_RegistrationAction_vals), 0,
1160 "RegistrationAction", HFILL }},
1161 { &hf_gdt_stats_action,
1162 { "stats-action", "gdt.stats_action",
1163 FT_INT32, BASE_DEC, VALS(gdt_StatsAction_vals), 0,
1164 "StatsAction", HFILL }},
1165 { &hf_gdt_auth_action,
1166 { "auth-action", "gdt.auth_action",
1167 FT_INT32, BASE_DEC, VALS(gdt_AuthAction_vals), 0,
1168 "AuthAction", HFILL }},
1169 { &hf_gdt_payload_type,
1170 { "payload-type", "gdt.payload_type",
1171 FT_INT32, BASE_DEC, VALS(gdt_PayloadType_vals), 0,
1172 "PayloadType", HFILL }},
1173 { &hf_gdt_payload,
1174 { "payload", "gdt.payload",
1175 FT_BYTES, BASE_NONE, NULL, 0,
1176 "OCTET_STRING", HFILL }},
1177 { &hf_gdt_dr_action,
1178 { "dr-action", "gdt.dr_action",
1179 FT_INT32, BASE_DEC, VALS(gdt_DataRetentionAction_vals), 0,
1180 "DataRetentionAction", HFILL }},
1181 { &hf_gdt_filter_action,
1182 { "filter-action", "gdt.filter_action",
1183 FT_INT32, BASE_DEC, VALS(gdt_FilterAction_vals), 0,
1184 "FilterAction", HFILL }},
1185 { &hf_gdt_message_type,
1186 { "message-type", "gdt.message_type",
1187 FT_INT32, BASE_DEC, NULL, 0,
1188 "NotifyMessageType", HFILL }},
1189 { &hf_gdt_message,
1190 { "message", "gdt.message",
1191 FT_BYTES, BASE_NONE, NULL, 0,
1192 "OCTET_STRING", HFILL }},
1193 { &hf_gdt_action,
1194 { "action", "gdt.action",
1195 FT_INT32, BASE_DEC, VALS(gdt_ConfigAction_vals), 0,
1196 "ConfigAction", HFILL }},
1197 { &hf_gdt_parameter_type_id,
1198 { "id", "gdt.parameter_type_id",
1199 FT_INT32, BASE_DEC, VALS(gdt_ParameterType_vals), 0,
1200 "ParameterType", HFILL }},
1201 { &hf_gdt_value,
1202 { "value", "gdt.value",
1203 FT_UINT32, BASE_DEC, NULL, 0,
1204 NULL, HFILL }},
1205 { &hf_gdt_value_item,
1206 { "value item", "gdt.value_item",
1207 FT_BYTES, BASE_NONE, NULL, 0,
1208 "OCTET_STRING", HFILL }},
1209 { &hf_gdt_Parameters_item,
1210 { "Parameter", "gdt.Parameter_element",
1211 FT_NONE, BASE_NONE, NULL, 0,
1212 NULL, HFILL }},
1213 { &hf_gdt_current_hop,
1214 { "current-hop", "gdt.current_hop",
1215 FT_INT32, BASE_DEC, NULL, 0,
1216 "INTEGER", HFILL }},
1217 { &hf_gdt_max_hops,
1218 { "max-hops", "gdt.max_hops",
1219 FT_INT32, BASE_DEC, NULL, 0,
1220 "INTEGER", HFILL }},
1221 { &hf_gdt_header,
1222 { "header", "gdt.header_element",
1223 FT_NONE, BASE_NONE, NULL, 0,
1224 NULL, HFILL }},
1225 { &hf_gdt_body,
1226 { "body", "gdt.body",
1227 FT_UINT32, BASE_DEC, VALS(gdt_Body_vals), 0,
1228 NULL, HFILL }},
1229 { &hf_gdt_enc_type,
1230 { "enc-type", "gdt.enc_type",
1231 FT_BYTES, BASE_NONE, NULL, 0,
1232 "OCTET_STRING", HFILL }},
1235 /* List of subtrees */
1236 static int *ett[] = {
1237 &ett_gdt,
1238 &ett_gdt_Header,
1239 &ett_gdt_EndPointDescriptor,
1240 &ett_gdt_Body,
1241 &ett_gdt_StateMessage,
1242 &ett_gdt_ServiceMessage,
1243 &ett_gdt_RoutingMessage,
1244 &ett_gdt_RegistrationMessage,
1245 &ett_gdt_StatsMessage,
1246 &ett_gdt_AuthMessage,
1247 &ett_gdt_DataRetentionMessage,
1248 &ett_gdt_FilterMessage,
1249 &ett_gdt_PacketFwdMessage,
1250 &ett_gdt_NotifyMessage,
1251 &ett_gdt_DataMessage,
1252 &ett_gdt_ConfigMessage,
1253 &ett_gdt_Parameter,
1254 &ett_gdt_T_value,
1255 &ett_gdt_Parameters,
1256 &ett_gdt_HopInfo,
1257 &ett_gdt_GDTMessage,
1258 &ett_gdt_EncryptionInfo,
1261 /* Register protocol */
1262 proto_gdt = proto_register_protocol(PNAME, PSNAME, PFNAME);
1264 /* Register fields and subtrees */
1265 proto_register_field_array(proto_gdt, hf, array_length(hf));
1266 proto_register_subtree_array(ett, array_length(ett));
1268 /* Register dissector */
1269 gdt_handle = register_dissector("gdt", dissect_gdt, proto_gdt);
1272 /*--- proto_reg_handoff_gdt -------------------------------------------*/
1273 void proto_reg_handoff_gdt(void) {
1274 static bool initialized = false;
1276 if (!initialized) {
1277 dissector_add_for_decode_as("sctp.ppi", gdt_handle);
1278 dissector_add_uint("sctp.ppi", GDT_PROTOCOL_ID, gdt_handle);
1279 initialized = true;