aboutsummaryrefslogtreecommitdiffstats
path: root/file.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-05-23 10:50:02 +0000
committerGuy Harris <guy@alum.mit.edu>2014-05-23 10:50:10 +0000
commita344c9736efe5519543da1290e1ad9065d0b0cff (patch)
tree7757d80d74ae710e5d4e4a1b0cb638d0ec644fc4 /file.h
parent716fdc8e398ea7435b23192ab1f7d59e7b21e32b (diff)
Revert "Allow wtap_read() and wtap_seek_read() to return non-packet records."
This reverts commit c0c480d08c175eed4524ea9e73ec86298f468cf4. A better way to do this is to have the record type be part of struct wtap_pkthdr; that keeps the metadata for the record together and requires fewer API changes. That is in-progress. Change-Id: Ic558f163a48e2c6d0df7f55e81a35a5e24b53bc6 Reviewed-on: https://code.wireshark.org/review/1741 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'file.h')
-rw-r--r--file.h31
1 files changed, 15 insertions, 16 deletions
diff --git a/file.h b/file.h
index ed12f57044..79df1cfd68 100644
--- a/file.h
+++ b/file.h
@@ -137,30 +137,29 @@ void cf_reload(capture_file *cf);
cf_read_status_t cf_read(capture_file *cf, gboolean from_save);
/**
- * Read a record from a capture file. It will pop up an alert box
- * if there's an error.
+ * Read the pseudo-header and raw data for a packet. It will pop
+ * up an alert box if there's an error.
*
- * @param cf the capture file from which to read the record
- * @param fdata the frame_data structure for the record in question
+ * @param cf the capture file from which to read the packet
+ * @param fdata the frame_data structure for the packet in question
* @param phdr pointer to a wtap_pkthdr structure to contain the
- * packet's pseudo-header and other metadata, if the record is a
- * packet
- * @param buf a Buffer into which to read the record's data
- * @return record type if the read succeeded, -1 if there was an error
+ * packet's pseudo-header and other metadata
+ * @param buf a Buffer into which to read the packet's raw data
+ * @return TRUE if the read succeeded, FALSE if there was an error
*/
-int cf_read_frame_r(capture_file *cf, const frame_data *fdata,
- struct wtap_pkthdr *phdr, Buffer *buf);
+gboolean cf_read_frame_r(capture_file *cf, const frame_data *fdata,
+ struct wtap_pkthdr *phdr, Buffer *buf);
/**
- * Read a record from a capture file into a capture_file structure's
- * pseudo_header and buf members.
+ * Read the pseudo-header and raw data for a packet into a
+ * capture_file structure's pseudo_header 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 record
- * @param fdata the frame_data structure for the record in question
- * @return record type if the read succeeded, -1 if there was an error
+ * @param cf the capture file from which to read the packet
+ * @param fdata the frame_data structure for the packet in question
+ * @return TRUE if the read succeeded, FALSE if there was an error
*/
-int cf_read_frame(capture_file *cf, frame_data *fdata);
+gboolean cf_read_frame(capture_file *cf, frame_data *fdata);
/**
* Read packets from the "end" of a capture file.