aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/eyesdn.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-04-04 18:56:27 -0700
committerGuy Harris <guy@alum.mit.edu>2019-04-05 02:49:43 +0000
commit8a5b26efb14b7f8f5375383436f03108d52d9aed (patch)
treeeb57791fc53deab1c618b259e11092f122a8ee97 /wiretap/eyesdn.c
parentb572b65e518937f43b630991c07369d8e0c79f53 (diff)
Have wtap_read() fill in a wtap_rec and Buffer.
That makes it - and the routines that implement it - work more like the seek-read routine. Change-Id: I0cace2d0e4c9ebfc21ac98fd1af1ec70f60a240d Reviewed-on: https://code.wireshark.org/review/32727 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/eyesdn.c')
-rw-r--r--wiretap/eyesdn.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/wiretap/eyesdn.c b/wiretap/eyesdn.c
index 0c5a8e268c..80758fde64 100644
--- a/wiretap/eyesdn.c
+++ b/wiretap/eyesdn.c
@@ -85,8 +85,8 @@ static const unsigned char eyesdn_hdr_magic[] =
/* Size of a record header */
#define EYESDN_HDR_LENGTH 12
-static gboolean eyesdn_read(wtap *wth, int *err, gchar **err_info,
- gint64 *data_offset);
+static gboolean eyesdn_read(wtap *wth, wtap_rec *rec, Buffer *buf,
+ int *err, gchar **err_info, gint64 *data_offset);
static gboolean eyesdn_seek_read(wtap *wth, gint64 seek_off,
wtap_rec *rec, Buffer *buf, int *err, gchar **err_info);
static int read_eyesdn_rec(FILE_T fh, wtap_rec *rec, Buffer* buf,
@@ -139,9 +139,9 @@ wtap_open_return_val eyesdn_open(wtap *wth, int *err, gchar **err_info)
return WTAP_OPEN_MINE;
}
-/* Find the next packet and parse it; called from wtap_read(). */
-static gboolean eyesdn_read(wtap *wth, int *err, gchar **err_info,
- gint64 *data_offset)
+/* Find the next record and parse it; called from wtap_read(). */
+static gboolean eyesdn_read(wtap *wth, wtap_rec *rec, Buffer *buf,
+ int *err, gchar **err_info, gint64 *data_offset)
{
gint64 offset;
@@ -152,8 +152,7 @@ static gboolean eyesdn_read(wtap *wth, int *err, gchar **err_info,
*data_offset = offset;
/* Parse the record */
- return read_eyesdn_rec(wth->fh, &wth->rec, wth->rec_data,
- err, err_info);
+ return read_eyesdn_rec(wth->fh, rec, buf, err, err_info);
}
/* Used to read packets in random-access fashion */