18#include <epan/fifo_string_cache.h>
291 unsigned save_format,
292 ws_compression_type compression_type,
293 bool discard_comments,
313 unsigned save_format,
314 ws_compression_type compression_type);
505 bool show_progress_bar);
739 int in_file_count,
const char *
const *in_filenames,
740 int file_type,
bool do_append);
struct _capture_file capture_file
Represents a capture file and its associated metadata.
search_direction
Direction of a packet search through the capture.
Definition cfile.h:63
char * cf_get_basename(capture_file *cf)
Definition file.c:1121
void cf_unmark_frame(capture_file *cf, frame_data *frame)
Definition file.c:4988
cf_print_status_t cf_write_csv_packets(capture_file *cf, print_args_t *print_args)
Definition file.c:3030
bool cf_goto_frame(capture_file *cf, unsigned row, bool exact)
Definition file.c:4771
cf_read_status_t
Definition file.h:32
@ CF_READ_ERROR
Definition file.h:34
@ CF_READ_OK
Definition file.h:33
@ CF_READ_ABORTED
Definition file.h:35
bool cf_find_packet_marked(capture_file *cf, search_direction dir)
Definition file.c:4560
void cf_update_section_comments(capture_file *cf, unsigned shb_idx, char **comments)
Definition file.c:5059
bool cf_read_record_no_alert(capture_file *cf, const frame_data *fdata, wtap_rec *rec)
Reads a record from the capture file without generating alerts.
Definition file.c:1657
uint32_t cf_comment_types(capture_file *cf)
Definition file.c:5179
cf_status_t cf_reload(capture_file *cf)
Definition file.c:6063
bool cf_has_unsaved_data(capture_file *cf)
Definition file.c:5398
cf_print_status_t cf_print_packets(capture_file *cf, print_args_t *print_args, bool show_progress_bar)
Definition file.c:2669
bool cf_find_packet_data(capture_file *cf, const uint8_t *string, size_t string_size, search_direction dir, bool multiple)
Definition file.c:3588
void cf_close(capture_file *cf)
Definition file.c:357
void cf_set_drops_known(capture_file *cf, bool drops_known)
Definition file.c:1214
cf_read_status_t cf_retap_packets(capture_file *cf)
Rescan all packets and just run taps - don't reconstruct the display.
Definition file.c:2369
cf_print_status_t cf_write_psml_packets(capture_file *cf, print_args_t *print_args)
Definition file.c:2949
void(* cf_callback_t)(int event, void *data, void *user_data)
Callback function type invoked when a capture file lifecycle event occurs.
Definition file.h:82
void cf_set_tempfile_source(capture_file *cf, char *source)
Definition file.c:1168
void cf_reftime_packets(capture_file *cf)
Definition file.c:2128
bool cf_get_drops_known(capture_file *cf)
Definition file.c:1228
uint32_t cf_get_drops(capture_file *cf)
Definition file.c:1235
bool cf_goto_framenum(capture_file *cf)
Definition file.c:4871
bool cf_set_modified_block(capture_file *cf, frame_data *fd, const wtap_block_t new_block)
Definition file.c:5139
bool cf_can_save(capture_file *cf)
Definition file.c:5336
int cf_get_packet_count(capture_file *cf)
Definition file.c:1193
void cf_callback_add(cf_callback_t func, void *user_data)
Definition file.c:188
void cf_ignore_frame(capture_file *cf, frame_data *frame)
Definition file.c:5001
bool cf_find_packet_time_reference(capture_file *cf, search_direction dir)
Definition file.c:4573
cf_status_t cf_merge_files_to_tempfile(void *pd_window, const char *temp_dir, char **out_filenamep, int in_file_count, const char *const *in_filenames, int file_type, bool do_append)
Merges multiple files into a temporary file.
Definition file.c:1504
cf_print_status_t cf_write_pdml_packets(capture_file *cf, print_args_t *print_args)
Definition file.c:2873
cf_print_status_t cf_write_carrays_packets(capture_file *cf, print_args_t *print_args)
Definition file.c:3098
bool cf_add_ip_name_from_string(capture_file *cf, const char *addr, const char *name)
Definition file.c:5213
void cf_set_max_records(unsigned max_records)
Definition file.c:154
field_info * cf_find_string_protocol_tree(capture_file *cf, proto_tree *tree)
Definition file.c:3251
bool cf_read_record(capture_file *cf, const frame_data *fdata, wtap_rec *rec)
Definition file.c:1644
void cf_mark_frame(capture_file *cf, frame_data *frame)
Definition file.c:4975
void cf_unselect_packet(capture_file *cf)
Definition file.c:4953
unsigned long cf_get_computed_elapsed(capture_file *cf)
Return the time it took to load the file (in msec).
Definition file.c:219
bool cf_can_save_as(capture_file *cf)
Definition file.c:5375
bool cf_read_current_record(capture_file *cf)
Definition file.c:1671
const char * cf_get_tempfile_source(capture_file *cf)
Definition file.c:1182
void cf_set_rfcode(capture_file *cf, dfilter_t *rfcode)
Definition file.c:1241
void cf_set_drops(capture_file *cf, uint32_t drops)
Definition file.c:1221
bool cf_find_packet_summary_line(capture_file *cf, const char *string, search_direction dir)
Definition file.c:3482
void cf_fake_continue_tail(capture_file *cf)
Fake reading packets from the "end" of a capture file.
cf_print_status_t cf_write_json_packets(capture_file *cf, print_args_t *print_args)
Definition file.c:3168
void cf_set_tempfile(capture_file *cf, bool is_tempfile)
Definition file.c:1206
cf_read_status_t cf_read(capture_file *cf, bool reloading)
Definition file.c:491
cf_read_status_t cf_finish_tail(capture_file *cf, wtap_rec *rec, int *err, fifo_string_cache_t *frame_dup_cache, GChecksum *frame_cksum)
Finish reading from "end" of a capture file.
void cf_retap_aggregation_packets(capture_file *cf, bool enable)
Definition file.c:2492
char * cf_get_display_name(capture_file *cf)
Get a displayable name of the capture file.
Definition file.c:1095
bool cf_is_tempfile(capture_file *cf)
Definition file.c:1200
cf_write_status_t cf_export_specified_packets(capture_file *cf, const char *fname, packet_range_t *range, unsigned save_format, ws_compression_type compression_type)
Definition file.c:5934
cf_cbs
Event identifiers for capture file lifecycle callbacks.
Definition file.h:55
@ cf_cb_file_retap_finished
Definition file.h:66
@ cf_cb_file_save_failed
Definition file.h:72
@ cf_cb_file_reload_finished
Definition file.h:62
@ cf_cb_file_save_started
Definition file.h:70
@ cf_cb_file_retap_started
Definition file.h:65
@ cf_cb_file_merge_started
Definition file.h:67
@ cf_cb_file_merge_finished
Definition file.h:68
@ cf_cb_file_rescan_finished
Definition file.h:64
@ cf_cb_file_fast_save_finished
Definition file.h:69
@ cf_cb_file_read_finished
Definition file.h:60
@ cf_cb_file_opened
Definition file.h:56
@ cf_cb_file_reload_started
Definition file.h:61
@ cf_cb_file_save_finished
Definition file.h:71
@ cf_cb_file_rescan_started
Definition file.h:63
@ cf_cb_file_closed
Definition file.h:58
@ cf_cb_file_closing
Definition file.h:57
@ cf_cb_file_save_stopped
Definition file.h:73
@ cf_cb_file_read_started
Definition file.h:59
cf_status_t
Definition file.h:26
@ CF_ERROR
Definition file.h:28
@ CF_OK
Definition file.h:27
cf_status_t cf_open(capture_file *cf, const char *fname, unsigned int type, bool is_tempfile, int *err)
Definition file.c:251
cf_status_t cf_filter_packets(capture_file *cf, char *dfilter, bool force)
Definition file.c:1540
cf_read_status_t cf_continue_tail(capture_file *cf, volatile int to_read, wtap_rec *rec, int *err, fifo_string_cache_t *frame_dup_cache, GChecksum *frame_cksum)
Read packets from the "end" of a capture file.
void cf_callback_remove(cf_callback_t func, void *user_data)
Definition file.c:200
void cf_unignore_frame(capture_file *cf, frame_data *frame)
Definition file.c:5014
bool cf_find_packet_protocol_tree(capture_file *cf, const char *string, search_direction dir, bool multiple)
Definition file.c:3225
bool cf_can_write_with_wiretap(capture_file *cf)
Definition file.c:5307
void cf_update_section_comment(capture_file *cf, char *comment)
Definition file.c:5027
print_range_e
Selects which frames from a capture file should be included in a print or export operation.
Definition file.h:465
@ print_range_all_displayed
Definition file.h:468
@ print_range_all_captured
Definition file.h:469
@ print_range_selected_only
Definition file.h:466
@ print_range_marked_only
Definition file.h:467
bool cf_find_packet_dfilter(capture_file *cf, dfilter_t *sfcode, search_direction dir, bool start_current)
Definition file.c:4505
void cf_redissect_packets(capture_file *cf)
"Something" has changed, rescan all packets.
Definition file.c:1618
cf_print_status_t
Definition file.h:46
@ CF_PRINT_OPEN_ERROR
Definition file.h:48
@ CF_PRINT_WRITE_ERROR
Definition file.h:49
@ CF_PRINT_OK
Definition file.h:47
void cf_select_packet(capture_file *cf, frame_data *frame)
Definition file.c:4895
wtap_block_t cf_get_packet_block(capture_file *cf, const frame_data *fd)
Definition file.c:5112
cf_write_status_t
Definition file.h:39
@ CF_WRITE_OK
Definition file.h:40
@ CF_WRITE_ERROR
Definition file.h:41
@ CF_WRITE_ABORTED
Definition file.h:42
cf_write_status_t cf_save_records(capture_file *cf, const char *fname, unsigned save_format, ws_compression_type compression_type, bool discard_comments, bool dont_reopen)
Definition file.c:5579
bool cf_find_packet_dfilter_string(capture_file *cf, const char *filter, search_direction dir)
Definition file.c:4512
DIAG_OFF_PEDANTIC struct _frame_data frame_data
Frame data structure.
struct packet_range_tag packet_range_t
Fully describes a packet range selection, including UI settings, derived counts, and dependency sets ...
print_format_e
Output format for printed packet data.
Definition print.h:30
print_dissections_e
Controls the level of protocol dissection detail included in printed output.
Definition print.h:39
struct print_stream print_stream_t
Represents an abstract print stream, pairing a backend operations vtable with instance-specific state...
Definition fifo_string_cache.h:26
State and result data for an in-progress packet or field search operation.
Definition file.h:87
capture_file * cf
Definition file.h:90
const char * string
Definition file.h:88
field_info * finfo
Definition file.h:91
size_t string_len
Definition file.h:89
field_info * prev_finfo
Definition file.h:92
bool frame_matched
Definition file.h:93
bool halt
Definition file.h:94
Aggregates all options controlling a single print or export operation.
Definition file.h:476
print_stream_t * stream
Definition file.h:477
bool print_col_headings
Definition file.h:486
unsigned hexdump_options
Definition file.h:489
bool print_formfeed
Definition file.h:490
char * file
Definition file.h:480
print_dissections_e print_dissections
Definition file.h:487
bool no_duplicate_keys
Definition file.h:493
bool print_hex
Definition file.h:488
print_format_e format
Definition file.h:478
packet_range_t range
Definition file.h:482
bool to_file
Definition file.h:479
char * cmd
Definition file.h:481
bool print_summary
Definition file.h:485
Represents a single capture record read from or written to a capture file, regardless of record type.
Definition wtap.h:1597