Wireshark 4.5.0
The Wireshark network protocol analyzer
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
packet-lin.h
1/* packet-lin.h
2 *
3 * Definitions for LIN
4 * By Dr. Lars Voelker <lars.voelker@technica-engineering.de> / <lars.voelker@bmw.de>
5 * Copyright 2021-2023 Dr. Lars Voelker
6 *
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 */
13
14#ifndef __PACKET_LIN_H__
15#define __PACKET_LIN_H__
16
17#define LIN_PAYLOAD_LENGTH_MASK 0xf0
18
19#define LIN_MSG_TYPE_MASK 0x0c
20#define LIN_MSG_TYPE_FRAME 0
21#define LIN_MSG_TYPE_EVENT 3
22
23#define LIN_CHECKSUM_TYPE_MASK 0x03
24
25#define LIN_FRAME_ID_MASK 0x3f
26
27#define LIN_EVENT_TYPE_GO_TO_SLEEP_EVENT_BY_GO_TO_SLEEP 0xB0B00001
28#define LIN_EVENT_TYPE_GO_TO_SLEEP_EVENT_BY_INACTIVITY 0xB0B00002
29#define LIN_EVENT_TYPE_WAKE_UP_BY_WAKE_UP_SIGNAL 0xB0B00004
30
31#define LIN_ERROR_NO_SLAVE_RESPONSE 0x01
32#define LIN_ERROR_FRAMING_ERROR 0x02
33#define LIN_ERROR_PARITY_ERROR 0x04
34#define LIN_ERROR_CHECKSUM_ERROR 0x08
35#define LIN_ERROR_INVALID_ID_ERROR 0x10
36#define LIN_ERROR_OVERFLOW_ERROR 0x20
37
38
39#define LIN_DIAG_MASTER_REQUEST_FRAME 0x3c
40#define LIN_DIAG_SLAVE_RESPONSE_FRAME 0x3d
41#define LIN_ID_MASK 0x3f
42
43/* bus_id 0 means ANY Bus */
44struct lin_info {
45 uint32_t id;
46 uint16_t bus_id;
47 uint16_t len;
48};
49
50typedef struct lin_info lin_info_t;
51
52bool lin_set_source_and_destination_columns(packet_info* pinfo, lin_info_t *lininfo);
53
54int dissect_lin_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, lin_info_t *lininfo);
55
56#endif /* __PACKET_LIN_H__ */
57
58/*
59 * Editor modelines - https://www.wireshark.org/tools/modelines.html
60 *
61 * Local variables:
62 * c-basic-offset: 4
63 * tab-width: 8
64 * indent-tabs-mode: nil
65 * End:
66 *
67 * vi: set shiftwidth=4 tabstop=8 expandtab:
68 * :indentSize=4:tabSize=8:noTabs=true:
69 */
Definition packet_info.h:43
Definition proto.h:907
Definition packet-lin.h:44
Definition tvbuff-int.h:35