From 401c68ff147a95f12cd0386ed37894b410a1fc05 Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 13 Nov 2000 07:19:37 +0000 Subject: Move "bytes_to_str()" to "strutil.c" from "packet.c" - it's just a string formatter, like "format_text()", and, as "tvbuff.c" now calls it (*vide infra*), we don't want to have to make "tvbuff.c" drag "packet.h" in just to declare "bytes_to_str()". It's now declared in "strutil.h", so include it in modules that use "bytes_to_str()" and weren't already including it. Add a "tvb_bytes_to_str()" wrapper that calls "tvb_get_ptr()" to get a pointer to a chunk of N bytes at a given offset in a tvbuff and then hands that chunk to "bytes_to_str()". Convert the code that was doing that to use "tvb_bytes_to_str()" instead (which caught what I suspect is a bug in the Q.2931 dissector, where it was handing an offset of 0 to "tvb_get_ptr()" - a cut-and-pasteo, I think). Tvbuffify the ARP dissector. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2634 f5534014-38df-0310-8fa8-9805f1628bb7 --- packet-arp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packet-arp.h') diff --git a/packet-arp.h b/packet-arp.h index 6da1857cb9..ce44a2c7a2 100644 --- a/packet-arp.h +++ b/packet-arp.h @@ -2,7 +2,7 @@ * Definitions of routines for ARP packet disassembly that are used * elsewhere * - * $Id: packet-arp.h,v 1.3 2000/04/16 22:59:36 guy Exp $ + * $Id: packet-arp.h,v 1.4 2000/11/13 07:18:40 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -30,6 +30,6 @@ gchar *arphrdaddr_to_str(guint8 *ad, int ad_len, guint16 type); gchar *arphrdtype_to_str(guint16 hwtype, const char *fmt); -void dissect_atm_nsap(const u_char *pd, int offset, int len, proto_tree *tree); +void dissect_atm_nsap(tvbuff_t *tvb, int offset, int len, proto_tree *tree); #endif /* packet-atm.h */ -- cgit v1.2.3