Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] master 64cd827: Have dissect_usb_setup_r
From: Martin Kaiser <[email protected]>
Date: Tue, 26 Aug 2014 12:05:02 +0200
The new req_type is the same as the existing type. There's a
switch(type) {...} followed by in if (req_type==...).

My goal is to have only one call to try_dissect_next_protocol(). In
dissect_usb_common(), we dissect the standard fields in the main
switch-statement and call try_dissect_next_protocol() _once_ for the
remaining data.

At the moment, try_dissect_next_protocol() is called
twice for control requests that it can't handle. This adds two generated
items saying "unknown class".

Unfortunately, the recent patches make it harder to fix this...

Why is the setup_tvb for the standard setup request generated in

if (header_info & (USB_HEADER_IS_LINUX | USB_HEADER_IS_64_BYTES)) {
else {
        offset = try_dissect_linux_usb_pseudo_header_ext(tvb, offset, pinfo, tree, header_info);

Will try_dissect_linux_usb_pseudo_header_ext() ever do anything if it's
only called when there's no extended pseudo header?

Is there a way to "subscribe" to gerrit change requests so that I'm
notified when a new USB-related change is uploaded?

Thus wrote Wireshark code review ([email protected]):

> URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=64cd8270c669e35bc2911133a9a7da31c4bb1965
> Submitter: Anders Broman ([email protected])
> Changed: branch: master
> Repository: wireshark

> Commits:

> 64cd827 by Sean O. Stalley ([email protected]):

>     Have dissect_usb_setup_request handle non-standard requests

>     Moved code for parsing non-standard setup requests from
>     dissect_usb_common() to dissect_usb_setup_request().

>     Also added header_info flag USB_HEADER_IS_MAUSB & updated mausb
>     dissector.

>     Change-Id: Ifa8abccbd57bf4dd3965f582872952383e6f737d
>     Reviewed-on: https://code.wireshark.org/review/3851
>     Petri-Dish: Anders Broman <[email protected]>
>     Reviewed-by: Anders Broman <[email protected]>

> Actions performed:

>     from  3d4d021   Non-standard USB control requests now handled in own function
>     adds  64cd827   Have dissect_usb_setup_request handle non-standard requests

> Summary of changes:
>  epan/dissectors/packet-mausb.c |    9 +++----
>  epan/dissectors/packet-usb.c   |   51 ++++++++++++++++++++++------------------
>  epan/dissectors/packet-usb.h   |    7 ++++--
>  3 files changed, 38 insertions(+), 29 deletions(-)
> ___________________________________________________________________________
> Sent via:    Wireshark-commits mailing list <[email protected]>
> Archives:    http://www.wireshark.org/lists/wireshark-commits
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-commits
>              mailto:[email protected]?subject=unsubscribe