aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2020-03-20 22:38:33 -0700
committerGuy Harris <guy@alum.mit.edu>2020-03-21 06:14:53 +0000
commitc4d32e8ddf6608891145b1605a9eaa40f2467a8d (patch)
tree7afb05020784d6617e775d4f149142561c4108c2
parentf4cd24a3fc491edd44f0b763228afdbfb9605050 (diff)
Handle nanosecond-resolution pcap files.
Change-Id: I799c00822e5a815005b50b57325ac729e0d3eec2 Reviewed-on: https://code.wireshark.org/review/36515 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--wiretap/mime_file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wiretap/mime_file.c b/wiretap/mime_file.c
index 113c04fbcb..2096a299ef 100644
--- a/wiretap/mime_file.c
+++ b/wiretap/mime_file.c
@@ -65,6 +65,8 @@ static const guint8 elf_magic[] = { 0x7F, 'E', 'L', 'F'};
static const guint8 btsnoop_magic[] = { 'b', 't', 's', 'n', 'o', 'o', 'p', 0};
static const guint8 pcap_magic[] = { 0xA1, 0xB2, 0xC3, 0xD4 };
static const guint8 pcap_swapped_magic[] = { 0xD4, 0xC3, 0xB2, 0xA1 };
+static const guint8 pcap_nsec_magic[] = { 0xA1, 0xB2, 0x3C, 0x4D };
+static const guint8 pcap_nsec_swapped_magic[] = { 0x4D, 0x3C, 0xB2, 0xA1 };
static const guint8 pcapng_premagic[] = { 0x0A, 0x0D, 0x0D, 0x0A };
/* File does not start with it */
@@ -81,6 +83,8 @@ static const mime_files_t magic_files[] = {
{ btsnoop_magic, sizeof(btsnoop_magic) },
{ pcap_magic, sizeof(pcap_magic) },
{ pcap_swapped_magic, sizeof(pcap_swapped_magic) },
+ { pcap_nsec_magic, sizeof(pcap_nsec_magic) },
+ { pcap_nsec_swapped_magic, sizeof(pcap_nsec_swapped_magic) },
{ pcapng_premagic, sizeof(pcapng_premagic) }
};