From a344c9736efe5519543da1290e1ad9065d0b0cff Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 23 May 2014 10:50:02 +0000 Subject: 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 --- file.h | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'file.h') 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. -- cgit v1.2.3