/* packet-icmpv6.c
* Routines for ICMPv6 packet disassembly
*
- * $Id: packet-icmpv6.c,v 1.11 1999/11/16 11:42:31 guy Exp $
+ * $Id: packet-icmpv6.c,v 1.14 2000/03/12 04:47:38 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
#include "packet.h"
#include "packet-ipv6.h"
#include "resolv.h"
-#include "util.h"
#ifndef offsetof
#define offsetof(type, member) ((size_t)(&((type *)0)->member))
return;
again:
- if (!(fd->cap_len > offset))
+ if (!IS_DATA_IN_FRAME(offset))
return;
opt = (struct nd_opt_hdr *)&pd[offset];
ti = proto_tree_add_item(tree, proto_icmpv6, offset, len, NULL);
icmp6_tree = proto_item_add_subtree(ti, ett_icmpv6);
- proto_tree_add_item_format(icmp6_tree, hf_icmpv6_type,
+ proto_tree_add_uint_format(icmp6_tree, hf_icmpv6_type,
offset + offsetof(struct icmp6_hdr, icmp6_type), 1,
dp->icmp6_type,
"Type: 0x%02x (%s)", dp->icmp6_type, typename);
if (codename) {
- proto_tree_add_item_format(icmp6_tree, hf_icmpv6_code,
+ proto_tree_add_uint_format(icmp6_tree, hf_icmpv6_code,
offset + offsetof(struct icmp6_hdr, icmp6_code), 1,
dp->icmp6_code,
"Code: 0x%02x (%s)", dp->icmp6_code, codename);