Wireshark-dev: Re: [Wireshark-dev] Wiretap's mpeg decoder has weak magic for MPEG-PES
From: Guy Harris <[email protected]>
Date: Mon, 17 Nov 2008 02:36:27 -0800
On Nov 16, 2008, at 6:55 PM, Stephen Fisher wrote:

Correct, PacketLogger files do not have a magic number.
Do PacketLogger files have a default file extension?

If we were to associate with some file types an extension, then we could have the Wiretap open routine:
	first try the open routines for file formats that have magic numbers  
(regardless of whether that file format has a file extension or, if  
so, whether it matches the file's extension);
	then try the open routine for any heuristic file format that has the  
file's extension associated with it (after stripping off .gz);
	then try the other heuristic open routines;

so that the extension is used as a hint for the file type.

(We could also use that as the default extension when saving the file in a given format.)