summaryrefslogtreecommitdiffstats
path: root/cfile.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
commit9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9 (patch)
tree2784370cda9bbf2da9114d70f05399c0b229d28c /cfile.h
parentAdding debian version 4.2.6-1. (diff)
downloadwireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.tar.xz
wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cfile.h')
-rw-r--r--cfile.h74
1 files changed, 38 insertions, 36 deletions
diff --git a/cfile.h b/cfile.h
index 9c4b7acd..7137cab9 100644
--- a/cfile.h
+++ b/cfile.h
@@ -67,53 +67,54 @@ struct packet_provider_data {
typedef struct _capture_file {
epan_t *epan;
file_state state; /* Current state of capture file */
- gchar *filename; /* Name of capture file */
- gchar *source; /* Temp file source, e.g. "Pipe from elsewhere" */
- gboolean is_tempfile; /* Is capture file a temporary file? */
- gboolean unsaved_changes; /* Does the capture file have changes that have not been saved? */
- gboolean stop_flag; /* Stop current processing (loading, searching, etc.) */
-
- gint64 f_datalen; /* Size of capture file data (uncompressed) */
- guint16 cd_t; /* File type of capture file */
+ char *filename; /* Name of capture file */
+ char *source; /* Temp file source, e.g. "Pipe from elsewhere" */
+ bool is_tempfile; /* Is capture file a temporary file? */
+ bool unsaved_changes; /* Does the capture file have changes that have not been saved? */
+ bool stop_flag; /* Stop current processing (loading, searching, etc.) */
+
+ int64_t f_datalen; /* Size of capture file data (uncompressed) */
+ uint16_t cd_t; /* File type of capture file */
unsigned int open_type; /* open_routine index+1 used, if selected, or WTAP_TYPE_AUTO */
wtap_compression_type compression_type; /* Compression type of the file, or uncompressed */
int lnk_t; /* File link-layer type; could be WTAP_ENCAP_PER_PACKET */
GArray *linktypes; /* Array of packet link-layer types */
- guint32 count; /* Total number of frames */
- guint64 packet_comment_count; /* Number of comments in frames (could be >1 per frame... */
- guint32 displayed_count; /* Number of displayed frames */
- guint32 marked_count; /* Number of marked frames */
- guint32 ignored_count; /* Number of ignored frames */
- guint32 ref_time_count; /* Number of time referenced frames */
- gboolean drops_known; /* TRUE if we know how many packets were dropped */
- guint32 drops; /* Dropped packets */
+ uint32_t count; /* Total number of frames */
+ uint64_t packet_comment_count; /* Number of comments in frames (could be >1 per frame... */
+ uint32_t displayed_count; /* Number of displayed frames */
+ uint32_t marked_count; /* Number of marked frames */
+ uint32_t ignored_count; /* Number of ignored frames */
+ uint32_t ref_time_count; /* Number of time referenced frames */
+ bool drops_known; /* true if we know how many packets were dropped */
+ uint32_t drops; /* Dropped packets */
nstime_t elapsed_time; /* Elapsed time */
int snap; /* Maximum captured packet length; 0 if unknown */
dfilter_t *rfcode; /* Compiled read filter program */
dfilter_t *dfcode; /* Compiled display filter program */
- gchar *dfilter; /* Display filter string */
- gboolean redissecting; /* TRUE if currently redissecting (cf_redissect_packets) */
- gboolean read_lock; /* TRUE if currently processing a file (cf_read) */
+ char *dfilter; /* Display filter string */
+ bool redissecting; /* true if currently redissecting (cf_redissect_packets) */
+ bool read_lock; /* true if currently processing a file (cf_read) */
rescan_type redissection_queued; /* Queued redissection type. */
/* search */
- gchar *sfilter; /* Filter, hex value, or string being searched */
- gboolean hex; /* TRUE if "Hex value" search was last selected */
- gboolean string; /* TRUE if "String" search was last selected */
- gboolean summary_data; /* TRUE if "String" search in "Packet list" (Info column) was last selected */
- gboolean decode_data; /* TRUE if "String" search in "Packet details" was last selected */
- gboolean packet_data; /* TRUE if "String" search in "Packet data" was last selected */
- guint32 search_pos; /* Byte position of last byte found in a hex search */
- guint32 search_len; /* Length of bytes matching the search */
- gboolean case_type; /* TRUE if case-insensitive text search */
+ char *sfilter; /* Filter, hex value, or string being searched */
+ /* XXX: Some of these booleans should be enums; they're exclusive cases */
+ bool hex; /* true if "Hex value" search was last selected */
+ bool string; /* true if "String" (or "Regex"?) search was last selected */
+ bool summary_data; /* true if "String" search in "Packet list" (Info column) was last selected */
+ bool decode_data; /* true if "String" search in "Packet details" was last selected */
+ bool packet_data; /* true if "String" search in "Packet data" was last selected */
+ uint32_t search_pos; /* Byte position of first byte found in a hex search */
+ uint32_t search_len; /* Length of bytes matching the search */
+ bool case_type; /* true if case-insensitive text search */
ws_regex_t *regex; /* Set if regular expression search */
search_charset_t scs_type; /* Character set for text search */
search_direction dir; /* Direction in which to do searches */
- gboolean search_in_progress; /* TRUE if user just clicked OK in the Find dialog or hit <control>N/B */
+ bool search_in_progress; /* true if user just clicked OK in the Find dialog or hit <control>N/B */
/* packet provider */
struct packet_provider_data provider;
/* frames */
- guint32 first_displayed; /* Frame number of first frame displayed */
- guint32 last_displayed; /* Frame number of last frame displayed */
+ uint32_t first_displayed; /* Frame number of first frame displayed */
+ uint32_t last_displayed; /* Frame number of last frame displayed */
/* Data for currently selected frame */
column_info cinfo; /* Column formatting information */
frame_data *current_frame; /* Frame data */
@@ -122,16 +123,17 @@ typedef struct _capture_file {
wtap_rec rec; /* Record header */
Buffer buf; /* Record data */
- gpointer window; /* Top-level window associated with file */
- gulong computed_elapsed; /* Elapsed time to load the file (in msec). */
+ void * window; /* Top-level window associated with file */
+ unsigned long computed_elapsed; /* Elapsed time to load the file (in msec). */
- guint32 cum_bytes;
+ uint32_t cum_bytes;
} capture_file;
extern void cap_file_init(capture_file *cf);
-const char *cap_file_provider_get_interface_name(struct packet_provider_data *prov, guint32 interface_id);
-const char *cap_file_provider_get_interface_description(struct packet_provider_data *prov, guint32 interface_id);
+const nstime_t *cap_file_provider_get_frame_ts(struct packet_provider_data *prov, uint32_t frame_num);
+const char *cap_file_provider_get_interface_name(struct packet_provider_data *prov, uint32_t interface_id, unsigned section_number);
+const char *cap_file_provider_get_interface_description(struct packet_provider_data *prov, uint32_t interface_id, unsigned section_number);
wtap_block_t cap_file_provider_get_modified_block(struct packet_provider_data *prov, const frame_data *fd);
void cap_file_provider_set_modified_block(struct packet_provider_data *prov, frame_data *fd, const wtap_block_t new_block);