aboutsummaryrefslogtreecommitdiffstats
path: root/file.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-05-24 11:28:30 -0700
committerGuy Harris <guy@alum.mit.edu>2014-05-24 18:31:25 +0000
commit6db77b000fe58173eeed23b91b32c92c681feda2 (patch)
tree5113821a7f5e1b43734eccf94783d37962b37712 /file.h
parent33ae4cb024e36192ff7c6fa1d3d6bdcce9b25b7a (diff)
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 'file.h')
-rw-r--r--file.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/file.h b/file.h
index 79df1cfd68..37449551eb 100644
--- a/file.h
+++ b/file.h
@@ -131,35 +131,35 @@ void cf_reload(capture_file *cf);
* Read all packets of a capture file into the internal structures.
*
* @param cf the capture file to be read
- * @param from_save reread asked from cf_save_packets
+ * @param from_save reread asked from cf_save_records
* @return one of cf_read_status_t
*/
cf_read_status_t cf_read(capture_file *cf, gboolean from_save);
/**
- * Read the pseudo-header and raw data for a packet. It will pop
+ * Read the metadata and raw data for a record. It will pop
* up an alert box if there's an error.
*
- * @param cf the capture file from which to read the packet
- * @param fdata the frame_data structure for the packet in question
+ * @param cf the capture file from which to read the record
+ * @param fdata the frame_data structure for the record in question
* @param phdr pointer to a wtap_pkthdr structure to contain the
- * packet's pseudo-header and other metadata
- * @param buf a Buffer into which to read the packet's raw data
+ * record's metadata
+ * @param buf a Buffer into which to read the record's raw data
* @return TRUE if the read succeeded, FALSE if there was an error
*/
-gboolean cf_read_frame_r(capture_file *cf, const frame_data *fdata,
- struct wtap_pkthdr *phdr, Buffer *buf);
+gboolean cf_read_record_r(capture_file *cf, const frame_data *fdata,
+ struct wtap_pkthdr *phdr, Buffer *buf);
/**
- * Read the pseudo-header and raw data for a packet into a
- * capture_file structure's pseudo_header and buf members.
+ * Read the metadata and raw data for a record into a
+ * capture_file structure's phdr and buf members.
* It will pop up an alert box if there's an error.
*
- * @param cf the capture file from which to read the packet
- * @param fdata the frame_data structure for the packet in question
+ * @param cf the capture file from which to read the record
+ * @param fdata the frame_data structure for the record in question
* @return TRUE if the read succeeded, FALSE if there was an error
*/
-gboolean cf_read_frame(capture_file *cf, frame_data *fdata);
+gboolean cf_read_record(capture_file *cf, frame_data *fdata);
/**
* Read packets from the "end" of a capture file.
@@ -239,7 +239,7 @@ gboolean cf_has_unsaved_data(capture_file *cf);
* current capture file
* @return one of cf_write_status_t
*/
-cf_write_status_t cf_save_packets(capture_file * cf, const char *fname,
+cf_write_status_t cf_save_records(capture_file * cf, const char *fname,
guint save_format, gboolean compressed,
gboolean discard_comments,
gboolean dont_reopen);