wiretap: Add .mpeg extension to filter list, heuristics

MPEG files register ".mpeg" as its preferred extension, but
don't actually add that to the list used in the file open dialog
for filtering, nor to the list of extensions used for heuristics.

MPEG2 TS adds ".mp2t" to the list of extensions used for filtering,
but not to the list used for heuristics.

Fix those
This commit is contained in:
John Thacker 2023-04-16 00:22:34 -04:00
parent 99ef99d725
commit e5d4a1f1a4

View file

@ -168,7 +168,7 @@ static const struct file_extension_info file_type_extensions_base[] = {
{ "CAM Inspector file", TRUE, "camins" },
{ "BLF file", TRUE, "blf" },
{ "AUTOSAR DLT file", TRUE, "dlt" },
{ "MPEG files", FALSE, "mpg;mp3" },
{ "MPEG files", FALSE, "mpeg;mpg;mp3" },
{ "Transport-Neutral Encapsulation Format", FALSE, "tnef" },
{ "JPEG/JFIF files", FALSE, "jpg;jpeg;jfif" },
{ "JavaScript Object Notation file", FALSE, "json" },
@ -413,7 +413,7 @@ static const struct open_info open_info_base[] = {
*/
{ "macOS PacketLogger", OPEN_INFO_HEURISTIC, packetlogger_open, "pklg", NULL, NULL },
/* Some MPEG files have magic numbers, others just have heuristics. */
{ "MPEG", OPEN_INFO_HEURISTIC, mpeg_open, "mpg;mp3", NULL, NULL },
{ "MPEG", OPEN_INFO_HEURISTIC, mpeg_open, "mpeg;mpg;mp3", NULL, NULL },
{ "Daintree SNA", OPEN_INFO_HEURISTIC, daintree_sna_open, "dcf", NULL, NULL },
{ "STANAG 4607 Format", OPEN_INFO_HEURISTIC, stanag4607_open, NULL, NULL, NULL },
{ "ASN.1 Basic Encoding Rules", OPEN_INFO_HEURISTIC, ber_open, NULL, NULL, NULL },
@ -438,7 +438,7 @@ static const struct open_info open_info_base[] = {
{ "pppd log (pppdump format)", OPEN_INFO_HEURISTIC, pppdump_open, NULL, NULL, NULL },
{ "IBM iSeries comm. trace", OPEN_INFO_HEURISTIC, iseries_open, "txt", NULL, NULL },
{ "I4B ISDN trace", OPEN_INFO_HEURISTIC, i4btrace_open, NULL, NULL, NULL },
{ "MPEG2 transport stream", OPEN_INFO_HEURISTIC, mp2t_open, "ts;mpg", NULL, NULL },
{ "MPEG2 transport stream", OPEN_INFO_HEURISTIC, mp2t_open, "mp2t;ts;mpg", NULL, NULL },
{ "CSIDS IPLog", OPEN_INFO_HEURISTIC, csids_open, NULL, NULL, NULL },
{ "TCPIPtrace (VMS)", OPEN_INFO_HEURISTIC, vms_open, "txt", NULL, NULL },
{ "CoSine IPSX L2 capture", OPEN_INFO_HEURISTIC, cosine_open, "txt", NULL, NULL },