aboutsummaryrefslogtreecommitdiffstats
path: root/file.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-06-20 01:11:01 +0000
committerGuy Harris <guy@alum.mit.edu>2012-06-20 01:11:01 +0000
commit06474b43305ecee081506b4d3052933a91f81691 (patch)
treecdb042867e70ffd2aafd3d75fc32b1e4a56b088f /file.h
parent75c8dbff83f49260883e7a5b4c74e751da9aa1f7 (diff)
If the file has an SHB comment or any packet comments, and the user
tries to do "Save As" in a format for which we don't support comments (currently, we only support them for pcap-ng), ask whether they want to discard the comments and save anyway or, *if* the file can be saved in a format for which we *do* support comments, they want to save the file in some other format. Keep a count of packet comments so that we don't have to scan all the frame_data structures to determine whether we have any comments. svn path=/trunk/; revision=43392
Diffstat (limited to 'file.h')
-rw-r--r--file.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/file.h b/file.h
index 08c146a845..7cb6d5aadc 100644
--- a/file.h
+++ b/file.h
@@ -221,12 +221,16 @@ gboolean cf_can_save_as(capture_file *cf);
* @param fname the filename to save to
* @param save_format the format of the file to save (libpcap, ...)
* @param compressed whether to gzip compress the file
+ * @discard_comments TRUE if we should discard comments if the save
+ * succeeds (because we saved in a format that doesn't support
+ * comments)
* @param dont_reopen TRUE if it shouldn't reopen and make that file the
* current capture file
* @return one of cf_write_status_t
*/
cf_write_status_t cf_save_packets(capture_file * cf, const char *fname,
guint save_format, gboolean compressed,
+ gboolean discard_comments,
gboolean dont_reopen);
/**
@@ -639,6 +643,14 @@ const gchar* cf_read_shb_comment(capture_file *cf);
*/
void cf_update_capture_comment(capture_file *cf, gchar *comment);
+/**
+ * Update(replace) the comment on a capture from a frame
+ *
+ * @param cf the capture file
+ * @param fdata the frame_data structure for the frame
+ * @param comment the string replacing the old comment
+ */
+void cf_update_packet_comment(capture_file *cf, frame_data *fdata, gchar *comment);
#if defined(HAVE_HEIMDAL_KERBEROS) || defined(HAVE_MIT_KERBEROS)
void read_keytab_file(const char *);