aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-s7comm.h
diff options
context:
space:
mode:
authorThomas Wiens <th.wiens@gmx.de>2014-08-21 19:25:06 +0200
committerMichael Mann <mmann78@netscape.net>2014-09-04 12:55:45 +0000
commit1c1f187989e982a8172bb03542721c0cda6d9006 (patch)
tree84469630bc39a840d31f848140e012f232a150a1 /epan/dissectors/packet-s7comm.h
parent27d1b6addf2d63a7526c231495216484f18a6025 (diff)
s7comm: Add dissector for S7 Communication
S7 Communication is a Siemens proprietary protocol that runs between programmable logic controllers (PLC) of the Siemens S7-300/400 family. Dissector T.125 has to be disabled to let this dissector work. Change-Id: I578cf270a4ae567f8e20dbabec1ce1e13fc08e6e Reviewed-on: https://code.wireshark.org/review/3777 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-s7comm.h')
-rw-r--r--epan/dissectors/packet-s7comm.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/epan/dissectors/packet-s7comm.h b/epan/dissectors/packet-s7comm.h
new file mode 100644
index 0000000000..e52e3d310c
--- /dev/null
+++ b/epan/dissectors/packet-s7comm.h
@@ -0,0 +1,72 @@
+/* packet-s7comm.h
+ *
+ * Author: Thomas Wiens, 2014 (th.wiens@gmx.de)
+ * Description: Wireshark dissector for S7-Communication
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef __PACKET_S7COMM_H__
+#define __PACKET_S7COMM_H__
+
+/**************************************************************************
+ * Returnvalues of an item response
+ */
+#define S7COMM_ITEM_RETVAL_RESERVED 0x00
+#define S7COMM_ITEM_RETVAL_DATA_HW_FAULT 0x01
+#define S7COMM_ITEM_RETVAL_DATA_ACCESS_FAULT 0x03
+#define S7COMM_ITEM_RETVAL_DATA_OUTOFRANGE 0x05 /* the desired address is beyond limit for this PLC */
+#define S7COMM_ITEM_RETVAL_DATA_NOT_SUP 0x06 /* Type is not supported */
+#define S7COMM_ITEM_RETVAL_DATA_SIZEMISMATCH 0x07 /* Data type inconsistent */
+#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*/
+#define S7COMM_ITEM_RETVAL_DATA_OK 0xff
+
+/**************************************************************************
+ * Names of userdata subfunctions in group 4 (CPU functions)
+ */
+#define S7COMM_UD_SUBF_CPU_READSZL 0x01
+#define S7COMM_UD_SUBF_CPU_MSGS 0x02
+#define S7COMM_UD_SUBF_CPU_TRANSSTOP 0x03
+#define S7COMM_UD_SUBF_CPU_ALARMIND 0x11
+#define S7COMM_UD_SUBF_CPU_ALARMINIT 0x13
+#define S7COMM_UD_SUBF_CPU_ALARMACK1 0x0b
+#define S7COMM_UD_SUBF_CPU_ALARMACK2 0x0c
+
+/**************************************************************************
+ * Names of types in userdata parameter part
+ */
+#define S7COMM_UD_TYPE_PUSH 0x0
+#define S7COMM_UD_TYPE_REQ 0x4
+#define S7COMM_UD_TYPE_RES 0x8
+
+extern const value_string s7comm_item_return_valuenames[];
+
+#endif
+
+/*
+ * Editor modelines - http://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:
+ */