Commit Graph

163 Commits

Author SHA1 Message Date
Guy Harris 781891bd7b Remove duplicate comment.
svn path=/trunk/; revision=42270
2012-04-26 16:30:33 +00:00
Guy Harris c0cdd900fc Add a pcoreytohll() macro to extract "Corey-endian" 64-bit quantities,
and use it.

Fix some comments.

svn path=/trunk/; revision=42269
2012-04-26 16:27:03 +00:00
Guy Harris a3ce72529c Use the pletohXX macros when fetching little-endian values.
svn path=/trunk/; revision=42256
2012-04-26 08:57:33 +00:00
Guy Harris c7575ff095 Put the pseudo-header information for Veriwave packets into the buffer
in little-endian byte order, as that's what the dissector expects.  Add
a pletohl() macro for that purpose.

Fix comments (the Veriwave code is *not* writing data to a file!) and
clean up indentation.

svn path=/trunk/; revision=42255
2012-04-26 08:45:48 +00:00
Guy Harris d4d080e1a1 Use pntohs(), pntoh24(), and pntohl() to fetch big-endian data from the
headers.

Fix some indentation.

svn path=/trunk/; revision=42252
2012-04-26 05:07:53 +00:00
Guy Harris 1e6eaee16c Global variables considered harmful. Move all the per-capture-file
global variables into a structure that's attached to the wtap_t as
private data, and make all the per-*packet* global variables local
variables.

svn path=/trunk/; revision=42251
2012-04-26 04:26:03 +00:00
Guy Harris 51633791a9 If you get an I/O error when looking for the FPGA version, return -1, so
we know we had a real problem with the file.  If we just get a short
read, return 0, as it means the file is probably not a VWR file.

If we get an invalid message length when reading packets (rather than
when looking for the FPGA version), return WTAP_ERR_BAD_FILE and an
"Invalid message record length" indication, not a generic fallback
"can't read the file" error.

For file_tell() errors, fetch the error code with file_error().

For file_seek() errors, use the error file_seek returned.

svn path=/trunk/; revision=42249
2012-04-26 03:06:35 +00:00
Martin Mathieson e74d2fd9db Return 0 if doesn't match signature of vwr files.
Pointed out by Martin Kaiser in bug 7196.

svn path=/trunk/; revision=42248
2012-04-25 22:54:45 +00:00
Martin Mathieson 56add1934d Remove some unnecessary includes and fix some indentation.
svn path=/trunk/; revision=42227
2012-04-25 00:28:19 +00:00
Martin Mathieson dae0b453f0 Lose some more unused variables reported by clang.
svn path=/trunk/; revision=42173
2012-04-21 02:43:11 +00:00
Martin Mathieson 048833b933 Try to fix up some clang warnings. Will look at other modules I added
recently later.

svn path=/trunk/; revision=42167
2012-04-20 18:09:50 +00:00
Martin Mathieson d74383ed1c Add a couple of casts to try to make the Windows-7-x64 buildbot happy.
svn path=/trunk/; revision=42159
2012-04-20 12:44:19 +00:00
Martin Mathieson 45252c84e3 Patch for https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5048
From Tom Cook and Tom Alexander.

1. A VWR encapsulation that reads VeriWave capture files (*.vwr)
generated from
WaveTest test hardware
2. Dissectors that display the VeriWave tap headers (both 802.11 and
Ethernet)
3. A dissector for the WaveAgent protocol.  The WaveAgent dissector is
heuristic and parses the WaveAgent packet (a UDP payload).

The WaveAgent dissector has been Fuzz tested.

The VWR ENCAP and dissectors have been used extensively by VeriWave
customers in a special version of WireSark compiled by VeriWave.

svn path=/trunk/; revision=42155
2012-04-20 12:08:31 +00:00