aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ipv6.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>1999-07-29 05:47:07 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>1999-07-29 05:47:07 +0000
commit7bd6c15378e920f89c76cd3beeb7e8bcf6a164e3 (patch)
tree3e8a46fe6f7bb69698edb1187655e445bbfda37c /packet-ipv6.c
parent6f1d3a3be830da628246f7cea77fe9c491470d17 (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-ipv6.c')
-rw-r--r--packet-ipv6.c17
1 files changed, 15 insertions, 2 deletions
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 <gerald@zing.org>
@@ -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));*/
+}