diff options
author | David Perry <boolean263@protonmail.com> | 2021-07-12 12:41:57 -0400 |
---|---|---|
committer | David Perry <boolean263@protonmail.com> | 2021-07-12 12:41:57 -0400 |
commit | 06ed6930dc602b5b3b1a79a176272c1846840f8f (patch) | |
tree | f56b5523b9409634357f1a3aa440dea69d3f1f5a /wiretap/peektagged.c | |
parent | 86e2fda11e199b8d0e874147e60a1ba1f0ddb803 (diff) |
Carry EPB flags as an option on the packet block
As requested by [this comment][1] on !2859, move `pack_flags` from a
dedicated field in `wtap_rec` to a block option on the packet block in
`wtap_rec.block`.
[1]: https://gitlab.com/wireshark/wireshark/-/merge_requests/2859#note_615984624
Diffstat (limited to 'wiretap/peektagged.c')
-rw-r--r-- | wiretap/peektagged.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/wiretap/peektagged.c b/wiretap/peektagged.c index c717d8ff8c..a4f3e054f8 100644 --- a/wiretap/peektagged.c +++ b/wiretap/peektagged.c @@ -734,11 +734,12 @@ peektagged_read_packet(wtap *wth, FILE_T fh, wtap_rec *rec, rec->presence_flags = WTAP_HAS_TS|WTAP_HAS_CAP_LEN; rec->rec_header.packet_header.len = length; rec->rec_header.packet_header.caplen = sliceLength; + rec->block = wtap_block_create(WTAP_BLOCK_PACKET); if (saw_flags_and_status) { - rec->presence_flags |= WTAP_HAS_PACK_FLAGS; - rec->rec_header.packet_header.pack_flags = 0; + guint32 flags = 0; if (flags_and_status & FLAGS_HAS_CRC_ERROR) - rec->rec_header.packet_header.pack_flags |= PACK_FLAGS_CRC_ERROR; + flags |= PACK_FLAGS_CRC_ERROR; + wtap_block_add_uint32_option(rec->block, OPT_PKT_FLAGS, flags); } /* calculate and fill in packet time stamp */ |