/src/wireshark/epan/dissectors/packet-ebhscr.c
Line | Count | Source |
1 | | /* packet-ebhscr.c |
2 | | * Routines for EBHSCR dissection |
3 | | * Copyright 2019, Ana Pantar <ana.pantar@gmail.com> for Elektrobit |
4 | | * |
5 | | * Wireshark - Network traffic analyzer |
6 | | * By Gerald Combs <gerald@wireshark.org> |
7 | | * Copyright 1998 Gerald Combs |
8 | | * |
9 | | * For more information on this protocol see: |
10 | | * https://www.elektrobit.com/ebhscr |
11 | | * |
12 | | * SPDX-License-Identifier: GPL-2.0-or-later |
13 | | */ |
14 | | |
15 | | #include <config.h> |
16 | | #include <epan/packet.h> |
17 | | #include <epan/decode_as.h> |
18 | | #include <epan/prefs.h> |
19 | | #include <wiretap/wtap.h> |
20 | | #include <epan/expert.h> |
21 | | #include <epan/tfs.h> |
22 | | |
23 | | /* Custom EBHSCR packet types */ |
24 | 3 | #define EBHSCR_USER_FIRST 0x43 |
25 | 2 | #define EBHSCR_USER_LAST 0x4F |
26 | | |
27 | | /* EBHSCR packet types */ |
28 | 2 | #define ETHERNET_FRAME 0x50 |
29 | 2 | #define NMEA_FRAME 0x51 |
30 | 2 | #define TIME_STATE_FRAME 0x52 |
31 | 2 | #define CAN_FRAME 0x53 |
32 | 2 | #define LIN_FRAME 0x55 |
33 | 2 | #define DIO_FRAME 0x56 |
34 | 2 | #define FLEXRAY_FRAME 0x57 |
35 | 2 | #define MIPI_CSI2 0x59 |
36 | 2 | #define DSI3_FRAME 0x5C |
37 | 2 | #define CSI2_FRAME 0x5E |
38 | | |
39 | | /* Protocol specific definitions */ |
40 | 0 | #define FLEXRAY_FRAME_PACKET 0x00 |
41 | 0 | #define FLEXRAY_SYMBOL_PACKET 0x01 |
42 | 0 | #define FLEXRAY_SLOT_STATUS_PACKET 0x02 |
43 | 0 | #define FLEXRAY_START_OF_CYCLE_PACKET 0x03 |
44 | 16 | #define FLEXRAY_CHANNEL_B_MASK 0x02 |
45 | 16 | #define FLEXRAY_TSSVIOL_MASK 0x0020 |
46 | 16 | #define FLEXRAY_CODERR_MASK 0x0010 |
47 | 16 | #define FLEXRAY_FESERR_MASK 0x0100 |
48 | 16 | #define FLEXRAY_HCRCERR_MASK 0x0040 |
49 | 16 | #define FLEXRAY_FCRCERR_MASK 0x0080 |
50 | 0 | #define MIPI_CSI2_PKT_HDR_LEN 8U |
51 | 0 | #define CSI2_FRAME_NUM_SECTIONS 8U |
52 | 0 | #define CSI2_FRAME_SECTION_SIZE_BYTES 16U |
53 | 0 | #define CSI2_FRAME_PKT_HDR_LEN 128U |
54 | 0 | #define DSI3_CHANNEL_SLAVE 0x00 |
55 | 0 | #define DSI3_CHANNEL_MASTER 0x01 |
56 | 7 | #define EBHSCR_HEADER_LENGTH 32U |
57 | | |
58 | | void proto_reg_handoff_ebhscr(void); |
59 | | void proto_register_ebhscr(void); |
60 | | |
61 | | static int proto_ebhscr; |
62 | | |
63 | | static int hf_ebhscr_packet_header; |
64 | | static int hf_ebhscr_major_number; |
65 | | static int hf_ebhscr_slot; |
66 | | static int hf_ebhscr_channel; |
67 | | static int hf_ebhscr_status; |
68 | | static int hf_ebhscr_status_unused; |
69 | | |
70 | | static int hf_can_proto_type; |
71 | | static int hf_can_status_available; |
72 | | static int hf_can_status_overflow; |
73 | | static int hf_can_LEC; |
74 | | static int hf_can_ERRP; |
75 | | static int hf_can_ERRW; |
76 | | static int hf_can_BOFF; |
77 | | static int hf_can_DLEC; |
78 | | static int hf_can_TEC; |
79 | | static int hf_can_REC; |
80 | | static int hf_can_CEL; |
81 | | static int hf_can_reserved_bytes; |
82 | | |
83 | | static int hf_eth_reserved_bytes; |
84 | | static int hf_eth_tx_trunc; |
85 | | static int hf_eth_trans_undrun; |
86 | | static int hf_eth_retrans_limit; |
87 | | static int hf_eth_late_collision; |
88 | | static int hf_eth_link_up_down; |
89 | | static int hf_eth_master_slave; |
90 | | static int hf_eth_fcs_unavailable; |
91 | | static int hf_eth_rsvd_bit; |
92 | | static int hf_eth_speed; |
93 | | |
94 | | static int hf_eth_crc_error; |
95 | | static int hf_eth_mii_foe; |
96 | | static int hf_eth_payload_foe; |
97 | | static int hf_eth_hdr_foe; |
98 | | static int hf_eth_rcv_dec_err; |
99 | | static int hf_eth_sym_error; |
100 | | static int hf_eth_jabber_event; |
101 | | static int hf_eth_pol_ch_event; |
102 | | static int hf_eth_fls_carrier_event; |
103 | | static int hf_eth_rx_trunc; |
104 | | static int hf_eth_transmission_disc_err; |
105 | | static int hf_eth_wait_frame_sep_bit; |
106 | | |
107 | | static int hf_ts_time_offset_valid; |
108 | | static int hf_ts_last_offset_change_valid; |
109 | | static int hf_ts_nano_seconds_last_jump_valid; |
110 | | static int hf_ts_UTC_leap_seconds_valid; |
111 | | static int hf_ts_sync_state_valid; |
112 | | static int hf_ts_time_source; |
113 | | |
114 | | static int hf_ts_time_offset_ns; |
115 | | static int hf_ts_last_offset_ns; |
116 | | static int hf_ts_last_jump_ns; |
117 | | static int hf_ts_utc_leap_sec; |
118 | | static int hf_ts_sync_state; |
119 | | |
120 | | static int hf_lin_1_3_classic_chksum; |
121 | | static int hf_lin_1_2_enhanced_chksum; |
122 | | static int hf_lin_wakeup; |
123 | | static int hf_lin_time_jump; |
124 | | |
125 | | static int hf_lin_reserved_bytes; |
126 | | static int hf_lin_wakeup_length; |
127 | | static int hf_lin_sts_reserved; |
128 | | static int hf_lin_sts_syn; |
129 | | static int hf_lin_sts_par; |
130 | | static int hf_lin_sts_res; |
131 | | static int hf_lin_sts_dat; |
132 | | static int hf_lin_sts_chk; |
133 | | static int hf_lin_sts_sta; |
134 | | static int hf_lin_sts_sto; |
135 | | static int hf_lin_sts_emp; |
136 | | static int hf_lin_payload; |
137 | | static int hf_lin_payload_pid; |
138 | | static int hf_lin_payload_id_parity_0; |
139 | | static int hf_lin_payload_id_parity_1; |
140 | | static int hf_lin_payload_id; |
141 | | static int hf_lin_payload_data; |
142 | | static int hf_lin_payload_checksum; |
143 | | |
144 | | static int hf_dio_overflow_mon_unit; |
145 | | static int hf_dio_jump_occurred; |
146 | | static int hf_dio_value_type; |
147 | | static int hf_dio_channel_ref; |
148 | | static int hf_dio_gpio_id; |
149 | | static int hf_dio_reserved_bytes; |
150 | | |
151 | | static int hf_flexray_ch_a; |
152 | | static int hf_flexray_ch_b; |
153 | | static int hf_flexray_ctrl_id; |
154 | | static int hf_flexray_monitoring_bit; |
155 | | static int hf_flexray_sync_bit; |
156 | | static int hf_flexray_packet_type; |
157 | | static int hf_flexray_CODERR; |
158 | | static int hf_flexray_TSSVIOL; |
159 | | static int hf_flexray_HCRCERR; |
160 | | static int hf_flexray_FCRCERR; |
161 | | static int hf_flexray_FESERR; |
162 | | static int hf_flexray_FSSERR; |
163 | | static int hf_flexray_BSSERR; |
164 | | static int hf_flexray_jump_occurred; |
165 | | static int hf_flexray_overflow_err; |
166 | | static int hf_flexray_slot_information; |
167 | | static int hf_flexray_SBV; |
168 | | static int hf_flexray_ACI; |
169 | | static int hf_flexray_CED; |
170 | | static int hf_flexray_SED; |
171 | | static int hf_flexray_VFR; |
172 | | static int hf_flexray_SID; |
173 | | static int hf_flexray_frame_status; |
174 | | static int hf_flexray_SPLERR; |
175 | | static int hf_flexray_CCERR; |
176 | | static int hf_flexray_FIDERR; |
177 | | static int hf_flexray_SSERR; |
178 | | static int hf_flexray_NERR; |
179 | | static int hf_flexray_SOVERR; |
180 | | static int hf_flexray_SWVIOL; |
181 | | static int hf_flexray_NITVIOL; |
182 | | static int hf_flexray_BVIOL; |
183 | | static int hf_flexray_PCD; |
184 | | static int hf_flexray_SYNCERR; |
185 | | static int hf_flexray_CP; |
186 | | static int hf_flexray_BRC; |
187 | | static int hf_flexray_symbol_length_and_status; |
188 | | static int hf_flexray_SYERR; |
189 | | static int hf_flexray_SL; |
190 | | static int hf_flexray_POC_state; |
191 | | static int hf_flexray_following_cycle_counter; |
192 | | static int hf_flexray_supercycle_counter; |
193 | | |
194 | | static int hf_dsi3_status_crc_error; |
195 | | static int hf_dsi3_status_transition_error; |
196 | | static int hf_dsi3_status_packet_truncated_error; |
197 | | static int hf_dsi3_status_packet_dropped_error; |
198 | | static int hf_dsi3_mjr_hdr_st0_command_type; |
199 | | static int hf_dsi3_mjr_hdr_slave_st0_bit_count; |
200 | | static int hf_dsi3_mjr_hdr_slave_st2_blnk_err; |
201 | | static int hf_dsi3_mjr_hdr_slave_st2_no_trans_err; |
202 | | static int hf_dsi3_mjr_hdr_slave_st3_crc_err; |
203 | | static int hf_dsi3_mjr_hdr_slave_st3_cnt_overflow; |
204 | | static int hf_dsi3_mjr_hdr_slave_st3_disabled_err; |
205 | | static int hf_dsi3_mjr_hdr_slave_st3_trunc_data; |
206 | | static int hf_dsi3_mjr_hdr_slave_st3_drop_data; |
207 | | static int hf_dsi3_mjr_hdr_master_st0_nibble_count; |
208 | | static int hf_dsi3_mjr_hdr_master_st2_blnk_err; |
209 | | static int hf_dsi3_mjr_hdr_master_st2_bad_trans_err; |
210 | | static int hf_dsi3_mjr_hdr_master_st2_bad_chip_err; |
211 | | static int hf_dsi3_mjr_hdr_master_st2_no_trans_err; |
212 | | static int hf_dsi3_mjr_hdr_master_st3_crc_err; |
213 | | static int hf_dsi3_mjr_hdr_master_st3_bad_decode_err; |
214 | | static int hf_dsi3_mjr_hdr_master_st3_cnt_overflow; |
215 | | static int hf_dsi3_mjr_hdr_master_st3_disable_err; |
216 | | static int hf_dsi3_mjr_hdr_master_st3_trunc_data; |
217 | | static int hf_dsi3_mjr_hdr_master_st3_drop_data; |
218 | | |
219 | | static int hf_mipi_csi2_status_packet_checksum_err; |
220 | | static int hf_mipi_csi2_status_ecc_err; |
221 | | static int hf_mipi_csi2_status_payload_fifo_overflow; |
222 | | static int hf_mipi_csi2_status_header_fifo_overflow; |
223 | | static int hf_mipi_csi2_status_rcv_decoder_err; |
224 | | static int hf_mipi_csi2_status_payload_trunc_err; |
225 | | static int hf_mipi_csi2_status_trans_rejected; |
226 | | |
227 | | static int hf_mipi_csi2_mjr_hdr_flags_packet_checksum_err; |
228 | | static int hf_mipi_csi2_mjr_hdr_flags_correctable_ecc_err; |
229 | | static int hf_mipi_csi2_mjr_hdr_flags_uncorrectable_ecc_err; |
230 | | static int hf_mipi_csi2_mjr_hdr_flags_mipi_phy_type; |
231 | | static int hf_mipi_csi2_mjr_hdr_flags_first_line_of_frame; |
232 | | static int hf_mipi_csi2_mjr_hdr_frame_counter; |
233 | | static int hf_mipi_csi2_mjr_hdr_line_counter; |
234 | | |
235 | | static int hf_mipi_csi2_payload_pkt_hdr; |
236 | | static int hf_mipi_csi2_payload_pkt_hdr_dt; |
237 | | static int hf_mipi_csi2_payload_pkt_hdr_vc; |
238 | | static int hf_mipi_csi2_payload_pkt_hdr_ecc; |
239 | | static int hf_mipi_csi2_payload_pkt_hdr_crc; |
240 | | static int hf_mipi_csi2_payload_pkt_hdr_wc_lsb; |
241 | | static int hf_mipi_csi2_payload_pkt_hdr_wc_msb; |
242 | | |
243 | | static int hf_csi2_frame_status_packet_checksum_err; |
244 | | static int hf_csi2_frame_status_ecc_err; |
245 | | static int hf_csi2_frame_status_rcv_decoder_err; |
246 | | static int hf_csi2_frame_status_section_err; |
247 | | static int hf_csi2_frame_status_fifo_overflow; |
248 | | static int hf_csi2_frame_status_payload_trunc_err; |
249 | | static int hf_csi2_frame_status_trans_rejected; |
250 | | |
251 | | static int hf_csi2_frame_mjr_hdr_flags_proc; |
252 | | static int hf_csi2_frame_mjr_hdr_flags_pad_align; |
253 | | static int hf_csi2_frame_mjr_hdr_flags_mipi_phy_type; |
254 | | static int hf_csi2_frame_mjr_hdr_vc; |
255 | | static int hf_csi2_frame_mjr_hdr_imhv; |
256 | | |
257 | | static int hf_csi2_frame_header; |
258 | | static int hf_csi2_frame_header_payload_byte_offset; |
259 | | static int hf_csi2_frame_header_bytes_total; |
260 | | static int hf_csi2_frame_header_bytes_per_line; |
261 | | static int hf_csi2_frame_header_number_lines; |
262 | | static int hf_csi2_frame_header_error_bits_field; |
263 | | static int hf_csi2_frame_header_mipi_data_type; |
264 | | static int hf_csi2_frame_sections[CSI2_FRAME_NUM_SECTIONS]; |
265 | | |
266 | | static int hf_csi2_frame_header_error_bits_packet_checksum_err; |
267 | | static int hf_csi2_frame_header_error_bits_correctable_ecc_err; |
268 | | static int hf_csi2_frame_header_error_bits_uncorrectable_ecc_err; |
269 | | static int hf_csi2_frame_header_error_bits_rcv_dec_err; |
270 | | |
271 | | static int hf_ebhscr_version; |
272 | | static int hf_ebhscr_length; |
273 | | static int hf_ebhscr_start_timestamp; |
274 | | static int hf_ebhscr_stop_timestamp; |
275 | | static int hf_ebhscr_mjr_hdr; |
276 | | static int hf_ebhscr_mjr_hdr_unused; |
277 | | |
278 | | static int ett_ebhscr; |
279 | | static int ett_ebhscr_channel; |
280 | | static int ett_ebhscr_packet_header; |
281 | | static int ett_ebhscr_status; |
282 | | static int ett_ebhscr_mjr_hdr; |
283 | | |
284 | | static int ett_lin_payload; |
285 | | |
286 | | static int * const can_status_bits[] = { |
287 | | &hf_can_proto_type, |
288 | | &hf_can_status_available, |
289 | | &hf_can_status_overflow, |
290 | | NULL |
291 | | }; |
292 | | |
293 | | static int * const can_mjr_hdr_bits[] = { |
294 | | &hf_can_reserved_bytes, |
295 | | &hf_can_LEC, |
296 | | &hf_can_ERRP, |
297 | | &hf_can_ERRW, |
298 | | &hf_can_BOFF, |
299 | | &hf_can_DLEC, |
300 | | &hf_can_TEC, |
301 | | &hf_can_REC, |
302 | | &hf_can_CEL, |
303 | | NULL |
304 | | }; |
305 | | |
306 | | static const value_string can_proto_type_strings[] = { |
307 | | { 0, "Classical CAN" }, |
308 | | { 1, "CAN FD data frame" }, |
309 | | { 0, NULL }, |
310 | | }; |
311 | | |
312 | | static const value_string can_status_available_strings[] = { |
313 | | { 0, "CAN protocol status not available" }, |
314 | | { 1, "CAN protocol status available" }, |
315 | | { 0, NULL }, |
316 | | }; |
317 | | |
318 | | static const value_string can_status_overflow_strings[] = { |
319 | | { 0, "No FIFO overflow detected" }, |
320 | | { 1, "FIFO overflow detected, data were lost" }, |
321 | | { 0, NULL }, |
322 | | }; |
323 | | |
324 | | static const val64_string can_last_err_code_strings[] = { |
325 | | { 0, "No Error" }, |
326 | | { 1, "Stuff Error" }, |
327 | | { 2, "Form Error" }, |
328 | | { 3, "Ack Error" }, |
329 | | { 4, "Bit1 Error" }, |
330 | | { 5, "Bit0 Error" }, |
331 | | { 6, "CRC Error" }, |
332 | | { 7, "No Change" }, |
333 | | { 0, NULL }, |
334 | | }; |
335 | | |
336 | | static const val64_string can_ERRP_strings[] = { |
337 | | { 0, "Error counters are below the error passive limit (128)" }, |
338 | | { 1, "One of the error counters has reached the error passive limit (128)" }, |
339 | | { 0, NULL }, |
340 | | }; |
341 | | |
342 | | static const val64_string can_ERRW_strings[] = { |
343 | | { 0, "Error counters are below the error warning limit (96)" }, |
344 | | { 1, "One of the error counters has reached the error warning limit (96)" }, |
345 | | { 0, NULL }, |
346 | | }; |
347 | | static const val64_string can_BOFF_strings[] = { |
348 | | { 0, "Not in Bus Off state" }, |
349 | | { 1, "In Bus Off state." }, |
350 | | { 0, NULL }, |
351 | | }; |
352 | | |
353 | | |
354 | | static int * const eth_rx_error_bits[] = { |
355 | | &hf_eth_crc_error, |
356 | | &hf_eth_mii_foe, |
357 | | &hf_eth_payload_foe, |
358 | | &hf_eth_hdr_foe, |
359 | | &hf_eth_rcv_dec_err, |
360 | | &hf_eth_sym_error, |
361 | | &hf_eth_jabber_event, |
362 | | &hf_eth_pol_ch_event, |
363 | | &hf_eth_fls_carrier_event, |
364 | | &hf_eth_rx_trunc, |
365 | | &hf_eth_transmission_disc_err, |
366 | | &hf_eth_wait_frame_sep_bit, |
367 | | NULL |
368 | | }; |
369 | | |
370 | | static int * const eth_mjr_hdr_bits[] = { |
371 | | &hf_eth_reserved_bytes, |
372 | | &hf_eth_tx_trunc, |
373 | | &hf_eth_trans_undrun, |
374 | | &hf_eth_retrans_limit, |
375 | | &hf_eth_late_collision, |
376 | | &hf_eth_link_up_down, |
377 | | &hf_eth_master_slave, |
378 | | &hf_eth_fcs_unavailable, |
379 | | &hf_eth_rsvd_bit, |
380 | | &hf_eth_speed, |
381 | | NULL |
382 | | }; |
383 | | |
384 | | static const val64_string eth_link_strings[] = { |
385 | | { 0, "Link Down" }, |
386 | | { 1, "Link Up" }, |
387 | | { 0, NULL }, |
388 | | }; |
389 | | |
390 | | static const val64_string eth_master_strings[] = { |
391 | | { 0, "Slave" }, |
392 | | { 1, "Master" }, |
393 | | { 0, NULL }, |
394 | | }; |
395 | | |
396 | | static const val64_string eth_fcs_strings[] = { |
397 | | { 0, "FCS appended to payload" }, |
398 | | { 1, "FCS not appended to payload." }, |
399 | | { 0, NULL }, |
400 | | }; |
401 | | |
402 | | static const val64_string eth_speed_strings[] = { |
403 | | { 0, "Speed 10M" }, |
404 | | { 1, "Speed 100M" }, |
405 | | { 2, "Speed 1000M" }, |
406 | | { 3, "Speed 2.5G" }, |
407 | | { 4, "Speed 5G" }, |
408 | | { 5, "Speed 10G" }, |
409 | | { 6, "Speed 25G" }, |
410 | | { 7, "Speed 40G" }, |
411 | | { 8, "Speed 100G" }, |
412 | | { 9, "Reserved" }, |
413 | | { 10, "Reserved" }, |
414 | | { 11, "Reserved" }, |
415 | | { 12, "Reserved" }, |
416 | | { 13, "Reserved" }, |
417 | | { 14, "Reserved" }, |
418 | | { 15, "Speed unknown. This value can be used when the speed could not be detected." }, |
419 | | { 0, NULL }, |
420 | | }; |
421 | | |
422 | | static int * const ts_status_bits[] = { |
423 | | &hf_ts_time_offset_valid, |
424 | | &hf_ts_last_offset_change_valid, |
425 | | &hf_ts_nano_seconds_last_jump_valid, |
426 | | &hf_ts_UTC_leap_seconds_valid, |
427 | | &hf_ts_sync_state_valid, |
428 | | NULL |
429 | | }; |
430 | | |
431 | | static const val64_string ts_time_source_strings[] = { |
432 | | { 0x00, "TimeSourceNone" }, |
433 | | { 0x01, "TimeSourceEBTimesyncHard" }, |
434 | | { 0x02, "TimeSourceXTSS" }, |
435 | | { 0x03, "TimeSourcePTPHW" }, |
436 | | { 0x10, "TimeSourcePTPSW" }, |
437 | | { 0x20, "TimeSourceGPS" }, |
438 | | { 0x30, "TimeSourceEBTimesyncSoft" }, |
439 | | { 0x40, "TimeSourceCAN" }, |
440 | | { 0x50, "TimeSourceEBVirt" }, |
441 | | { 0, NULL }, |
442 | | }; |
443 | | static const value_string ts_sync_state_strings[] = { |
444 | | { 0, "Free running" }, |
445 | | { 1, "Locked to master" }, |
446 | | { 0, NULL }, |
447 | | }; |
448 | | |
449 | | static int * const lin_status_bits[] = { |
450 | | &hf_lin_time_jump, |
451 | | &hf_lin_wakeup, |
452 | | &hf_lin_1_2_enhanced_chksum, |
453 | | &hf_lin_1_3_classic_chksum, |
454 | | NULL |
455 | | }; |
456 | | |
457 | | static int * const lin_mjr_hdr_bits[] = { |
458 | | |
459 | | &hf_lin_wakeup_length, |
460 | | &hf_lin_sts_emp, |
461 | | &hf_lin_sts_sto, |
462 | | &hf_lin_sts_sta, |
463 | | &hf_lin_sts_chk, |
464 | | &hf_lin_sts_dat, |
465 | | &hf_lin_sts_res, |
466 | | &hf_lin_sts_par, |
467 | | &hf_lin_sts_syn, |
468 | | &hf_lin_sts_reserved, |
469 | | &hf_lin_reserved_bytes, |
470 | | NULL |
471 | | }; |
472 | | |
473 | | static int * const lin_payload_pid_bits[] = { |
474 | | &hf_lin_payload_id, |
475 | | &hf_lin_payload_id_parity_0, |
476 | | &hf_lin_payload_id_parity_1, |
477 | | NULL |
478 | | }; |
479 | | |
480 | | static int * const dio_status_bits[] = { |
481 | | &hf_dio_overflow_mon_unit, |
482 | | &hf_dio_jump_occurred, |
483 | | NULL |
484 | | }; |
485 | | |
486 | | static int * const dio_mjr_hdr_bits[] = { |
487 | | &hf_dio_value_type, |
488 | | &hf_dio_channel_ref, |
489 | | &hf_dio_gpio_id, |
490 | | &hf_dio_reserved_bytes, |
491 | | NULL |
492 | | }; |
493 | | |
494 | | static const val64_string dio_val_type_strings[] = { |
495 | | { 0, "Event triggered falling edge" }, |
496 | | { 1, "Event triggered rising edge" }, |
497 | | { 2, "GPIO is in low state (No state change)" }, |
498 | | { 3, "GPIO is in high state (No state change)" }, |
499 | | { 0, NULL }, |
500 | | }; |
501 | | |
502 | | static const val64_string dio_channel_ref_strings[] = { |
503 | | { 0, "The EBHSCR header 'Channel' field refers to the Digital IO line number (zero based). EB 2200 /" |
504 | | "EB 5200 provides four input lines for DETI with the values 0-3" }, |
505 | | { 1, "The EBHSCR header 'Channel' field refers to a accumulated GPIO data channel and the GPIO-" |
506 | | "ID field is used for further identification of the GPIO" }, |
507 | | { 0, NULL }, |
508 | | }; |
509 | | |
510 | | static int * const flexray_channel_bits[] = { |
511 | | &hf_flexray_ch_a, |
512 | | &hf_flexray_ch_b, |
513 | | &hf_flexray_ctrl_id, |
514 | | NULL |
515 | | }; |
516 | | |
517 | | static int * const flexray_status_bits[] = { |
518 | | &hf_flexray_monitoring_bit, |
519 | | &hf_flexray_sync_bit, |
520 | | &hf_flexray_packet_type, |
521 | | &hf_flexray_jump_occurred, |
522 | | NULL |
523 | | }; |
524 | | |
525 | | static int * const flexray_frame_status_bits[] = { |
526 | | &hf_flexray_monitoring_bit, |
527 | | &hf_flexray_sync_bit, |
528 | | &hf_flexray_packet_type, |
529 | | &hf_flexray_CODERR, |
530 | | &hf_flexray_TSSVIOL, |
531 | | &hf_flexray_HCRCERR, |
532 | | &hf_flexray_FCRCERR, |
533 | | &hf_flexray_FESERR, |
534 | | &hf_flexray_FSSERR, |
535 | | &hf_flexray_BSSERR, |
536 | | &hf_flexray_jump_occurred, |
537 | | NULL |
538 | | }; |
539 | | |
540 | | static int * const flexray_slot_status_bits[] = { |
541 | | &hf_flexray_monitoring_bit, |
542 | | &hf_flexray_sync_bit, |
543 | | &hf_flexray_packet_type, |
544 | | &hf_flexray_overflow_err, |
545 | | &hf_flexray_jump_occurred, |
546 | | NULL |
547 | | }; |
548 | | |
549 | | static int * const flexray_mhdr_slot_information_bits[] = { |
550 | | &hf_flexray_SBV, |
551 | | &hf_flexray_ACI, |
552 | | &hf_flexray_CED, |
553 | | &hf_flexray_SED, |
554 | | &hf_flexray_VFR, |
555 | | &hf_flexray_SID, |
556 | | NULL |
557 | | }; |
558 | | |
559 | | static int * const flexray_mhdr_frame_status_bits[] = { |
560 | | &hf_flexray_SPLERR, |
561 | | &hf_flexray_CCERR, |
562 | | &hf_flexray_FIDERR, |
563 | | &hf_flexray_SSERR, |
564 | | &hf_flexray_NERR, |
565 | | &hf_flexray_SOVERR, |
566 | | &hf_flexray_SWVIOL, |
567 | | &hf_flexray_NITVIOL, |
568 | | &hf_flexray_BVIOL, |
569 | | &hf_flexray_PCD, |
570 | | &hf_flexray_SYNCERR, |
571 | | &hf_flexray_CP, |
572 | | &hf_flexray_BRC, |
573 | | NULL |
574 | | }; |
575 | | |
576 | | static int * const flexray_mhdr_symbol_length_and_status_bits[] = { |
577 | | &hf_flexray_SYERR, |
578 | | &hf_flexray_SL, |
579 | | NULL |
580 | | }; |
581 | | |
582 | | static const value_string flexray_monitoring_bit_strings[] = { |
583 | | { 0x00, "Packet was generated by asynchronous monitoring" }, |
584 | | { 0x01, "Packet was generated by FlexRay synchronous monitoring" }, |
585 | | { 0, NULL }, |
586 | | }; |
587 | | |
588 | | static const value_string flexray_packet_type_strings[] = { |
589 | | { FLEXRAY_FRAME_PACKET, "Frame" }, |
590 | | { FLEXRAY_SYMBOL_PACKET, "Symbol" }, |
591 | | { FLEXRAY_SLOT_STATUS_PACKET, "Slot status" }, |
592 | | { FLEXRAY_START_OF_CYCLE_PACKET, "Start of cycle" }, |
593 | | { 0, NULL }, |
594 | | }; |
595 | | |
596 | | static const value_string flexray_CP_strings[] = { |
597 | | { 0x00, "Static part" }, |
598 | | { 0x01, "Dynamic part" }, |
599 | | { 0x02, "Symbol window" }, |
600 | | { 0x03, "NIT" }, |
601 | | { 0, NULL }, |
602 | | }; |
603 | | |
604 | | static const value_string flexray_POC_state_strings[] = { |
605 | | { 0x00, "DEFAULT_CONFIG state" }, |
606 | | { 0x01, "READY state" }, |
607 | | { 0x02, "NORMAL_ACTIVE state" }, |
608 | | { 0x03, "NORMAL_PASSIVE state" }, |
609 | | { 0x04, "HALT state" }, |
610 | | { 0x05, "MONITOR_MODE state" }, |
611 | | { 0x0F, "CONFIG state" }, |
612 | | { 0x10, "WAKEUP_STANDBY state" }, |
613 | | { 0x11, "WAKEUP_LISTEN state" }, |
614 | | { 0x12, "WAKEUP_SEND state" }, |
615 | | { 0x13, "WAKEUP_DETECT state" }, |
616 | | { 0x20, "STARTUP_PREPARE state" }, |
617 | | { 0x21, "COLDSTART_LISTEN state" }, |
618 | | { 0x22, "COLDSTART_COLLISION_RESOLUTION state" }, |
619 | | { 0x23, "COLDSTART_CONSISTENCY_CHECK state" }, |
620 | | { 0x24, "COLDSTART_GAP state" }, |
621 | | { 0x25, "COLDSTART_JOIN state" }, |
622 | | { 0x26, "INTEGRATION_COLDSTART_CHECK state" }, |
623 | | { 0x27, "INTEGRATION_LISTEN state" }, |
624 | | { 0x28, "INTEGRATION_CONSISTENCY_CHECK state" }, |
625 | | { 0x29, "INITIALIZE_SCHEDULE state" }, |
626 | | { 0x2A, "ABORT_STARTUP state" }, |
627 | | { 0x2B, "STARTUP_SUCCESS state" }, |
628 | | { 0, NULL }, |
629 | | }; |
630 | | |
631 | | static int * const dsi3_status_bits[] = { |
632 | | &hf_dsi3_status_crc_error, |
633 | | &hf_dsi3_status_transition_error, |
634 | | &hf_dsi3_status_packet_truncated_error, |
635 | | &hf_dsi3_status_packet_dropped_error, |
636 | | NULL |
637 | | }; |
638 | | |
639 | | static int * const dis3_mjr_hdr_slave_status_bits[] = { |
640 | | &hf_dsi3_mjr_hdr_st0_command_type, |
641 | | &hf_dsi3_mjr_hdr_slave_st0_bit_count, |
642 | | &hf_dsi3_mjr_hdr_slave_st2_blnk_err, |
643 | | &hf_dsi3_mjr_hdr_slave_st2_no_trans_err, |
644 | | &hf_dsi3_mjr_hdr_slave_st3_crc_err, |
645 | | &hf_dsi3_mjr_hdr_slave_st3_cnt_overflow, |
646 | | &hf_dsi3_mjr_hdr_slave_st3_disabled_err, |
647 | | &hf_dsi3_mjr_hdr_slave_st3_trunc_data, |
648 | | &hf_dsi3_mjr_hdr_slave_st3_drop_data, |
649 | | NULL |
650 | | }; |
651 | | |
652 | | static int * const dis3_mjr_hdr_master_status_bits[] = { |
653 | | &hf_dsi3_mjr_hdr_st0_command_type, |
654 | | &hf_dsi3_mjr_hdr_master_st0_nibble_count, |
655 | | &hf_dsi3_mjr_hdr_master_st2_blnk_err, |
656 | | &hf_dsi3_mjr_hdr_master_st2_bad_trans_err, |
657 | | &hf_dsi3_mjr_hdr_master_st2_bad_chip_err, |
658 | | &hf_dsi3_mjr_hdr_master_st2_no_trans_err, |
659 | | &hf_dsi3_mjr_hdr_master_st3_crc_err, |
660 | | &hf_dsi3_mjr_hdr_master_st3_bad_decode_err, |
661 | | &hf_dsi3_mjr_hdr_master_st3_cnt_overflow, |
662 | | &hf_dsi3_mjr_hdr_master_st3_disable_err, |
663 | | &hf_dsi3_mjr_hdr_master_st3_trunc_data, |
664 | | &hf_dsi3_mjr_hdr_master_st3_drop_data, |
665 | | NULL |
666 | | }; |
667 | | |
668 | | static const true_false_string dsi3_status_err_CRC_strings = { |
669 | | "CRC error occurred", |
670 | | "No CRC error occurred" |
671 | | }; |
672 | | |
673 | | static const true_false_string dsi3_status_err_trans_strings = { |
674 | | "An unexpected transition was detected during reception or an unexpected transition was detected", |
675 | | "No transition error occurred" |
676 | | }; |
677 | | |
678 | | static const true_false_string dsi3_status_err_trunc_strings = { |
679 | | "An associated data packet has been truncated", |
680 | | "No packet truncation error occurred" |
681 | | }; |
682 | | |
683 | | static const true_false_string dsi3_status_err_drop_strings = { |
684 | | "An associated packet or an undefined number of them were dropped since last successful data reception", |
685 | | "No packet drop error occurred" |
686 | | }; |
687 | | |
688 | | static const true_false_string dsi3_mjr_hdr_st0_command_type_strings = { |
689 | | "Periodic Data Collection Mode (PDCM) command", |
690 | | "Command and Response Mode (CRM) command" |
691 | | }; |
692 | | |
693 | | static int * const mipi_csi2_status_bits[] = { |
694 | | &hf_mipi_csi2_status_packet_checksum_err, |
695 | | &hf_mipi_csi2_status_ecc_err, |
696 | | &hf_mipi_csi2_status_payload_fifo_overflow, |
697 | | &hf_mipi_csi2_status_header_fifo_overflow, |
698 | | &hf_mipi_csi2_status_rcv_decoder_err, |
699 | | &hf_mipi_csi2_status_payload_trunc_err, |
700 | | &hf_mipi_csi2_status_trans_rejected, |
701 | | NULL |
702 | | }; |
703 | | |
704 | | static int * const mipi_csi2_mjr_hdr_flags_bits[] = { |
705 | | &hf_mipi_csi2_mjr_hdr_flags_packet_checksum_err, |
706 | | &hf_mipi_csi2_mjr_hdr_flags_correctable_ecc_err, |
707 | | &hf_mipi_csi2_mjr_hdr_flags_uncorrectable_ecc_err, |
708 | | &hf_mipi_csi2_mjr_hdr_flags_mipi_phy_type, |
709 | | &hf_mipi_csi2_mjr_hdr_flags_first_line_of_frame, |
710 | | NULL |
711 | | }; |
712 | | |
713 | | static const true_false_string hf_mipi_csi2_mjr_hdr_flags_mipi_phy_type_string = { |
714 | | "CPHY", |
715 | | "DPHY" |
716 | | }; |
717 | | |
718 | | static int * const csi2_frame_status_bits[] = { |
719 | | &hf_csi2_frame_status_packet_checksum_err, |
720 | | &hf_csi2_frame_status_ecc_err, |
721 | | &hf_csi2_frame_status_rcv_decoder_err, |
722 | | &hf_csi2_frame_status_section_err, |
723 | | &hf_csi2_frame_status_fifo_overflow, |
724 | | &hf_csi2_frame_status_payload_trunc_err, |
725 | | &hf_csi2_frame_status_trans_rejected, |
726 | | NULL |
727 | | }; |
728 | | |
729 | | static int * const csi2_frame_mjr_hdr_bits[] = { |
730 | | &hf_csi2_frame_mjr_hdr_flags_proc, |
731 | | &hf_csi2_frame_mjr_hdr_flags_pad_align, |
732 | | &hf_csi2_frame_mjr_hdr_flags_mipi_phy_type, |
733 | | &hf_csi2_frame_mjr_hdr_vc, |
734 | | &hf_csi2_frame_mjr_hdr_imhv, |
735 | | NULL |
736 | | }; |
737 | | |
738 | | static int * const csi2_frame_header_error_bits[] = { |
739 | | &hf_csi2_frame_header_error_bits_packet_checksum_err, |
740 | | &hf_csi2_frame_header_error_bits_correctable_ecc_err, |
741 | | &hf_csi2_frame_header_error_bits_uncorrectable_ecc_err, |
742 | | &hf_csi2_frame_header_error_bits_rcv_dec_err, |
743 | | NULL |
744 | | }; |
745 | | |
746 | | static expert_field ei_ebhscr_frame_header; |
747 | | static expert_field ei_ebhscr_err_status_flag; |
748 | | static expert_field ei_ebhscr_info_status_flag; |
749 | | static expert_field ei_ebhscr_err_channel_flag; |
750 | | static expert_field ei_ebhscr_warn_mjr_hdr_status_flag; |
751 | | static expert_field ei_ebhscr_warn_csi2_hdr_error_flag; |
752 | | |
753 | | static dissector_handle_t ebhscr_handle; |
754 | | |
755 | | static dissector_handle_t can_handle; |
756 | | static dissector_handle_t can_fd_handle; |
757 | | static dissector_handle_t eth_withfcs_handle; |
758 | | static dissector_handle_t eth_withoutfcs_handle; |
759 | | static dissector_handle_t flexray_handle; |
760 | | static dissector_handle_t ebhscr_user_handle; |
761 | | |
762 | | static dissector_table_t subdissector_table; |
763 | | |
764 | | static int dissect_ebhscr_can(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, |
765 | | proto_tree *ebhscr_packet_header_tree, uint16_t ebhscr_status, |
766 | | uint32_t ebhscr_frame_length) |
767 | 0 | { |
768 | 0 | uint16_t can_proto_status, can_type; |
769 | 0 | uint32_t ebhscr_current_payload_length; |
770 | 0 | tvbuff_t* next_tvb; |
771 | 0 | proto_item *ti; |
772 | |
|
773 | 0 | ti = proto_tree_add_bitmask(ebhscr_packet_header_tree, tvb, 2, hf_ebhscr_status, ett_ebhscr_status, |
774 | 0 | can_status_bits, ENC_BIG_ENDIAN); |
775 | |
|
776 | 0 | can_proto_status = (ebhscr_status & 0x0002); |
777 | 0 | if (can_proto_status) { |
778 | 0 | proto_tree_add_bitmask(ebhscr_packet_header_tree, tvb, 24, hf_ebhscr_mjr_hdr, ett_ebhscr_mjr_hdr, |
779 | 0 | can_mjr_hdr_bits, ENC_BIG_ENDIAN); |
780 | 0 | expert_add_info(pinfo, ti, &ei_ebhscr_info_status_flag); |
781 | 0 | } |
782 | 0 | else { |
783 | 0 | proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_mjr_hdr, tvb, 24, 8, ENC_BIG_ENDIAN); |
784 | 0 | } |
785 | | |
786 | | /* received hdr only and no data */ |
787 | 0 | if (ebhscr_frame_length == EBHSCR_HEADER_LENGTH) { |
788 | 0 | return tvb_captured_length(tvb); |
789 | 0 | } |
790 | 0 | ebhscr_current_payload_length = ebhscr_frame_length - EBHSCR_HEADER_LENGTH; |
791 | | /* payload is CAN or CAN FD frame */ |
792 | 0 | next_tvb = tvb_new_subset_length(tvb, 32, ebhscr_current_payload_length); |
793 | |
|
794 | 0 | can_type = (ebhscr_status & 0x0001); |
795 | |
|
796 | 0 | if (can_type) { |
797 | 0 | call_dissector(can_fd_handle, next_tvb, pinfo, tree); |
798 | 0 | } |
799 | 0 | else { |
800 | 0 | call_dissector(can_handle, next_tvb, pinfo, tree); |
801 | 0 | } |
802 | 0 | return tvb_captured_length(tvb); |
803 | 0 | } |
804 | | |
805 | | static int dissect_ebhscr_eth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, |
806 | | proto_tree *ebhscr_packet_header_tree, uint16_t ebhscr_status, |
807 | | uint32_t ebhscr_frame_length) |
808 | 0 | { |
809 | 0 | tvbuff_t* next_tvb; |
810 | 0 | proto_item *ti; |
811 | 0 | uint8_t channel; |
812 | 0 | uint32_t ebhscr_current_payload_length; |
813 | 0 | uint64_t major_hrd, fsc_not_present, link_up, link_speed; |
814 | 0 | ebhscr_current_payload_length = ebhscr_frame_length - EBHSCR_HEADER_LENGTH; |
815 | |
|
816 | 0 | ti = proto_tree_add_bitmask(ebhscr_packet_header_tree, tvb, 2, hf_ebhscr_status, |
817 | 0 | ett_ebhscr_status, eth_rx_error_bits, ENC_BIG_ENDIAN); |
818 | |
|
819 | 0 | if (ebhscr_status) { |
820 | 0 | expert_add_info(pinfo, ti, &ei_ebhscr_err_status_flag); |
821 | 0 | } |
822 | |
|
823 | 0 | channel = (tvb_get_uint8(tvb, 1) & 0x1C) >> 2; |
824 | 0 | major_hrd = tvb_get_uint64(tvb, 24, ENC_BIG_ENDIAN); |
825 | |
|
826 | 0 | proto_tree_add_bitmask(ebhscr_packet_header_tree, tvb, 24, hf_ebhscr_mjr_hdr, ett_ebhscr_mjr_hdr, |
827 | 0 | eth_mjr_hdr_bits, ENC_BIG_ENDIAN); |
828 | |
|
829 | 0 | fsc_not_present = (major_hrd & 0x0000000400000000); |
830 | 0 | link_up = (major_hrd & 0x0000000100000000) ? 1 : 0; |
831 | 0 | link_speed = (major_hrd & 0x00000000F0000000) >> 28U; |
832 | | /* received hdr only and no data */ |
833 | 0 | if (ebhscr_frame_length == EBHSCR_HEADER_LENGTH) { |
834 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "Ethernet controller %d %s", channel, val64_to_str_const(link_up, eth_link_strings, "")); |
835 | 0 | if (link_up) |
836 | 0 | { |
837 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, " %s", val64_to_str_const(link_speed, eth_speed_strings, "Speed unknown")); |
838 | 0 | } |
839 | 0 | return tvb_captured_length(tvb); |
840 | 0 | } |
841 | | /* payload is 802.3 Ethernet frame */ |
842 | 0 | next_tvb = tvb_new_subset_length(tvb, 32, ebhscr_current_payload_length); |
843 | 0 | if (fsc_not_present) { |
844 | 0 | call_dissector(eth_withoutfcs_handle, next_tvb, pinfo, tree); |
845 | 0 | } |
846 | 0 | else { |
847 | 0 | call_dissector(eth_withfcs_handle, next_tvb, pinfo, tree); |
848 | 0 | } |
849 | 0 | return tvb_captured_length(tvb); |
850 | 0 | } |
851 | | |
852 | | static int dissect_ebhscr_nmea(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, |
853 | | proto_tree *ebhscr_packet_header_tree, uint32_t ebhscr_frame_length, |
854 | | uint32_t ebhscr_length) |
855 | 0 | { |
856 | 0 | tvbuff_t* next_tvb; |
857 | 0 | uint8_t *nmea_str; |
858 | 0 | uint32_t ebhscr_current_payload_length; |
859 | |
|
860 | 0 | if (ebhscr_frame_length == EBHSCR_HEADER_LENGTH) { |
861 | 0 | return tvb_captured_length(tvb); |
862 | 0 | } |
863 | | |
864 | 0 | ebhscr_current_payload_length = ebhscr_frame_length - EBHSCR_HEADER_LENGTH; |
865 | |
|
866 | 0 | proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_status_unused, tvb, 2, 2, ENC_BIG_ENDIAN); |
867 | 0 | proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_mjr_hdr_unused, tvb, 24, 8, ENC_BIG_ENDIAN); |
868 | |
|
869 | 0 | next_tvb = tvb_new_subset_length(tvb, 32, ebhscr_current_payload_length); |
870 | 0 | call_data_dissector(next_tvb, pinfo, tree); |
871 | 0 | nmea_str = tvb_get_string_enc(pinfo->pool, tvb, 32, ebhscr_length, ENC_UTF_8); |
872 | 0 | col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s", "NMEA:", nmea_str); |
873 | 0 | return tvb_captured_length(tvb); |
874 | 0 | } |
875 | | |
876 | | static int dissect_ebhscr_ts(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, |
877 | | proto_tree *ebhscr_packet_header_tree, uint16_t ebhscr_status, |
878 | | uint32_t ebhscr_frame_length) |
879 | 0 | { |
880 | 0 | tvbuff_t* next_tvb; |
881 | 0 | uint32_t ebhscr_current_payload_length; |
882 | 0 | uint64_t time_source = 0; |
883 | 0 | proto_item *ti; |
884 | |
|
885 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "TimeState:"); |
886 | 0 | ti = proto_tree_add_bitmask(ebhscr_packet_header_tree, tvb, 2, hf_ebhscr_status, ett_ebhscr_status, |
887 | 0 | ts_status_bits, ENC_BIG_ENDIAN); |
888 | |
|
889 | 0 | if (ebhscr_status) { |
890 | 0 | expert_add_info(pinfo, ti, &ei_ebhscr_info_status_flag); |
891 | 0 | } |
892 | 0 | proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_mjr_hdr, tvb, 24, 8, ENC_BIG_ENDIAN); |
893 | 0 | proto_tree_add_item_ret_uint64(ebhscr_packet_header_tree, hf_ts_time_source, tvb, 24, 8, ENC_BIG_ENDIAN, &time_source); |
894 | 0 | col_append_str(pinfo->cinfo, COL_INFO, val64_to_str_const(time_source, ts_time_source_strings, "Unknown Time Source")); |
895 | |
|
896 | 0 | if (ebhscr_frame_length == EBHSCR_HEADER_LENGTH) { |
897 | 0 | return tvb_captured_length(tvb); |
898 | 0 | } |
899 | | |
900 | 0 | ebhscr_current_payload_length = ebhscr_frame_length - EBHSCR_HEADER_LENGTH; |
901 | 0 | if (ebhscr_current_payload_length < 28) { |
902 | 0 | return tvb_captured_length(tvb); |
903 | 0 | } |
904 | | |
905 | | /* display params only if the appropriate valid bit is set */ |
906 | 0 | if ((ebhscr_status & 0x001) != 0) { |
907 | 0 | proto_tree_add_item(ebhscr_packet_header_tree, hf_ts_time_offset_ns, tvb, 32, 8, ENC_BIG_ENDIAN); |
908 | 0 | } |
909 | 0 | if ((ebhscr_status & 0x002) != 0) { |
910 | 0 | proto_tree_add_item(ebhscr_packet_header_tree, hf_ts_last_offset_ns, tvb, 40, 8, ENC_BIG_ENDIAN); |
911 | 0 | } |
912 | 0 | if ((ebhscr_status & 0x004) != 0) { |
913 | 0 | proto_tree_add_item(ebhscr_packet_header_tree, hf_ts_last_jump_ns, tvb, 48, 8, ENC_BIG_ENDIAN); |
914 | 0 | } |
915 | 0 | if ((ebhscr_status & 0x008) != 0) { |
916 | 0 | proto_tree_add_item(ebhscr_packet_header_tree, hf_ts_utc_leap_sec, tvb, 56, 2, ENC_BIG_ENDIAN); |
917 | 0 | } |
918 | 0 | if ((ebhscr_status & 0x010) != 0) { |
919 | 0 | proto_tree_add_item(ebhscr_packet_header_tree, hf_ts_sync_state, tvb, 58, 2, ENC_BIG_ENDIAN); |
920 | 0 | } |
921 | |
|
922 | 0 | next_tvb = tvb_new_subset_length(tvb, 32, ebhscr_current_payload_length); |
923 | 0 | call_data_dissector(next_tvb, pinfo, tree); |
924 | |
|
925 | 0 | return tvb_captured_length(tvb); |
926 | 0 | } |
927 | | |
928 | | static int dissect_ebhscr_lin(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ebhscr_tree, |
929 | | proto_tree *ebhscr_packet_header_tree, uint16_t ebhscr_status, uint32_t ebhscr_frame_length) |
930 | 0 | { |
931 | 0 | proto_item* ti; |
932 | 0 | proto_tree *lin_payload_tree, *lin_pid_tree; |
933 | 0 | uint32_t ebhscr_current_payload_length; |
934 | |
|
935 | 0 | ebhscr_current_payload_length = ebhscr_frame_length - EBHSCR_HEADER_LENGTH; |
936 | |
|
937 | 0 | ti = proto_tree_add_bitmask(ebhscr_packet_header_tree, tvb, 2, hf_ebhscr_status, |
938 | 0 | ett_ebhscr_status, lin_status_bits, ENC_BIG_ENDIAN); |
939 | |
|
940 | 0 | if (ebhscr_status) { |
941 | 0 | expert_add_info(pinfo, ti, &ei_ebhscr_info_status_flag); |
942 | 0 | } |
943 | |
|
944 | 0 | if ((ebhscr_status & 0x0010) != 0) { |
945 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "LIN Wake-Up Packet"); |
946 | 0 | } |
947 | 0 | else { |
948 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "LIN Frame"); |
949 | 0 | } |
950 | |
|
951 | 0 | proto_tree_add_bitmask(ebhscr_packet_header_tree, tvb, 24, hf_ebhscr_mjr_hdr, ett_ebhscr_mjr_hdr, |
952 | 0 | lin_mjr_hdr_bits, ENC_BIG_ENDIAN); |
953 | | |
954 | | /* received hdr only and no data */ |
955 | 0 | if (ebhscr_frame_length == EBHSCR_HEADER_LENGTH) { |
956 | 0 | return tvb_captured_length(tvb); |
957 | 0 | } |
958 | | |
959 | 0 | ti = proto_tree_add_item(ebhscr_tree, hf_lin_payload, tvb, 32, ebhscr_current_payload_length, ENC_NA); |
960 | 0 | lin_payload_tree = proto_item_add_subtree(ti, ett_lin_payload); |
961 | |
|
962 | 0 | ti = proto_tree_add_item(lin_payload_tree, hf_lin_payload_pid, tvb, 32, 1, ENC_BIG_ENDIAN); |
963 | 0 | lin_pid_tree = proto_item_add_subtree(ti, ett_lin_payload); |
964 | 0 | proto_tree_add_bitmask_list(lin_pid_tree, tvb, 32, 1, lin_payload_pid_bits, ENC_BIG_ENDIAN); |
965 | |
|
966 | 0 | proto_tree_add_item(lin_payload_tree, hf_lin_payload_data, tvb, EBHSCR_HEADER_LENGTH + 1, ebhscr_current_payload_length - 2, ENC_NA); |
967 | 0 | proto_tree_add_item(lin_payload_tree, hf_lin_payload_checksum, tvb, EBHSCR_HEADER_LENGTH + ebhscr_current_payload_length - 1, 1, ENC_BIG_ENDIAN); |
968 | |
|
969 | 0 | return tvb_captured_length(tvb); |
970 | 0 | } |
971 | | |
972 | | static int |
973 | | dissect_ebhscr_dio(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, |
974 | | proto_tree *ebhscr_packet_header_tree, uint16_t ebhscr_status, uint32_t ebhscr_frame_length) |
975 | 0 | { |
976 | 0 | tvbuff_t* next_tvb; |
977 | 0 | proto_item *ti; |
978 | 0 | uint32_t ebhscr_current_payload_length; |
979 | |
|
980 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "DIO:"); |
981 | 0 | ebhscr_current_payload_length = ebhscr_frame_length - EBHSCR_HEADER_LENGTH; |
982 | |
|
983 | 0 | ti = proto_tree_add_bitmask(ebhscr_packet_header_tree, tvb, 2, hf_ebhscr_status, |
984 | 0 | ett_ebhscr_status, dio_status_bits, ENC_BIG_ENDIAN); |
985 | |
|
986 | 0 | if (ebhscr_status) { |
987 | 0 | expert_add_info(pinfo, ti, &ei_ebhscr_err_status_flag); |
988 | 0 | } |
989 | 0 | proto_tree_add_bitmask(ebhscr_packet_header_tree, tvb, 24, hf_ebhscr_mjr_hdr, ett_ebhscr_mjr_hdr, |
990 | 0 | dio_mjr_hdr_bits, ENC_BIG_ENDIAN); |
991 | |
|
992 | 0 | if (ebhscr_frame_length == EBHSCR_HEADER_LENGTH) { |
993 | 0 | return tvb_captured_length(tvb); |
994 | 0 | } |
995 | | |
996 | 0 | next_tvb = tvb_new_subset_length(tvb, 32, ebhscr_current_payload_length); |
997 | 0 | call_data_dissector(next_tvb, pinfo, tree); |
998 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, " %s", tvb_bytes_to_str_punct(pinfo->pool, tvb, 32, ebhscr_current_payload_length, ' ')); |
999 | |
|
1000 | 0 | return tvb_captured_length(tvb); |
1001 | 0 | } |
1002 | | |
1003 | | static int dissect_ebhscr_flexray_frame_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, |
1004 | | proto_tree *ebhscr_packet_header_tree, uint16_t ebhscr_status, |
1005 | | uint32_t ebhscr_current_payload_length) |
1006 | 0 | { |
1007 | 0 | proto_item *ti; |
1008 | 0 | proto_tree *flexray_mhdr_tree, *flexray_mhdr_sub_tree, *flexray_status_tree; |
1009 | 0 | tvbuff_t *fr_tvb, *hdr_tvb; |
1010 | 0 | uint8_t channel; |
1011 | 0 | uint8_t header_data[2U]; |
1012 | |
|
1013 | 0 | ti = proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_status, tvb, 2, 2, ENC_BIG_ENDIAN); |
1014 | 0 | flexray_status_tree = proto_item_add_subtree(ti, ett_ebhscr_status); |
1015 | 0 | proto_tree_add_bitmask_list(flexray_status_tree, tvb, 2, 2, flexray_frame_status_bits, ENC_BIG_ENDIAN); |
1016 | |
|
1017 | 0 | ti = proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_mjr_hdr, tvb, 24, 8, ENC_BIG_ENDIAN); |
1018 | 0 | flexray_mhdr_tree = proto_item_add_subtree(ti, ett_ebhscr_mjr_hdr); |
1019 | |
|
1020 | 0 | ti = proto_tree_add_item(flexray_mhdr_tree, hf_flexray_slot_information, tvb, 24, 2, ENC_BIG_ENDIAN); |
1021 | 0 | flexray_mhdr_sub_tree = proto_item_add_subtree(ti, ett_ebhscr_mjr_hdr); |
1022 | 0 | proto_tree_add_bitmask_list(flexray_mhdr_sub_tree, tvb, 24, 2, flexray_mhdr_slot_information_bits, ENC_BIG_ENDIAN); |
1023 | |
|
1024 | 0 | ti = proto_tree_add_item(flexray_mhdr_tree, hf_flexray_frame_status, tvb, 26, 2, ENC_BIG_ENDIAN); |
1025 | 0 | flexray_mhdr_sub_tree = proto_item_add_subtree(ti, ett_ebhscr_mjr_hdr); |
1026 | 0 | proto_tree_add_bitmask_list(flexray_mhdr_sub_tree, tvb, 26, 2, flexray_mhdr_frame_status_bits, ENC_BIG_ENDIAN); |
1027 | |
|
1028 | 0 | proto_tree_add_item(flexray_mhdr_tree, hf_flexray_supercycle_counter, tvb, 28, 4, ENC_BIG_ENDIAN); |
1029 | |
|
1030 | 0 | fr_tvb = tvb_new_composite(); |
1031 | |
|
1032 | 0 | header_data[0] = 0x01; |
1033 | 0 | channel = tvb_get_uint8(tvb, 1); |
1034 | |
|
1035 | 0 | if ((channel & FLEXRAY_CHANNEL_B_MASK) != 0) { |
1036 | 0 | header_data[0] |= 0x80; |
1037 | 0 | } |
1038 | |
|
1039 | 0 | header_data[1] = 0x00; |
1040 | |
|
1041 | 0 | if ((ebhscr_status & FLEXRAY_TSSVIOL_MASK) != 0) { |
1042 | 0 | header_data[1] |= 0x01; |
1043 | 0 | } |
1044 | 0 | if ((ebhscr_status & FLEXRAY_CODERR_MASK) != 0) { |
1045 | 0 | header_data[1] |= 0x02; |
1046 | 0 | } |
1047 | 0 | if ((ebhscr_status & FLEXRAY_FESERR_MASK) != 0) { |
1048 | 0 | header_data[1] |= 0x04; |
1049 | 0 | } |
1050 | 0 | if ((ebhscr_status & FLEXRAY_HCRCERR_MASK) != 0) { |
1051 | 0 | header_data[1] |= 0x08; |
1052 | 0 | } |
1053 | 0 | if ((ebhscr_status & FLEXRAY_FCRCERR_MASK) != 0) { |
1054 | 0 | header_data[1] |= 0x10; |
1055 | 0 | } |
1056 | |
|
1057 | 0 | hdr_tvb = tvb_new_child_real_data(tvb, header_data, 2U, 2U); |
1058 | |
|
1059 | 0 | tvb_composite_append(fr_tvb, hdr_tvb); |
1060 | 0 | tvb_composite_append(fr_tvb, tvb_new_subset_length(tvb, 32, ebhscr_current_payload_length)); |
1061 | |
|
1062 | 0 | tvb_composite_finalize(fr_tvb); |
1063 | 0 | call_dissector(flexray_handle, fr_tvb, pinfo, tree); |
1064 | |
|
1065 | 0 | return tvb_captured_length(tvb); |
1066 | 0 | } |
1067 | | |
1068 | | static int dissect_ebhscr_flexray_symbol_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, |
1069 | | proto_tree *ebhscr_packet_header_tree) |
1070 | 0 | { |
1071 | 0 | tvbuff_t* symbol_tvb; |
1072 | 0 | proto_item *ti; |
1073 | 0 | proto_tree *flexray_mhdr_tree, *flexray_mhdr_sub_tree, *flexray_status_tree; |
1074 | 0 | uint8_t symbol_length, channel; |
1075 | 0 | uint8_t flexray_symbol_packet[2U]; |
1076 | |
|
1077 | 0 | ti = proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_status, tvb, 2, 2, ENC_BIG_ENDIAN); |
1078 | 0 | flexray_status_tree = proto_item_add_subtree(ti, ett_ebhscr_status); |
1079 | 0 | proto_tree_add_bitmask_list(flexray_status_tree, tvb, 2, 2, flexray_status_bits, ENC_BIG_ENDIAN); |
1080 | |
|
1081 | 0 | ti = proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_mjr_hdr, tvb, 24, 8, ENC_BIG_ENDIAN); |
1082 | 0 | flexray_mhdr_tree = proto_item_add_subtree(ti, ett_ebhscr_mjr_hdr); |
1083 | |
|
1084 | 0 | ti = proto_tree_add_item(flexray_mhdr_tree, hf_flexray_slot_information, tvb, 24, 2, ENC_BIG_ENDIAN); |
1085 | 0 | flexray_mhdr_sub_tree = proto_item_add_subtree(ti, ett_ebhscr_mjr_hdr); |
1086 | 0 | proto_tree_add_bitmask_list(flexray_mhdr_sub_tree, tvb, 24, 2, flexray_mhdr_slot_information_bits, ENC_BIG_ENDIAN); |
1087 | |
|
1088 | 0 | ti = proto_tree_add_item(flexray_mhdr_tree, hf_flexray_frame_status, tvb, 26, 2, ENC_BIG_ENDIAN); |
1089 | 0 | flexray_mhdr_sub_tree = proto_item_add_subtree(ti, ett_ebhscr_mjr_hdr); |
1090 | 0 | proto_tree_add_bitmask_list(flexray_mhdr_sub_tree, tvb, 26, 2, flexray_mhdr_frame_status_bits, ENC_BIG_ENDIAN); |
1091 | |
|
1092 | 0 | ti = proto_tree_add_item(flexray_mhdr_tree, hf_flexray_symbol_length_and_status, tvb, 28, 1, ENC_BIG_ENDIAN); |
1093 | 0 | flexray_mhdr_sub_tree = proto_item_add_subtree(ti, ett_ebhscr_mjr_hdr); |
1094 | 0 | proto_tree_add_bitmask_list(flexray_mhdr_sub_tree, tvb, 28, 1, flexray_mhdr_symbol_length_and_status_bits, ENC_BIG_ENDIAN); |
1095 | |
|
1096 | 0 | symbol_length = tvb_get_uint8(tvb, 28) & 0x7F; |
1097 | |
|
1098 | 0 | flexray_symbol_packet[0] = 0x02; |
1099 | |
|
1100 | 0 | channel = tvb_get_uint8(tvb, 1); |
1101 | |
|
1102 | 0 | if ((channel & FLEXRAY_CHANNEL_B_MASK) != 0) { |
1103 | 0 | flexray_symbol_packet[0] |= 0x80; |
1104 | 0 | } |
1105 | |
|
1106 | 0 | flexray_symbol_packet[1] = symbol_length; |
1107 | |
|
1108 | 0 | symbol_tvb = tvb_new_real_data(flexray_symbol_packet, 2U, 2U); |
1109 | 0 | call_dissector(flexray_handle, symbol_tvb, pinfo, tree); |
1110 | |
|
1111 | 0 | return tvb_captured_length(tvb); |
1112 | 0 | } |
1113 | | |
1114 | | static int dissect_ebhscr_flexray_slot_status_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ebhscr_packet_header_tree) |
1115 | 0 | { |
1116 | 0 | uint32_t supercycle_counter; |
1117 | 0 | proto_item *ti; |
1118 | 0 | proto_tree *flexray_mhdr_tree, *flexray_mhdr_sub_tree, *flexray_status_tree; |
1119 | |
|
1120 | 0 | supercycle_counter = tvb_get_uint32(tvb, 28, ENC_BIG_ENDIAN); |
1121 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, " SLSTS: SCC %d", supercycle_counter); |
1122 | |
|
1123 | 0 | ti = proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_status, tvb, 2, 2, ENC_BIG_ENDIAN); |
1124 | 0 | flexray_status_tree = proto_item_add_subtree(ti, ett_ebhscr_status); |
1125 | 0 | proto_tree_add_bitmask_list(flexray_status_tree, tvb, 2, 2, flexray_slot_status_bits, ENC_BIG_ENDIAN); |
1126 | |
|
1127 | 0 | ti = proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_mjr_hdr, tvb, 24, 8, ENC_BIG_ENDIAN); |
1128 | 0 | flexray_mhdr_tree = proto_item_add_subtree(ti, ett_ebhscr_mjr_hdr); |
1129 | |
|
1130 | 0 | ti = proto_tree_add_item(flexray_mhdr_tree, hf_flexray_slot_information, tvb, 24, 2, ENC_BIG_ENDIAN); |
1131 | 0 | flexray_mhdr_sub_tree = proto_item_add_subtree(ti, ett_ebhscr_mjr_hdr); |
1132 | 0 | proto_tree_add_bitmask_list(flexray_mhdr_sub_tree, tvb, 24, 2, flexray_mhdr_slot_information_bits, ENC_BIG_ENDIAN); |
1133 | |
|
1134 | 0 | ti = proto_tree_add_item(flexray_mhdr_tree, hf_flexray_frame_status, tvb, 26, 2, ENC_BIG_ENDIAN); |
1135 | 0 | flexray_mhdr_sub_tree = proto_item_add_subtree(ti, ett_ebhscr_mjr_hdr); |
1136 | 0 | proto_tree_add_bitmask_list(flexray_mhdr_sub_tree, tvb, 26, 2, flexray_mhdr_frame_status_bits, ENC_BIG_ENDIAN); |
1137 | |
|
1138 | 0 | proto_tree_add_item(flexray_mhdr_tree, hf_flexray_supercycle_counter, tvb, 28, 4, ENC_BIG_ENDIAN); |
1139 | |
|
1140 | 0 | return tvb_captured_length(tvb); |
1141 | 0 | } |
1142 | | |
1143 | | static int dissect_ebhscr_flexray_start_of_cycle_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ebhscr_packet_header_tree) |
1144 | 0 | { |
1145 | 0 | uint8_t cycle_counter; |
1146 | 0 | uint32_t supercycle_counter; |
1147 | 0 | proto_item *ti; |
1148 | 0 | proto_tree *flexray_mhdr_tree, *flexray_status_tree; |
1149 | |
|
1150 | 0 | cycle_counter = tvb_get_uint8(tvb, 25); |
1151 | 0 | supercycle_counter = tvb_get_uint32(tvb, 28, ENC_BIG_ENDIAN); |
1152 | |
|
1153 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, " SOC: CC %2d SCC %d", cycle_counter, supercycle_counter); |
1154 | |
|
1155 | 0 | ti = proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_status, tvb, 2, 2, ENC_BIG_ENDIAN); |
1156 | 0 | flexray_status_tree = proto_item_add_subtree(ti, ett_ebhscr_status); |
1157 | 0 | proto_tree_add_bitmask_list(flexray_status_tree, tvb, 2, 2, flexray_status_bits, ENC_BIG_ENDIAN); |
1158 | |
|
1159 | 0 | ti = proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_mjr_hdr, tvb, 24, 8, ENC_BIG_ENDIAN); |
1160 | 0 | flexray_mhdr_tree = proto_item_add_subtree(ti, ett_ebhscr_mjr_hdr); |
1161 | |
|
1162 | 0 | proto_tree_add_item(flexray_mhdr_tree, hf_flexray_POC_state, tvb, 24, 1, ENC_BIG_ENDIAN); |
1163 | |
|
1164 | 0 | proto_tree_add_item(flexray_mhdr_tree, hf_flexray_following_cycle_counter, tvb, 25, 1, ENC_BIG_ENDIAN); |
1165 | |
|
1166 | 0 | proto_tree_add_item(flexray_mhdr_tree, hf_flexray_supercycle_counter, tvb, 28, 4, ENC_BIG_ENDIAN); |
1167 | |
|
1168 | 0 | return tvb_captured_length(tvb); |
1169 | 0 | } |
1170 | | |
1171 | | static int dissect_ebhscr_flexray(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, |
1172 | | proto_tree *ebhscr_packet_header_tree, proto_item *ebhscr_channel, |
1173 | | uint16_t ebhscr_status, uint32_t ebhscr_frame_length) |
1174 | 0 | { |
1175 | 0 | proto_tree *flexray_channel_tree; |
1176 | 0 | uint32_t flexray_packet_type; |
1177 | 0 | uint32_t ebhscr_current_payload_length; |
1178 | |
|
1179 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "FLEXRAY:"); |
1180 | 0 | ebhscr_current_payload_length = ebhscr_frame_length - EBHSCR_HEADER_LENGTH; |
1181 | |
|
1182 | 0 | flexray_channel_tree = proto_item_add_subtree(ebhscr_channel, ett_ebhscr_channel); |
1183 | 0 | proto_tree_add_bitmask_list(flexray_channel_tree, tvb, 1, 1, flexray_channel_bits, ENC_BIG_ENDIAN); |
1184 | |
|
1185 | 0 | flexray_packet_type = (ebhscr_status & 0xC) >> 2U; |
1186 | |
|
1187 | 0 | if (flexray_packet_type == FLEXRAY_FRAME_PACKET) { |
1188 | 0 | dissect_ebhscr_flexray_frame_packet(tvb, pinfo, tree, ebhscr_packet_header_tree, ebhscr_status, ebhscr_current_payload_length); |
1189 | 0 | } |
1190 | 0 | else if (flexray_packet_type == FLEXRAY_SYMBOL_PACKET) { |
1191 | 0 | dissect_ebhscr_flexray_symbol_packet(tvb, pinfo, tree, ebhscr_packet_header_tree); |
1192 | 0 | } |
1193 | 0 | else if (flexray_packet_type == FLEXRAY_SLOT_STATUS_PACKET) { |
1194 | 0 | dissect_ebhscr_flexray_slot_status_packet(tvb, pinfo, ebhscr_packet_header_tree); |
1195 | 0 | } |
1196 | 0 | else if (flexray_packet_type == FLEXRAY_START_OF_CYCLE_PACKET) { |
1197 | 0 | dissect_ebhscr_flexray_start_of_cycle_packet(tvb, pinfo, ebhscr_packet_header_tree); |
1198 | 0 | } |
1199 | |
|
1200 | 0 | return tvb_captured_length(tvb); |
1201 | 0 | } |
1202 | | |
1203 | | static int dissect_ebhscr_dsi3_slave_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ebhscr_packet_header_tree) |
1204 | 0 | { |
1205 | 0 | proto_item *ti; |
1206 | 0 | proto_tree *dsi3_mhdr_tree; |
1207 | 0 | uint8_t mjr_hdr_st2_flags; |
1208 | 0 | uint8_t mjr_hdr_st3_flags; |
1209 | |
|
1210 | 0 | col_append_str(pinfo->cinfo, COL_INFO, "SLAVE:"); |
1211 | |
|
1212 | 0 | ti = proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_mjr_hdr, tvb, 24, 8, ENC_BIG_ENDIAN); |
1213 | 0 | dsi3_mhdr_tree = proto_item_add_subtree(ti, ett_ebhscr_mjr_hdr); |
1214 | 0 | proto_tree_add_bitmask_list(dsi3_mhdr_tree, tvb, 24, 4, dis3_mjr_hdr_slave_status_bits, ENC_BIG_ENDIAN); |
1215 | |
|
1216 | 0 | mjr_hdr_st2_flags = tvb_get_uint8(tvb, 26) & 0x03; |
1217 | 0 | if (mjr_hdr_st2_flags) { |
1218 | 0 | expert_add_info(pinfo, ti, &ei_ebhscr_warn_mjr_hdr_status_flag); |
1219 | 0 | } |
1220 | |
|
1221 | 0 | mjr_hdr_st3_flags = tvb_get_uint8(tvb, 27) & 0x1F; |
1222 | 0 | if (mjr_hdr_st3_flags) { |
1223 | 0 | expert_add_info(pinfo, ti, &ei_ebhscr_warn_mjr_hdr_status_flag); |
1224 | 0 | } |
1225 | |
|
1226 | 0 | return tvb_captured_length(tvb); |
1227 | 0 | } |
1228 | | |
1229 | | static int dissect_ebhscr_dsi3_master_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ebhscr_packet_header_tree) |
1230 | 0 | { |
1231 | 0 | proto_item *ti; |
1232 | 0 | proto_tree *dsi3_mhdr_tree; |
1233 | 0 | uint8_t mjr_hdr_st2_flags; |
1234 | 0 | uint8_t mjr_hdr_st3_flags; |
1235 | |
|
1236 | 0 | col_append_str(pinfo->cinfo, COL_INFO, "MASTER:"); |
1237 | |
|
1238 | 0 | ti = proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_mjr_hdr, tvb, 24, 8, ENC_BIG_ENDIAN); |
1239 | 0 | dsi3_mhdr_tree = proto_item_add_subtree(ti, ett_ebhscr_mjr_hdr); |
1240 | 0 | proto_tree_add_bitmask_list(dsi3_mhdr_tree, tvb, 24, 4, dis3_mjr_hdr_master_status_bits, ENC_BIG_ENDIAN); |
1241 | |
|
1242 | 0 | mjr_hdr_st2_flags = tvb_get_uint8(tvb, 26) & 0x0F; |
1243 | 0 | if (mjr_hdr_st2_flags) { |
1244 | 0 | expert_add_info(pinfo, ti, &ei_ebhscr_warn_mjr_hdr_status_flag); |
1245 | 0 | } |
1246 | |
|
1247 | 0 | mjr_hdr_st3_flags = tvb_get_uint8(tvb, 27) & 0x3F; |
1248 | 0 | if (mjr_hdr_st3_flags) { |
1249 | 0 | expert_add_info(pinfo, ti, &ei_ebhscr_warn_mjr_hdr_status_flag); |
1250 | 0 | } |
1251 | |
|
1252 | 0 | return tvb_captured_length(tvb); |
1253 | 0 | } |
1254 | | |
1255 | | static int dissect_ebhscr_dsi3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *ebhscr_packet_header_tree, |
1256 | | proto_item *ebhscr_channel, uint16_t ebhscr_status, uint32_t ebhscr_frame_length) |
1257 | 0 | { |
1258 | 0 | proto_item *ti; |
1259 | 0 | tvbuff_t *next_tvb; |
1260 | 0 | proto_tree *dsi3_status_tree; |
1261 | 0 | proto_tree *dsi3_channel_tree; |
1262 | 0 | uint16_t dsi3_channel_val; |
1263 | 0 | uint32_t ebhscr_current_payload_length; |
1264 | |
|
1265 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "DSI3_"); |
1266 | 0 | ebhscr_current_payload_length = ebhscr_frame_length - EBHSCR_HEADER_LENGTH; |
1267 | |
|
1268 | 0 | dsi3_channel_val = tvb_get_uint16(tvb, 0, ENC_BIG_ENDIAN) & 0x3F; |
1269 | 0 | dsi3_channel_tree = proto_item_add_subtree(ebhscr_channel, ett_ebhscr_channel); |
1270 | |
|
1271 | 0 | ti = proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_status, tvb, 2, 2, ENC_BIG_ENDIAN); |
1272 | 0 | dsi3_status_tree = proto_item_add_subtree(ti, ett_ebhscr_status); |
1273 | 0 | proto_tree_add_bitmask_list(dsi3_status_tree, tvb, 2, 2, dsi3_status_bits, ENC_BIG_ENDIAN); |
1274 | |
|
1275 | 0 | if (ebhscr_status) { |
1276 | 0 | expert_add_info(pinfo, ti, &ei_ebhscr_err_status_flag); |
1277 | 0 | } |
1278 | |
|
1279 | 0 | if (dsi3_channel_val == DSI3_CHANNEL_SLAVE) { |
1280 | 0 | dissect_ebhscr_dsi3_slave_packet(tvb, pinfo, ebhscr_packet_header_tree); |
1281 | 0 | } |
1282 | 0 | else if (dsi3_channel_val == DSI3_CHANNEL_MASTER) { |
1283 | 0 | dissect_ebhscr_dsi3_master_packet(tvb, pinfo, ebhscr_packet_header_tree); |
1284 | 0 | } |
1285 | 0 | else |
1286 | 0 | { |
1287 | 0 | col_append_str(pinfo->cinfo, COL_INFO, "CH_ERR:"); |
1288 | 0 | proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_mjr_hdr_unused, tvb, 24, 8, ENC_BIG_ENDIAN); |
1289 | 0 | expert_add_info(pinfo, dsi3_channel_tree, &ei_ebhscr_err_channel_flag); |
1290 | 0 | } |
1291 | |
|
1292 | 0 | if (ebhscr_frame_length == EBHSCR_HEADER_LENGTH) { |
1293 | 0 | return tvb_captured_length(tvb); |
1294 | 0 | } |
1295 | | |
1296 | 0 | next_tvb = tvb_new_subset_length(tvb, 32, ebhscr_current_payload_length); |
1297 | 0 | call_data_dissector(next_tvb, pinfo, tree); |
1298 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, " %s", tvb_bytes_to_str_punct(pinfo->pool, tvb, 32, ebhscr_current_payload_length, ' ')); |
1299 | |
|
1300 | 0 | return tvb_captured_length(tvb); |
1301 | 0 | } |
1302 | | |
1303 | | static int dissect_ebhscr_mipi_csi2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, |
1304 | | proto_tree *ebhscr_packet_header_tree, uint16_t ebhscr_status, uint32_t ebhscr_frame_length) |
1305 | 0 | { |
1306 | 0 | proto_item * ti; |
1307 | 0 | tvbuff_t* next_tvb; |
1308 | 0 | proto_tree *mipi_csi2_status_tree; |
1309 | 0 | proto_tree *mipi_csi2_mhdr_tree; |
1310 | 0 | proto_tree *mipi_csi2_payload_pkt_header_subtree; |
1311 | 0 | uint8_t mjr_hdr_flags; |
1312 | 0 | uint32_t ebhscr_current_payload_length; |
1313 | |
|
1314 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "MIPI_CSI2:"); |
1315 | 0 | ebhscr_current_payload_length = ebhscr_frame_length - EBHSCR_HEADER_LENGTH; |
1316 | |
|
1317 | 0 | ti = proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_status, tvb, 2, 2, ENC_BIG_ENDIAN); |
1318 | 0 | mipi_csi2_status_tree = proto_item_add_subtree(ti, ett_ebhscr_status); |
1319 | 0 | proto_tree_add_bitmask_list(mipi_csi2_status_tree, tvb, 2, 2, mipi_csi2_status_bits, ENC_BIG_ENDIAN); |
1320 | |
|
1321 | 0 | if (ebhscr_status) { |
1322 | 0 | expert_add_info(pinfo, ti, &ei_ebhscr_err_status_flag); |
1323 | 0 | } |
1324 | |
|
1325 | 0 | ti = proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_mjr_hdr, tvb, 24, 8, ENC_BIG_ENDIAN); |
1326 | 0 | mipi_csi2_mhdr_tree = proto_item_add_subtree(ti, ett_ebhscr_mjr_hdr); |
1327 | 0 | proto_tree_add_bitmask_list(mipi_csi2_mhdr_tree, tvb, 24, 4, mipi_csi2_mjr_hdr_flags_bits, ENC_BIG_ENDIAN); |
1328 | 0 | mjr_hdr_flags = tvb_get_uint8(tvb, 24) & 0x07; |
1329 | 0 | if (mjr_hdr_flags) { |
1330 | 0 | expert_add_info(pinfo, ti, &ei_ebhscr_warn_mjr_hdr_status_flag); |
1331 | 0 | } |
1332 | |
|
1333 | 0 | proto_tree_add_item(mipi_csi2_mhdr_tree, hf_mipi_csi2_mjr_hdr_frame_counter, tvb, 28, 2, ENC_BIG_ENDIAN); |
1334 | 0 | proto_tree_add_item(mipi_csi2_mhdr_tree, hf_mipi_csi2_mjr_hdr_line_counter, tvb, 30, 2, ENC_BIG_ENDIAN); |
1335 | |
|
1336 | 0 | if (ebhscr_current_payload_length < MIPI_CSI2_PKT_HDR_LEN) { |
1337 | 0 | return tvb_captured_length(tvb); |
1338 | 0 | } |
1339 | | |
1340 | 0 | ti = proto_tree_add_item(tree, hf_mipi_csi2_payload_pkt_hdr, tvb, 32, 8, ENC_BIG_ENDIAN); |
1341 | 0 | mipi_csi2_payload_pkt_header_subtree = proto_item_add_subtree(ti, ett_ebhscr_status); |
1342 | |
|
1343 | 0 | proto_tree_add_item(mipi_csi2_payload_pkt_header_subtree, hf_mipi_csi2_payload_pkt_hdr_dt, tvb, 32, 1, ENC_BIG_ENDIAN); |
1344 | 0 | proto_tree_add_item(mipi_csi2_payload_pkt_header_subtree, hf_mipi_csi2_payload_pkt_hdr_vc, tvb, 33, 1, ENC_BIG_ENDIAN); |
1345 | 0 | proto_tree_add_item(mipi_csi2_payload_pkt_header_subtree, hf_mipi_csi2_payload_pkt_hdr_ecc, tvb, 35, 1, ENC_BIG_ENDIAN); |
1346 | 0 | proto_tree_add_item(mipi_csi2_payload_pkt_header_subtree, hf_mipi_csi2_payload_pkt_hdr_crc, tvb, 36, 2, ENC_LITTLE_ENDIAN); |
1347 | 0 | proto_tree_add_item(mipi_csi2_payload_pkt_header_subtree, hf_mipi_csi2_payload_pkt_hdr_wc_lsb, tvb, 38, 2, ENC_LITTLE_ENDIAN); |
1348 | 0 | proto_tree_add_item(mipi_csi2_payload_pkt_header_subtree, hf_mipi_csi2_payload_pkt_hdr_wc_msb, tvb, 38, 2, ENC_LITTLE_ENDIAN); |
1349 | |
|
1350 | 0 | ebhscr_current_payload_length -= MIPI_CSI2_PKT_HDR_LEN; |
1351 | 0 | uint32_t const headers_length = EBHSCR_HEADER_LENGTH + MIPI_CSI2_PKT_HDR_LEN; |
1352 | |
|
1353 | 0 | if (ebhscr_current_payload_length > 0) { |
1354 | 0 | next_tvb = tvb_new_subset_length(tvb, headers_length, ebhscr_current_payload_length); |
1355 | 0 | call_data_dissector(next_tvb, pinfo, tree); |
1356 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, " %s", tvb_bytes_to_str_punct(pinfo->pool, tvb, headers_length, ebhscr_current_payload_length, ' ')); |
1357 | 0 | } |
1358 | |
|
1359 | 0 | return tvb_captured_length(tvb); |
1360 | 0 | } |
1361 | | |
1362 | | static int dissect_ebhscr_csi2_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, |
1363 | | proto_tree *ebhscr_packet_header_tree, uint16_t ebhscr_status, uint32_t ebhscr_frame_length) |
1364 | 0 | { |
1365 | 0 | proto_item *ti; |
1366 | 0 | tvbuff_t* next_tvb; |
1367 | 0 | proto_tree *csi2_frame_status_tree; |
1368 | 0 | proto_tree *csi2_frame_mhdr_tree; |
1369 | 0 | proto_tree *csi2_frame_header_subtree; |
1370 | 0 | proto_tree *csi2_frame_header_sections_subtree[CSI2_FRAME_NUM_SECTIONS]; |
1371 | 0 | proto_tree *csi2_frame_header_sections_err_bits_subtree; |
1372 | 0 | uint32_t ebhscr_current_payload_length; |
1373 | 0 | uint8_t csi2_frame_header_error_flags; |
1374 | |
|
1375 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "CSI2_FRAME:"); |
1376 | 0 | ebhscr_current_payload_length = ebhscr_frame_length - EBHSCR_HEADER_LENGTH; |
1377 | |
|
1378 | 0 | ti = proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_status, tvb, 2, 2, ENC_BIG_ENDIAN); |
1379 | 0 | csi2_frame_status_tree = proto_item_add_subtree(ti, ett_ebhscr_status); |
1380 | 0 | proto_tree_add_bitmask_list(csi2_frame_status_tree, tvb, 2, 2, csi2_frame_status_bits, ENC_BIG_ENDIAN); |
1381 | |
|
1382 | 0 | if (ebhscr_status) { |
1383 | 0 | expert_add_info(pinfo, ti, &ei_ebhscr_err_status_flag); |
1384 | 0 | } |
1385 | |
|
1386 | 0 | ti = proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_mjr_hdr, tvb, 24, 8, ENC_BIG_ENDIAN); |
1387 | 0 | csi2_frame_mhdr_tree = proto_item_add_subtree(ti, ett_ebhscr_mjr_hdr); |
1388 | 0 | proto_tree_add_bitmask_list(csi2_frame_mhdr_tree, tvb, 24, 4, csi2_frame_mjr_hdr_bits, ENC_BIG_ENDIAN); |
1389 | |
|
1390 | 0 | if (ebhscr_current_payload_length < CSI2_FRAME_PKT_HDR_LEN) { |
1391 | 0 | return tvb_captured_length(tvb); |
1392 | 0 | } |
1393 | | |
1394 | 0 | ti = proto_tree_add_item(tree, hf_csi2_frame_header, tvb, 32, 128, ENC_NA); |
1395 | 0 | csi2_frame_header_subtree = proto_item_add_subtree(ti, ett_ebhscr_mjr_hdr); |
1396 | |
|
1397 | 0 | for (unsigned int i = 0, section_offset = EBHSCR_HEADER_LENGTH; i < CSI2_FRAME_NUM_SECTIONS; ++i) { |
1398 | 0 | int field_offset = section_offset; |
1399 | 0 | int current_section = hf_csi2_frame_sections[i]; |
1400 | 0 | ti = proto_tree_add_item(csi2_frame_header_subtree, current_section, tvb, section_offset, CSI2_FRAME_SECTION_SIZE_BYTES, ENC_NA); |
1401 | 0 | section_offset += CSI2_FRAME_SECTION_SIZE_BYTES; |
1402 | |
|
1403 | 0 | csi2_frame_header_sections_subtree[i] = proto_item_add_subtree(ti, ett_ebhscr_status); |
1404 | |
|
1405 | 0 | proto_tree_add_item(csi2_frame_header_sections_subtree[i], hf_csi2_frame_header_payload_byte_offset, tvb, field_offset, 4, ENC_BIG_ENDIAN); |
1406 | 0 | field_offset += 4; |
1407 | |
|
1408 | 0 | proto_tree_add_item(csi2_frame_header_sections_subtree[i], hf_csi2_frame_header_bytes_total, tvb, field_offset, 4, ENC_BIG_ENDIAN); |
1409 | 0 | field_offset += 4; |
1410 | |
|
1411 | 0 | proto_tree_add_item(csi2_frame_header_sections_subtree[i], hf_csi2_frame_header_bytes_per_line, tvb, field_offset, 2, ENC_BIG_ENDIAN); |
1412 | 0 | field_offset += 2; |
1413 | |
|
1414 | 0 | proto_tree_add_item(csi2_frame_header_sections_subtree[i], hf_csi2_frame_header_number_lines, tvb, field_offset, 2, ENC_BIG_ENDIAN); |
1415 | 0 | field_offset += 2; |
1416 | | |
1417 | | /* Next 2 bytes are reserved */ |
1418 | 0 | field_offset += 2; |
1419 | |
|
1420 | 0 | ti = proto_tree_add_item(csi2_frame_header_sections_subtree[i], hf_csi2_frame_header_error_bits_field, tvb, field_offset, 1, ENC_BIG_ENDIAN); |
1421 | 0 | csi2_frame_header_sections_err_bits_subtree = proto_item_add_subtree(ti, ett_ebhscr_mjr_hdr); |
1422 | 0 | proto_tree_add_bitmask_list(csi2_frame_header_sections_err_bits_subtree, tvb, field_offset, 1, csi2_frame_header_error_bits, ENC_BIG_ENDIAN); |
1423 | 0 | csi2_frame_header_error_flags = tvb_get_uint8(tvb, field_offset) & 0x0F; |
1424 | 0 | if (csi2_frame_header_error_flags) { |
1425 | 0 | expert_add_info(pinfo, ti, &ei_ebhscr_warn_csi2_hdr_error_flag); |
1426 | 0 | } |
1427 | 0 | field_offset += 1; |
1428 | |
|
1429 | 0 | proto_tree_add_item(csi2_frame_header_sections_subtree[i], hf_csi2_frame_header_mipi_data_type, tvb, field_offset, 1, ENC_BIG_ENDIAN); |
1430 | | /* field_offset += 1; */ |
1431 | |
|
1432 | 0 | ebhscr_current_payload_length -= CSI2_FRAME_SECTION_SIZE_BYTES; |
1433 | 0 | } |
1434 | |
|
1435 | 0 | uint32_t const headers_length = EBHSCR_HEADER_LENGTH + (CSI2_FRAME_NUM_SECTIONS * CSI2_FRAME_SECTION_SIZE_BYTES); |
1436 | |
|
1437 | 0 | if (ebhscr_current_payload_length > 0) { |
1438 | 0 | next_tvb = tvb_new_subset_length(tvb, headers_length, ebhscr_current_payload_length); |
1439 | 0 | call_data_dissector(next_tvb, pinfo, tree); |
1440 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, " %s", tvb_bytes_to_str_punct(pinfo->pool, tvb, headers_length, ebhscr_current_payload_length, ' ')); |
1441 | 0 | } |
1442 | |
|
1443 | 0 | return tvb_captured_length(tvb); |
1444 | 0 | } |
1445 | | |
1446 | | static int |
1447 | | dissect_ebhscr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
1448 | 4 | { |
1449 | 4 | proto_item *ti; |
1450 | 4 | proto_tree *ebhscr_packet_header_tree; |
1451 | 4 | proto_tree *ebhscr_tree; |
1452 | 4 | proto_tree *proto_ebhscr_channel; |
1453 | 4 | tvbuff_t* next_tvb; |
1454 | 4 | uint32_t ebhscr_frame_length, ebhscr_length; |
1455 | 4 | int ebhscr_current_payload_length; |
1456 | 4 | uint8_t ebhscr_major_num; |
1457 | 4 | uint16_t ebhscr_status = 0; |
1458 | | |
1459 | 4 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "EBHSCR"); |
1460 | 4 | col_clear(pinfo->cinfo, COL_INFO); |
1461 | | |
1462 | 4 | ebhscr_frame_length = tvb_captured_length(tvb); |
1463 | | |
1464 | 4 | ti = proto_tree_add_item(tree, proto_ebhscr, tvb, 0, -1, ENC_NA); |
1465 | 4 | ebhscr_tree = proto_item_add_subtree(ti, ett_ebhscr); |
1466 | | |
1467 | 4 | if (ebhscr_frame_length < EBHSCR_HEADER_LENGTH) { |
1468 | 1 | expert_add_info(pinfo, ebhscr_tree, &ei_ebhscr_frame_header); |
1469 | 1 | return tvb_captured_length(tvb); |
1470 | 1 | } |
1471 | | |
1472 | 3 | ebhscr_major_num = tvb_get_uint8(tvb, 0); |
1473 | 3 | ebhscr_status = tvb_get_uint16(tvb, 2, ENC_BIG_ENDIAN) & 0x0FFF; |
1474 | | |
1475 | 3 | ti = proto_tree_add_item(ebhscr_tree, hf_ebhscr_packet_header, tvb, 0, 32, ENC_NA); |
1476 | 3 | ebhscr_packet_header_tree = proto_item_add_subtree(ti, ett_ebhscr_packet_header); |
1477 | 3 | proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_major_number, tvb, 0, 1, ENC_BIG_ENDIAN); |
1478 | 3 | proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_slot, tvb, 1, 1, ENC_BIG_ENDIAN); |
1479 | 3 | proto_ebhscr_channel = proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_channel, tvb, 1, 1, ENC_BIG_ENDIAN); |
1480 | 3 | proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_version, tvb, 2, 2, ENC_BIG_ENDIAN); |
1481 | 3 | proto_tree_add_item_ret_uint(ebhscr_packet_header_tree, hf_ebhscr_length, tvb, 4, 4, ENC_BIG_ENDIAN, &ebhscr_length); |
1482 | 3 | proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_start_timestamp, tvb, 8, 8, ENC_BIG_ENDIAN); |
1483 | 3 | proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_stop_timestamp, tvb, 16, 8, ENC_BIG_ENDIAN); |
1484 | | |
1485 | 3 | ebhscr_current_payload_length = ebhscr_frame_length - EBHSCR_HEADER_LENGTH; |
1486 | | |
1487 | 3 | if ((ebhscr_major_num >= EBHSCR_USER_FIRST) && (ebhscr_major_num <= EBHSCR_USER_LAST)) { |
1488 | 1 | if (ebhscr_user_handle != NULL) { |
1489 | 0 | next_tvb = tvb_new_subset_length(tvb, 0, ebhscr_frame_length); |
1490 | 0 | call_dissector(ebhscr_user_handle, next_tvb, pinfo, ebhscr_tree); |
1491 | 0 | } |
1492 | 1 | else { |
1493 | 1 | proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_status, tvb, 2, 2, ENC_BIG_ENDIAN); |
1494 | 1 | proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_mjr_hdr, tvb, 24, 8, ENC_BIG_ENDIAN); |
1495 | 1 | next_tvb = tvb_new_subset_length(tvb, 32, ebhscr_current_payload_length); |
1496 | 1 | call_data_dissector(next_tvb, pinfo, tree); |
1497 | 1 | if (ebhscr_current_payload_length > 0) { |
1498 | 1 | col_append_fstr(pinfo->cinfo, COL_INFO, " %s", tvb_bytes_to_str_punct(pinfo->pool, tvb, 32, |
1499 | 1 | ebhscr_current_payload_length, ' ')); |
1500 | 1 | } |
1501 | 1 | } |
1502 | 1 | return tvb_captured_length(tvb); |
1503 | 1 | } |
1504 | | |
1505 | | /* each dissect function handles Status and Major number specific header bits */ |
1506 | 2 | if (ebhscr_major_num == CAN_FRAME) { |
1507 | 0 | dissect_ebhscr_can(tvb, pinfo, tree, ebhscr_packet_header_tree, ebhscr_status, ebhscr_frame_length); |
1508 | 0 | } |
1509 | | |
1510 | 2 | else if (ebhscr_major_num == ETHERNET_FRAME) { |
1511 | 0 | dissect_ebhscr_eth(tvb, pinfo, tree, ebhscr_packet_header_tree, ebhscr_status, ebhscr_frame_length); |
1512 | 0 | } |
1513 | | |
1514 | 2 | else if (ebhscr_major_num == NMEA_FRAME) |
1515 | 0 | { |
1516 | 0 | dissect_ebhscr_nmea(tvb, pinfo, tree, ebhscr_packet_header_tree, ebhscr_frame_length, ebhscr_length); |
1517 | 0 | } |
1518 | | |
1519 | 2 | else if (ebhscr_major_num == TIME_STATE_FRAME) { |
1520 | 0 | dissect_ebhscr_ts(tvb, pinfo, tree, ebhscr_packet_header_tree, ebhscr_status, ebhscr_frame_length); |
1521 | 0 | } |
1522 | | |
1523 | 2 | else if (ebhscr_major_num == LIN_FRAME) { |
1524 | 0 | dissect_ebhscr_lin(tvb, pinfo, ebhscr_tree, ebhscr_packet_header_tree, ebhscr_status, ebhscr_frame_length); |
1525 | 0 | } |
1526 | | |
1527 | 2 | else if (ebhscr_major_num == DIO_FRAME) { |
1528 | 0 | dissect_ebhscr_dio(tvb, pinfo, tree, ebhscr_packet_header_tree, ebhscr_status, ebhscr_frame_length); |
1529 | 0 | } |
1530 | | |
1531 | 2 | else if (ebhscr_major_num == FLEXRAY_FRAME) { |
1532 | 0 | dissect_ebhscr_flexray(tvb, pinfo, tree, ebhscr_packet_header_tree, proto_ebhscr_channel, ebhscr_status, ebhscr_frame_length); |
1533 | 0 | } |
1534 | | |
1535 | 2 | else if (ebhscr_major_num == DSI3_FRAME) { |
1536 | 0 | dissect_ebhscr_dsi3(tvb, pinfo, tree, ebhscr_packet_header_tree, proto_ebhscr_channel, ebhscr_status, ebhscr_frame_length); |
1537 | 0 | } |
1538 | | |
1539 | 2 | else if (ebhscr_major_num == MIPI_CSI2) { |
1540 | 0 | dissect_ebhscr_mipi_csi2(tvb, pinfo, tree, ebhscr_packet_header_tree, ebhscr_status, ebhscr_frame_length); |
1541 | 0 | } |
1542 | | |
1543 | 2 | else if (ebhscr_major_num == CSI2_FRAME) { |
1544 | 0 | dissect_ebhscr_csi2_frame(tvb, pinfo, tree, ebhscr_packet_header_tree, ebhscr_status, ebhscr_frame_length); |
1545 | 0 | } |
1546 | | |
1547 | 2 | else { |
1548 | 2 | proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_status, tvb, 2, 2, ENC_BIG_ENDIAN); |
1549 | 2 | proto_tree_add_item(ebhscr_packet_header_tree, hf_ebhscr_mjr_hdr, tvb, 24, 8, ENC_BIG_ENDIAN); |
1550 | 2 | next_tvb = tvb_new_subset_length(tvb, 32, ebhscr_current_payload_length); |
1551 | 2 | call_data_dissector(next_tvb, pinfo, tree); |
1552 | 2 | } |
1553 | | |
1554 | 2 | return tvb_captured_length(tvb); |
1555 | 3 | } |
1556 | | |
1557 | | void |
1558 | | proto_register_ebhscr(void) |
1559 | 16 | { |
1560 | 16 | expert_module_t *expert_ebhscr; |
1561 | | |
1562 | 16 | static hf_register_info hf[] = { |
1563 | 16 | { &hf_ebhscr_packet_header, |
1564 | 16 | { "Packet header", "ebhscr.hdr", |
1565 | 16 | FT_BYTES, BASE_NO_DISPLAY_VALUE, |
1566 | 16 | NULL, 0x0, |
1567 | 16 | NULL, HFILL } |
1568 | 16 | }, |
1569 | 16 | { &hf_ebhscr_major_number, |
1570 | 16 | { "Major number", "ebhscr.mjr", |
1571 | 16 | FT_UINT8, BASE_HEX, |
1572 | 16 | NULL, 0x0, |
1573 | 16 | NULL, HFILL } |
1574 | 16 | }, |
1575 | 16 | { &hf_ebhscr_slot, |
1576 | 16 | { "Slot", "ebhscr.slot", |
1577 | 16 | FT_UINT8, BASE_HEX, |
1578 | 16 | NULL, 0xc0, |
1579 | 16 | NULL, HFILL } |
1580 | 16 | }, |
1581 | 16 | { &hf_ebhscr_channel, |
1582 | 16 | { "Channel", "ebhscr.channel", |
1583 | 16 | FT_UINT8, BASE_HEX, |
1584 | 16 | NULL, 0x3f, |
1585 | 16 | NULL, HFILL } |
1586 | 16 | }, |
1587 | 16 | { &hf_ebhscr_status, |
1588 | 16 | { "Status", "ebhscr.sts", |
1589 | 16 | FT_UINT16, BASE_HEX, |
1590 | 16 | NULL, 0x0FFF, |
1591 | 16 | NULL, HFILL } |
1592 | 16 | }, |
1593 | 16 | { &hf_ebhscr_status_unused,{ |
1594 | 16 | "Status [Unused]", "ebhscr.sts.unused", |
1595 | 16 | FT_UINT32, BASE_HEX, |
1596 | 16 | NULL, 0x0FFF, |
1597 | 16 | NULL, HFILL } |
1598 | 16 | }, |
1599 | 16 | { &hf_ebhscr_version, |
1600 | 16 | { "Version", "ebhscr.ver", |
1601 | 16 | FT_UINT16, BASE_HEX, |
1602 | 16 | NULL, 0xF000, |
1603 | 16 | NULL, HFILL } |
1604 | 16 | }, |
1605 | 16 | { &hf_ebhscr_length, |
1606 | 16 | { "Length", "ebhscr.len", |
1607 | 16 | FT_UINT32, BASE_DEC, |
1608 | 16 | NULL, 0x0, |
1609 | 16 | NULL, HFILL } |
1610 | 16 | }, |
1611 | 16 | { &hf_ebhscr_start_timestamp, |
1612 | 16 | { "Start timestamp", "ebhscr.strt", |
1613 | 16 | FT_UINT64, BASE_HEX, |
1614 | 16 | NULL, 0x0, |
1615 | 16 | NULL, HFILL } |
1616 | 16 | }, |
1617 | 16 | { &hf_ebhscr_stop_timestamp, |
1618 | 16 | { "Stop timestamp", "ebhscr.stpt", |
1619 | 16 | FT_UINT64, BASE_HEX, |
1620 | 16 | NULL, 0x0, |
1621 | 16 | NULL, HFILL } |
1622 | 16 | }, |
1623 | 16 | { &hf_ebhscr_mjr_hdr, |
1624 | 16 | { "Major number specific header", "ebhscr.mjrhdr", |
1625 | 16 | FT_UINT64, BASE_HEX, |
1626 | 16 | NULL, 0x0, |
1627 | 16 | NULL, HFILL } |
1628 | 16 | }, |
1629 | 16 | { &hf_ebhscr_mjr_hdr_unused, |
1630 | 16 | { "Major number specific header [Unused]", "ebhscr.mjrhdr.unused", |
1631 | 16 | FT_UINT64, BASE_HEX, |
1632 | 16 | NULL, 0x0, |
1633 | 16 | NULL, HFILL } |
1634 | 16 | }, |
1635 | 16 | { &hf_can_proto_type, |
1636 | 16 | { "CAN FD flag", "ebhscr.can.type", |
1637 | 16 | FT_UINT16, BASE_HEX, |
1638 | 16 | VALS(can_proto_type_strings), 0x0001, |
1639 | 16 | NULL, HFILL } |
1640 | 16 | }, |
1641 | 16 | { &hf_can_status_available, |
1642 | 16 | { "CAN protocol status availability", "ebhscr.can.asts", |
1643 | 16 | FT_UINT16, BASE_HEX, |
1644 | 16 | VALS(can_status_available_strings), 0x0002, |
1645 | 16 | NULL, HFILL } |
1646 | 16 | }, |
1647 | 16 | { &hf_can_status_overflow, |
1648 | 16 | { "Overflow flag", "ebhscr.can.overflow", |
1649 | 16 | FT_UINT16, BASE_HEX, |
1650 | 16 | VALS(can_status_overflow_strings), 0x0004, |
1651 | 16 | NULL, HFILL } |
1652 | 16 | }, |
1653 | 16 | { &hf_can_LEC, |
1654 | 16 | { "CAN Last error code", "ebhscr.can.LEC", |
1655 | 16 | FT_UINT64, BASE_DEC | BASE_VAL64_STRING, |
1656 | 16 | VALS64(can_last_err_code_strings), 0x0000000700000000, |
1657 | 16 | NULL, HFILL } |
1658 | 16 | }, |
1659 | 16 | { &hf_can_ERRP, |
1660 | 16 | { "CAN Counters reached Error passive limit", "ebhscr.can.errp", |
1661 | 16 | FT_UINT64, BASE_DEC | BASE_VAL64_STRING, |
1662 | 16 | VALS64(can_ERRP_strings), 0x0000002000000000, |
1663 | 16 | NULL, HFILL } |
1664 | 16 | }, |
1665 | 16 | { &hf_can_ERRW, |
1666 | 16 | { "CAN Counters reached Error warning limit", "ebhscr.can.errw", |
1667 | 16 | FT_UINT64, BASE_DEC | BASE_VAL64_STRING, |
1668 | 16 | VALS64(can_ERRW_strings), 0x0000004000000000, |
1669 | 16 | NULL, HFILL } |
1670 | 16 | }, |
1671 | 16 | { &hf_can_BOFF, |
1672 | 16 | { "CAN Bus Off state", "ebhscr.can.boff", |
1673 | 16 | FT_UINT64, BASE_DEC | BASE_VAL64_STRING, |
1674 | 16 | VALS64(can_BOFF_strings), 0x0000008000000000, |
1675 | 16 | NULL, HFILL } |
1676 | 16 | }, |
1677 | 16 | { &hf_can_DLEC, |
1678 | 16 | { "CAN Data phase of CAN FD frame (with BRS flag set) last error code.", "ebhscr.can.dlec", |
1679 | 16 | FT_UINT64, BASE_HEX | BASE_VAL64_STRING, |
1680 | 16 | VALS64(can_last_err_code_strings), 0x0000070000000000, |
1681 | 16 | NULL, HFILL } |
1682 | 16 | }, |
1683 | 16 | { &hf_can_TEC, |
1684 | 16 | { "CAN Transmit Error Counter", "ebhscr.can.tec", |
1685 | 16 | FT_UINT64, BASE_HEX, |
1686 | 16 | NULL, 0x00FF000000000000, |
1687 | 16 | NULL, HFILL } |
1688 | 16 | }, |
1689 | 16 | { &hf_can_REC, |
1690 | 16 | { "CAN Receive Error Counter", "ebhscr.can.rec", |
1691 | 16 | FT_UINT64, BASE_DEC | BASE_VAL64_STRING, |
1692 | 16 | NULL, 0x7F00000000000000, |
1693 | 16 | NULL, HFILL } |
1694 | 16 | }, |
1695 | 16 | { &hf_can_CEL, |
1696 | 16 | { "Can Error Logging Counter", "ebhscr.can.cel", |
1697 | 16 | FT_UINT64, BASE_DEC | BASE_VAL64_STRING, |
1698 | 16 | NULL, 0x00000000000000FF, |
1699 | 16 | NULL, HFILL } |
1700 | 16 | }, |
1701 | 16 | { &hf_can_reserved_bytes, |
1702 | 16 | { "Reserved Flags", "ebhscr.can.rsv", |
1703 | 16 | FT_BOOLEAN, 64, NULL, |
1704 | 16 | 0x00000000FFFFFF00, |
1705 | 16 | NULL, HFILL } |
1706 | 16 | }, |
1707 | 16 | { &hf_eth_reserved_bytes, |
1708 | 16 | { "Reserved Flags", "ebhscr.eth.rsv", |
1709 | 16 | FT_BOOLEAN, 64, NULL, |
1710 | 16 | 0xFFF0FF00FFFFFFFF, |
1711 | 16 | NULL, HFILL } |
1712 | 16 | }, |
1713 | 16 | { &hf_eth_link_up_down, |
1714 | 16 | { "Link Up or Down", "ebhscr.eth.lud", |
1715 | 16 | FT_UINT64, BASE_HEX | BASE_VAL64_STRING, |
1716 | 16 | VALS64(eth_link_strings), 0x0000000100000000, |
1717 | 16 | NULL, HFILL } |
1718 | 16 | }, |
1719 | 16 | { &hf_eth_master_slave, |
1720 | 16 | { "Master or Slave (if supported)", "ebhscr.eth.ms", |
1721 | 16 | FT_UINT64, BASE_HEX | BASE_VAL64_STRING, |
1722 | 16 | VALS64(eth_master_strings), 0x0000000200000000, |
1723 | 16 | NULL, HFILL } |
1724 | 16 | }, |
1725 | 16 | { &hf_eth_fcs_unavailable, |
1726 | 16 | { "FCS unavailable", "ebhscr.eth.fcsua", |
1727 | 16 | FT_UINT64, BASE_HEX | BASE_VAL64_STRING, |
1728 | 16 | VALS64(eth_fcs_strings), 0x0000000400000000, |
1729 | 16 | NULL, HFILL } |
1730 | 16 | }, |
1731 | 16 | { &hf_eth_rsvd_bit, |
1732 | 16 | { "Reserved", "ebhscr.eth.rsvd", |
1733 | 16 | FT_BOOLEAN, 64, NULL, |
1734 | 16 | 0x0000000800000000, |
1735 | 16 | NULL, HFILL } |
1736 | 16 | }, |
1737 | 16 | { &hf_eth_speed, |
1738 | 16 | { "Ethernet speed", "ebhscr.eth.spd", |
1739 | 16 | FT_UINT64, BASE_HEX | BASE_VAL64_STRING, |
1740 | 16 | VALS64(eth_speed_strings), 0x000000F000000000, |
1741 | 16 | NULL, HFILL } |
1742 | 16 | }, |
1743 | 16 | { &hf_eth_crc_error, |
1744 | 16 | { "Ethernet CRC Error", "ebhscr.eth.crc", |
1745 | 16 | FT_BOOLEAN, 16, |
1746 | 16 | NULL, 0x0001, |
1747 | 16 | NULL, HFILL } |
1748 | 16 | }, |
1749 | 16 | { &hf_eth_mii_foe, |
1750 | 16 | { "Media-independent interface FIFO Overflow Error", "ebhscr.eth.miifoe", |
1751 | 16 | FT_BOOLEAN, 16, |
1752 | 16 | NULL, 0x0002, |
1753 | 16 | NULL, HFILL } |
1754 | 16 | }, |
1755 | 16 | { &hf_eth_payload_foe, |
1756 | 16 | { "Payload FIFO Overflow Error", "ebhscr.eth.pfoe", |
1757 | 16 | FT_BOOLEAN, 16, |
1758 | 16 | NULL, 0x0004, |
1759 | 16 | NULL, HFILL } |
1760 | 16 | }, |
1761 | 16 | { &hf_eth_hdr_foe, |
1762 | 16 | { "Header FIFO Overflow Error", "ebhscr.eth.hfoe", |
1763 | 16 | FT_BOOLEAN, 16, |
1764 | 16 | NULL, 0x0008, |
1765 | 16 | NULL, HFILL } |
1766 | 16 | }, |
1767 | 16 | { &hf_eth_rcv_dec_err, |
1768 | 16 | { "Receiver Decoder Error", "ebhscr.eth.rde", |
1769 | 16 | FT_BOOLEAN, 16, |
1770 | 16 | NULL, 0x0010, |
1771 | 16 | NULL, HFILL } |
1772 | 16 | }, |
1773 | 16 | { &hf_eth_sym_error, |
1774 | 16 | { "Symbol Error", "ebhscr.eth.se", |
1775 | 16 | FT_BOOLEAN, 16, |
1776 | 16 | NULL, 0x0020, |
1777 | 16 | NULL, HFILL } |
1778 | 16 | }, |
1779 | 16 | { &hf_eth_jabber_event, |
1780 | 16 | { "Jabber", "ebhscr.eth.jbr", |
1781 | 16 | FT_BOOLEAN, 16, |
1782 | 16 | NULL, 0x0040, |
1783 | 16 | NULL, HFILL } |
1784 | 16 | }, |
1785 | 16 | { &hf_eth_pol_ch_event, |
1786 | 16 | { "Polarity Change", "ebhscr.eth.pche", |
1787 | 16 | FT_BOOLEAN, 16, |
1788 | 16 | NULL, 0x0080, |
1789 | 16 | NULL, HFILL } |
1790 | 16 | }, |
1791 | 16 | { &hf_eth_fls_carrier_event, |
1792 | 16 | { "False Carrier", "ebhscr.eth.flsc", |
1793 | 16 | FT_BOOLEAN, 16, |
1794 | 16 | NULL, 0x0100, |
1795 | 16 | NULL, HFILL } |
1796 | 16 | }, |
1797 | 16 | { &hf_eth_rx_trunc, |
1798 | 16 | { "Truncation", "ebhscr.eth.rxtrc", |
1799 | 16 | FT_BOOLEAN, 16, |
1800 | 16 | NULL, 0x0200, |
1801 | 16 | NULL, HFILL } |
1802 | 16 | }, |
1803 | 16 | { &hf_eth_transmission_disc_err, |
1804 | 16 | { "Capture: Transmission Discarded Error, Replay: Start Frame Separation Bit", "ebhscr.eth.trdis", |
1805 | 16 | FT_BOOLEAN, 16, |
1806 | 16 | NULL, 0x0400, |
1807 | 16 | NULL, HFILL } |
1808 | 16 | }, |
1809 | 16 | { &hf_eth_wait_frame_sep_bit, |
1810 | 16 | { "Wait Frame Separation Bit", "ebhscr.eth.wfsb", |
1811 | 16 | FT_BOOLEAN, 16, |
1812 | 16 | NULL, 0x0800, |
1813 | 16 | NULL, HFILL } |
1814 | 16 | }, |
1815 | 16 | { &hf_eth_tx_trunc, |
1816 | 16 | { "If value 1 then a Truncation occurred. The frame is sent truncated.", "ebhscr.eth.trc", |
1817 | 16 | FT_BOOLEAN, 64, NULL, |
1818 | 16 | 0x0001000000000000, |
1819 | 16 | NULL, HFILL } |
1820 | 16 | }, |
1821 | 16 | { &hf_eth_trans_undrun, |
1822 | 16 | { "If value 1 then a Transmitter Underrun occurred.", "ebhscr.eth.trudr", |
1823 | 16 | FT_BOOLEAN, 64, NULL, |
1824 | 16 | 0x0002000000000000, |
1825 | 16 | NULL, HFILL } |
1826 | 16 | }, |
1827 | 16 | { &hf_eth_retrans_limit, |
1828 | 16 | { "If value 1 then the Retransmission Limit was reached", "ebhscr.eth.rtrlmt", |
1829 | 16 | FT_BOOLEAN, 64, NULL, |
1830 | 16 | 0x0004000000000000, |
1831 | 16 | NULL, HFILL } |
1832 | 16 | }, |
1833 | 16 | { &hf_eth_late_collision, |
1834 | 16 | { "If value 1 then a Late collision was detected.", "ebhscr.eth.ltcls", |
1835 | 16 | FT_BOOLEAN, 64, NULL, |
1836 | 16 | 0x0008000000000000, |
1837 | 16 | NULL, HFILL } |
1838 | 16 | }, |
1839 | 16 | { &hf_ts_time_offset_valid, |
1840 | 16 | { "Time offset in ns valid (byte 0-7)", "ebhscr.ts.tov", |
1841 | 16 | FT_BOOLEAN, 16, NULL, |
1842 | 16 | 0x0001, |
1843 | 16 | NULL, HFILL } |
1844 | 16 | }, |
1845 | 16 | { &hf_ts_last_offset_change_valid, |
1846 | 16 | { "Last offset change in ns valid (byte 8-15)", "ebhscr.ts.locv", |
1847 | 16 | FT_BOOLEAN, 16, |
1848 | 16 | NULL, 0x0002, |
1849 | 16 | NULL, HFILL } |
1850 | 16 | }, |
1851 | 16 | { &hf_ts_nano_seconds_last_jump_valid, |
1852 | 16 | { "Nano seconds last jump valid (byte 16-23)", "ebhscr.ts.nsljv", |
1853 | 16 | FT_BOOLEAN, 16, |
1854 | 16 | NULL, 0x0004, |
1855 | 16 | NULL, HFILL } |
1856 | 16 | }, |
1857 | 16 | { &hf_ts_UTC_leap_seconds_valid, |
1858 | 16 | { "UTC leap seconds valid (byte 24-25)", "ebhscr.ts.utclsv", |
1859 | 16 | FT_BOOLEAN, 16, |
1860 | 16 | NULL, 0x0008, |
1861 | 16 | NULL, HFILL } |
1862 | 16 | }, |
1863 | 16 | { &hf_ts_sync_state_valid, |
1864 | 16 | { "Sync state valid (byte 26-27)", "ebhscr.ts.ssv", |
1865 | 16 | FT_BOOLEAN, 16, |
1866 | 16 | NULL, 0x0010, |
1867 | 16 | NULL, HFILL } |
1868 | 16 | }, |
1869 | 16 | { &hf_ts_time_source, |
1870 | 16 | { "Time source", "ebhscr.ts.tsrc", |
1871 | 16 | FT_UINT64, BASE_DEC | BASE_VAL64_STRING, VALS64(ts_time_source_strings), 0x0, |
1872 | 16 | NULL, HFILL } |
1873 | 16 | }, |
1874 | 16 | { &hf_ts_time_offset_ns, |
1875 | 16 | { "Time offset in nanoseconds", "ebhscr.ts.off", FT_UINT64, BASE_HEX, |
1876 | 16 | NULL, 0, "The offset is the difference of the zero-based capture counter to TAI", HFILL } |
1877 | 16 | }, |
1878 | 16 | { &hf_ts_last_offset_ns, |
1879 | 16 | { "Last offset change in nano seconds", "ebhscr.ts.lstoff", FT_UINT64, BASE_HEX, |
1880 | 16 | NULL, 0, "Point in time of last change of time offset.", HFILL } |
1881 | 16 | }, |
1882 | 16 | { &hf_ts_last_jump_ns, |
1883 | 16 | { "Nano seconds last jump", "ebhscr.ts.lstjmp", FT_UINT64, BASE_HEX, |
1884 | 16 | NULL, 0, "Point in time of last hard change/jump of time count after the jump.", HFILL } |
1885 | 16 | }, |
1886 | 16 | { &hf_ts_utc_leap_sec, |
1887 | 16 | { "UTC leap-seconds", "ebhscr.ts.leap", FT_UINT16, BASE_HEX, |
1888 | 16 | NULL, 0, NULL, HFILL } |
1889 | 16 | }, |
1890 | 16 | { &hf_ts_sync_state, |
1891 | 16 | { "Sync state", "ebhscr.ts.syn", FT_UINT16, BASE_HEX, |
1892 | 16 | VALS(ts_sync_state_strings), 0, NULL, HFILL } |
1893 | 16 | }, |
1894 | 16 | { &hf_lin_1_3_classic_chksum, |
1895 | 16 | { "LIN 1.3 Classic Checksum received", "ebhscr.lin.clchksum", |
1896 | 16 | FT_BOOLEAN, 16, |
1897 | 16 | NULL, 0x0001, |
1898 | 16 | "During reception the checksum is validated to determine this bit." |
1899 | 16 | "If the received checksum is invalid this bit can not be evaluated." |
1900 | 16 | "Version 1.3 checksum is calculated over data bytes.", HFILL } |
1901 | 16 | }, |
1902 | 16 | { &hf_lin_1_2_enhanced_chksum, |
1903 | 16 | { "LIN 2.0 Enhanced Checksum received", "ebhscr.lin.enchksum", |
1904 | 16 | FT_BOOLEAN, 16, |
1905 | 16 | NULL, 0x0002, |
1906 | 16 | "During reception the checksum is validated to determine this bit." |
1907 | 16 | "If the received checksum is invalid this bit can not be evaluated." |
1908 | 16 | "Version 2.0 checksum is calculated over ID and data byes.", HFILL } |
1909 | 16 | }, |
1910 | 16 | { &hf_lin_wakeup, |
1911 | 16 | { "LIN Wake-Up Packet was received", "ebhscr.lin.wakeup", |
1912 | 16 | FT_BOOLEAN, 16, |
1913 | 16 | NULL, 0x0010, |
1914 | 16 | "A wakeup packet contains no payload (Payload length field is set to 0)." |
1915 | 16 | "The wakeup length field in the major number specific header is set.", HFILL } |
1916 | 16 | }, |
1917 | 16 | { &hf_lin_time_jump, |
1918 | 16 | { "Time jump occurred near the edge and thus the timestamp was estimated", "ebhscr.lin.timejmp", |
1919 | 16 | FT_BOOLEAN, 16, |
1920 | 16 | NULL, 0x0400, |
1921 | 16 | "Only relevant for capture, ignored for replay.", HFILL } |
1922 | 16 | }, |
1923 | 16 | { &hf_lin_reserved_bytes, |
1924 | 16 | { "Reserved", "ebhscr.lin.rsv", |
1925 | 16 | FT_BOOLEAN, 64, NULL, |
1926 | 16 | 0x00000000FFFFFFFF, |
1927 | 16 | NULL, HFILL } |
1928 | 16 | }, |
1929 | 16 | { &hf_lin_wakeup_length, |
1930 | 16 | { "Wake-Up signal low phase length in us", "ebhscr.lin.wakeup.length", |
1931 | 16 | FT_UINT64, BASE_DEC, NULL, |
1932 | 16 | 0xFFFF000000000000, |
1933 | 16 | "Only valid if wakeup bit in status header is set. Set to 0 otherwise.", HFILL } |
1934 | 16 | }, |
1935 | 16 | { &hf_lin_sts_reserved, |
1936 | 16 | { "Reserved bit", "ebhscr.lin.bitrsv", |
1937 | 16 | FT_BOOLEAN, 64, |
1938 | 16 | NULL, 0x0000000100000000, |
1939 | 16 | NULL, HFILL } |
1940 | 16 | }, |
1941 | 16 | { &hf_lin_sts_syn, |
1942 | 16 | { "SYN - Received synchronization field is not 0x55", "ebhscr.lin.syn", |
1943 | 16 | FT_BOOLEAN, 64, |
1944 | 16 | NULL, 0x0000000200000000, |
1945 | 16 | NULL, HFILL } |
1946 | 16 | }, |
1947 | 16 | { &hf_lin_sts_par, |
1948 | 16 | { "PAR - Received parity does not match calculated parity", "ebhscr.lin.par", |
1949 | 16 | FT_BOOLEAN, 64, |
1950 | 16 | NULL, 0x0000000400000000, |
1951 | 16 | NULL, HFILL } |
1952 | 16 | }, |
1953 | 16 | { &hf_lin_sts_res, |
1954 | 16 | { "RES - No response detected after LIN header", "ebhscr.lin.res", |
1955 | 16 | FT_BOOLEAN, 64, |
1956 | 16 | NULL, 0x0000000800000000, |
1957 | 16 | NULL, HFILL } |
1958 | 16 | }, |
1959 | 16 | { &hf_lin_sts_dat, |
1960 | 16 | { "DAT - Too many data bytes received", "ebhscr.lin.dat", |
1961 | 16 | FT_BOOLEAN, 64, |
1962 | 16 | NULL, 0x0000001000000000, |
1963 | 16 | NULL, HFILL } |
1964 | 16 | }, |
1965 | 16 | { &hf_lin_sts_chk, |
1966 | 16 | { "CHK - Checksum is invalid", "ebhscr.lin.chk", |
1967 | 16 | FT_BOOLEAN, 64, |
1968 | 16 | NULL, 0x0000002000000000, |
1969 | 16 | NULL, HFILL } |
1970 | 16 | }, |
1971 | 16 | { &hf_lin_sts_sta, |
1972 | 16 | { "STA - Expected start bit, but detected recessive bus level", "ebhscr.lin.sta", |
1973 | 16 | FT_BOOLEAN, 64, |
1974 | 16 | NULL, 0x0000004000000000, |
1975 | 16 | NULL, HFILL } |
1976 | 16 | }, |
1977 | 16 | { &hf_lin_sts_sto, |
1978 | 16 | { "STO - Expected stop bit, but detected recessive bus level", "ebhscr.lin.sto", |
1979 | 16 | FT_BOOLEAN, 64, |
1980 | 16 | NULL, 0x0000008000000000, |
1981 | 16 | NULL, HFILL } |
1982 | 16 | }, |
1983 | 16 | { &hf_lin_sts_emp, |
1984 | 16 | { "EMP - Break and Sync received, but no further data", "ebhscr.lin.emp", |
1985 | 16 | FT_BOOLEAN, 64, |
1986 | 16 | NULL, 0x0000010000000000, |
1987 | 16 | NULL, HFILL } |
1988 | 16 | }, |
1989 | 16 | { &hf_lin_payload, |
1990 | 16 | { "Payload", "ebhscr.lin.payload", |
1991 | 16 | FT_BYTES, SEP_SPACE, |
1992 | 16 | NULL, 0x0, |
1993 | 16 | NULL, HFILL } |
1994 | 16 | }, |
1995 | 16 | { &hf_lin_payload_pid, |
1996 | 16 | { "LIN protected identifier", "ebhscr.lin.payload.pid", |
1997 | 16 | FT_UINT8, BASE_HEX, |
1998 | 16 | NULL, 0, |
1999 | 16 | NULL, HFILL } |
2000 | 16 | }, |
2001 | 16 | { &hf_lin_payload_id, |
2002 | 16 | { "LIN identifier", "ebhscr.lin.payload.id", |
2003 | 16 | FT_UINT8, BASE_HEX, |
2004 | 16 | NULL, 0x3F, |
2005 | 16 | NULL, HFILL } |
2006 | 16 | }, |
2007 | 16 | { &hf_lin_payload_id_parity_0, |
2008 | 16 | { "LIN identifier parity bit 0", "ebhscr.lin.payload.id_parity0", |
2009 | 16 | FT_UINT8, BASE_HEX, |
2010 | 16 | NULL, 0x40, |
2011 | 16 | NULL, HFILL } |
2012 | 16 | }, |
2013 | 16 | { &hf_lin_payload_id_parity_1, |
2014 | 16 | { "LIN identifier parity bit 1", "ebhscr.lin.payload.id_parity1", |
2015 | 16 | FT_UINT8, BASE_HEX, |
2016 | 16 | NULL, 0x80, |
2017 | 16 | NULL, HFILL } |
2018 | 16 | }, |
2019 | 16 | { &hf_lin_payload_data, |
2020 | 16 | { "Data", "ebhscr.lin.payload.data", |
2021 | 16 | FT_BYTES, SEP_SPACE, |
2022 | 16 | NULL, 0x0, |
2023 | 16 | NULL, HFILL } |
2024 | 16 | }, |
2025 | 16 | { &hf_lin_payload_checksum, |
2026 | 16 | { "Checksum", "ebhscr.lin.payload.checksum", |
2027 | 16 | FT_UINT8, BASE_HEX, |
2028 | 16 | NULL, 0x0, |
2029 | 16 | NULL, HFILL } |
2030 | 16 | }, |
2031 | 16 | { &hf_dio_overflow_mon_unit, |
2032 | 16 | { "Overflow in the monitoring unit", "ebhscr.dio.ofw_mon", |
2033 | 16 | FT_BOOLEAN, 16, |
2034 | 16 | NULL, 0x0001, |
2035 | 16 | "Set to 1 in case of an overflow in the monitoring unit. In this case all remaining fields are invalid.", HFILL } |
2036 | 16 | }, |
2037 | 16 | { &hf_dio_jump_occurred, |
2038 | 16 | { "Time jump occurred", "ebhscr.dio.jump_occ", |
2039 | 16 | FT_BOOLEAN, 16, |
2040 | 16 | NULL, 0x0400, |
2041 | 16 | "Set to 1 if a time jump occurred near the edge and thus the timestamp was estimated.", HFILL } |
2042 | 16 | }, |
2043 | 16 | { &hf_dio_value_type, |
2044 | 16 | { "Digital IO value type", "ebhscr.dio.valtype", |
2045 | 16 | FT_UINT64, BASE_DEC | BASE_VAL64_STRING, |
2046 | 16 | VALS64(dio_val_type_strings), 0x0300000000000000, |
2047 | 16 | NULL, HFILL } |
2048 | 16 | }, |
2049 | 16 | { &hf_dio_channel_ref, |
2050 | 16 | { "Digital IO EBHSCR header 'Channel' reference", "ebhscr.dio.ch_ref", |
2051 | 16 | FT_UINT64, BASE_DEC | BASE_VAL64_STRING, |
2052 | 16 | VALS64(dio_channel_ref_strings), 0x0400000000000000, |
2053 | 16 | NULL, HFILL } |
2054 | 16 | }, |
2055 | 16 | { &hf_dio_gpio_id, |
2056 | 16 | { "Digital IO GPIO ID", "ebhscr.dio.gpio_id", |
2057 | 16 | FT_UINT64, BASE_DEC | BASE_VAL64_STRING, |
2058 | 16 | NULL, 0x00FF000000000000, |
2059 | 16 | "Specifies the ID of a GPIO. Based on the Physical Module this may refer to a physical" |
2060 | 16 | "GPIO-PIN on the interface module or a virtual GPIO-ID", HFILL } |
2061 | 16 | }, |
2062 | 16 | { &hf_dio_reserved_bytes, |
2063 | 16 | { "Reserved Flags", "ebhscr.dio.rsv", |
2064 | 16 | FT_BOOLEAN, 64, NULL, |
2065 | 16 | 0x0000FFFFFFFFFFFF, |
2066 | 16 | NULL, HFILL } |
2067 | 16 | }, |
2068 | 16 | { &hf_flexray_ch_a, |
2069 | 16 | { "Channel A", "ebhscr.flexray.cha", |
2070 | 16 | FT_BOOLEAN, 8, NULL, |
2071 | 16 | 0x01, |
2072 | 16 | NULL, HFILL} |
2073 | 16 | }, |
2074 | 16 | { &hf_flexray_ch_b, |
2075 | 16 | { "Channel B", "ebhscr.flexray.chb", |
2076 | 16 | FT_BOOLEAN, 8, NULL, |
2077 | 16 | FLEXRAY_CHANNEL_B_MASK, |
2078 | 16 | NULL, HFILL} |
2079 | 16 | }, |
2080 | 16 | { &hf_flexray_ctrl_id, |
2081 | 16 | { "Controller id", "ebhscr.flexray.ctrl", |
2082 | 16 | FT_UINT8, BASE_HEX, |
2083 | 16 | NULL, 0x1C, |
2084 | 16 | NULL, HFILL} |
2085 | 16 | }, |
2086 | 16 | { &hf_flexray_monitoring_bit, |
2087 | 16 | { "Synchronous monitoring packet", "ebhscr.flexray.syncmon", |
2088 | 16 | FT_UINT16, BASE_HEX, |
2089 | 16 | VALS(flexray_monitoring_bit_strings), 0x0001, |
2090 | 16 | NULL, HFILL } |
2091 | 16 | }, |
2092 | 16 | { &hf_flexray_sync_bit, |
2093 | 16 | { "If value 1 then FlexRay cluster is sync (only valid if bit 0 = 1).", "ebhscr.flexray.sync", |
2094 | 16 | FT_BOOLEAN, 16, |
2095 | 16 | NULL, 0x0002, |
2096 | 16 | NULL, HFILL } |
2097 | 16 | }, |
2098 | 16 | { &hf_flexray_packet_type, |
2099 | 16 | { "FlexRay packet type", "ebhscr.flexray.pkttype", |
2100 | 16 | FT_UINT16, BASE_HEX, |
2101 | 16 | VALS(flexray_packet_type_strings), 0x000C, |
2102 | 16 | NULL, HFILL } |
2103 | 16 | }, |
2104 | 16 | { &hf_flexray_CODERR, |
2105 | 16 | { "Coding error", "ebhscr.flexray.coderr", |
2106 | 16 | FT_BOOLEAN, 16, |
2107 | 16 | NULL, FLEXRAY_CODERR_MASK, |
2108 | 16 | "Indicates if a Frame Start Sequence Error (FSSERR) or a Byte Start Sequence error (BSSERR)", HFILL } |
2109 | 16 | }, |
2110 | 16 | { &hf_flexray_TSSVIOL, |
2111 | 16 | { "TSS violation", "ebhscr.flexray.tssviol", |
2112 | 16 | FT_BOOLEAN, 16, |
2113 | 16 | NULL, FLEXRAY_TSSVIOL_MASK, |
2114 | 16 | NULL, HFILL } |
2115 | 16 | }, |
2116 | 16 | { &hf_flexray_HCRCERR, |
2117 | 16 | { "Header CRC error", "ebhscr.flexray.hcrcerr", |
2118 | 16 | FT_BOOLEAN, 16, |
2119 | 16 | NULL, FLEXRAY_HCRCERR_MASK, |
2120 | 16 | NULL, HFILL } |
2121 | 16 | }, |
2122 | 16 | { &hf_flexray_FCRCERR, |
2123 | 16 | { "Frame CRC error", "ebhscr.flexray.fcrcerr", |
2124 | 16 | FT_BOOLEAN, 16, |
2125 | 16 | NULL, FLEXRAY_FCRCERR_MASK, |
2126 | 16 | NULL, HFILL } |
2127 | 16 | }, |
2128 | 16 | { &hf_flexray_FESERR, |
2129 | 16 | { "Frame end sequence error", "ebhscr.flexray.feserr", |
2130 | 16 | FT_BOOLEAN, 16, |
2131 | 16 | NULL, FLEXRAY_FESERR_MASK, |
2132 | 16 | NULL, HFILL } |
2133 | 16 | }, |
2134 | 16 | { &hf_flexray_FSSERR, |
2135 | 16 | { "Frame start sequence error", "ebhscr.flexray.fsserr", |
2136 | 16 | FT_BOOLEAN, 16, |
2137 | 16 | NULL, 0x0200, |
2138 | 16 | NULL, HFILL } |
2139 | 16 | }, |
2140 | 16 | { &hf_flexray_BSSERR, |
2141 | 16 | { "Byte start sequence error", "ebhscr.flexray.bsserr", |
2142 | 16 | FT_BOOLEAN, 16, |
2143 | 16 | NULL, 0x0400, |
2144 | 16 | NULL, HFILL } |
2145 | 16 | }, |
2146 | 16 | { &hf_flexray_jump_occurred, |
2147 | 16 | { "Time jump occurred", "ebhscr.flexray.jump_occ", |
2148 | 16 | FT_BOOLEAN, 16, |
2149 | 16 | NULL, 0x0800, |
2150 | 16 | "Set to 1 if a time jump occurred near the edge and thus the timestamp was estimated.", HFILL } |
2151 | 16 | }, |
2152 | 16 | { &hf_flexray_overflow_err, |
2153 | 16 | { "Overflow error", "ebhscr.flexray.overflow_err", |
2154 | 16 | FT_BOOLEAN, 16, |
2155 | 16 | NULL, 0x0010, |
2156 | 16 | "FIFO overflow error. Captured FlexRay data were lost.", HFILL } |
2157 | 16 | }, |
2158 | 16 | { &hf_flexray_slot_information, |
2159 | 16 | { "Slot information", "ebhscr.flexray.slotinfo", |
2160 | 16 | FT_UINT16, BASE_HEX, |
2161 | 16 | NULL, 0, |
2162 | 16 | NULL, HFILL } |
2163 | 16 | }, |
2164 | 16 | { &hf_flexray_SBV, |
2165 | 16 | { "Slot boundary violation", "ebhscr.flexray.slotinfo.sbv", |
2166 | 16 | FT_BOOLEAN, 16, |
2167 | 16 | NULL, 0x8000, |
2168 | 16 | NULL, HFILL } |
2169 | 16 | }, |
2170 | 16 | { &hf_flexray_ACI, |
2171 | 16 | { "Additional communication indicator", "ebhscr.flexray.slotinfo.aci", |
2172 | 16 | FT_BOOLEAN, 16, |
2173 | 16 | NULL, 0x4000, |
2174 | 16 | NULL, HFILL } |
2175 | 16 | }, |
2176 | 16 | { &hf_flexray_CED, |
2177 | 16 | { "Content error detected", "ebhscr.flexray.slotinfo.ced", |
2178 | 16 | FT_BOOLEAN, 16, |
2179 | 16 | NULL, 0x2000, |
2180 | 16 | NULL, HFILL } |
2181 | 16 | }, |
2182 | 16 | { &hf_flexray_SED, |
2183 | 16 | { "Syntax error detected", "ebhscr.flexray.slotinfo.sed", |
2184 | 16 | FT_BOOLEAN, 16, |
2185 | 16 | NULL, 0x1000, |
2186 | 16 | NULL, HFILL } |
2187 | 16 | }, |
2188 | 16 | { &hf_flexray_VFR, |
2189 | 16 | { "Valid Frame Received", "ebhscr.flexray.slotinfo.vfr", |
2190 | 16 | FT_BOOLEAN, 16, |
2191 | 16 | NULL, 0x0800, |
2192 | 16 | NULL, HFILL } |
2193 | 16 | }, |
2194 | 16 | { &hf_flexray_SID, |
2195 | 16 | { "Slot ID", "ebhscr.flexray.slotinfo.sid", |
2196 | 16 | FT_UINT16, BASE_HEX, |
2197 | 16 | NULL, 0x07FF, |
2198 | 16 | NULL, HFILL } |
2199 | 16 | }, |
2200 | 16 | { &hf_flexray_frame_status, |
2201 | 16 | { "Frame status", "ebhscr.flexray.framests", |
2202 | 16 | FT_UINT16, BASE_HEX, |
2203 | 16 | NULL, 0, |
2204 | 16 | NULL, HFILL } |
2205 | 16 | }, |
2206 | 16 | { &hf_flexray_SPLERR, |
2207 | 16 | { "Static payload length error", "ebhscr.flexray.framests.splerr", |
2208 | 16 | FT_BOOLEAN, 16, |
2209 | 16 | NULL, 0x8000, |
2210 | 16 | NULL, HFILL } |
2211 | 16 | }, |
2212 | 16 | { &hf_flexray_CCERR, |
2213 | 16 | { "Cycle counter error", "ebhscr.flexray.framests.ccerr", |
2214 | 16 | FT_BOOLEAN, 16, |
2215 | 16 | NULL, 0x4000, |
2216 | 16 | NULL, HFILL } |
2217 | 16 | }, |
2218 | 16 | { &hf_flexray_FIDERR, |
2219 | 16 | { "Frame ID error", "ebhscr.flexray.framests.fiderr", |
2220 | 16 | FT_BOOLEAN, 16, |
2221 | 16 | NULL, 0x2000, |
2222 | 16 | NULL, HFILL } |
2223 | 16 | }, |
2224 | 16 | { &hf_flexray_SSERR, |
2225 | 16 | { "Sync or startup error", "ebhscr.flexray.framests.sserr", |
2226 | 16 | FT_BOOLEAN, 16, |
2227 | 16 | NULL, 0x1000, |
2228 | 16 | NULL, HFILL } |
2229 | 16 | }, |
2230 | 16 | { &hf_flexray_NERR, |
2231 | 16 | { "Null frame error", "ebhscr.flexray.framests.nerr", |
2232 | 16 | FT_BOOLEAN, 16, |
2233 | 16 | NULL, 0x0800, |
2234 | 16 | NULL, HFILL } |
2235 | 16 | }, |
2236 | 16 | { &hf_flexray_SOVERR, |
2237 | 16 | { "Slot overbooked error", "ebhscr.flexray.framests.soverr", |
2238 | 16 | FT_BOOLEAN, 16, |
2239 | 16 | NULL, 0x0400, |
2240 | 16 | NULL, HFILL } |
2241 | 16 | }, |
2242 | 16 | { &hf_flexray_SWVIOL, |
2243 | 16 | { "Symbol Window violation", "ebhscr.flexray.framests.swviol", |
2244 | 16 | FT_BOOLEAN, 16, |
2245 | 16 | NULL, 0x0200, |
2246 | 16 | NULL, HFILL } |
2247 | 16 | }, |
2248 | 16 | { &hf_flexray_NITVIOL, |
2249 | 16 | { "NIT violation", "ebhscr.flexray.framests.nitviol", |
2250 | 16 | FT_BOOLEAN, 16, |
2251 | 16 | NULL, 0x0100, |
2252 | 16 | NULL, HFILL } |
2253 | 16 | }, |
2254 | 16 | { &hf_flexray_BVIOL, |
2255 | 16 | { "Boundary violation", "ebhscr.flexray.framests.bviol", |
2256 | 16 | FT_BOOLEAN, 16, |
2257 | 16 | NULL, 0x0080, |
2258 | 16 | NULL, HFILL } |
2259 | 16 | }, |
2260 | 16 | { &hf_flexray_PCD, |
2261 | 16 | { "Prolonged channel idle detection", "ebhscr.flexray.framests.pcd", |
2262 | 16 | FT_BOOLEAN, 16, |
2263 | 16 | NULL, 0x0040, |
2264 | 16 | "FES to CHIRP took longer than 11 bit times. This is always true for dynamic frames because of the DTS.", HFILL } |
2265 | 16 | }, |
2266 | 16 | { &hf_flexray_SYNCERR, |
2267 | 16 | { "Sync and/or startup bit wrongly set", "ebhscr.flexray.framests.syncerr", |
2268 | 16 | FT_BOOLEAN, 16, |
2269 | 16 | NULL, 0x0020, |
2270 | 16 | NULL, HFILL } |
2271 | 16 | }, |
2272 | 16 | { &hf_flexray_CP, |
2273 | 16 | { "Communication cycle part", "ebhscr.flexray.framests.cp", |
2274 | 16 | FT_UINT16, BASE_HEX, |
2275 | 16 | VALS(flexray_CP_strings), 0x0018, |
2276 | 16 | NULL, HFILL } |
2277 | 16 | }, |
2278 | 16 | { &hf_flexray_BRC, |
2279 | 16 | { "Byte Received Counter", "ebhscr.flexray.framests.brc", |
2280 | 16 | FT_UINT16, BASE_HEX, |
2281 | 16 | NULL, 0x0007, |
2282 | 16 | "Number of bytes received by the decoder without coding error. When more than 7 bytes are received, the counter is set to 7", HFILL } |
2283 | 16 | }, |
2284 | 16 | { &hf_flexray_symbol_length_and_status, |
2285 | 16 | { "Symbol length and status", "ebhscr.flexray.slsts", |
2286 | 16 | FT_UINT8, BASE_HEX, |
2287 | 16 | NULL, 0, |
2288 | 16 | NULL, HFILL } |
2289 | 16 | }, |
2290 | 16 | { &hf_flexray_SYERR, |
2291 | 16 | { "The low phase was too long", "ebhscr.flexray.slsts.syerr", |
2292 | 16 | FT_BOOLEAN, 8, |
2293 | 16 | NULL, 0x80, |
2294 | 16 | NULL, HFILL } |
2295 | 16 | }, |
2296 | 16 | { &hf_flexray_SL, |
2297 | 16 | { "Symbol length in units of bit cells", "ebhscr.flexray.slsts.sl", |
2298 | 16 | FT_UINT8, BASE_DEC, |
2299 | 16 | NULL, 0x7F, |
2300 | 16 | NULL, HFILL } |
2301 | 16 | }, |
2302 | 16 | { &hf_flexray_POC_state, |
2303 | 16 | { "Protocol operation control state", "ebhscr.flexray.pocstate", |
2304 | 16 | FT_UINT8, BASE_HEX, |
2305 | 16 | VALS(flexray_POC_state_strings), 0, |
2306 | 16 | NULL, HFILL } |
2307 | 16 | }, |
2308 | 16 | { &hf_flexray_following_cycle_counter, |
2309 | 16 | { "Cycle counter of following cycle", "ebhscr.flexray.fcc", |
2310 | 16 | FT_UINT8, BASE_DEC, |
2311 | 16 | NULL, 0, |
2312 | 16 | NULL, HFILL } |
2313 | 16 | }, |
2314 | 16 | { &hf_flexray_supercycle_counter, |
2315 | 16 | { "Supercycle counter", "ebhscr.flexray.scc", |
2316 | 16 | FT_UINT32, BASE_DEC, |
2317 | 16 | NULL, 0, |
2318 | 16 | NULL, HFILL } |
2319 | 16 | }, |
2320 | 16 | { &hf_dsi3_status_crc_error, |
2321 | 16 | { "CRC Error", "ebhscr.dsi3.status_crc_err", |
2322 | 16 | FT_BOOLEAN, 16, |
2323 | 16 | TFS(&dsi3_status_err_CRC_strings), 0x0001, |
2324 | 16 | NULL, HFILL } |
2325 | 16 | }, |
2326 | 16 | { &hf_dsi3_status_transition_error, |
2327 | 16 | { "Transition Error", "ebhscr.dsi3.status_trans_err", |
2328 | 16 | FT_BOOLEAN, 16, |
2329 | 16 | TFS(&dsi3_status_err_trans_strings), 0x0002, |
2330 | 16 | NULL, HFILL } |
2331 | 16 | }, |
2332 | 16 | { &hf_dsi3_status_packet_truncated_error, |
2333 | 16 | { "Packet Truncated Error", "ebhscr.dsi3.status_trunc_err", |
2334 | 16 | FT_BOOLEAN, 16, |
2335 | 16 | TFS(&dsi3_status_err_trunc_strings), 0x0004, |
2336 | 16 | NULL, HFILL } |
2337 | 16 | }, |
2338 | 16 | { &hf_dsi3_status_packet_dropped_error, |
2339 | 16 | { "Packet Dropped Error", "ebhscr.dsi3.status_drop_err", |
2340 | 16 | FT_BOOLEAN, 16, |
2341 | 16 | TFS(&dsi3_status_err_drop_strings), 0x0008, |
2342 | 16 | NULL, HFILL } |
2343 | 16 | }, |
2344 | 16 | { &hf_dsi3_mjr_hdr_st0_command_type, |
2345 | 16 | { "DSI3 Command Type", "ebhscr.dsi3.st0.cmd_type", |
2346 | 16 | FT_BOOLEAN, 32, |
2347 | 16 | TFS(&dsi3_mjr_hdr_st0_command_type_strings), 0x00100000, |
2348 | 16 | NULL, HFILL } |
2349 | 16 | }, |
2350 | 16 | { &hf_dsi3_mjr_hdr_slave_st0_bit_count, |
2351 | 16 | { "Bit Count", "ebhscr.dsi3.sl.st0.bit_cnt", |
2352 | 16 | FT_UINT32, BASE_HEX, |
2353 | 16 | NULL, 0x70000000, |
2354 | 16 | NULL, HFILL } |
2355 | 16 | }, |
2356 | 16 | { &hf_dsi3_mjr_hdr_slave_st2_blnk_err, |
2357 | 16 | { "Blanking Error", "ebhscr.dsi3.sl.st2.blnk_err", |
2358 | 16 | FT_BOOLEAN, 32, |
2359 | 16 | NULL, 0x00000100, |
2360 | 16 | NULL, HFILL } |
2361 | 16 | }, |
2362 | 16 | { &hf_dsi3_mjr_hdr_slave_st2_no_trans_err, |
2363 | 16 | { "No Transmission", "ebhscr.dsi3.sl.st2.no_trans", |
2364 | 16 | FT_BOOLEAN, 32, |
2365 | 16 | NULL, 0x00000200, |
2366 | 16 | NULL, HFILL } |
2367 | 16 | }, |
2368 | 16 | { &hf_dsi3_mjr_hdr_slave_st3_crc_err, |
2369 | 16 | { "CRC Error", "ebhscr.dsi3.sl.st3.crc_err", |
2370 | 16 | FT_BOOLEAN, 32, |
2371 | 16 | NULL, 0x00000001, |
2372 | 16 | NULL, HFILL } |
2373 | 16 | }, |
2374 | 16 | { &hf_dsi3_mjr_hdr_slave_st3_cnt_overflow, |
2375 | 16 | { "Counter Overflow", "ebhscr.dsi3.sl.st3.cnt_overflow", |
2376 | 16 | FT_BOOLEAN, 32, |
2377 | 16 | NULL, 0x00000002, |
2378 | 16 | NULL, HFILL } |
2379 | 16 | }, |
2380 | 16 | { &hf_dsi3_mjr_hdr_slave_st3_disabled_err, |
2381 | 16 | { "Disabled Error", "ebhscr.dsi3.sl.st3.disabled_err", |
2382 | 16 | FT_BOOLEAN, 32, |
2383 | 16 | NULL, 0x00000004, |
2384 | 16 | NULL, HFILL } |
2385 | 16 | }, |
2386 | 16 | { &hf_dsi3_mjr_hdr_slave_st3_trunc_data, |
2387 | 16 | { "Truncate Data", "ebhscr.dsi3.sl.st3.trunc_data", |
2388 | 16 | FT_BOOLEAN, 32, |
2389 | 16 | NULL, 0x00000008, |
2390 | 16 | NULL, HFILL } |
2391 | 16 | }, |
2392 | 16 | { &hf_dsi3_mjr_hdr_slave_st3_drop_data, |
2393 | 16 | { "Drop Data", "ebhscr.dsi3.sl.st3.drop_data", |
2394 | 16 | FT_BOOLEAN, 32, |
2395 | 16 | NULL, 0x00000010, |
2396 | 16 | NULL, HFILL } |
2397 | 16 | }, |
2398 | 16 | { &hf_dsi3_mjr_hdr_master_st0_nibble_count, |
2399 | 16 | { "Nibble Count", "ebhscr.dsi3.ms.st0.nbc", |
2400 | 16 | FT_UINT32, BASE_HEX, |
2401 | 16 | NULL, 0x10000000, |
2402 | 16 | NULL, HFILL } |
2403 | 16 | }, |
2404 | 16 | { &hf_dsi3_mjr_hdr_master_st2_blnk_err, |
2405 | 16 | { "Blanking error", "ebhscr.dsi3.ms.st2.blnk_err", |
2406 | 16 | FT_BOOLEAN, 32, |
2407 | 16 | NULL, 0x00000100, |
2408 | 16 | NULL, HFILL } |
2409 | 16 | }, |
2410 | 16 | { &hf_dsi3_mjr_hdr_master_st2_bad_trans_err, |
2411 | 16 | { "Bad Transition", "ebhscr.dsi3.ms.st2.bad_trans", |
2412 | 16 | FT_BOOLEAN, 32, |
2413 | 16 | NULL, 0x00000200, |
2414 | 16 | NULL, HFILL } |
2415 | 16 | }, |
2416 | 16 | { &hf_dsi3_mjr_hdr_master_st2_bad_chip_err, |
2417 | 16 | { "Bad Chip", "ebhscr.dsi3.ms.st2.bad_chip", |
2418 | 16 | FT_BOOLEAN, 32, |
2419 | 16 | NULL, 0x00000400, |
2420 | 16 | NULL, HFILL } |
2421 | 16 | }, |
2422 | 16 | { &hf_dsi3_mjr_hdr_master_st2_no_trans_err, |
2423 | 16 | { "No Transition", "ebhscr.dsi3.ms.st2.no_trans", |
2424 | 16 | FT_BOOLEAN, 32, |
2425 | 16 | NULL, 0x00000800, |
2426 | 16 | NULL, HFILL } |
2427 | 16 | }, |
2428 | 16 | { &hf_dsi3_mjr_hdr_master_st3_crc_err, |
2429 | 16 | { "CRC Error", "ebhscr.dsi3.ms.st3.crc_err", |
2430 | 16 | FT_BOOLEAN, 32, |
2431 | 16 | NULL, 0x00000001, |
2432 | 16 | NULL, HFILL } |
2433 | 16 | }, |
2434 | 16 | { &hf_dsi3_mjr_hdr_master_st3_bad_decode_err, |
2435 | 16 | { "Bad Decode", "ebhscr.dsi3.ms.st3.bad_dec_err", |
2436 | 16 | FT_BOOLEAN, 32, |
2437 | 16 | NULL, 0x00000002, |
2438 | 16 | NULL, HFILL } |
2439 | 16 | }, |
2440 | 16 | { &hf_dsi3_mjr_hdr_master_st3_cnt_overflow, |
2441 | 16 | { "Counter Overflow", "ebhscr.dsi3.ms.st3.cnt_overflow", |
2442 | 16 | FT_BOOLEAN, 32, |
2443 | 16 | NULL, 0x00000004, |
2444 | 16 | NULL, HFILL } |
2445 | 16 | }, |
2446 | 16 | { &hf_dsi3_mjr_hdr_master_st3_disable_err, |
2447 | 16 | { "Disable Error", "ebhscr.dsi3.ms.st3.dsbl_err", |
2448 | 16 | FT_BOOLEAN, 32, |
2449 | 16 | NULL, 0x00000008, |
2450 | 16 | NULL, HFILL } |
2451 | 16 | }, |
2452 | 16 | { &hf_dsi3_mjr_hdr_master_st3_trunc_data, |
2453 | 16 | { "Truncate Data", "ebhscr.dsi3.ms.st3.trunc_data", |
2454 | 16 | FT_BOOLEAN, 32, |
2455 | 16 | NULL, 0x00000010, |
2456 | 16 | NULL, HFILL } |
2457 | 16 | }, |
2458 | 16 | { &hf_dsi3_mjr_hdr_master_st3_drop_data, |
2459 | 16 | { "Drop Data", "ebhscr.dsi3.ms.st3.drop_data", |
2460 | 16 | FT_BOOLEAN, 32, |
2461 | 16 | NULL, 0x00000020, |
2462 | 16 | NULL, HFILL } |
2463 | 16 | }, |
2464 | 16 | { &hf_mipi_csi2_status_packet_checksum_err, |
2465 | 16 | { "MIPI CSI-2 long packet checksum error", "ebhscr.mipi_csi2.st.checksum_err", |
2466 | 16 | FT_BOOLEAN, 12, |
2467 | 16 | NULL, 0x001, |
2468 | 16 | NULL, HFILL } |
2469 | 16 | }, |
2470 | 16 | { &hf_mipi_csi2_status_ecc_err, |
2471 | 16 | { "MIPI CSI-2 packet header contains an uncorrectable ECC error", "ebhscr.mipi_csi2.st.ecc_err", |
2472 | 16 | FT_BOOLEAN, 12, |
2473 | 16 | NULL, 0x004, |
2474 | 16 | NULL, HFILL } |
2475 | 16 | }, |
2476 | 16 | { &hf_mipi_csi2_status_payload_fifo_overflow, |
2477 | 16 | { "Payload FIFO Overflow error", "ebhscr.mipi_csi2.st.pld_fifo_of", |
2478 | 16 | FT_BOOLEAN, 12, |
2479 | 16 | NULL, 0x008, |
2480 | 16 | NULL, HFILL } |
2481 | 16 | }, |
2482 | 16 | { &hf_mipi_csi2_status_header_fifo_overflow, |
2483 | 16 | { "Header FIFO Overflow error", "ebhscr.mipi_csi2.st.hdr_fifo_of", |
2484 | 16 | FT_BOOLEAN, 12, |
2485 | 16 | NULL, 0x010, |
2486 | 16 | NULL, HFILL } |
2487 | 16 | }, |
2488 | 16 | { &hf_mipi_csi2_status_rcv_decoder_err, |
2489 | 16 | { "Receiver Decoder error", "ebhscr.mipi_csi2.st.rcv_dec_err", |
2490 | 16 | FT_BOOLEAN, 12, |
2491 | 16 | NULL, 0x020, |
2492 | 16 | NULL, HFILL } |
2493 | 16 | }, |
2494 | 16 | { &hf_mipi_csi2_status_payload_trunc_err, |
2495 | 16 | { "Payload Truncated Error", "ebhscr.mipi_csi2.st.pld_trunc_err", |
2496 | 16 | FT_BOOLEAN, 12, |
2497 | 16 | NULL, 0x040, |
2498 | 16 | NULL, HFILL } |
2499 | 16 | }, |
2500 | 16 | { &hf_mipi_csi2_status_trans_rejected, |
2501 | 16 | { "Transmission Rejected", "ebhscr.mipi_csi2.st.trns_rjct", |
2502 | 16 | FT_BOOLEAN, 12, |
2503 | 16 | NULL, 0x400, |
2504 | 16 | NULL, HFILL } |
2505 | 16 | }, |
2506 | 16 | { &hf_mipi_csi2_mjr_hdr_flags_packet_checksum_err, |
2507 | 16 | { "MIPI CSI-2 long packet checksum error", "ebhscr.mipi_csi2.mjhdr.flg.pkt_chsm_err", |
2508 | 16 | FT_BOOLEAN, 16, |
2509 | 16 | NULL, 0x0001, |
2510 | 16 | NULL, HFILL } |
2511 | 16 | }, |
2512 | 16 | { &hf_mipi_csi2_mjr_hdr_flags_correctable_ecc_err, |
2513 | 16 | { "MIPI CSI-2 packet header contains an correctable ECC error", "ebhscr.mipi_csi2.mjhdr.flg.corr_ecc_err", |
2514 | 16 | FT_BOOLEAN, 16, |
2515 | 16 | NULL, 0x0002, |
2516 | 16 | NULL, HFILL } |
2517 | 16 | }, |
2518 | 16 | { &hf_mipi_csi2_mjr_hdr_flags_uncorrectable_ecc_err, |
2519 | 16 | { "MIPI CSI-2 packet header contains an uncorrectable ECC error", "ebhscr.mipi_csi2.mjhdr.flg.uncorr_ecc_err", |
2520 | 16 | FT_BOOLEAN, 16, |
2521 | 16 | NULL, 0x0004, |
2522 | 16 | NULL, HFILL } |
2523 | 16 | }, |
2524 | 16 | { &hf_mipi_csi2_mjr_hdr_flags_mipi_phy_type, |
2525 | 16 | { "MIPI PHY Type", "ebhscr.mipi_csi2.mjhdr.flg.phy_type", |
2526 | 16 | FT_BOOLEAN, 16, |
2527 | 16 | TFS(&hf_mipi_csi2_mjr_hdr_flags_mipi_phy_type_string), 0x4000, |
2528 | 16 | NULL, HFILL } |
2529 | 16 | }, |
2530 | 16 | { &hf_mipi_csi2_mjr_hdr_flags_first_line_of_frame, |
2531 | 16 | { "Packet contains first line of a frame", "ebhscr.mipi_csi2.mjhdr.flg.flof", |
2532 | 16 | FT_BOOLEAN, 16, |
2533 | 16 | NULL, 0x8000, |
2534 | 16 | NULL, HFILL } |
2535 | 16 | }, |
2536 | 16 | { &hf_mipi_csi2_mjr_hdr_frame_counter, |
2537 | 16 | { "Frame Counter", "ebhscr.mipi_csi2.mjhdr.frame_cnt", |
2538 | 16 | FT_UINT16, BASE_DEC, |
2539 | 16 | NULL, 0x0, |
2540 | 16 | NULL, HFILL } |
2541 | 16 | }, |
2542 | 16 | { &hf_mipi_csi2_mjr_hdr_line_counter, |
2543 | 16 | { "Line Counter", "ebhscr.mipi_csi2.mjhdr.line_cnt", |
2544 | 16 | FT_UINT16, BASE_DEC, |
2545 | 16 | NULL, 0x0, |
2546 | 16 | NULL, HFILL } |
2547 | 16 | }, |
2548 | 16 | { &hf_mipi_csi2_payload_pkt_hdr, |
2549 | 16 | { "MIPI CSI-2 Packet Header", "ebhscr.mipi_csi2.pkt_hdr", |
2550 | 16 | FT_UINT64, BASE_HEX, |
2551 | 16 | NULL, 0x0, |
2552 | 16 | NULL, HFILL } |
2553 | 16 | }, |
2554 | 16 | { &hf_mipi_csi2_payload_pkt_hdr_dt, |
2555 | 16 | { "Data Type", "ebhscr.mipi_csi2.pkt_hdr.data_type", |
2556 | 16 | FT_UINT8, BASE_HEX, |
2557 | 16 | NULL, 0x3F, |
2558 | 16 | NULL, HFILL } |
2559 | 16 | }, |
2560 | 16 | { &hf_mipi_csi2_payload_pkt_hdr_vc, |
2561 | 16 | { "Virtual Channel", "ebhscr.mipi_csi2.pkt_hdr.vc", |
2562 | 16 | FT_UINT8, BASE_HEX, |
2563 | 16 | NULL, 0x03, |
2564 | 16 | NULL, HFILL } |
2565 | 16 | }, |
2566 | 16 | { &hf_mipi_csi2_payload_pkt_hdr_ecc, |
2567 | 16 | { "ECC", "ebhscr.mipi_csi2.pkt_hdr.ecc", |
2568 | 16 | FT_UINT8, BASE_HEX, |
2569 | 16 | NULL, 0x00, |
2570 | 16 | NULL, HFILL } |
2571 | 16 | }, |
2572 | 16 | { &hf_mipi_csi2_payload_pkt_hdr_crc, |
2573 | 16 | { "Checksum", "ebhscr.mipi_csi2.pkt_hdr.crc", |
2574 | 16 | FT_UINT16, BASE_HEX, |
2575 | 16 | NULL, 0x0, |
2576 | 16 | NULL, HFILL } |
2577 | 16 | }, |
2578 | 16 | { &hf_mipi_csi2_payload_pkt_hdr_wc_lsb, |
2579 | 16 | { "Word Count / Short packet Data Field (LSB)", "ebhscr.mipi_csi2.pkt_hdr.wc.lsb", |
2580 | 16 | FT_UINT16, BASE_HEX, |
2581 | 16 | NULL, 0xFF00, |
2582 | 16 | NULL, HFILL } |
2583 | 16 | }, |
2584 | 16 | { &hf_mipi_csi2_payload_pkt_hdr_wc_msb, |
2585 | 16 | { "Word Count / Short packet Data Field (MSB)", "ebhscr.mipi_csi2.pkt_hdr.wc.msb", |
2586 | 16 | FT_UINT16, BASE_HEX, |
2587 | 16 | NULL, 0x00FF, |
2588 | 16 | NULL, HFILL } |
2589 | 16 | }, |
2590 | 16 | { &hf_csi2_frame_status_packet_checksum_err, |
2591 | 16 | { "MIPI CSI-2 long packet checksum error", "ebhscr.csi2_frame.st.checksum_err", |
2592 | 16 | FT_BOOLEAN, 12, |
2593 | 16 | NULL, 0x001, |
2594 | 16 | NULL, HFILL } |
2595 | 16 | }, |
2596 | 16 | { &hf_csi2_frame_status_ecc_err, |
2597 | 16 | { "MIPI CSI-2 packet header contains an uncorrectable ECC error", "ebhscr.csi2_frame.st.ecc_err", |
2598 | 16 | FT_BOOLEAN, 12, |
2599 | 16 | NULL, 0x004, |
2600 | 16 | NULL, HFILL } |
2601 | 16 | }, |
2602 | 16 | { &hf_csi2_frame_status_rcv_decoder_err, |
2603 | 16 | { "Receiver Decoder error", "ebhscr.csi2_frame.st.decoder_err", |
2604 | 16 | FT_BOOLEAN, 12, |
2605 | 16 | NULL, 0x008, |
2606 | 16 | NULL, HFILL } |
2607 | 16 | }, |
2608 | 16 | { &hf_csi2_frame_status_section_err, |
2609 | 16 | { "Section Error", "ebhscr.csi2_frame.st.section_err", |
2610 | 16 | FT_BOOLEAN, 12, |
2611 | 16 | NULL, 0x010, |
2612 | 16 | NULL, HFILL } |
2613 | 16 | }, |
2614 | 16 | { &hf_csi2_frame_status_fifo_overflow, |
2615 | 16 | { "FIFO Overflow error", "ebhscr.csi2_frame.st.fifo_of", |
2616 | 16 | FT_BOOLEAN, 12, |
2617 | 16 | NULL, 0x020, |
2618 | 16 | NULL, HFILL } |
2619 | 16 | }, |
2620 | 16 | { &hf_csi2_frame_status_payload_trunc_err, |
2621 | 16 | { "Payload Truncated Error", "ebhscr.csi2_frame.st.trunc_err", |
2622 | 16 | FT_BOOLEAN, 12, |
2623 | 16 | NULL, 0x040, |
2624 | 16 | NULL, HFILL } |
2625 | 16 | }, |
2626 | 16 | { &hf_csi2_frame_status_trans_rejected, |
2627 | 16 | { "Transmission Rejected", "ebhscr.csi2_frame.st.trns_rjct", |
2628 | 16 | FT_BOOLEAN, 12, |
2629 | 16 | NULL, 0x400, |
2630 | 16 | NULL, HFILL } |
2631 | 16 | }, |
2632 | 16 | { &hf_csi2_frame_mjr_hdr_flags_proc, |
2633 | 16 | { "The image has been processed", "ebhscr.csi2_frame.mjr_hdr.flags.proc", |
2634 | 16 | FT_BOOLEAN, 32, |
2635 | 16 | NULL, 0x00010000, |
2636 | 16 | NULL, HFILL } |
2637 | 16 | }, |
2638 | 16 | { &hf_csi2_frame_mjr_hdr_flags_pad_align, |
2639 | 16 | { "Padding and alignment of 8 bytes", "ebhscr.csi2_frame.mjr_hdr.flags.pd_algn", |
2640 | 16 | FT_BOOLEAN, 32, |
2641 | 16 | NULL, 0x00040000, |
2642 | 16 | NULL, HFILL } |
2643 | 16 | }, |
2644 | 16 | { &hf_csi2_frame_mjr_hdr_flags_mipi_phy_type, |
2645 | 16 | { "MIPI PHY Type", "ebhscr.csi2_frame.mjr_hdr.flags.phy_type", |
2646 | 16 | FT_BOOLEAN, 32, |
2647 | 16 | TFS(&hf_mipi_csi2_mjr_hdr_flags_mipi_phy_type_string), 0x80000000, |
2648 | 16 | NULL, HFILL } |
2649 | 16 | }, |
2650 | 16 | { &hf_csi2_frame_mjr_hdr_vc, |
2651 | 16 | { "Virtual Channel", "ebhscr.csi2_frame.mjr_hdr.vc", |
2652 | 16 | FT_UINT32, BASE_HEX, |
2653 | 16 | NULL, 0x00000F00, |
2654 | 16 | NULL, HFILL } |
2655 | 16 | }, |
2656 | 16 | { &hf_csi2_frame_mjr_hdr_imhv, |
2657 | 16 | { "Image Header Version", "ebhscr.csi2_frame.mjr_hdr.imhv", |
2658 | 16 | FT_UINT32, BASE_HEX, |
2659 | 16 | NULL, 0x000000FF, |
2660 | 16 | NULL, HFILL } |
2661 | 16 | }, |
2662 | 16 | { &hf_csi2_frame_header, |
2663 | 16 | { "CSI-2 Frame Packet Header", "ebhscr.csi2_frame_hdrs", |
2664 | 16 | FT_BYTES, BASE_NO_DISPLAY_VALUE, |
2665 | 16 | NULL, 0x00, |
2666 | 16 | NULL, HFILL } |
2667 | 16 | }, |
2668 | 16 | { &hf_csi2_frame_sections[0], |
2669 | 16 | { "Section 0", "ebhscr.csi2_frame_hdr0", |
2670 | 16 | FT_BYTES, BASE_NO_DISPLAY_VALUE, |
2671 | 16 | NULL, 0x00, |
2672 | 16 | NULL, HFILL } |
2673 | 16 | }, |
2674 | 16 | { &hf_csi2_frame_sections[1], |
2675 | 16 | { "Section 1", "ebhscr.csi2_frame_hdr1", |
2676 | 16 | FT_BYTES, BASE_NO_DISPLAY_VALUE, |
2677 | 16 | NULL, 0x00, |
2678 | 16 | NULL, HFILL } |
2679 | 16 | }, |
2680 | 16 | { &hf_csi2_frame_sections[2], |
2681 | 16 | { "Section 2", "ebhscr.csi2_frame_hdr2", |
2682 | 16 | FT_BYTES, BASE_NO_DISPLAY_VALUE, |
2683 | 16 | NULL, 0x00, |
2684 | 16 | NULL, HFILL } |
2685 | 16 | }, |
2686 | 16 | { &hf_csi2_frame_sections[3], |
2687 | 16 | { "Section 3", "ebhscr.csi2_frame_hdr3", |
2688 | 16 | FT_BYTES, BASE_NO_DISPLAY_VALUE, |
2689 | 16 | NULL, 0x00, |
2690 | 16 | NULL, HFILL } |
2691 | 16 | }, |
2692 | 16 | { &hf_csi2_frame_sections[4], |
2693 | 16 | { "Section 4", "ebhscr.csi2_frame_hdr4", |
2694 | 16 | FT_BYTES, BASE_NO_DISPLAY_VALUE, |
2695 | 16 | NULL, 0x00, |
2696 | 16 | NULL, HFILL } |
2697 | 16 | }, |
2698 | 16 | { &hf_csi2_frame_sections[5], |
2699 | 16 | { "Section 5", "ebhscr.csi2_frame_hdr5", |
2700 | 16 | FT_BYTES, BASE_NO_DISPLAY_VALUE, |
2701 | 16 | NULL, 0x00, |
2702 | 16 | NULL, HFILL } |
2703 | 16 | }, |
2704 | 16 | { &hf_csi2_frame_sections[6], |
2705 | 16 | { "Section 6", "ebhscr.csi2_frame_hdr6", |
2706 | 16 | FT_BYTES, BASE_NO_DISPLAY_VALUE, |
2707 | 16 | NULL, 0x00, |
2708 | 16 | NULL, HFILL } |
2709 | 16 | }, |
2710 | 16 | { &hf_csi2_frame_sections[7], |
2711 | 16 | { "Section 7", "ebhscr.csi2_frame_hdr7", |
2712 | 16 | FT_BYTES, BASE_NO_DISPLAY_VALUE, |
2713 | 16 | NULL, 0x00, |
2714 | 16 | NULL, HFILL } |
2715 | 16 | }, |
2716 | 16 | { &hf_csi2_frame_header_payload_byte_offset, |
2717 | 16 | { "Payload Byte Offset", "ebhscr.csi2_frame_hdr.pbo", |
2718 | 16 | FT_UINT32, BASE_DEC, |
2719 | 16 | NULL, 0x00, |
2720 | 16 | NULL, HFILL } |
2721 | 16 | }, |
2722 | 16 | { &hf_csi2_frame_header_bytes_total, |
2723 | 16 | { "Bytes Total", "ebhscr.csi2_frame_hdr.byte_total", |
2724 | 16 | FT_UINT32, BASE_DEC, |
2725 | 16 | NULL, 0x00, |
2726 | 16 | NULL, HFILL } |
2727 | 16 | }, |
2728 | 16 | { &hf_csi2_frame_header_bytes_per_line, |
2729 | 16 | { "Bytes Per Line", "ebhscr.csi2_frame_hdr.bpl", |
2730 | 16 | FT_UINT16, BASE_DEC, |
2731 | 16 | NULL, 0x00, |
2732 | 16 | NULL, HFILL } |
2733 | 16 | }, |
2734 | 16 | { &hf_csi2_frame_header_number_lines, |
2735 | 16 | { "Number Lines", "ebhscr.csi2_frame_hdr.num_lines", |
2736 | 16 | FT_UINT16, BASE_DEC, |
2737 | 16 | NULL, 0x00, |
2738 | 16 | NULL, HFILL } |
2739 | 16 | }, |
2740 | 16 | { &hf_csi2_frame_header_error_bits_field, |
2741 | 16 | { "Error Bits", "ebhscr.csi2_frame_hdr.err_bits", |
2742 | 16 | FT_UINT8, BASE_HEX, |
2743 | 16 | NULL, 0x00, |
2744 | 16 | NULL, HFILL } |
2745 | 16 | }, |
2746 | 16 | { &hf_csi2_frame_header_mipi_data_type, |
2747 | 16 | { "MIPI Data Type", "ebhscr.csi2_frame_hdr.mipi_dt", |
2748 | 16 | FT_UINT8, BASE_HEX, |
2749 | 16 | NULL, 0x00, |
2750 | 16 | NULL, HFILL } |
2751 | 16 | }, |
2752 | 16 | { &hf_csi2_frame_header_error_bits_packet_checksum_err, |
2753 | 16 | { "MIPI CSI-2 long packet checksum error", "ebhscr.csi2_frame_hdr.err_bits.crc_err", |
2754 | 16 | FT_BOOLEAN, 8, |
2755 | 16 | NULL, 0x01, |
2756 | 16 | NULL, HFILL } |
2757 | 16 | }, |
2758 | 16 | { &hf_csi2_frame_header_error_bits_correctable_ecc_err, |
2759 | 16 | { "MIPI CSI-2 packet header contains an correctable ECC error", "ebhscr.csi2_frame_hdr.err_bits.cor_ecc_err", |
2760 | 16 | FT_BOOLEAN, 8, |
2761 | 16 | NULL, 0x02, |
2762 | 16 | NULL, HFILL } |
2763 | 16 | }, |
2764 | 16 | { &hf_csi2_frame_header_error_bits_uncorrectable_ecc_err, |
2765 | 16 | { "MIPI CSI-2 packet header contains an uncorrectable ECC error", "ebhscr.csi2_frame_hdr.err_bits.uncor_ecc_err", |
2766 | 16 | FT_BOOLEAN, 8, |
2767 | 16 | NULL, 0x04, |
2768 | 16 | NULL, HFILL } |
2769 | 16 | }, |
2770 | 16 | { &hf_csi2_frame_header_error_bits_rcv_dec_err, |
2771 | 16 | { "Receiver Decoder error", "ebhscr.csi2_frame_hdr.err_bits.rcv_decode_err", |
2772 | 16 | FT_BOOLEAN, 8, |
2773 | 16 | NULL, 0x08, |
2774 | 16 | NULL, HFILL } |
2775 | 16 | } |
2776 | 16 | }; |
2777 | | |
2778 | 16 | static int *ett[] = { |
2779 | 16 | &ett_ebhscr, |
2780 | 16 | &ett_ebhscr_channel, |
2781 | 16 | &ett_ebhscr_packet_header, |
2782 | 16 | &ett_ebhscr_status, |
2783 | 16 | &ett_ebhscr_mjr_hdr, |
2784 | 16 | &ett_lin_payload, |
2785 | 16 | }; |
2786 | | |
2787 | 16 | static ei_register_info ei[] = { |
2788 | 16 | { &ei_ebhscr_frame_header, |
2789 | 16 | { "ebhscr.frame_header", PI_MALFORMED, PI_ERROR, |
2790 | 16 | "Frame Header is malformed", EXPFILL } |
2791 | 16 | }, |
2792 | 16 | { &ei_ebhscr_err_status_flag, |
2793 | 16 | { "ebhscr.sts.err.status", PI_PROTOCOL, PI_WARN, |
2794 | 16 | "Status Flag is set", EXPFILL } |
2795 | 16 | }, |
2796 | 16 | { &ei_ebhscr_info_status_flag, |
2797 | 16 | { "ebhscr.sts.info.status", PI_PROTOCOL, PI_CHAT, |
2798 | 16 | "Status Flag is set", EXPFILL } |
2799 | 16 | }, |
2800 | 16 | { &ei_ebhscr_err_channel_flag, |
2801 | 16 | { "ebhscr.channel.err", PI_PROTOCOL, PI_ERROR, |
2802 | 16 | "Channel number is invalid", EXPFILL } |
2803 | 16 | }, |
2804 | 16 | { &ei_ebhscr_warn_mjr_hdr_status_flag, |
2805 | 16 | { "ebhscr.mjrhdr.warn", PI_PROTOCOL, PI_WARN, |
2806 | 16 | "Major number specific header status flag is set", EXPFILL } |
2807 | 16 | }, |
2808 | 16 | { &ei_ebhscr_warn_csi2_hdr_error_flag, |
2809 | 16 | { "ebhscr.csi2_frame_hdr.warn", PI_PROTOCOL, PI_WARN, |
2810 | 16 | "CSI-2 Frame header error bit is set", EXPFILL } |
2811 | 16 | } |
2812 | 16 | }; |
2813 | | |
2814 | 16 | proto_ebhscr = proto_register_protocol("EBHSCR Protocol", "EBHSCR", "ebhscr"); |
2815 | | |
2816 | 16 | proto_register_field_array(proto_ebhscr, hf, array_length(hf)); |
2817 | 16 | proto_register_subtree_array(ett, array_length(ett)); |
2818 | | |
2819 | 16 | expert_ebhscr = expert_register_protocol(proto_ebhscr); |
2820 | 16 | expert_register_field_array(expert_ebhscr, ei, array_length(ei)); |
2821 | | |
2822 | 16 | ebhscr_handle = register_dissector("ebhscr", dissect_ebhscr, proto_ebhscr); |
2823 | 16 | subdissector_table = register_decode_as_next_proto(proto_ebhscr, "ebhscr.subdissector", |
2824 | 16 | "ebhscr next level dissector", NULL); |
2825 | 16 | } |
2826 | | |
2827 | | void |
2828 | | proto_reg_handoff_ebhscr(void) |
2829 | 16 | { |
2830 | 16 | can_handle = find_dissector_add_dependency("can-hostendian", proto_ebhscr); |
2831 | 16 | can_fd_handle = find_dissector_add_dependency("canfd", proto_ebhscr); |
2832 | | |
2833 | 16 | eth_withfcs_handle = find_dissector_add_dependency("eth_withfcs", proto_ebhscr); |
2834 | 16 | eth_withoutfcs_handle = find_dissector_add_dependency("eth_withoutfcs", proto_ebhscr); |
2835 | 16 | ebhscr_user_handle = find_dissector_add_dependency("ebhscr_user", proto_ebhscr); |
2836 | | |
2837 | 16 | flexray_handle = find_dissector_add_dependency("flexray", proto_ebhscr); |
2838 | | |
2839 | 16 | dissector_add_uint("wtap_encap", WTAP_ENCAP_EBHSCR, ebhscr_handle); |
2840 | 16 | } |
2841 | | |
2842 | | /* |
2843 | | * Editor modelines - https://www.wireshark.org/tools/modelines.html |
2844 | | * |
2845 | | * Local variables: |
2846 | | * c-basic-offset: 4 |
2847 | | * tab-width: 8 |
2848 | | * indent-tabs-mode: nil |
2849 | | * End: |
2850 | | * |
2851 | | * vi: set shiftwidth=4 tabstop=8 expandtab: |
2852 | | * :indentSize=4:tabSize=8:noTabs=false: |
2853 | | */ |