summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2024-05-27 07:33:23 -0400
committerJohn Thacker <johnthacker@gmail.com>2024-06-02 09:20:18 -0400
commit2f1470620592c718e105356fa0f5cc3ee19d6a8d (patch)
treee1f1296310e1e1e12cfb4a043a218e44e93aa34b
parent57646fbd189fd01f3970104e93cbfebc52de4ca8 (diff)
Add application/x-pcapng
https://gitlab.com/wireshark/wireshark/-/blob/master/resources/freedesktop/org.wireshark.Wireshark-mime.xml https://www.ietf.org/archive/id/draft-ietf-opsawg-pcapng-01.html
-rw-r--r--data/freedesktop.org.xml.in13
-rw-r--r--tests/mime-detection/list3
-rw-r--r--tests/mime-detection/test001.pcapngbin0 -> 1596 bytes
-rw-r--r--tests/mime-detection/test001_be.pcapngbin0 -> 1596 bytes
4 files changed, 16 insertions, 0 deletions
diff --git a/data/freedesktop.org.xml.in b/data/freedesktop.org.xml.in
index 0d1b881..107c95d 100644
--- a/data/freedesktop.org.xml.in
+++ b/data/freedesktop.org.xml.in
@@ -1612,6 +1612,19 @@ command to generate the output files.
<alias type="application/x-pcap"/>
<alias type="application/pcap"/>
</mime-type>
+ <mime-type type="application/x-pcapng">
+ <comment>PCAPNG packet capture</comment>
+ <acronym>PCAPNG</acronym>
+ <expanded-acronym>PCAP Next Generation</expanded-acronym>
+ <magic>
+ <match type="host32" value="0x0a0d0d0a" offset="0">
+ <match type="host32" value="0x1a2b3c4d" offset="8"/>
+ <match type="host32" value="0x4d3c2b1a" offset="8"/>
+ </match>
+ </magic>
+ <glob pattern="*.pcapng"/>
+ <glob pattern="*.ntar"/>
+ </mime-type>
<mime-type type="application/vnd.wordperfect">
<comment>WordPerfect document</comment>
<alias type="application/x-wordperfect"/>
diff --git a/tests/mime-detection/list b/tests/mime-detection/list
index 8e3c4c5..c31dff5 100644
--- a/tests/mime-detection/list
+++ b/tests/mime-detection/list
@@ -876,6 +876,9 @@ test.h5 application/x-hdf
# From http://wiki.wireshark.org/SampleCaptures (ancp.pcap.gz, dns.cap)
ancp.pcap application/vnd.tcpdump.pcap
dns.cap application/vnd.tcpdump.pcap
+# From https://github.com/hadrielk/pcapng-test-generator
+test001.pcapng application/x-pcapng
+test001_be.pcapng application/x-pcapng
# Created using Shalom Help Maker
test.hlp application/winhlp
# Case-insensitive glob
diff --git a/tests/mime-detection/test001.pcapng b/tests/mime-detection/test001.pcapng
new file mode 100644
index 0000000..662fe29
--- /dev/null
+++ b/tests/mime-detection/test001.pcapng
Binary files differ
diff --git a/tests/mime-detection/test001_be.pcapng b/tests/mime-detection/test001_be.pcapng
new file mode 100644
index 0000000..464a206
--- /dev/null
+++ b/tests/mime-detection/test001_be.pcapng
Binary files differ