aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/wtap-int.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-01-18 23:06:24 -0800
committerGuy Harris <guy@alum.mit.edu>2018-01-19 07:08:30 +0000
commit5b9e9b3fe3fdf2094405d88617a1debfbb2d5d73 (patch)
treed87aa127add30d6c054eb336c60161f7e797464c /wiretap/wtap-int.h
parentecced16299baab9d3066308c577577b8422a0eb0 (diff)
Don't do pcap heuristics on a pipe.
Instead, just: assume a file with the regular pcap magic number is a regular pcap file, not an unhelpfully-modified-without-changing-the-magic-number format such as one of the (fortunately, short-lived) memory-mapped capture formats or the Nokia format; reject a file with the memory-mapped-capture-finally-changed-the- magic-number magic number, as they then changed the *new* format without changing its magic number; and don't even leave a provision for multiple formats using the "nanosecond pcap" magic number - not even when reading from a file - so we can punish bad behavior (which is what changing the format without changing the magic number is). This should get rid of the last place where, when reading a pcap file from a pipe, the first packet isn't displayed as soon as it arrives. Bug: 14345 Change-Id: I2fcb3354dc84cdd2d8ec749a0db883e56971c4b4 Reviewed-on: https://code.wireshark.org/review/25383 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/wtap-int.h')
-rw-r--r--wiretap/wtap-int.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/wiretap/wtap-int.h b/wiretap/wtap-int.h
index 01d697b7ac..4dc22ebeb9 100644
--- a/wiretap/wtap-int.h
+++ b/wiretap/wtap-int.h
@@ -47,6 +47,7 @@ typedef gboolean (*subtype_seek_read_func)(struct wtap*, gint64,
struct wtap {
FILE_T fh;
FILE_T random_fh; /**< Secondary FILE_T for random access */
+ gboolean ispipe; /**< TRUE if the file is a pipe */
int file_type_subtype;
guint snapshot_length;
struct Buffer *frame_buffer;