aboutsummaryrefslogtreecommitdiffstats
path: root/packet-pop.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-pop.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-pop.c')
-rw-r--r--packet-pop.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/packet-pop.c b/packet-pop.c
index 6a0485b2bd..ff8547639b 100644
--- a/packet-pop.c
+++ b/packet-pop.c
@@ -2,7 +2,7 @@
* Routines for pop packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-pop.c,v 1.4 1999/07/07 22:51:50 gram Exp $
+ * $Id: packet-pop.c,v 1.5 1999/07/29 05:47:01 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@@ -46,6 +46,8 @@
extern packet_info pi;
+static int proto_pop = -1;
+
void
dissect_pop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int max_data)
{
@@ -81,8 +83,7 @@ dissect_pop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int
if (tree) {
- ti = proto_tree_add_text(tree, offset, END_OF_FRAME,
- "Post Office Protocol");
+ ti = proto_tree_add_item(tree, proto_pop, offset, END_OF_FRAME, NULL);
pop_tree = proto_item_add_subtree(ti, ETT_POP);
if (pi.match_port == pi.destport) { /* Request */
@@ -102,8 +103,14 @@ dissect_pop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int
}
}
+void
+proto_register_pop(void)
+{
+/* static hf_register_info hf[] = {
+ { &variable,
+ { "Name", "pop.abbreviation", TYPE, VALS_POINTER }},
+ };*/
-
-
-
-
+ proto_pop = proto_register_protocol("Post Office Protocol", "pop");
+ /* proto_register_field_array(proto_pop, hf, array_length(hf));*/
+}