| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
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 enum {
13 GSMTAP_RRC_SUB_DL_DCCH_Message = 0,
14 GSMTAP_RRC_SUB_UL_DCCH_Message,
15 GSMTAP_RRC_SUB_DL_CCCH_Message,
16 GSMTAP_RRC_SUB_UL_CCCH_Message,
17 GSMTAP_RRC_SUB_PCCH_Message,
18 GSMTAP_RRC_SUB_DL_SHCCH_Message,
19 GSMTAP_RRC_SUB_UL_SHCCH_Message,
20 GSMTAP_RRC_SUB_BCCH_FACH_Message,
21 GSMTAP_RRC_SUB_BCCH_BCH_Message,
22 GSMTAP_RRC_SUB_MCCH_Message,
23 GSMTAP_RRC_SUB_MSCH_Message,
24 GSMTAP_RRC_SUB_HandoverToUTRANCommand,
25 GSMTAP_RRC_SUB_InterRATHandoverInfo,
26 GSMTAP_RRC_SUB_SystemInformation_BCH,
27 GSMTAP_RRC_SUB_System_Information_Container,
28 GSMTAP_RRC_SUB_UE_RadioAccessCapabilityInfo,
29 GSMTAP_RRC_SUB_MasterInformationBlock,
30 GSMTAP_RRC_SUB_SysInfoType1,
31 GSMTAP_RRC_SUB_SysInfoType2,
32 GSMTAP_RRC_SUB_SysInfoType3,
33 GSMTAP_RRC_SUB_SysInfoType4,
34 GSMTAP_RRC_SUB_SysInfoType5,
35 GSMTAP_RRC_SUB_SysInfoType5bis,
36 GSMTAP_RRC_SUB_SysInfoType6,
37 GSMTAP_RRC_SUB_SysInfoType7,
38 GSMTAP_RRC_SUB_SysInfoType8,
39 GSMTAP_RRC_SUB_SysInfoType9,
40 GSMTAP_RRC_SUB_SysInfoType10,
41 GSMTAP_RRC_SUB_SysInfoType11,
42 GSMTAP_RRC_SUB_SysInfoType11bis,
43 GSMTAP_RRC_SUB_SysInfoType12,
44 GSMTAP_RRC_SUB_SysInfoType13,
45 GSMTAP_RRC_SUB_SysInfoType13_1,
46 GSMTAP_RRC_SUB_SysInfoType13_2,
47 GSMTAP_RRC_SUB_SysInfoType13_3,
48 GSMTAP_RRC_SUB_SysInfoType13_4,
49 GSMTAP_RRC_SUB_SysInfoType14,
50 GSMTAP_RRC_SUB_SysInfoType15,
51 GSMTAP_RRC_SUB_SysInfoType15bis,
52 GSMTAP_RRC_SUB_SysInfoType15_1,
53 GSMTAP_RRC_SUB_SysInfoType15_1bis,
54 GSMTAP_RRC_SUB_SysInfoType15_2,
55 GSMTAP_RRC_SUB_SysInfoType15_2bis,
56 GSMTAP_RRC_SUB_SysInfoType15_2ter,
57 GSMTAP_RRC_SUB_SysInfoType15_3,
58 GSMTAP_RRC_SUB_SysInfoType15_3bis,
59 GSMTAP_RRC_SUB_SysInfoType15_4,
60 GSMTAP_RRC_SUB_SysInfoType15_5,
61 GSMTAP_RRC_SUB_SysInfoType15_6,
62 GSMTAP_RRC_SUB_SysInfoType15_7,
63 GSMTAP_RRC_SUB_SysInfoType15_8,
64 GSMTAP_RRC_SUB_SysInfoType16,
65 GSMTAP_RRC_SUB_SysInfoType17,
66 GSMTAP_RRC_SUB_SysInfoType18,
67 GSMTAP_RRC_SUB_SysInfoType19,
68 GSMTAP_RRC_SUB_SysInfoType20,
69 GSMTAP_RRC_SUB_SysInfoType21,
70 GSMTAP_RRC_SUB_SysInfoType22,
71 GSMTAP_RRC_SUB_SysInfoTypeSB1,
72 GSMTAP_RRC_SUB_SysInfoTypeSB2,
73 GSMTAP_RRC_SUB_ToTargetRNC_Container,
74 GSMTAP_RRC_SUB_TargetRNC_ToSourceRNC_Container,
75
76 GSMTAP_RRC_SUB_MAX
77};
78
79 extern const value_string gsmtap_types[] ;
80 extern const value_string rrc_sub_types[];
81
82/* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */
83/* The following types and definitions are imported from libosmocore,
84 * the original source of the GSMTAP format.
85 *
86 * prior to getting them accepted/included into the official Osmocom
87 * GSMTAP definition, available from
88 * http://cgit.osmocom.org/libosmocore/tree/include/osmocom/core/gsmtap.h
89 *
90 * The GSMTAP maintainer can be contacted via the
91 * openbsc@lists.osmocom.org mailing list, or by private e-mail
92 * to laforge@gnumonks.org
93 */
94/* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */
95#define GSMTAP_TYPE_UM 0x01
96#define GSMTAP_TYPE_ABIS 0x02
97#define GSMTAP_TYPE_UM_BURST 0x03 /* raw burst bits */
98#define GSMTAP_TYPE_SIM 0x04
99#define GSMTAP_TYPE_TETRA_I1 0x05 /* tetra air interface */
100#define GSMTAP_TTPE_TETRA_I1_BURST 0x06 /* tetra air interface */
101#define GSMTAP_TYPE_WMX_BURST 0x07 /* WiMAX burst */
102#define GSMTAP_TYPE_GB_LLC 0x08 /* GPRS Gb interface: LLC */
103#define GSMTAP_TYPE_GB_SNDCP 0x09 /* GPRS Gb interface: SNDCP */
104#define GSMTAP_TYPE_GMR1_UM 0x0a /* GMR-1 L2 packets */
105#define GSMTAP_TYPE_UMTS_RLC_MAC 0x0b
106#define GSMTAP_TYPE_UMTS_RRC 0x0c
107#define GSMTAP_TYPE_LTE_RRC 0x0d /* LTE interface */
108#define GSMTAP_TYPE_LTE_MAC 0x0e /* LTE MAC interface */
109#define GSMTAP_TYPE_LTE_MAC_FRAMED 0x0f /* LTE MAC with context hdr */
110#define GSMTAP_TYPE_OSMOCORE_LOG 0x10 /* libosmocore logging */
111#define GSMTAP_TYPE_QC_DIAG 0x11 /* Qualcomm DIAG frame */
112#define GSMTAP_TYPE_LTE_NAS 0x12 /* LTE Non-Access Stratum */
113#define GSMTAP_TYPE_E1T1 0x13 /* E1/T1 line traces */
114#define GSMTAP_TYPE_GSM_RLP 0x14 /* GSM RLP as per 3GPP TS 24.022 */
115
116/* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */
117#define GSMTAP_BURST_UNKNOWN 0x00
118#define GSMTAP_BURST_FCCH 0x01
119#define GSMTAP_BURST_PARTIAL_SCH 0x02
120#define GSMTAP_BURST_SCH 0x03
121#define GSMTAP_BURST_CTS_SCH 0x04
122#define GSMTAP_BURST_COMPACT_SCH 0x05
123#define GSMTAP_BURST_NORMAL 0x06
124#define GSMTAP_BURST_DUMMY 0x07
125#define GSMTAP_BURST_ACCESS 0x08
126#define GSMTAP_BURST_NONE 0x09
127/* WiMAX bursts */
128#define GSMTAP_BURST_CDMA_CODE 0x10 /* WiMAX CDMA Code Attribute burst */
129#define GSMTAP_BURST_FCH 0x11 /* WiMAX FCH burst */
130#define GSMTAP_BURST_FFB 0x12 /* WiMAX Fast Feedback burst */
131#define GSMTAP_BURST_PDU 0x13 /* WiMAX PDU burst */
132#define GSMTAP_BURST_HACK 0x14 /* WiMAX HARQ ACK burst */
133#define GSMTAP_BURST_PHY_ATTRIBUTES 0x15 /* WiMAX PHY Attributes burst */
134
135/* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */
136/* sub-types for TYPE_UM */
137#define GSMTAP_CHANNEL_UNKNOWN 0x00
138#define GSMTAP_CHANNEL_BCCH 0x01
139#define GSMTAP_CHANNEL_CCCH 0x02
140#define GSMTAP_CHANNEL_RACH 0x03
141#define GSMTAP_CHANNEL_AGCH 0x04
142#define GSMTAP_CHANNEL_PCH 0x05
143#define GSMTAP_CHANNEL_SDCCH 0x06
144#define GSMTAP_CHANNEL_SDCCH4 0x07
145#define GSMTAP_CHANNEL_SDCCH8 0x08
146#define GSMTAP_CHANNEL_TCH_F 0x09
147#define GSMTAP_CHANNEL_TCH_H 0x0a
148#define GSMTAP_CHANNEL_PACCH 0x0b
149#define GSMTAP_CHANNEL_CBCH52 0x0c
150#define GSMTAP_CHANNEL_PDTCH 0x0d
151#define GSMTAP_CHANNEL_PTCCH 0x0e
152#define GSMTAP_CHANNEL_CBCH51 0x0f
153#define GSMTAP_CHANNEL_VOICE_F 0x10
154#define GSMTAP_CHANNEL_VOICE_H 0x11
155
156/* GPRS Coding Scheme CS1..4 */
157#define GSMTAP_GPRS_CS_BASE 0x20
158#define GSMTAP_GPRS_CS(N) (GSMTAP_GPRS_CS_BASE + N)
159/* (E) GPRS Coding Scheme MCS0..9 */
160#define GSMTAP_GPRS_MCS_BASE 0x30
161#define GSMTAP_GPRS_MCS(N) (GSMTAP_GPRS_MCS_BASE + N)
162
163#define GSMTAP_CHANNEL_ACCH 0x80
164
165/* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */
166/* sub-types for GSMTAP_TYPE_SIM */
167#define GSMTAP_SIM_APDU 0x00 /* APDU data (complete APDU) */
168#define GSMTAP_SIM_ATR 0x01 /* card ATR data */
169#define GSMTAP_SIM_PPS_REQ 0x02 /* PPS request data */
170#define GSMTAP_SIM_PPS_RSP 0x03 /* PPS response data */
171#define GSMTAP_SIM_TPDU_HDR 0x04 /* TPDU command header */
172#define GSMTAP_SIM_TPDU_CMD 0x05 /* TPDU command body */
173#define GSMTAP_SIM_TPDU_RSP 0x06 /* TPDU response body */
174#define GSMTAP_SIM_TPDU_SW 0x07 /* TPDU response trailer */
175
176/* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */
177/* sub-types for TYPE_TETRA_AIR */
178#define GSMTAP_TETRA_BSCH 0x01
179#define GSMTAP_TETRA_AACH 0x02
180#define GSMTAP_TETRA_SCH_HU 0x03
181#define GSMTAP_TETRA_SCH_HD 0x04
182#define GSMTAP_TETRA_SCH_F 0x05
183#define GSMTAP_TETRA_BNCH 0x06
184#define GSMTAP_TETRA_STCH 0x07
185#define GSMTAP_TETRA_TCH_F 0x08
186
187/* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */
188/* sub-types for TYPE_GMR1 */
189#define GSMTAP_GMR1_UNKNOWN 0x00
190#define GSMTAP_GMR1_BCCH 0x01
191#define GSMTAP_GMR1_CCCH 0x02 /* either AGCH or PCH */
192#define GSMTAP_GMR1_PCH 0x03
193#define GSMTAP_GMR1_AGCH 0x04
194#define GSMTAP_GMR1_BACH 0x05
195#define GSMTAP_GMR1_RACH 0x06
196#define GSMTAP_GMR1_CBCH 0x07
197#define GSMTAP_GMR1_SDCCH 0x08
198#define GSMTAP_GMR1_TACCH 0x09
199#define GSMTAP_GMR1_GBCH 0x0a
200
201#define GSMTAP_GMR1_SACCH 0x01 /* to be combined with _TCH{6,9} */
202#define GSMTAP_GMR1_FACCH 0x02 /* to be combines with _TCH{3,6,9} */
203#define GSMTAP_GMR1_DKAB 0x03 /* to be combined with _TCH3 */
204#define GSMTAP_GMR1_TCH3 0x10
205#define GSMTAP_GMR1_TCH6 0x14
206#define GSMTAP_GMR1_TCH9 0x18
207
208/* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */
209/* sub-types for TYPE_E1T1 */
210#define GSMTAP_E1T1_LAPD 0x01 /* Q.921 LAPD */
211#define GSMTAP_E1T1_FR 0x02 /* Frame Relay */
212#define GSMTAP_E1T1_RAW 0x03 /* raw/transparent B-channel */
213#define GSMTAP_E1T1_TRAU16 0x04 /* 16k TRAU frames; sub-slot 0-3 */
214#define GSMTAP_E1T1_TRAU8 0x05 /* 8k TRAU frames; sub-slot 0-7 */
215#define GSMTAP_E1T1_V5EF 0x06 /* V5 Envelope Function */
216#define GSMTAP_E1T1_X75 0x07 /* X.75 B-channel data */
217#define GSMTAP_E1T1_V120 0x08 /* V.120 B-channel data */
218#define GSMTAP_E1T1_V110 0x09 /* V.110 B-channel data */
219#define GSMTAP_E1T1_H221 0x0a /* H.221 B-channel data */
220#define GSMTAP_E1T1_PPP 0x0b /* PPP */
221
222#define GSMTAP_ARFCN_F_PCS 0x8000
223#define GSMTAP_ARFCN_F_UPLINK 0x4000
224#define GSMTAP_ARFCN_MASK 0x3fff
225
226#define GSMTAP_UDP_PORT 4729
227
228/* This is the header as it is used by gsmtap-generating software.
229 * It is not used by the wireshark dissector and provided for reference only.
230 struct gsmtap_hdr {
231 uint8_t version; // version, set to 0x01 currently
232 uint8_t hdr_len; // length in number of 32bit words
233 uint8_t type; // see GSMTAP_TYPE_*
234 uint8_t timeslot; // timeslot (0..7 on Um)
235
236 uint16_t arfcn; // ARFCN (frequency)
237 int8_t signal_dbm; // signal level in dBm
238 int8_t snr_db; // signal/noise ratio in dB
239
240 uint32_t frame_number; // GSM Frame Number (FN)
241
242 uint8_t sub_type; // Type of burst/channel, see above
243 uint8_t antenna_nr; // Antenna Number
244 uint8_t sub_slot; // sub-slot within timeslot
245 uint8_t res; // reserved for future use (RFU)
246}
247 */
248
249#endif /* _PACKET_GSMTAP_H */
250
251/*
252 * Editor modelines - https://www.wireshark.org/tools/modelines.html
253 *
254 * Local variables:
255 * c-basic-offset: 8
256 * tab-width: 8
257 * indent-tabs-mode: t
258 * End:
259 *
260 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
261 * :indentSize=8:tabSize=8:noTabs=false:
262 */
_value_string
Mapping between a 32-bit integer value and its string representation.
Definition value_string.h:33