diff options
author | jmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-08-02 23:36:07 +0000 |
---|---|---|
committer | jmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-08-02 23:36:07 +0000 |
commit | 4ad4caac3465466d917054d2f911b18ba27b4fe0 (patch) | |
tree | 21967e4c27ac5e02aa39319022dd2858682fc5f4 /packet-mbtcp.c | |
parent | 14e1dba11b93d23bda70c030b0f4dbcc8ea5c4a4 (diff) |
Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the toplevel directory. The removal of winsock2.h will
hopefully not cause any problems under MSVC++, as those files using
struct timeval still include wtap.h, which still includes winsock2.h.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5932 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-mbtcp.c')
-rw-r--r-- | packet-mbtcp.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/packet-mbtcp.c b/packet-mbtcp.c index 3987bb1107..4ef65e54f5 100644 --- a/packet-mbtcp.c +++ b/packet-mbtcp.c @@ -10,7 +10,7 @@ * * for information on Modbus/TCP. * - * $Id: packet-mbtcp.c,v 1.9 2002/07/17 00:42:41 guy Exp $ + * $Id: packet-mbtcp.c,v 1.10 2002/08/02 23:35:54 jmayer Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -46,14 +46,6 @@ #include <stdlib.h> #include <string.h> -#ifdef HAVE_SYS_TYPES_H -# include <sys/types.h> -#endif - -#ifdef HAVE_NETINET_IN_H -# include <netinet/in.h> -#endif - #include <glib.h> #include <epan/packet.h> @@ -234,9 +226,9 @@ dissect_mbtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Make entries in Info column on summary display (updated after building proto tree) */ tvb_memcpy(tvb, (guint8 *)&mh, offset, sizeof(mbtcp_hdr)); - mh.transaction_id = ntohs(mh.transaction_id); - mh.protocol_id = ntohs(mh.protocol_id); - mh.len = ntohs(mh.len); + mh.transaction_id = g_ntohs(mh.transaction_id); + mh.protocol_id = g_ntohs(mh.protocol_id); + mh.len = g_ntohs(mh.len); if ( mh.mdbs_hdr.function_code & 0x80 ) { mh.mdbs_hdr.function_code ^= 0x80; exception_returned = 1; @@ -268,9 +260,9 @@ dissect_mbtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) do { /* Avoids alignment problems on many architectures. */ tvb_memcpy(tvb, (guint8 *)&mh, offset, sizeof(mbtcp_hdr)); - mh.transaction_id = ntohs(mh.transaction_id); - mh.protocol_id = ntohs(mh.protocol_id); - mh.len = ntohs(mh.len); + mh.transaction_id = g_ntohs(mh.transaction_id); + mh.protocol_id = g_ntohs(mh.protocol_id); + mh.len = g_ntohs(mh.len); if ( mh.mdbs_hdr.function_code & 0x80 ) { tvb_memcpy(tvb, (guint8 *)&exception_code, offset + sizeof(mbtcp_hdr), 1); |