Commit Graph

62 Commits

Author SHA1 Message Date
Sean O. Stalley 206424321c MAUSB: Fix width of Cancel Transfer Status field
Width of this field was increased in the 1.0a MA USB Update.

Change-Id: Ib1a40dee6fbcfd389c982b53c4b51f538c1973e7
Reviewed-on: https://code.wireshark.org/review/18607
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-11-02 00:46:06 +00:00
Alexis La Goutte 3aba4d5e61 mausb: fix fix spelling typo found by lintian
Change-Id: I23c5b35d4d55c3d1c78b9a631a1eb728ecf365fa
Reviewed-on: https://code.wireshark.org/review/18525
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-28 07:28:23 +00:00
Michael Mann 2eb7b05b8c Convert most UDP dissectors to use "auto" preferences.
Similar to the "tcp.port" changes in I99604f95d426ad345f4b494598d94178b886eb67,
convert dissectors that use "udp.port".

More cleanup done on dissectors that use both TCP and UDP dissector
tables, so that less preference callbacks exist.

Change-Id: If07be9b9e850c244336a7069599cd554ce312dd3
Reviewed-on: https://code.wireshark.org/review/18120
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-13 02:51:18 +00:00
Michael Mann 268841f3e0 Combine Decode As and port preferences for tcp.port dissector table.
This patch introduces new APIs to allow dissectors to have a preference for
a (TCP) port, but the underlying data is actually part of Decode As functionality.
For now the APIs are intentionally separate from the regular APIs that register a
dissector within a dissector table.  It may be possible to eventually combine the
two so that all dissectors that register with a dissector table have an opportunity
to "automatically" have a preference to adjust the "table value" through the
preferences dialog.

The tcp.port dissector table was used as the guinea pig.  This will eventually be
expanded to other dissector tables as well (most notably UDP ports).  Some
dissectors that "shared" a TCP/UDP port preference were also converted. It also
removed the need for some preference callback functions (mostly when the callback
function was the proto_reg_handoff function) so there is cleanup around that.

Dissectors that has a port preference whose default was 0 were switched to using
the dissector_add_for_decode_as_with_preference API rather than dissector_add_uint_with_preference

Also added comments for TCP ports used that aren't IANA registered.

Change-Id: I99604f95d426ad345f4b494598d94178b886eb67
Reviewed-on: https://code.wireshark.org/review/17724
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-08 02:44:53 +00:00
Sean O. Stalley 18a873d576 MAUSB: Add Cancellation Status values defined in v1.0a Spec
Change-Id: I72812fa0650da0cde37ea6cbef81a3c7a9ba333d
Reviewed-on: https://code.wireshark.org/review/17373
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-08-31 02:34:59 +00:00
Sean O. Stalley 22ba931e15 MAUSB: Add Status value defined in v1.0a Spec
Change-Id: Ie8e77fffd54eb9b1918d90999a4419a80de8bc5e
Reviewed-on: https://code.wireshark.org/review/17374
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-08-29 17:46:20 +00:00
Michael Mann e37275bfde Associate dissector tables and heuristic subdissector lists with a protocol.
This will make it easier to determine protocol dependencies.

Some LLC OUI dissector tables didn't have an associated protocol, so they were left without one (-1 used)

Change-Id: I6339f16476510ef3f393d6fb5d8946419bfb4b7d
Reviewed-on: https://code.wireshark.org/review/14446
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-17 00:05:17 +00:00
Michael Mann 5beb48b843 Fix some hf_ field datatype conflicts.
'ieee17221.clock_source_id' exists multiple times with NOT compatible types: FT_UINT16 and FT_UINT64
'ieee17221.stream_format' exists multiple times with NOT compatible types: FT_NONE and FT_UINT64
'afp.unknown' exists multiple times with NOT compatible types: FT_UINT16 and FT_BYTES
'afp.toc_offset' exists multiple times with NOT compatible types: FT_NONE and FT_UINT64
'bootp.client_id.iaid' exists multiple times with NOT compatible types: FT_UINT32 and FT_STRING
'bthfp.chld.mode' exists multiple times with NOT compatible types: FT_STRING and FT_UINT8
'canopen.pdo.data' exists multiple times with NOT compatible types: FT_STRINGZ and FT_BYTES
'canopen.sdo.data' exists multiple times with NOT compatible types: FT_UINT32 and FT_BYTES
'ceph.msg.' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64
'ceph.version' exists multiple times with NOT compatible types: FT_UINT16 and FT_UINT64
'cip.linkaddress' exists multiple times with NOT compatible types: FT_STRING and FT_UINT8
'dnp3.al.ana' exists multiple times with NOT compatible types: FT_FLOAT and FT_INT32
'dnp3.al.anaout' exists multiple times with NOT compatible types: FT_FLOAT and FT_INT32
'dtls.handshake.cert_url.url_hash_len' exists multiple times with NOT compatible types: FT_STRING and FT_UINT16
'ssl.handshake.cert_url.url_hash_len' exists multiple times with NOT compatible types: FT_STRING and FT_UINT16
'dvb-s2_gse.label' exists multiple times with NOT compatible types: FT_UINT24 and FT_ETHER
'fcdns.rply.fc4type' exists multiple times with NOT compatible types: FT_NONE and FT_UINT8
'fcdns.req.fc4type' exists multiple times with NOT compatible types: FT_NONE and FT_UINT8
'icmp.int_info.name' exists multiple times with NOT compatible types: FT_STRING and FT_BOOLEAN
'icmpv6.ilnp.nb_locs' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT8
'icmpv6.ilnp.nb_locs' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64
'mausb.clear_transfers.status' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_NONE
'mikey.v' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_NONE
'mswsp.rangeboundry.ultype' exists multiple times with NOT compatible types: FT_STRING and FT_UINT32
'mswsp.arrayvector.address64' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64
'nlm.lock.l_offset' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64
'nlm.lock.l_len' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64
'pflog.saddr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pflog.daddr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pflog.saddr' exists multiple times with NOT compatible types: FT_BYTES and FT_IPv6
'pflog.daddr' exists multiple times with NOT compatible types: FT_BYTES and FT_IPv6
'pgm.spm.path' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pgm.nak.src' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pgm.nak.grp' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pgm.poll.path' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv4 and FT_IPv6
'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pgm.opts.redirect.dlr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4

Change-Id: Iaf694699d108a12db172da8dd9fbab211adb329d
Reviewed-on: https://code.wireshark.org/review/14070
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-22 16:51:22 +00:00
Alexis La Goutte 174fa7e2f7 MAUSB: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I69b21ee05755cf849d52756ef4cad7bb3571762d
Reviewed-on: https://code.wireshark.org/review/13327
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-19 05:57:18 +00:00
Sean O. Stalley 161047ce06 Enable USB sub-dissectors for MA USB.
MA USB packets with USB payload are now passed into the USB dissector.
This allows the payload to be dissected by the USB sub-dissectors.

1.  Refactor dissect_usb_common() and put the code needed for finding USB subdissectors
into a seperate helper function.
2.  Add dissect_usb_payload() call
3.  Add dissect_mausb_pkt_common() helper function
4.  Put code for dissecting all types of MA USB packets into helper
function dissect_mausb_pkt().
5.  Add dissect_mausb_pkt_data() helper function
6.  Put code for dissecting MA USB datapacket-specific fields into helper
function dissect_mausb_pkt().
7.  Use proto_tree_add_bitmask() call for MA USB bitfields.
8.  Create packet-mausb.h to expose MA definitions to USB dissector
9.  Dissect MA USB payload with USB subdissectors
10. Undeclare USB calls no longer used by MA USB dissector

Change-Id: I456714572cd8dfc9982b087670ca73c17e25a26c
Signed-off-by: Sean O. Stalley <sean.stalley@intel.com>
Reviewed-on: https://code.wireshark.org/review/13187
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-13 20:36:45 +00:00
moshekaplan cd7026951b Fix a lot of typos and misspellings
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3
Reviewed-on: https://code.wireshark.org/review/13069
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-08 20:04:56 +00:00
Sean O. Stalley 7c5b0d427a mausb: Add dissection of ClearTransfers Req & Resp
Add dissection for two new packets types added in the MA USB v1.0a
Specification.

Change-Id: Ie693f5d721a446454cc927451b69859e1992ddb3
Reviewed-on: https://code.wireshark.org/review/13081
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-07 11:46:52 +00:00
Michael Mann 443a7ed259 new_create_dissector_handle -> create_dissector_handle for dissector directory.
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now.

Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f
Reviewed-on: https://code.wireshark.org/review/12484
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09 12:37:36 +00:00
Balint Reczey 9a9b1c9bba Spelling fixes for errors found by lintian
Change-Id: I889283902875193f4d3f3fd59788f59f8d9bcc20
Reviewed-on: https://code.wireshark.org/review/11945
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-07 07:11:54 +00:00
Alexis La Goutte 01603971a5 mausb: The '&' operator is applied to bool type value found by PVS Studio (V564)
You've probably forgotten to include parentheses or intended to use the '&&' operator

Change-Id: Ie9c79729f2ec67aa9579dca40b2e904a9047218f
Reviewed-on: https://code.wireshark.org/review/12313
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-30 21:06:05 +00:00
Alexis La Goutte a1d1bd2272 mausb: Fix A part of conditional expression is always true found by PVS Studio (V560)
!del is always true (else if before)

Change-Id: I21e335eb3035ec17e990076a4895006d3138f16b
Reviewed-on: https://code.wireshark.org/review/12312
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-30 21:04:55 +00:00
Bill Meier dbf314a4ab Trivial: Change editor-modelines tab-width specification from 4 to 8.
[There were no actual indentation changes since since none of the files
 contained tabs].

Change-Id: I92ff551e70274f459c466e1c1d449905e0e7dc92
Reviewed-on: https://code.wireshark.org/review/9945
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-08-09 16:29:09 +00:00
Pascal Quantin 55de704f82 USB: use URB/IRP ID for request/response tracking
Bug: 11072
Change-Id: I5f1824d602e4b88c9c5c8520b0aac9945206f093
Reviewed-on: https://code.wireshark.org/review/7781
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-03-26 19:10:24 +00:00
Sean O. Stalley e4afcc83db Fixed MAUSB Flags subfield dissection
Previously, the version field was being dissected as flags.

Change-Id: Ic7d5fd6262e844c9e578dbc29cd5b6e40078ae9f
Signed-off-by: Sean O. Stalley <sean.stalley@intel.com>
Reviewed-on: https://code.wireshark.org/review/7398
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-27 15:39:14 +00:00
Sean O. Stalley 2366113c60 Added basic MA USB isochronous packet support
Iso fields in a MA USB header are now dissected,
instead of treating them as non-iso fields.

Change-Id: I13c9ba5b0c54ef0b5130c2e87c7de3de9dbe9e22
Signed-off-by: Sean O. Stalley <sean.stalley@intel.com>
Reviewed-on: https://code.wireshark.org/review/7397
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-27 15:38:22 +00:00
Sean O. Stalley bc8228b6bc Added Dissection of CancelTransfer MA packets
Type-specific subfields of CancelTransferReq/Resp are now dissected.

Change-Id: I0f03e14df936409125b263409de605dde96d53c0
Signed-off-by: Sean O. Stalley <sean.stalley@intel.com>
Reviewed-on: https://code.wireshark.org/review/7396
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-27 15:36:49 +00:00
Sean O. Stalley 9cc49a7db3 Updated MAUSB Packet Type values
Packet type values are now consistant with spec.
Also, values in enum mausb_pkt_type are now consistant with
mausb_type_string array.

Change-Id: I515332bdbc1d1f06bd03e3da314c44d7e842f2f9
Signed-off-by: Sean O. Stalley <sean.stalley@intel.com>
Reviewed-on: https://code.wireshark.org/review/7395
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-27 15:28:34 +00:00
Guy Harris 15c895dbc4 Make the USB header information an enumerated type.
It's not really a bitset, it's a choice of one of four types of USB
pseudo-header.  Make it an enum.

Change-Id: I4ea994e1606c23e0a0f08b1b61357eea40a2535e
Reviewed-on: https://code.wireshark.org/review/6830
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-28 09:48:06 +00:00
Hadriel Kaplan ceb8d954d2 Lua: Expose tcp_dissect_pdus() to Lua
Provide a way for Lua-based dissectors to invoke tcp_dissect_pdus()
to make TCP-based dissection easier.

Bug: 9851
Change-Id: I91630ebf1f1fc1964118b6750cc34238e18a8ad3
Reviewed-on: https://code.wireshark.org/review/6778
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-01-27 15:14:12 +00:00
Michal Labedzki 7177cedc26 USB: Fix Conversation/Endpoint filters
There were not fields for that, so simple add them.

Change-Id: I489bae24ac96ea0baf395add731f4d62ccf19352
Reviewed-on: https://code.wireshark.org/review/6401
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-01-10 15:34:24 +00:00
Michael Mann ecaa1f8d21 convert variables that were static just because of SET_ADDRESS macro to use the proper pinfo->pool instead.
Change-Id: I914918d9629f654ead497dddac0f412b690e4409
Reviewed-on: https://code.wireshark.org/review/6430
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-09 01:10:05 +00:00
Bill Meier b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
Specifically:
- Set packet.h to be the first wireshark #include after
   config.h and "system" #includes.
   packet.h added as an #include in some cases when missing.
- Remove some #includes included (directly/indirectly) in
   packet.h. E.g., glib.h.
   (Done only for those files including packet.h).
- As needed, move "system" #includes to be after config.h and
   before wireshark #includes.
- Rework various #include file specifications for consistency.
- Misc.

Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95
Reviewed-on: https://code.wireshark.org/review/5923
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21 05:46:22 +00:00
Bill Meier d519617538 mausb: Rename expert filter names to fix dup filter names.
Change-Id: Id650c3aff6d073b05e844574ffbde8fec4368f49
Reviewed-on: https://code.wireshark.org/review/5608
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-04 03:43:32 +00:00
Martin Kaiser 47909d32fc remove parent parameter from dissect_usb_setup_response()
Change-Id: Ib4a5cc3b783d3a4a1477624678964a9627d582e6
Reviewed-on: https://code.wireshark.org/review/5191
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-11-08 14:19:22 +00:00
Martin Kaiser f82b2f2dd3 remove parent parameter from dissect_usb_setup_request()
Change-Id: I5a24de9a12e301d472e701140299304e2cb4fcfc
Reviewed-on: https://code.wireshark.org/review/5190
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-11-08 14:19:00 +00:00
Alexis La Goutte 0a5d6a1f90 MAUSB: fix warning: no previous prototype for 'proto_register_wfa_oui' [-Wmissing-prototypes]
Change-Id: I86cc9f6f9cd50a6e081aabc10bce077281eb2d76
Reviewed-on: https://code.wireshark.org/review/4959
Reviewed-by: Sean Stalley <seanstalley@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-28 05:12:47 +00:00
Sean O. Stalley 3ffd8c57d9 Use Wifi Alliance OUI for MA USB packets over SNAP
Change-Id: Icf4c995c8fbdb886e8b4e79a1fc7b62ac7137a07
Reviewed-on: https://code.wireshark.org/review/4667
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-26 00:55:50 +00:00
Sean O. Stalley 608207fcf6 Add Dissection of MA packets over UDP
Change-Id: Ic6e1cbb623f3e84b73ce7e4608f291baadc77bf6
Reviewed-on: https://code.wireshark.org/review/4576
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-09 19:41:19 +00:00
Sean O. Stalley d05a44c3ce Show endpoint direction based on EPHandle bit
Interpret the meaning of the endpoint handle direction bit,
instead of just saying if it is set.

Change-Id: I9fc0d6f95f6c3a94d6db90c8394fe3ca8fc83715
Reviewed-on: https://code.wireshark.org/review/4119
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-09-17 02:21:48 +00:00
Bill Meier f4b135c147 packet-mausb.c: proto-reg-handoff() fixes
- proto_reg_handoff...():
    Fix handling of tcp port pref change;
    Rename 'gPORT_PREF' to 'mausb_tcp_port_pref';
    Do 'dissector_add_uint("llc.mausb_pid",..)' only once;

Change-Id: Ic4498560f61d0ce95f8109c3a1bb3c407221269b
Reviewed-on: https://code.wireshark.org/review/3854
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-27 15:49:40 +00:00
Sean O. Stalley c612029774 Exclude MA USB TransferAck's from USB conversation
the usb_trans_info struct only understands Requests & Responses.
TransferAcks are currently treated as responses, which throws off
the Request/Response pairing & dissection.

This patch fixes tracking in the case when a TransferAck & TransferReq
are in the same TCP packet. It does not fix the case where there are
multiple TransferReq's or TransferResp's in 1 TCP packet.

Eventually I want to revamp usb_trans_info structure to support:
 -multiple requests/responses per transaction (IE: retries)
 -TransferAck tracking
 -handling of multiple requests/responses in 1 TCP packet

Change-Id: I09be6fecf55a40b4ea2a4f27bd753f3991ccabbd
Reviewed-on: https://code.wireshark.org/review/3866
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-08-26 19:37:40 +00:00
Sean O. Stalley 64cd8270c6 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 <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-26 06:10:20 +00:00
Martin Kaiser b737e2e8ef remove trans_info parameter from dissect_usb_endpoint_descriptor()
(remove it in the call from mausb as well)

add NULL checks for usb_conv_info, usb_trans_info

Change-Id: I95d52b85e3fa0d42b6a20047053259aaca8754fe
Reviewed-on: https://code.wireshark.org/review/3784
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-25 13:59:28 +00:00
Martin Kaiser c284e12112 remove trans_info parameter from dissect_usb_unknown_descriptor()
remove now unused trans_info variable in mausb

Change-Id: I99df8a1ed039134c9448546d0f1a738f203f9610
Reviewed-on: https://code.wireshark.org/review/3785
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-25 13:48:12 +00:00
Sean O. Stalley d67e40e501 Added dissection of Device Capability Descriptors in CapResp Packets
CapResp Packets may contain Device Capability Descriptors.
This patch allows wireshark to show what descriptors are present,
& checks that their length fields are valid.

See section 6.3.3 of the MA USB spec for more information.

Change-Id: Ia120435bdffcced091b67e66e0ba8f1a750358db
Reviewed-on: https://code.wireshark.org/review/3330
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-08-06 09:14:09 +00:00
Sean O. Stalley 3b91474af5 Dissection of CapResp Packets
Added dissection of MAUSB Capability Response (CapResp) fields.

Change-Id: I41044a25c72b72ef9c8ef5640a609eb6448b054d
Reviewed-on: https://code.wireshark.org/review/3329
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-05 07:47:03 +00:00
Sean O. Stalley 2fbd9e128b Fix variable-length managment packet dissection
Before, several managment packets were dissected incorrectly as
EPHandleDeleteReq's. Now they are dissected with the generic managment
packet dissector.

Change-Id: Id2f0951b91b99ba2340ff77c6285f382436788ef
Reviewed-on: https://code.wireshark.org/review/3328
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-01 19:37:07 +00:00
Sean O. Stalley 91f627b7e7 MAUSB dissection of control transfer responses
The MAUSB dissector can now dissect transfer responses for control
endpoints.

Change-Id: Ic488ccb308365d072bbbf0eaf128b198caf74eca
Reviewed-on: https://code.wireshark.org/review/2960
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-15 22:55:19 +00:00
Sean O. Stalley bbb3e2f7af Add Bus ID to USB Address Column
USB Addresses are now in the format of: bus_id.device_address.endpoint
This makes it much easier to read traces that captured traffic on
more than one bus.

Change-Id: I264db2ceea712d94632d5d08d05d3af22a4a03fe
Reviewed-on: https://code.wireshark.org/review/2833
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-04 02:20:38 +00:00
Sean O. Stalley 3c37630c77 Dissection of USB setup data in MA USB data packets
This patch adds support for dissection of USB setup data contained
inside of MA USB data packets. The MAUSB Dissector calls the same
function used by the USB dissector to dissect the setup data.

This patch also (and a bit unintentionally) adds transfer following.
TransferReq & TransferAck packets now show a link & a time delta
to their TransferReq (ie [Request in: XXX] & [Time from request: XXX].

TransferReq packets have a [Response in: XXX] tag, but it erronously
points to the TransferAck, not the TransferResponse.

Change-Id: I01041de3c38ea6248e9d34506b0b012518a1e6d8
Reviewed-on: https://code.wireshark.org/review/1548
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-09 20:08:49 +00:00
Sean O. Stalley 09f53d802a Per Spec update, SetUSBDevAddrReq now contains data
Per MAUSB Spec (1.0), the SetDevAddrReq packet now contains data
in addition to the packet header.

Change-Id: I4d2c6bb2530edf5de33ef69c0e6af0441e197fa4
Reviewed-on: https://code.wireshark.org/review/2014
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-07 17:43:06 +00:00
Sean O. Stalley 78bc006082 Removed MAUSB DWORD-Aligned Length Check
Removed a check to see if the Packet is in DWORDs.
I misread section 6.2 of the spec, which states that all _headers_
mausb be DWORD-aligned, not all _packets_.

Change-Id: I11e320e6e2592930024ffa8143e4d8f470de13ba
Reviewed-on: https://code.wireshark.org/review/2013
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-07 17:42:03 +00:00
Sean O. Stalley 97f0fb0e53 Fixed Fencing for Multiple MAUSB Packets in 1 TCP Packet.
Packet info for all MAUSB packets in a single TCP packet is now displayed
in the info column. Before, only info on the last packet was displayed.

See conversation for change Ib20e5e30474d93270dd24e203ab96f64f5cc77ad.
Patch 3 had fencing, I messed up and left it out of patches 4-6. This
patch adds it back in.

Change-Id: I37f0e028a8f9b5a8500700f03ac36f8bf1c4f63c
Reviewed-on: https://code.wireshark.org/review/1958
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-06 14:47:35 +00:00
ruengeler 4b9b29b627 Clang complained about non initialized variable.
Change-Id: Idc4c1a8db4d5f1b6f2b01428ea283c4a975723f2
Reviewed-on: https://code.wireshark.org/review/1947
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-04 12:25:04 +00:00
Sean O. Stalley c94d2e6848 MAUSB dissector uses USB addresses
The MAUSB dissector now prints the USB address for MAUSB data packets
in the Source & Destination columns. Before, the IP address was
printed.

All MAUSB data packets are now part of USB Conversations. Like the
USB dissector, all data to & from one endpoint are part of the same
conversation.

Issues that need to be resolved:
- In the case where multiple MAUSB packets exist in one TCP packet,
  only one USB address can be printed.
- The USB conversations do not appear in the conversations window.
  They should appear under the USB conversations tab.

Change-Id: I042daf7889cf70b3bbc450f9ccd974a0f93f4798
Reviewed-on: https://code.wireshark.org/review/1943
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-04 00:56:24 +00:00