aboutsummaryrefslogtreecommitdiffstats
path: root/packet-sdp.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-sdp.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-sdp.c')
-rw-r--r--packet-sdp.c19
1 files changed, 16 insertions, 3 deletions
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 <jal@netapp.com>
* Liberally copied from packet-http.c, by Guy Harris <guy@netapp.com>
*
- * $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 <gerald@zing.org>
@@ -40,6 +40,8 @@
#include <glib.h>
#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));*/
+}