From 7bd6c15378e920f89c76cd3beeb7e8bcf6a164e3 Mon Sep 17 00:00:00 2001 From: Gilbert Ramirez Date: Thu, 29 Jul 1999 05:47:07 +0000 Subject: 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 --- packet-ipv6.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'packet-ipv6.c') diff --git a/packet-ipv6.c b/packet-ipv6.c index c88fd1b8dd..70d367d024 100644 --- a/packet-ipv6.c +++ b/packet-ipv6.c @@ -1,7 +1,7 @@ /* packet-ipv6.c * Routines for IPv6 packet disassembly * - * $Id: packet-ipv6.c,v 1.10 1999/07/13 02:52:52 gram Exp $ + * $Id: packet-ipv6.c,v 1.11 1999/07/29 05:46:56 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -48,6 +48,8 @@ #include "etypes.h" #include "resolv.h" +static int proto_ipv6 = -1; + #ifndef offsetof #define offsetof(type, member) ((size_t)(&((type *)0)->member)) #endif @@ -127,7 +129,7 @@ dissect_ipv6(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { if (tree) { /* !!! specify length */ - ti = proto_tree_add_text(tree, offset, 40, "Internet Protocol Version 6"); + ti = proto_tree_add_item(tree, proto_ipv6, offset, 40, NULL); ipv6_tree = proto_item_add_subtree(ti, ETT_IPv6); /* !!! warning: version also contains 4 Bit priority */ @@ -402,3 +404,14 @@ inet_ntop6(src, dst, size) return (dst); } +void +proto_register_ipv6(void) +{ +/* static hf_register_info hf[] = { + { &variable, + { "Name", "ipv6.abbreviation", TYPE, VALS_POINTER }}, + };*/ + + proto_ipv6 = proto_register_protocol("Internet Protocol Version 6", "ipv6"); + /* proto_register_field_array(proto_ipv6, hf, array_length(hf));*/ +} -- cgit v1.2.3