Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
packet-gsmtap.h
1 /* packet-gsmtap.h
2  * Routines for GSMTAP packet disassembly
3  *
4  * (C) 2008-2016 Harald Welte <laforge@gnumonks.org>
5  *
6  * SPDX-License-Identifier: GPL-2.0-or-later
7  */
8 
9 #ifndef _PACKET_GSMTAP_H
10 #define _PACKET_GSMTAP_H
11 
12 /* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */
13 /* The following types and definitions are imported from libosmocore,
14  * the original source of the GSMTAP format.
15  *
16  * prior to getting them accepted/included into the official Osmocom
17  * GSMTAP definition, available from
18  * http://cgit.osmocom.org/cgit/libosmocore/tree/include/osmocom/core/gsmtap.h
19  *
20  * The GSMTAP maintainer can be contacted via the
21  * openbsc@lists.osmocom.org mailing list, or by private e-mail
22  * to laforge@gnumonks.org
23  */
24 /* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */
25 #define GSMTAP_TYPE_UM 0x01
26 #define GSMTAP_TYPE_ABIS 0x02
27 #define GSMTAP_TYPE_UM_BURST 0x03 /* raw burst bits */
28 #define GSMTAP_TYPE_SIM 0x04
29 #define GSMTAP_TYPE_TETRA_I1 0x05 /* tetra air interface */
30 #define GSMTAP_TTPE_TETRA_I1_BURST 0x06 /* tetra air interface */
31 #define GSMTAP_TYPE_WMX_BURST 0x07 /* WiMAX burst */
32 #define GSMTAP_TYPE_GB_LLC 0x08 /* GPRS Gb interface: LLC */
33 #define GSMTAP_TYPE_GB_SNDCP 0x09 /* GPRS Gb interface: SNDCP */
34 #define GSMTAP_TYPE_GMR1_UM 0x0a /* GMR-1 L2 packets */
35 #define GSMTAP_TYPE_UMTS_RLC_MAC 0x0b
36 #define GSMTAP_TYPE_UMTS_RRC 0x0c
37 #define GSMTAP_TYPE_LTE_RRC 0x0d /* LTE interface */
38 #define GSMTAP_TYPE_LTE_MAC 0x0e /* LTE MAC interface */
39 #define GSMTAP_TYPE_LTE_MAC_FRAMED 0x0f /* LTE MAC with context hdr */
40 #define GSMTAP_TYPE_OSMOCORE_LOG 0x10 /* libosmocore logging */
41 #define GSMTAP_TYPE_QC_DIAG 0x11 /* Qualcomm DIAG frame */
42 #define GSMTAP_TYPE_LTE_NAS 0x12 /* LTE Non-Access Stratum */
43 
44 /* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */
45 #define GSMTAP_BURST_UNKNOWN 0x00
46 #define GSMTAP_BURST_FCCH 0x01
47 #define GSMTAP_BURST_PARTIAL_SCH 0x02
48 #define GSMTAP_BURST_SCH 0x03
49 #define GSMTAP_BURST_CTS_SCH 0x04
50 #define GSMTAP_BURST_COMPACT_SCH 0x05
51 #define GSMTAP_BURST_NORMAL 0x06
52 #define GSMTAP_BURST_DUMMY 0x07
53 #define GSMTAP_BURST_ACCESS 0x08
54 #define GSMTAP_BURST_NONE 0x09
55 /* WiMAX bursts */
56 #define GSMTAP_BURST_CDMA_CODE 0x10 /* WiMAX CDMA Code Attribute burst */
57 #define GSMTAP_BURST_FCH 0x11 /* WiMAX FCH burst */
58 #define GSMTAP_BURST_FFB 0x12 /* WiMAX Fast Feedback burst */
59 #define GSMTAP_BURST_PDU 0x13 /* WiMAX PDU burst */
60 #define GSMTAP_BURST_HACK 0x14 /* WiMAX HARQ ACK burst */
61 #define GSMTAP_BURST_PHY_ATTRIBUTES 0x15 /* WiMAX PHY Attributes burst */
62 
63 /* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */
64 /* sub-types for TYPE_UM */
65 #define GSMTAP_CHANNEL_UNKNOWN 0x00
66 #define GSMTAP_CHANNEL_BCCH 0x01
67 #define GSMTAP_CHANNEL_CCCH 0x02
68 #define GSMTAP_CHANNEL_RACH 0x03
69 #define GSMTAP_CHANNEL_AGCH 0x04
70 #define GSMTAP_CHANNEL_PCH 0x05
71 #define GSMTAP_CHANNEL_SDCCH 0x06
72 #define GSMTAP_CHANNEL_SDCCH4 0x07
73 #define GSMTAP_CHANNEL_SDCCH8 0x08
74 #define GSMTAP_CHANNEL_TCH_F 0x09
75 #define GSMTAP_CHANNEL_TCH_H 0x0a
76 #define GSMTAP_CHANNEL_PACCH 0x0b
77 #define GSMTAP_CHANNEL_CBCH52 0x0c
78 #define GSMTAP_CHANNEL_PDTCH 0x0d
79 #define GSMTAP_CHANNEL_PTCCH 0x0e
80 #define GSMTAP_CHANNEL_CBCH51 0x0f
81 
82 /* GPRS Coding Scheme CS1..4 */
83 #define GSMTAP_GPRS_CS_BASE 0x20
84 #define GSMTAP_GPRS_CS(N) (GSMTAP_GPRS_CS_BASE + N)
85 /* (E) GPRS Coding Scheme MCS0..9 */
86 #define GSMTAP_GPRS_MCS_BASE 0x30
87 #define GSMTAP_GPRS_MCS(N) (GSMTAP_GPRS_MCS_BASE + N)
88 
89 #define GSMTAP_CHANNEL_ACCH 0x80
90 
91 /* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */
92 /* sub-types for TYPE_TETRA_AIR */
93 #define GSMTAP_TETRA_BSCH 0x01
94 #define GSMTAP_TETRA_AACH 0x02
95 #define GSMTAP_TETRA_SCH_HU 0x03
96 #define GSMTAP_TETRA_SCH_HD 0x04
97 #define GSMTAP_TETRA_SCH_F 0x05
98 #define GSMTAP_TETRA_BNCH 0x06
99 #define GSMTAP_TETRA_STCH 0x07
100 #define GSMTAP_TETRA_TCH_F 0x08
101 
102 /* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */
103 /* sub-types for TYPE_GMR1 */
104 #define GSMTAP_GMR1_UNKNOWN 0x00
105 #define GSMTAP_GMR1_BCCH 0x01
106 #define GSMTAP_GMR1_CCCH 0x02 /* either AGCH or PCH */
107 #define GSMTAP_GMR1_PCH 0x03
108 #define GSMTAP_GMR1_AGCH 0x04
109 #define GSMTAP_GMR1_BACH 0x05
110 #define GSMTAP_GMR1_RACH 0x06
111 #define GSMTAP_GMR1_CBCH 0x07
112 #define GSMTAP_GMR1_SDCCH 0x08
113 #define GSMTAP_GMR1_TACCH 0x09
114 #define GSMTAP_GMR1_GBCH 0x0a
115 
116 #define GSMTAP_GMR1_SACCH 0x01 /* to be combined with _TCH{6,9} */
117 #define GSMTAP_GMR1_FACCH 0x02 /* to be combines with _TCH{3,6,9} */
118 #define GSMTAP_GMR1_DKAB 0x03 /* to be combined with _TCH3 */
119 #define GSMTAP_GMR1_TCH3 0x10
120 #define GSMTAP_GMR1_TCH6 0x14
121 #define GSMTAP_GMR1_TCH9 0x18
122 
123 #define GSMTAP_ARFCN_F_PCS 0x8000
124 #define GSMTAP_ARFCN_F_UPLINK 0x4000
125 #define GSMTAP_ARFCN_MASK 0x3fff
126 
127 #define GSMTAP_UDP_PORT 4729
128 
129 /* This is the header as it is used by gsmtap-generating software.
130  * It is not used by the wireshark dissector and provided for reference only.
131 struct gsmtap_hdr {
132  guint8 version; // version, set to 0x01 currently
133  guint8 hdr_len; // length in number of 32bit words
134  guint8 type; // see GSMTAP_TYPE_*
135  guint8 timeslot; // timeslot (0..7 on Um)
136 
137  guint16 arfcn; // ARFCN (frequency)
138  gint8 signal_dbm; // signal level in dBm
139  gint8 snr_db; // signal/noise ratio in dB
140 
141  guint32 frame_number; // GSM Frame Number (FN)
142 
143  guint8 sub_type; // Type of burst/channel, see above
144  guint8 antenna_nr; // Antenna Number
145  guint8 sub_slot; // sub-slot within timeslot
146  guint8 res; // reserved for future use (RFU)
147 }
148  */
149 
150 #endif /* _PACKET_GSMTAP_H */
151 
152 /*
153  * Editor modelines - http://www.wireshark.org/tools/modelines.html
154  *
155  * Local variables:
156  * c-basic-offset: 8
157  * tab-width: 8
158  * indent-tabs-mode: t
159  * End:
160  *
161  * vi: set shiftwidth=8 tabstop=8 noexpandtab:
162  * :indentSize=8:tabSize=8:noTabs=false:
163  */