Commit Graph

11 Commits

Author SHA1 Message Date
Guy Harris 853da2eb9b The "file types" we have are actually combinations of types and
subtypes, e.g. Network Monitor version 1 and Network Monitor version 2
are separate "file types", even though they both come from Network
Monitor.

Rename various functions, #defines, and variables appropriately.

svn path=/trunk/; revision=53166
2013-11-08 09:53:01 +00:00
Guy Harris 32b95570df Merge "read record header" and "read packet data" routines into a single
routine, used both by read and seek-read routines.

svn path=/trunk/; revision=49988
2013-06-17 21:18:47 +00:00
Guy Harris 8c9edf1280 Have the seek-read routines take a Buffer rather than a guint8 pointer
as the "where to put the packet data" argument.

This lets more of the libwiretap code be common between the read and
seek-read code paths, and also allows for more flexibility in the "fill
in the data" path - we can expand the buffer as needed in both cases.

svn path=/trunk/; revision=49949
2013-06-16 00:20:00 +00:00
Guy Harris c20b5d96a8 When reading sequentially, skip past any ignored data at the end of the
packet.

svn path=/trunk/; revision=49704
2013-06-03 00:26:16 +00:00
Guy Harris bc97838985 Pull code to read and process packet headers into
peekclassic_process_record_header_() routines, used in both the read and
seek-read routines.

svn path=/trunk/; revision=49700
2013-06-02 23:12:58 +00:00
Guy Harris 88e9d1c1e5 Do not call wtap_file_read_unknown_bytes() or
wtap_file_read_expected_bytes() from an open routine - open routines are
supposed to return -1 on error, 0 if the file doesn't appear to be a
file of the specified type, or 1 if the file does appear to be a file of
the specified type, but those macros will cause the caller to return
FALSE on errors (so that, even if there's an I/O error, it reports "the
file isn't a file of the specified type" rather than "we got an error
trying to read the file").

When doing reads in an open routine before we've concluded that the file
is probably of the right type, return 0, rather than -1, if we get
WTAP_ERR_SHORT_READ - if we don't have enough data to check whether a
file is of a given type, we should keep trying other types, not give up.
For reads done *after* we've concluded the file is probably of the right
type, if a read doesn't return the number of bytes we asked for, but
returns an error of 0, return WTAP_ERR_SHORT_READ - the file is
apparently cut short.

For NetMon and NetXRay/Windows Sniffer files, use a #define for the
magic number size, and use that for both magic numbers.

svn path=/trunk/; revision=46803
2012-12-27 12:19:25 +00:00
Jakub Zawadzki 78631020b8 Add wtap_pseudo_header union to wtap_pkthdr structure.
Use pkthdr instead of pseudo_header as argument for dissecting.

svn path=/trunk/; revision=45601
2012-10-16 21:50:57 +00:00
Jeff Morriss 3551a86c36 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +00:00
Guy Harris b459c468a3 Set the 802.11 "already decrypted" flag to FALSE for file formats other
than Network Instruments Observer files, as we don't know whether they
are already decrypted.

svn path=/trunk/; revision=43796
2012-07-18 22:48:18 +00:00
Guy Harris f71fd4318c Fix up some comments.
svn path=/trunk/; revision=43633
2012-07-09 23:14:50 +00:00
Guy Harris 9fcbc2377f The names "etherpeek" and "airopeek" are a bit misleading, as the
"etherpeek.c" file format is used by AiroPeek and the "airopeek9.c" file
format is used by EtherPeek.

Instead, use the names that WildPackets apparently uses for those
formats - "classic" and "tagged".

svn path=/trunk/; revision=43630
2012-07-09 23:07:28 +00:00