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>
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>
Change-Id: I914918d9629f654ead497dddac0f412b690e4409
Reviewed-on: https://code.wireshark.org/review/6430
Reviewed-by: Michael Mann <mmann78@netscape.net>
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>
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>
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>
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>
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>
- 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>
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>
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>
(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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Puts a tag in the info column when multiple MAUSB packets are in a
single TCP packet.
Change-Id: Ib20e5e30474d93270dd24e203ab96f64f5cc77ad
Reviewed-on: https://code.wireshark.org/review/1658
Reviewed-by: Sean Onufer Stalley <sean.stalley@intel.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Fixed valid bit check for MAUSB EPHandleResp packet. the valid bit
is active low (ie: valid = 0, invalid = 1).
I noticed Some other dissectors also defined an tfs_invalid_valid,
so got rid of their local definitions & added it to epan/tfs.c.
Change-Id: Ifd78325f9c7c046224073fc9b29e0cc60dc5c286
Reviewed-on: https://code.wireshark.org/review/1766
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Removes _U_ flag for data field in dissect_mausb(),
since tcp_dissect_pdus(), uses the data field.
Change-Id: Iccb5aae1aa203f98484666763410c4a555413ac0
Reviewed-on: https://code.wireshark.org/review/1696
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Added support for dissecting Media Agnostic USB EPHandleDelete
Req & Resp packets.
Change-Id: I225a38291c3f47065755c01b336ef75c719e5d58
Reviewed-on: https://code.wireshark.org/review/1546
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
MAUSB Packets should always be sent in DWORDs. This means that the
only valid values for the length field are multiples of 4.
This patch adds an expert info check to flag length fields that are
multiples of 4.
Change-Id: Ifb793f82aed4c9fb09a12f6ea97087733b58d14a
Reviewed-on: https://code.wireshark.org/review/1536
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Based on Icfe1e5477043dd695fd9b02b677ef29ac3fa8866 but rebased and simplified.
Change-Id: I9b7266e2fdcb58f38115250d785637cd585c69e0
Reviewed-on: https://code.wireshark.org/review/1532
Reviewed-by: Evan Huus <eapache@gmail.com>
Masks for padding now have an additional parenthesis to ensure
proper operator precedence.
Per the request of Evan Huus; See comment in Change-Id:
I3ad4e1beb891f9c2835adff320095e7e738241eb, Patch Set 10.
Change-Id: Ic8878f870b58cd272675b4d6c3658a029bb67984
Reviewed-on: https://code.wireshark.org/review/1519
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
so give it a name
Change-Id: Iaf9a6f8cb58a565673f53696f7e5d1698e6eae0f
Reviewed-on: https://code.wireshark.org/review/1509
Reviewed-by: Evan Huus <eapache@gmail.com>
The struct literal syntax {0} does not appear to be universally supported - use
memset instead.
Change-Id: If70d475cf3d7a582c43dcc879cefebc9aef0a99e
Reviewed-on: https://code.wireshark.org/review/1508
Reviewed-by: Evan Huus <eapache@gmail.com>
This dissector dissects MA USB Packets. It is capable of dissecting
Media Agnostic packets both in a TCP stream as well as packets sent
over SNAP (referred to in spec as "Raw Ethernet" mode).
Change-Id: I3ad4e1beb891f9c2835adff320095e7e738241eb
Signed-off-by: Sean O. Stalley <sean.stalley@intel.com>
Reviewed-on: https://code.wireshark.org/review/1252
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>