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-sdp.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'packet-sdp.c') diff --git a/packet-sdp.c b/packet-sdp.c index c81554b712..8281e46321 100644 --- a/packet-sdp.c +++ b/packet-sdp.c @@ -4,7 +4,7 @@ * Jason Lango * Liberally copied from packet-http.c, by Guy Harris * - * $Id: packet-sdp.c,v 1.2 1999/07/07 22:51:53 gram Exp $ + * $Id: packet-sdp.c,v 1.3 1999/07/29 05:47:03 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -40,6 +40,8 @@ #include #include "packet.h" +static int proto_sdp = -1; + void dissect_sdp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { @@ -68,8 +70,7 @@ void dissect_sdp(const u_char *pd, int offset, frame_data *fd, if (!tree) return; - ti = proto_tree_add_text(tree, offset, END_OF_FRAME, - "Session Description Protocol"); + ti = proto_tree_add_item(tree, proto_sdp, offset, END_OF_FRAME, NULL); sdp_tree = proto_item_add_subtree(ti, ETT_SDP); section = 0; @@ -173,3 +174,15 @@ void dissect_sdp(const u_char *pd, int offset, frame_data *fd, "Data (%d bytes)", END_OF_FRAME); } } + +void +proto_register_sdp(void) +{ +/* static hf_register_info hf[] = { + { &variable, + { "Name", "sdp.abbreviation", TYPE, VALS_POINTER }}, + };*/ + + proto_sdp = proto_register_protocol("Session Description Protocol", "sdp"); + /* proto_register_field_array(proto_sdp, hf, array_length(hf));*/ +} -- cgit v1.2.3