Wireshark 4.5.0
The Wireshark network protocol analyzer
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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). */
40typedef struct flexray_info {
41 uint16_t id;
42 uint8_t cc;
43 uint8_t ch;
44 uint16_t bus_id;
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);
54bool flexray_call_subdissectors(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, flexray_info_t *flexray_info, const bool use_heuristics_first);
55bool flexray_set_source_and_destination_columns(packet_info* pinfo, flexray_info_t *flexray_info);
56
57#endif /* __PACKET_FLEXRAY_H__ */
58
59/*
60 * Editor modelines - https://www.wireshark.org/tools/modelines.html
61 *
62 * Local variables:
63 * c-basic-offset: 4
64 * tab-width: 8
65 * indent-tabs-mode: nil
66 * End:
67 *
68 * vi: set shiftwidth=4 tabstop=8 expandtab:
69 * :indentSize=4:tabSize=8:noTabs=true:
70 */
Definition packet_info.h:43
Definition proto.h:907
Definition packet-flexray.h:40
Definition tvbuff-int.h:35