| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
packet-umts_fp.h
1/* packet-umts_fp.h
2 *
3 * Martin Mathieson
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
11#include <epan/conversation.h>
12
13/* Channel types */
14#define CHANNEL_UNKNOWN 0
15#define CHANNEL_RACH_FDD 1
16#define CHANNEL_RACH_TDD 2
17#define CHANNEL_FACH_FDD 3
18#define CHANNEL_FACH_TDD 4
19#define CHANNEL_DSCH_FDD 5 /* DSCH Downlink Shared Channel */
20#define CHANNEL_DSCH_TDD 6
21#define CHANNEL_USCH_TDD_384 8
22#define CHANNEL_USCH_TDD_128 24
23#define CHANNEL_PCH 9
24#define CHANNEL_CPCH 10
25#define CHANNEL_BCH 11
26#define CHANNEL_DCH 12 /* DCH Dedicated Transport Channel */
27#define CHANNEL_HSDSCH 13 /* HS-DSCH - High Speed Downlink Shared Channel */
28#define CHANNEL_IUR_CPCHF 14
29#define CHANNEL_IUR_FACH 15
30#define CHANNEL_IUR_DSCH 16
31#define CHANNEL_EDCH 17 /* E-DCH Enhanced DCH */
32#define CHANNEL_RACH_TDD_128 18
33#define CHANNEL_HSDSCH_COMMON 19 /* HS-DSCH - High Speed Downlink Shared Channel */
34#define CHANNEL_HSDSCH_COMMON_T3 20
35#define CHANNEL_EDCH_COMMON 21
36
37
38/* Constants */
39#define MAX_FP_CHANS 64
40#define MAX_EDCH_DDIS 16
41#define MAX_NUM_HSDHSCH_MACDFLOW 8
42#define FP_maxNrOfDCHs 128 /* From NBAP-Constants.asn */
43
44enum fp_interface_type
45{
46 IuB_Interface,
47 IuR_Interface
48};
49
50enum division_type
51{
52 Division_FDD = 1,
53 Division_TDD_384 = 2,
54 Division_TDD_128 = 3,
55 Division_TDD_768 = 4
56};
57
58enum fp_hsdsch_entity
59{
60 entity_not_specified = 0,
61 hs = 1,
62 ehs = 2
63};
64
65enum fp_link_type
66{
67 FP_Link_Unknown,
68 FP_Link_ATM,
69 FP_Link_Ethernet
70};
71
72enum fp_rlc_mode {
73 FP_RLC_MODE_UNKNOWN,
74 FP_RLC_TM,
75 FP_RLC_UM,
76 FP_RLC_AM
77};
78
79
80 typedef struct
81{
82 int num_ul_chans;
83 int ul_chan_tf_size[MAX_FP_CHANS];
84 int ul_chan_num_tbs[MAX_FP_CHANS];
85 int num_dl_chans;
86 int dl_chan_tf_size[MAX_FP_CHANS];
87 int dl_chan_num_tbs[MAX_FP_CHANS];
88
89} fp_dch_channel_info_t;
90
91
92/****************************************/
93/* Channel Specific Information Structs */
94
95/****************/
96/* FACH Structs */
97
98 typedef struct fp_crnti_allocation_info_t
99{
100 uint32_t alloc_frame_number; /* Frame where C-RNTI was allocated */
101 uint32_t urnti; /* The U-RNTI to which the C-RNTI was allocated*/
102 uint32_t global_retrieval_count; /* How many times this alloc info was retrieved for FACH channels*/
103} fp_crnti_allocation_info_t;
104
105/* Used in the 'channel_specific_info' field for FACH channels */
106 typedef struct fp_fach_channel_info_t
107{
108 /* Key: (uint32_t) C-RNTI */
109 /* Value: (fp_crnti_allocation_info_t) U-RNTI allocation info */
110 wmem_tree_t* crnti_to_urnti_map; /* Mapping between C-RNTIs and U-RNTIs using them in this FACH */
111} fp_fach_channel_info_t;
112
113
114/****************/
115/* RACH Structs */
116
117/* Used in the 'channel_specific_info' field for RACH channels */
118 typedef struct fp_rach_channel_info_t
119{
120 /* Key: (uint32_t) C-RNTI */
121 /* Value: (fp_crnti_allocation_info_t) U-RNTI allocation info */
122 wmem_tree_t* crnti_to_urnti_map; /* Mapping between C-RNTIs and U-RNTIs using them in this RACH */
123} fp_rach_channel_info_t;
124
125
126/****************/
127/* PCH Structs */
128
129/* Information about the Paging Indication Bitmap seen in a specific PCH frame*/
130 typedef struct paging_indications_info_t
131{
132 uint32_t frame_number;
133 uint8_t* paging_indications_bitmap;
134} paging_indications_info_t;
135
136/* Used in the 'channel_specific_info' field for PCH channels */
137 typedef struct fp_pch_channel_info_t
138{
139 /*Size of the Paging Indication field in this PCH*/
140 int paging_indications;
141 /* Information from the previous frame in this field which contained the paging indication field*/
142 paging_indications_info_t* last_paging_indication_info;
143} fp_pch_channel_info_t;
144
145
146/*****************/
147/* E-DCH Structs */
148
149/* Used in the 'channel_specific_info' field for E-DCH channels */
150 typedef struct fp_edch_channel_info_t
151{
152 int no_ddi_entries;
153 uint8_t edch_ddi[MAX_EDCH_DDIS];
154 unsigned edch_macd_pdu_size[MAX_EDCH_DDIS];
155 uint8_t edch_lchId[MAX_EDCH_DDIS];
156 uint8_t edch_type; /* 1 means T2 */
157} fp_edch_channel_info_t;
158
159
160/*******************/
161/* HS-DSCH Structs */
162
163/* Used in the 'channel_specific_info' field for HS-DSCH channels */
164 typedef struct fp_hsdsch_channel_info_t
165{
166 enum fp_hsdsch_entity hsdsch_entity;
167 uint8_t common_macdflow_id;
168 uint8_t hsdsch_macdflow_id;
169 unsigned hrnti; /*Used for tracking a HS-DSCH flow*/
170} fp_hsdsch_channel_info_t;
171
172
173/************************/
174/* FP Conversation Data */
175
176 typedef struct
177{
178 enum fp_interface_type iface_type;
179 enum division_type division;
180 int channel; /* see Channel types definitions above */
181 enum fp_rlc_mode rlc_mode;
182 uint32_t dl_frame_number; /* the frame where this conversation is started from CRNC */
183 uint32_t ul_frame_number; /* the frame where this conversation is started from Node B */
184 address crnc_address;
185 uint16_t crnc_port;
186
187 unsigned urnti; /* Identifies a single UE in the UTRAN. Used for tracking it's RLC session across different transport channels */
188 int com_context_id; /* Identifies a single UE in all NBAP messages */
189 uint32_t scrambling_code; /* Identifies a single UE's radio transmissions in the UTRAN */
190
191 void* channel_specific_info; /* Extended channel info based on the channel type */
192
193 /* DCH's in this flow */
194 int num_dch_in_flow;
195 int dch_ids_in_flow_list[FP_maxNrOfDCHs];
196 /* DCH type channel data */
197 fp_dch_channel_info_t fp_dch_channel_info[FP_maxNrOfDCHs];
198 uint8_t dch_crc_present; /* 0=No, 1=Yes, 2=Unknown */
199
200 bool reset_frag; /*Used to indicate that a stream has been reconfigured, hence we need to reset the fragtable*/
201 uint32_t cfn;
202 uint32_t cfn_index;
203
204} umts_fp_conversation_info_t;
205
206
207/********************************/
208/* FP Packet Data */
209/* (attached to each FP packet) */
210 typedef struct fp_info
211{
212 enum fp_interface_type iface_type;
213 enum division_type division;
214 uint8_t release; /* e.g. 99, 4, 5, 6, 7 */
215 uint16_t release_year; /* e.g. 2001 */
216 uint8_t release_month; /* e.g. 12 for December */
217 bool is_uplink;
218 int channel; /* see Channel types definitions above */
219 uint8_t dch_crc_present; /* 0=No, 1=Yes, 2=Unknown */
220 int num_chans;
221 int chan_tf_size[MAX_FP_CHANS];
222 int chan_num_tbs[MAX_FP_CHANS];
223
224 int no_ddi_entries;
225 uint8_t edch_ddi[MAX_EDCH_DDIS];
226 unsigned edch_macd_pdu_size[MAX_EDCH_DDIS];
227
228 unsigned edch_lchId[MAX_EDCH_DDIS]; /* Logical Channel Id for E-DCH*/
229
230 uint8_t edch_type; /* 1 means T2 */
231
232 int cur_tb; /* current transport block (required for dissecting of single TBs */
233 int cur_chan; /* current channel, required to retrieve the correct channel configuration for UMTS MAC */
234 int com_context_id; /* Identifies a single UE in the network */
235 uint16_t srcport, destport;
236
237 /* PCH Related data*/
238 int paging_indications;
239 paging_indications_info_t* relevant_paging_indications; /* Info from previous frame */
240 /* Info from the current frame. Used to carry information from this frame to the conversation info */
241 paging_indications_info_t* current_paging_indications;
242
243 /* HSDSCH Related data */
244 enum fp_hsdsch_entity hsdsch_entity;
245 int hsdsch_macflowd_id;
246 bool hsdhsch_macfdlow_is_mux[MAX_NUM_HSDHSCH_MACDFLOW];
247 enum fp_rlc_mode hsdsch_rlc_mode;
248 enum fp_link_type link_type;
249 unsigned urnti; /*Used for tracking a "sequence" over different transport channels*/
250
251 bool reset_frag; /*Used to indicate that a stream has been reconfigured, hence we need to reset the fragtable*/
252} fp_info;
253
254void set_umts_fp_conv_data(conversation_t *conversation, umts_fp_conversation_info_t *umts_fp_conversation_info);
255
256/*
257 * Editor modelines - https://www.wireshark.org/tools/modelines.html
258 *
259 * Local variables:
260 * c-basic-offset: 4
261 * tab-width: 8
262 * indent-tabs-mode: nil
263 * End:
264 *
265 * vi: set shiftwidth=4 tabstop=8 expandtab:
266 * :indentSize=4:tabSize=8:noTabs=true:
267 */
conversation.h
_address
Definition address.h:58
_wmem_tree_t
Internal representation of a wmem balanced tree.
Definition wmem_tree-int.h:81
conversation
Definition conversation.h:230
fp_crnti_allocation_info_t
Definition packet-umts_fp.h:99
fp_dch_channel_info_t
Definition packet-umts_fp.h:81
fp_edch_channel_info_t
Definition packet-umts_fp.h:151
fp_fach_channel_info_t
Definition packet-umts_fp.h:107
fp_hsdsch_channel_info_t
Definition packet-umts_fp.h:165
fp_info
Definition packet-umts_fp.h:211
fp_pch_channel_info_t
Definition packet-umts_fp.h:138
fp_rach_channel_info_t
Definition packet-umts_fp.h:119
paging_indications_info_t
Definition packet-umts_fp.h:131
umts_fp_conversation_info_t
Definition packet-umts_fp.h:177