aboutsummaryrefslogtreecommitdiffstats
path: root/packet-chdlc.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2002-04-02 01:32:46 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2002-04-02 01:32:46 +0000
commit91e568c7dd2f7aca444d50a1603db4c7ed800eaf (patch)
tree7a674d1fad4045f52aa37fd192ad529198d40956 /packet-chdlc.c
parent0b99646c9693f99279951017b48e0d40a364c662 (diff)
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). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5082 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-chdlc.c')
-rw-r--r--packet-chdlc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/packet-chdlc.c b/packet-chdlc.c
index a836a7ef51..24c02bcfb9 100644
--- a/packet-chdlc.c
+++ b/packet-chdlc.c
@@ -1,7 +1,7 @@
/* packet-chdlc.c
* Routines for Cisco HDLC packet disassembly
*
- * $Id: packet-chdlc.c,v 1.10 2002/01/21 07:36:32 guy Exp $
+ * $Id: packet-chdlc.c,v 1.11 2002/04/02 01:32:46 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -222,6 +222,7 @@ dissect_slarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *ti;
proto_tree *slarp_tree = NULL;
guint32 code;
+ guint32 address;
guint32 mysequence;
guint32 yoursequence;
@@ -242,9 +243,10 @@ dissect_slarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case SLARP_REQUEST:
case SLARP_REPLY:
if (check_col(pinfo->cinfo, COL_INFO)) {
+ tvb_memcpy(tvb, (guint8 *)&address, 4, 4);
col_add_fstr(pinfo->cinfo, COL_INFO, "%s, from %s, mask %s",
match_strval(code, slarp_ptype_vals),
- get_hostname(htonl(tvb_get_ntohl(tvb, 4))),
+ get_hostname(address),
ip_to_str(tvb_get_ptr(tvb, 8, 4)));
}
if (tree) {