Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
packet-s7comm.h
1/* packet-s7comm.h
2 *
3 * Author: Thomas Wiens, 2014 ([email protected])
4 * Description: Wireshark dissector for S7-Communication
5 *
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <[email protected]>
8 * Copyright 1998 Gerald Combs
9 *
10 * SPDX-License-Identifier: GPL-2.0-or-later
11 */
12#ifndef __PACKET_S7COMM_H__
13#define __PACKET_S7COMM_H__
14
15/**************************************************************************
16 * Returnvalues of an item response
17 */
18#define S7COMM_ITEM_RETVAL_RESERVED 0x00
19#define S7COMM_ITEM_RETVAL_DATA_HW_FAULT 0x01
20#define S7COMM_ITEM_RETVAL_DATA_ACCESS_FAULT 0x03
21#define S7COMM_ITEM_RETVAL_DATA_OUTOFRANGE 0x05 /* the desired address is beyond limit for this PLC */
22#define S7COMM_ITEM_RETVAL_DATA_NOT_SUP 0x06 /* Type is not supported */
23#define S7COMM_ITEM_RETVAL_DATA_SIZEMISMATCH 0x07 /* Data type inconsistent */
24#define S7COMM_ITEM_RETVAL_DATA_ERR 0x0a /* the desired item is not available in the PLC, e.g. when trying to read a non existing DB*/
25#define S7COMM_ITEM_RETVAL_DATA_OK 0xff
26
27/**************************************************************************
28 * Names of userdata subfunctions in group 4 (CPU functions)
29 */
30#define S7COMM_UD_SUBF_CPU_READSZL 0x01
31#define S7COMM_UD_SUBF_CPU_MSGS 0x02
32#define S7COMM_UD_SUBF_CPU_DIAGMSG 0x03
33#define S7COMM_UD_SUBF_CPU_ALARM8_IND 0x05
34#define S7COMM_UD_SUBF_CPU_NOTIFY_IND 0x06
35#define S7COMM_UD_SUBF_CPU_ALARM8LOCK 0x07
36#define S7COMM_UD_SUBF_CPU_ALARM8UNLOCK 0x08
37#define S7COMM_UD_SUBF_CPU_ALARMACK 0x0b
38#define S7COMM_UD_SUBF_CPU_ALARMACK_IND 0x0c
39#define S7COMM_UD_SUBF_CPU_ALARM8LOCK_IND 0x0d
40#define S7COMM_UD_SUBF_CPU_ALARM8UNLOCK_IND 0x0e
41#define S7COMM_UD_SUBF_CPU_ALARMSQ_IND 0x11
42#define S7COMM_UD_SUBF_CPU_ALARMS_IND 0x12
43#define S7COMM_UD_SUBF_CPU_ALARMQUERY 0x13
44#define S7COMM_UD_SUBF_CPU_NOTIFY8_IND 0x16
45
46/**************************************************************************
47 * Names of types in userdata parameter part
48 */
49#define S7COMM_UD_TYPE_IND 0x0
50#define S7COMM_UD_TYPE_REQ 0x1
51#define S7COMM_UD_TYPE_RES 0x2
52
53extern const value_string s7comm_item_return_valuenames[];
54
55uint32_t s7comm_decode_ud_cpu_diagnostic_message(tvbuff_t *tvb, packet_info *pinfo, bool add_info_to_col, proto_tree *data_tree, uint32_t offset);
56
57#endif
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:901
Definition value_string.h:25
Definition tvbuff-int.h:35