summaryrefslogtreecommitdiff
path: root/wiretap/mime_file.c
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2014-01-20 13:19:23 +0100
committerAnders Broman <a.broman58@gmail.com>2015-06-25 18:25:15 +0000
commitfcbf1d295b49c9ee49e91b47388526e17ec21968 (patch)
tree7d8db0ac896400cfb850f77c4943fd8e9bed9142 /wiretap/mime_file.c
parentb679e2aab54edd0b79f9feec433c7d8383689196 (diff)
downloadwireshark-fcbf1d295b49c9ee49e91b47388526e17ec21968.tar.gz
File: Add BTSNOOP File Format support
BTSNOOP format is supported by libwiretap and this dissector add ability to open the same file in second mode: 1. Wireshark aka Protocol Viewer (default) 2. Fileshark aka File Viewer Mode 2 also has feature to dissect protocols contained by this file, try "Protocol Preferences -> Dissect next layer". Change-Id: I99f0df5b55d31bf5a7d6e9269bfc054c09022b51 Reviewed-on: https://code.wireshark.org/review/17 Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Evan Huus <eapache@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'wiretap/mime_file.c')
-rw-r--r--wiretap/mime_file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/wiretap/mime_file.c b/wiretap/mime_file.c
index b4a28d6a8c..933846a538 100644
--- a/wiretap/mime_file.c
+++ b/wiretap/mime_file.c
@@ -70,6 +70,7 @@ static const guint8 png_magic[] = { 0x89, 'P', 'N', 'G', '\r', '\n', 0x1A, '\
static const guint8 gif87a_magic[] = { 'G', 'I', 'F', '8', '7', 'a'};
static const guint8 gif89a_magic[] = { 'G', 'I', 'F', '8', '9', 'a'};
static const guint8 elf_magic[] = { 0x7F, 'E', 'L', 'F'};
+static const guint8 btsnoop_magic[] = { 'b', 't', 's', 'n', 'o', 'o', 'p', 0};
static const mime_files_t magic_files[] = {
{ jpeg_jfif_magic, sizeof(jpeg_jfif_magic) },
@@ -77,7 +78,8 @@ static const mime_files_t magic_files[] = {
{ png_magic, sizeof(png_magic) },
{ gif87a_magic, sizeof(gif87a_magic) },
{ gif89a_magic, sizeof(gif89a_magic) },
- { elf_magic, sizeof(elf_magic) }
+ { elf_magic, sizeof(elf_magic) },
+ { btsnoop_magic, sizeof(btsnoop_magic) }
};
#define N_MAGIC_TYPES (sizeof(magic_files) / sizeof(magic_files[0]))