aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-iso14443.c
AgeCommit message (Collapse)AuthorFilesLines
2016-02-13iso14443: verify the CRC of all messagesMartin Kaiser1-49/+85
define a function to dissect the CRC depending on the card type add a circuit for an activated card to keep track of the card type define a new circuit type CT_ISO1443 for this purpose, the circuit ID is always 0 as we support only a single active card Change-Id: I7250f834301612ba50743258ca7bdbe0199de3ea Reviewed-on: https://code.wireshark.org/review/13908 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2016-02-05iso14443: add items for the actual length fieldsMartin Kaiser1-5/+64
the messages contain "length codes" instead of the actual lengths use a simple conversion table to covert length codes into lengths add generated items for the actual lengths Change-Id: Ic10aed0d20cfca30524cf767798df4eec2330592 Reviewed-on: https://code.wireshark.org/review/13734 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2016-02-05iso14443: move the dissection of the attrib command to a separate functionMartin Kaiser1-55/+68
Change-Id: I929a9e5ce22d87a169d94c5ff660f48512cb5134 Reviewed-on: https://code.wireshark.org/review/13733 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2016-02-05iso14443: make max_frame_size_code more genericMartin Kaiser1-7/+21
it's used by two messages, the relative position inside the current byte is different don't use a static bitmask for the hf Change-Id: I6a145cad46bab1afd22f66f144e7e4e9909f0b15 Reviewed-on: https://code.wireshark.org/review/13732 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2016-02-05iso14443: dissect some more fieldsMartin Kaiser1-3/+45
Change-Id: Ic1f20b94d9930150b60af4802bf8653713562a33 Reviewed-on: https://code.wireshark.org/review/13731 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2016-01-25Move the proto data stuff out of frame_data.[ch].Guy Harris1-1/+1
It's not tied to the frame_data structure any more, so it belongs by itself. Clean up some #includes while we're at it; in particular, frame_data.h doesn't use anything related to tvbuffs, so don't have it gratuitiously include tvbuff.h. Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c Reviewed-on: https://code.wireshark.org/review/13518 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-6/+6
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-22[iso14443] dissect two more components of the ATQBMartin Kaiser1-6/+24
Change-Id: I4fc1962a391549e880dcdf52dfa13a94d3568ea8 Reviewed-on: https://code.wireshark.org/review/13483 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2016-01-08Fix a lot of typos and misspellingsmoshekaplan1-1/+1
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>
2015-12-31[iso14443] continue dissection of the ATSMartin Kaiser1-4/+62
display the individual bytes the next step is to dissect the meaning of their bits Change-Id: Id93bcdb3913886365dbd0fb3fdedc7ed0c63be93 Reviewed-on: https://code.wireshark.org/review/12957 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-12-12[iso14443] dissect the PCB byte and payload of I, R and S-blocksMartin Kaiser1-46/+126
Change-Id: Ia7c3e09d147d8e46acaf4476b82acdde88a400b9 Reviewed-on: https://code.wireshark.org/review/12567 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-12-12[iso14443] dissect some more components of the ATQBMartin Kaiser1-45/+138
and move ATQB dissection into a separate function Change-Id: Iaa6b4aaaa70bb33ddd334ed4d5c39ffc15454e4c Reviewed-on: https://code.wireshark.org/review/12566 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
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-7/+7
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-11-25Fix copy-and-pasteo.Guy Harris1-1/+1
Presumably the intent was to check for either of the two "CRC dropped" event types. (CID 1340186.) Change-Id: Ieea8f5ab80bebbdbb683998a6747e5130d46b92d Reviewed-on: https://code.wireshark.org/review/12127 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-25Fix typo.Guy Harris1-5/+14
Convert the if-chain to a switch() statement while we're at it; if it had been one originally, the compiler would have reported that there were duplicate cases and failed. (CID 1340190.) Change-Id: I297ab32c51842af889bd6bebe764c0e45d57cea0 Reviewed-on: https://code.wireshark.org/review/12125 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-21ISO14443: Fix Dead Store (Dead assignement/Dead increment) Warning found by ↵Alexis La Goutte1-1/+1
Clang Change-Id: I63f0b3891030ccc001f81fde94121adad37b555b Reviewed-on: https://code.wireshark.org/review/12004 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-11-19use the official DLT for ISO14443Martin Kaiser1-1/+7
add DLT_ISO14443 to pcap_to_wtap_map[] define WTAP_ENCAP_ISO14443, link it to the iso14443 dissector Change-Id: Id837197c4d66071094f9336d60db36a371424807 Reviewed-on: https://code.wireshark.org/review/11959 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-18[iso14443] add simple components of an R-blockMartin Kaiser1-1/+5
an S-block has no block number, fix this while at it Change-Id: I16113fde5f78d77d7db6b7cec8d4dfa46f0187aa Reviewed-on: https://code.wireshark.org/review/11944 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-11-17[iso14443] start dissecting the PCB of an S-blockMartin Kaiser1-4/+10
S-blocks have a block number exactly like I-blocks, give the hf variable a more generic name Change-Id: I25774496f88bd27b1978662e4a781ddeb5e44b45 Reviewed-on: https://code.wireshark.org/review/11920 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-11-17[iso14443] do a more precise check for uid-related commandsMartin Kaiser1-1/+1
make sure that we don't treat an S-block as a uid command Change-Id: Ibe001cd346eff462040df5259c7a88fa7f94bf78 Reviewed-on: https://code.wireshark.org/review/11918 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-11-17[iso14443] dissect I-block PCB componentsMartin Kaiser1-6/+39
Change-Id: I076ce2f4f7dca455a8ee12445fcbf17a9f120f49 Reviewed-on: https://code.wireshark.org/review/11917 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-11-17update the ISO1443 dissectorMartin Kaiser1-71/+556
handle the ..._CRC_DROPPED events use pinfo->p2p_dir to store the direction pass a boolean 'crc_dropped' to the sub-dissectors for message types subtree for an ISO1443 message dissect most components of most messages Change-Id: I2570dd4d941e5db7fa541723b70ccad6ce70ab49 Reviewed-on: https://code.wireshark.org/review/11912 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-11-12Squelch a compiler warning.Guy Harris1-1/+1
Change-Id: I9e9746dc5f17daea7830ddc37f5df0ba16def397 Reviewed-on: https://code.wireshark.org/review/11762 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-12dissector for ISO14443 protocolsMartin Kaiser1-0/+593
This is a dissector for the ISO14443 protocols between a contactless smartcard and a card reader. The overall approach is similar to DVB-CI. We have a pseudo-header in front of the captured data that has information about the type of the captured data and the direction. For now, the dissector registers itself by name so it can be linked to a user-DLT. I am applying for an official DLT. Change-Id: I9c4a28ef5b220f205baf58381bf1962996887a9d Reviewed-on: https://code.wireshark.org/review/11663 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>