FIXUP: WIP: verification_trailer
[wireshark-wip.git] / epan / dissectors / packet-umts_fp.h
blobe95ad4326b7485a51f5f586b56f7995c4f214ce2
1 /* packet-fp.h
3 * Martin Mathieson
4 * $Id$
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 #include <glib.h>
28 /* Channel types */
29 #define CHANNEL_RACH_FDD 1
30 #define CHANNEL_RACH_TDD 2
31 #define CHANNEL_FACH_FDD 3
32 #define CHANNEL_FACH_TDD 4
33 #define CHANNEL_DSCH_FDD 5 /* DSCH Downlink Shared Channel */
34 #define CHANNEL_DSCH_TDD 6
35 #define CHANNEL_USCH_TDD_384 8
36 #define CHANNEL_USCH_TDD_128 24
37 #define CHANNEL_PCH 9
38 #define CHANNEL_CPCH 10
39 #define CHANNEL_BCH 11
40 #define CHANNEL_DCH 12 /* DCH Dedicated Transport Channel */
41 #define CHANNEL_HSDSCH 13 /* HS-DSCH - High Speed Downlink Shared Channel */
42 #define CHANNEL_IUR_CPCHF 14
43 #define CHANNEL_IUR_FACH 15
44 #define CHANNEL_IUR_DSCH 16
45 #define CHANNEL_EDCH 17 /* E-DCH Enhanced DCH */
46 #define CHANNEL_RACH_TDD_128 18
47 #define CHANNEL_HSDSCH_COMMON 19 /* HS-DSCH - High Speed Downlink Shared Channel */
48 #define CHANNEL_HSDSCH_COMMON_T3 20
49 #define CHANNEL_EDCH_COMMON 21
51 enum fp_interface_type
53 IuB_Interface,
54 IuR_Interface
57 enum division_type
59 Division_FDD = 1,
60 Division_TDD_384 = 2,
61 Division_TDD_128 = 3,
62 Division_TDD_768 = 4
65 enum fp_hsdsch_entity
67 entity_not_specified = 0,
68 hs = 1,
69 ehs = 2
72 enum fp_link_type
74 FP_Link_Unknown,
75 FP_Link_ATM,
76 FP_Link_Ethernet
79 enum fp_rlc_mode {
80 FP_RLC_MODE_UNKNOWN,
81 FP_RLC_TM,
82 FP_RLC_UM,
83 FP_RLC_AM
86 /* Info attached to each FP packet */
87 typedef struct fp_info
89 enum fp_interface_type iface_type;
90 enum division_type division;
91 guint8 release; /* e.g. 99, 4, 5, 6, 7 */
92 guint16 release_year; /* e.g. 2001 */
93 guint8 release_month; /* e.g. 12 for December */
94 gboolean is_uplink;
95 gint channel; /* see Channel types definitions above */
96 guint8 dch_crc_present; /* 0=No, 1=Yes, 2=Unknown */
97 gint paging_indications;
98 gint num_chans;
99 #define MAX_FP_CHANS 64
100 gint chan_tf_size[MAX_FP_CHANS];
101 gint chan_num_tbs[MAX_FP_CHANS];
103 #define MAX_EDCH_DDIS 16
104 gint no_ddi_entries;
105 guint8 edch_ddi[MAX_EDCH_DDIS];
106 guint edch_macd_pdu_size[MAX_EDCH_DDIS];
108 guint edch_lchId[MAX_EDCH_DDIS]; /* Logical Channel Id for E-DCH*/
110 guint8 edch_type; /* 1 means T2 */
112 gint cur_tb; /* current transport block (required for dissecting of single TBs */
113 gint cur_chan; /* current channel, required to retrieve the correct channel configuration for UMTS MAC */
114 gint com_context_id; /*Identifies a single UE in the network*/
115 guint16 srcport, destport;
117 /* HSDSCH Related data */
118 enum fp_hsdsch_entity hsdsch_entity;
119 gint hsdsch_macflowd_id;
120 #define MAX_NUM_HSDHSCH_MACDFLOW 8
121 gboolean hsdhsch_macfdlow_is_mux[MAX_NUM_HSDHSCH_MACDFLOW];
122 enum fp_link_type link_type;
123 guint urnti; /*Used for tracking a "sequence" over diffrent transport channels*/
125 gboolean reset_frag; /*Used to indicate that a stream has been reconfigured, hence we need to reset the fragtable*/
126 } fp_info;
128 /* From NBAC-Constants.asn */
129 #define FP_maxNrOfTFs 32
131 typedef struct
133 gint num_ul_chans;
134 gint ul_chan_tf_size[MAX_FP_CHANS];
135 gint ul_chan_num_tbs[MAX_FP_CHANS];
136 gint num_dl_chans;
137 gint dl_chan_tf_size[MAX_FP_CHANS];
138 gint dl_chan_num_tbs[MAX_FP_CHANS];
140 } fp_dch_channel_info_t;
143 typedef struct
145 enum fp_interface_type iface_type;
146 enum division_type division;
147 gint channel; /* see Channel types definitions above */
148 guint32 dl_frame_number; /* the frame where this conversation is started from CRNC */
149 guint32 ul_frame_number; /* the frame where this conversation is started from Node B */
150 address crnc_address;
151 guint16 crnc_port;
152 gint com_context_id; /*Identifies a single UE in the network*/
154 /* For PCH channel */
155 gint paging_indications;
157 /* DCH's in this flow */
158 gint num_dch_in_flow;
159 gint dchs_in_flow_list[FP_maxNrOfTFs];
161 guint8 dch_crc_present; /* 0=No, 1=Yes, 2=Unknown */
162 enum fp_rlc_mode rlc_mode;
164 /* DCH type channel data */
165 fp_dch_channel_info_t fp_dch_channel_info[FP_maxNrOfTFs];
167 /* E-DCH related data */
168 gint no_ddi_entries;
169 guint8 edch_ddi[MAX_EDCH_DDIS];
170 guint edch_macd_pdu_size[MAX_EDCH_DDIS];
171 guint8 edch_lchId[MAX_EDCH_DDIS];
172 guint8 edch_type; /* 1 means T2 */
174 /* HSDSCH Related data */
175 enum fp_hsdsch_entity hsdsch_entity;
176 guint8 hsdsch_macdflow_id;
178 guint8 hsdsch_num_chans_per_flow[MAX_NUM_HSDHSCH_MACDFLOW];
180 /*HSDSCH Common related data*/
181 guint8 common_macdflow_id;
183 guint urnti; /*Used for tracking a "sequence" over diffrent transport channels*/
184 guint hrnti; /*Used for tracking a HS-DSCH flow*/
185 gboolean reset_frag; /*Used to indicate that a stream has been reconfigured, hence we need to reset the fragtable*/
186 guint32 cfn;
187 guint32 cfn_index;
188 } umts_fp_conversation_info_t;
190 void set_umts_fp_conv_data(conversation_t *conversation, umts_fp_conversation_info_t *umts_fp_conversation_info);