diff options
author | Guy Harris <guy@alum.mit.edu> | 2019-04-14 22:14:15 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-04-15 05:54:41 +0000 |
commit | 89f339afa21606427b87d98d20f5e49cb4189352 (patch) | |
tree | 84b5f5489c27643646e41065082d6faff4b4dc70 /file.h | |
parent | 75a6897b0f574df6c8d983e45f2eecb014a4bdc1 (diff) |
Hava a routine to read the currently-selected frome.
Have cf_read_current_record() take a capture_file as an argument and
read, into its wtap_rec and Buffer for the currently-selected frame,
information for the currently-selected frame.
Rename cf_read_record_r() to cf_read_record().
That gives us 1) a routine that reads the currently-selected frame into
the wtap_rec and Buffer for the currently-selected frame and 2) a
routine that reads an arbitrary frame into the wtap_rec and Buffer
supplied to it. If you *want* the currently-selected record, use the
former, otherwise use the latter.
Change-Id: If6bd5915dd5bc18334d7b89859822a19234153a4
Reviewed-on: https://code.wireshark.org/review/32858
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'file.h')
-rw-r--r-- | file.h | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -150,19 +150,18 @@ cf_read_status_t cf_read(capture_file *cf, gboolean from_save); * @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_record_r(capture_file *cf, const frame_data *fdata, +gboolean cf_read_record(capture_file *cf, const frame_data *fdata, wtap_rec *rec, Buffer *buf); /** - * Read the metadata and raw data for a record into a - * capture_file structure's phdr and buf members. + * Read the metadata and raw data for the current record into a + * capture_file structure's rec and buf for the current record. * 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 TRUE if the read succeeded, FALSE if there was an error */ -gboolean cf_read_record(capture_file *cf, frame_data *fdata); +gboolean cf_read_current_record(capture_file *cf); /** * Read packets from the "end" of a capture file. |