1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
3 /* packet-atn-ulcs.c */
4 /* ../../tools/asn2wrs.py -u -L -p atn-ulcs -c ./atn-ulcs.cnf -s ./packet-atn-ulcs-template -D . -O ../../epan/dissectors atn-ulcs.asn */
6 /* Input file: packet-atn-ulcs-template.c */
8 #line 1 "../../asn1/atn-ulcs/packet-atn-ulcs-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:
15 * By Mathias Guettler <guettler@web.de>
18 * Routines for ATN upper layer
19 * protocol packet disassembly
21 * ATN upper layers are embedded within OSI Layer 4 (COTP).
23 * ATN upper layers contain:
24 * Session Layer (NUL protocol option)
25 * Presentation Layer (NUL protocol option)
26 * ATN upper Layer/Application (ACSE PDU or PDV-list PDU)
28 * ATN applications protocols (i.e. CM or CPDLC) are contained within
29 * ACSE user-information or PDV presentation data.
32 * http://en.wikipedia.org/wiki/CPDLC
33 * http://members.optusnet.com.au/~cjr/introduction.htm
36 * http://legacy.icao.int/anb/panels/acp/repository.cfm
39 * We are dealing with ATN/ULCS aka ICAO Doc 9705 Ed2 here
40 * (don't think there is an ULCS equivalent for "FANS-1/A ").
42 * Wireshark - Network traffic analyzer
43 * By Gerald Combs <gerald@wireshark.org>
44 * Copyright 1998 Gerald Combs
46 * This program is free software; you can redistribute it and/or
47 * modify it under the terms of the GNU General Public License
48 * as published by the Free Software Foundation; either version 2
49 * of the License, or (at your option) any later version.
51 * This program is distributed in the hope that it will be useful,
52 * but WITHOUT ANY WARRANTY; without even the implied warranty of
53 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
54 * GNU General Public License for more details.
56 * You should have received a copy of the GNU General Public License
57 * along with this program; if not, write to the Free Software
58 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
63 why not using existing ses, pres and acse dissectors ?
64 ATN upper layers are derived from OSI standards for session,
65 presentation and application but the encoding differs
66 (it's PER instead of BER encoding to save bandwith).
67 Session and presentation use the "null" encoding option,
68 meaning that they are only present at connection establishment
69 and ommitted otherwise.
70 Instead of adapting existing dissectors it seemed simpler and cleaner
71 to implement everything the new atn-ulcs dissector.
73 why using conversations ?
74 PER encoded user data is ambigous; the same encoding may apply to a CM or
75 CPDLC PDU. The workaround is to decode on a transport connection basis.
76 I use my own version of conversations to identify
77 the transport connection the PDU belongs to for the standard functions
78 from "conversation.h" didn't work out.
80 what is the use of AARQ/AARE data ?
81 Converstions should be maintained on the COTP layer in a standard way
82 for there are usually more packets available than in the layers above.
83 In the worst case my dissector is called from a DT packet which
84 has destination references but no source reference.
85 I have to guess the reference used the other way round
86 (curently I am using ACSE PDU'S used during OSI connection establishment for that).
87 The idea is that each ACSE AARQ is answered by ACSE AARE and having this sequence
88 I have all the source/destination references for this transport connection.
89 I use AARQ/AARE data to store the source/destination reference of AARQ as well
90 as the optional ae-qualifier which tells me the application and
91 the dissector I have to use.
92 This approach donesn't work well when there are interleaving AARQ/AARE sequences for
95 which ATN standard is supported ?
96 The dissector has been tested with ICAO doc9705 Edition2 compliant traffic.
97 No ATN Secutity is supported.
99 The ATN upper layers are derived from OSI standards (ICAO DOC 9705)
100 while ATN/IPS (ICAO DOC 9896) which is entirely based on IPV6.
105 known defects/deficiencies:
107 - user-information within AARE is sometines not decoded due to an unset flag
108 (the field is optional). As far as I can tell asn2wrs is right here,
109 but on the other hand I know that in all of this cases user-information
110 is present and is processed by the ATN end system.
111 Maybe a true ATN expert may help me out here.
113 - The conversation handling is based on src/dst addresses as well as
114 source or destination references depending on the TP4 packet type.
115 This means that after some time these references get reused for
116 new conversations. This almost certain happens for traces longer
117 than one day rendering this dissector unsuitable for captures exceeding
125 #include <epan/packet.h>
126 #include <epan/dissectors/packet-ber.h>
127 #include <epan/dissectors/packet-per.h>
128 #include <epan/wmem/wmem.h>
129 #include <epan/address.h>
130 #include <epan/conversation.h>
135 #include "packet-atn-ulcs.h"
137 #define ATN_ACSE_PROTO "ICAO Doc9705 ULCS ACSE (ISO 8649/8650-1:1996)"
138 #define ATN_ULCS_PROTO "ICAO Doc9705 ULCS"
140 void proto_register_atn_ulcs(void);
141 void proto_reg_handoff_atn_ulcs(void);
143 static heur_dissector_list_t atn_ulcs_heur_subdissector_list;
145 /* presentation subdissectors i.e. CM, CPDLC */
146 static dissector_handle_t atn_cm_handle = NULL;
147 static dissector_handle_t atn_cpdlc_handle = NULL;
149 static int proto_atn_ulcs = -1;
150 static guint32 ulcs_context_value = 0;
151 static const char *object_identifier_id;
153 static wmem_tree_t *aarq_data_tree = NULL;
154 static wmem_tree_t *atn_conversation_tree = NULL;
157 static proto_tree *root_tree = NULL;
159 /* forward declarations for functions generated from asn1 */
160 static int dissect_atn_ulcs_T_externalt_encoding_single_asn1_type(
163 asn1_ctx_t *actx _U_,
164 proto_tree *tree _U_,
168 static int dissect_atn_ulcs_T_externalt_encoding_octet_aligned(
171 asn1_ctx_t *actx _U_,
172 proto_tree *tree _U_,
175 static int dissect_atn_ulcs_T_externalt_encoding_arbitrary(
178 asn1_ctx_t *actx _U_,
179 proto_tree *tree _U_,
182 static void dissect_ACSE_apdu_PDU(
184 packet_info *pinfo _U_,
185 proto_tree *tree _U_);
187 guint32 dissect_per_object_descriptor_t(
193 tvbuff_t **value_tvb);
195 static gint dissect_atn_ulcs(
202 /*--- Included file: packet-atn-ulcs-hf.c ---*/
203 #line 1 "../../asn1/atn-ulcs/packet-atn-ulcs-hf.c"
204 static int hf_atn_ulcs_Fully_encoded_data_PDU = -1; /* Fully_encoded_data */
205 static int hf_atn_ulcs_ACSE_apdu_PDU = -1; /* ACSE_apdu */
206 static int hf_atn_ulcs_Fully_encoded_data_item = -1; /* PDV_list */
207 static int hf_atn_ulcs_transfer_syntax_name = -1; /* Transfer_syntax_name */
208 static int hf_atn_ulcs_presentation_context_identifier = -1; /* Presentation_context_identifier */
209 static int hf_atn_ulcs_presentation_data_values = -1; /* T_presentation_data_values */
210 static int hf_atn_ulcs_pdv_list_presentation_data_values_single_asn1_type = -1; /* T_pdv_list_presentation_data_values_single_asn1_type */
211 static int hf_atn_ulcs_octet_aligned = -1; /* OCTET_STRING */
212 static int hf_atn_ulcs_pdv_list_presentation_data_values_arbitrary = -1; /* T_pdv_list_presentation_data_values_arbitrary */
213 static int hf_atn_ulcs_direct_reference = -1; /* OBJECT_IDENTIFIER */
214 static int hf_atn_ulcs_indirect_reference = -1; /* INTEGER */
215 static int hf_atn_ulcs_data_value_descriptor = -1; /* T_data_value_descriptor */
216 static int hf_atn_ulcs_encoding = -1; /* T_encoding */
217 static int hf_atn_ulcs_externalt_encoding_single_asn1_type = -1; /* T_externalt_encoding_single_asn1_type */
218 static int hf_atn_ulcs_externalt_encoding_octet_aligned = -1; /* T_externalt_encoding_octet_aligned */
219 static int hf_atn_ulcs_externalt_encoding_arbitrary = -1; /* T_externalt_encoding_arbitrary */
220 static int hf_atn_ulcs_aarq = -1; /* AARQ_apdu */
221 static int hf_atn_ulcs_aare = -1; /* AARE_apdu */
222 static int hf_atn_ulcs_rlrq = -1; /* RLRQ_apdu */
223 static int hf_atn_ulcs_rlre = -1; /* RLRE_apdu */
224 static int hf_atn_ulcs_abrt = -1; /* ABRT_apdu */
225 static int hf_atn_ulcs_aarq_apdu_protocol_version = -1; /* T_aarq_apdu_protocol_version */
226 static int hf_atn_ulcs_application_context_name = -1; /* Application_context_name */
227 static int hf_atn_ulcs_called_AP_title = -1; /* AP_title */
228 static int hf_atn_ulcs_called_AE_qualifier = -1; /* AE_qualifier */
229 static int hf_atn_ulcs_called_AP_invocation_identifier = -1; /* AP_invocation_identifier */
230 static int hf_atn_ulcs_called_AE_invocation_identifier = -1; /* AE_invocation_identifier */
231 static int hf_atn_ulcs_calling_AP_title = -1; /* AP_title */
232 static int hf_atn_ulcs_calling_AE_qualifier = -1; /* AE_qualifier */
233 static int hf_atn_ulcs_calling_AP_invocation_identifier = -1; /* AP_invocation_identifier */
234 static int hf_atn_ulcs_calling_AE_invocation_identifier = -1; /* AE_invocation_identifier */
235 static int hf_atn_ulcs_sender_acse_requirements = -1; /* ACSE_requirements */
236 static int hf_atn_ulcs_mechanism_name = -1; /* Mechanism_name */
237 static int hf_atn_ulcs_calling_authentication_value = -1; /* Authentication_value */
238 static int hf_atn_ulcs_application_context_name_list = -1; /* Application_context_name_list */
239 static int hf_atn_ulcs_implementation_information = -1; /* Implementation_data */
240 static int hf_atn_ulcs_user_information = -1; /* Association_information */
241 static int hf_atn_ulcs_aare_apdu_protocol_version = -1; /* T_aare_apdu_protocol_version */
242 static int hf_atn_ulcs_result = -1; /* Associate_result */
243 static int hf_atn_ulcs_result_source_diagnostic = -1; /* Associate_source_diagnostic */
244 static int hf_atn_ulcs_responding_AP_title = -1; /* AP_title */
245 static int hf_atn_ulcs_responding_AE_qualifier = -1; /* AE_qualifier */
246 static int hf_atn_ulcs_responding_AP_invocation_identifier = -1; /* AP_invocation_identifier */
247 static int hf_atn_ulcs_responding_AE_invocation_identifier = -1; /* AE_invocation_identifier */
248 static int hf_atn_ulcs_responder_acse_requirements = -1; /* ACSE_requirements */
249 static int hf_atn_ulcs_responding_authentication_value = -1; /* Authentication_value */
250 static int hf_atn_ulcs_rlrq_apdu_request_reason = -1; /* Release_request_reason */
251 static int hf_atn_ulcs_rlre_apdu_response_reason = -1; /* Release_response_reason */
252 static int hf_atn_ulcs_abort_source = -1; /* ABRT_source */
253 static int hf_atn_ulcs_abort_diagnostic = -1; /* ABRT_diagnostic */
254 static int hf_atn_ulcs_Application_context_name_list_item = -1; /* Application_context_name */
255 static int hf_atn_ulcs_ap_title_form2 = -1; /* AP_title_form2 */
256 static int hf_atn_ulcs_ap_title_form1 = -1; /* AP_title_form1 */
257 static int hf_atn_ulcs_ae_qualifier_form2 = -1; /* AE_qualifier_form2 */
258 static int hf_atn_ulcs_ae_qualifier_form1 = -1; /* AE_qualifier_form1 */
259 static int hf_atn_ulcs_acse_service_user = -1; /* T_acse_service_user */
260 static int hf_atn_ulcs_acse_service_provider = -1; /* T_acse_service_provider */
261 static int hf_atn_ulcs_Association_information_item = -1; /* EXTERNALt */
262 static int hf_atn_ulcs_charstring = -1; /* OCTET_STRING */
263 static int hf_atn_ulcs_bitstring = -1; /* BIT_STRING */
264 static int hf_atn_ulcs_external = -1; /* EXTERNAL */
265 static int hf_atn_ulcs_other = -1; /* T_other */
266 static int hf_atn_ulcs_other_mechanism_name = -1; /* OBJECT_IDENTIFIER */
267 static int hf_atn_ulcs_other_mechanism_value = -1; /* T_other_mechanism_value */
268 static int hf_atn_ulcs_rdnSequence = -1; /* RDNSequence */
269 static int hf_atn_ulcs_RDNSequence_item = -1; /* RelativeDistinguishedName */
270 static int hf_atn_ulcs_RelativeDistinguishedName_item = -1; /* AttributeTypeAndValue */
271 static int hf_atn_ulcs_null = -1; /* NULL */
273 static int hf_atn_ulcs_T_aarq_apdu_protocol_version_version1 = -1;
274 static int hf_atn_ulcs_T_aare_apdu_protocol_version_version1 = -1;
275 static int hf_atn_ulcs_ACSE_requirements_authentication = -1;
276 static int hf_atn_ulcs_ACSE_requirements_application_context_negotiation = -1;
278 /*--- End of included file: packet-atn-ulcs-hf.c ---*/
279 #line 194 "../../asn1/atn-ulcs/packet-atn-ulcs-template.c"
282 /*--- Included file: packet-atn-ulcs-ett.c ---*/
283 #line 1 "../../asn1/atn-ulcs/packet-atn-ulcs-ett.c"
284 static gint ett_atn_ulcs_Fully_encoded_data = -1;
285 static gint ett_atn_ulcs_PDV_list = -1;
286 static gint ett_atn_ulcs_T_presentation_data_values = -1;
287 static gint ett_atn_ulcs_EXTERNALt = -1;
288 static gint ett_atn_ulcs_T_encoding = -1;
289 static gint ett_atn_ulcs_ACSE_apdu = -1;
290 static gint ett_atn_ulcs_AARQ_apdu = -1;
291 static gint ett_atn_ulcs_T_aarq_apdu_protocol_version = -1;
292 static gint ett_atn_ulcs_AARE_apdu = -1;
293 static gint ett_atn_ulcs_T_aare_apdu_protocol_version = -1;
294 static gint ett_atn_ulcs_RLRQ_apdu = -1;
295 static gint ett_atn_ulcs_RLRE_apdu = -1;
296 static gint ett_atn_ulcs_ABRT_apdu = -1;
297 static gint ett_atn_ulcs_ACSE_requirements = -1;
298 static gint ett_atn_ulcs_Application_context_name_list = -1;
299 static gint ett_atn_ulcs_AP_title = -1;
300 static gint ett_atn_ulcs_AE_qualifier = -1;
301 static gint ett_atn_ulcs_Associate_source_diagnostic = -1;
302 static gint ett_atn_ulcs_Association_information = -1;
303 static gint ett_atn_ulcs_Authentication_value = -1;
304 static gint ett_atn_ulcs_T_other = -1;
305 static gint ett_atn_ulcs_Name = -1;
306 static gint ett_atn_ulcs_RDNSequence = -1;
307 static gint ett_atn_ulcs_RelativeDistinguishedName = -1;
308 static gint ett_atn_ulcs_AttributeTypeAndValue = -1;
310 /*--- End of included file: packet-atn-ulcs-ett.c ---*/
311 #line 196 "../../asn1/atn-ulcs/packet-atn-ulcs-template.c"
312 static gint ett_atn_ulcs = -1;
313 static gint ett_atn_acse = -1;
316 /*--- Included file: packet-atn-ulcs-fn.c ---*/
317 #line 1 "../../asn1/atn-ulcs/packet-atn-ulcs-fn.c"
321 dissect_atn_ulcs_Transfer_syntax_name(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
322 offset = dissect_per_object_identifier(tvb, offset, actx, tree, hf_index, NULL);
328 static const value_string atn_ulcs_Presentation_context_identifier_vals[] = {
331 { 3, "user-ase-apdu" },
337 dissect_atn_ulcs_Presentation_context_identifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
339 offset = dissect_per_constrained_integer(
357 dissect_atn_ulcs_T_pdv_list_presentation_data_values_single_asn1_type(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
358 offset = dissect_per_open_type(tvb, offset, actx, tree, hf_index, NULL);
366 dissect_atn_ulcs_OCTET_STRING(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
367 offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
368 NO_BOUND, NO_BOUND, FALSE, NULL);
376 dissect_atn_ulcs_T_pdv_list_presentation_data_values_arbitrary(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
378 packet_info * pinfo = actx->pinfo;
379 tvbuff_t *tvb_usr = NULL;
380 proto_item *ti = NULL;
381 proto_tree *atn_ulcs_tree = NULL;
382 atn_conversation_t *atn_cv = NULL;
384 /* extract bitstring into new tvb buffer */
385 offset = dissect_per_bit_string(
398 /* call appropiate dissector for bitstring data */
399 switch(ulcs_context_value){
400 case 1: /* ACSE PDU*/
401 ti = proto_tree_add_text(
407 atn_ulcs_tree = proto_item_add_subtree(ti, ett_atn_acse);
409 dissect_ACSE_apdu_PDU(
410 tvb_new_subset_remaining(tvb_usr, 0),
414 case 3: /* USER data; call subdissector for CM, CPDLC ... */
416 /* using dstref for PDV-list only occurrs in DT */
417 atn_cv = find_atn_conversation(
423 switch(atn_cv->ae_qualifier){
424 case cma: /* contact management */
425 call_dissector_with_data(
427 tvb_new_subset_remaining(tvb_usr, 0),
432 case cpdlc: /* plain old cpdlc */
433 case pmcpdlc: /* protected mode cpdlc */
434 call_dissector_with_data(
436 tvb_new_subset_remaining(tvb_usr, 0),
441 default: /* unknown or unhandled datalink application */
442 dissector_try_heuristic(
443 atn_ulcs_heur_subdissector_list,
444 tvb_new_subset_remaining(tvb_usr,0),
452 dissector_try_heuristic(
453 atn_ulcs_heur_subdissector_list,
454 tvb_new_subset_remaining(tvb_usr,0),
462 } /* switch(ulcs_context_value) */
470 static const value_string atn_ulcs_T_presentation_data_values_vals[] = {
471 { 0, "single-ASN1-type" },
472 { 1, "octet-aligned" },
477 static const per_choice_t T_presentation_data_values_choice[] = {
478 { 0, &hf_atn_ulcs_pdv_list_presentation_data_values_single_asn1_type, ASN1_NO_EXTENSIONS , dissect_atn_ulcs_T_pdv_list_presentation_data_values_single_asn1_type },
479 { 1, &hf_atn_ulcs_octet_aligned, ASN1_NO_EXTENSIONS , dissect_atn_ulcs_OCTET_STRING },
480 { 2, &hf_atn_ulcs_pdv_list_presentation_data_values_arbitrary, ASN1_NO_EXTENSIONS , dissect_atn_ulcs_T_pdv_list_presentation_data_values_arbitrary },
485 dissect_atn_ulcs_T_presentation_data_values(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
486 offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
487 ett_atn_ulcs_T_presentation_data_values, T_presentation_data_values_choice,
494 static const per_sequence_t PDV_list_sequence[] = {
495 { &hf_atn_ulcs_transfer_syntax_name, ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_atn_ulcs_Transfer_syntax_name },
496 { &hf_atn_ulcs_presentation_context_identifier, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_ulcs_Presentation_context_identifier },
497 { &hf_atn_ulcs_presentation_data_values, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_ulcs_T_presentation_data_values },
502 dissect_atn_ulcs_PDV_list(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
503 offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
504 ett_atn_ulcs_PDV_list, PDV_list_sequence);
510 static const per_sequence_t Fully_encoded_data_sequence_of[1] = {
511 { &hf_atn_ulcs_Fully_encoded_data_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_ulcs_PDV_list },
515 dissect_atn_ulcs_Fully_encoded_data(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
516 offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index,
517 ett_atn_ulcs_Fully_encoded_data, Fully_encoded_data_sequence_of,
526 dissect_atn_ulcs_OBJECT_IDENTIFIER(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
527 offset = dissect_per_object_identifier(tvb, offset, actx, tree, hf_index, NULL);
535 dissect_atn_ulcs_INTEGER(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
536 offset = dissect_per_integer(tvb, offset, actx, tree, hf_index, NULL);
544 dissect_atn_ulcs_T_data_value_descriptor(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
546 offset = dissect_per_octet_string(
555 &actx->external.data_value_descriptor);
556 actx->external.data_value_descr_present = TRUE;
565 dissect_atn_ulcs_T_externalt_encoding_single_asn1_type(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
567 offset = dissect_per_open_type(tvb, offset, actx, tree, hf_index, NULL);
577 dissect_atn_ulcs_T_externalt_encoding_octet_aligned(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
579 offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
580 NO_BOUND, NO_BOUND, FALSE, NULL);
590 dissect_atn_ulcs_T_externalt_encoding_arbitrary(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
591 tvbuff_t *tvb_usr = NULL;
592 packet_info * pinfo = actx->pinfo;
593 atn_conversation_t *atn_cv = NULL;
595 /* decode bit-string user data within ACSE */
596 offset = dissect_per_bit_string(
608 /* DT: dstref present, srcref is always zero */
609 if((pinfo->clnp_dstref) && (!pinfo->clnp_srcref)){
611 atn_cv = find_atn_conversation(
616 /* CR: srcref present, dstref always zero */
617 if((pinfo->clnp_srcref) && (!pinfo->clnp_dstref)){
619 atn_cv = find_atn_conversation(
624 /* CC: srcref and dstref present */
625 if((pinfo->clnp_srcref) && (pinfo->clnp_dstref)){
627 atn_cv = find_atn_conversation(
634 switch(atn_cv->ae_qualifier){
635 case cma: /* contact management */
637 call_dissector_with_data(
639 tvb_new_subset_remaining(tvb_usr, 0),
644 case cpdlc: /* plain old cpdlc */
645 case pmcpdlc: /* protected mode cpdlc */
647 call_dissector_with_data(
649 tvb_new_subset_remaining(tvb_usr, 0),
654 default: /* unknown or unhandled datalink application */
656 dissector_try_heuristic(
657 atn_ulcs_heur_subdissector_list,
658 tvb_new_subset_remaining(tvb_usr,0),
666 dissector_try_heuristic(
667 atn_ulcs_heur_subdissector_list,
668 tvb_new_subset_remaining(tvb_usr,0),
675 offset += tvb_length_remaining(tvb, offset);
682 static const value_string atn_ulcs_T_encoding_vals[] = {
683 { 0, "single-ASN1-type" },
684 { 1, "octet-aligned" },
689 static const per_choice_t T_encoding_choice[] = {
690 { 0, &hf_atn_ulcs_externalt_encoding_single_asn1_type, ASN1_NO_EXTENSIONS , dissect_atn_ulcs_T_externalt_encoding_single_asn1_type },
691 { 1, &hf_atn_ulcs_externalt_encoding_octet_aligned, ASN1_NO_EXTENSIONS , dissect_atn_ulcs_T_externalt_encoding_octet_aligned },
692 { 2, &hf_atn_ulcs_externalt_encoding_arbitrary, ASN1_NO_EXTENSIONS , dissect_atn_ulcs_T_externalt_encoding_arbitrary },
697 dissect_atn_ulcs_T_encoding(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
698 offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
699 ett_atn_ulcs_T_encoding, T_encoding_choice,
706 static const per_sequence_t EXTERNALt_sequence[] = {
707 { &hf_atn_ulcs_direct_reference, ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_atn_ulcs_OBJECT_IDENTIFIER },
708 { &hf_atn_ulcs_indirect_reference, ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_atn_ulcs_INTEGER },
709 { &hf_atn_ulcs_data_value_descriptor, ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_atn_ulcs_T_data_value_descriptor },
710 { &hf_atn_ulcs_encoding , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_ulcs_T_encoding },
715 dissect_atn_ulcs_EXTERNALt(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
716 offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
717 ett_atn_ulcs_EXTERNALt, EXTERNALt_sequence);
725 dissect_atn_ulcs_T_aarq_apdu_protocol_version(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
726 offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
727 NO_BOUND, NO_BOUND, FALSE, NULL, NULL);
735 dissect_atn_ulcs_Application_context_name(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
736 offset = dissect_per_object_identifier(tvb, offset, actx, tree, hf_index, NULL);
744 dissect_atn_ulcs_AP_title_form2(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
745 offset = dissect_per_object_identifier(tvb, offset, actx, tree, hf_index, NULL);
753 dissect_atn_ulcs_NULL(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
754 offset = dissect_per_null(tvb, offset, actx, tree, hf_index);
760 static const per_sequence_t AttributeTypeAndValue_sequence[] = {
761 { &hf_atn_ulcs_null , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_ulcs_NULL },
766 dissect_atn_ulcs_AttributeTypeAndValue(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
767 offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
768 ett_atn_ulcs_AttributeTypeAndValue, AttributeTypeAndValue_sequence);
774 static const per_sequence_t RelativeDistinguishedName_set_of[1] = {
775 { &hf_atn_ulcs_RelativeDistinguishedName_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_ulcs_AttributeTypeAndValue },
779 dissect_atn_ulcs_RelativeDistinguishedName(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
780 offset = dissect_per_constrained_set_of(tvb, offset, actx, tree, hf_index,
781 ett_atn_ulcs_RelativeDistinguishedName, RelativeDistinguishedName_set_of,
788 static const per_sequence_t RDNSequence_sequence_of[1] = {
789 { &hf_atn_ulcs_RDNSequence_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_ulcs_RelativeDistinguishedName },
793 dissect_atn_ulcs_RDNSequence(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
794 offset = dissect_per_sequence_of(tvb, offset, actx, tree, hf_index,
795 ett_atn_ulcs_RDNSequence, RDNSequence_sequence_of);
801 static const value_string atn_ulcs_Name_vals[] = {
802 { 0, "rdnSequence" },
806 static const per_choice_t Name_choice[] = {
807 { 0, &hf_atn_ulcs_rdnSequence, ASN1_NO_EXTENSIONS , dissect_atn_ulcs_RDNSequence },
812 dissect_atn_ulcs_Name(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
813 offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
814 ett_atn_ulcs_Name, Name_choice,
823 dissect_atn_ulcs_AP_title_form1(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
824 offset = dissect_atn_ulcs_Name(tvb, offset, actx, tree, hf_index);
830 static const value_string atn_ulcs_AP_title_vals[] = {
831 { 0, "ap-title-form2" },
832 { 1, "ap-title-form1" },
836 static const per_choice_t AP_title_choice[] = {
837 { 0, &hf_atn_ulcs_ap_title_form2, ASN1_EXTENSION_ROOT , dissect_atn_ulcs_AP_title_form2 },
838 { 1, &hf_atn_ulcs_ap_title_form1, ASN1_EXTENSION_ROOT , dissect_atn_ulcs_AP_title_form1 },
843 dissect_atn_ulcs_AP_title(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
844 offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
845 ett_atn_ulcs_AP_title, AP_title_choice,
854 dissect_atn_ulcs_AE_qualifier_form2(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
855 packet_info * pinfo = actx->pinfo;
856 atn_conversation_t *atn_cv = NULL;
857 guint32 ae_qualifier = 0;
859 /* dissect ae-qualifier */
860 offset = dissect_per_integer(
870 /* the field "calling-AE-qualifier" is optional, */
871 /* which means that we can exploit it only if it is present. */
872 /* We still depend on heuristical decoding of CM, CPDLC PDU's otherwise. */
874 /* AARQ/DT: dstref present, srcref is always zero */
875 if((pinfo->clnp_dstref) && (!pinfo->clnp_srcref)){
876 atn_cv = find_atn_conversation(&pinfo->dst,
881 /* AARQ/CR: srcref present, dstref is always zero */
882 if((!pinfo->clnp_dstref) && (pinfo->clnp_srcref)){
883 atn_cv = find_atn_conversation(&pinfo->src,
889 atn_cv->ae_qualifier = ae_qualifier;
898 dissect_atn_ulcs_AE_qualifier_form1(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
899 offset = dissect_atn_ulcs_RelativeDistinguishedName(tvb, offset, actx, tree, hf_index);
905 static const value_string atn_ulcs_AE_qualifier_vals[] = {
906 { 0, "ae-qualifier-form2" },
907 { 1, "ae-qualifier-form1" },
911 static const per_choice_t AE_qualifier_choice[] = {
912 { 0, &hf_atn_ulcs_ae_qualifier_form2, ASN1_EXTENSION_ROOT , dissect_atn_ulcs_AE_qualifier_form2 },
913 { 1, &hf_atn_ulcs_ae_qualifier_form1, ASN1_EXTENSION_ROOT , dissect_atn_ulcs_AE_qualifier_form1 },
918 dissect_atn_ulcs_AE_qualifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
919 offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
920 ett_atn_ulcs_AE_qualifier, AE_qualifier_choice,
929 dissect_atn_ulcs_AP_invocation_identifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
930 offset = dissect_per_integer(tvb, offset, actx, tree, hf_index, NULL);
938 dissect_atn_ulcs_AE_invocation_identifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
939 offset = dissect_per_integer(tvb, offset, actx, tree, hf_index, NULL);
947 dissect_atn_ulcs_ACSE_requirements(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
948 offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
949 NO_BOUND, NO_BOUND, FALSE, NULL, NULL);
957 dissect_atn_ulcs_Mechanism_name(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
959 offset = dissect_per_object_identifier(
968 offset = dissect_per_object_identifier(
983 dissect_atn_ulcs_BIT_STRING(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
984 offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
985 NO_BOUND, NO_BOUND, FALSE, NULL, NULL);
993 dissect_atn_ulcs_EXTERNAL(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
994 offset = dissect_per_external_type(tvb, offset, actx, tree, hf_index, NULL);
1002 dissect_atn_ulcs_T_other_mechanism_value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1004 offset=call_ber_oid_callback(
1005 object_identifier_id,
1012 offset=call_ber_oid_callback(
1013 object_identifier_id,
1024 static const per_sequence_t T_other_sequence[] = {
1025 { &hf_atn_ulcs_other_mechanism_name, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_ulcs_OBJECT_IDENTIFIER },
1026 { &hf_atn_ulcs_other_mechanism_value, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_ulcs_T_other_mechanism_value },
1027 { NULL, 0, 0, NULL }
1031 dissect_atn_ulcs_T_other(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1032 offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
1033 ett_atn_ulcs_T_other, T_other_sequence);
1039 static const value_string atn_ulcs_Authentication_value_vals[] = {
1040 { 0, "charstring" },
1047 static const per_choice_t Authentication_value_choice[] = {
1048 { 0, &hf_atn_ulcs_charstring , ASN1_NO_EXTENSIONS , dissect_atn_ulcs_OCTET_STRING },
1049 { 1, &hf_atn_ulcs_bitstring , ASN1_NO_EXTENSIONS , dissect_atn_ulcs_BIT_STRING },
1050 { 2, &hf_atn_ulcs_external , ASN1_NO_EXTENSIONS , dissect_atn_ulcs_EXTERNAL },
1051 { 3, &hf_atn_ulcs_other , ASN1_NO_EXTENSIONS , dissect_atn_ulcs_T_other },
1052 { 0, NULL, 0, NULL }
1056 dissect_atn_ulcs_Authentication_value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1057 offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
1058 ett_atn_ulcs_Authentication_value, Authentication_value_choice,
1065 static const per_sequence_t Application_context_name_list_sequence_of[1] = {
1066 { &hf_atn_ulcs_Application_context_name_list_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_ulcs_Application_context_name },
1070 dissect_atn_ulcs_Application_context_name_list(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1071 offset = dissect_per_sequence_of(tvb, offset, actx, tree, hf_index,
1072 ett_atn_ulcs_Application_context_name_list, Application_context_name_list_sequence_of);
1080 dissect_atn_ulcs_Implementation_data(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1081 offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
1082 NO_BOUND, NO_BOUND, FALSE, NULL);
1088 static const per_sequence_t Association_information_sequence_of[1] = {
1089 { &hf_atn_ulcs_Association_information_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_atn_ulcs_EXTERNALt },
1093 dissect_atn_ulcs_Association_information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1094 offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index,
1095 ett_atn_ulcs_Association_information, Association_information_sequence_of,
1102 static const per_sequence_t AARQ_apdu_sequence[] = {
1103 { &hf_atn_ulcs_aarq_apdu_protocol_version, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_T_aarq_apdu_protocol_version },
1104 { &hf_atn_ulcs_application_context_name, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_atn_ulcs_Application_context_name },
1105 { &hf_atn_ulcs_called_AP_title, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_AP_title },
1106 { &hf_atn_ulcs_called_AE_qualifier, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_AE_qualifier },
1107 { &hf_atn_ulcs_called_AP_invocation_identifier, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_AP_invocation_identifier },
1108 { &hf_atn_ulcs_called_AE_invocation_identifier, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_AE_invocation_identifier },
1109 { &hf_atn_ulcs_calling_AP_title, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_AP_title },
1110 { &hf_atn_ulcs_calling_AE_qualifier, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_AE_qualifier },
1111 { &hf_atn_ulcs_calling_AP_invocation_identifier, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_AP_invocation_identifier },
1112 { &hf_atn_ulcs_calling_AE_invocation_identifier, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_AE_invocation_identifier },
1113 { &hf_atn_ulcs_sender_acse_requirements, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_ACSE_requirements },
1114 { &hf_atn_ulcs_mechanism_name, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_Mechanism_name },
1115 { &hf_atn_ulcs_calling_authentication_value, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_Authentication_value },
1116 { &hf_atn_ulcs_application_context_name_list, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_Application_context_name_list },
1117 { &hf_atn_ulcs_implementation_information, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_Implementation_data },
1118 { &hf_atn_ulcs_user_information, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_Association_information },
1119 { NULL, 0, 0, NULL }
1123 dissect_atn_ulcs_AARQ_apdu(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1124 packet_info * pinfo = actx->pinfo;
1125 aarq_data_t *aarq_data = NULL;
1126 atn_conversation_t *atn_cv = NULL;
1127 guint32 aircraft_24_bit_address = 0;
1129 /* AARQ/DT: dstref present, srcref is always zero */
1130 if((pinfo->clnp_dstref) && (!pinfo->clnp_srcref)){
1132 atn_cv = find_atn_conversation(
1137 atn_cv = wmem_new(wmem_file_scope(), atn_conversation_t);
1138 atn_cv->ae_qualifier = unknown;
1139 create_atn_conversation(&pinfo->dst,
1146 /* AARQ/CR: srcref present, dstref is always zero */
1147 if((!pinfo->clnp_dstref) && (pinfo->clnp_srcref)){
1148 atn_cv = find_atn_conversation(&pinfo->src,
1152 atn_cv = wmem_new(wmem_file_scope(), atn_conversation_t);
1153 atn_cv->ae_qualifier = unknown;
1154 create_atn_conversation(&pinfo->src,
1161 /* conversation is to be created prior to decoding */
1162 /* of "AE-qualifier-form2" which takes place here: */
1163 offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
1164 ett_atn_ulcs_AARQ_apdu, AARQ_apdu_sequence);
1168 /* save AARQ packet data to create a conversation */
1169 /* when decoding the following AARE PDU */
1170 /* ATN applications CM and CPDLC are air/ground applications */
1171 /* so there is always an aircraft (with its 24-bit address) */
1172 /* and a ground facility. */
1173 /* the assumption is that there is only one open AARQ/AARE */
1174 /* dialog per aircraft at a time. */
1175 /* the aircraft's 24-bit address is used as a key to each AARQ */
1176 /* data. AARQ data is used to create a conversation with */
1177 /* air and ground endpoints (based on NSAP's and transport references) */
1178 /* when decoding AARE.*/
1180 /* it may be more robust to create the conversation */
1181 /* in the "ositp" dissector an to merely use the conversation here */
1182 aircraft_24_bit_address =
1183 get_aircraft_24_bit_address_from_nsap(pinfo);
1185 /* search for aarq entry */
1186 aarq_data = (aarq_data_t *) wmem_tree_lookup32(
1188 aircraft_24_bit_address);
1190 if(!aarq_data){ /* aarq data not found, create new record */
1192 /* alloc aarq data */
1193 aarq_data = wmem_new(wmem_file_scope(), aarq_data_t);
1194 aarq_data-> aarq_pending = FALSE;
1196 /* insert aarq data */
1197 wmem_tree_insert32(aarq_data_tree ,aircraft_24_bit_address,(void*)aarq_data);
1200 /* check for pending AARQ/AARE sequences */
1201 /* if "aarq_data-> aarq_pending" is set this means that there is already one */
1202 /* AARQ/AARE sequence pending (is unwise to overwrite AARE/AARQ) */
1203 if (aarq_data-> aarq_pending == FALSE ) {
1205 /* init aarq data */
1206 memset(aarq_data,0,sizeof(aarq_data_t));
1208 aarq_data->cv = atn_cv;
1209 aarq_data-> aarq_pending = TRUE;
1219 dissect_atn_ulcs_T_aare_apdu_protocol_version(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1220 offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
1221 NO_BOUND, NO_BOUND, FALSE, NULL, NULL);
1227 static const value_string atn_ulcs_Associate_result_vals[] = {
1229 { 1, "rejected-permanent" },
1230 { 2, "rejected-transient" },
1236 dissect_atn_ulcs_Associate_result(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1237 /* extension present: last param set to true. asn2wrs didn't take notice of that */
1238 offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
1239 0U, 2U, NULL, TRUE);
1245 static const value_string atn_ulcs_T_acse_service_user_vals[] = {
1247 { 1, "no-reason-given" },
1248 { 2, "application-context-name-not-supported" },
1249 { 3, "calling-AP-title-not-recognized" },
1250 { 4, "calling-AP-invocation-identifier-not-recognized" },
1251 { 5, "calling-AE-qualifier-not-recognized" },
1252 { 6, "calling-AE-invocation-identifier-not-recognized" },
1253 { 7, "called-AP-title-not-recognized" },
1254 { 8, "called-AP-invocation-identifier-not-recognized" },
1255 { 9, "called-AE-qualifier-not-recognized" },
1256 { 10, "called-AE-invocation-identifier-not-recognized" },
1257 { 11, "authentication-mechanism-name-not-recognized" },
1258 { 12, "authentication-mechanism-name-required" },
1259 { 13, "authentication-failure" },
1260 { 14, "authentication-required" },
1266 dissect_atn_ulcs_T_acse_service_user(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1267 offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
1268 0U, 14U, NULL, TRUE);
1274 static const value_string atn_ulcs_T_acse_service_provider_vals[] = {
1276 { 1, "no-reason-given" },
1277 { 2, "no-common-acse-version" },
1283 dissect_atn_ulcs_T_acse_service_provider(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1284 offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
1285 0U, 2U, NULL, TRUE);
1291 static const value_string atn_ulcs_Associate_source_diagnostic_vals[] = {
1292 { 1, "acse-service-user" },
1293 { 2, "acse-service-provider" },
1297 static const per_choice_t Associate_source_diagnostic_choice[] = {
1298 { 1, &hf_atn_ulcs_acse_service_user, ASN1_NO_EXTENSIONS , dissect_atn_ulcs_T_acse_service_user },
1299 { 2, &hf_atn_ulcs_acse_service_provider, ASN1_NO_EXTENSIONS , dissect_atn_ulcs_T_acse_service_provider },
1300 { 0, NULL, 0, NULL }
1304 dissect_atn_ulcs_Associate_source_diagnostic(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1305 offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
1306 ett_atn_ulcs_Associate_source_diagnostic, Associate_source_diagnostic_choice,
1313 static const per_sequence_t AARE_apdu_sequence[] = {
1314 { &hf_atn_ulcs_aare_apdu_protocol_version, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_T_aare_apdu_protocol_version },
1315 { &hf_atn_ulcs_application_context_name, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_atn_ulcs_Application_context_name },
1316 { &hf_atn_ulcs_result , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_atn_ulcs_Associate_result },
1317 { &hf_atn_ulcs_result_source_diagnostic, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_atn_ulcs_Associate_source_diagnostic },
1318 { &hf_atn_ulcs_responding_AP_title, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_AP_title },
1319 { &hf_atn_ulcs_responding_AE_qualifier, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_AE_qualifier },
1320 { &hf_atn_ulcs_responding_AP_invocation_identifier, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_AP_invocation_identifier },
1321 { &hf_atn_ulcs_responding_AE_invocation_identifier, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_AE_invocation_identifier },
1322 { &hf_atn_ulcs_responder_acse_requirements, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_ACSE_requirements },
1323 { &hf_atn_ulcs_mechanism_name, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_Mechanism_name },
1324 { &hf_atn_ulcs_responding_authentication_value, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_Authentication_value },
1325 { &hf_atn_ulcs_application_context_name_list, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_Application_context_name_list },
1326 { &hf_atn_ulcs_implementation_information, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_Implementation_data },
1327 { &hf_atn_ulcs_user_information, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_Association_information },
1328 { NULL, 0, 0, NULL }
1332 dissect_atn_ulcs_AARE_apdu(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1333 packet_info * pinfo = actx->pinfo;
1334 guint32 aircraft_24_bit_address = 0 ;
1335 atn_conversation_t *atn_cv = NULL;
1336 aarq_data_t *aarq_data = NULL;
1338 /* get AARQ data and use it to create a new conversation, */
1339 /* the conversation is used along with */
1340 /* AARQ's "calling ae qualifier" to determine the */
1341 /* type of air/ground application of each subsequent frame.*/
1342 /* we use this information to invoke the correct application dissector. */
1344 /* heuristical decoding of ASN1 will not work for all cases, */
1345 /* for there may be CM PDU's which will exactly look like CPDLC PDU'S */
1347 /* get 24-bit icao address */
1348 aircraft_24_bit_address = get_aircraft_24_bit_address_from_nsap(pinfo);
1350 /* search for aarq entry */
1351 aarq_data = (aarq_data_t *) wmem_tree_lookup32(
1353 aircraft_24_bit_address);
1355 /* no aarq data present, do nothing */
1356 /* without both ends of the conversation and without */
1357 /* the "calling ae-qualifier there is no point in setting up "*/
1358 /* a conversation */
1364 /* AARE/DT: dstref present, srcref is always zero */
1365 if((pinfo->clnp_dstref) && (!pinfo->clnp_srcref)){
1367 atn_cv = find_atn_conversation(&pinfo->dst,
1371 if(!atn_cv){ /* conversation not fond */
1373 /* DT has only dstref - create new conversation */
1374 create_atn_conversation(&pinfo->dst,
1381 /* AARE/CC: srcref and dstref present */
1382 if((pinfo->clnp_dstref) && (pinfo->clnp_srcref)){
1384 atn_cv = find_atn_conversation(
1389 if(atn_cv){ /* conversation found. */
1391 /* create new conversation for dstref */
1392 create_atn_conversation(&pinfo->dst,
1397 }else { /* no conversation found */
1398 /* as CC contains srcref *and* dstref we use both to create new records */
1399 create_atn_conversation(&pinfo->src,
1403 create_atn_conversation(&pinfo->dst,
1410 /* clear aarq data */
1411 memset(aarq_data,0,sizeof(aarq_data_t));
1412 aarq_data-> aarq_pending = FALSE;
1414 offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
1415 ett_atn_ulcs_AARE_apdu, AARE_apdu_sequence);
1424 static const value_string atn_ulcs_Release_request_reason_vals[] = {
1427 { 30, "user-defined" },
1433 dissect_atn_ulcs_Release_request_reason(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1434 /* extension present: last param set to true. asn2wrs didn't take notice of that */
1435 offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
1436 0U, 30U, NULL, TRUE);
1442 static const per_sequence_t RLRQ_apdu_sequence[] = {
1443 { &hf_atn_ulcs_rlrq_apdu_request_reason, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_Release_request_reason },
1444 { &hf_atn_ulcs_user_information, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_Association_information },
1445 { NULL, 0, 0, NULL }
1449 dissect_atn_ulcs_RLRQ_apdu(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1450 offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
1451 ett_atn_ulcs_RLRQ_apdu, RLRQ_apdu_sequence);
1457 static const value_string atn_ulcs_Release_response_reason_vals[] = {
1459 { 1, "not-finished" },
1460 { 30, "user-defined" },
1466 dissect_atn_ulcs_Release_response_reason(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1468 /* extension present: last param set to true. asn2wrs didn't take notice of that */
1469 offset = dissect_per_constrained_integer(
1485 static const per_sequence_t RLRE_apdu_sequence[] = {
1486 { &hf_atn_ulcs_rlre_apdu_response_reason, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_Release_response_reason },
1487 { &hf_atn_ulcs_user_information, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_Association_information },
1488 { NULL, 0, 0, NULL }
1492 dissect_atn_ulcs_RLRE_apdu(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1493 offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
1494 ett_atn_ulcs_RLRE_apdu, RLRE_apdu_sequence);
1500 static const value_string atn_ulcs_ABRT_source_vals[] = {
1501 { 0, "acse-service-user" },
1502 { 1, "acse-service-provider" },
1508 dissect_atn_ulcs_ABRT_source(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1509 offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
1510 0U, 1U, NULL, TRUE);
1516 static const value_string atn_ulcs_ABRT_diagnostic_vals[] = {
1517 { 1, "no-reason-given" },
1518 { 2, "protocol-error" },
1519 { 3, "authentication-mechanism-name-not-recognized" },
1520 { 4, "authentication-mechanism-name-required" },
1521 { 5, "authentication-failure" },
1522 { 6, "authentication-required" },
1526 static guint32 ABRT_diagnostic_value_map[6+0] = {1, 2, 3, 4, 5, 6};
1529 dissect_atn_ulcs_ABRT_diagnostic(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1530 offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
1531 6, NULL, TRUE, 0, ABRT_diagnostic_value_map);
1537 static const per_sequence_t ABRT_apdu_sequence[] = {
1538 { &hf_atn_ulcs_abort_source, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_atn_ulcs_ABRT_source },
1539 { &hf_atn_ulcs_abort_diagnostic, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_ABRT_diagnostic },
1540 { &hf_atn_ulcs_user_information, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_atn_ulcs_Association_information },
1541 { NULL, 0, 0, NULL }
1545 dissect_atn_ulcs_ABRT_apdu(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1546 offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
1547 ett_atn_ulcs_ABRT_apdu, ABRT_apdu_sequence);
1553 static const value_string atn_ulcs_ACSE_apdu_vals[] = {
1562 static const per_choice_t ACSE_apdu_choice[] = {
1563 { 0, &hf_atn_ulcs_aarq , ASN1_EXTENSION_ROOT , dissect_atn_ulcs_AARQ_apdu },
1564 { 1, &hf_atn_ulcs_aare , ASN1_EXTENSION_ROOT , dissect_atn_ulcs_AARE_apdu },
1565 { 2, &hf_atn_ulcs_rlrq , ASN1_EXTENSION_ROOT , dissect_atn_ulcs_RLRQ_apdu },
1566 { 3, &hf_atn_ulcs_rlre , ASN1_EXTENSION_ROOT , dissect_atn_ulcs_RLRE_apdu },
1567 { 4, &hf_atn_ulcs_abrt , ASN1_EXTENSION_ROOT , dissect_atn_ulcs_ABRT_apdu },
1568 { 0, NULL, 0, NULL }
1572 dissect_atn_ulcs_ACSE_apdu(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1573 offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
1574 ett_atn_ulcs_ACSE_apdu, ACSE_apdu_choice,
1582 static void dissect_Fully_encoded_data_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1583 asn1_ctx_t asn1_ctx;
1584 asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, FALSE, pinfo);
1585 dissect_atn_ulcs_Fully_encoded_data(tvb, 0, &asn1_ctx, tree, hf_atn_ulcs_Fully_encoded_data_PDU);
1587 static void dissect_ACSE_apdu_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1588 asn1_ctx_t asn1_ctx;
1589 asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, FALSE, pinfo);
1590 dissect_atn_ulcs_ACSE_apdu(tvb, 0, &asn1_ctx, tree, hf_atn_ulcs_ACSE_apdu_PDU);
1594 /*--- End of included file: packet-atn-ulcs-fn.c ---*/
1595 #line 200 "../../asn1/atn-ulcs/packet-atn-ulcs-template.c"
1598 /* re-implementing external data: packet-per.c */
1599 static const value_string per_External_encoding_vals[] = {
1600 { 0, "single-ASN1-type" },
1601 { 1, "octet-aligned" },
1606 /* re-implementing external data: packet-per.c */
1607 static const per_choice_t External_encoding_choice[] =
1610 &hf_atn_ulcs_externalt_encoding_single_asn1_type,
1612 dissect_atn_ulcs_T_externalt_encoding_single_asn1_type
1615 &hf_atn_ulcs_externalt_encoding_octet_aligned,
1617 dissect_atn_ulcs_T_externalt_encoding_octet_aligned
1620 &hf_atn_ulcs_externalt_encoding_arbitrary,
1622 dissect_atn_ulcs_T_externalt_encoding_arbitrary
1632 /* ATN Session layer */
1633 #define SES_PDU_TYPE_MASK 0xf8
1634 #define SES_PARAM_IND_MASK 0x04
1635 #define SES_PARAM_B2_MASK 0x02
1636 #define SES_PARAM_B1_MASK 0x01
1638 static int hf_atn_ses_type = -1;
1639 static int hf_atn_ses_param_ind = -1;
1640 static int hf_atn_ses_param_b1 = -1;
1641 static int hf_atn_ses_param_b2 = -1;
1643 static gint ett_atn_ses = -1;
1645 #define ATN_SES_PROTO "ICAO Doc9705 ULCS Session (ISO 8326/8327-1:1994)"
1647 const value_string atn_ses_param_ind[] =
1649 {0, "No Parameter Indication "},
1650 {1, "Parameter Indication "},
1654 const value_string srf_b2[] =
1656 {0, "Transport Connection is kept"},
1657 {1, "Transport Connection is released" },
1661 const value_string srf_b1[] =
1663 {0, "Transport Connection is transient"},
1664 {1, "Transport Connection is persistent"},
1668 #define SES_ATN_SCN 0xe8
1669 #define SES_ATN_SCNC 0xf8
1670 #define SES_ATN_SAC 0xf0
1671 #define SES_ATN_SACC 0xd8
1672 #define SES_ATN_SRF 0xe0
1673 #define SES_ATN_SRFC 0xa0
1675 const value_string atn_ses_type[] =
1677 { 0x1d, "Short Connect (SCN) SPDU" },
1678 { 0x1f, "Short Connect Accept (SAC) SPDU" },
1679 { 0x1e, "Short Connect Accept Continue (SACC) SPDU" },
1680 { 0x1c, "Short Refuse (SRF) SPDU" },
1681 { 0x14, "Short Refuse Continue (SRFC) SPDU" },
1685 /* ATN Presentation layer */
1686 #define ATN_PRES_PROTO "ICAO Doc9705 ULCS Presentation (ISO 8822/8823-1:1994)"
1688 static int hf_atn_pres_err = -1;
1689 static gint ett_atn_pres = -1;
1691 #define ATN_SES_PRES_MASK 0xf803
1692 #define PRES_CPR_ER_MASK 0x70
1694 /* type determined by SPDU and PPDU */
1695 const value_string atn_pres_vals[] =
1697 { 0xe802, "Short Presentation Connect PPDU (CP) " },
1698 { 0xf802, "Short Presentation Connect PPDU (CP) " },
1699 { 0xf002, "Short Presentation Connect Accept PPDU (CPA)" },
1700 { 0xd802, "Short Presentation Connect Accept PPDU (CPA)" },
1701 { 0xe002, "Short Presentation Connect Reject PPDU (CPR)" },
1702 { 0xa002, "Short Presentation Connect Reject PPDU (CPR)" },
1706 /* Short Presentation Connect Reject PPDU's 0yyy 00zz */
1707 const value_string atn_pres_err[] =
1709 { 0x00, "Presentation-user" },
1710 { 0x01, "Reason not specified (transient)"},
1711 { 0x02, "Temporary congestion (transient)"},
1712 { 0x03, "Local limit exceeded (transient)"},
1713 { 0x04, "Called presentation-address unknown (permanent)"},
1714 { 0x05, "Protocol version not supported (permanent)"},
1715 { 0x06, "Default context not supported (permanent)"},
1716 { 0x07, "User data not readable (permanent)"},
1721 /* re-implementing external data: packet-per.c */
1722 static int atn_ulcs_Externalt_encoding(
1725 asn1_ctx_t *actx _U_,
1726 proto_tree *tree _U_,
1729 offset = dissect_per_choice(
1735 ett_atn_ulcs_EXTERNALt,
1736 External_encoding_choice,
1737 &actx->external.encoding);
1742 /* re-implementing external data: packet-per.c */
1743 static guint32 atn_per_external_type(
1747 proto_tree *tree _U_,
1749 per_type_fn type_cb)
1751 memset(&actx->external, '\0', sizeof(actx->external));
1752 actx->external.hf_index = -1;
1753 actx->external.encoding = -1;
1755 actx->external.u.per.type_cb = type_cb;
1756 offset = atn_ulcs_Externalt_encoding(
1766 sizeof(actx->external));
1768 actx->external.hf_index = -1;
1769 actx->external.encoding = -1;
1775 /* determine 24-bit aircraft address(ARS) */
1776 /* from 20-byte ATN NSAP. */
1777 guint32 get_aircraft_24_bit_address_from_nsap(
1780 const guint8* addr = NULL;
1782 guint32 adr_prefix =0;
1784 /* check NSAP address type*/
1785 if( (pinfo->src.type != AT_OSI) ||
1786 (pinfo->dst.type != AT_OSI)) {
1789 /* 20 octets address length required */
1791 if( (pinfo->src.len != 20) ||
1792 (pinfo->dst.len != 20)) {
1795 /* first try source address */
1796 /* if the src address originates */
1797 /* from an aircraft it's downlink */
1799 /* convert addr into 32-bit integer */
1800 addr = (const guint8 *)pinfo->src.data;
1807 /* according to ICAO doc9507 Ed2 SV5 */
1808 /* clause 5.4.3.8.1.5 and 5.4.3.8.1.3 */
1809 /* mobile addresses contain "c1" of "41" */
1810 /* in the VER subfield of the NSAP */
1811 if((adr_prefix == 0x470027c1) ||
1812 (adr_prefix == 0x47002741)) {
1813 /* ICAO doc9507 Ed2 SV5 5.4.3.8.4.4 */
1814 /* states that the ARS subfield containes */
1815 /* the 24-bitaddress of the aircraft */
1816 ars = ((addr[8])<<16) |
1821 /* try destination address */
1822 /* if the src address originates */
1823 /* from an aircraft it's downlink */
1825 /* convert addr into 32-bit integer */
1826 addr = (const guint8 *)pinfo->dst.data;
1827 adr_prefix = ((addr[0]<<24) |
1832 /* according to ICAO doc9507 Ed2 SV5 */
1833 /* clause 5.4.3.8.1.5 and 5.4.3.8.1.3 */
1834 /* mobile addresses contain "c1" of "41" */
1835 /* in the VER subfield of the NSAP */
1836 if((adr_prefix == 0x470027c1) ||
1837 (adr_prefix == 0x47002741)) {
1838 /* ICAO doc9507 Ed2 SV5 5.4.3.8.4.4 */
1839 /* states that the ARS subfield containes */
1840 /* the 24-bitaddress of the aircraft */
1841 ars = ((addr[8])<<16) |
1848 /* determine whether a PDU is uplink or downlink */
1849 /* by checking for known aircraft address prefices*/
1850 int check_heur_msg_type(packet_info *pinfo _U_)
1853 const guint8* addr = NULL;
1854 guint32 adr_prefix =0;
1856 /* check NSAP address type*/
1857 if( (pinfo->src.type != AT_OSI) || (pinfo->dst.type != AT_OSI)) {
1860 /* check NSAP address length; 20 octets address length required */
1861 if( (pinfo->src.len != 20) || (pinfo->dst.len != 20)) {
1864 addr = (const guint8 *)pinfo->src.data;
1866 /* convert address to 32-bit integer */
1867 adr_prefix = ((addr[0]<<24) | (addr[1]<<16) | (addr[2]<<8) | addr[3] );
1869 /* According to the published ATN NSAP adddressing scheme */
1870 /* in ICAO doc9705 Ed2 SV5 5.4.3.8.1.3 and 5.4.3.8.1.5 */
1871 /* the "VER" field shall be 0x41 ("all Mobile AINSC") or */
1872 /* 0xc1 ("all Mobile ATSC") for mobile stations (aka aircraft).*/
1873 if((adr_prefix == 0x470027c1) || (adr_prefix == 0x47002741)) {
1874 t = dm; /* source is an aircraft: it's a downlink PDU */
1877 addr = (const guint8 *)pinfo->dst.data;
1879 /* convert address to 32-bit integer */
1880 adr_prefix = ((addr[0]<<24) | (addr[1]<<16) | (addr[2]<<8) | addr[3] );
1882 /* According to the published ATN NSAP adddressing scheme */
1883 /* in ICAO doc9705 Ed2 SV5 5.4.3.8.1.3 and 5.4.3.8.1.5 */
1884 /* the "VER" field shall be 0x41 ("all Mobile AINSC") or */
1885 /* 0xc1 ("all Mobile ATSC") for mobile stations (aka aircraft).*/
1886 if((adr_prefix == 0x470027c1) || (adr_prefix == 0x47002741)) {
1887 t = um; /* destination is aircraft: uplink PDU */
1893 /* conversation may be used by other dissectors */
1894 wmem_tree_t *get_atn_conversation_tree(void){
1895 return atn_conversation_tree;
1899 /* find a atn conversation tree node by an endpoint */
1900 /* an endpoint is identified by atn src and dst addresses */
1901 /* and srcref or dstref (depends on the transport packet type) */
1902 /* IMHO it's a hack - conversations should be maintained */
1903 /* at transport layer (cotp) but this isn't working yet. */
1904 atn_conversation_t * find_atn_conversation(
1909 atn_conversation_t *cv = NULL;
1913 ADD_ADDRESS_TO_HASH( tmp, address1);
1914 key = (tmp << 16) | clnp_ref1 ;
1916 ADD_ADDRESS_TO_HASH( tmp, address2);
1917 key = (tmp << 24) | key ;
1919 /* search for atn conversation */
1920 cv = (atn_conversation_t *)
1921 wmem_tree_lookup32(get_atn_conversation_tree(),key);
1926 /* create a atn conversation tree node */
1927 /* conversation data is to be allocated externally */
1928 /* a conversation may be referenced from both endpoints */
1929 atn_conversation_t * create_atn_conversation(
1933 atn_conversation_t *conversation)
1935 atn_conversation_t *cv = NULL;
1939 ADD_ADDRESS_TO_HASH( tmp, address1);
1940 key = (tmp << 16) | clnp_ref1 ;
1942 ADD_ADDRESS_TO_HASH( tmp, address2);
1943 key = (tmp << 24) | key ;
1945 /* search for aircraft entry */
1946 cv = (atn_conversation_t *)
1948 get_atn_conversation_tree(),
1951 /* tree node already present */
1955 /* insert conversation data in tree*/
1957 get_atn_conversation_tree(),
1959 (void*)conversation);
1961 return conversation;
1972 proto_item *ti = NULL;
1973 proto_tree *atn_ulcs_tree = NULL;
1974 guint8 value_pres = 0;
1975 guint8 value_ses = 0;
1976 guint16 value_ses_pres = 0;
1981 /* decode as PDV-list */
1982 if ( (int)(intptr_t) data == FALSE )
1984 ti = proto_tree_add_item(
1992 atn_ulcs_tree = proto_item_add_subtree(
1996 dissect_Fully_encoded_data_PDU(
2002 tvb_reported_length_remaining(tvb, offset ) ;
2005 /* decode as SPDU, PPDU and ACSE PDU */
2006 if ( (int)(intptr_t) data == TRUE )
2008 /* get session and presentation PDU's */
2009 value_ses_pres = tvb_get_ntohs(tvb, offset);
2011 /* SPDU: dissect session layer */
2012 ti = proto_tree_add_text(
2019 atn_ulcs_tree = proto_item_add_subtree(
2023 /* get SPDU (1 octet) */
2024 value_ses = tvb_get_guint8(tvb, offset);
2026 /* SPDU type/identifier */
2027 proto_tree_add_item(atn_ulcs_tree,
2034 /* SPDU parameters may be present in Short Refuse */
2035 /* or Short Refuse Continue SPDU's */
2036 switch(value_ses & SES_PDU_TYPE_MASK){
2040 /* SPDU parameter presence */
2041 proto_tree_add_item(atn_ulcs_tree,
2042 hf_atn_ses_param_ind,
2049 proto_tree_add_item(atn_ulcs_tree,
2050 hf_atn_ses_param_b2,
2057 proto_tree_add_item(atn_ulcs_tree,
2058 hf_atn_ses_param_b1,
2070 /* PPDU: dissect presentation layer */
2071 ti = proto_tree_add_text(
2078 atn_ulcs_tree = proto_item_add_subtree(ti, ett_atn_pres);
2080 value_pres = tvb_get_guint8(tvb, offset);
2082 /* need session context to identify PPDU type */
2084 /* it is *unfeasible* to use proto_tree_add_item here: */
2085 /* presentation type is always the same constant but its type */
2086 /* is implicitly determined by preceding session context */
2087 proto_tree_add_text(atn_ulcs_tree,
2092 val_to_str( value_ses_pres & ATN_SES_PRES_MASK , atn_pres_vals, "?"),
2095 /* PPDU errorcode in case of SRF/CPR */
2096 switch(value_ses & SES_PDU_TYPE_MASK){
2099 proto_tree_add_item(
2113 /* ACSE PDU: dissect application layer */
2114 ti = proto_tree_add_text(
2121 atn_ulcs_tree = proto_item_add_subtree(
2125 dissect_ACSE_apdu_PDU(
2126 tvb_new_subset_remaining(tvb, offset),
2131 tvb_reported_length_remaining(tvb, offset );
2136 static gboolean dissect_atn_ulcs_heur(
2142 /* do we have enough data*/
2143 /* at least session + presentation data or pdv-list */
2144 if (tvb_length(tvb) < 2){
2147 /* check for session/presentation/ACSE PDU's */
2148 /* SPDU and PPDU are one octet each */
2149 switch( tvb_get_ntohs(tvb, 0) & 0xf8ff ){
2150 case 0xe802: /* SCN + CP*/
2151 case 0xf802: /* SCNC + CP */
2152 case 0xf002: /* SAC + CPA */
2153 case 0xd802: /* SACC + CPA */
2154 case 0xe002: /* SRF + CPR + R0 */
2155 case 0xe012: /* SRF + CPR + R1 */
2156 case 0xe022: /* SRF + CPR + R2 */
2157 case 0xe032: /* SRF + CPR + R3 */
2158 case 0xe042: /* SRF + CPR + R4 */
2159 case 0xe052: /* SRF + CPR + R5 */
2160 case 0xe062: /* SRF + CPR + R6 */
2161 case 0xe072: /* SRF + CPR + R7 */
2162 case 0xa002: /* SRFC + CPR + R0*/
2163 case 0xa012: /* SRFC + CPR + R1*/
2164 case 0xa022: /* SRFC + CPR + R2*/
2165 case 0xa032: /* SRFC + CPR + R3*/
2166 case 0xa042: /* SRFC + CPR + R4*/
2167 case 0xa052: /* SRFC + CPR + R5*/
2168 case 0xa062: /* SRFC + CPR + R6*/
2169 case 0xa072: /* SRFC + CPR + R7*/
2170 /* indicate to dissector routine */
2171 /* that a least SPDU, PPDU and */
2172 /* ACSE PDU is present */
2179 default: /* no SPDU */
2183 /* try to detect "Fully-encoded-data" heuristically */
2184 /* the constants listed match the ASN.1 PER encoding */
2186 switch( tvb_get_ntohs(tvb, 0) & 0xfff0 ){
2187 case 0x0020: /* acse-apdu */
2188 case 0x00a0: /* user-ase-apdu */
2189 /* indicate to dissector routine */
2190 /* that a PDV-list PDU is present */
2192 /* PDV-list PDU may contain */
2193 /* application protocol data (CM, CPDLC) */
2194 /* or an ACSE PDU */
2195 dissect_atn_ulcs(tvb, pinfo, tree, (void*) FALSE);
2198 default: /* no or unsupported PDU */
2204 void proto_register_atn_ulcs (void)
2206 static hf_register_info hf_atn_ulcs[] = {
2208 /*--- Included file: packet-atn-ulcs-hfarr.c ---*/
2209 #line 1 "../../asn1/atn-ulcs/packet-atn-ulcs-hfarr.c"
2210 { &hf_atn_ulcs_Fully_encoded_data_PDU,
2211 { "Fully-encoded-data", "atn-ulcs.Fully_encoded_data",
2212 FT_UINT32, BASE_DEC, NULL, 0,
2214 { &hf_atn_ulcs_ACSE_apdu_PDU,
2215 { "ACSE-apdu", "atn-ulcs.ACSE_apdu",
2216 FT_UINT32, BASE_DEC, VALS(atn_ulcs_ACSE_apdu_vals), 0,
2218 { &hf_atn_ulcs_Fully_encoded_data_item,
2219 { "PDV-list", "atn-ulcs.PDV_list_element",
2220 FT_NONE, BASE_NONE, NULL, 0,
2222 { &hf_atn_ulcs_transfer_syntax_name,
2223 { "transfer-syntax-name", "atn-ulcs.transfer_syntax_name",
2224 FT_OID, BASE_NONE, NULL, 0,
2226 { &hf_atn_ulcs_presentation_context_identifier,
2227 { "presentation-context-identifier", "atn-ulcs.presentation_context_identifier",
2228 FT_UINT32, BASE_DEC, VALS(atn_ulcs_Presentation_context_identifier_vals), 0,
2230 { &hf_atn_ulcs_presentation_data_values,
2231 { "presentation-data-values", "atn-ulcs.presentation_data_values",
2232 FT_UINT32, BASE_DEC, VALS(atn_ulcs_T_presentation_data_values_vals), 0,
2234 { &hf_atn_ulcs_pdv_list_presentation_data_values_single_asn1_type,
2235 { "single-ASN1-type", "atn-ulcs.single_ASN1_type_element",
2236 FT_NONE, BASE_NONE, NULL, 0,
2237 "T_pdv_list_presentation_data_values_single_asn1_type", HFILL }},
2238 { &hf_atn_ulcs_octet_aligned,
2239 { "octet-aligned", "atn-ulcs.octet_aligned",
2240 FT_BYTES, BASE_NONE, NULL, 0,
2241 "OCTET_STRING", HFILL }},
2242 { &hf_atn_ulcs_pdv_list_presentation_data_values_arbitrary,
2243 { "arbitrary", "atn-ulcs.arbitrary",
2244 FT_BYTES, BASE_NONE, NULL, 0,
2245 "T_pdv_list_presentation_data_values_arbitrary", HFILL }},
2246 { &hf_atn_ulcs_direct_reference,
2247 { "direct-reference", "atn-ulcs.direct_reference",
2248 FT_OID, BASE_NONE, NULL, 0,
2249 "OBJECT_IDENTIFIER", HFILL }},
2250 { &hf_atn_ulcs_indirect_reference,
2251 { "indirect-reference", "atn-ulcs.indirect_reference",
2252 FT_INT32, BASE_DEC, NULL, 0,
2253 "INTEGER", HFILL }},
2254 { &hf_atn_ulcs_data_value_descriptor,
2255 { "data-value-descriptor", "atn-ulcs.data_value_descriptor",
2256 FT_STRING, BASE_NONE, NULL, 0,
2258 { &hf_atn_ulcs_encoding,
2259 { "encoding", "atn-ulcs.encoding",
2260 FT_UINT32, BASE_DEC, VALS(atn_ulcs_T_encoding_vals), 0,
2262 { &hf_atn_ulcs_externalt_encoding_single_asn1_type,
2263 { "single-ASN1-type", "atn-ulcs.single_ASN1_type_element",
2264 FT_NONE, BASE_NONE, NULL, 0,
2265 "T_externalt_encoding_single_asn1_type", HFILL }},
2266 { &hf_atn_ulcs_externalt_encoding_octet_aligned,
2267 { "octet-aligned", "atn-ulcs.octet_aligned",
2268 FT_BYTES, BASE_NONE, NULL, 0,
2269 "T_externalt_encoding_octet_aligned", HFILL }},
2270 { &hf_atn_ulcs_externalt_encoding_arbitrary,
2271 { "arbitrary", "atn-ulcs.arbitrary",
2272 FT_BYTES, BASE_NONE, NULL, 0,
2273 "T_externalt_encoding_arbitrary", HFILL }},
2274 { &hf_atn_ulcs_aarq,
2275 { "aarq", "atn-ulcs.aarq_element",
2276 FT_NONE, BASE_NONE, NULL, 0,
2277 "AARQ_apdu", HFILL }},
2278 { &hf_atn_ulcs_aare,
2279 { "aare", "atn-ulcs.aare_element",
2280 FT_NONE, BASE_NONE, NULL, 0,
2281 "AARE_apdu", HFILL }},
2282 { &hf_atn_ulcs_rlrq,
2283 { "rlrq", "atn-ulcs.rlrq_element",
2284 FT_NONE, BASE_NONE, NULL, 0,
2285 "RLRQ_apdu", HFILL }},
2286 { &hf_atn_ulcs_rlre,
2287 { "rlre", "atn-ulcs.rlre_element",
2288 FT_NONE, BASE_NONE, NULL, 0,
2289 "RLRE_apdu", HFILL }},
2290 { &hf_atn_ulcs_abrt,
2291 { "abrt", "atn-ulcs.abrt_element",
2292 FT_NONE, BASE_NONE, NULL, 0,
2293 "ABRT_apdu", HFILL }},
2294 { &hf_atn_ulcs_aarq_apdu_protocol_version,
2295 { "protocol-version", "atn-ulcs.protocol_version",
2296 FT_BYTES, BASE_NONE, NULL, 0,
2297 "T_aarq_apdu_protocol_version", HFILL }},
2298 { &hf_atn_ulcs_application_context_name,
2299 { "application-context-name", "atn-ulcs.application_context_name",
2300 FT_OID, BASE_NONE, NULL, 0,
2302 { &hf_atn_ulcs_called_AP_title,
2303 { "called-AP-title", "atn-ulcs.called_AP_title",
2304 FT_UINT32, BASE_DEC, VALS(atn_ulcs_AP_title_vals), 0,
2305 "AP_title", HFILL }},
2306 { &hf_atn_ulcs_called_AE_qualifier,
2307 { "called-AE-qualifier", "atn-ulcs.called_AE_qualifier",
2308 FT_UINT32, BASE_DEC, VALS(atn_ulcs_AE_qualifier_vals), 0,
2309 "AE_qualifier", HFILL }},
2310 { &hf_atn_ulcs_called_AP_invocation_identifier,
2311 { "called-AP-invocation-identifier", "atn-ulcs.called_AP_invocation_identifier",
2312 FT_INT32, BASE_DEC, NULL, 0,
2313 "AP_invocation_identifier", HFILL }},
2314 { &hf_atn_ulcs_called_AE_invocation_identifier,
2315 { "called-AE-invocation-identifier", "atn-ulcs.called_AE_invocation_identifier",
2316 FT_INT32, BASE_DEC, NULL, 0,
2317 "AE_invocation_identifier", HFILL }},
2318 { &hf_atn_ulcs_calling_AP_title,
2319 { "calling-AP-title", "atn-ulcs.calling_AP_title",
2320 FT_UINT32, BASE_DEC, VALS(atn_ulcs_AP_title_vals), 0,
2321 "AP_title", HFILL }},
2322 { &hf_atn_ulcs_calling_AE_qualifier,
2323 { "calling-AE-qualifier", "atn-ulcs.calling_AE_qualifier",
2324 FT_UINT32, BASE_DEC, VALS(atn_ulcs_AE_qualifier_vals), 0,
2325 "AE_qualifier", HFILL }},
2326 { &hf_atn_ulcs_calling_AP_invocation_identifier,
2327 { "calling-AP-invocation-identifier", "atn-ulcs.calling_AP_invocation_identifier",
2328 FT_INT32, BASE_DEC, NULL, 0,
2329 "AP_invocation_identifier", HFILL }},
2330 { &hf_atn_ulcs_calling_AE_invocation_identifier,
2331 { "calling-AE-invocation-identifier", "atn-ulcs.calling_AE_invocation_identifier",
2332 FT_INT32, BASE_DEC, NULL, 0,
2333 "AE_invocation_identifier", HFILL }},
2334 { &hf_atn_ulcs_sender_acse_requirements,
2335 { "sender-acse-requirements", "atn-ulcs.sender_acse_requirements",
2336 FT_BYTES, BASE_NONE, NULL, 0,
2337 "ACSE_requirements", HFILL }},
2338 { &hf_atn_ulcs_mechanism_name,
2339 { "mechanism-name", "atn-ulcs.mechanism_name",
2340 FT_OID, BASE_NONE, NULL, 0,
2342 { &hf_atn_ulcs_calling_authentication_value,
2343 { "calling-authentication-value", "atn-ulcs.calling_authentication_value",
2344 FT_UINT32, BASE_DEC, VALS(atn_ulcs_Authentication_value_vals), 0,
2345 "Authentication_value", HFILL }},
2346 { &hf_atn_ulcs_application_context_name_list,
2347 { "application-context-name-list", "atn-ulcs.application_context_name_list",
2348 FT_UINT32, BASE_DEC, NULL, 0,
2350 { &hf_atn_ulcs_implementation_information,
2351 { "implementation-information", "atn-ulcs.implementation_information",
2352 FT_BYTES, BASE_NONE, NULL, 0,
2353 "Implementation_data", HFILL }},
2354 { &hf_atn_ulcs_user_information,
2355 { "user-information", "atn-ulcs.user_information",
2356 FT_UINT32, BASE_DEC, NULL, 0,
2357 "Association_information", HFILL }},
2358 { &hf_atn_ulcs_aare_apdu_protocol_version,
2359 { "protocol-version", "atn-ulcs.protocol_version",
2360 FT_BYTES, BASE_NONE, NULL, 0,
2361 "T_aare_apdu_protocol_version", HFILL }},
2362 { &hf_atn_ulcs_result,
2363 { "result", "atn-ulcs.result",
2364 FT_UINT32, BASE_DEC, VALS(atn_ulcs_Associate_result_vals), 0,
2365 "Associate_result", HFILL }},
2366 { &hf_atn_ulcs_result_source_diagnostic,
2367 { "result-source-diagnostic", "atn-ulcs.result_source_diagnostic",
2368 FT_UINT32, BASE_DEC, VALS(atn_ulcs_Associate_source_diagnostic_vals), 0,
2369 "Associate_source_diagnostic", HFILL }},
2370 { &hf_atn_ulcs_responding_AP_title,
2371 { "responding-AP-title", "atn-ulcs.responding_AP_title",
2372 FT_UINT32, BASE_DEC, VALS(atn_ulcs_AP_title_vals), 0,
2373 "AP_title", HFILL }},
2374 { &hf_atn_ulcs_responding_AE_qualifier,
2375 { "responding-AE-qualifier", "atn-ulcs.responding_AE_qualifier",
2376 FT_UINT32, BASE_DEC, VALS(atn_ulcs_AE_qualifier_vals), 0,
2377 "AE_qualifier", HFILL }},
2378 { &hf_atn_ulcs_responding_AP_invocation_identifier,
2379 { "responding-AP-invocation-identifier", "atn-ulcs.responding_AP_invocation_identifier",
2380 FT_INT32, BASE_DEC, NULL, 0,
2381 "AP_invocation_identifier", HFILL }},
2382 { &hf_atn_ulcs_responding_AE_invocation_identifier,
2383 { "responding-AE-invocation-identifier", "atn-ulcs.responding_AE_invocation_identifier",
2384 FT_INT32, BASE_DEC, NULL, 0,
2385 "AE_invocation_identifier", HFILL }},
2386 { &hf_atn_ulcs_responder_acse_requirements,
2387 { "responder-acse-requirements", "atn-ulcs.responder_acse_requirements",
2388 FT_BYTES, BASE_NONE, NULL, 0,
2389 "ACSE_requirements", HFILL }},
2390 { &hf_atn_ulcs_responding_authentication_value,
2391 { "responding-authentication-value", "atn-ulcs.responding_authentication_value",
2392 FT_UINT32, BASE_DEC, VALS(atn_ulcs_Authentication_value_vals), 0,
2393 "Authentication_value", HFILL }},
2394 { &hf_atn_ulcs_rlrq_apdu_request_reason,
2395 { "reason", "atn-ulcs.reason",
2396 FT_UINT32, BASE_DEC, VALS(atn_ulcs_Release_request_reason_vals), 0,
2397 "Release_request_reason", HFILL }},
2398 { &hf_atn_ulcs_rlre_apdu_response_reason,
2399 { "reason", "atn-ulcs.reason",
2400 FT_UINT32, BASE_DEC, VALS(atn_ulcs_Release_response_reason_vals), 0,
2401 "Release_response_reason", HFILL }},
2402 { &hf_atn_ulcs_abort_source,
2403 { "abort-source", "atn-ulcs.abort_source",
2404 FT_UINT32, BASE_DEC, VALS(atn_ulcs_ABRT_source_vals), 0,
2405 "ABRT_source", HFILL }},
2406 { &hf_atn_ulcs_abort_diagnostic,
2407 { "abort-diagnostic", "atn-ulcs.abort_diagnostic",
2408 FT_UINT32, BASE_DEC, VALS(atn_ulcs_ABRT_diagnostic_vals), 0,
2409 "ABRT_diagnostic", HFILL }},
2410 { &hf_atn_ulcs_Application_context_name_list_item,
2411 { "Application-context-name", "atn-ulcs.Application_context_name",
2412 FT_OID, BASE_NONE, NULL, 0,
2414 { &hf_atn_ulcs_ap_title_form2,
2415 { "ap-title-form2", "atn-ulcs.ap_title_form2",
2416 FT_OID, BASE_NONE, NULL, 0,
2418 { &hf_atn_ulcs_ap_title_form1,
2419 { "ap-title-form1", "atn-ulcs.ap_title_form1",
2420 FT_UINT32, BASE_DEC, VALS(atn_ulcs_Name_vals), 0,
2422 { &hf_atn_ulcs_ae_qualifier_form2,
2423 { "ae-qualifier-form2", "atn-ulcs.ae_qualifier_form2",
2424 FT_INT32, BASE_DEC, NULL, 0,
2426 { &hf_atn_ulcs_ae_qualifier_form1,
2427 { "ae-qualifier-form1", "atn-ulcs.ae_qualifier_form1",
2428 FT_UINT32, BASE_DEC, NULL, 0,
2430 { &hf_atn_ulcs_acse_service_user,
2431 { "acse-service-user", "atn-ulcs.acse_service_user",
2432 FT_UINT32, BASE_DEC, VALS(atn_ulcs_T_acse_service_user_vals), 0,
2434 { &hf_atn_ulcs_acse_service_provider,
2435 { "acse-service-provider", "atn-ulcs.acse_service_provider",
2436 FT_UINT32, BASE_DEC, VALS(atn_ulcs_T_acse_service_provider_vals), 0,
2438 { &hf_atn_ulcs_Association_information_item,
2439 { "EXTERNALt", "atn-ulcs.EXTERNALt_element",
2440 FT_NONE, BASE_NONE, NULL, 0,
2442 { &hf_atn_ulcs_charstring,
2443 { "charstring", "atn-ulcs.charstring",
2444 FT_BYTES, BASE_NONE, NULL, 0,
2445 "OCTET_STRING", HFILL }},
2446 { &hf_atn_ulcs_bitstring,
2447 { "bitstring", "atn-ulcs.bitstring",
2448 FT_BYTES, BASE_NONE, NULL, 0,
2449 "BIT_STRING", HFILL }},
2450 { &hf_atn_ulcs_external,
2451 { "external", "atn-ulcs.external_element",
2452 FT_NONE, BASE_NONE, NULL, 0,
2454 { &hf_atn_ulcs_other,
2455 { "other", "atn-ulcs.other_element",
2456 FT_NONE, BASE_NONE, NULL, 0,
2458 { &hf_atn_ulcs_other_mechanism_name,
2459 { "other-mechanism-name", "atn-ulcs.other_mechanism_name",
2460 FT_OID, BASE_NONE, NULL, 0,
2461 "OBJECT_IDENTIFIER", HFILL }},
2462 { &hf_atn_ulcs_other_mechanism_value,
2463 { "other-mechanism-value", "atn-ulcs.other_mechanism_value_element",
2464 FT_NONE, BASE_NONE, NULL, 0,
2466 { &hf_atn_ulcs_rdnSequence,
2467 { "rdnSequence", "atn-ulcs.rdnSequence",
2468 FT_UINT32, BASE_DEC, NULL, 0,
2470 { &hf_atn_ulcs_RDNSequence_item,
2471 { "RelativeDistinguishedName", "atn-ulcs.RelativeDistinguishedName",
2472 FT_UINT32, BASE_DEC, NULL, 0,
2474 { &hf_atn_ulcs_RelativeDistinguishedName_item,
2475 { "AttributeTypeAndValue", "atn-ulcs.AttributeTypeAndValue_element",
2476 FT_NONE, BASE_NONE, NULL, 0,
2478 { &hf_atn_ulcs_null,
2479 { "null", "atn-ulcs.null_element",
2480 FT_NONE, BASE_NONE, NULL, 0,
2482 { &hf_atn_ulcs_T_aarq_apdu_protocol_version_version1,
2483 { "version1", "atn-ulcs.version1",
2484 FT_BOOLEAN, 8, NULL, 0x80,
2486 { &hf_atn_ulcs_T_aare_apdu_protocol_version_version1,
2487 { "version1", "atn-ulcs.version1",
2488 FT_BOOLEAN, 8, NULL, 0x80,
2490 { &hf_atn_ulcs_ACSE_requirements_authentication,
2491 { "authentication", "atn-ulcs.authentication",
2492 FT_BOOLEAN, 8, NULL, 0x80,
2494 { &hf_atn_ulcs_ACSE_requirements_application_context_negotiation,
2495 { "application-context-negotiation", "atn-ulcs.application-context-negotiation",
2496 FT_BOOLEAN, 8, NULL, 0x40,
2499 /*--- End of included file: packet-atn-ulcs-hfarr.c ---*/
2500 #line 812 "../../asn1/atn-ulcs/packet-atn-ulcs-template.c"
2503 "atn-ulcs.ses.type",
2508 "Indicates presence of session parameters",
2510 {&hf_atn_ses_param_ind,
2511 { "SPDU Parameter Indication",
2512 "atn-ulcs.ses.parameter-indication",
2515 VALS(atn_ses_param_ind),
2517 "Indicates presence of session parameters",
2519 {&hf_atn_ses_param_b1,
2520 { "SRF Parameter B1",
2521 "atn-ulcs.ses.srf-b1",
2526 "Determines if transport connection reject is \
2527 transient or persistent",
2529 {&hf_atn_ses_param_b2,
2530 { "SRF Parameter B2",
2531 "atn-ulcs.ses.srf-b2",
2536 "Determines if transport connection is \
2537 retained or released",
2540 { "Error Code", "atn-ulcs.pres.cpr-error",
2549 static gint *ett[] = {
2551 /*--- Included file: packet-atn-ulcs-ettarr.c ---*/
2552 #line 1 "../../asn1/atn-ulcs/packet-atn-ulcs-ettarr.c"
2553 &ett_atn_ulcs_Fully_encoded_data,
2554 &ett_atn_ulcs_PDV_list,
2555 &ett_atn_ulcs_T_presentation_data_values,
2556 &ett_atn_ulcs_EXTERNALt,
2557 &ett_atn_ulcs_T_encoding,
2558 &ett_atn_ulcs_ACSE_apdu,
2559 &ett_atn_ulcs_AARQ_apdu,
2560 &ett_atn_ulcs_T_aarq_apdu_protocol_version,
2561 &ett_atn_ulcs_AARE_apdu,
2562 &ett_atn_ulcs_T_aare_apdu_protocol_version,
2563 &ett_atn_ulcs_RLRQ_apdu,
2564 &ett_atn_ulcs_RLRE_apdu,
2565 &ett_atn_ulcs_ABRT_apdu,
2566 &ett_atn_ulcs_ACSE_requirements,
2567 &ett_atn_ulcs_Application_context_name_list,
2568 &ett_atn_ulcs_AP_title,
2569 &ett_atn_ulcs_AE_qualifier,
2570 &ett_atn_ulcs_Associate_source_diagnostic,
2571 &ett_atn_ulcs_Association_information,
2572 &ett_atn_ulcs_Authentication_value,
2573 &ett_atn_ulcs_T_other,
2575 &ett_atn_ulcs_RDNSequence,
2576 &ett_atn_ulcs_RelativeDistinguishedName,
2577 &ett_atn_ulcs_AttributeTypeAndValue,
2579 /*--- End of included file: packet-atn-ulcs-ettarr.c ---*/
2580 #line 862 "../../asn1/atn-ulcs/packet-atn-ulcs-template.c"
2587 proto_atn_ulcs = proto_register_protocol (
2592 proto_register_field_array (
2595 array_length(hf_atn_ulcs));
2597 proto_register_subtree_array (
2599 array_length (ett));
2601 new_register_dissector(
2606 atn_cm_handle = find_dissector("atn-cm");
2607 atn_cpdlc_handle = find_dissector("atn-cpdlc");
2609 /* initiate sub dissector list */
2610 register_heur_dissector_list(
2612 &atn_ulcs_heur_subdissector_list);
2614 /* init aare/aare data */
2615 aarq_data_tree = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
2617 atn_conversation_tree = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
2620 void proto_reg_handoff_atn_ulcs(void)
2622 /* add session dissector to cotp dissector list dissector list*/
2625 dissect_atn_ulcs_heur,
2630 * Editor modelines - http://www.wireshark.org/tools/modelines.html
2635 * indent-tabs-mode: t
2638 * vi: set shiftwidth=2 tabstop=2 noexpandtab:
2639 * :indentSize=2:tabSize=2:noTabs=false: