aboutsummaryrefslogtreecommitdiffstats
path: root/packet-pop.c
diff options
context:
space:
mode:
authorLaurent Deniel <laurent.deniel@free.fr>1999-11-14 10:16:25 +0000
committerLaurent Deniel <laurent.deniel@free.fr>1999-11-14 10:16:25 +0000
commite4ca79b93f301ed4c2bfd918ca9bc1fe6af1791f (patch)
treed740984c67a1e4f40f4373d8473fd7df256fe44f /packet-pop.c
parentcfdb8fdc2c70a6a25ff071cfae176c96862fe797 (diff)
Add display filters.
svn path=/trunk/; revision=1026
Diffstat (limited to 'packet-pop.c')
-rw-r--r--packet-pop.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/packet-pop.c b/packet-pop.c
index 4a65076a7b..052aa28205 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.8 1999/10/03 13:44:32 deniel Exp $
+ * $Id: packet-pop.c,v 1.9 1999/11/14 10:16:25 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@@ -44,6 +44,8 @@
#include "packet.h"
static int proto_pop = -1;
+static int hf_pop_response = -1;
+static int hf_pop_request = -1;
void
dissect_pop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
@@ -89,14 +91,14 @@ dissect_pop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
pop_tree = proto_item_add_subtree(ti, ETT_POP);
if (pi.match_port == pi.destport) { /* Request */
-
+ proto_tree_add_item_hidden(pop_tree, hf_pop_request, offset, i1, TRUE);
proto_tree_add_text(pop_tree, offset, i1, "Request: %s", rr);
proto_tree_add_text(pop_tree, offset + i1 + 1, END_OF_FRAME, "Request Arg: %s", rd);
}
else {
-
+ proto_tree_add_item_hidden(pop_tree, hf_pop_response, offset, i1, TRUE);
proto_tree_add_text(pop_tree, offset, i1, "Response: %s", rr);
proto_tree_add_text(pop_tree, offset + i1 + 1, END_OF_FRAME, "Response Arg: %s", rd);
@@ -108,11 +110,19 @@ dissect_pop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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));*/
+ static hf_register_info hf[] = {
+ { &hf_pop_response,
+ { "Response", "pop.response",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+ "TRUE if POP response" }},
+
+ { &hf_pop_request,
+ { "Request", "pop.request",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+ "TRUE if POP request" }}
+ };
+
+ proto_pop = proto_register_protocol("Post Office Protocol", "pop");
+ proto_register_field_array(proto_pop, hf, array_length(hf));
}