summaryrefslogtreecommitdiff
path: root/wiretap/mime_file.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-10-23 01:36:49 +0000
committerEvan Huus <eapache@gmail.com>2013-10-23 01:36:49 +0000
commit328a05630c1c29782e15e1d02277b2dc64931c3c (patch)
tree33e8b17d2d488a0f6feb821404c9d0bfa0226c73 /wiretap/mime_file.c
parentcbd3194bcf87f2e5146343170b4a595ace599ff1 (diff)
downloadwireshark-328a05630c1c29782e15e1d02277b2dc64931c3c.tar.gz
From Michal Labedzki via
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8818 Add support for dissection ELF files. It opens as a "capture" file via wiretap at the moment for simplicity's sake, but the intention is eventually to have this (and other file types we dissect) open through some other program sharing much of the libwireshark infrastructure. svn path=/trunk/; revision=52775
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 015a6aa7d6..7265bc0220 100644
--- a/wiretap/mime_file.c
+++ b/wiretap/mime_file.c
@@ -76,13 +76,15 @@ static const guint8 xml_magic[] = { '<', '?', 'x', 'm', 'l' };
static const guint8 png_magic[] = { 0x89, 'P', 'N', 'G', '\r', '\n', 0x1A, '\n' };
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 mime_files_t magic_files[] = {
{ jpeg_jfif_magic, sizeof(jpeg_jfif_magic) },
{ xml_magic, sizeof(xml_magic) },
{ png_magic, sizeof(png_magic) },
{ gif87a_magic, sizeof(gif87a_magic) },
- { gif89a_magic, sizeof(gif89a_magic) }
+ { gif89a_magic, sizeof(gif89a_magic) },
+ { elf_magic, sizeof(elf_magic) }
};
#define N_MAGIC_TYPES (sizeof(magic_files) / sizeof(magic_files[0]))