1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
4 /* ../../tools/asn2wrs.py -u -L -p atn-cm -c ./atn-cm.cnf -s ./packet-atn-cm-template -D . -O ../../epan/dissectors atn-cm.asn */
6 /* Input file: packet-atn-cm-template.c */
8 #line 1 "../../asn1/atn-cm/packet-atn-cm-template.c"
9 /* c-basic-offset: 2; tab-width: 2; indent-tabs-mode: t
10 * vi: set shiftwidth=2 tabstop=2 noexpandtab:
11 * :indentSize=2:tabSize=2:noTabs=false:
16 * By Mathias Guettler <guettler@web.de>
19 * Routines for ATN context management protocol packet disassembly.
20 * ATN context management allows an aircraft
21 * to log on to a ground facility.
24 * http://en.wikipedia.org/wiki/CPDLC
25 * http://members.optusnet.com.au/~cjr/introduction.htm
28 * http://legacy.icao.int/anb/panels/acp/repository.cfm
31 * We are dealing with ATN/CPDLC aka ICAO Doc 9705 Ed2 here
32 * (CPDLC may also be transmitted via ACARS/AOA aka "FANS-1/A ").
35 * Wireshark - Network traffic analyzer
36 * By Gerald Combs <gerald@wireshark.org>
37 * Copyright 1998 Gerald Combs
39 * This program is free software; you can redistribute it and/or
40 * modify it under the terms of the GNU General Public License
41 * as published by the Free Software Foundation; either version 2
42 * of the License, or (at your option) any later version.
44 * This program is distributed in the hope that it will be useful,
45 * but WITHOUT ANY WARRANTY; without even the implied warranty of
46 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47 * GNU General Public License for more details.
49 * You should have received a copy of the GNU General Public License
50 * along with this program; if not, write to the Free Software
51 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
57 #include <epan/packet.h>
58 #include <epan/exceptions.h>
59 #include <epan/conversation.h>
60 #include <epan/dissectors/packet-ber.h>
61 #include <epan/dissectors/packet-per.h>
63 #include "packet-atn-ulcs.h"
65 #define ATN_CM_PROTO "ICAO Doc9705 CM"
67 void proto_register_atn_cm(void);
68 void proto_reg_handoff_atn_cm(void);
71 /*--- Included file: packet-atn-cm-hf.c ---*/
72 #line 1 "../../asn1/atn-cm/packet-atn-cm-hf.c"
73 static int hf_atn_cm_CMAircraftMessage_PDU = -1; /* CMAircraftMessage */
74 static int hf_atn_cm_CMGroundMessage_PDU = -1; /* CMGroundMessage */
75 static int hf_atn_cm_cmLogonRequest = -1; /* CMLogonRequest */
76 static int hf_atn_cm_cmContactResponse = -1; /* CMContactResponse */
77 static int hf_atn_cm_cmAbortReason = -1; /* CMAbortReason */
78 static int hf_atn_cm_cmLogonResponse = -1; /* CMLogonResponse */
79 static int hf_atn_cm_cmUpdate = -1; /* CMUpdate */
80 static int hf_atn_cm_cmContactRequest = -1; /* CMContactRequest */
81 static int hf_atn_cm_cmForwardRequest = -1; /* CMForwardRequest */
82 static int hf_atn_cm_cmForwardResponse = -1; /* CMForwardResponse */
83 static int hf_atn_cm_longTsap = -1; /* LongTsap */
84 static int hf_atn_cm_shortTsap = -1; /* ShortTsap */
85 static int hf_atn_cm_aeQualifier = -1; /* AEQualifier */
86 static int hf_atn_cm_apVersion = -1; /* VersionNumber */
87 static int hf_atn_cm_apAddress = -1; /* APAddress */
88 static int hf_atn_cm_facilityDesignation = -1; /* FacilityDesignation */
89 static int hf_atn_cm_address = -1; /* LongTsap */
90 static int hf_atn_cm_aircraftFlightIdentification = -1; /* AircraftFlightIdentification */
91 static int hf_atn_cm_cMLongTSAP = -1; /* LongTsap */
92 static int hf_atn_cm_groundInitiatedApplications = -1; /* SEQUENCE_SIZE_1_256_OF_AEQualifierVersionAddress */
93 static int hf_atn_cm_groundInitiatedApplications_item = -1; /* AEQualifierVersionAddress */
94 static int hf_atn_cm_airOnlyInitiatedApplications = -1; /* SEQUENCE_SIZE_1_256_OF_AEQualifierVersion */
95 static int hf_atn_cm_airOnlyInitiatedApplications_item = -1; /* AEQualifierVersion */
96 static int hf_atn_cm_airportDeparture = -1; /* Airport */
97 static int hf_atn_cm_airportDestination = -1; /* Airport */
98 static int hf_atn_cm_dateTimeDepartureETD = -1; /* DateTime */
99 static int hf_atn_cm_airInitiatedApplications = -1; /* SEQUENCE_SIZE_1_256_OF_AEQualifierVersionAddress */
100 static int hf_atn_cm_airInitiatedApplications_item = -1; /* AEQualifierVersionAddress */
101 static int hf_atn_cm_groundOnlyInitiatedApplications = -1; /* SEQUENCE_SIZE_1_256_OF_AEQualifierVersion */
102 static int hf_atn_cm_groundOnlyInitiatedApplications_item = -1; /* AEQualifierVersion */
103 static int hf_atn_cm_year = -1; /* Year */
104 static int hf_atn_cm_month = -1; /* Month */
105 static int hf_atn_cm_day = -1; /* Day */
106 static int hf_atn_cm_date = -1; /* Date */
107 static int hf_atn_cm_time = -1; /* Time */
108 static int hf_atn_cm_rDP = -1; /* OCTET_STRING_SIZE_5 */
109 static int hf_atn_cm_aRS = -1; /* OCTET_STRING_SIZE_3 */
110 static int hf_atn_cm_locSysNselTsel = -1; /* OCTET_STRING_SIZE_10_11 */
111 static int hf_atn_cm_hours = -1; /* Timehours */
112 static int hf_atn_cm_minutes = -1; /* Timeminutes */
114 /*--- End of included file: packet-atn-cm-hf.c ---*/
115 #line 63 "../../asn1/atn-cm/packet-atn-cm-template.c"
118 /*--- Included file: packet-atn-cm-ett.c ---*/
119 #line 1 "../../asn1/atn-cm/packet-atn-cm-ett.c"
120 static gint ett_atn_cm_CMAircraftMessage = -1;
121 static gint ett_atn_cm_CMGroundMessage = -1;
122 static gint ett_atn_cm_APAddress = -1;
123 static gint ett_atn_cm_AEQualifierVersion = -1;
124 static gint ett_atn_cm_AEQualifierVersionAddress = -1;
125 static gint ett_atn_cm_CMContactRequest = -1;
126 static gint ett_atn_cm_CMLogonRequest = -1;
127 static gint ett_atn_cm_SEQUENCE_SIZE_1_256_OF_AEQualifierVersionAddress = -1;
128 static gint ett_atn_cm_SEQUENCE_SIZE_1_256_OF_AEQualifierVersion = -1;
129 static gint ett_atn_cm_CMLogonResponse = -1;
130 static gint ett_atn_cm_Date = -1;
131 static gint ett_atn_cm_DateTime = -1;
132 static gint ett_atn_cm_LongTsap = -1;
133 static gint ett_atn_cm_ShortTsap = -1;
134 static gint ett_atn_cm_Time = -1;
136 /*--- End of included file: packet-atn-cm-ett.c ---*/
137 #line 65 "../../asn1/atn-cm/packet-atn-cm-template.c"
138 static gint ett_atn_cm = -1;
141 /*--- Included file: packet-atn-cm-fn.c ---*/
142 #line 1 "../../asn1/atn-cm/packet-atn-cm-fn.c"
146 dissect_atn_cm_AircraftFlightIdentification(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
147 offset = dissect_per_IA5String(tvb, offset, actx, tree, hf_index,
156 dissect_atn_cm_OCTET_STRING_SIZE_5(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
157 offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
166 dissect_atn_cm_OCTET_STRING_SIZE_3(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
167 offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
176 dissect_atn_cm_OCTET_STRING_SIZE_10_11(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
177 offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
178 10, 11, FALSE, NULL);
184 static const per_sequence_t ShortTsap_sequence[] = {
185 { &hf_atn_cm_aRS , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_atn_cm_OCTET_STRING_SIZE_3 },
186 { &hf_atn_cm_locSysNselTsel, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_OCTET_STRING_SIZE_10_11 },
191 dissect_atn_cm_ShortTsap(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
192 offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
193 ett_atn_cm_ShortTsap, ShortTsap_sequence);
199 static const per_sequence_t LongTsap_sequence[] = {
200 { &hf_atn_cm_rDP , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_OCTET_STRING_SIZE_5 },
201 { &hf_atn_cm_shortTsap , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_ShortTsap },
206 dissect_atn_cm_LongTsap(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
207 offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
208 ett_atn_cm_LongTsap, LongTsap_sequence);
216 dissect_atn_cm_AEQualifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
217 offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
218 0U, 255U, NULL, FALSE);
226 dissect_atn_cm_VersionNumber(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
227 offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
228 1U, 255U, NULL, FALSE);
234 static const value_string atn_cm_APAddress_vals[] = {
240 static const per_choice_t APAddress_choice[] = {
241 { 0, &hf_atn_cm_longTsap , ASN1_NO_EXTENSIONS , dissect_atn_cm_LongTsap },
242 { 1, &hf_atn_cm_shortTsap , ASN1_NO_EXTENSIONS , dissect_atn_cm_ShortTsap },
247 dissect_atn_cm_APAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
248 offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
249 ett_atn_cm_APAddress, APAddress_choice,
256 static const per_sequence_t AEQualifierVersionAddress_sequence[] = {
257 { &hf_atn_cm_aeQualifier , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_AEQualifier },
258 { &hf_atn_cm_apVersion , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_VersionNumber },
259 { &hf_atn_cm_apAddress , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_APAddress },
264 dissect_atn_cm_AEQualifierVersionAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
265 offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
266 ett_atn_cm_AEQualifierVersionAddress, AEQualifierVersionAddress_sequence);
272 static const per_sequence_t SEQUENCE_SIZE_1_256_OF_AEQualifierVersionAddress_sequence_of[1] = {
273 { &hf_atn_cm_groundInitiatedApplications_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_AEQualifierVersionAddress },
277 dissect_atn_cm_SEQUENCE_SIZE_1_256_OF_AEQualifierVersionAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
278 offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index,
279 ett_atn_cm_SEQUENCE_SIZE_1_256_OF_AEQualifierVersionAddress, SEQUENCE_SIZE_1_256_OF_AEQualifierVersionAddress_sequence_of,
286 static const per_sequence_t AEQualifierVersion_sequence[] = {
287 { &hf_atn_cm_aeQualifier , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_AEQualifier },
288 { &hf_atn_cm_apVersion , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_VersionNumber },
293 dissect_atn_cm_AEQualifierVersion(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
294 offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
295 ett_atn_cm_AEQualifierVersion, AEQualifierVersion_sequence);
301 static const per_sequence_t SEQUENCE_SIZE_1_256_OF_AEQualifierVersion_sequence_of[1] = {
302 { &hf_atn_cm_airOnlyInitiatedApplications_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_AEQualifierVersion },
306 dissect_atn_cm_SEQUENCE_SIZE_1_256_OF_AEQualifierVersion(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
307 offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index,
308 ett_atn_cm_SEQUENCE_SIZE_1_256_OF_AEQualifierVersion, SEQUENCE_SIZE_1_256_OF_AEQualifierVersion_sequence_of,
317 dissect_atn_cm_FacilityDesignation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
318 offset = dissect_per_IA5String(tvb, offset, actx, tree, hf_index,
327 dissect_atn_cm_Airport(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
328 offset = dissect_per_IA5String(tvb, offset, actx, tree, hf_index,
337 dissect_atn_cm_Year(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
338 offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
339 1996U, 2095U, NULL, FALSE);
347 dissect_atn_cm_Month(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
348 offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
349 1U, 12U, NULL, FALSE);
357 dissect_atn_cm_Day(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
358 offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
359 1U, 31U, NULL, FALSE);
365 static const per_sequence_t Date_sequence[] = {
366 { &hf_atn_cm_year , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_Year },
367 { &hf_atn_cm_month , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_Month },
368 { &hf_atn_cm_day , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_Day },
373 dissect_atn_cm_Date(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
374 offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
375 ett_atn_cm_Date, Date_sequence);
383 dissect_atn_cm_Timehours(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
384 offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
385 0U, 23U, NULL, FALSE);
393 dissect_atn_cm_Timeminutes(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
394 offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
395 0U, 59U, NULL, FALSE);
401 static const per_sequence_t Time_sequence[] = {
402 { &hf_atn_cm_hours , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_Timehours },
403 { &hf_atn_cm_minutes , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_Timeminutes },
408 dissect_atn_cm_Time(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
409 offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
410 ett_atn_cm_Time, Time_sequence);
416 static const per_sequence_t DateTime_sequence[] = {
417 { &hf_atn_cm_date , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_Date },
418 { &hf_atn_cm_time , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_Time },
423 dissect_atn_cm_DateTime(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
424 offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
425 ett_atn_cm_DateTime, DateTime_sequence);
431 static const per_sequence_t CMLogonRequest_sequence[] = {
432 { &hf_atn_cm_aircraftFlightIdentification, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_AircraftFlightIdentification },
433 { &hf_atn_cm_cMLongTSAP , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_LongTsap },
434 { &hf_atn_cm_groundInitiatedApplications, ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_atn_cm_SEQUENCE_SIZE_1_256_OF_AEQualifierVersionAddress },
435 { &hf_atn_cm_airOnlyInitiatedApplications, ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_atn_cm_SEQUENCE_SIZE_1_256_OF_AEQualifierVersion },
436 { &hf_atn_cm_facilityDesignation, ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_atn_cm_FacilityDesignation },
437 { &hf_atn_cm_airportDeparture, ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_atn_cm_Airport },
438 { &hf_atn_cm_airportDestination, ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_atn_cm_Airport },
439 { &hf_atn_cm_dateTimeDepartureETD, ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_atn_cm_DateTime },
444 dissect_atn_cm_CMLogonRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
445 offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
446 ett_atn_cm_CMLogonRequest, CMLogonRequest_sequence);
452 static const value_string atn_cm_Response_vals[] = {
453 { 0, "contactSuccess" },
454 { 1, "contactNotSuccessful" },
460 dissect_atn_cm_Response(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
461 offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
462 2, NULL, FALSE, 0, NULL);
470 dissect_atn_cm_CMContactResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
471 offset = dissect_atn_cm_Response(tvb, offset, actx, tree, hf_index);
477 static const value_string atn_cm_CMAbortReason_vals[] = {
478 { 0, "timer-expired" },
479 { 1, "undefined-error" },
480 { 2, "invalid-PDU" },
481 { 3, "protocol-error" },
482 { 4, "dialogue-acceptance-not-permitted" },
483 { 5, "dialogue-end-not-accepted" },
484 { 6, "communication-service-error" },
485 { 7, "communication-service-failure" },
486 { 8, "invalid-QOS-parameter" },
487 { 9, "expected-PDU-missing" },
493 dissect_atn_cm_CMAbortReason(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
494 offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
495 10, NULL, TRUE, 0, NULL);
501 static const value_string atn_cm_CMAircraftMessage_vals[] = {
502 { 0, "cmLogonRequest" },
503 { 1, "cmContactResponse" },
504 { 2, "cmAbortReason" },
508 static const per_choice_t CMAircraftMessage_choice[] = {
509 { 0, &hf_atn_cm_cmLogonRequest, ASN1_EXTENSION_ROOT , dissect_atn_cm_CMLogonRequest },
510 { 1, &hf_atn_cm_cmContactResponse, ASN1_EXTENSION_ROOT , dissect_atn_cm_CMContactResponse },
511 { 2, &hf_atn_cm_cmAbortReason, ASN1_EXTENSION_ROOT , dissect_atn_cm_CMAbortReason },
516 dissect_atn_cm_CMAircraftMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
517 offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
518 ett_atn_cm_CMAircraftMessage, CMAircraftMessage_choice,
525 static const per_sequence_t CMLogonResponse_sequence[] = {
526 { &hf_atn_cm_airInitiatedApplications, ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_atn_cm_SEQUENCE_SIZE_1_256_OF_AEQualifierVersionAddress },
527 { &hf_atn_cm_groundOnlyInitiatedApplications, ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_atn_cm_SEQUENCE_SIZE_1_256_OF_AEQualifierVersion },
532 dissect_atn_cm_CMLogonResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
533 offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
534 ett_atn_cm_CMLogonResponse, CMLogonResponse_sequence);
542 dissect_atn_cm_CMUpdate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
543 offset = dissect_atn_cm_CMLogonResponse(tvb, offset, actx, tree, hf_index);
549 static const per_sequence_t CMContactRequest_sequence[] = {
550 { &hf_atn_cm_facilityDesignation, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_FacilityDesignation },
551 { &hf_atn_cm_address , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_cm_LongTsap },
556 dissect_atn_cm_CMContactRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
557 offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
558 ett_atn_cm_CMContactRequest, CMContactRequest_sequence);
566 dissect_atn_cm_CMForwardRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
567 offset = dissect_atn_cm_CMLogonRequest(tvb, offset, actx, tree, hf_index);
573 static const value_string atn_cm_CMForwardResponse_vals[] = {
575 { 1, "incompatible-version" },
576 { 2, "service-not-supported" },
582 dissect_atn_cm_CMForwardResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
583 offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
584 3, NULL, FALSE, 0, NULL);
590 static const value_string atn_cm_CMGroundMessage_vals[] = {
591 { 0, "cmLogonResponse" },
593 { 2, "cmContactRequest" },
594 { 3, "cmForwardRequest" },
595 { 4, "cmAbortReason" },
596 { 5, "cmForwardResponse" },
600 static const per_choice_t CMGroundMessage_choice[] = {
601 { 0, &hf_atn_cm_cmLogonResponse, ASN1_EXTENSION_ROOT , dissect_atn_cm_CMLogonResponse },
602 { 1, &hf_atn_cm_cmUpdate , ASN1_EXTENSION_ROOT , dissect_atn_cm_CMUpdate },
603 { 2, &hf_atn_cm_cmContactRequest, ASN1_EXTENSION_ROOT , dissect_atn_cm_CMContactRequest },
604 { 3, &hf_atn_cm_cmForwardRequest, ASN1_EXTENSION_ROOT , dissect_atn_cm_CMForwardRequest },
605 { 4, &hf_atn_cm_cmAbortReason, ASN1_EXTENSION_ROOT , dissect_atn_cm_CMAbortReason },
606 { 5, &hf_atn_cm_cmForwardResponse, ASN1_EXTENSION_ROOT , dissect_atn_cm_CMForwardResponse },
611 dissect_atn_cm_CMGroundMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
612 offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
613 ett_atn_cm_CMGroundMessage, CMGroundMessage_choice,
621 static void dissect_CMAircraftMessage_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
623 asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, FALSE, pinfo);
624 dissect_atn_cm_CMAircraftMessage(tvb, 0, &asn1_ctx, tree, hf_atn_cm_CMAircraftMessage_PDU);
626 static void dissect_CMGroundMessage_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
628 asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, FALSE, pinfo);
629 dissect_atn_cm_CMGroundMessage(tvb, 0, &asn1_ctx, tree, hf_atn_cm_CMGroundMessage_PDU);
633 /*--- End of included file: packet-atn-cm-fn.c ---*/
634 #line 68 "../../asn1/atn-cm/packet-atn-cm-template.c"
635 static int proto_atn_cm = -1;
646 proto_tree *sub_tree;
648 ti = proto_tree_add_text(
652 tvb_reported_length_remaining(tvb, 0) ,
655 sub_tree = proto_item_add_subtree(
659 /* ti = proto_tree_add_item(tree, proto_atn_cm, tvb, 0, 0 , ENC_NA); */
660 /* sub_tree = proto_item_add_subtree(ti, ett_atn_cm_pdu); */
662 /* determine whether it is uplink or downlink */
663 type = check_heur_msg_type(pinfo);
667 dissect_CMGroundMessage_PDU(
673 dissect_CMAircraftMessage_PDU(
681 return tvb_reported_length_remaining(tvb, 0);
691 atn_conversation_t *atn_cv = NULL;
692 volatile gboolean is_atn_cm = FALSE;
695 /* determine whether it is uplink or downlink */
696 type = check_heur_msg_type(pinfo);
698 /* heuristically decode message */
702 dissect_CMGroundMessage_PDU(
706 /* no exception thrown: looks like it is a CM PDU */
714 dissect_CMAircraftMessage_PDU(
718 /* no exception thrown: looks like it is a CM PDU */
728 if (is_atn_cm == TRUE) {
730 /* all subsequent PDU's belonging to this conversation are considered CM */
731 /* if the first CM PDU has been decoded succesfully */
732 /* (This is done in "atn-ulcs" by using "call_dissector_with_data()") */
734 /* DT: dstref present, srcref is always zero */
735 if((pinfo->clnp_dstref) &&
736 (!pinfo->clnp_srcref)){
738 atn_cv = find_atn_conversation(
743 /* CR: srcref present, dstref is always zero */
744 if((!pinfo->clnp_dstref) &&
745 (pinfo->clnp_srcref)){
747 atn_cv = find_atn_conversation(
753 /* CC: srcref and dstref present */
754 if((pinfo->clnp_dstref) &&
755 (pinfo->clnp_srcref)){
756 atn_cv = find_atn_conversation(
762 atn_cv->ae_qualifier = cma;
775 void proto_register_atn_cm (void)
777 static hf_register_info hf_atn_cm[] = {
779 /*--- Included file: packet-atn-cm-hfarr.c ---*/
780 #line 1 "../../asn1/atn-cm/packet-atn-cm-hfarr.c"
781 { &hf_atn_cm_CMAircraftMessage_PDU,
782 { "CMAircraftMessage", "atn-cm.CMAircraftMessage",
783 FT_UINT32, BASE_DEC, VALS(atn_cm_CMAircraftMessage_vals), 0,
785 { &hf_atn_cm_CMGroundMessage_PDU,
786 { "CMGroundMessage", "atn-cm.CMGroundMessage",
787 FT_UINT32, BASE_DEC, VALS(atn_cm_CMGroundMessage_vals), 0,
789 { &hf_atn_cm_cmLogonRequest,
790 { "cmLogonRequest", "atn-cm.cmLogonRequest_element",
791 FT_NONE, BASE_NONE, NULL, 0,
793 { &hf_atn_cm_cmContactResponse,
794 { "cmContactResponse", "atn-cm.cmContactResponse",
795 FT_UINT32, BASE_DEC, VALS(atn_cm_Response_vals), 0,
797 { &hf_atn_cm_cmAbortReason,
798 { "cmAbortReason", "atn-cm.cmAbortReason",
799 FT_UINT32, BASE_DEC, VALS(atn_cm_CMAbortReason_vals), 0,
801 { &hf_atn_cm_cmLogonResponse,
802 { "cmLogonResponse", "atn-cm.cmLogonResponse_element",
803 FT_NONE, BASE_NONE, NULL, 0,
805 { &hf_atn_cm_cmUpdate,
806 { "cmUpdate", "atn-cm.cmUpdate_element",
807 FT_NONE, BASE_NONE, NULL, 0,
809 { &hf_atn_cm_cmContactRequest,
810 { "cmContactRequest", "atn-cm.cmContactRequest_element",
811 FT_NONE, BASE_NONE, NULL, 0,
813 { &hf_atn_cm_cmForwardRequest,
814 { "cmForwardRequest", "atn-cm.cmForwardRequest_element",
815 FT_NONE, BASE_NONE, NULL, 0,
817 { &hf_atn_cm_cmForwardResponse,
818 { "cmForwardResponse", "atn-cm.cmForwardResponse",
819 FT_UINT32, BASE_DEC, VALS(atn_cm_CMForwardResponse_vals), 0,
821 { &hf_atn_cm_longTsap,
822 { "longTsap", "atn-cm.longTsap_element",
823 FT_NONE, BASE_NONE, NULL, 0,
825 { &hf_atn_cm_shortTsap,
826 { "shortTsap", "atn-cm.shortTsap_element",
827 FT_NONE, BASE_NONE, NULL, 0,
829 { &hf_atn_cm_aeQualifier,
830 { "aeQualifier", "atn-cm.aeQualifier",
831 FT_UINT32, BASE_DEC, NULL, 0,
833 { &hf_atn_cm_apVersion,
834 { "apVersion", "atn-cm.apVersion",
835 FT_UINT32, BASE_DEC, NULL, 0,
836 "VersionNumber", HFILL }},
837 { &hf_atn_cm_apAddress,
838 { "apAddress", "atn-cm.apAddress",
839 FT_UINT32, BASE_DEC, VALS(atn_cm_APAddress_vals), 0,
841 { &hf_atn_cm_facilityDesignation,
842 { "facilityDesignation", "atn-cm.facilityDesignation",
843 FT_STRING, BASE_NONE, NULL, 0,
845 { &hf_atn_cm_address,
846 { "address", "atn-cm.address_element",
847 FT_NONE, BASE_NONE, NULL, 0,
848 "LongTsap", HFILL }},
849 { &hf_atn_cm_aircraftFlightIdentification,
850 { "aircraftFlightIdentification", "atn-cm.aircraftFlightIdentification",
851 FT_STRING, BASE_NONE, NULL, 0,
853 { &hf_atn_cm_cMLongTSAP,
854 { "cMLongTSAP", "atn-cm.cMLongTSAP_element",
855 FT_NONE, BASE_NONE, NULL, 0,
856 "LongTsap", HFILL }},
857 { &hf_atn_cm_groundInitiatedApplications,
858 { "groundInitiatedApplications", "atn-cm.groundInitiatedApplications",
859 FT_UINT32, BASE_DEC, NULL, 0,
860 "SEQUENCE_SIZE_1_256_OF_AEQualifierVersionAddress", HFILL }},
861 { &hf_atn_cm_groundInitiatedApplications_item,
862 { "AEQualifierVersionAddress", "atn-cm.AEQualifierVersionAddress_element",
863 FT_NONE, BASE_NONE, NULL, 0,
865 { &hf_atn_cm_airOnlyInitiatedApplications,
866 { "airOnlyInitiatedApplications", "atn-cm.airOnlyInitiatedApplications",
867 FT_UINT32, BASE_DEC, NULL, 0,
868 "SEQUENCE_SIZE_1_256_OF_AEQualifierVersion", HFILL }},
869 { &hf_atn_cm_airOnlyInitiatedApplications_item,
870 { "AEQualifierVersion", "atn-cm.AEQualifierVersion_element",
871 FT_NONE, BASE_NONE, NULL, 0,
873 { &hf_atn_cm_airportDeparture,
874 { "airportDeparture", "atn-cm.airportDeparture",
875 FT_STRING, BASE_NONE, NULL, 0,
877 { &hf_atn_cm_airportDestination,
878 { "airportDestination", "atn-cm.airportDestination",
879 FT_STRING, BASE_NONE, NULL, 0,
881 { &hf_atn_cm_dateTimeDepartureETD,
882 { "dateTimeDepartureETD", "atn-cm.dateTimeDepartureETD_element",
883 FT_NONE, BASE_NONE, NULL, 0,
884 "DateTime", HFILL }},
885 { &hf_atn_cm_airInitiatedApplications,
886 { "airInitiatedApplications", "atn-cm.airInitiatedApplications",
887 FT_UINT32, BASE_DEC, NULL, 0,
888 "SEQUENCE_SIZE_1_256_OF_AEQualifierVersionAddress", HFILL }},
889 { &hf_atn_cm_airInitiatedApplications_item,
890 { "AEQualifierVersionAddress", "atn-cm.AEQualifierVersionAddress_element",
891 FT_NONE, BASE_NONE, NULL, 0,
893 { &hf_atn_cm_groundOnlyInitiatedApplications,
894 { "groundOnlyInitiatedApplications", "atn-cm.groundOnlyInitiatedApplications",
895 FT_UINT32, BASE_DEC, NULL, 0,
896 "SEQUENCE_SIZE_1_256_OF_AEQualifierVersion", HFILL }},
897 { &hf_atn_cm_groundOnlyInitiatedApplications_item,
898 { "AEQualifierVersion", "atn-cm.AEQualifierVersion_element",
899 FT_NONE, BASE_NONE, NULL, 0,
902 { "year", "atn-cm.year",
903 FT_UINT32, BASE_DEC, NULL, 0,
906 { "month", "atn-cm.month",
907 FT_UINT32, BASE_DEC, NULL, 0,
910 { "day", "atn-cm.day",
911 FT_UINT32, BASE_DEC, NULL, 0,
914 { "date", "atn-cm.date_element",
915 FT_NONE, BASE_NONE, NULL, 0,
918 { "time", "atn-cm.time_element",
919 FT_NONE, BASE_NONE, NULL, 0,
922 { "rDP", "atn-cm.rDP",
923 FT_BYTES, BASE_NONE, NULL, 0,
924 "OCTET_STRING_SIZE_5", HFILL }},
926 { "aRS", "atn-cm.aRS",
927 FT_BYTES, BASE_NONE, NULL, 0,
928 "OCTET_STRING_SIZE_3", HFILL }},
929 { &hf_atn_cm_locSysNselTsel,
930 { "locSysNselTsel", "atn-cm.locSysNselTsel",
931 FT_BYTES, BASE_NONE, NULL, 0,
932 "OCTET_STRING_SIZE_10_11", HFILL }},
934 { "hours", "atn-cm.hours",
935 FT_UINT32, BASE_DEC, NULL, 0,
936 "Timehours", HFILL }},
937 { &hf_atn_cm_minutes,
938 { "minutes", "atn-cm.minutes",
939 FT_UINT32, BASE_DEC, NULL, 0,
940 "Timeminutes", HFILL }},
942 /*--- End of included file: packet-atn-cm-hfarr.c ---*/
943 #line 212 "../../asn1/atn-cm/packet-atn-cm-template.c"
945 static gint *ett[] = {
947 /*--- Included file: packet-atn-cm-ettarr.c ---*/
948 #line 1 "../../asn1/atn-cm/packet-atn-cm-ettarr.c"
949 &ett_atn_cm_CMAircraftMessage,
950 &ett_atn_cm_CMGroundMessage,
951 &ett_atn_cm_APAddress,
952 &ett_atn_cm_AEQualifierVersion,
953 &ett_atn_cm_AEQualifierVersionAddress,
954 &ett_atn_cm_CMContactRequest,
955 &ett_atn_cm_CMLogonRequest,
956 &ett_atn_cm_SEQUENCE_SIZE_1_256_OF_AEQualifierVersionAddress,
957 &ett_atn_cm_SEQUENCE_SIZE_1_256_OF_AEQualifierVersion,
958 &ett_atn_cm_CMLogonResponse,
960 &ett_atn_cm_DateTime,
961 &ett_atn_cm_LongTsap,
962 &ett_atn_cm_ShortTsap,
965 /*--- End of included file: packet-atn-cm-ettarr.c ---*/
966 #line 215 "../../asn1/atn-cm/packet-atn-cm-template.c"
970 /* register CM application */
971 proto_atn_cm = proto_register_protocol(
976 proto_register_field_array(
979 array_length(hf_atn_cm));
981 proto_register_subtree_array(
985 new_register_dissector(
991 void proto_reg_handoff_atn_cm(void)
993 /* add session dissector to subdissector list*/
1001 * Editor modelines - http://www.wireshark.org/tools/modelines.html
1006 * indent-tabs-mode: t
1009 * vi: set shiftwidth=2 tabstop=2 noexpandtab:
1010 * :indentSize=2:tabSize=2:noTabs=false: