From 7aba39031eb3133e95dd344c31bcfd73f3b33389 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 3 May 2002 21:38:20 +0000 Subject: [PATCH] From Didier Gautheron: add a "frame.marked" hidden field, set if the frame is marked, so that you can use Find Frame to find the next marked frame, and can filter the display to show only marked frames. Update the documentation to note that "frame.marked" is set on marked frames. svn path=/trunk/; revision=5377 --- AUTHORS | 1 + doc/ethereal.pod.template | 6 +++++- packet-frame.c | 8 +++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 033febfc64..d9fb7fcb58 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1148,6 +1148,7 @@ Didier Gautheron { X11 bug fix Appletalk Transaction Protocol, Appletalk Stream Protocol, and Appletalk Filing Protocol support + "frame.marked" field set on marked frames } Phil Williams { diff --git a/doc/ethereal.pod.template b/doc/ethereal.pod.template index 728ec92ea1..379c5127df 100644 --- a/doc/ethereal.pod.template +++ b/doc/ethereal.pod.template @@ -321,7 +321,11 @@ Go to a particular numbered packet. =item Edit:Mark Frame -Mark (or unmark if currently marked) the selected packet. +Mark (or unmark if currently marked) the selected packet. The field +"frame.marked" is set for frames that are marked, so that, for example, +a display filters can be used to display only marked frames, and so that +the L menu item can be used to find the next or previous +marked frame. =item Edit:Mark All Frames diff --git a/packet-frame.c b/packet-frame.c index b0ac92ee3f..c385f5253a 100644 --- a/packet-frame.c +++ b/packet-frame.c @@ -2,7 +2,7 @@ * * Top-most dissector. Decides dissector based on Wiretap Encapsulation Type. * - * $Id: packet-frame.c,v 1.24 2002/04/13 00:02:55 guy Exp $ + * $Id: packet-frame.c,v 1.25 2002/05/03 21:38:18 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -43,6 +43,8 @@ static int hf_frame_packet_len = -1; static int hf_frame_capture_len = -1; static int hf_frame_p2p_dir = -1; static int hf_frame_file_off = -1; +static int hf_frame_marked = -1; + static int proto_short = -1; int proto_malformed = -1; static int proto_unreassembled = -1; @@ -97,6 +99,7 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) cap_len = tvb_length(tvb); pkt_len = tvb_reported_length(tvb); + proto_tree_add_boolean_hidden(tree, hf_frame_marked, tvb, 0, 0,pinfo->fd->flags.marked); ti = proto_tree_add_protocol_format(tree, proto_frame, tvb, 0, -1, "Frame %u (%u on wire, %u captured)", pinfo->fd->num, pkt_len, cap_len); @@ -235,6 +238,9 @@ proto_register_frame(void) { "File Offset", "frame.file_off", FT_INT32, BASE_DEC, NULL, 0x0, "", HFILL }}, + { &hf_frame_marked, + { "Frame is marked", "frame.marked", FT_BOOLEAN, 8, NULL, 0x0, + "Frame is marked in the GUI", HFILL }}, }; static gint *ett[] = { &ett_frame,