| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
packet-flexray.h
1/* packet-flexray.h
2 *
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
6 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9
10#ifndef __PACKET_FLEXRAY_H__
11#define __PACKET_FLEXRAY_H__
12
13#define FLEXRAY_CHANNEL_MASK 0x80
14#define FLEXRAY_TYPE_MASK 0x7f
15#define FLEXRAY_FRAME 0x01
16#define FLEXRAY_SYMBOL 0x02
17
18#define FLEXRAY_ERRORS_DEFINED 0x1f
19#define FLEXRAY_FCRC_ERROR 0x10
20#define FLEXRAY_HCRC_ERROR 0x08
21#define FLEXRAY_FES_ERROR 0x04
22#define FLEXRAY_COD_ERROR 0x02
23#define FLEXRAY_TSS_ERROR 0x01
24
25#define FLEXRAY_HEADER_LENGTH 5
26
27#define FLEXRAY_RES_MASK 0x80
28#define FLEXRAY_PPI_MASK 0x40
29#define FLEXRAY_NFI_MASK 0x20
30#define FLEXRAY_SFI_MASK 0x10
31#define FLEXRAY_STFI_MASK 0x08
32
33#define FLEXRAY_ID_MASK 0x07ff
34#define FLEXRAY_LENGTH_MASK 0xfe
35#define FLEXRAY_HEADER_CRC_MASK 0x01ffc0
36#define FLEXRAY_HEADER_CRC_SHFT 6
37#define FLEXRAY_CC_MASK 0x3f
38
39/* Structure that gets passed between dissectors (containing of frame id, counter cycle and channel). */
40 typedef struct flexray_info {
41 uint16_t id;
42 uint8_t cc;
43 uint8_t ch;
44 uint16_t bus_id;
45} flexray_info_t;
46
47#define FLEXRAY_ID_CYCLE_MASK 0x000000FF
48#define FLEXRAY_ID_FRAME_ID_MASK 0x00FFFF00
49#define FLEXRAY_ID_CHANNEL_MASK 0x0F000000
50#define FLEXRAY_ID_BUS_ID_MASK 0xF0000000
51
52uint32_t flexray_calc_flexrayid(uint16_t bus_id, uint8_t channel, uint16_t frame_id, uint8_t cycle);
53uint32_t flexray_flexrayinfo_to_flexrayid(flexray_info_t *flexray_info);
54 bool flexray_call_subdissectors(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, flexray_info_t *flexray_info, const bool use_heuristics_first);
55 bool flexray_set_source_and_destination_columns(packet_info* pinfo, flexray_info_t *flexray_info);
56 void dissect_flexray_frame(tvbuff_t* tvb, tvbuff_t* start_tvb, packet_info* pinfo, proto_tree* tree, proto_tree* flexray_tree, bool call_subdissector, bool flexray_channel_is_b);
57
58#endif /* __PACKET_FLEXRAY_H__ */
59
60/*
61 * Editor modelines - https://www.wireshark.org/tools/modelines.html
62 *
63 * Local variables:
64 * c-basic-offset: 4
65 * tab-width: 8
66 * indent-tabs-mode: nil
67 * End:
68 *
69 * vi: set shiftwidth=4 tabstop=8 expandtab:
70 * :indentSize=4:tabSize=8:noTabs=true:
71 */
_packet_info
Definition packet_info.h:43
_proto_node
Definition proto.h:905
flexray_info
Definition packet-flexray.h:40
tvbuff
Definition tvbuff-int.h:36