Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

packet_range.h
1 /* packet_range.h
2 * Packet range routines (save, print, ...)
3 *
4 * Dick Gooris <gooris@lucent.com>
5 * Ulf Lamping <ulf.lamping@web.de>
6 *
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 */
13
14 #ifndef __PACKET_RANGE_H__
15 #define __PACKET_RANGE_H__
16
17 #ifdef __cplusplus
18 extern "C" {
19 #endif /* __cplusplus */
20
21 #include <glib.h>
22
23 #include <epan/range.h>
24 #include <epan/frame_data.h>
25
26 #include "cfile.h"
27
28 extern guint32 curr_selected_frame;
29
30 typedef enum {
31 range_process_all,
32 range_process_selected,
33 range_process_marked,
34 range_process_marked_range,
35 range_process_user_range
36 } packet_range_e;
37
38 typedef struct packet_range_tag {
39 /* values coming from the UI */
40 packet_range_e process; /* which range to process */
41 gboolean process_filtered; /* captured or filtered packets */
42 gboolean remove_ignored; /* remove ignored packets */
43 gboolean include_dependents; /* True if packets which are dependents of others should be processed */
44
45 /* user specified range(s) and, if null, error status */
46 range_t *user_range;
47 convert_ret_t user_range_status;
48
49 /* calculated values */
50 guint32 selected_packet; /* the currently selected packet */
51
52 /* current packet counts (captured) */
53 capture_file *cf; /* Associated capture file. */
54 guint32 mark_range_cnt; /* packets in marked range */
55 guint32 user_range_cnt; /* packets in user specified range */
56 guint32 ignored_cnt; /* packets ignored */
57 guint32 ignored_marked_cnt; /* packets ignored and marked */
58 guint32 ignored_mark_range_cnt; /* packets ignored in marked range */
59 guint32 ignored_user_range_cnt; /* packets ignored in user specified range */
60
61 /* current packet counts (displayed) */
62 guint32 displayed_cnt;
63 guint32 displayed_plus_dependents_cnt;
64 guint32 displayed_marked_cnt;
65 guint32 displayed_mark_range_cnt;
66 guint32 displayed_user_range_cnt;
67 guint32 displayed_ignored_cnt;
68 guint32 displayed_ignored_marked_cnt;
69 guint32 displayed_ignored_mark_range_cnt;
70 guint32 displayed_ignored_user_range_cnt;
71
72 /* "enumeration" values */
73 gboolean marked_range_active; /* marked range is currently processed */
74 guint32 marked_range_left; /* marked range packets left to do */
75 gboolean selected_done; /* selected packet already processed */
76 } packet_range_t;
77
78 typedef enum {
79 range_process_this, /* process this packet */
80 range_process_next, /* skip this packet, process next */
81 range_processing_finished /* stop processing, required packets done */
82 } range_process_e;
83
84 /* init the range structure */
85 extern void packet_range_init(packet_range_t *range, capture_file *cf);
86
87 /* check whether the packet range is OK */
88 extern convert_ret_t packet_range_check(packet_range_t *range);
89
90 /* init the processing run */
91 extern void packet_range_process_init(packet_range_t *range);
92
93 /* do we have to process all packets? */
94 extern gboolean packet_range_process_all(packet_range_t *range);
95
96 /* do we have to process this packet? */
97 extern range_process_e packet_range_process_packet(packet_range_t *range, frame_data *fdata);
98
99 /* convert user given string to the internal user specified range representation */
100 extern void packet_range_convert_str(packet_range_t *range, const gchar *es);
101
102 #ifdef __cplusplus
103 }
104 #endif /* __cplusplus */
105
106 #endif /* __PACKET_RANGE_H__ */
convert_ret_t
convert_ret_t
Definition: range.h:50
frame_data.h
range.h
range_t
Definition: sttype-range.c:22
_frame_data
Definition: frame_data.h:53
packet_range_tag
Definition: packet_range.h:38
_capture_file
Definition: cfile.h:58