aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/file_access.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2023-09-01 00:53:25 -0700
committerGuy Harris <gharris@sonic.net>2023-09-01 00:53:25 -0700
commitd145a4db9249e03777f6edccc3df97be9da40262 (patch)
tree2715159528f5dccfeb1320e7360a5c5a0a20df69 /wiretap/file_access.c
parentd5766b857bac354ba016d32589a198bba2260cb1 (diff)
Remove extension lists for magic-number open routines.
They are not used, and, if filled in, become one more place to worry about "is this out of sync"? This whole mechanism of maintaining three lists of information about capture file types needs to be claed up; the biggest prblem is that the open_info array currently needs a lot of hand curation to make sure that the weak AF heuristics (I'm nooking at *you*, .vwr raw capture reader!) are run as late as possible.
Diffstat (limited to 'wiretap/file_access.c')
-rw-r--r--wiretap/file_access.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/wiretap/file_access.c b/wiretap/file_access.c
index 3c494eab15..f475f0a25d 100644
--- a/wiretap/file_access.c
+++ b/wiretap/file_access.c
@@ -322,8 +322,9 @@ wtap_get_file_extension_type_extensions(guint extension_type)
* should probably also add it to file_type_extensions_base[] (in this file).
*/
static const struct open_info open_info_base[] = {
- { "Wireshark/tcpdump/... - pcap", OPEN_INFO_MAGIC, libpcap_open, "pcap", NULL, NULL },
- { "Wireshark/... - pcapng", OPEN_INFO_MAGIC, pcapng_open, "pcapng;scap", NULL, NULL },
+ /* Open routines that look for magic numbers */
+ { "Wireshark/tcpdump/... - pcap", OPEN_INFO_MAGIC, libpcap_open, NULL, NULL, NULL },
+ { "Wireshark/... - pcapng", OPEN_INFO_MAGIC, pcapng_open, NULL, NULL, NULL },
{ "Sniffer (DOS)", OPEN_INFO_MAGIC, ngsniffer_open, NULL, NULL, NULL },
{ "Snoop, Shomiti/Finisar Surveyor", OPEN_INFO_MAGIC, snoop_open, NULL, NULL, NULL },
{ "AIX iptrace", OPEN_INFO_MAGIC, iptrace_open, NULL, NULL, NULL },
@@ -347,13 +348,15 @@ static const struct open_info open_info_base[] = {
{ "3GPP TS 32.423 Trace format", OPEN_INFO_MAGIC, nettrace_3gpp_32_423_file_open, NULL, NULL, NULL },
/* Gammu DCT3 trace must come before MIME files as it's XML based*/
{ "Gammu DCT3 trace", OPEN_INFO_MAGIC, dct3trace_open, NULL, NULL, NULL },
- { "BLF Logfile", OPEN_INFO_MAGIC, blf_open, "blf", NULL, NULL },
- { "AUTOSAR DLT Logfile", OPEN_INFO_MAGIC, autosar_dlt_open, "dlt", NULL, NULL },
- { "RTPDump files", OPEN_INFO_MAGIC, rtpdump_open, "rtp;rtpdump", NULL, NULL },
+ { "BLF Logfile", OPEN_INFO_MAGIC, blf_open, NULL, NULL, NULL },
+ { "AUTOSAR DLT Logfile", OPEN_INFO_MAGIC, autosar_dlt_open, NULL, NULL, NULL },
+ { "RTPDump files", OPEN_INFO_MAGIC, rtpdump_open, NULL, NULL, NULL },
{ "MIME Files Format", OPEN_INFO_MAGIC, mime_file_open, NULL, NULL, NULL },
- { "Micropross mplog", OPEN_INFO_MAGIC, mplog_open, "mplog", NULL, NULL },
- { "Unigraf DPA-400 capture", OPEN_INFO_MAGIC, dpa400_open, "bin", NULL, NULL },
- { "RFC 7468 files", OPEN_INFO_MAGIC, rfc7468_open, "pem;crt", NULL, NULL },
+ { "Micropross mplog", OPEN_INFO_MAGIC, mplog_open, NULL, NULL, NULL },
+ { "Unigraf DPA-400 capture", OPEN_INFO_MAGIC, dpa400_open, NULL, NULL, NULL },
+ { "RFC 7468 files", OPEN_INFO_MAGIC, rfc7468_open, NULL, NULL, NULL },
+
+ /* Open routines that have no magic numbers and require heuristics. */
{ "Novell LANalyzer", OPEN_INFO_HEURISTIC, lanalyzer_open, "tr1", NULL, NULL },
/*
* PacketLogger must come before MPEG, because its files