Wireshark 4.7.2
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
packet_range.h
Go to the documentation of this file.
1
14
15#ifndef __PACKET_RANGE_H__
16#define __PACKET_RANGE_H__
17
18#include <glib.h>
19
20#include <epan/range.h>
21#include <epan/frame_data.h>
22
23#include <epan/cfile.h>
24
25#ifdef __cplusplus
26extern "C" {
27#endif /* __cplusplus */
28
29extern uint32_t curr_selected_frame;
30
41
46typedef struct packet_range_tag {
47
48 /* --- UI-supplied settings --- */
49
54
55 /* --- User-specified range --- */
56
59
60 /* --- Calculated selection range --- */
61
64
65 /* --- Captured packet counts --- */
66
68 uint32_t mark_range_cnt;
69 uint32_t user_range_cnt;
75 uint32_t ignored_cnt;
80
81 /* --- Displayed (filtered) packet counts --- */
82
83 uint32_t displayed_cnt;
98
99 /* --- Dependency hash sets --- */
100
109
110 /* --- Enumeration state --- */
111
114
116
125
133
134/* init the range structure */
135
142extern void packet_range_init(packet_range_t *range, capture_file *cf);
143
149extern void packet_range_cleanup(packet_range_t *range);
150
158
164extern void packet_range_process_init(packet_range_t *range);
165
172extern bool packet_range_process_all(packet_range_t *range);
173
182
189extern void packet_range_convert_str(packet_range_t *range, const char *es);
190
199extern void packet_range_convert_selection_str(packet_range_t *range, const char *es);
200
211extern uint32_t packet_range_count(const packet_range_t *range);
212
223
231
232#ifdef __cplusplus
233}
234#endif /* __cplusplus */
235
236#endif /* __PACKET_RANGE_H__ */
struct _capture_file capture_file
Represents a capture file and its associated metadata.
DIAG_OFF_PEDANTIC struct _frame_data frame_data
Frame data structure.
void packet_range_convert_selection_str(packet_range_t *range, const char *es)
Convert a selection string to a packet range.
Definition packet_range.c:516
bool packet_range_process_all(packet_range_t *range)
Check if all packets in the range need to be processed.
Definition packet_range.c:342
void packet_range_process_init(packet_range_t *range)
Initialize the processing run for a packet range.
Definition packet_range.c:326
struct packet_range_tag packet_range_t
Fully describes a packet range selection, including UI settings, derived counts, and dependency sets ...
convert_ret_t packet_range_check(packet_range_t *range)
Check whether the packet range is OK.
Definition packet_range.c:313
struct packet_range_iter packet_range_iter_t
Iterator state for stepping through a packet range one frame at a time.
range_process_e packet_range_process_packet(packet_range_t *range, frame_data *fdata)
Check if a packet should be processed based on the given range.
Definition packet_range.c:410
void packet_range_init(packet_range_t *range, capture_file *cf)
Initialize a packet range structure.
Definition packet_range.c:277
frame_data * packet_range_iter_next(packet_range_iter_t *iter)
Get the next frame data to process from a packet range.
Definition packet_range.c:667
packet_range_e
Selects which subset of packets in a capture file should be processed.
Definition packet_range.h:34
@ range_process_all
Definition packet_range.h:35
@ range_process_marked
Definition packet_range.h:37
@ range_process_marked_range
Definition packet_range.h:38
@ range_process_selected
Definition packet_range.h:36
@ range_process_user_range
Definition packet_range.h:39
range_process_e
Disposition returned per-packet by the range enumeration callback to control iteration.
Definition packet_range.h:120
@ range_processing_finished
Definition packet_range.h:123
@ range_process_next
Definition packet_range.h:122
@ range_process_this
Definition packet_range.h:121
uint32_t packet_range_count(const packet_range_t *range)
Return the number of packets that will be processed.
Definition packet_range.c:547
void packet_range_cleanup(packet_range_t *range)
Cleanup the range structure before the caller frees "range".
Definition packet_range.c:299
void packet_range_iter_init(packet_range_iter_t *iter, packet_range_t *range)
Initialize an iterator over a packet range.
Definition packet_range.c:659
void packet_range_convert_str(packet_range_t *range, const char *es)
Convert a user-given string to an internal selection specified range representation.
Definition packet_range.c:485
struct epan_range range_t
convert_ret_t
Return value from range_convert_str().
Definition range.h:50
Iterator state for stepping through a packet range one frame at a time.
Definition packet_range.h:129
uint32_t current_frame
Definition packet_range.h:131
packet_range_t * range
Definition packet_range.h:130
Fully describes a packet range selection, including UI settings, derived counts, and dependency sets ...
Definition packet_range.h:46
GHashTable * marked_plus_depends
Definition packet_range.h:101
bool remove_ignored
Definition packet_range.h:52
uint32_t selected_plus_depends_cnt
Definition packet_range.h:74
uint32_t displayed_user_range_cnt
Definition packet_range.h:87
uint32_t displayed_user_range_plus_depends_cnt
Definition packet_range.h:90
uint32_t displayed_cnt
Definition packet_range.h:83
uint32_t mark_range_cnt
Definition packet_range.h:68
uint32_t displayed_mark_range_plus_depends_cnt
Definition packet_range.h:89
uint32_t user_range_plus_depends_cnt
Definition packet_range.h:73
GHashTable * displayed_mark_range_plus_depends
Definition packet_range.h:104
GHashTable * displayed_selected_plus_depends
Definition packet_range.h:108
uint32_t displayed_mark_range_cnt
Definition packet_range.h:86
uint32_t ignored_user_range_cnt
Definition packet_range.h:78
range_t * user_range
Definition packet_range.h:57
uint32_t displayed_ignored_user_range_cnt
Definition packet_range.h:96
uint32_t selection_range_cnt
Definition packet_range.h:70
bool include_dependents
Definition packet_range.h:53
range_t * selection_range
Definition packet_range.h:62
convert_ret_t user_range_status
Definition packet_range.h:58
uint32_t displayed_ignored_selection_range_cnt
Definition packet_range.h:97
uint32_t ignored_selection_range_cnt
Definition packet_range.h:79
bool marked_range_active
Definition packet_range.h:112
uint32_t displayed_ignored_marked_cnt
Definition packet_range.h:94
uint32_t marked_range_left
Definition packet_range.h:113
uint32_t ignored_cnt
Definition packet_range.h:75
uint32_t displayed_selected_plus_depends_cnt
Definition packet_range.h:92
uint32_t marked_plus_depends_cnt
Definition packet_range.h:71
uint32_t mark_range_plus_depends_cnt
Definition packet_range.h:72
uint32_t ignored_marked_cnt
Definition packet_range.h:76
uint32_t displayed_ignored_cnt
Definition packet_range.h:93
uint32_t ignored_mark_range_cnt
Definition packet_range.h:77
bool process_filtered
Definition packet_range.h:51
GHashTable * displayed_marked_plus_depends
Definition packet_range.h:102
uint32_t displayed_ignored_mark_range_cnt
Definition packet_range.h:95
GHashTable * user_range_plus_depends
Definition packet_range.h:105
GHashTable * displayed_user_range_plus_depends
Definition packet_range.h:106
GHashTable * selected_plus_depends
Definition packet_range.h:107
uint32_t displayed_marked_plus_depends_cnt
Definition packet_range.h:88
packet_range_e process
Definition packet_range.h:50
uint32_t displayed_selection_range_cnt
Definition packet_range.h:91
uint32_t displayed_plus_dependents_cnt
Definition packet_range.h:84
uint32_t displayed_marked_cnt
Definition packet_range.h:85
convert_ret_t selection_range_status
Definition packet_range.h:63
uint32_t user_range_cnt
Definition packet_range.h:69
GHashTable * mark_range_plus_depends
Definition packet_range.h:103
capture_file * cf
Definition packet_range.h:67