diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-04-02 01:32:46 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-04-02 01:32:46 +0000 |
commit | 15fc29c820c8879c604f19181fdfe62104d98a9d (patch) | |
tree | 7a674d1fad4045f52aa37fd192ad529198d40956 /packet-wccp.c | |
parent | 49de302c8468bef63e38d6683e836abc6ea9ab5f (diff) | |
download | wireshark-15fc29c820c8879c604f19181fdfe62104d98a9d.tar.gz |
Fix a bunch of bits of code that used "tvb_get_ntohl()" to fetch IP
addresses and then tried to compensate for that error using "htonl()"
(or didn't bother compensating, in some cases).
svn path=/trunk/; revision=5082
Diffstat (limited to 'packet-wccp.c')
-rw-r--r-- | packet-wccp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/packet-wccp.c b/packet-wccp.c index eae52f7aa4..3c2b1ab979 100644 --- a/packet-wccp.c +++ b/packet-wccp.c @@ -2,7 +2,7 @@ * Routines for Web Cache Coordination Protocol dissection * Jerry Talkington <jerryt@netapp.com> * - * $Id: packet-wccp.c,v 1.28 2002/01/30 23:08:26 guy Exp $ + * $Id: packet-wccp.c,v 1.29 2002/04/02 01:32:46 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -204,6 +204,7 @@ dissect_wccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint32 wccp_message_type; guint16 length; guint32 cache_count; + guint32 ipaddr; guint i; if(check_col(pinfo->cinfo, COL_PROTOCOL)) { @@ -280,11 +281,12 @@ dissect_wccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) "Number of Web Caches: %u", cache_count); offset += 4; for (i = 0; i < cache_count; i++) { + tvb_memcpy(tvb, (guint8 *)&ipaddr, offset, 4); proto_tree_add_ipv4_format(wccp_tree, hf_cache_ip, tvb, offset, 4, - tvb_get_ntohl(tvb, offset), + ipaddr, "Web Cache %d IP Address: %s", i, - ip_to_str(tvb_get_ptr(tvb, offset, 4))); + ip_to_str((guint8 *)&ipaddr); offset += 4; } for (i = 0; i < 256; i += 4) { |