2 * Packet range routines (save, print, ...)
4 * $Id: range.h,v 1.8 2004/01/09 18:10:40 ulfl Exp $
6 * Dick Gooris <gooris@lucent.com>
7 * Ulf Lamping <ulf.lamping@web.de>
9 * Ethereal - Network traffic analyzer
10 * By Gerald Combs <gerald@ethereal.com>
11 * Copyright 1998 Gerald Combs
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28 #ifndef __PRINT_RANGE_H__
29 #define __PRINT_RANGE_H__
33 #include <epan/frame_data.h>
35 extern guint32 curr_selected_frame;
39 range_process_selected,
41 range_process_marked_range,
42 range_process_user_range
45 /* Range parser variables */
48 typedef struct range_admin_tag {
54 typedef struct packet_range_tag {
55 /* values coming from the UI */
56 packet_range_e process; /* which range to process */
57 gboolean process_filtered; /* captured or filtered packets */
59 /* user specified range(s) */
60 guint nranges; /* number of entries in ranges (0 based) */
61 range_admin_t ranges[MaxRange];
63 /* calculated values */
64 guint32 selected_packet; /* the currently selected packet */
66 /* current packet counts (captured) */
67 /* cfile.count */ /* packets in capture file */
68 /* cfile.marked_count */ /* packets marked */
69 guint32 mark_range_cnt; /* packets in marked range */
70 guint32 user_range_cnt; /* packets in user specified range */
72 /* current packet counts (displayed) */
73 guint32 displayed_cnt;
74 guint32 displayed_marked_cnt;
75 guint32 displayed_mark_range_cnt;
76 guint32 displayed_user_range_cnt;
78 /* "enumeration" values */
79 gboolean marked_range_active; /* marked range is currently processed */
80 guint32 marked_range_left; /* marked range packets left to do */
81 gboolean selected_done; /* selected packet already processed */
85 range_process_this, /* process this packet */
86 range_process_next, /* skip this packet, process next */
87 range_processing_finished /* stop processing, required packets done */
90 /* init the range structure */
91 extern void packet_range_init(packet_range_t *range);
93 /* init the processing run */
94 void packet_range_process_init(packet_range_t *range);
96 /* do we have to process all packets? */
97 extern gboolean packet_range_process_all(packet_range_t *range);
99 /* do we have to process this packet? */
100 extern range_process_e packet_range_process_packet(packet_range_t *range, frame_data *fdata);
102 /* convert user given string to the internal user specified range representation */
103 extern void packet_range_convert_str(packet_range_t *range, const gchar *es);
106 #endif /* __PRINT_RANGE_H__ */