Commit Graph

2237 Commits

Author SHA1 Message Date
Guy Harris 9d41c658fe No seek-read routines use the length argument, so eliminate it from
wtap_seek_read().

svn path=/trunk/; revision=54570
2014-01-02 20:47:21 +00:00
Guy Harris 11e4e670a4 Don't use the length argument to the seek-read routine; no other
seek-read routine does that.

Pass the length we just filled in to buffer_assure_space() in the
seek-read routine, and use that in the memcpy() as well.

svn path=/trunk/; revision=54568
2014-01-02 20:17:24 +00:00
Guy Harris ac0f903dfa Don't pass the wtap * to a routine if it's not needed.
svn path=/trunk/; revision=54565
2014-01-02 19:39:20 +00:00
Guy Harris e9730c89af Fill in the struct wtap_pkthdr in the seek-read routine.
svn path=/trunk/; revision=54564
2014-01-02 19:33:47 +00:00
Guy Harris 558c885d6d Have a routine that reads and processes the record header, and use it in
both the read and seek-read routines.

Use the packet length read from the packet header when reading packets
randomly.

svn path=/trunk/; revision=54549
2014-01-02 09:23:45 +00:00
Guy Harris ce4d667efe Process the packet header and data in common code, shared by the read
and seek-read routines.

svn path=/trunk/; revision=54548
2014-01-02 02:18:04 +00:00
Guy Harris abda7cd1af Read the packet header in the seek-read routines as well as the read
routines.

svn path=/trunk/; revision=54547
2014-01-02 02:16:22 +00:00
Guy Harris 492883cbf1 If the uncompression buffers are empty, they have no data; set the count
of bytes in them to 0, as there's no data in them, and set the offset in
that buffer of the stream's current position, to 0, as we're currently
at the beginning of the file in both streams.

This fixes some tricky-to-reproduce errors (which show up only if the
ngsniffer_t structure is allocated from data that's been allocated,
written to in those variables, and freed).

#BACKPORT 1.8, 1.10

svn path=/trunk/; revision=54544
2014-01-01 23:22:53 +00:00
Guy Harris f878016d6b Back out r54523 - more work is needed on it, and some testing found an
unrelated uninitialized-data bug that I want to fix in the next commit,
and then backport.

svn path=/trunk/; revision=54543
2014-01-01 23:19:17 +00:00
Guy Harris 322e7272a6 Use a common code path for most of both sequential and random file
access.  We currently can't provide a time stamp when randomly reading,
so don't set WTAP_HAS_TS in that case.

svn path=/trunk/; revision=54527
2013-12-31 23:51:10 +00:00
Guy Harris 1e3f101b2e Back out a change so that we can check it in again with the correct
commit message.

svn path=/trunk/; revision=54526
2013-12-31 23:49:09 +00:00
Guy Harris d734fe4562 When reading MIME-encapsulated files, read the entire file at once,
don't break it into chunks.

This means we don't need to do reassembly in the MIME-encapsulated-data
dissector.

svn path=/trunk/; revision=54525
2013-12-31 23:48:02 +00:00
Guy Harris 8387a45fcc When reading MIME-encapsulated files, read the entire file at once,
don't break it into chunks.

This means we don't need to do reassembly in the MIME-encapsulated-data
dissector.

svn path=/trunk/; revision=54524
2013-12-31 23:47:24 +00:00
Guy Harris cdce403745 When reading sequentially, pass the packet data length to
ngsniffer_read_rec_data(), and separatelyskip extra data after that.

When reading randomly, use the packet length read from the packet
header.

svn path=/trunk/; revision=54523
2013-12-31 23:43:54 +00:00
Guy Harris 0dd01761f3 Use the packet length read from the packet header when reading packets
randomly.

svn path=/trunk/; revision=54522
2013-12-31 23:41:35 +00:00
Guy Harris 9df5acefab Trust the packet length we calculate when reading packets randomly.
svn path=/trunk/; revision=54521
2013-12-31 23:34:43 +00:00
Guy Harris a628e77311 Make it clearer that we're using the packet length read from the packet
header when reading packets randomly.

svn path=/trunk/; revision=54520
2013-12-31 23:33:49 +00:00
Guy Harris eeda7ec1ae Use the packet length read from the packet header when reading packets
randomly.

svn path=/trunk/; revision=54519
2013-12-31 23:32:30 +00:00
Guy Harris cd13dd3782 Use the packet length read from the packet header when reading packets
randomly.

svn path=/trunk/; revision=54518
2013-12-31 23:31:44 +00:00
Guy Harris 31d74c1922 Use the packet length read from the packet header, and check for an EOF
and treat it as an error, when reading packets randomly.

svn path=/trunk/; revision=54517
2013-12-31 23:30:39 +00:00
Guy Harris 4648f411a7 Use the packet length read from the packet header, and check for an EOF
and treat it as an error, when reading packets randomly.

svn path=/trunk/; revision=54516
2013-12-31 23:30:18 +00:00
Guy Harris e1ea055c79 Clean up white space.
svn path=/trunk/; revision=54504
2013-12-30 23:44:42 +00:00
Guy Harris 53cba3e3b9 Add an "ATM reassembly failed" flag for capture file readers to provide,
and set it in NetXRay/Windows Sniffer files if the putative "ATM
reassembly failed" flag is set and, if reassembly failed, don't attempt
to dissect the packet.

svn path=/trunk/; revision=54503
2013-12-30 23:37:12 +00:00
Bill Meier bb4b783a3a Fix a couple of old typos;
Use a consistent formatting style for function defs;
Add editor modelines.

svn path=/trunk/; revision=54501
2013-12-30 22:22:22 +00:00
Guy Harris 2c73dbcd75 Squelch compiler warnings.
svn path=/trunk/; revision=54500
2013-12-30 22:14:45 +00:00
Guy Harris e133ec250b More reverse engineering.
svn path=/trunk/; revision=54497
2013-12-30 20:56:53 +00:00
Guy Harris 5946c5236b For file formats that don't have magic numbers, so they're recognized by
heuristics, but do have a file extension that files of that format are
likely to have, use the extension of the file we're opening, if it has
one, as a hint for which heuristics to try first.

svn path=/trunk/; revision=54495
2013-12-30 06:43:19 +00:00
Martin Kaiser 82f9e9ec68 use the correct record length for an IPv6 record in the NRB
this is already correct in 1.8 and 1.10 and was
accidentially(?) changed in r52176

svn path=/trunk/; revision=54479
2013-12-28 20:37:21 +00:00
Guy Harris e3d4fe8aae Add some new tags seen.
svn path=/trunk/; revision=54460
2013-12-26 12:58:26 +00:00
Jakub Zawadzki 33ef0c2600 isascii(x) && isprint(x) -> g_ascii_isprint(x)
svn path=/trunk/; revision=54328
2013-12-21 15:12:11 +00:00
Jakub Zawadzki 064082e68a Change G_GINT64_CONSTANT(xxxxU) to G_GUINT64_CONSTANT(xxxx)
svn path=/trunk/; revision=54314
2013-12-20 22:39:32 +00:00
Guy Harris 9628624867 Get rid of trailing periods in some error messages for consistency; the
others don't have trailing periods, and the caller adds a period as
desired.

svn path=/trunk/; revision=54199
2013-12-17 21:51:45 +00:00
Gerald Combs 75f1073fe6 Cast away shorten-64-to-32 warnings.
svn path=/trunk/; revision=54101
2013-12-14 18:12:32 +00:00
Gerald Combs 8fde85216a Squelch a bunch of shorten-64-to-32 warnings by parsing all of our
numeric values using strtoul and casting it the result to a guint32.
Hopefully no user or session IDs are negative or greater than 32 bits.

svn path=/trunk/; revision=54100
2013-12-14 18:07:01 +00:00
Guy Harris afa9f611d7 And another one.
svn path=/trunk/; revision=54018
2013-12-13 03:13:40 +00:00
Guy Harris 70e8da2d8c Add some more file types misidentified as VWR files.
svn path=/trunk/; revision=54017
2013-12-13 03:12:42 +00:00
Guy Harris c34050d629 The IxVeriWave heuristic now gets more false positives (after, I
suspect, the change to handle VWR files with no packets); shuffle it
after all the types we've seen misidentified as VWR files.

svn path=/trunk/; revision=54012
2013-12-13 02:38:11 +00:00
Chris Maynard 76eebd5561 Appease Visual Studio Code Analysis by ensuring that the string in csec[] is NULL-terminated.
svn path=/trunk/; revision=53995
2013-12-12 22:02:46 +00:00
Jakub Zawadzki 4904620661 Add WTAP_ENCAP_NETLINK which maps to DLT_NETLINK /253/
svn path=/trunk/; revision=53834
2013-12-07 23:25:36 +00:00
Jakub Zawadzki 01e08ae582 wiretap: start using <wsutil/pint.h>
svn path=/trunk/; revision=53764
2013-12-03 20:35:50 +00:00
Guy Harris 203ecca6da Space between STANAG and the standard number.
svn path=/trunk/; revision=53739
2013-12-02 23:09:08 +00:00
Jakub Zawadzki a4c78939b2 Fix encap_table_base[] array.
svn path=/trunk/; revision=53738
2013-12-02 22:38:00 +00:00
Guy Harris 0cc1545d05 Move most of the plugin code from epan to wsutil and remove all
knowledge of particular types of plugins.  Instead, let particular types
of plugins register with the common plugin code, giving a name and a
routine to recognize that type of plugin.

In particular applications, only process the relevant plugin types.

Add a Makefile.common to the codecs directory.

svn path=/trunk/; revision=53710
2013-12-02 08:30:29 +00:00
Michael Mann 6d3d1556dc STANAG 5066 DTS Layer dissector. Bug 9217 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9217)
From İbrahim Can Yüce

From me: Update to new tcp_dissect_pdus format, minor whitespace issues noticed in wiretap files.

svn path=/trunk/; revision=53669
2013-11-30 01:18:22 +00:00
Jakub Zawadzki d99fdfda63 Replace macros: BSWAP16, BSWAP32, BSWAP64 with glib-version.
XXX, people are not aware that expression of this macros might be evaluated multiple times, like:
 -  BSWAP16(tvb_get_letohs(tvb, off)) : \
 +  GUINT16_SWAP_LE_BE(tvb_get_letohs(tvb, off)) : \

Should be tvb_get_ntohs() called?


svn path=/trunk/; revision=53653
2013-11-29 19:21:20 +00:00
Jakub Zawadzki 288efa5128 Expand macros: htoles(), htolel(), htolell()
svn path=/trunk/; revision=53651
2013-11-29 18:44:00 +00:00
Michael Mann ea63042f9b Bluetooth improvements. Bug 9446 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9446)
From Michal Labedzki 

svn path=/trunk/; revision=53525
2013-11-23 21:41:08 +00:00
Guy Harris a36046c784 Get rid of C++ comments.
svn path=/trunk/; revision=53486
2013-11-21 18:50:44 +00:00
Martin Mathieson d5433fd9b6 Cope with empty VWR files (bug 9428)
svn path=/trunk/; revision=53475
2013-11-21 15:42:22 +00:00
Guy Harris f7f4efabb8 Add support for a new type of frame data record seen in a k18 file, and
handle that file not ending with a 2-byte 0xffff end-of-file record.

This fixes bug 9455, although it doesn't add support for reading an
"index" file for a capture that's in multiple .rf5 files, which is a
separate issue noted in that bug.

It also doesn't attempt to figure out what the data in the new record
type following the data that appears to be the same as that in the other
data record format but preceding the actual packet data is.

svn path=/trunk/; revision=53452
2013-11-20 21:00:55 +00:00