1 /* packet-atn-ulcs.h
2  * Definitions for atn packet disassembly structures and routines
3  *
4  * Wireshark - Network traffic analyzer
5  * By Gerald Combs <gerald@wireshark.org>
6  * Copyright 1998 Gerald Combs
7  *
8  * SPDX-License-Identifier: GPL-2.0-or-later
9  */
10 #ifndef PACKET_ATN_ULCS_H
11 #define PACKET_ATN_ULCS_H
12 
13 #include "packet.h"
14 
15 #include <epan/wmem_scopes.h>
16 
17 enum msg_type {
18     um,
19     dm,
20     no_msg
21 };
22 
23 enum ae_qualifier {
24     ads = 0,
25     cma =1, /* contact management (CM) */
26     cpdlc = 2, /* "plain old" CPDLC */
27     ati = 3 ,
28     arf =10 ,
29     met =11,
30     gac =12,
31     pmcpdlc =22,  /* "protected mode" CPDLC */
32     unknown = -1
33 };
34 
35 typedef struct atn_conversation_t {
36     gint ae_qualifier; /* A/G application type  */
37 } atn_conversation_t;
38 
39 atn_conversation_t * create_atn_conversation(
40     address*,
41     guint16,
42     address*,
43     atn_conversation_t*);
44 
45 atn_conversation_t * find_atn_conversation(
46     address*,
47     guint16,
48     address*);
49 
50 /* struct for conversation data reconstruction used in AARQ and AARE */
51 /* if transport data is larger than 32 octets AARQ/AARE is contained */
52 /* within DT frames which have only dest_ref, but no src_ref */
53 /* if AARQ/AARQ is contained within CR/CC only src_ref is present in CR */
54 /* while CC provides src_ref and dstref */
55 typedef struct aarq_data_t {
56     gboolean aarq_pending; /* flag tells whether AARQ/sequence is pending (true)  */
57                            /* required not to mix up different AARQ/AARE sequences */
58                            /* during simoultanous establishment of transport connections */
59                            /* i.e. GND facility initialises cpcstart and cmcontact at the same time */
60     atn_conversation_t* cv; /* pointer to AARQ conversation */
61 } aarq_data_t;
62 
63 wmem_tree_t *get_atn_conversation_tree(void);
64 
65 guint32 get_aircraft_24_bit_address_from_nsap(packet_info *);
66 int check_heur_msg_type(packet_info *);
67 
68 #endif
69 
70 /*
71  * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
72  *
73  * Local variables:
74  * c-basic-offset: 4
75  * tab-width: 8
76  * indent-tabs-mode: nil
77  * End:
78  *
79  * vi: set shiftwidth=4 tabstop=8 expandtab:
80  * :indentSize=4:tabSize=8:noTabs=true:
81  */
82