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);
511 bool show_progress_bar);
745 int in_file_count,
const char *
const *in_filenames,
746 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:1129
void cf_unmark_frame(capture_file *cf, frame_data *frame)
Definition file.c:4995
cf_print_status_t cf_write_csv_packets(capture_file *cf, print_args_t *print_args)
Definition file.c:3029
bool cf_goto_frame(capture_file *cf, unsigned row, bool exact)
Definition file.c:4778
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:4567
void cf_update_section_comments(capture_file *cf, unsigned shb_idx, char **comments)
Definition file.c:5066
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:1655
uint32_t cf_comment_types(capture_file *cf)
Definition file.c:5186
cf_status_t cf_reload(capture_file *cf)
Definition file.c:6070
bool cf_has_unsaved_data(capture_file *cf)
Definition file.c:5405
cf_print_status_t cf_print_packets(capture_file *cf, print_args_t *print_args, bool show_progress_bar)
Definition file.c:2667
bool cf_find_packet_data(capture_file *cf, const uint8_t *string, size_t string_size, search_direction dir, bool multiple)
Definition file.c:3595
void cf_close(capture_file *cf)
Definition file.c:358
void cf_set_drops_known(capture_file *cf, bool drops_known)
Definition file.c:1222
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:2367
cf_print_status_t cf_write_psml_packets(capture_file *cf, print_args_t *print_args)
Definition file.c:2948
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:1176
void cf_reftime_packets(capture_file *cf)
Definition file.c:2126
bool cf_get_drops_known(capture_file *cf)
Definition file.c:1236
uint32_t cf_get_drops(capture_file *cf)
Definition file.c:1243
bool cf_goto_framenum(capture_file *cf)
Definition file.c:4878
bool cf_set_modified_block(capture_file *cf, frame_data *fd, const wtap_block_t new_block)
Definition file.c:5146
bool cf_can_save(capture_file *cf)
Definition file.c:5343
int cf_get_packet_count(capture_file *cf)
Definition file.c:1201
void cf_callback_add(cf_callback_t func, void *user_data)
Definition file.c:189
void cf_ignore_frame(capture_file *cf, frame_data *frame)
Definition file.c:5008
bool cf_find_packet_time_reference(capture_file *cf, search_direction dir)
Definition file.c:4580
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:1502
cf_print_status_t cf_write_pdml_packets(capture_file *cf, print_args_t *print_args)
Definition file.c:2872
cf_print_status_t cf_write_carrays_packets(capture_file *cf, print_args_t *print_args)
Definition file.c:3101
bool cf_add_ip_name_from_string(capture_file *cf, const char *addr, const char *name)
Definition file.c:5220
void cf_set_max_records(unsigned max_records)
Definition file.c:155
field_info * cf_find_string_protocol_tree(capture_file *cf, proto_tree *tree)
Definition file.c:3258
bool cf_read_record(capture_file *cf, const frame_data *fdata, wtap_rec *rec)
Definition file.c:1642
void cf_mark_frame(capture_file *cf, frame_data *frame)
Definition file.c:4982
void cf_unselect_packet(capture_file *cf)
Definition file.c:4960
unsigned long cf_get_computed_elapsed(capture_file *cf)
Return the time it took to load the file (in msec).
Definition file.c:220
bool cf_can_save_as(capture_file *cf)
Definition file.c:5382
bool cf_read_current_record(capture_file *cf)
Definition file.c:1669
const char * cf_get_tempfile_source(capture_file *cf)
Definition file.c:1190
void cf_set_rfcode(capture_file *cf, dfilter_t *rfcode)
Definition file.c:1249
void cf_set_drops(capture_file *cf, uint32_t drops)
Definition file.c:1229
bool cf_find_packet_summary_line(capture_file *cf, const char *string, search_direction dir)
Definition file.c:3489
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:3175
void cf_set_tempfile(capture_file *cf, bool is_tempfile)
Definition file.c:1214
cf_read_status_t cf_read(capture_file *cf, bool reloading)
Definition file.c:499
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:2490
char * cf_get_display_name(capture_file *cf)
Get a displayable name of the capture file.
Definition file.c:1103
bool cf_is_tempfile(capture_file *cf)
Definition file.c:1208
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:5941
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:252
cf_status_t cf_filter_packets(capture_file *cf, char *dfilter, bool force)
Definition file.c:1538
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:201
void cf_unignore_frame(capture_file *cf, frame_data *frame)
Definition file.c:5021
bool cf_find_packet_protocol_tree(capture_file *cf, const char *string, search_direction dir, bool multiple)
Definition file.c:3232
bool cf_can_write_with_wiretap(capture_file *cf)
Definition file.c:5314
void cf_update_section_comment(capture_file *cf, char *comment)
Definition file.c:5034
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:4512
void cf_redissect_packets(capture_file *cf)
"Something" has changed, rescan all packets.
Definition file.c:1616
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:4902
wtap_block_t cf_get_packet_block(capture_file *cf, const frame_data *fd)
Definition file.c:5119
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:5586
bool cf_find_packet_dfilter_string(capture_file *cf, const char *filter, search_direction dir)
Definition file.c:4519
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:1599