Wireshark-dev: [Wireshark-dev] modbus exception code 0x04 is Slave Device Failure, but wireshar
From: Sam Roberts <vieuxtech@xxxxxxxxx>
Date: Tue, 29 Nov 2011 12:13:16 -0800
See page 49 of:

  http://www.modbus.org/docs/Modbus_Application_Protocol_V1_1b.pdf

Cheers,
Sam


Index: epan/dissectors/packet-mbtcp.c
===================================================================
--- epan/dissectors/packet-mbtcp.c      (revision 40042)
+++ epan/dissectors/packet-mbtcp.c      (working copy)
@@ -150,7 +150,7 @@
     { ILLEGAL_FUNCTION,    "Illegal function" },
     { ILLEGAL_ADDRESS,     "Illegal data address" },
     { ILLEGAL_VALUE,       "Illegal data value" },
-    { ILLEGAL_RESPONSE,    "Illegal response length" },
+    { SLAVE_FAILURE,       "Slave device failure" },
     { ACKNOWLEDGE,         "Acknowledge" },
     { SLAVE_BUSY,          "Slave device busy" },
     { MEMORY_ERR,          "Memory parity error" },
Index: epan/dissectors/packet-mbtcp.h
===================================================================
--- epan/dissectors/packet-mbtcp.h      (revision 40042)
+++ epan/dissectors/packet-mbtcp.h      (working copy)
@@ -58,7 +58,7 @@
 #define ILLEGAL_FUNCTION       0x01
 #define ILLEGAL_ADDRESS                0x02
 #define ILLEGAL_VALUE          0x03
-#define ILLEGAL_RESPONSE       0x04
+#define SLAVE_FAILURE          0x04
 #define ACKNOWLEDGE            0x05
 #define SLAVE_BUSY             0x06
 #define MEMORY_ERR             0x08