Commit Graph

20736 Commits

Author SHA1 Message Date
Evan Huus 0e67f0c7a1 From Steve Magnani via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8338
Centralize logic related to per-interface conversations, and expose it for use
by class-specific dissectors.

Class-specific descriptor dissectors also need to know the interface in whose
context they are called to work.

This is a prerequisite for a USB Video Class dissector, which needs to decode
many class-specific descriptors.

svn path=/trunk/; revision=47990
2013-03-01 22:57:13 +00:00
Anders Broman 8dbab6179d From beroset:
remove C++ incompatibilities from packet-xml.c

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=47988
2013-03-01 20:36:59 +00:00
Evan Huus b780fc1b7a Revert r47839, it is not needed with r47979.
svn path=/trunk/; revision=47980
2013-03-01 19:10:04 +00:00
Evan Huus 2c420806b5 Add a much better workaround for bug #8382 and some expert info.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8382

svn path=/trunk/; revision=47979
2013-03-01 19:08:30 +00:00
Pascal Quantin b9f723bb18 From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :
Remove C++ incompatibilities from packet-smb.C

svn path=/trunk/; revision=47977
2013-03-01 18:35:51 +00:00
Evan Huus ba18b3d7d9 Addendum to r47962, caught by Jakub Zawadzki via
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8379

Respect the offset given us by TCP when fetching PDU len.

svn path=/trunk/; revision=47974
2013-03-01 13:24:24 +00:00
Chris Maynard 3478c66464 Fix Coverity CID 280396: Logically dead code.
svn path=/trunk/; revision=47973
2013-03-01 07:02:08 +00:00
Chris Maynard 181751aa74 Fix Coverity CID 280371: Logically dead code.
svn path=/trunk/; revision=47972
2013-03-01 06:52:25 +00:00
Chris Maynard 8a6d78e053 Fix Coverity CID 280369: Logically dead code.
svn path=/trunk/; revision=47970
2013-03-01 06:29:18 +00:00
Anders Broman ffeae7cfbf From beroset:
remove C++ incompatibilities from packet-pw-atm.c

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=47968
2013-03-01 06:01:51 +00:00
Chris Maynard d4adb608c1 Fix Coverity CID 280367: Logically dead code.
svn path=/trunk/; revision=47967
2013-03-01 05:46:07 +00:00
Chris Maynard 0e1d169409 Fix Coverity CID 280365: Logically dead code.
#BACKPORT (1.8, 1.6)

svn path=/trunk/; revision=47966
2013-03-01 05:40:49 +00:00
Chris Maynard f9bc424a05 Fix Coverity CID 280362: Logically dead code.
#BACKPORT (1.8, 1.6)

svn path=/trunk/; revision=47965
2013-03-01 05:29:12 +00:00
Chris Maynard 595a6d4504 Fix Coverity CID 280391: Logically dead code.
svn path=/trunk/; revision=47964
2013-03-01 05:04:03 +00:00
Chris Maynard 069c1d3fa8 Fix Coverity CID 988967: Logically dead code.
svn path=/trunk/; revision=47963
2013-03-01 04:53:26 +00:00
Evan Huus ade06ecf1c From Sebastiano Di Paola via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8379
New dissector for the honeypot-feeds protocol.

From me: Misc. tweaks to expert info layout and remove a few unneeded initializers.

svn path=/trunk/; revision=47962
2013-03-01 02:07:58 +00:00
Evan Huus b8c73d01b3 Re-add statement accidentally removed in r47950 that was resulting in a
variable being used uninitialized.

svn path=/trunk/; revision=47959
2013-02-28 23:39:47 +00:00
Michael Mann 7eac6729d8 Replace proto_tree_add_text with proto_tree_add_item/expert_info
svn path=/trunk/; revision=47956
2013-02-28 23:01:31 +00:00
Pascal Quantin 8ed55b8eef Fix dissection of feedback with large CID
svn path=/trunk/; revision=47955
2013-02-28 22:22:52 +00:00
Michael Mann 4d1022a5ac Use proto_tree_add_item (or similar) instead of proto_item_add_text.
svn path=/trunk/; revision=47950
2013-02-28 20:17:33 +00:00
Michael Mann 7cf5c59d6e Convert proto_item_add_text to proto_item_add_item.
General whitespace cleanup, add modelines.

svn path=/trunk/; revision=47949
2013-02-28 20:07:15 +00:00
Guy Harris 6c29b9edd6 Update a comment.
svn path=/trunk/; revision=47947
2013-02-28 18:13:41 +00:00
Anders Broman e8af5b4e67 Dissect japan ISUP Charging Info IE.
svn path=/trunk/; revision=47946
2013-02-28 17:56:02 +00:00
Pascal Quantin 7adefca1bb From Hadriel Kaplan via https://www.wireshark.org/lists/wireshark-dev/201302/msg00216.html :
Fix dissection of method name in case of RAck header

svn path=/trunk/; revision=47936
2013-02-28 08:13:40 +00:00
Guy Harris fb8f5b815a Combine all the flags fields into one field, and get rid of the
commented-out/#if-ed-out "Data1" field, as it's the same field.

Give the flags in that field names including "flags".

Shuffle the fields around to put "Flags" (a/k/a Data1) where Data1 was,
and put the bits in that field after it.

Update the URL for the spec at IBM.

Reformat the entries in hf_netb[] to use the same style.

svn path=/trunk/; revision=47933
2013-02-28 04:29:43 +00:00
Chris Maynard 764cb1f99a Fix Coverity CID 719419: Dereference after null check.
svn path=/trunk/; revision=47932
2013-02-28 03:15:57 +00:00
Chris Maynard e91a73e2c0 Fix Coverity CID 280377: Dead default in switch.
svn path=/trunk/; revision=47931
2013-02-28 02:48:16 +00:00
Chris Maynard 97cc60f8fa Fix Coverity CID 280366: Dead default in switch.
svn path=/trunk/; revision=47930
2013-02-28 02:37:14 +00:00
Guy Harris c522bb09c2 The LDAP dissector uses register_frame_end_routine(), so it needs to
include packet-frame.h.

svn path=/trunk/; revision=47928
2013-02-28 00:09:26 +00:00
Pascal Quantin 7fdbff4822 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8378 :
A detailed diagnostic information contains either a SMS-SUBMIT-REPORT or a SMS-DELIVERY-REPORT. Set P2P direction accordingly.

svn path=/trunk/; revision=47927
2013-02-27 23:08:17 +00:00
Guy Harris 8c15ade43b Include <epan/show_exception.h>, as show_exception() is called.
svn path=/trunk/; revision=47926
2013-02-27 23:07:25 +00:00
Guy Harris 53fffe0414 Get rid of unnecessary includes of "packet-frame.h".
svn path=/trunk/; revision=47925
2013-02-27 23:02:18 +00:00
Guy Harris 6b629c4d92 Move show_exception() and show_reported_bounds_error() to
epan/show_exception.c, as it's used outside
epan/dissectors/packet-frame.c.  Update their callers to include
<epan/show_exception.h> to get their declaration.

Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if
there's more stuff in the packet to dissect after the dissector call
that threw the exception, doesn't mean you shouldn't go ahead and
dissect that stuff.  Use it in all those cases, including ones where
BoundsError was inappropriately being caught (you want those passed up
to the top level, so that the packet is reported as having been cut
short in the capture process).

Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that
correspond to running past the end of the data for a tvbuff; use it
rather than explicitly catching those exceptions individually, and
rather than just catching all exceptions (the only place that
DissectorError should be caught, for example, is at the top level, so
dissector bugs show up in the protocol tree).

Don't catch and then immediately rethrow exceptions without doing
anything else; just let the exceptions go up to the final catcher.

Use show_exception() to report non-fatal errors, rather than doing it
yourself.
 
If a dissector is called from Lua, catch all non-fatal errors and use
show_exception() to report them rather than catching only
ReportedBoundsError and adding a proto_malformed item.

Don't catch exceptions when constructing a trailer tvbuff in
packet-ieee8023.c - just construct it after the payload has been
dissected, and let whatever exceptions that throws be handled at the top
level.

Avoid some TRY/CATCH/ENDTRY cases by using checks such as
tvb_bytes_exist() before even looking in the tvbuff.

svn path=/trunk/; revision=47924
2013-02-27 22:43:54 +00:00
Guy Harris 97a0ad8eab For subvectors, make a top-level item to cover the entire subvector, and
put the length, identifier, and value as visible sub-items underneath
it.  If the length is bad, add an expert info indication under the item
for the length, rather than using proto_malformed.  Add checks for the
lengths of each type of subvector.

Add some more subvector types from IEEE 802.5-1998, and use the names
from that spec.

svn path=/trunk/; revision=47923
2013-02-27 22:07:44 +00:00
Guy Harris cb2d1c52a9 When decompressing, put an entry into the protocol tree that covers all
the compressed data, put the entries for particular parts of that data
under that entry, and, when we have a problem decompressing, add an
expert info item to that entry, rather than just adding text or using
proto_malformed.  Do so for *all* decompression problems; in particular,
check for decompressed_entry() returning NULL, which it can do.

tvb_new_child_real_data() won't throw an exception, so don't bother
checking for that.

If, after the first pass, we can't find the uncompressed data for a
frame, report it as a dissector bug.

Check whether we have room for a byte in the uncompressed data buffer
*before* copying it.

Other cleanups.

svn path=/trunk/; revision=47922
2013-02-27 22:04:40 +00:00
Pascal Quantin b5bbd0712e From J. Schoenwaelder via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8410 :
Fix dissection of flowDurationMicroseconds in Netflow dissector

svn path=/trunk/; revision=47921
2013-02-27 21:19:37 +00:00
Anders Broman e1c43d0095 Dissect Japan ISUP Charge rate transfer (flexible charging) .
svn path=/trunk/; revision=47919
2013-02-27 20:02:38 +00:00
Chris Maynard a4e2819e27 Use ENC_NA for single byte fields, as that appears to be the generally agreed upon convention. Add modelines.
#BACKPORT(1.8) + r47915


svn path=/trunk/; revision=47918
2013-02-27 16:18:16 +00:00
Michael Mann d48920d42a Protocol is ENC_BIG_ENDIAN, adjust accordingly.
Bug 8407 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8407)

svn path=/trunk/; revision=47915
2013-02-27 16:08:48 +00:00
Anders Broman 7465ad1572 Fix
- warning: unused parameter 'item'.
- warning: format not a string literal and no format arguments.

svn path=/trunk/; revision=47912
2013-02-27 05:53:46 +00:00
Michael Mann f89cb20e2b Replace proto_tree_add_text with proto_tree_add_item + expert_info. Not enough to pacify checkAPIs.pl standards, but its a vast improvement.
svn path=/trunk/; revision=47910
2013-02-27 03:58:23 +00:00
Michael Mann 07a9b935de Increase use of proto_tree_add_item (mostly replacing proto_tree_add_text)
svn path=/trunk/; revision=47909
2013-02-27 03:37:45 +00:00
Michael Mann a38cf513de Replace proto_tree_add_text with proto_tree_add_item + expert_info
svn path=/trunk/; revision=47908
2013-02-27 03:35:04 +00:00
Jakub Zawadzki b2c4ab3b2a Move pack_flags to better place.
Reduce sizeof(frame_data) from 136 to 128 (AMD64).

svn path=/trunk/; revision=47905
2013-02-26 21:32:11 +00:00
Pascal Quantin 24b42dd6e1 Fix warning: 'rrc_sub_handle' may be used uninitialized in this function
svn path=/trunk/; revision=47904
2013-02-26 19:14:14 +00:00
Bill Meier 9e436c6c4a Fix a misspelled word; Do some minor tweaking of the wording of a few comments.
svn path=/trunk/; revision=47903
2013-02-26 15:10:28 +00:00
Michael Mann 8c0d526f58 SNMP dissector should handle aes256 (better version than r47690)
svn path=/trunk/; revision=47902
2013-02-26 11:38:39 +00:00
Bill Meier 96a24cc79f Fix spelling/typos found using a list of commonly misspelled words.
The misspellings were mostly in comments but some were
in text strings visible to the user.


svn path=/trunk/; revision=47899
2013-02-26 04:42:26 +00:00
Bill Meier a6e56df8b6 it's ==> its & its ==> it's as needed.
svn path=/trunk/; revision=47898
2013-02-26 02:38:52 +00:00
Jeff Morriss b320eb3d97 Revert r44559: go back to using g_malloc()'d memory for SCTP reassembly. That
way we don't keep two copies of the fragments in memory until the file is
closed.

wmem is probably a better alternative to this.

svn path=/trunk/; revision=47897
2013-02-26 02:36:05 +00:00