Commit Graph

142 Commits

Author SHA1 Message Date
Evan Huus 02dff20783 From Michal Labedzki via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8509
Round 2 of Bluetooth SDP updates:
- replace a lot of proto_tree_add_text with named fields
- dissect more of the protocol
- misc fixes

svn path=/trunk/; revision=48655
2013-03-30 15:53:04 +00:00
Anders Broman ae747e4c4b From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48430
2013-03-19 22:03:00 +00:00
Anders Broman fa1f2a2935 From Michal Labedzki:
USB: Use hfi name instead of hardcoded value.

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

svn path=/trunk/; revision=48385
2013-03-18 05:34:39 +00:00
Anders Broman 3e38475176 From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48356
2013-03-17 17:52:26 +00:00
Evan Huus c6c7efd1a7 From Max Baker via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8431
Add a few member variables to the USB conversation structure, necessary
for a USB PTP dissector.

svn path=/trunk/; revision=48184
2013-03-07 23:57:43 +00:00
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
Guy Harris 29715ccc8f How can I get a new tvbuff that starts at an offset within a given
tvbuff and runs to the end of the tvbuff?  Let me count the ways....

Replace a bunch of different ways of doing that (some incorrect, in that
they're not properly handling tvbuffs where the captured and reported
lengths are different) with tvb_new_subset_remaining().

svn path=/trunk/; revision=47751
2013-02-19 23:17:07 +00:00
Evan Huus ebe0005840 From Steve Magnani via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8264
Improve handling of truncated USB Configuration descriptors.

In contrast to other descriptor types, configuration descriptors have varying
lengths and may be quite long. This makes them much more prone to truncation
by a host that is cautious about reading large descriptors.

A real-world case has arisen where a host requests a partial configuration
descriptor of a USB webcam, and wireshark improperly reports that the response
is malformed.

Change configuration descriptor dissection to distinguish between truncation
induced by the host, which is not an error, and descriptor truncation or
reporting of invalid descriptor lengths by the device, which are.

This patch also relieves class-specific dissectors of the burden of checking
that the descriptor length and type fields are available, and that all the
bytes claimed by the descriptor length are also available.

svn path=/trunk/; revision=47676
2013-02-15 17:32:34 +00:00
Bill Meier d3a7f4b817 Use '#if 0 ... #endif' rather than /** ... **/ to comment out
unused hf[] entries (which I should have done in the first place).

svn path=/trunk/; revision=47390
2013-01-31 18:31:28 +00:00
Bill Meier 0960e508e4 Comment out cases of unused hf array entries found by checkhf.
svn path=/trunk/; revision=47302
2013-01-26 18:54:53 +00:00
Bill Meier df41b2aefa #include <epan/reassemble.h> not needed.
svn path=/trunk/; revision=47212
2013-01-22 15:55:59 +00:00
Anders Broman ccb3fb14e2 From Michal Labedzki:
Bluetooth: Fix uninitialized fields on the USB side

Also make indentation/spaces cleanup in hci_usb dissector.

Part of:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5032

svn path=/trunk/; revision=46341
2012-12-03 11:26:36 +00:00
Anders Broman 962aaf121f From Michal Labedzki:
PATCH] USB: Add support for vendor_id/product_id,
 bus_id/device_address and class/subclass/protocol tables

USB subdissectors can be decoded by class/subclass/protocol. If fail try vendor_id/product_id.
bus_id/device_address is intented to use by DecodeBy, so user can decode specified device as need.

Part of:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5032

svn path=/trunk/; revision=46306
2012-11-30 12:33:37 +00:00
Anders Broman 21abe5567c From Michal Labedzki:
USB: Add support for vendor_id/product_id,
 bus_id/device_address and class/subclass/protocol
 tables

USB subdissectors can be decoded by class/subclass/protocol. If fail try vendor_id/product_id.
bus_id/device_address is intented to use by DecodeBy, so user can decode specified device as need.

Part of:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5032

svn path=/trunk/; revision=46283
2012-11-29 13:59:36 +00:00
Jeff Morriss 910097ffb6 Remove the second definition of a variable. Define an undefined variable.
svn path=/trunk/; revision=46282
2012-11-29 13:54:07 +00:00
Anders Broman 5a61f202d4 From Michal Labedzki:
USB: Add support for vendor and product names from
 usb.ids database

Part of:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5032

svn path=/trunk/; revision=46280
2012-11-29 13:39:08 +00:00
Anders Broman a8b7b8b86c From Michal Labedzki:
USB: Update some descriptions found in USB 3.0
 specification

Part of:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5032

svn path=/trunk/; revision=46279
2012-11-29 13:29:50 +00:00
Guy Harris 1ce0f9234d "??" introduces a trigraph in C; escape "???" to avoid that.
svn path=/trunk/; revision=46256
2012-11-28 21:05:17 +00:00
Bill Meier c1b6433dcf Fix a [-Wshadow] warning;
Also:
 - create/use several extended variable strings;
 - remove some uneeded variable initializers;
 - reformat some long lines;
 - reformat hf[] entries;
 - do some whitespace and formatting changes to use a consistent style.


svn path=/trunk/; revision=46253
2012-11-28 20:03:10 +00:00
Martin Kaiser 77db504364 From Tomasz Mon
handle USB string type descriptors with odd bLength
dissect them by omitting the last byte and report the illegal length

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

svn path=/trunk/; revision=45964
2012-11-07 22:17:10 +00:00
Anders Broman 416fe3bb5b From Steve Magnani:
Add display of (bInterfaceNumber.bAlternateSetting) and bInterfaceClass to the
root item of INTERFACE descriptor subtrees.

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

svn path=/trunk/; revision=45930
2012-11-05 15:03:15 +00:00
Martin Kaiser 31f7fee054 From Steve Magnani
fix USB descriptor parsing

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

svn path=/trunk/; revision=45742
2012-10-23 21:02:28 +00:00
Evan Huus d0183357dc From Steve Magnani via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7796
Add summary information to USB isodesc trees to make interesting descriptors
obvious to the user.

svn path=/trunk/; revision=45403
2012-10-08 19:31:17 +00:00
Evan Huus dfd86092f2 Fix error caught by valgrind where we were running off the end of a
variable because we were passing the address of a single guint8 as a
char*. Work around it by making the guint8 an array and filling the last
element with 0 as if it were a null-terminated string.

svn path=/trunk/; revision=45339
2012-10-06 14:23:44 +00:00
Martin Kaiser a0ce1f8fc2 try to fix usb-related fuzz test crashes
in dissect_usb_interface_descriptor() and
dissect_usb_endpoint_descriptor, the offset should be incremented
depending on the number of bytes we dissected, not based on the len
field (len field==0 would then cause an endless loop)

also fixed one occurrence of old_offset-offset, that's probably a typo,
the values will always be negative...

svn path=/trunk/; revision=45310
2012-10-04 15:37:38 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Jakub Zawadzki dee4443809 Add data parameter to dissector_try_heuristic
svn path=/trunk/; revision=44871
2012-09-11 08:26:48 +00:00
Michael Mann 1741731384 remove unnecessary underscores from display filters
svn path=/trunk/; revision=44181
2012-08-01 02:59:17 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Bill Meier 6fbb09d50b General Cleanup including:
- Remove unneeded #include <stdlib.h>;
- Remove "README.developer" comments;
- Reformat hf[] entries;
- Remove unneeded variable initialization;
- "localize" some variables;
- Whitespace/indentation/long lines/formatting
- (In one case) proto_tree_add_uint returns a proto_item* (not a proto_tree *);

svn path=/trunk/; revision=42678
2012-05-17 14:35:11 +00:00
Anders Broman 3b0c9892a0 From Steve Magnani:
Add decoding of fields within endpoint descriptor wMaxPacketSize

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

svn path=/trunk/; revision=42286
2012-04-27 08:44:36 +00:00
Alexis La Goutte cba02e0a50 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=42165
2012-04-20 15:33:23 +00:00
pascal e0e5b02bca From Johannes Stezenbach:
Use right value for SET_FEATURE request code
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7058

svn path=/trunk/; revision=42009
2012-04-10 16:05:52 +00:00
Jakub Zawadzki 80445e5a99 Fix off by one shift errors introduced in r39530 where it seemed proper[1]
[1] I'm unsure of packet-dtpt, so I haven't patch it.

svn path=/trunk/; revision=41873
2012-03-31 20:57:15 +00:00
Jeff Morriss 5629a3fa00 Fix fuzz failure reported in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6976 :

Don't assume that all responses have conversations to find.

svn path=/trunk/; revision=41726
2012-03-21 21:21:58 +00:00
Anders Broman b971f1b1a0 From Steve Magnani:
USB: incorrect generated bInterfaceClass for composite device CONTROL transactions.

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

svn path=/trunk/; revision=41715
2012-03-21 08:40:19 +00:00
Jeff Morriss 7bc574b776 From Steve Magnani via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6963 :
Conversation address generation during processing of endpoint descriptors
is not being done in a manner consistent with that of general USB
packet dissection. I am not aware of any observable manifestation of this
bug.

svn path=/trunk/; revision=41634
2012-03-17 23:46:39 +00:00
Anders Broman c00ca87104 From Steve Magnani: knock URB Setup out from under USB URB https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6934
svn path=/trunk/; revision=41492
2012-03-11 22:31:18 +00:00
Anders Broman 970272235d From martijn: subdissectors for URB_INTERRUPT. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6929
svn path=/trunk/; revision=41459
2012-03-10 16:16:07 +00:00
Anders Broman f030f799bd From Steve Magnani: USB: centralize some common dissection code for class reuse. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6930
svn path=/trunk/; revision=41458
2012-03-10 16:09:28 +00:00
Anders Broman 9581065b3f USB: unknown GET DESCRIPTOR response triggers assert failure https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6826
svn path=/trunk/; revision=41388
2012-03-07 09:35:44 +00:00
Anders Broman 064276f53b From Steve Magnani: USB: incorrect decoding of Endpoint-targeted class-specific SETUP https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6910
svn path=/trunk/; revision=41371
2012-03-06 09:25:53 +00:00
Jeff Morriss 4289f6d7be Don't add an FT_BYTES with proto_tree_add_uint().
svn path=/trunk/; revision=41325
2012-03-02 22:24:12 +00:00
Alexis La Goutte 28f4c55b5b From Steve Magnani via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6873
USB: SETUP information can be added to incorrect tree

svn path=/trunk/; revision=41210
2012-02-27 16:48:29 +00:00
Anders Broman 416117f63a From Steve Magnani:
USB: Add dissection for Interface Association descriptor.

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

svn path=/trunk/; revision=41157
2012-02-23 11:20:52 +00:00
Anders Broman c36b0f1b03 From Steve Magnani:
USB: add infrastructure for dissecting class-specific descriptors.

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

svn path=/trunk/; revision=40979
2012-02-12 07:18:05 +00:00
Anders Broman 75de89cd1b From Steve Magnani:
USB: support filtering of isochronous packets via usb.bInterfaceClass.

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

svn path=/trunk/; revision=40973
2012-02-11 16:59:38 +00:00
Anders Broman 5da72b4d78 From Steve Magnani:
USB: Endpoint bmAttributes not decoded correctly.

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

svn path=/trunk/; revision=40939
2012-02-08 20:21:44 +00:00
Chris Maynard faf9175665 Add support for dissecting AT commands in USB URB_CONTROL packets. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6037
svn path=/trunk/; revision=40247
2011-12-19 23:44:01 +00:00
Bill Meier 54b72021bb Fix encoding arg for various fcn calls:
- proto_tree_add_bits_item
 - proto_tree_add_bits_ret_val
 - proto_tree_add_bitmask
 - tvb_get_bits
 - tvb_get_bits16
 - tvb_get_bits24
 - tvb_get_bits32
 - tvb_get_bits64


svn path=/trunk/; revision=39539
2011-10-24 19:57:53 +00:00