+ * @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);
+
+/**
+ * Export some or all packets from a capture file to a new file. If there's
+ * already a file with that name, do a "safe save", writing to a temporary
+ * file in the same directory and, if the write succeeds, renaming the new
+ * file on top of the old file, so that if the write fails, the old file is
+ * still intact.
+ *
+ * @param cf the capture file to write to
+ * @param fname the filename to write to
+ * @param range the range of packets to write
+ * @param save_format the format of the file to write (libpcap, ...)
+ * @param compressed whether to gzip compress the file
+ * @return one of cf_write_status_t