3 * Routines for RTP ED-137 extensions dissection
4 * RTP = Real time Transport Protocol
6 * Copyright 2000, Philips Electronics N.V.
7 * Written by Andreas Sikkema <h323@ramdyne.nl>
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 1998 Gerald Combs
13 * SPDX-License-Identifier: GPL-2.0-or-later
17 * This dissector tries to dissect the RTP extension headers by ED-137, ED-137A, ED-137B and ED-137C specification
18 * of EUROCAE (The European Organisation for Civil Aviation Equipment)
20 * There are two packet header extension signatures. One for ED-137 and second ED-137A and later releases. Even some extensions are same in ED-137 and ED-137A, constants and code are duplicated because there are slight differences between standard release.
21 * ED-137A and later standards share some extensions (e. g. SQI is defined in ED-137A and repeated without change in ED-137B and C). Naming convention use first standard release where extension was introduced (ED-137A in SQI case).
23 * Each ED-137 header extension consists of fixed part and variable part (called "extension for additional features" in standard). The code decodes fixed part and some variable part headers. The code decode only additional headers we seen (we have samples) even standard defines more of it.
24 * To allow other developers and vendors to introduce custom decoders, there are dissector tables rtp.hdr_ext.ed137 and rtp.hdr_ext.ed137a which registers dissector for each "additional feature" header by type/length key. It allows anyone extending decoding capabilites just by adding plugin and register dissector in the table - without modifying this source.
25 * rtp.hdr_ext.ed137 table is used for ED-137 standard release. rtp.hdr_ext.ed137a table is used for ED-137A and later standard releases.
31 #include <epan/packet.h>
32 #include <epan/to_str.h>
33 #include <epan/expert.h>
34 #include <epan/conversation.h>
36 #include "packet-rtp.h"
38 /* ED137 conversation proto data structure */
39 typedef struct _ed137_conv_info_t
{
40 wmem_tree_t
*unmatched_pdus
;
41 wmem_tree_t
*matched_pdus
;
44 /* ED137 RMM transaction data structure */
45 typedef struct _ed137rmm_transaction_t
{
51 } ed137rmm_transaction_t
;
53 static int proto_rtp_ed137
;
55 static dissector_handle_t rtp_hdr_ext_ed137_handle
;
56 static dissector_handle_t rtp_hdr_ext_ed137a_handle
;
57 static dissector_handle_t rtp_hdr_ext_ed137a_feature_sqi_handle
;
58 static dissector_handle_t rtp_hdr_ext_ed137a_feature_climax_tdly_handle
;
59 static dissector_handle_t rtp_hdr_ext_ed137b_feature_rrc_single_handle
;
60 static dissector_handle_t rtp_hdr_ext_ed137b_feature_climax_ddc_rmm_handle
;
61 static dissector_handle_t rtp_hdr_ext_ed137b_feature_climax_ddc_mam_handle
;
62 static dissector_handle_t rtp_hdr_ext_ed137c_feature_climax_ddc_mam_handle
;
64 static dissector_table_t rtp_hdr_ext_ed137a_add_features_table
;
66 /* RTP header ED-137 extension fields */
67 static int hf_rtp_hdr_ed137s
;
68 static int hf_rtp_hdr_ed137
;
69 static int hf_rtp_hdr_ed137_add
;
70 static int hf_rtp_hdr_ed137_ptt_type
;
71 static int hf_rtp_hdr_ed137_squ
;
72 static int hf_rtp_hdr_ed137_ptt_id
;
73 static int hf_rtp_hdr_ed137_sct
;
74 static int hf_rtp_hdr_ed137_x
;
75 static int hf_rtp_hdr_ed137_x_nu
;
76 static int hf_rtp_hdr_ed137_ft_type
;
77 static int hf_rtp_hdr_ed137_ft_len
;
78 static int hf_rtp_hdr_ed137_ft_value
;
79 static int hf_rtp_hdr_ed137_ft_bss_qidx
;
80 static int hf_rtp_hdr_ed137_ft_bss_rssi_qidx
;
81 static int hf_rtp_hdr_ed137_ft_bss_qidx_ml
;
82 static int hf_rtp_hdr_ed137_vf
;
83 static int hf_rtp_hdr_ed137_ft_climax_delay_value
;
85 /* RTP header ED-137A extension fields */
86 static int hf_rtp_hdr_ed137a
;
87 static int hf_rtp_hdr_ed137a_add
;
88 static int hf_rtp_hdr_ed137a_ptt_type
;
89 static int hf_rtp_hdr_ed137a_squ
;
90 static int hf_rtp_hdr_ed137a_ptt_id
;
91 static int hf_rtp_hdr_ed137a_pm
;
92 static int hf_rtp_hdr_ed137a_ptts
;
93 static int hf_rtp_hdr_ed137a_sct
;
94 static int hf_rtp_hdr_ed137a_reserved
;
95 static int hf_rtp_hdr_ed137a_x
;
96 static int hf_rtp_hdr_ed137a_x_nu
;
97 static int hf_rtp_hdr_ed137a_ft_type
;
98 static int hf_rtp_hdr_ed137a_ft_len
;
99 static int hf_rtp_hdr_ed137a_ft_value
;
100 static int hf_rtp_hdr_ed137a_ft_padding
;
101 static int hf_rtp_hdr_ed137a_ft_sqi_qidx
;
102 static int hf_rtp_hdr_ed137a_ft_sqi_rssi_qidx
;
103 static int hf_rtp_hdr_ed137a_ft_sqi_qidx_ml
;
104 static int hf_rtp_hdr_ed137a_ft_climax_delay_mode
;
105 static int hf_rtp_hdr_ed137a_ft_climax_delay_relative_value
;
106 static int hf_rtp_hdr_ed137a_ft_climax_delay_absolute_value
;
108 /* RTP header ED-137B extension fields */
109 static int hf_rtp_hdr_ed137b_ft_rrc_single
;
110 static int hf_rtp_hdr_ed137b_ft_rrc_single_ms_tx_f1
;
111 static int hf_rtp_hdr_ed137b_ft_rrc_single_ms_rx_f1
;
112 static int hf_rtp_hdr_ed137b_ft_rrc_single_ms_tx_f2
;
113 static int hf_rtp_hdr_ed137b_ft_rrc_single_ms_rx_f2
;
114 static int hf_rtp_hdr_ed137b_ft_rrc_single_sel_tx_f1
;
115 static int hf_rtp_hdr_ed137b_ft_rrc_single_sel_tx_f2
;
116 static int hf_rtp_hdr_ed137b_ft_rrc_single_mu_rx_f1
;
117 static int hf_rtp_hdr_ed137b_ft_rrc_single_mu_rx_f2
;
118 static int hf_rtp_hdr_ed137b_ft_climax_ddc_rmm
;
119 static int hf_rtp_hdr_ed137b_ft_climax_ddc_rmm_tqv
;
120 static int hf_rtp_hdr_ed137b_ft_climax_ddc_rmm_t1
;
121 static int hf_rtp_hdr_ed137b_ft_climax_ddc_mam
;
122 static int hf_rtp_hdr_ed137b_ft_climax_ddc_mam_tqg
;
123 static int hf_rtp_hdr_ed137b_ft_climax_ddc_mam_t1
;
124 static int hf_rtp_hdr_ed137b_ft_climax_ddc_mam_nmr
;
125 static int hf_rtp_hdr_ed137b_ft_climax_ddc_mam_t2
;
126 static int hf_rtp_hdr_ed137b_ft_climax_ddc_mam_tsd
;
127 static int hf_rtp_hdr_ed137b_ft_climax_ddc_mam_tj1
;
128 static int hf_rtp_hdr_ed137b_ft_climax_ddc_mam_tid
;
130 /* RTP header ED-137C extension fields */
131 static int hf_rtp_hdr_ed137c_ft_climax_ddc_mam
;
132 static int hf_rtp_hdr_ed137c_ft_climax_ddc_mam_tqg
;
133 static int hf_rtp_hdr_ed137c_ft_climax_ddc_mam_t1
;
134 static int hf_rtp_hdr_ed137c_ft_climax_ddc_mam_nmr
;
135 static int hf_rtp_hdr_ed137c_ft_climax_ddc_mam_t2
;
136 static int hf_rtp_hdr_ed137c_ft_climax_ddc_mam_tsd
;
137 static int hf_rtp_hdr_ed137c_ft_climax_ddc_mam_tj1
;
138 static int hf_rtp_hdr_ed137c_ft_climax_ddc_mam_tid
;
139 static int hf_rtp_hdr_ed137c_ft_climax_ddc_mam_ts2
;
141 static int hf_rtp_hdr_ed137_ft_climax_ddc_rmm_response_in
;
142 static int hf_rtp_hdr_ed137_ft_climax_ddc_rmm_no_resp
;
143 static int hf_rtp_hdr_ed137_ft_climax_ddc_mam_request_in
;
144 static int hf_rtp_hdr_ed137_ft_climax_ddc_mam_time
;
146 static expert_field ei_rtp_hdr_ed137_ft_climax_ddc_rmm_resp_not_found
;
147 static expert_field ei_rtp_hdr_ed137_ft_sqi_rssi_out_of_range
;
149 static int ett_hdr_ext_ed137s
;
150 static int ett_hdr_ext_ed137
;
151 static int ett_hdr_ext_ed137_add
;
152 static int ett_hdr_ext_ed137a
;
153 static int ett_hdr_ext_ed137a_add
;
155 /* Forward declaration we need below */
156 void proto_register_rtp_ed137(void);
157 void proto_reg_handoff_rtp_ed137(void);
159 /* Combine 4 bits of type with 4 bits of length to 8 bit key */
160 #define MAKE_KEY(type, len) \
161 ( ( type & 0x0F ) << 4 | ( len & 0x0f ) )
163 /* ED-137 signature */
164 #define RTP_ED137_SIG 0x0067
166 /* ED-137A signature */
167 #define RTP_ED137A_SIG 0x0167
170 #define RTP_ED137_ptt_mask(octet) ((octet) & 0xE0000000)
171 #define RTP_ED137A_ptt_mask(octet) ((octet) & 0xE000)
172 #define RTP_ED137_squ_mask(octet) ((octet) & 0x10000000)
173 #define RTP_ED137A_squ_mask(octet) ((octet) & 0x1000)
175 /* ED-137 extended information */
176 #define RTP_ED137_extended_information(octet) ((octet) & 0x00400000)
177 #define RTP_ED137A_extended_information(octet) ((octet) & 0x0001)
179 /* ED-137 feature type */
180 #define RTP_ED137_feature_type(octet) (((octet) & 0x003C0000) >> 18)
181 #define RTP_ED137A_feature_type(octet) (((octet) & 0x0000F000) >> 12)
183 /* ED-137 feature length */
184 #define RTP_ED137_feature_length(octet) (((octet) & 0x0003C000) >> 14)
185 #define RTP_ED137A_feature_length(octet) (((octet) & 0x00000F00) >> 8)
187 /* ED-137 feature value */
188 #define RTP_ED137_feature_value(octet) (((octet) & 0x00003FFE) >> 1)
189 #define RTP_ED137A_feature_value(octet) (((octet) & 0x000000FF) >> 0)
191 /* ED_137 None constants */
192 #define RTP_ED137_feature_none_type 0x0
194 /* ED-137 BSS constants */
195 #define RTP_ED137_feature_bss_type 0x1
196 #define RTP_ED137_feature_bss_qidx(octet) (((octet) & 0x00003FC0) >> 6)
197 #define RTP_ED137_feature_bss_qidx_ml(octet) (((octet) & 0x00000038) >> 2)
198 #define RTP_ED137_feature_bss_qidx_ml_rssi 0
199 #define RTP_ED137_feature_bss_qidx_rssi_max 15
201 /* ED-137 CLIMAX-Time Delay */
202 #define RTP_ED137_feature_climax_ot_type 0x2
203 #define RTP_ED137_feature_climax_ot_value(octet) (((octet) & 0x00003F00) >> 8)
205 /* ED-137A SQI constants */
206 #define RTP_ED137A_feature_sqi_type 0x1
207 #define RTP_ED137A_feature_sqi_len 1
208 #define RTP_ED137A_feature_sqi_key MAKE_KEY( RTP_ED137A_feature_sqi_type, RTP_ED137A_feature_sqi_len )
209 #define RTP_ED137A_feature_sqi_qidx(octet) (((octet) & 0x000000F8) >> 3)
210 #define RTP_ED137A_feature_sqi_qidx_ml(octet) (((octet) & 0x00000007) >> 0)
211 #define RTP_ED137A_feature_sqi_qidx_ml_rssi 0
212 #define RTP_ED137A_feature_sqi_qidx_rssi_max 15
214 /* ED-137A CLIMAX-Time Delay */
215 #define RTP_ED137A_feature_climax_tdly_type 0x2
216 #define RTP_ED137A_feature_climax_tdly_len 1
217 #define RTP_ED137A_feature_climax_tdly_key MAKE_KEY( RTP_ED137A_feature_climax_tdly_type, RTP_ED137A_feature_climax_tdly_len )
218 #define RTP_ED137A_feature_climax_tdly_mode(octet) (((octet) & 0x00000080) >> 7)
219 #define RTP_ED137A_feature_climax_tdly_value(octet) (((octet) & 0x0000007F) >> 0)
220 #define RTP_ED137A_feature_climax_tdly_mode_relative 0
221 #define RTP_ED137A_feature_climax_tdly_mode_absolute 1
223 /* ED-137B RRC single */
224 #define RTP_ED137B_feature_rrc_single_type 0x3
225 #define RTP_ED137B_feature_rrc_single_len 1
226 #define RTP_ED137B_feature_rrc_single_key MAKE_KEY( RTP_ED137B_feature_rrc_single_type, RTP_ED137B_feature_rrc_single_len )
228 /* ED-137B CLIMAX dynamic delay compensation */
229 #define RTP_ED137B_feature_climax_ddc_type 0x4
230 #define RTP_ED137B_feature_climax_ddc_rmm_len 3
231 #define RTP_ED137B_feature_climax_ddc_mam_len 12
232 #define RTP_ED137B_feature_climax_ddc_rmm_key MAKE_KEY( RTP_ED137B_feature_climax_ddc_type, RTP_ED137B_feature_climax_ddc_rmm_len )
233 #define RTP_ED137B_feature_climax_ddc_mam_key MAKE_KEY( RTP_ED137B_feature_climax_ddc_type, RTP_ED137B_feature_climax_ddc_mam_len )
234 #define RTP_ED137B_feature_climax_ddc_rmm_tqv(octet) (((octet) & 0x00800000) >> 23)
235 #define RTP_ED137B_feature_climax_ddc_rmm_t1(octet) (((octet) & 0x007FFFFF) >> 0)
236 #define RTP_ED137B_feature_climax_ddc_mam_tqg(octet) (((octet) & 0x00800000) >> 23)
237 #define RTP_ED137B_feature_climax_ddc_mam_t1(octet) (((octet) & 0x007FFFFF) >> 0)
238 #define RTP_ED137B_feature_climax_ddc_mam_nmr(octet) (((octet) & 0x00800000) >> 23)
239 #define RTP_ED137B_feature_climax_ddc_mam_t2(octet) (((octet) & 0x007FFFFF) >> 0)
240 #define RTP_ED137B_feature_climax_ddc_mam_tsd(octet) (((octet) & 0xFFFF) >> 0)
241 #define RTP_ED137B_feature_climax_ddc_mam_tj1(octet) (((octet) & 0xFFFF) >> 0)
242 #define RTP_ED137B_feature_climax_ddc_mam_tid(octet) (((octet) & 0xFFFF) >> 0)
243 #define RTP_ED137B_feature_climax_ddc_rmm_tqv_relative 0
244 #define RTP_ED137B_feature_climax_ddc_rmm_tqv_absolute 1
245 #define RTP_ED137B_feature_climax_ddc_mam_tqg_relative 0
246 #define RTP_ED137B_feature_climax_ddc_mam_tqg_absolute 1
248 /* ED-137C CLIMAX dynamic delay compensation*/
249 #define RTP_ED137C_feature_climax_ddc_type 0x4
250 #define RTP_ED137C_feature_climax_ddc_mam_len 14
251 #define RTP_ED137C_feature_climax_ddc_mam_key MAKE_KEY( RTP_ED137C_feature_climax_ddc_type, RTP_ED137C_feature_climax_ddc_mam_len )
252 #define RTP_ED137C_feature_climax_ddc_rmm_tqv(octet) (((octet) & 0x00800000) >> 23)
253 #define RTP_ED137C_feature_climax_ddc_rmm_t1(octet) (((octet) & 0x007FFFFF) >> 0)
254 #define RTP_ED137C_feature_climax_ddc_mam_tqg(octet) (((octet) & 0x00800000) >> 23)
255 #define RTP_ED137C_feature_climax_ddc_mam_t1(octet) (((octet) & 0x007FFFFF) >> 0)
256 #define RTP_ED137C_feature_climax_ddc_mam_nmr(octet) (((octet) & 0x00800000) >> 23)
257 #define RTP_ED137C_feature_climax_ddc_mam_t2(octet) (((octet) & 0x007FFFFF) >> 0)
258 #define RTP_ED137C_feature_climax_ddc_mam_tsd(octet) (((octet) & 0xFFFF) >> 0)
259 #define RTP_ED137C_feature_climax_ddc_mam_tj1(octet) (((octet) & 0xFFFF) >> 0)
260 #define RTP_ED137C_feature_climax_ddc_mam_tid(octet) (((octet) & 0xFFFF) >> 0)
261 #define RTP_ED137C_feature_climax_ddc_mam_ts2(octet) (((octet) & 0xFFFF) >> 0)
262 #define RTP_ED137C_feature_climax_ddc_rmm_tqv_relative 0
263 #define RTP_ED137C_feature_climax_ddc_rmm_tqv_absolute 1
264 #define RTP_ED137C_feature_climax_ddc_mam_tqg_relative 0
265 #define RTP_ED137C_feature_climax_ddc_mam_tqg_absolute 1
268 static const value_string rtp_ext_ed137_ptt_type
[] =
271 { 0x01, "Normal PTT ON" },
272 { 0x02, "Coupling PTT ON" },
273 { 0x03, "Priority PTT ON" },
274 { 0x04, "Emergency PTT ON" },
275 { 0x05, "Reserved" },
276 { 0x06, "Reserved" },
277 { 0x07, "Reserved" },
281 static const value_string rtp_ext_ed137_squ
[] =
288 static const value_string rtp_ext_ed137_ft_type
[] =
290 { 0x0, "No features" },
291 { 0x1, "Best signal selection" },
292 { 0x2, "CLIMAX time delay" },
301 { 0xB, "Vendor reserved" },
302 { 0xC, "Vendor reserved" },
303 { 0xD, "Vendor reserved" },
304 { 0xE, "Vendor reserved" },
305 { 0xF, "Vendor reserved" },
309 static const value_string rtp_ext_ed137_x
[] =
311 { 0x00, "No extended information with additional features is used" },
312 { 0x01, "Extended information with additional features is used" },
316 static const value_string rtp_ext_ed137_vf
[] =
323 static const value_string rtp_ext_ed137_ft_bss_rssi_qidx
[] =
325 { 0x00, "lower than -100.00 dBm" },
326 { 0x01, "lower than or equal to -97.86 dBm" },
327 { 0x02, "lower than or equal to -95.71 dBm" },
328 { 0x03, "lower than or equal to -93.57 dBm" },
329 { 0x04, "lower than or equal to -91.43 dBm" },
330 { 0x05, "lower than or equal to -89.29 dBm" },
331 { 0x06, "lower than or equal to -87.14 dBm" },
332 { 0x07, "lower than or equal to -85.00 dBm" },
333 { 0x08, "lower than or equal to -82.86 dBm" },
334 { 0x09, "lower than or equal to -80.71 dBm" },
335 { 0x0a, "lower than or equal to -78.57 dBm" },
336 { 0x0b, "lower than or equal to -76.43 dBm" },
337 { 0x0c, "lower than or equal to -74.29 dBm" },
338 { 0x0d, "lower than or equal to -72.14 dBm" },
339 { 0x0e, "lower than or equal to -70.00 dBm" },
340 { 0x0f, "higher than -70.00 dBm" },
344 static const value_string rtp_ext_ed137_ft_bss_qidx_ml
[] =
347 { 0x01, "AGC Level" },
349 { 0x03, "Standardized PSD" },
350 { 0x04, "Vendor specific method" },
351 { 0x05, "Vendor specific method" },
352 { 0x06, "Vendor specific method" },
353 { 0x07, "Vendor specific method" },
357 static const value_string rtp_ext_ed137a_ptt_type
[] =
360 { 0x01, "Normal PTT ON" },
361 { 0x02, "Coupling PTT ON" },
362 { 0x03, "Priority PTT ON" },
363 { 0x04, "Emergency PTT ON" },
364 { 0x05, "Test PTT ON" },
365 { 0x06, "Reserved" },
366 { 0x07, "Reserved" },
370 static const value_string rtp_ext_ed137a_squ
[] =
377 static const value_string rtp_ext_ed137a_ft_type
[] =
379 { 0x0, "No features" },
380 { 0x1, "Signal Quality Information" },
381 { 0x2, "CLIMAX time delay" },
382 { 0x3, "Radio remote control" },
383 { 0x4, "CLIMAX dynamic delay compensation" },
390 { 0xB, "Vendor reserved" },
391 { 0xC, "Vendor reserved" },
392 { 0xD, "Vendor reserved" },
393 { 0xE, "Vendor reserved" },
394 { 0xF, "Vendor reserved" },
398 static const value_string rtp_ext_ed137a_ft_sqi_rssi_qidx
[] =
400 { 0x00, "lower than -100.00 dBm" },
401 { 0x01, "lower than or equal to -97.86 dBm" },
402 { 0x02, "lower than or equal to -95.71 dBm" },
403 { 0x03, "lower than or equal to -93.57 dBm" },
404 { 0x04, "lower than or equal to -91.43 dBm" },
405 { 0x05, "lower than or equal to -89.29 dBm" },
406 { 0x06, "lower than or equal to -87.14 dBm" },
407 { 0x07, "lower than or equal to -85.00 dBm" },
408 { 0x08, "lower than or equal to -82.86 dBm" },
409 { 0x09, "lower than or equal to -80.71 dBm" },
410 { 0x0a, "lower than or equal to -78.57 dBm" },
411 { 0x0b, "lower than or equal to -76.43 dBm" },
412 { 0x0c, "lower than or equal to -74.29 dBm" },
413 { 0x0d, "lower than or equal to -72.14 dBm" },
414 { 0x0e, "lower than or equal to -70.00 dBm" },
415 { 0x0f, "higher than -70.00 dBm" },
419 static const value_string rtp_ext_ed137a_ft_sqi_qidx_ml
[] =
422 { 0x01, "AGC Level" },
424 { 0x03, "Standardized PSD" },
425 { 0x04, "Vendor specific method" },
426 { 0x05, "Vendor specific method" },
427 { 0x06, "Vendor specific method" },
428 { 0x07, "Vendor specific method" },
432 static const value_string rtp_ext_ed137a_ft_climax_delay_mode
[] =
434 { 0x00, "relative" },
435 { 0x01, "absolute" },
439 static const value_string rtp_ext_ed137b_ft_single_ms_tx_f1
[] =
441 { 0x00, "Main transmitter for F1 is used" },
442 { 0x01, "Standby transmitter for F1 is used" },
446 static const value_string rtp_ext_ed137b_ft_single_ms_rx_f1
[] =
448 { 0x00, "Main receiver for F1 is used" },
449 { 0x01, "Standby receiver for F1 is used" },
453 static const value_string rtp_ext_ed137b_ft_single_ms_tx_f2
[] =
455 { 0x00, "Main transmitter for F2 is used" },
456 { 0x01, "Standby transmitter for F2 is used" },
460 static const value_string rtp_ext_ed137b_ft_single_ms_rx_f2
[] =
462 { 0x00, "Main receiver for F2 is used" },
463 { 0x01, "Standby receiver for F2 is used" },
467 static const value_string rtp_ext_ed137b_ft_single_sel_tx_f1
[] =
469 { 0x00, "Active transmitter for F1 shall not be used" },
470 { 0x01, "Active transmitter for F1 shall be used" },
474 static const value_string rtp_ext_ed137b_ft_single_sel_tx_f2
[] =
476 { 0x00, "Active transmitter for F2 shall not be used" },
477 { 0x01, "Active transmitter for F2 shall be used" },
481 static const value_string rtp_ext_ed137b_ft_single_mu_rx_f1
[] =
483 { 0x00, "Active receiver for F1 shall be unmuted" },
484 { 0x01, "Active receiver for F1 shall be muted" },
488 static const value_string rtp_ext_ed137b_ft_single_mu_rx_f2
[] =
490 { 0x00, "Active receiver for F2 shall be unmuted" },
491 { 0x01, "Active receiver for F2 shall be muted" },
495 static const value_string rtp_ext_ed137b_ft_climax_ddc_time_quality
[] =
497 { 0x00, "Not synchronized" },
498 { 0x01, "Synchronized" },
502 static const value_string rtp_ext_ed137b_ft_climax_ddc_mam_nmr
[] =
504 { 0x00, "No request" },
505 { 0x01, "GRS requests a new RTT measurement" },
509 static const value_string rtp_ext_ed137c_ft_climax_ddc_time_quality
[] =
511 { 0x00, "Not synchronized" },
512 { 0x01, "Synchronized" },
516 static const value_string rtp_ext_ed137c_ft_climax_ddc_mam_nmr
[] =
518 { 0x00, "No request" },
519 { 0x01, "GRS requests a new RTT measurement" },
523 /* We do not need to allocate/free strings */
524 static char *ed137_ptt_only
= "PTT";
525 static char *ed137_squ_only
= "SQU";
526 static char *ed137_ptt_and_squ
= "PTT+SQU";
529 * Only seen/tested headers are decoded
532 dissect_rtp_hdr_ext_ed137(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data
)
534 unsigned int hdr_extension_len
;
535 struct _rtp_info
*rtp_info
=(struct _rtp_info
*)data
;
536 proto_tree
*rtp_hext_tree
= NULL
;
537 unsigned int hdrext_offset
= 0;
538 bool ed137_ptt
= false;
539 bool ed137_squ
= false;
541 hdr_extension_len
= tvb_reported_length(tvb
);
543 if ( hdr_extension_len
> 0 ) {
545 if (rtp_info
!= NULL
) {
546 rtp_info
->info_is_ed137
= true;
550 ti
= proto_tree_add_item(tree
, hf_rtp_hdr_ed137s
, tvb
, 0, hdr_extension_len
, ENC_NA
);
551 rtp_hext_tree
= proto_item_add_subtree( ti
, ett_hdr_ext_ed137s
);
554 while ( hdr_extension_len
> 0 ) {
556 proto_tree
*rtp_hext_tree2
;
558 proto_tree
*rtp_hext_tree3
;
559 unsigned int ft_type
;
560 uint32_t ext_value
= tvb_get_ntohl( tvb
, hdrext_offset
);
562 if (RTP_ED137_ptt_mask(ext_value
)) {
563 col_append_str(pinfo
->cinfo
, COL_INFO
, ", PTT");
566 if (RTP_ED137_squ_mask(ext_value
)) {
567 col_append_str(pinfo
->cinfo
, COL_INFO
, ", SQU");
571 /* Map PTT/SQU bits to string */
572 if (rtp_info
!= NULL
) {
575 rtp_info
->info_ed137_info
= ed137_ptt_and_squ
;
577 rtp_info
->info_ed137_info
= ed137_ptt_only
;
581 rtp_info
->info_ed137_info
= ed137_squ_only
;
583 rtp_info
->info_ed137_info
= NULL
;
588 if ( rtp_hext_tree
) {
589 ti2
= proto_tree_add_item(rtp_hext_tree
, hf_rtp_hdr_ed137
, tvb
, hdrext_offset
, 4, ENC_NA
);
590 rtp_hext_tree2
= proto_item_add_subtree( ti2
, ett_hdr_ext_ed137
);
592 /* There are multiple formats of header - depends on direction of a flow. As it is not possible to quess flow direction, we use items from RTPRx because unused fields are empty in other formats */
593 proto_tree_add_item( rtp_hext_tree2
, hf_rtp_hdr_ed137_ptt_type
, tvb
, hdrext_offset
, 4, ENC_BIG_ENDIAN
);
594 proto_tree_add_item( rtp_hext_tree2
, hf_rtp_hdr_ed137_squ
, tvb
, hdrext_offset
, 4, ENC_BIG_ENDIAN
);
595 proto_tree_add_item( rtp_hext_tree2
, hf_rtp_hdr_ed137_ptt_id
, tvb
, hdrext_offset
, 4, ENC_BIG_ENDIAN
);
596 proto_tree_add_item( rtp_hext_tree2
, hf_rtp_hdr_ed137_sct
, tvb
, hdrext_offset
, 4, ENC_BIG_ENDIAN
);
597 proto_tree_add_item( rtp_hext_tree2
, hf_rtp_hdr_ed137_x
, tvb
, hdrext_offset
, 4, ENC_BIG_ENDIAN
);
598 proto_tree_add_item( rtp_hext_tree2
, hf_rtp_hdr_ed137_vf
, tvb
, hdrext_offset
, 4, ENC_BIG_ENDIAN
);
601 ft_type
= RTP_ED137_feature_type(ext_value
);
603 ti3
= proto_tree_add_item(rtp_hext_tree
, hf_rtp_hdr_ed137_add
, tvb
, hdrext_offset
, 4, ENC_NA
);
604 rtp_hext_tree3
= proto_item_add_subtree( ti3
, ett_hdr_ext_ed137_add
);
606 if (RTP_ED137_extended_information(ext_value
)) {
607 /* Extended information is used */
609 if ( rtp_hext_tree
) {
610 proto_tree_add_item( rtp_hext_tree3
, hf_rtp_hdr_ed137_ft_type
, tvb
, hdrext_offset
, 4, ENC_BIG_ENDIAN
);
611 proto_tree_add_item( rtp_hext_tree3
, hf_rtp_hdr_ed137_ft_len
, tvb
, hdrext_offset
, 4, ENC_BIG_ENDIAN
);
614 if ( rtp_hext_tree
) {
616 case RTP_ED137_feature_bss_type
:
618 unsigned int bss_qidx
;
619 unsigned int bss_qidx_ml
;
621 bss_qidx
= RTP_ED137_feature_bss_qidx(ext_value
);
622 bss_qidx_ml
= RTP_ED137_feature_bss_qidx_ml(ext_value
);
623 if (RTP_ED137_feature_bss_qidx_ml_rssi
== bss_qidx_ml
) {
624 /* Special handling for RSSI method */
625 if (bss_qidx
<= RTP_ED137_feature_bss_qidx_rssi_max
) {
627 proto_tree_add_item( rtp_hext_tree3
, hf_rtp_hdr_ed137_ft_bss_rssi_qidx
, tvb
, hdrext_offset
, 4, ENC_BIG_ENDIAN
);
630 /* Handle as other method */
631 proto_tree_add_item( rtp_hext_tree3
, hf_rtp_hdr_ed137_ft_bss_qidx
, tvb
, hdrext_offset
, 4, ENC_BIG_ENDIAN
);
635 /* Other BSS method handling */
636 proto_tree_add_item( rtp_hext_tree3
, hf_rtp_hdr_ed137_ft_bss_qidx
, tvb
, hdrext_offset
, 4, ENC_BIG_ENDIAN
);
638 proto_tree_add_item( rtp_hext_tree3
, hf_rtp_hdr_ed137_ft_bss_qidx_ml
, tvb
, hdrext_offset
, 4, ENC_BIG_ENDIAN
);
641 case RTP_ED137_feature_climax_ot_type
:
643 unsigned int climax_ot_value
;
644 unsigned int climax_ot_value_calc
;
646 climax_ot_value
= RTP_ED137_feature_climax_ot_value(ext_value
);
648 /* Relative delay, in 2ms steps */
649 climax_ot_value_calc
=2*climax_ot_value
;
650 proto_tree_add_uint_format_value( rtp_hext_tree3
, hf_rtp_hdr_ed137_ft_climax_delay_value
, tvb
, hdrext_offset
, 4, climax_ot_value
, "%d ms", climax_ot_value_calc
);
655 proto_tree_add_item( rtp_hext_tree3
, hf_rtp_hdr_ed137_ft_value
, tvb
, hdrext_offset
, 4, ENC_NA
);
660 /* Shift behind header */
662 hdr_extension_len
-= 4;
665 /* Extended information is not used */
666 if ( rtp_hext_tree
) {
667 proto_tree_add_item( rtp_hext_tree3
, hf_rtp_hdr_ed137_x_nu
, tvb
, hdrext_offset
, 4, ENC_BIG_ENDIAN
);
670 /* Shift behind empty additional feature header */
672 hdr_extension_len
-= 4;
676 return tvb_captured_length(tvb
);
680 #define NSTIME_INIT_USEC(nstime, usecs) \
681 nstime.secs = usecs / 1000000; \
682 nstime.nsecs = (usecs % 1000000) * 1000;
684 /* Decodes and calculates relative/absolute time item */
685 static void process_time_value(packet_info
*pinfo
, tvbuff_t
*tvb
, proto_tree
*tree
, int time_item
, unsigned int hdrext_offset
, bool time_relative _U_
, unsigned int time_value
)
687 /* Note: even there is relative/absolute flag, value is shown same way because it is relative value derived from relative/absolute start point */
688 unsigned int time_calc
;
692 /* Value is stored as count of 125 us ticks */
693 time_calc
= time_value
* 125;
694 NSTIME_INIT_USEC(tmp_time
, time_calc
);
695 tmp
= rel_time_to_secs_str(pinfo
->pool
, &tmp_time
);
697 proto_tree_add_uint_format_value( tree
, time_item
, tvb
, hdrext_offset
, 3, time_value
, "%s s", tmp
);
700 /* Decodes and calculates value based on 125us tick*/
701 static void process_125us_based_value(tvbuff_t
*tvb
, proto_tree
*tree
, int value_item
, unsigned int hdrext_offset
)
706 /* Values is stored as count of 125 us ticks */
707 value
= tvb_get_ntohs( tvb
, hdrext_offset
);
708 value_calc
= value
* 125;
710 proto_tree_add_uint_format_value( tree
, value_item
, tvb
, hdrext_offset
, 2, value
, "%d us", value_calc
);
714 dissect_rtp_hdr_ext_ed137a_feature_sqi(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
718 uint32_t sqi_qidx_ml
;
721 ext_value
= tvb_get_uint8( tvb
, 0 );
722 sqi_qidx
= RTP_ED137A_feature_sqi_qidx(ext_value
);
723 sqi_qidx_ml
= RTP_ED137A_feature_sqi_qidx_ml(ext_value
);
724 if (RTP_ED137A_feature_sqi_qidx_ml_rssi
== sqi_qidx_ml
) {
725 /* Special handling for RSSI method */
726 if (sqi_qidx
<= RTP_ED137A_feature_sqi_qidx_rssi_max
) {
728 proto_tree_add_item( tree
, hf_rtp_hdr_ed137a_ft_sqi_rssi_qidx
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
731 /* Handle as other method */
732 it
= proto_tree_add_item( tree
, hf_rtp_hdr_ed137a_ft_sqi_qidx
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
733 expert_add_info_format(pinfo
, it
, &ei_rtp_hdr_ed137_ft_sqi_rssi_out_of_range
, "RSSI index out of range");
737 /* Other SQI method handling */
738 proto_tree_add_item( tree
, hf_rtp_hdr_ed137a_ft_sqi_qidx
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
740 proto_tree_add_item( tree
, hf_rtp_hdr_ed137a_ft_sqi_qidx_ml
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
743 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", SQI=%u", sqi_qidx
);
746 col_append_str(pinfo
->cinfo
, COL_INFO
, ", SQI N/A");
749 return tvb_captured_length(tvb
);
753 dissect_rtp_hdr_ext_ed137a_feature_climax_tdly(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
756 uint32_t climax_tdly_mode
;
757 uint32_t climax_tdly_value
;
758 uint32_t climax_tdly_value_calc
;
760 ext_value
= tvb_get_uint8( tvb
, 0 );
762 climax_tdly_mode
= RTP_ED137A_feature_climax_tdly_mode(ext_value
);
763 climax_tdly_value
= RTP_ED137A_feature_climax_tdly_value(ext_value
);
765 proto_tree_add_item( tree
, hf_rtp_hdr_ed137a_ft_climax_delay_mode
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
766 if (RTP_ED137A_feature_climax_tdly_mode_relative
== climax_tdly_mode
) {
767 /* Relative delay, in 2ms steps */
768 climax_tdly_value_calc
=2*climax_tdly_value
;
770 proto_tree_add_uint_format_value( tree
, hf_rtp_hdr_ed137a_ft_climax_delay_relative_value
, tvb
, 0, 1, climax_tdly_value
, "%d ms", climax_tdly_value_calc
);
771 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", CMX=%ums rel", climax_tdly_value_calc
);
775 /* Absolute delay, in 2ms steps */
776 climax_tdly_value_calc
=2*climax_tdly_value
;
778 proto_tree_add_uint_format_value( tree
, hf_rtp_hdr_ed137a_ft_climax_delay_absolute_value
, tvb
, 0, 1, climax_tdly_value
, "%d ms", climax_tdly_value_calc
);
779 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", CMX=%ums abs", climax_tdly_value_calc
);
783 return tvb_captured_length(tvb
);
787 dissect_rtp_hdr_ext_ed137b_feature_rrc_single(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
791 /* Generated item points really to previous byte */
792 item
= proto_tree_add_item( tree
, hf_rtp_hdr_ed137b_ft_rrc_single
, tvb
, -1, 1, ENC_NA
);
793 proto_item_set_generated(item
);
795 proto_tree_add_item( tree
, hf_rtp_hdr_ed137b_ft_rrc_single_ms_tx_f1
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
796 proto_tree_add_item( tree
, hf_rtp_hdr_ed137b_ft_rrc_single_ms_rx_f1
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
797 proto_tree_add_item( tree
, hf_rtp_hdr_ed137b_ft_rrc_single_ms_tx_f2
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
798 proto_tree_add_item( tree
, hf_rtp_hdr_ed137b_ft_rrc_single_ms_rx_f2
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
799 proto_tree_add_item( tree
, hf_rtp_hdr_ed137b_ft_rrc_single_sel_tx_f1
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
800 proto_tree_add_item( tree
, hf_rtp_hdr_ed137b_ft_rrc_single_sel_tx_f2
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
801 proto_tree_add_item( tree
, hf_rtp_hdr_ed137b_ft_rrc_single_mu_rx_f1
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
802 proto_tree_add_item( tree
, hf_rtp_hdr_ed137b_ft_rrc_single_mu_rx_f2
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
804 col_append_str(pinfo
->cinfo
, COL_INFO
, ", RRC");
806 return tvb_captured_length(tvb
);
809 /* ======================================================================= */
811 Note: We are tracking conversations via the T1 key as response shall contain a copy of this field
813 static ed137rmm_transaction_t
*transaction_start(packet_info
* pinfo
,
816 uint8_t time_quality_vcs
)
818 conversation_t
*conversation
;
819 ed137_conv_info_t
*ed137_info
;
820 ed137rmm_transaction_t
*ed137rmm_trans
;
821 wmem_tree_key_t ed137rmm_key
[3];
824 /* Handle the conversation tracking */
825 conversation
= find_or_create_conversation(pinfo
);
826 ed137_info
= (ed137_conv_info_t
*)conversation_get_proto_data(conversation
, proto_rtp_ed137
);
827 if (ed137_info
== NULL
) {
828 ed137_info
= wmem_new(wmem_file_scope(), ed137_conv_info_t
);
829 ed137_info
->unmatched_pdus
= wmem_tree_new(wmem_file_scope());
830 ed137_info
->matched_pdus
= wmem_tree_new(wmem_file_scope());
831 conversation_add_proto_data(conversation
, proto_rtp_ed137
,
835 if (!PINFO_FD_VISITED(pinfo
)) {
836 /* this is a new request, create a new transaction structure and map it to the
839 ed137rmm_key
[0].length
= 1;
840 ed137rmm_key
[0].key
= key
;
841 ed137rmm_key
[1].length
= 0;
842 ed137rmm_key
[1].key
= NULL
;
844 ed137rmm_trans
= wmem_new(wmem_file_scope(), ed137rmm_transaction_t
);
845 ed137rmm_trans
->rqst_frame
= pinfo
->num
;
846 ed137rmm_trans
->resp_frame
= 0;
847 ed137rmm_trans
->rqst_time
= pinfo
->abs_ts
;
848 ed137rmm_trans
->time_quality
= time_quality_vcs
;
849 nstime_set_zero(&ed137rmm_trans
->resp_time
);
850 wmem_tree_insert32_array(ed137_info
->unmatched_pdus
, ed137rmm_key
,
851 (void *) ed137rmm_trans
);
853 /* Already visited this frame */
854 uint32_t frame_num
= pinfo
->num
;
856 ed137rmm_key
[0].length
= 1;
857 ed137rmm_key
[0].key
= key
;
858 ed137rmm_key
[1].length
= 1;
859 ed137rmm_key
[1].key
= &frame_num
;
860 ed137rmm_key
[2].length
= 0;
861 ed137rmm_key
[2].key
= NULL
;
864 (ed137rmm_transaction_t
*)wmem_tree_lookup32_array(ed137_info
->matched_pdus
,
867 if (ed137rmm_trans
== NULL
) {
868 if (PINFO_FD_VISITED(pinfo
)) {
869 /* No response found - add field and expert info */
870 it
= proto_tree_add_item(tree
, hf_rtp_hdr_ed137_ft_climax_ddc_rmm_no_resp
, NULL
, 0, 0,
872 proto_item_set_generated(it
);
874 col_append_str(pinfo
->cinfo
, COL_INFO
, ", RMM (no response found!)");
877 expert_add_info_format(pinfo
, it
, &ei_rtp_hdr_ed137_ft_climax_ddc_rmm_resp_not_found
,
878 "No response seen to RMM request");
884 /* Print state tracking in the tree */
885 if (ed137rmm_trans
->resp_frame
) {
886 it
= proto_tree_add_uint(tree
, hf_rtp_hdr_ed137_ft_climax_ddc_rmm_response_in
, NULL
, 0, 0,
887 ed137rmm_trans
->resp_frame
);
888 proto_item_set_generated(it
);
890 col_append_frame_number(pinfo
, COL_INFO
, ", RMM (reply in %u)",
891 ed137rmm_trans
->resp_frame
);
894 return ed137rmm_trans
;
896 } /* transaction_start() */
898 /* ======================================================================= */
899 static ed137rmm_transaction_t
*transaction_end(packet_info
* pinfo
,
902 uint8_t time_quality_grs
,
907 conversation_t
*conversation
;
908 ed137_conv_info_t
*ed137_info
;
909 ed137rmm_transaction_t
*ed137rmm_trans
;
910 wmem_tree_key_t ed137rmm_key
[3];
916 find_conversation_pinfo(pinfo
,0);
917 if (conversation
== NULL
) {
921 ed137_info
= (ed137_conv_info_t
*)conversation_get_proto_data(conversation
, proto_rtp_ed137
);
922 if (ed137_info
== NULL
) {
926 if (!PINFO_FD_VISITED(pinfo
)) {
929 ed137rmm_key
[0].length
= 1;
930 ed137rmm_key
[0].key
= key
;
931 ed137rmm_key
[1].length
= 0;
932 ed137rmm_key
[1].key
= NULL
;
934 (ed137rmm_transaction_t
*)wmem_tree_lookup32_array(ed137_info
->unmatched_pdus
,
936 if (ed137rmm_trans
== NULL
) {
940 /* we have already seen this response, or an identical one */
941 if (ed137rmm_trans
->resp_frame
!= 0) {
945 ed137rmm_trans
->resp_frame
= pinfo
->num
;
946 ed137rmm_trans
->time_quality
|= time_quality_grs
<<1;
948 /* we found a match. Add entries to the matched table for both request and reply frames
950 ed137rmm_key
[0].length
= 1;
951 ed137rmm_key
[0].key
= key
;
952 ed137rmm_key
[1].length
= 1;
953 ed137rmm_key
[1].key
= &frame_num
;
954 ed137rmm_key
[2].length
= 0;
955 ed137rmm_key
[2].key
= NULL
;
957 frame_num
= ed137rmm_trans
->rqst_frame
;
958 wmem_tree_insert32_array(ed137_info
->matched_pdus
, ed137rmm_key
,
959 (void *) ed137rmm_trans
);
961 frame_num
= ed137rmm_trans
->resp_frame
;
962 wmem_tree_insert32_array(ed137_info
->matched_pdus
, ed137rmm_key
,
963 (void *) ed137rmm_trans
);
965 /* Already visited this frame */
966 uint32_t frame_num
= pinfo
->num
;
968 ed137rmm_key
[0].length
= 1;
969 ed137rmm_key
[0].key
= key
;
970 ed137rmm_key
[1].length
= 1;
971 ed137rmm_key
[1].key
= &frame_num
;
972 ed137rmm_key
[2].length
= 0;
973 ed137rmm_key
[2].key
= NULL
;
976 (ed137rmm_transaction_t
*)wmem_tree_lookup32_array(ed137_info
->matched_pdus
,
979 if (ed137rmm_trans
== NULL
) {
985 it
= proto_tree_add_uint(tree
, hf_rtp_hdr_ed137_ft_climax_ddc_mam_request_in
, NULL
, 0, 0,
986 ed137rmm_trans
->rqst_frame
);
987 proto_item_set_generated(it
);
989 nstime_delta(&ns
, &pinfo
->abs_ts
, &ed137rmm_trans
->rqst_time
);
990 ed137rmm_trans
->resp_time
= ns
;
991 resp_time
= nstime_to_msec(&ns
);
992 it
= proto_tree_add_double_format_value(tree
, hf_rtp_hdr_ed137_ft_climax_ddc_mam_time
,
993 NULL
, 0, 0, resp_time
,
994 "%.3f ms", resp_time
);
995 proto_item_set_generated(it
);
997 if (ed137rmm_trans
->time_quality
== 3) {
998 // All sync, delta t is accurate, add internal delta t, multiply by 0.125
999 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", MAM=%.3f ms",(double)(delta_t
+internal_t
)*0.125); // 125 us ticks
1002 // No sync, estimated delay only. Formula is delta t = (T4-T1-tsd)/2 where T4 is the local time at which the VCS endpoint receives the MAM message.
1003 // We have T1 but NOT T4, so we use the frame capture time and delta t = resp_time in this case.
1004 // TODO Test whether resp_time + 2 * (t(RMM)-T1) is accurate.
1005 // resp_time is in msec, while tsd and internal_t are 125 usec ticks!
1006 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", MAM>%.3f ms",(resp_time
- (tsd
*0.125)) / 2 + internal_t
*0.125);
1009 col_append_frame_number(pinfo
, COL_INFO
, " (request in %u)",
1010 ed137rmm_trans
->rqst_frame
);
1012 return ed137rmm_trans
;
1014 } /* transaction_end() */
1017 dissect_rtp_hdr_ext_ed137b_feature_climax_ddc_rmm(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
1021 uint32_t climax_ddc_rmm_tqv
;
1022 uint32_t climax_ddc_rmm_t1
;
1024 /* Generated item points really to previous byte */
1025 item
= proto_tree_add_item( tree
, hf_rtp_hdr_ed137b_ft_climax_ddc_rmm
, tvb
, -1, 1, ENC_NA
);
1026 proto_item_set_generated(item
);
1028 ext_value
= tvb_get_ntoh24( tvb
, 0 );
1029 climax_ddc_rmm_tqv
= RTP_ED137B_feature_climax_ddc_rmm_tqv(ext_value
);
1030 climax_ddc_rmm_t1
= RTP_ED137B_feature_climax_ddc_rmm_t1(ext_value
);
1032 proto_tree_add_item( tree
, hf_rtp_hdr_ed137b_ft_climax_ddc_rmm_tqv
, tvb
, 0, 3, ENC_BIG_ENDIAN
);
1033 process_time_value(pinfo
, tvb
, tree
, hf_rtp_hdr_ed137b_ft_climax_ddc_rmm_t1
, 0, (RTP_ED137B_feature_climax_ddc_rmm_tqv_relative
== climax_ddc_rmm_tqv
), climax_ddc_rmm_t1
);
1035 transaction_start(pinfo
,tree
,&climax_ddc_rmm_t1
,climax_ddc_rmm_tqv
);
1037 return tvb_captured_length(tvb
);
1041 dissect_rtp_hdr_ext_ed137b_feature_climax_ddc_mam(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
1045 uint32_t climax_ddc_mam_tqg
;
1046 uint32_t climax_ddc_mam_t1
;
1047 uint32_t climax_ddc_mam_t2
;
1049 /* Generated item points really to previous byte */
1050 item
= proto_tree_add_item( tree
, hf_rtp_hdr_ed137b_ft_climax_ddc_mam
, tvb
, -1, 1, ENC_NA
);
1051 proto_item_set_generated(item
);
1053 ext_value
= tvb_get_ntoh24( tvb
, 0 + 0 );
1054 climax_ddc_mam_tqg
= RTP_ED137B_feature_climax_ddc_mam_tqg(ext_value
);
1055 climax_ddc_mam_t1
= RTP_ED137B_feature_climax_ddc_mam_t1(ext_value
);
1057 proto_tree_add_item( tree
, hf_rtp_hdr_ed137b_ft_climax_ddc_mam_tqg
, tvb
, 0, 3, ENC_BIG_ENDIAN
);
1058 process_time_value(pinfo
, tvb
, tree
, hf_rtp_hdr_ed137b_ft_climax_ddc_mam_t1
, 0, (RTP_ED137B_feature_climax_ddc_mam_tqg_relative
== climax_ddc_mam_tqg
), climax_ddc_mam_t1
);
1060 ext_value
= tvb_get_ntoh24( tvb
, 0 + 3 );
1061 climax_ddc_mam_t2
= RTP_ED137B_feature_climax_ddc_mam_t2(ext_value
);
1063 if (RTP_ED137B_feature_climax_ddc_mam_nmr(ext_value
)) {
1064 col_append_str(pinfo
->cinfo
, COL_INFO
, ", NMR");
1067 proto_tree_add_item( tree
, hf_rtp_hdr_ed137b_ft_climax_ddc_mam_nmr
, tvb
, 0 + 3, 3, ENC_BIG_ENDIAN
);
1068 process_time_value(pinfo
, tvb
, tree
, hf_rtp_hdr_ed137b_ft_climax_ddc_mam_t2
, 0 + 3, (RTP_ED137B_feature_climax_ddc_mam_tqg_relative
== climax_ddc_mam_tqg
), climax_ddc_mam_t2
);
1070 process_125us_based_value( tvb
, tree
, hf_rtp_hdr_ed137b_ft_climax_ddc_mam_tsd
, 0 + 6);
1071 process_125us_based_value( tvb
, tree
, hf_rtp_hdr_ed137b_ft_climax_ddc_mam_tj1
, 0 + 8);
1072 process_125us_based_value( tvb
, tree
, hf_rtp_hdr_ed137b_ft_climax_ddc_mam_tid
, 0 + 10);
1074 if (climax_ddc_mam_t2
< climax_ddc_mam_t1
) {
1075 climax_ddc_mam_t2
+= 0x800000; // t1 and t2 are 23 bits long
1077 transaction_end(pinfo
,tree
,&climax_ddc_mam_t1
,climax_ddc_mam_tqg
,climax_ddc_mam_t2
-climax_ddc_mam_t1
,tvb_get_ntohs( tvb
, 0+6 ),tvb_get_ntohs( tvb
, 0+8 ) + tvb_get_ntohs( tvb
, 0+10 ));
1079 return tvb_captured_length(tvb
);
1083 dissect_rtp_hdr_ext_ed137c_feature_climax_ddc_mam(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
1087 uint32_t climax_ddc_mam_tqg
;
1088 uint32_t climax_ddc_mam_t1
;
1089 uint32_t climax_ddc_mam_t2
;
1091 /* Generated item points really to previous byte */
1092 item
= proto_tree_add_item( tree
, hf_rtp_hdr_ed137c_ft_climax_ddc_mam
, tvb
, -1, 1, ENC_NA
);
1093 proto_item_set_generated(item
);
1095 ext_value
= tvb_get_ntoh24( tvb
, 0 + 0 );
1096 climax_ddc_mam_tqg
= RTP_ED137C_feature_climax_ddc_mam_tqg(ext_value
);
1097 climax_ddc_mam_t1
= RTP_ED137C_feature_climax_ddc_mam_t1(ext_value
);
1099 proto_tree_add_item( tree
, hf_rtp_hdr_ed137c_ft_climax_ddc_mam_tqg
, tvb
, 0, 3, ENC_BIG_ENDIAN
);
1100 process_time_value(pinfo
, tvb
, tree
, hf_rtp_hdr_ed137c_ft_climax_ddc_mam_t1
, 0, (RTP_ED137C_feature_climax_ddc_mam_tqg_relative
== climax_ddc_mam_tqg
), climax_ddc_mam_t1
);
1102 ext_value
= tvb_get_ntoh24( tvb
, 0 + 3 );
1103 climax_ddc_mam_t2
= RTP_ED137C_feature_climax_ddc_mam_t2(ext_value
);
1105 if (RTP_ED137B_feature_climax_ddc_mam_nmr(ext_value
)) {
1106 // New measurement request is sent in case of some unexpected event requiring a new measurement
1107 col_append_str(pinfo
->cinfo
, COL_INFO
, ", NMR");
1110 proto_tree_add_item( tree
, hf_rtp_hdr_ed137c_ft_climax_ddc_mam_nmr
, tvb
, 0 + 3, 3, ENC_BIG_ENDIAN
);
1111 process_time_value(pinfo
, tvb
, tree
, hf_rtp_hdr_ed137c_ft_climax_ddc_mam_t2
, 0 + 3, (RTP_ED137C_feature_climax_ddc_mam_tqg_relative
== climax_ddc_mam_tqg
), climax_ddc_mam_t2
);
1113 process_125us_based_value( tvb
, tree
, hf_rtp_hdr_ed137c_ft_climax_ddc_mam_tsd
, 0 + 6);
1114 process_125us_based_value( tvb
, tree
, hf_rtp_hdr_ed137c_ft_climax_ddc_mam_tj1
, 0 + 8);
1115 process_125us_based_value( tvb
, tree
, hf_rtp_hdr_ed137c_ft_climax_ddc_mam_tid
, 0 + 10);
1116 process_125us_based_value( tvb
, tree
, hf_rtp_hdr_ed137c_ft_climax_ddc_mam_ts2
, 0 + 12);
1118 if (climax_ddc_mam_t2
< climax_ddc_mam_t1
) {
1119 climax_ddc_mam_t2
+= 0x800000; // t1 and t2 are 23 bits long
1121 transaction_end(pinfo
,tree
,&climax_ddc_mam_t1
,climax_ddc_mam_tqg
,climax_ddc_mam_t2
-climax_ddc_mam_t1
,tvb_get_ntohs( tvb
, 0+6 ),tvb_get_ntohs( tvb
, 0+8 ) + tvb_get_ntohs( tvb
, 0+10 ));
1123 return tvb_captured_length(tvb
);
1126 /* Decode ED-137A fixed part and call dissectors for variable part */
1128 dissect_rtp_hdr_ext_ed137a(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data
)
1130 uint32_t hdr_extension_len
;
1131 struct _rtp_info
*rtp_info
=(struct _rtp_info
*)data
;
1132 proto_tree
*rtp_hext_tree
= NULL
;
1133 uint32_t hdrext_offset
= 0;
1134 bool ed137_ptt
= false;
1135 bool ed137_squ
= false;
1137 hdr_extension_len
= tvb_reported_length(tvb
);
1139 if ( hdr_extension_len
> 0 ) {
1141 proto_tree
*rtp_hext_tree2
;
1142 uint32_t ext_value
= tvb_get_ntohs( tvb
, hdrext_offset
);
1144 if (rtp_info
!= NULL
) {
1145 rtp_info
->info_is_ed137
= true;
1149 ti
= proto_tree_add_item(tree
, hf_rtp_hdr_ed137s
, tvb
, 0, hdr_extension_len
, ENC_NA
);
1150 rtp_hext_tree
= proto_item_add_subtree( ti
, ett_hdr_ext_ed137s
);
1153 if (RTP_ED137A_ptt_mask(ext_value
)) {
1154 col_append_str(pinfo
->cinfo
, COL_INFO
, ", PTT");
1157 if (RTP_ED137A_squ_mask(ext_value
)) {
1158 col_append_str(pinfo
->cinfo
, COL_INFO
, ", SQU");
1162 /* Map PTT/SQU bits to string */
1163 if (rtp_info
!= NULL
) {
1166 rtp_info
->info_ed137_info
= ed137_ptt_and_squ
;
1168 rtp_info
->info_ed137_info
= ed137_ptt_only
;
1172 rtp_info
->info_ed137_info
= ed137_squ_only
;
1174 rtp_info
->info_ed137_info
= NULL
;
1179 if ( rtp_hext_tree
) {
1180 ti2
= proto_tree_add_item(rtp_hext_tree
, hf_rtp_hdr_ed137a
, tvb
, hdrext_offset
, 2, ENC_NA
);
1181 rtp_hext_tree2
= proto_item_add_subtree( ti2
, ett_hdr_ext_ed137a
);
1183 /* There are multiple formats of header - depends on direction of a flow. As it is not possible to quess flow direction, we use items from RTPRx because unused fields are empty in other formats */
1184 proto_tree_add_item( rtp_hext_tree2
, hf_rtp_hdr_ed137a_ptt_type
, tvb
, hdrext_offset
, 2, ENC_BIG_ENDIAN
);
1185 proto_tree_add_item( rtp_hext_tree2
, hf_rtp_hdr_ed137a_squ
, tvb
, hdrext_offset
, 2, ENC_BIG_ENDIAN
);
1186 proto_tree_add_item( rtp_hext_tree2
, hf_rtp_hdr_ed137a_ptt_id
, tvb
, hdrext_offset
, 2, ENC_BIG_ENDIAN
);
1187 proto_tree_add_item( rtp_hext_tree2
, hf_rtp_hdr_ed137a_pm
, tvb
, hdrext_offset
, 2, ENC_BIG_ENDIAN
);
1188 proto_tree_add_item( rtp_hext_tree2
, hf_rtp_hdr_ed137a_ptts
, tvb
, hdrext_offset
, 2, ENC_BIG_ENDIAN
);
1189 proto_tree_add_item( rtp_hext_tree2
, hf_rtp_hdr_ed137a_sct
, tvb
, hdrext_offset
, 2, ENC_BIG_ENDIAN
);
1190 proto_tree_add_item( rtp_hext_tree2
, hf_rtp_hdr_ed137a_reserved
, tvb
, hdrext_offset
, 2, ENC_BIG_ENDIAN
);
1191 proto_tree_add_item( rtp_hext_tree2
, hf_rtp_hdr_ed137a_x
, tvb
, hdrext_offset
, 2, ENC_BIG_ENDIAN
);
1194 /* Shift behind standard ED-137A header */
1196 hdr_extension_len
-= 2;
1198 /* Do we have additional feature blocks? */
1199 if (RTP_ED137A_extended_information(ext_value
)) {
1201 /* Loop over all additional feature blocks */
1202 /* The shortest header length is 2, anything shorter is padding */
1203 while ( hdr_extension_len
>= 2 ) {
1205 proto_tree
*rtp_hext_tree3
;
1209 ext_value
= tvb_get_ntohs( tvb
, hdrext_offset
);
1210 ft_type
= RTP_ED137A_feature_type(ext_value
);
1211 ft_len
= RTP_ED137A_feature_length(ext_value
);
1213 /* Is it header or padding? */
1214 if ( RTP_ED137_feature_none_type
!= ft_type
) {
1215 ti3
= proto_tree_add_item(rtp_hext_tree
, hf_rtp_hdr_ed137a_add
, tvb
, hdrext_offset
, (ft_len
> 0 ? ft_len
+ 1 : 2), ENC_NA
);
1216 rtp_hext_tree3
= proto_item_add_subtree( ti3
, ett_hdr_ext_ed137a_add
);
1218 if ( rtp_hext_tree
) {
1219 proto_tree_add_item( rtp_hext_tree3
, hf_rtp_hdr_ed137a_ft_type
, tvb
, hdrext_offset
, 1, ENC_BIG_ENDIAN
);
1220 proto_tree_add_item( rtp_hext_tree3
, hf_rtp_hdr_ed137a_ft_len
, tvb
, hdrext_offset
, 1, ENC_BIG_ENDIAN
);
1223 /* Shift behind feature header */
1225 hdr_extension_len
-= 1;
1228 uint32_t ft_table_key
;
1230 /* join 4 bit type and 4 bit length to 8 bit key */
1231 ft_table_key
= MAKE_KEY( ft_type
, ft_len
);
1233 /* pass interpretation of header extension to a registered subdissector */
1234 /* new subset points to value (starts behind type/length pair) */
1235 newtvb
= tvb_new_subset_length(tvb
, hdrext_offset
, hdr_extension_len
);
1237 /* try to find a dissector by type/len key and dissect additional feature header */
1238 if ( !(dissector_try_uint(rtp_hdr_ext_ed137a_add_features_table
, ft_table_key
, newtvb
, pinfo
, rtp_hext_tree3
)) ) {
1239 proto_tree_add_item( rtp_hext_tree3
, hf_rtp_hdr_ed137a_ft_value
, tvb
, hdrext_offset
, ft_len
, ENC_NA
);
1242 /* Shift behind feature data */
1243 hdrext_offset
+= ft_len
;
1244 hdr_extension_len
-= ft_len
;
1247 /* Padding, exit while loop */
1253 /* Process padding if any */
1254 uint32_t hdr_extension_padding
;
1256 hdr_extension_padding
= hdr_extension_len
& 0x03;
1258 /* Calculate padding size */
1259 if ( hdr_extension_padding
> 0 ) {
1260 if ( rtp_hext_tree
) {
1261 proto_tree_add_item( rtp_hext_tree
, hf_rtp_hdr_ed137a_ft_padding
, tvb
, hdrext_offset
, hdr_extension_padding
, ENC_NA
);
1267 /* Extended information is not used */
1268 if ( rtp_hext_tree
) {
1270 proto_tree
*rtp_hext_tree3
;
1272 ti3
= proto_tree_add_item(rtp_hext_tree
, hf_rtp_hdr_ed137a_add
, tvb
, hdrext_offset
, 2, ENC_NA
);
1273 rtp_hext_tree3
= proto_item_add_subtree( ti3
, ett_hdr_ext_ed137a_add
);
1274 proto_tree_add_item( rtp_hext_tree3
, hf_rtp_hdr_ed137a_x_nu
, tvb
, hdrext_offset
, 2, ENC_BIG_ENDIAN
);
1278 return tvb_captured_length(tvb
);
1281 /* Register RTP ED-137 */
1283 proto_register_rtp_ed137(void)
1285 static hf_register_info hf
[] =
1287 /* ED-137 and ED-137A common structures */
1300 /* ED-137 only structures */
1314 &hf_rtp_hdr_ed137_add
,
1316 "ED137 extension additional feature",
1326 &hf_rtp_hdr_ed137_ptt_type
,
1329 "rtp.ext.ed137.ptt_type",
1332 VALS(rtp_ext_ed137_ptt_type
),
1338 &hf_rtp_hdr_ed137_squ
,
1341 "rtp.ext.ed137.squ",
1344 VALS(rtp_ext_ed137_squ
),
1350 &hf_rtp_hdr_ed137_ptt_id
,
1353 "rtp.ext.ed137.ptt_id",
1362 &hf_rtp_hdr_ed137_sct
,
1364 "Simultaneous Call Transmissions",
1365 "rtp.ext.ed137.sct",
1374 &hf_rtp_hdr_ed137_x
,
1380 VALS(rtp_ext_ed137_x
),
1386 &hf_rtp_hdr_ed137_x_nu
,
1389 "rtp.ext.ed137.x-nu",
1398 &hf_rtp_hdr_ed137_ft_type
,
1401 "rtp.ext.ed137.ft.type",
1404 VALS(rtp_ext_ed137_ft_type
),
1410 &hf_rtp_hdr_ed137_ft_len
,
1413 "rtp.ext.ed137.ft.len",
1422 &hf_rtp_hdr_ed137_ft_value
,
1425 "rtp.ext.ed137.ft.value",
1434 &hf_rtp_hdr_ed137_vf
,
1440 VALS(rtp_ext_ed137_vf
),
1446 &hf_rtp_hdr_ed137_ft_bss_qidx
,
1448 "BSS Quality Index",
1449 "rtp.ext.ed137.ft.bss.qidx",
1458 &hf_rtp_hdr_ed137_ft_bss_rssi_qidx
,
1460 "BSS Quality Index",
1461 "rtp.ext.ed137.ft.bss.qidx",
1464 VALS(rtp_ext_ed137_ft_bss_rssi_qidx
),
1470 &hf_rtp_hdr_ed137_ft_bss_qidx_ml
,
1472 "BSS Quality Index Method",
1473 "rtp.ext.ed137.ft.bss.qidx-ml",
1476 VALS(rtp_ext_ed137_ft_bss_qidx_ml
),
1482 &hf_rtp_hdr_ed137_ft_climax_delay_value
,
1484 "CLIMAX-Time Delay",
1485 "rtp.ext.ed137.ft.climax_delay.value",
1493 /* ED-137A/B only structures */
1507 &hf_rtp_hdr_ed137a_add
,
1509 "ED137A extension additional feature",
1510 "rtp.ext.ed137a.ft",
1519 &hf_rtp_hdr_ed137a_ptt_type
,
1522 "rtp.ext.ed137a.ptt_type",
1525 VALS(rtp_ext_ed137a_ptt_type
),
1531 &hf_rtp_hdr_ed137a_squ
,
1534 "rtp.ext.ed137a.squ",
1537 VALS(rtp_ext_ed137a_squ
),
1543 &hf_rtp_hdr_ed137a_ptt_id
,
1546 "rtp.ext.ed137a.ptt_id",
1555 &hf_rtp_hdr_ed137a_pm
,
1558 "rtp.ext.ed137a.pm",
1567 &hf_rtp_hdr_ed137a_ptts
,
1570 "rtp.ext.ed137a.ptts",
1579 &hf_rtp_hdr_ed137a_sct
,
1581 "Simultaneous Call Transmissions",
1582 "rtp.ext.ed137a.sct",
1591 &hf_rtp_hdr_ed137a_reserved
,
1594 "rtp.ext.ed137a.reserved",
1603 &hf_rtp_hdr_ed137a_x
,
1609 VALS(rtp_ext_ed137_x
),
1615 &hf_rtp_hdr_ed137a_x_nu
,
1618 "rtp.ext.ed137a.x-nu",
1627 &hf_rtp_hdr_ed137a_ft_type
,
1630 "rtp.ext.ed137a.ft.type",
1633 VALS(rtp_ext_ed137a_ft_type
),
1639 &hf_rtp_hdr_ed137a_ft_len
,
1642 "rtp.ext.ed137a.ft.len",
1651 &hf_rtp_hdr_ed137a_ft_value
,
1654 "rtp.ext.ed137a.ft.value",
1663 &hf_rtp_hdr_ed137a_ft_padding
,
1666 "rtp.ext.ed137a.ft.padding",
1675 &hf_rtp_hdr_ed137a_ft_sqi_qidx
,
1677 "SQI Quality Index",
1678 "rtp.ext.ed137a.ft.sqi.qidx",
1687 &hf_rtp_hdr_ed137a_ft_sqi_rssi_qidx
,
1689 "SQI Quality Index",
1690 "rtp.ext.ed137a.ft.sqi.qidx",
1693 VALS(rtp_ext_ed137a_ft_sqi_rssi_qidx
),
1699 &hf_rtp_hdr_ed137a_ft_sqi_qidx_ml
,
1701 "SQI Quality Index Method",
1702 "rtp.ext.ed137a.ft.sqi.qidx-ml",
1705 VALS(rtp_ext_ed137a_ft_sqi_qidx_ml
),
1711 &hf_rtp_hdr_ed137a_ft_climax_delay_mode
,
1713 "CLIMAX-Time Delay Mode",
1714 "rtp.ext.ed137a.ft.climax_delay.mode",
1717 VALS(rtp_ext_ed137a_ft_climax_delay_mode
),
1723 &hf_rtp_hdr_ed137a_ft_climax_delay_relative_value
,
1725 "CLIMAX-Time Delay Relative",
1726 "rtp.ext.ed137a.ft.climax_delay.relative_value",
1735 &hf_rtp_hdr_ed137a_ft_climax_delay_absolute_value
,
1737 "CLIMAX-Time Delay Absolute",
1738 "rtp.ext.ed137a.ft.climax_delay.absolute_value",
1747 &hf_rtp_hdr_ed137b_ft_rrc_single
,
1749 "RRC for single frequency",
1750 "rtp.ext.ed137b.ft.rrc.single",
1759 &hf_rtp_hdr_ed137b_ft_rrc_single_ms_tx_f1
,
1762 "rtp.ext.ed137b.ft.rrc.mstxf1",
1765 VALS(rtp_ext_ed137b_ft_single_ms_tx_f1
),
1771 &hf_rtp_hdr_ed137b_ft_rrc_single_ms_rx_f1
,
1774 "rtp.ext.ed137b.ft.rrc.msrxf1",
1777 VALS(rtp_ext_ed137b_ft_single_ms_rx_f1
),
1783 &hf_rtp_hdr_ed137b_ft_rrc_single_ms_tx_f2
,
1786 "rtp.ext.ed137b.ft.rrc.mstxf2",
1789 VALS(rtp_ext_ed137b_ft_single_ms_tx_f2
),
1795 &hf_rtp_hdr_ed137b_ft_rrc_single_ms_rx_f2
,
1798 "rtp.ext.ed137b.ft.rrc.msrxf2",
1801 VALS(rtp_ext_ed137b_ft_single_ms_rx_f2
),
1807 &hf_rtp_hdr_ed137b_ft_rrc_single_sel_tx_f1
,
1810 "rtp.ext.ed137b.ft.rrc.seltxf1",
1813 VALS(rtp_ext_ed137b_ft_single_sel_tx_f1
),
1819 &hf_rtp_hdr_ed137b_ft_rrc_single_sel_tx_f2
,
1822 "rtp.ext.ed137b.ft.rrc.seltxf2",
1825 VALS(rtp_ext_ed137b_ft_single_sel_tx_f2
),
1831 &hf_rtp_hdr_ed137b_ft_rrc_single_mu_rx_f1
,
1834 "rtp.ext.ed137b.ft.rrc.murxf1",
1837 VALS(rtp_ext_ed137b_ft_single_mu_rx_f1
),
1843 &hf_rtp_hdr_ed137b_ft_rrc_single_mu_rx_f2
,
1846 "rtp.ext.ed137b.ft.rrc.murxf2",
1849 VALS(rtp_ext_ed137b_ft_single_mu_rx_f2
),
1855 &hf_rtp_hdr_ed137b_ft_climax_ddc_rmm
,
1857 "CLIMAX Dynamic Delay Compensation RMM Request",
1858 "rtp.ext.ed137b.ft.climax_ddc.rmm",
1867 &hf_rtp_hdr_ed137b_ft_climax_ddc_rmm_tqv
,
1870 "rtp.ext.ed137b.ft.climax_ddc.rmm_tqv",
1873 VALS(rtp_ext_ed137b_ft_climax_ddc_time_quality
),
1879 &hf_rtp_hdr_ed137b_ft_climax_ddc_rmm_t1
,
1882 "rtp.ext.ed137b.ft.climax_ddc.rmm_t1",
1891 &hf_rtp_hdr_ed137b_ft_climax_ddc_mam
,
1893 "CLIMAX Dynamic Delay Compensation MAM Response (ED-137B)",
1894 "rtp.ext.ed137b.ft.climax_ddc.mam",
1903 &hf_rtp_hdr_ed137b_ft_climax_ddc_mam_tqg
,
1906 "rtp.ext.ed137b.ft.climax_ddc.mam_tqg",
1909 VALS(rtp_ext_ed137b_ft_climax_ddc_time_quality
),
1915 &hf_rtp_hdr_ed137b_ft_climax_ddc_mam_t1
,
1918 "rtp.ext.ed137b.ft.climax_ddc.mam_t1",
1927 &hf_rtp_hdr_ed137b_ft_climax_ddc_mam_nmr
,
1929 "New measurement requested",
1930 "rtp.ext.ed137b.ft.climax_ddc.mam_nmr",
1933 VALS(rtp_ext_ed137b_ft_climax_ddc_mam_nmr
),
1939 &hf_rtp_hdr_ed137b_ft_climax_ddc_mam_t2
,
1942 "rtp.ext.ed137b.ft.climax_ddc.mam_t2",
1951 &hf_rtp_hdr_ed137b_ft_climax_ddc_mam_tsd
,
1954 "rtp.ext.ed137b.ft.climax_ddc.mam_tsd",
1963 &hf_rtp_hdr_ed137b_ft_climax_ddc_mam_tj1
,
1966 "rtp.ext.ed137b.ft.climax_ddc.mam_tj1",
1975 &hf_rtp_hdr_ed137b_ft_climax_ddc_mam_tid
,
1978 "rtp.ext.ed137b.ft.climax_ddc.mam_tid",
1987 &hf_rtp_hdr_ed137c_ft_climax_ddc_mam
,
1989 "CLIMAX Dynamic Delay Compensation MAM Response (ED-137C)",
1990 "rtp.ext.ed137c.ft.climax_ddc.mam",
1999 &hf_rtp_hdr_ed137c_ft_climax_ddc_mam_tqg
,
2002 "rtp.ext.ed137c.ft.climax_ddc.mam_tqg",
2005 VALS(rtp_ext_ed137c_ft_climax_ddc_time_quality
),
2011 &hf_rtp_hdr_ed137c_ft_climax_ddc_mam_t1
,
2014 "rtp.ext.ed137c.ft.climax_ddc.mam_t1",
2023 &hf_rtp_hdr_ed137c_ft_climax_ddc_mam_nmr
,
2025 "New measurement requested",
2026 "rtp.ext.ed137c.ft.climax_ddc.mam_nmr",
2029 VALS(rtp_ext_ed137c_ft_climax_ddc_mam_nmr
),
2035 &hf_rtp_hdr_ed137c_ft_climax_ddc_mam_t2
,
2038 "rtp.ext.ed137c.ft.climax_ddc.mam_t2",
2047 &hf_rtp_hdr_ed137c_ft_climax_ddc_mam_tsd
,
2050 "rtp.ext.ed137c.ft.climax_ddc.mam_tsd",
2059 &hf_rtp_hdr_ed137c_ft_climax_ddc_mam_tj1
,
2062 "rtp.ext.ed137c.ft.climax_ddc.mam_tj1",
2071 &hf_rtp_hdr_ed137c_ft_climax_ddc_mam_tid
,
2074 "rtp.ext.ed137c.ft.climax_ddc.mam_tid",
2083 &hf_rtp_hdr_ed137c_ft_climax_ddc_mam_ts2
,
2086 "rtp.ext.ed137c.ft.climax_ddc.mam_ts2",
2095 &hf_rtp_hdr_ed137_ft_climax_ddc_rmm_no_resp
,
2098 "rtp.ext.ed137.ft.climax_ddc.rmm.no_resp",
2103 "No corresponding response frame was seen", HFILL
2107 &hf_rtp_hdr_ed137_ft_climax_ddc_rmm_response_in
,
2109 "Response in frame",
2110 "rtp.ext.ed137.ft.climax_ddc.rmm.response_in",
2113 FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE
),
2115 "This packet will be responded in the packet with this number", HFILL
2119 &hf_rtp_hdr_ed137_ft_climax_ddc_mam_request_in
,
2122 "rtp.ext.ed137.ft.climax_ddc.mam.request_in",
2125 FRAMENUM_TYPE(FT_FRAMENUM_REQUEST
),
2127 "This packet is a response to the packet with this number", HFILL
2131 &hf_rtp_hdr_ed137_ft_climax_ddc_mam_time
,
2134 "rtp.ext.ed137.ft.climax_ddc.rmm.resptime",
2139 "The time between the request and the response, in ms.", HFILL
2146 &ett_hdr_ext_ed137s
,
2148 &ett_hdr_ext_ed137_add
,
2149 &ett_hdr_ext_ed137a
,
2150 &ett_hdr_ext_ed137a_add
,
2153 static ei_register_info ei
[] =
2155 { &ei_rtp_hdr_ed137_ft_climax_ddc_rmm_resp_not_found
, { "rtp.ext.ed137a.resp_not_found", PI_SEQUENCE
, PI_WARN
, "Response not found", EXPFILL
}},
2156 { &ei_rtp_hdr_ed137_ft_sqi_rssi_out_of_range
, { "rtp.ext.ed137a.sqi.out_of_range", PI_MALFORMED
, PI_ERROR
, "Index out of range", EXPFILL
}},
2159 expert_module_t
* expert_rtp_ed137
;
2161 proto_rtp_ed137
= proto_register_protocol("Real-Time Transport Protocol ED137 Extensions", "RTP-ED137", "rtp.ext.ed137");
2162 proto_register_field_array(proto_rtp_ed137
, hf
, array_length(hf
));
2163 expert_rtp_ed137
= expert_register_protocol(proto_rtp_ed137
);
2164 expert_register_field_array(expert_rtp_ed137
, ei
, array_length(ei
));
2165 proto_register_subtree_array(ett
, array_length(ett
));
2167 rtp_hdr_ext_ed137_handle
= register_dissector("rtp.ext.ed137", dissect_rtp_hdr_ext_ed137
, proto_rtp_ed137
);
2168 rtp_hdr_ext_ed137a_handle
= register_dissector("rtp.ext.ed137a", dissect_rtp_hdr_ext_ed137a
, proto_rtp_ed137
);
2170 /* Table for ED-137A additional feature dissectors */
2171 rtp_hdr_ext_ed137a_add_features_table
= register_dissector_table("rtp.hdr_ext.ed137a",
2172 "RTP header ED137A additional features", proto_rtp_ed137
, FT_UINT8
, BASE_HEX
);
2174 /* Register dissectors for tested additional headers */
2175 /* ED-137A signal quality information */
2176 rtp_hdr_ext_ed137a_feature_sqi_handle
= register_dissector("rtp.hdr_ext.ed137a.ed137a_feature_sqi", dissect_rtp_hdr_ext_ed137a_feature_sqi
, proto_rtp_ed137
);
2177 dissector_add_uint("rtp.hdr_ext.ed137a", RTP_ED137A_feature_sqi_key
, rtp_hdr_ext_ed137a_feature_sqi_handle
);
2179 /* ED-137A CLIMAX time delay */
2180 rtp_hdr_ext_ed137a_feature_climax_tdly_handle
= register_dissector("rtp.hdr_ext.ed137a.ed137a_feature_climax_tdly", dissect_rtp_hdr_ext_ed137a_feature_climax_tdly
, proto_rtp_ed137
);
2181 dissector_add_uint("rtp.hdr_ext.ed137a", RTP_ED137A_feature_climax_tdly_key
, rtp_hdr_ext_ed137a_feature_climax_tdly_handle
);
2183 /* ED-137B RRC for single frequency */
2184 rtp_hdr_ext_ed137b_feature_rrc_single_handle
= register_dissector("rtp.hdr_ext.ed137a.ed137b_feature_rrc_single", dissect_rtp_hdr_ext_ed137b_feature_rrc_single
, proto_rtp_ed137
);
2185 dissector_add_uint("rtp.hdr_ext.ed137a", RTP_ED137B_feature_rrc_single_key
, rtp_hdr_ext_ed137b_feature_rrc_single_handle
);
2187 /* ED-137B CLIMAX request for measurement message (RMM) */
2188 rtp_hdr_ext_ed137b_feature_climax_ddc_rmm_handle
= register_dissector("rtp.hdr_ext.ed137a.ed137b_feature_climax_ddc_rmm", dissect_rtp_hdr_ext_ed137b_feature_climax_ddc_rmm
, proto_rtp_ed137
);
2189 dissector_add_uint("rtp.hdr_ext.ed137a", RTP_ED137B_feature_climax_ddc_rmm_key
, rtp_hdr_ext_ed137b_feature_climax_ddc_rmm_handle
);
2191 /* ED-137B CLIMAX response message (MAM) */
2192 rtp_hdr_ext_ed137b_feature_climax_ddc_mam_handle
= register_dissector("rtp.hdr_ext.ed137a.ed137b_feature_climax_ddc_mam", dissect_rtp_hdr_ext_ed137b_feature_climax_ddc_mam
, proto_rtp_ed137
);
2193 dissector_add_uint("rtp.hdr_ext.ed137a", RTP_ED137B_feature_climax_ddc_mam_key
, rtp_hdr_ext_ed137b_feature_climax_ddc_mam_handle
);
2195 /* ED-137C CLIMAX response message (MAM) */
2196 rtp_hdr_ext_ed137c_feature_climax_ddc_mam_handle
= register_dissector("rtp.hdr_ext.ed137a.ed137c_feature_climax_ddc_mam", dissect_rtp_hdr_ext_ed137c_feature_climax_ddc_mam
, proto_rtp_ed137
);
2197 dissector_add_uint("rtp.hdr_ext.ed137a", RTP_ED137C_feature_climax_ddc_mam_key
, rtp_hdr_ext_ed137c_feature_climax_ddc_mam_handle
);
2201 proto_reg_handoff_rtp_ed137(void)
2203 static bool prefs_initialized
= false;
2205 if (!prefs_initialized
) {
2207 dissector_add_uint("rtp.hdr_ext", RTP_ED137_SIG
, rtp_hdr_ext_ed137_handle
);
2208 dissector_add_uint("rtp.hdr_ext", RTP_ED137A_SIG
, rtp_hdr_ext_ed137a_handle
);
2210 prefs_initialized
= true;
2215 * Editor modelines - https://www.wireshark.org/tools/modelines.html
2220 * indent-tabs-mode: nil
2223 * vi: set shiftwidth=4 tabstop=8 expandtab:
2224 * :indentSize=4:tabSize=8:noTabs=true: