summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-flexray.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:34:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:34:10 +0000
commite4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc (patch)
tree68cb5ef9081156392f1dd62a00c6ccc1451b93df /epan/dissectors/packet-flexray.h
parentInitial commit. (diff)
downloadwireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.tar.xz
wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.zip
Adding upstream version 4.2.2.upstream/4.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--epan/dissectors/packet-flexray.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/epan/dissectors/packet-flexray.h b/epan/dissectors/packet-flexray.h
new file mode 100644
index 00000000..8c0d631d
--- /dev/null
+++ b/epan/dissectors/packet-flexray.h
@@ -0,0 +1,44 @@
+/* packet-flexray.h
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef __PACKET_FLEXRAY_H__
+#define __PACKET_FLEXRAY_H__
+
+/* Structure that gets passed between dissectors (containing of frame id, counter cycle and channel). */
+typedef struct flexray_info {
+ guint16 id;
+ guint8 cc;
+ guint8 ch;
+ guint16 bus_id;
+} flexray_info_t;
+
+#define FLEXRAY_ID_CYCLE_MASK 0x000000FF
+#define FLEXRAY_ID_FRAME_ID_MASK 0x00FFFF00
+#define FLEXRAY_ID_CHANNEL_MASK 0x0F000000
+#define FLEXRAY_ID_BUS_ID_MASK 0xF0000000
+
+guint32 flexray_calc_flexrayid(guint16 bus_id, guint8 channel, guint16 frame_id, guint8 cycle);
+guint32 flexray_flexrayinfo_to_flexrayid(flexray_info_t *flexray_info);
+gboolean flexray_call_subdissectors(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, flexray_info_t *flexray_info, const gboolean use_heuristics_first);
+gboolean flexray_set_source_and_destination_columns(packet_info* pinfo, flexray_info_t *flexray_info);
+
+#endif /* __PACKET_FLEXRAY_H__ */
+
+/*
+ * Editor modelines - https://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */