On Fri, Jul 12, 2002 at 06:21:10PM -0700, Guy Harris wrote: > You'd either have to disable those heuristics when reading from a > non-seekable file, or do the "reading the same part of the file multiple > times" with some form of internal buffering so that it only has to read > the data once from the file.
And then you'd have to make the capture-file-reading code use that internal buffering for the file type testing, as well; the way Ethereal and Tethereal determine the type of file is to try opening it with open routines for various capture file types until one succeeds, and that also involves reading the same data in the file multiple times.
