Age | Commit message (Collapse) | Author | Files | Lines |
|
Implement little endian support for tvb_get_bits family of functions.
The big/little endian refers to bit numbering within an octet. In big
endian, the most significant bit is considered bit 0, while in little
endian the least significant bit is considered bit 0.
Add encoding parameters to proto tree bits format family functions.
Specify ENC_BIG_ENDIAN in all dissectors using these functions except in
USB HID that requires ENC_LITTLE_ENDIAN to work correctly.
When formatting bits values, always display most significant bit on the
leftmost position regardless of the encoding. This results in no gaps
between octets and makes the displayed value comprehensible.
Close #4478
Fix #17014
|
|
Recent updates to the iso14443 specifications increased the maximum frame size
from 256 to 4096. This affects FSC, FSD and type b's max frame size.
Append the optional sizes >256 to the array of possible frame sizes.
Change-Id: I12ffb3a4bbd019dc38030de179526f7ec96b19cb
Reviewed-on: https://code.wireshark.org/review/37690
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
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>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
This reverts commit fe8744026c5f23fac15069ea597f7e99f7072d44.
The commands that fe8744026c ("ISO14443: Update some commands") adds are
not part of iso14443. It seems that these are mifare commands.
(There's a couple of different mifare variants, not all of them support
those commands.)
Adding the commands unconditionally breaks iso14443 dissection.
An iso14443 block with a pcb byte of 0xA2 is an R-ACK block for block
number 0. This is not a "write block".
If we want to support mifare cards, we have to detect the card type
during activation. We can then add a mifare dissector which handles the
messages after activation if we are actually talking to a mifare card...
Change-Id: I86164cc4c1618204641ae00566694d0f98871785
Reviewed-on: https://code.wireshark.org/review/37689
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
The static arrays are supposed to be arrays of const pointers to int,
not arrays of non-const pointers to const int.
Fixing that means some bugs (scribbling on what's *supposed* to be a
const array) will be caught (see packet-ieee80211-radiotap.c for
examples, the first of which inspired this change and the second of
which was discovered while testing compiles with this change), and
removes the need for some annoying casts.
Also make some of those arrays static while we're at it.
Update documentation and dissector-generator tools.
Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc
Reviewed-on: https://code.wireshark.org/review/37517
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
true_false_strings have no helper function to properly retrieve the
string representing the true or false value, much like unit_strings,
even though this is not uncommon in dissectors.
This change introduces the helper function and modifies the dissectors,
so that they use this helper i.s.o. their own expressions.
Change-Id: I477ed2d90a9a529fc5dcfef7e3ea42ec180d27ae
Reviewed-on: https://code.wireshark.org/review/36920
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
'iso14443.write_block.number' exists multiple times with NOT compatible types: FT_BYTES and FT_UINT16
Change-Id: I1e92e470acf1bda89b894dd8603309f7168bb069
Reviewed-on: https://code.wireshark.org/review/34681
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
Updates short frames commands and added read/write for Type 2 tags.
Change-Id: Ief7069cba8f6543290a246eda439b39c20c3079a
Reviewed-on: https://code.wireshark.org/review/34190
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
Change all wireshark.org URLs to use https.
Fix some broken links while we're at it.
Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
If an iso14443 message contains crc bytes but we do not know the
card type, we cannot verify if the crc is correct or not.
Add the crc bytes to the proto tree in this case and mark them
as unverified.
Change-Id: I2d95f2e4e5edc20095df58930b3176376a8786aa
Reviewed-on: https://code.wireshark.org/review/33686
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
Remove the "title" parameter from the register_decode_as_next_proto()
function. This parameter is no longer required since decode_as_t does
not have a title any more.
Change-Id: I300c755bd465453aa91703b53ce9adc954e38c00
Reviewed-on: https://code.wireshark.org/review/33579
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
When we reassemble I-blocks, we pass the payload to fragment_add_seq_next.
To do so, we use the overall iso14443 tvb, an offset and the payload length
as parameters.
We then call process_reassembled_data to do reassembly. If the I-block was
not fragmented, process_reassembled_data returns the only fragment + the
rest of the packet after this fragment.
This might be a misunderstanding on my part or something to be fixed in the
reassembly routines. For now, we work around this by defining a new tvb for
the data we submit to fragment_add_seq_next.
(I ran into a similar issue years ago for DVB-CI. Add a comment about this.
If it turns out that there's a better way to fix this, we should be fixing
both dissectors.)
Change-Id: Id83ab152529a5150669df3099df6f60be7a3a723
Reviewed-on: https://code.wireshark.org/review/33355
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
|
|
Fix the field names and the filter strings accordingly.
Change-Id: I4275abc04962a364dfea2ea76ca9877d82e0ae06
Reviewed-on: https://code.wireshark.org/review/33354
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
|
|
remove the _U_ tag
Change-Id: Id0cfb160903cf3a72adee20fa5c388d68c991a56
Reviewed-on: https://code.wireshark.org/review/33353
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
|
|
For type B cards, the PCD assigns a card identifier (CID)
in the attrib message it sends to the card. The card sends
the assigned CID back in its response.
We already dissect the CID in the response. Dissect it in the
attrib message as well.
Change-Id: Ic0bd200f0e40496d8fe3121aa9ad601a269de36c
Reviewed-on: https://code.wireshark.org/review/33183
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
Convert our various PROTO_ITEM_ macros to inline functions and document
them.
Change-Id: I070b15d4f70d2189217a177ee8ba2740be36327c
Reviewed-on: https://code.wireshark.org/review/32706
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
Bug: 15634
Change-Id: Ibaeb063db74055e26805db21875b9085b45c3ebe
Reviewed-on: https://code.wireshark.org/review/32581
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
|
|
Add an iso14443.subdissector table where other protocols can register
themselves for iso14443's payload. Register iso7816 dissector in this
table.
Change-Id: Idb17ae014449443448ec4c64017531bc69d806b3
Reviewed-on: https://code.wireshark.org/review/26821
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
Change-Id: I10bd77d72984fcf045a3c80e900c034393b444ae
Reviewed-on: https://code.wireshark.org/review/26822
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
Change-Id: I4df1b35d8d2233c301f0ba9e119d012aebe9cd17
Reviewed-on: https://code.wireshark.org/review/25913
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
Change-Id: I92c94448e6641716d03158a5f332c8b53709423a
Reviewed-on: https://code.wireshark.org/review/25756
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
Replace with conversation API that limits the "endpoint" to a single
uint32 value.
The intention is to eventually have "layered" endpoints, because circuit_id
was used in cases where src/dest port have already been populated (and
are used for layers above). Those src/dest ports should just be treated
as just another endpoint, but we currently only have support for one.
Change-Id: Ic6aa7ef0241275aa4dfde9459194369b48c72960
Reviewed-on: https://code.wireshark.org/review/24369
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
Change-Id: Id007a3df5442cf4d21263acb17303b6d735aaa7d
Reviewed-on: https://code.wireshark.org/review/24311
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
Extract the payload from I-blocks and support reassembly of APDUs that
are encapsulated in I-blocks. ISO14443 assumes that the fragments arrive
in order and no fragments are missing.
For now, we pass the reassembled APDU to the data dissector.
Change-Id: I526f6e6d699b2a1dfc4593536154bc9b58dea96e
Reviewed-on: https://code.wireshark.org/review/23506
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: Anders Broman <a.broman58@gmail.com>
|
|
Distinguish between Waiting Time Extension (WTX) messages and other
messages. Use a composite key for the wmem tree that consists of a
boolean wtx flag and the request packet number.
Change-Id: I7783aabb231fe145a8d8c0d65c88b553d5a5b533
Reviewed-on: https://code.wireshark.org/review/23063
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>
|
|
Change-Id: I71b4d3c8f22c32f1aaf89f147bc6a20ce54aec4d
Reviewed-on: https://code.wireshark.org/review/21409
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>
|
|
Change from col_append_sep_fstr() to col_append_sep_str() when
appending strings without formatting.
Change-Id: I315aca9b815c204a5bc78f7326402c40d1325f0e
Reviewed-on: https://code.wireshark.org/review/20846
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
replace our own function for dissecting the CRC with
the generic proto_tree_add_checksum()
Change-Id: I569c877836a7b771b01a37b57b6c50fc0183e9a7
Reviewed-on: https://code.wireshark.org/review/19601
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>
|
|
Change-Id: I17785d32ca1f5ef69731c5dfba04892aa09648a0
Reviewed-on: https://code.wireshark.org/review/18756
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
|
|
Have all dissector tables have a "supports Decode As" flag, which
defaults to FALSE, and which is set to TRUE if a register_decode_as()
refers to it.
When adding a dissector to a dissector table with a given key, only add
it for Decode As if the dissector table supports it.
For non-FT_STRING dissector tables, always check for multiple entries
for the same protocol with different dissectors, and report an error if
we found them.
This means there's no need for the creator of a dissector table to
specify whether duplicates of that sort should be allowed - we always do
the check when registering something for "Decode As" (in a non-FT_STRING
dissector table), and just don't bother registering anything for "Decode
As" if the dissector table doesn't support "Decode As", so there's no
check done for those dissector tables.
Change-Id: I4a1fdea3bddc2af27a65cfbca23edc99b26c0eed
Reviewed-on: https://code.wireshark.org/review/17402
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
Change-Id: I77952e0099ed8103c8316becafc700866b4c46d8
Reviewed-on: https://code.wireshark.org/review/16366
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
|
|
Change-Id: I3181375c3a2c8a905e1fd8bb722ac27902735ff0
Reviewed-on: https://code.wireshark.org/review/16365
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
|
|
Change-Id: I1b59a7d7bf0f9f304f816558f38ce5d52deb504e
Reviewed-on: https://code.wireshark.org/review/16263
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
|
|
Change-Id: Iec3595a9ee0f7037af1f949804f1022f315d1edc
Reviewed-on: https://code.wireshark.org/review/15824
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
|
|
Change-Id: I3f6e2bb73da901de0c6127564612fba86d49ddb4
Reviewed-on: https://code.wireshark.org/review/15335
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
|
|
re-use the boolean hf variables from the atqb
in the ats, the info if nad and cid are supported is in different
positions than in the atqb
therefore, we can't use a bitmask for the hf variables
fetch the correct bit manually instead
Change-Id: I8ba36ff9662052edcc7899f24d1110fdc4834c2e
Reviewed-on: https://code.wireshark.org/review/15282
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
|
|
Change-Id: Id8328cb7ca8674564a7230c7395dbeb24ffcea27
Reviewed-on: https://code.wireshark.org/review/15273
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
|
|
Change-Id: Id4431885fb78d8d8679e98111d9f007491c3f13e
Reviewed-on: https://code.wireshark.org/review/15069
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
|
|
the two bytes are sent LSB first
all fields are defined relative to the entire 16bit value
Change-Id: Iaea2b98fcb1f57224fbbd1c4c58473a7f810055d
Reviewed-on: https://code.wireshark.org/review/14513
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
|
|
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>
|
|
if the bit is set, it's an R(NAK) block
Change-Id: I0e44bd72d1c2a69a582792d08bf450e6ef2d163b
Reviewed-on: https://code.wireshark.org/review/13976
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
|
|
TL and T0 are followed by TA(1), TB(1) and TC(1), in this order
Change-Id: I356da8bb475d55f36e5b9ff02d35fcf35c457223
Reviewed-on: https://code.wireshark.org/review/13961
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
|
|
use the same hf as for ATQB's FWI
Change-Id: I2c1db117688e16e91fc4072d9b6f4bba46f64fd6
Reviewed-on: https://code.wireshark.org/review/13960
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
|
|
Change-Id: I04d9b610aac0f5387870be63b1d0dde9940bfa5b
Reviewed-on: https://code.wireshark.org/review/13959
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
|
|
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>
|
|
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>
|
|
Change-Id: I929a9e5ce22d87a169d94c5ff660f48512cb5134
Reviewed-on: https://code.wireshark.org/review/13733
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
|
|
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>
|
|
Change-Id: Ic1f20b94d9930150b60af4802bf8653713562a33
Reviewed-on: https://code.wireshark.org/review/13731
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
|
|
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>
|
|
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>
|