diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-05-24 11:28:30 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-05-24 18:31:25 +0000 |
commit | 6db77b000fe58173eeed23b91b32c92c681feda2 (patch) | |
tree | 5113821a7f5e1b43734eccf94783d37962b37712 /ui/gtk/capture_file_dlg.c | |
parent | 33ae4cb024e36192ff7c6fa1d3d6bdcce9b25b7a (diff) | |
download | wireshark-6db77b000fe58173eeed23b91b32c92c681feda2.tar.gz |
Allow wtap_read() and wtap_seek_read() to return records other than packets.
Add a "record type" field to "struct wtap_pkthdr"; currently, it can be
REC_TYPE_PACKET, for a record containing a packet, or
REC_TYPE_FILE_TYPE_SPECIFIC, for records containing file-type-specific
data.
Modify code that reads packets to be able to handle non-packet records,
even if that just means ignoring them.
Rename some routines to indicate that they handle more than just
packets.
We don't yet have any libwiretap code that supplies records other than
REC_TYPE_PACKET or that supporting writing records other than
REC_TYPE_PACKET, or any code to support plugins for handling
REC_TYPE_FILE_TYPE_SPECIFIC records; this is just the first step for bug
8590.
Change-Id: Idb40b78f17c2c3aea72031bcd252abf9bc11c813
Reviewed-on: https://code.wireshark.org/review/1773
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/gtk/capture_file_dlg.c')
-rw-r--r-- | ui/gtk/capture_file_dlg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/gtk/capture_file_dlg.c b/ui/gtk/capture_file_dlg.c index baef2baed9..672ab91975 100644 --- a/ui/gtk/capture_file_dlg.c +++ b/ui/gtk/capture_file_dlg.c @@ -1454,11 +1454,11 @@ do_file_save(capture_file *cf, gboolean dont_reopen) } /* XXX - cf->filename might get freed out from under us, because - the code path through which cf_save_packets() goes currently + the code path through which cf_save_records() goes currently closes the current file and then opens and reloads the saved file, so make a copy and free it later. */ fname = g_strdup(cf->filename); - status = cf_save_packets(cf, fname, cf->cd_t, cf->iscompressed, + status = cf_save_records(cf, fname, cf->cd_t, cf->iscompressed, discard_comments, dont_reopen); switch (status) { @@ -1896,7 +1896,7 @@ file_save_as_cmd(capture_file *cf, gboolean must_support_all_comments, #endif /* Attempt to save the file */ - status = cf_save_packets(&cfile, file_name->str, file_type, compressed, + status = cf_save_records(&cfile, file_name->str, file_type, compressed, discard_comments, dont_reopen); switch (status) { |