diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-05-22 20:01:31 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-05-23 03:02:32 +0000 |
commit | c0c480d08c175eed4524ea9e73ec86298f468cf4 (patch) | |
tree | 1234cd09094dcc8447e3fb2b13671f12aba5ae69 /file.h | |
parent | 6287efb9c05482531ea675bb5a3d23b03b5715ab (diff) | |
download | wireshark-c0c480d08c175eed4524ea9e73ec86298f468cf4.tar.gz |
Allow wtap_read() and wtap_seek_read() to return non-packet records.
This is the first step towards implementing the mechanisms requestd in
bug 8590; currently, we don't return any records other than packet
records from libwiretap, and just ignore non-packet records in the rest
of Wireshark, but this at least gets the ball rolling.
Change-Id: I34a45b54dd361f69fdad1a758d8ca4f42d67d574
Reviewed-on: https://code.wireshark.org/review/1736
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'file.h')
-rw-r--r-- | file.h | 31 |
1 files changed, 16 insertions, 15 deletions
@@ -137,29 +137,30 @@ void cf_reload(capture_file *cf); 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 - * up an alert box if there's an error. + * Read a record from a capture file. 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 - * @return TRUE if the read succeeded, FALSE if there was an error + * 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 */ -gboolean cf_read_frame_r(capture_file *cf, const frame_data *fdata, - struct wtap_pkthdr *phdr, Buffer *buf); +int cf_read_frame_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 a record from a capture file 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 packet - * @param fdata the frame_data structure for the packet in question - * @return TRUE if the read succeeded, FALSE if there was 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 */ -gboolean cf_read_frame(capture_file *cf, frame_data *fdata); +int cf_read_frame(capture_file *cf, frame_data *fdata); /** * Read packets from the "end" of a capture file. |