Ethereal

[Ethereal-dev] Modbus/TCP patch
Google
 
Web Ethereal.com

Home | Introduction | Documentation | Lists | FAQ | Development | Wiki | Bugs

Ethereal-dev: May 2003


Patch to fix problem with unit ID and function code whereby they were interpreted as signed, rather than unsigned, bytes.

Steve Shelley

------------------------------------------------------------------------

Women and cats will do as they please, and men and dogs should relax and get used to the idea.

	- Robert A. Heinlein

Index: ethereal/packet-mbtcp.c
===================================================================
RCS file: /cvsroot/ethereal/packet-mbtcp.c,v
retrieving revision 1.13
diff -u -r1.13 packet-mbtcp.c
--- ethereal/packet-mbtcp.c	18 Apr 2003 04:45:00 -0000	1.13
+++ ethereal/packet-mbtcp.c	7 May 2003 21:48:20 -0000
@@ -96,8 +96,8 @@
 
 /* Modbus header */
 typedef struct _modbus_hdr {
-	gchar	unit_id;	/* unit identifier (previously slave addr) */
-	gchar	function_code; 	/* Modbus function code */
+	guchar	unit_id;	/* unit identifier (previously slave addr) */
+	guchar	function_code; 	/* Modbus function code */
 } modbus_hdr;
 
 /* Modbus/TCP header, containing the Modbus header */

Powered by MHonArc 2.6.10