aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/pcapng_module.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-02-08 16:19:12 -0800
committerGuy Harris <guy@alum.mit.edu>2018-02-09 00:29:51 +0000
commit1f5f63f8ef98bfe9c4d734674cee0df64855555d (patch)
tree133dd3563cc8d2d29dd85d4d43cd9a4636283192 /wiretap/pcapng_module.h
parente4c5efafb7da2d25b7d47fe2dac3b1556c0b67b0 (diff)
Generalize wtap_pkthdr into a structure for packet and non-packet records.
Separate the stuff that any record could have from the stuff that only particular record types have; put the latter into a union, and put all that into a wtap_rec structure. Add some record-type checks as necessary. Change-Id: Id6b3486858f826fce4b096c59231f463e44bfaa2 Reviewed-on: https://code.wireshark.org/review/25696 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/pcapng_module.h')
-rw-r--r--wiretap/pcapng_module.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/wiretap/pcapng_module.h b/wiretap/pcapng_module.h
index 9a869b8b67..cf914ceeab 100644
--- a/wiretap/pcapng_module.h
+++ b/wiretap/pcapng_module.h
@@ -39,11 +39,11 @@
/* Block data to be passed between functions during reading */
typedef struct wtapng_block_s {
- guint32 type; /* block_type as defined by pcapng */
- gboolean internal; /* TRUE if this block type shouldn't be returned from pcapng_read() */
- wtap_block_t block;
- struct wtap_pkthdr *packet_header;
- Buffer *frame_buffer;
+ guint32 type; /* block_type as defined by pcapng */
+ gboolean internal; /* TRUE if this block type shouldn't be returned from pcapng_read() */
+ wtap_block_t block;
+ wtap_rec *rec;
+ Buffer *frame_buffer;
} wtapng_block_t;
/*
@@ -51,7 +51,7 @@ typedef struct wtapng_block_s {
*/
typedef gboolean (*block_reader)(FILE_T, guint32, gboolean, wtapng_block_t *,
int *, gchar **);
-typedef gboolean (*block_writer)(wtap_dumper *, const struct wtap_pkthdr *,
+typedef gboolean (*block_writer)(wtap_dumper *, const wtap_rec *,
const guint8 *, int *);
/*