diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-07-29 05:47:07 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-07-29 05:47:07 +0000 |
commit | 7bd6c15378e920f89c76cd3beeb7e8bcf6a164e3 (patch) | |
tree | 3e8a46fe6f7bb69698edb1187655e445bbfda37c /packet-icmpv6.c | |
parent | 6f1d3a3be830da628246f7cea77fe9c491470d17 (diff) |
Made the protocol (but not the fields) use the new proto_tree routine,
allowing users to filter on the existence of these protocols. I also
added packet-clip.c to the Nmake makefile.
svn path=/trunk/; revision=402
Diffstat (limited to 'packet-icmpv6.c')
-rw-r--r-- | packet-icmpv6.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/packet-icmpv6.c b/packet-icmpv6.c index e7a5615a26..f4c734c77d 100644 --- a/packet-icmpv6.c +++ b/packet-icmpv6.c @@ -1,7 +1,7 @@ /* packet-icmpv6.c * Routines for ICMPv6 packet disassembly * - * $Id: packet-icmpv6.c,v 1.6 1999/07/28 02:32:25 gerald Exp $ + * $Id: packet-icmpv6.c,v 1.7 1999/07/29 05:46:55 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -63,6 +63,8 @@ #define offsetof(type, member) ((size_t)(&((type *)0)->member)) #endif +static int proto_icmpv6 = -1; + static void dissect_icmpv6opt(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { @@ -336,8 +338,7 @@ dissect_icmpv6(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) if (tree) { /* !!! specify length */ - ti = proto_tree_add_text(tree, offset, len, - "ICMPv6"); + ti = proto_tree_add_item(tree, proto_icmpv6, offset, len, NULL); icmp6_tree = proto_item_add_subtree(ti, ETT_ICMPv6); proto_tree_add_text(icmp6_tree, @@ -565,3 +566,15 @@ dissect_icmpv6(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) } } } + +void +proto_register_icmpv6(void) +{ +/* static hf_register_info hf[] = { + { &variable, + { "Name", "icmpv6.abbreviation", TYPE, VALS_POINTER }}, + };*/ + + proto_icmpv6 = proto_register_protocol("ICMPv6", "icmpv6"); + /* proto_register_field_array(proto_icmpv6, hf, array_length(hf));*/ +} |