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-isakmp.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'packet-isakmp.c') diff --git a/packet-isakmp.c b/packet-isakmp.c index 5e2b936ec7..c6267a0904 100644 --- a/packet-isakmp.c +++ b/packet-isakmp.c @@ -2,7 +2,7 @@ * Routines for the Internet Security Association and Key Management Protocol (ISAKMP) * Brad Robel-Forrest * - * $Id: packet-isakmp.c,v 1.6 1999/07/13 02:52:52 gram Exp $ + * $Id: packet-isakmp.c,v 1.7 1999/07/29 05:46:57 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -50,6 +50,8 @@ # include "snprintf.h" #endif +static int proto_isakmp = -1; + #define NUM_PROTO_TYPES 5 #define proto2str(t) \ ((t < NUM_PROTO_TYPES) ? prototypestr[t] : "UNKNOWN-PROTO-TYPE") @@ -291,8 +293,7 @@ void dissect_isakmp(const u_char *pd, int offset, frame_data *fd, proto_tree *tr proto_item * ti; proto_tree * isakmp_tree; - ti = proto_tree_add_text(tree, offset, len, - "Internet Security Association and Key Management Protocol"); + ti = proto_tree_add_item(tree, proto_isakmp, offset, len, NULL); isakmp_tree = proto_item_add_subtree(ti, ETT_ISAKMP); proto_tree_add_text(isakmp_tree, offset, sizeof(hdr->icookie), @@ -1049,3 +1050,14 @@ num2str(const guint8 *pd, guint16 len) { return numstr; } +void +proto_register_isakmp(void) +{ +/* static hf_register_info hf[] = { + { &variable, + { "Name", "isakmp.abbreviation", TYPE, VALS_POINTER }}, + };*/ + + proto_isakmp = proto_register_protocol("Internet Security Association and Key Management Protocol", "isakmp"); + /* proto_register_field_array(proto_isakmp, hf, array_length(hf));*/ +} -- cgit v1.2.3