diff options
author | Laurent Deniel <laurent.deniel@free.fr> | 1999-11-14 10:48:17 +0000 |
---|---|---|
committer | Laurent Deniel <laurent.deniel@free.fr> | 1999-11-14 10:48:17 +0000 |
commit | 56cfe0557ac02fba372a59abff3979d3ebdd9132 (patch) | |
tree | ee4cc1b9d4cd56a59675a0ea616abd5a15e6055f /packet-imap.c | |
parent | 095afe43dfef388929a451fd8825179ace688742 (diff) |
Add display filters.
svn path=/trunk/; revision=1028
Diffstat (limited to 'packet-imap.c')
-rw-r--r-- | packet-imap.c | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/packet-imap.c b/packet-imap.c index 46d7738426..15135c19cd 100644 --- a/packet-imap.c +++ b/packet-imap.c @@ -2,7 +2,7 @@ * Routines for imap packet dissection * Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com> * - * $Id: packet-imap.c,v 1.1 1999/11/10 14:44:57 nneul Exp $ + * $Id: packet-imap.c,v 1.2 1999/11/14 10:48:17 deniel Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@unicom.net> @@ -44,6 +44,8 @@ #include "packet.h" static int proto_imap = -1; +static int hf_imap_response = -1; +static int hf_imap_request = -1; void dissect_imap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) @@ -90,6 +92,7 @@ dissect_imap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) if (pi.match_port == pi.destport) { /* Request */ + proto_tree_add_item_hidden(imap_tree, hf_imap_request, offset, i1, TRUE); proto_tree_add_text(imap_tree, offset, i1, "Request Tag: %s", rr); proto_tree_add_text(imap_tree, offset + i1 + 1, END_OF_FRAME, "Request: %s", rd); @@ -97,6 +100,7 @@ dissect_imap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) } else { + proto_tree_add_item_hidden(imap_tree, hf_imap_response, offset, i1, TRUE); proto_tree_add_text(imap_tree, offset, i1, "Response Tag: %s", rr); proto_tree_add_text(imap_tree, offset + i1 + 1, END_OF_FRAME, "Response: %s", rd); @@ -108,11 +112,19 @@ dissect_imap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) void proto_register_imap(void) { -/* static hf_register_info hf[] = { - { &variable, - { "Name", "imap.abbreviation", TYPE, VALS_POINTER }}, - };*/ - - proto_imap = proto_register_protocol("IMAP", "imap"); - /* proto_register_field_array(proto_imap, hf, array_length(hf));*/ + static hf_register_info hf[] = { + { &hf_imap_response, + { "Response", "imap.response", + FT_BOOLEAN, BASE_NONE, NULL, 0x0, + "TRUE if IMAP response" }}, + + { &hf_imap_request, + { "Request", "imap.request", + FT_BOOLEAN, BASE_NONE, NULL, 0x0, + "TRUE if IMAP request" }} + }; + + proto_imap = proto_register_protocol("Internet Message Access Protocol", + "imap"); + proto_register_field_array(proto_imap, hf, array_length(hf)); } |