summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-usb-ccid.c
AgeCommit message (Collapse)AuthorFilesLines
2017-06-25USB CCID: use register_decode_as_next_proto()Martin Kaiser1-19/+4
Change-Id: Ib583470ba612ef24da4d9360f7bbc0e33fb19bd9 Reviewed-on: https://code.wireshark.org/review/22377 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-23USB CCID: register obosolete preferenceMartin Kaiser1-0/+5
In 082e3e346f69f0c2134064e80dcc104c18111c55, we dropped the prtype preference in favour of Descode As. Register prtype as an obsolete preference to make sure that it's not removed from the preferences file. The way, the preferences file is still usable with older wireshark versions. Change-Id: I8feed6080b58dd5443898e2c5b12732b0b3a0a4f Reviewed-on: https://code.wireshark.org/review/22373 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2017-06-23USB CCID: use Decode As to select the payload protocolMartin Kaiser1-52/+23
Remove the special case for vid 0x072F, pid 0x2200. We should be able to set Decode As for this (vid, pid) to USB CCID and then use the new Decode As mechanism to select the next protocol. Register GSM SIM, ISO7816, PN532 and ACR122 as possible payloads for USB CCID. Change-Id: I8237cc9123655d3b289b0564ffb83a32434bebfc Reviewed-on: https://code.wireshark.org/review/22290 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>
2017-06-21GSM SIM: define a dissector for both request and responseMartin Kaiser1-7/+5
Define a dissector that can handle both requests and responses. Look at pino->p2p_dir to detect if we have a request or repsonse. (At the moment, there's a dissector for request+response in one packet and two other dissectors for request and response messages.) Use the new mechanism for USB CCID. Change-Id: I7eb9861802b4244f92770602179f39642eb28641 Reviewed-on: https://code.wireshark.org/review/22289 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-21USB CCID: unify the code to call subdissectorsMartin Kaiser1-49/+37
Prepare the USB CCID code for replacing the "next protocol" preference with Decode As. USB CCID has a length field for the payload data. Use this field to create the next_tvb. There's no need for different payload lengths depending on the next protocol. Use call_data_dissector() instead of referencing data_handle. Set pinfo->p2p_dir regardless of the next protocol. Change-Id: I042ecc9bd75245ee1d4d8a94532c9fd1de83e859 Reviewed-on: https://code.wireshark.org/review/22288 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-01-27Delete unsed variable in ccidThomas PORTASSAU1-11/+0
Change-Id: I4c9eff4248f25c15ef4d525e0a4360bf3bdb480c Reviewed-on: https://code.wireshark.org/review/19813 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-01-26CCID added dwFeatures, bStatus bitmasks and IFSD in class descriptionThomas PORTASSAU1-6/+119
Change-Id: I2855c83c6b5e9add3f34d72a2f2ed3394bf79b78 Reviewed-on: https://code.wireshark.org/review/19761 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-12-16Remove proto_item_append_text calls in favor of BASE_UNIT_STRING.Michael Mann1-6/+4
Many proto_item_append_text calls were just adding a unit string to a field. There's a better way to do that now. Change-Id: Id18d5ac1ea4d8ecdc4cbe7ebaec07fbd2eab6e78 Reviewed-on: https://code.wireshark.org/review/19289 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-12USB CCID added Interrupt IN and PC2RDR_paramsThomas PORTASSAU1-2/+93
Change-Id: I77a88b910fa51e09f9d5bdb541170de76ffb3708 Reviewed-on: https://code.wireshark.org/review/16386 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-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-5/+5
Started by grepping call_dissector_with_data, call_dissector_only and call_dissector and traced the handles passed into them to a find_dissector within the dissector. Then replaced find_dissector with find_dissector_add_dependency and added the protocol id from the dissector. "data" dissector was not considered to be a dependency. Change-Id: I15d0d77301306587ef8e7af5876e74231816890d Reviewed-on: https://code.wireshark.org/review/14509 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c Reviewed-on: https://code.wireshark.org/review/12485 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-1/+1
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-06-22Remove a bunch of deprecated tvb_length callsEvan Huus1-1/+1
Change-Id: I9362e0fdc4519ba5f3d656152966e7030f478839 Reviewed-on: https://code.wireshark.org/review/9022 Petri-Dish: Evan Huus <eapache@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2015-03-29smart card dev class descriptor: use a bit field for the supported protocolsMartin Kaiser1-3/+19
Change-Id: Icf1d71f0aa90ed418264cd4f349e2a514f1ae2f9 Reviewed-on: https://code.wireshark.org/review/7847 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-03-29dissect two more features in the smart card device class descriptorMartin Kaiser1-0/+12
Change-Id: Ia442cbf7a30c1f1054a3fa8e814d595867e2c034 Reviewed-on: https://code.wireshark.org/review/7846 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-2/+1
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-13Use ENC_LITTLE_ENDIAN when fetching FT_U?INT8 fields ...Bill Meier1-1/+1
(for some dissectors which fetch all other integral fields using ENC_LITTLE_ENDIAN). Change-Id: Ica72a68ac560f2920d61e0769de83130557c46fd Reviewed-on: https://code.wireshark.org/review/5752 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-16use supported/unsupported for the bitfield elementsMartin Kaiser1-24/+24
order them from MSB to LSB Change-Id: Ie758285c2cf5d19e00d6d256c49acca15ce81168 Reviewed-on: https://code.wireshark.org/review/4746 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-10-16smartcard descriptor: start a bitfield for the featuresMartin Kaiser1-2/+23
Change-Id: I636cfdfcd61d6d5dc041f9dbc657244d94e88b7f Reviewed-on: https://code.wireshark.org/review/4745 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-10-13smartcard descriptor: bitmask for pin support fieldMartin Kaiser1-3/+19
Change-Id: If0e5cd90ff73bfbb211970f9a24974119c6ec550 Reviewed-on: https://code.wireshark.org/review/4664 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-10-13smartcard descriptor:Martin Kaiser1-2/+21
dissect number of lines, characters per line in the lcd layout Change-Id: I36c9c6f2e73cdfde8a9b7c4ad0450d93722fca2b Reviewed-on: https://code.wireshark.org/review/4663 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-10-13smartcard descriptor: the lcd layout is two bytes longMartin Kaiser1-1/+1
Change-Id: Ie8fd82d652a9a3fc1d3139ab610bbaa7a5ecd32d Reviewed-on: https://code.wireshark.org/review/4662 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-09-08Eliminate proto_tree_add_text from some of the dissectors.Michael Mann1-6/+10
Other minor cleanups while in the area. Change-Id: I623d941e53128f169e55dfc629547b4221fa72fc Reviewed-on: https://code.wireshark.org/review/4021 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-07convert to proto_tree_add_subtree[_format]Michael Mann1-4/+3
Change-Id: Ie10ac4f5f04a23344d183e095bbafb23c6409144 Reviewed-on: https://code.wireshark.org/review/2904 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-20Rename dissector_add_handle() to dissector_add_for_decode_as().Guy Harris1-3/+3
Hopefully that name makes it clear what the routiner's purpose is, and will encourage people to use it rather than using dissector_add_uint() with a bogus integer value. Change-Id: Ic5be456d0ad40b176aab01712ab7b13aed5de2a8 Reviewed-on: https://code.wireshark.org/review/2483 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-1/+1
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-1/+1
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-07tvb_new_subset -> tvb_new_subset_length when length parameters are equal.Michael Mann1-1/+1
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is. Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d Reviewed-on: https://code.wireshark.org/review/1999 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-12-23From Michal Labedzki via ↵Alexis La Goutte1-8/+8
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9562 USB: Add support for Bluetooth Ubertooth with initial version of Low Energy Link Layer protocol and NFC ACR122 USB: CCID: Add ACR122 dissector to be autodetected by VendorId/ProductID svn path=/trunk/; revision=54407
2013-12-23From Michal Labedzki via ↵Alexis La Goutte1-37/+21
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9562 USB: Add support for Bluetooth Ubertooth with initial version of Low Energy Link Layer protocol and NFC ACR122 NFC: Add ACR122 USB dongle dissector ACS ACR122 is compatibile with PN532, but has its own API. Dissect it. svn path=/trunk/; revision=54406
2013-12-12remove unused dissector tablesMartin Kaiser1-5/+0
http://www.wireshark.org/lists/wireshark-dev/201312/msg00137.html svn path=/trunk/; revision=53977
2013-12-09Reject the packet if data is NULL without doing anything else.Chris Maynard1-2/+5
Note: We *might* want to do _something_ but that _something_ should be well-defined and consistent across all dissectors. Previously, some dissectors called proto_tree_add_text() to add some error message text to the tree, while others called DISSECTOR_ASSERT(). svn path=/trunk/; revision=53895
2013-11-21USB CCID and PN532_HCI can be now used in Decode As. Bug 9445 ↵Michael Mann1-4/+9
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9445) From Michal Labedzki svn path=/trunk/; revision=53463
2013-11-12Remove usb_conv_info_t from packet_info and pass the data directly into the ↵Michael Mann1-4/+4
subdissectors. Bug 9413 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9413) svn path=/trunk/; revision=53274
2013-10-31USB/PN532: Fix dissector to use new dissector *data instead of ↵Michael Mann1-5/+11
private_data. Bug 9333 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9333) From Michal Labedzki svn path=/trunk/; revision=53003
2013-10-13whitespace fixes; mostly: remove trailing blanksBill Meier1-3/+3
svn path=/trunk/; revision=52591
2013-10-04dissect the remaining components of the smart card descriptorMartin Kaiser1-4/+100
(without going into too much detail) svn path=/trunk/; revision=52355
2013-09-10From: Michal Labedzki <michal.labedzki@tieto.com>Anders Broman1-4/+24
Subject: [PATCH] NFC: PN532: Implement half of PN532 specification Implement TG_* and RF_* commands/responses. Also decode "status" field in all commands. Update USB CCID to decode "escaped" payload. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9119 svn path=/trunk/; revision=51916
2013-09-09More dissector table UI name changes (a continuation of r51904).Chris Maynard1-1/+1
svn path=/trunk/; revision=51907
2013-09-07From Tyson Key via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9105 :Pascal Quantin1-0/+3
Add additional PN532 opcodes, and update USB CCID dissector to skip status word in PN532 responses svn path=/trunk/; revision=51812
2013-09-04dissect some more items of the smart card descriptorMartin Kaiser1-6/+78
svn path=/trunk/; revision=51758
2013-09-02register a dissector for ccid class specific descriptorsMartin Kaiser1-4/+59
start dissecting the smart card descriptor --This line, and those below, will be ignored-e M epan/dissectors/packet-usb-ccid.c svn path=/trunk/; revision=51645
2013-06-13From Tyson Key via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8791 :Pascal Quantin1-3/+10
Improve dissection of GSM SIM payloads in USB CCID packets svn path=/trunk/; revision=49915
2013-05-31Check USB CCID length to see if subdissectors should be called instead of ↵Michael Mann1-107/+80
doing it blindly (which could lead to malformed packets). Bug 8735 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8735) Also minor cleanup of column info. svn path=/trunk/; revision=49651
2013-01-26Always call sub-dissectors with the top-level tree.Evan Huus1-3/+3
svn path=/trunk/; revision=47299
2013-01-26USB-CCID header is always 10 bytes and may contain payloads, so settingEvan Huus1-1/+1
it to run to the end of the packet was confusing and/or wrong. svn path=/trunk/; revision=47296
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45017
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-05-17Tabs -> spacespascal1-128/+128
svn path=/trunk/; revision=42691