Commit Graph

292 Commits

Author SHA1 Message Date
Kenneth Soerensen bbb1a794c5 ieee802154: Do not require correct FCS for ACK tracking
There is a good chance that the required information is still
valid even with a wrong FCS.

Change-Id: I244b2b4a857b7cefd1f4ef22eb151d5ac3ee4133
Reviewed-on: https://code.wireshark.org/review/35953
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-28 15:52:38 +00:00
Kenneth Soerensen 535f5277f3 ieee802154: Use the dissector internal address format for ACK tracking
This makes the address representation in ieee802154_transaction_t and
ieee802154_packet consistent.

Change-Id: I6ae66b48c3b2afe5843e6a82fe5adf1c6be5a7cd
Reviewed-on: https://code.wireshark.org/review/35780
Reviewed-by: Martin Boye Petersen <martinboyepetersen@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-01-16 20:08:07 +00:00
Kenneth Soerensen 9e135f8748 ieee802154: Use ACK tracking to add generated addresses to ACKs
Change-Id: I86a0aae9409ab5f81a70560997c637f8f16718fa
Reviewed-on: https://code.wireshark.org/review/35754
Petri-Dish: Jim Young <jim.young.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-13 07:44:06 +00:00
Stig Bjørlykke a673a50ad8 epan: Rename dissector_filters.c to conversation_filter.c
For the same reason as in g89c9d909.

Change-Id: I5e344ebdf8ba05d169484aa32b409d84edc6124f
Reviewed-on: https://code.wireshark.org/review/34943
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-04 10:17:16 +00:00
Devan Lai 610c7566f2 ieee802154: handle IEEE 802.15.4e LE WUF
Wake-up frames in 802.15.4e have a specific structure that is not
consistent with the fields present in a single-byte FCF.
As a special case when 802154e_compatibility is enabled, detect
multi-purpose frames that are exactly 12 bytes long and contain
a Rendezvous Time IE and parse them as an 802.15.4e wake-up frame.

Bug: 16102
Change-Id: I87c6317fffb0670dae0d5bdd499271fe02a40b22
Reviewed-on: https://code.wireshark.org/review/34684
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-10-03 10:49:25 +00:00
Devan Lai 6a7d3150ee ieee802154: support multipurpose frames
Add support for IEEE802.15.4-2015 multipurpose frames, which are
similar to data frames with the following exceptions:
 - The Frame Control Field can be either 1 or 2 octets, with different
   bit offsets for all fields except for Frame Type.
 - The Frame Version field, when present, must always be set to 00.
 - The source PAN ID is always absent
 - Instead of a PAN ID Compression field, there is a PAN ID Present
   field for the destination PAN ID only.

See Section 7.3.5 of IEEE802.15.4-2015 (esp Figure 7-19) for details.

Bug: 16101
Change-Id: I1e64d90694b567573ca10395b823adb9015f8917
Reviewed-on: https://code.wireshark.org/review/34682
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-10-03 07:52:32 +00:00
Devan Lai b5091d8cd8 ieee802154: handle IEEE 802.15.4e PAN ID compression
Add a new 802154e_compatibility preference.
When enabled, it will attempt to handle certain PAN ID compression schemes
that are permitted in 802.15.4e-2012 but not in 802.15.4-2015.

Specifically, when either the source or destination address are present
in short form and the PAN ID Compression bit is cleared, 802.15.4-2015 expects
the source PAN ID to be present, whereas 802.15.4e-2012 does not.

Bug: 16102
Change-Id: I7fea7bd6d0a78c859360a1130b242e90eac8feec
Reviewed-on: https://code.wireshark.org/review/34683
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-10-03 07:51:53 +00:00
Kenneth Soerensen c91856a48f IEEE 802.15.4: Add conversation table and conversation filter
Change-Id: I3ec5be36bff3768bce66975deb15fec2dcc5cb26
Reviewed-on: https://code.wireshark.org/review/34155
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-08-11 15:12:06 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
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>
2019-07-26 18:44:40 +00:00
Kenneth Soerensen 2377dff96c IEEE 802.15.4: Do not create new addresses but reuse the existing ones
Change-Id: I86519fe73b9225f5e1e19e20977debbea4aa0d74
Reviewed-on: https://code.wireshark.org/review/33954
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-16 06:42:40 +00:00
Martin Kaiser f155601d66 decode_as: remove the "title" member from decode_as_t
The title of a decode_as_t was used by the GTK UI. It's no
longer required for Qt.

Change-Id: Ibd9d4acbe9cad2c1af520340d04e550326a97ebe
Reviewed-on: https://code.wireshark.org/review/33557
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-11 18:50:32 +00:00
Alexis La Goutte ff9189ef92 ieee802154: empty paragraph passed to '@param' command [-Wdocumentation]
Change-Id: I76f7a20a7a8f019a9b99404e08a3249cdc6ea6ef
Reviewed-on: https://code.wireshark.org/review/33008
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Kenneth Soerensen <knnthsrnsn@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-05-15 11:26:10 +00:00
Kenneth Soerensen 9f8ac4d422 IEEE 802.15.4: Separate ACK tracking and conversations
ACK tracking did not work for protocols like ZigBee because the ACK is
send without address information. By moving the ACK tracking out-side
the conversation and only use the interface and the sequence number to
match requests and ACKs this is now working.

If addresses are present in the ACK they will still be used to avoid
invalid matches.

The nature of the wmem_tree ensures that the ACK tracking will always
work on the latest requests.

Change-Id: I5c763e34ec340b19a7998ddcfe9f72fccfd2acd1
Reviewed-on: https://code.wireshark.org/review/32927
Reviewed-by: James Ko <jck@exegin.com>
Tested-by: Petri Dish Buildbot
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-05-09 04:02:22 +00:00
Alexis La Goutte 4db2258dd6 fix: no previous prototype
for function 'ieee802154_create_tap_tlv_tree' [-Wmissing-prototypes]

Change-Id: I74de53e945685a289c302a784afd3d3f5f22891b
Reviewed-on: https://code.wireshark.org/review/32799
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-09 17:46:51 +00:00
Gerald Combs 8d3ac3af86 epan: Convert our PROTO_ITEM_ macros to inline functions.
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>
2019-04-04 04:03:38 +00:00
James Ko 2bd680746a IEEE802154_TAP: Add TLVs for channel plan and freq
Channel Center Frequency (Type=11).  In addition to or instead of
channel number for packet reception, the channel center frequency may be
specified in kHz as  IEEE-754 floating point number.
Channel Plan (Type=12) - Allow reporting of a generic channel plan used
to calculate channel numbers.  The channel plan consists of the channel
0 center frequency, channel spacing and number of channels.

Change-Id: I41fa585e9c2fd8986b1fb61a49de74ee2adac4fa
Reviewed-on: https://code.wireshark.org/review/32415
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-03-15 04:34:20 +00:00
Stig Bjørlykke e327892d09 ieee802154: Show header fields
Add a new subtree with Header fields Version, Reserved and Length.
Include padding length in the TLV entry.

Change-Id: I7c39253f4d2f5f3b2d5721d10af3f8b563ea0d04
Reviewed-on: https://code.wireshark.org/review/32346
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2019-03-07 11:11:31 +00:00
Uli Heilmeier f6f048361f IEEE802154: Fixing some implicit conversations
Fixing some "implicit conversion loses integer precision" warnings
reported by clang with -Wshorten-64-to-32 option

Change-Id: Ica92971e689c28c6d1ea995e821d648a19186c09
Reviewed-on: https://code.wireshark.org/review/32331
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-03-05 12:50:32 +00:00
James Ko e1316e1b20 IEEE 802.15.4-2015 CCM* nonce for TSCH mode
Enable decryption in TSCH mode which requires ASN in nonce.

Change-Id: Iae24add3a15cef00ef0037acd99f30b684e97ae2
Reviewed-on: https://code.wireshark.org/review/32142
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-03-02 08:29:28 +00:00
Dario Lombardo 349735613d ieee802154: fix compilation with gcc-4.
Error:
../epan/dissectors/packet-ieee802154.c: In function 'dissect_ieee802154_header_ie':
../epan/dissectors/packet-ieee802154.c:3788:10: error: variable 'remaining' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
     gint remaining = tvb_reported_length_remaining(tvb, offset) - IEEE802154_MIC_LENGTH(packet->security_level);
          ^

Change-Id: I6dadaa9e502f8f38bf476b690395727c836172fd
Reviewed-on: https://code.wireshark.org/review/32283
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-03-01 10:21:18 +00:00
Guy Harris 1cbcc57e0a Put a fake "FCS OK" value into the tree if we don't have FCS information.
That was what was being done before; do it in the main dissector
routine, as 1) the main dissector routine doesn't call the FCS or TI
CC24xx dissector if we don't have an FCS or TI CC24xx metadata trailer
and 2) that means we pull duplicate code out of those dissectors.

Also, those routines are only called if we have the full FCS/metadata
available, so there's no need for them to check for that.  (Arguably,
they should be called if the data is present, according to the reported
length, even if it's not available in the captured data, so we mark the
frame as having been cut off so the full data isn't available.)

Change-Id: I6be2a1f71a27bc41aea93e3c92743fc12c997c94
Reviewed-on: https://code.wireshark.org/review/32281
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-03-01 03:03:30 +00:00
Guy Harris 74a776d391 Pull some common code from the FCS/metadata dissectors.
Put the "mark frames with an invalid CRC" stuff into the main dissector
code, as it's the same regardless of whether you have an FCS that can be
checked or metadata with an "FCS bad" flag.

Change-Id: I2540c1934032c91f22b66babd81fb928212f18b5
Reviewed-on: https://code.wireshark.org/review/32280
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-03-01 02:26:08 +00:00
Guy Harris 8ecb42ae0d Have separate routines to dissect an FCS and TI CC24xx metadata.
Those fields have nothing in common.

Change-Id: Ida29ce36a8a3e311b58a900a5631e314ebc39662
Reviewed-on: https://code.wireshark.org/review/32279
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-03-01 00:19:42 +00:00
Guy Harris 371c71ac1e Don't use a global variable for the FCS length.
Use local variables and parameters instead.

Change-Id: If491ef9c4e961848bb59f48d107157372f93e43f
Reviewed-on: https://code.wireshark.org/review/32278
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-03-01 00:01:34 +00:00
Guy Harris f5164e6eff Don't use the same variable for the configured FCS type and the tap FCS type.
There's the value the user configured, which should neither be used nor
modified by the 802.15.4 TAP dissector; that dissector should just set
the FCS length variable.  It should also call the common dissector, as
most of the other top-level dissectors do.

That lets us have separate types for the "configured FCS type" and "tap
FCS type" variables; do so.

Speaking of calling the common dissector, the "non-ASK" dissector should
do so as well.  Make it so.

While we're at it, fail if there's an unknown FCS type in the tap
header.

Change-Id: Ib0de81764670302c771be3851e9717f0a8399ac6
Reviewed-on: https://code.wireshark.org/review/32277
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-28 23:46:02 +00:00
Guy Harris 65ca4b4da7 Clean up ITU-T vs. CCITT, fix some comments.
The CCITT was part of the ITU, and was renamed the ITU-T:

	https://en.wikipedia.org/wiki/ITU-T#History

so just say ITU-T.  As for whose idea those particular 16-bit and 32-bit
CRC generator polynomials originally were, I don't know. 802.15.4 speaks
of "a 32-bit CRC equivalent to ANSI X3.66-1979", but there ain't no
32-bit CRC in that standard, and its 16-bit CRC is Yet Another
x^16 + x^12 + x^5 + 1 CRC that they claim came from CCITT/ITU-T V.41;
V.42 has both 16-bit and 32-bit CRCs.

Clean up more comments about the TI CC24xx metadata trailer.

The "non-ASK PHY" name may have made sense when the type was created, as
all the PHYs other than ASK, at the time, may have had the same
preamble/SFD/PHR, but that's no longer true.  List, in a comment, the
ones to which it applies, all of which have 16-bit CRCs.

Change-Id: Ie509dc06d06aec9738447f8da254c4edc5971a92
Reviewed-on: https://code.wireshark.org/review/32276
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-28 23:05:40 +00:00
Guy Harris 7bf2fbf85a Replace another tvb_new_subset_length_caplen() call.
tvb_new_subset_length() is sufficient, and correctly calculates the
captured length of the tvbuff, rather than possibly setting it too large
by setting it based on the length of the TLV header.

Change-Id: I510ee6742fcbc08ae7331585a65c768e98e6b3d9
Reviewed-on: https://code.wireshark.org/review/32271
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-28 18:48:29 +00:00
Guy Harris bf8ca6a605 Replace a tvb_new_subset_length_caplen() call with tvb_new_subset_remaining().
It's simpler, and is not incorrectly using the *captured* length to set
the *reported* length.

Change-Id: If4b7f1c431f4c39dcc568698358667a1b4fc1a12
Reviewed-on: https://code.wireshark.org/review/32268
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-28 18:42:01 +00:00
Guy Harris c6781b6385 Remove FCS length checks from code that's handed a tvbuff without an FCS.
Data handed to dissect_ieee802154_decrypt() should have, and does, have
the FCS stripped off, so we don't need to use the FCS length.

While we're at it:

Update more comments for CC24xx metadata not being an FCS.

Do the header IE processing loop with a "data remaining" counter,
explain why we're doing a "data remaining" check and why it includes the
MIC length, and note that we should use the "data remaining" counter to
do more checks for invalid frames.

Change-Id: I928dbf6142b5876b6a25b954f798936c9e97ac0d
Reviewed-on: https://code.wireshark.org/review/32267
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-28 18:27:31 +00:00
James Ko 6ce7509223 Add IEEE 802.15.4 TAP link type
New link type for IEEE 802.15.4 with pseudo-header and optional
meta-data TLVs, PHY payload exactly as it appears in the spec (no
padding, no nothing), and FCS if specified by FCS Type TLV.
Specification at https://github.com/jkcko/ieee802.15.4-tap

Bug: 15429
Change-Id: I67bd154891ad5818be9a1630aa5cbb863b55509a
Reviewed-on: https://code.wireshark.org/review/32141
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-28 17:55:14 +00:00
Guy Harris 8fad9ba447 Fix the FCS handling.
All the complicated stuff to see whether the captured data includes all
of, some of, or none of the FCS is necessary, and should not have been
removed.  The previous code would sometimes dissect packet data at the
end as both payload *and* FCS.

This also means that the decryption code doesn't have to worry about the
FCS, and expects the payload handed to it *not* to have the FCS.  Update
callers to handle that.

This puts back the changes from
e4d3916530, for which the comment was:

    Clean up the way we handle the FCS.

    For the "802.15.4 with FCS" link-layer type, strip what FCS we find,
    if any, off and use that new tvbuff for all dissection except for
    checking and dissection of the FCS itself.

    For the "802.15.4 without FCS" link-layer type, don't fake an
    uncaptured FCS by increasing the reported length, just use the
    tvbuff as is.

    This means we handle 802.15.4 the same way we handle other
    link-layer types where the FCS might, or might not, appear as
    part of the captured data.

"Handling stuff at the ends of packets is hard, let's go shopping!"

Change-Id: Iaf3e8392efec9d1c35f73966e22f2a3ae91317a1
Reviewed-on: https://code.wireshark.org/review/32254
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-27 23:35:06 +00:00
Guy Harris a4c8b2d4e6 Fix a comment.
There's no MIC at the end of an unencrypted packet, and thus we're not
removing any MIC.

Change-Id: Ie19790afc573b66f5dd09a4f8afc0fe69895eabe
Reviewed-on: https://code.wireshark.org/review/32249
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-27 21:20:08 +00:00
Guy Harris 179d872565 Fix subset-tvbuff creation.
Use tvb_new_subset_length(), rather than (incorrectly) attempting to
calculate the captured length ourselves.

Change-Id: I9f608ee5bf59f261111b2a75900dddad12fb5554
Reviewed-on: https://code.wireshark.org/review/32245
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-27 21:11:20 +00:00
Guy Harris 812afa8065 More "it's not an FCS, it's metadata" comment updates.
Change-Id: I2c0be3fe7cd900cd93d9fb64475a911e5bb3f9ac
Reviewed-on: https://code.wireshark.org/review/32230
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-27 09:52:00 +00:00
Guy Harris 5ab0bc2a3c The TI CC24xx chips put metadata, not an FCS, at the end of the packet.
Don't call it an "FCS" in the CC24xx case.  It's not an FCS; it's not
even just an "FCS OK" bit.

Display the metadata in question in bit order, from the "CRC OK" bit
downwards.

Change-Id: I8da29bbb1f8b5ef3905af75dd34c1563b904a4d8
Reviewed-on: https://code.wireshark.org/review/32228
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-27 09:47:29 +00:00
James Ko 8ee96f4ccb Add IEEE 802.15.4 ACK tracking
Add flag to protocol configuration to enable ACK tracking.
Fix duplicate strings in dissector.

Change-Id: I245f2f2c9aad408a8e8429e8ac5ea5dac37a4f69
Reviewed-on: https://code.wireshark.org/review/32140
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-27 05:07:45 +00:00
James Ko 8f77202943 Add support for IEEE 802.15.4 32-bit FCS
Make FCS length a variable.
Modify protocol configuration to include FCS type option.

Change-Id: I1e08f5b6b43907833464c20d798163343ce67a76
Reviewed-on: https://code.wireshark.org/review/32139
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-27 05:06:51 +00:00
James Ko 0a035b1410 Fix ieee802.15.4 wpan-zboss abbreviations
Change-Id: Iab6e71938003e4088d0290df103ea78ade82a89f
Reviewed-on: https://code.wireshark.org/review/32213
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-27 05:06:28 +00:00
James Ko 54b678f9f8 IEEE 802.15.4 Fix duplicate strings
RX Wait is duplicated hf_register_info table for
hf_ieee802154_tsch_timeslot_ack_wait and
hf_ieee802154_tsch_timeslot_turnarount

Change-Id: Ib519491d8baca6ef1e6ada1e53bb39d879eb39ee
Reviewed-on: https://code.wireshark.org/review/32202
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2019-02-26 20:39:45 +00:00
Guy Harris 7eb3e47fa4 Try to squeeze some bytes out of the frame_data structure.
Make the time stamp precision a 4-bit bitfield, so, when combined with
the other bitfields, we have 32 bits.  That means we put the flags at
the same structure level as the time stamp precision, so they can be
combined; that gets rid of an extra "flags." for references to the flags.

Put the two pointers next to each other, and after a multiple of 8 bytes
worth of other fields, so that there's no padding before or between them.

It's still not down to 64 bytes, which is the next lower power of 2, so
there's more work to do.

Change-Id: I6f3e9d9f6f48137bbee8f100c152d2c42adb8fbe
Reviewed-on: https://code.wireshark.org/review/31213
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-12-27 04:34:29 +00:00
Vasil Velichkov 48c74842eb ieee802154: Free uat table records
Add addr_uat copy and free callbacks.

Change-Id: Ifecf962cccdea4a4f87fc30c5573eee285ba00bc
Reviewed-on: https://code.wireshark.org/review/30510
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-11-05 11:53:06 +00:00
Stig Bjørlykke 3bb6c5c158 ieee802154: Show FCF reserved bit
Change-Id: Ibd18e988a3c0692c1a5eccb2db1abf87947f3c03
Reviewed-on: https://code.wireshark.org/review/30131
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-12 05:05:20 +00:00
Stig Bjørlykke 001a81bace ieee802154: Make a variable volatile
This fixes a warning:
[...]/epan/dissectors/packet-ieee802154.c:3196:17: error: variable ‘length’ might
be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
         guint16 length = (guint16) (ie_header & IEEE802154_PAYLOAD_IE_LENGTH_MASK);

Change-Id: I556b2199f8ab028e87e4c9d868da9831f7076402
Reviewed-on: https://code.wireshark.org/review/29779
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-21 12:52:08 +00:00
Guy Harris a796138283 Use proto_tree_add_item() for a number of time values.
Change-Id: I862a7870d335f8b0b57d13e2981a8bb1a02b2726
Reviewed-on: https://code.wireshark.org/review/28563
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-02 03:33:31 +00:00
Guy Harris 93c60b3b7c Clean up whitespace.
Change-Id: Ifdd6f1e96a01f040375639f6d09e56241798b346
Reviewed-on: https://code.wireshark.org/review/26949
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-15 02:42:30 +00:00
Guy Harris c10fe98fcd Expand and clean up comments.
Change-Id: Ie87615c664e3fec70356f86675b219c7a6462417
Reviewed-on: https://code.wireshark.org/review/26948
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-15 02:40:50 +00:00
Guy Harris e4d3916530 Clean up the way we handle the FCS.
For the "802.15.4 with FCS" link-layer type, strip what FCS we find, if
any, off and use that new tvbuff for all dissection except for
checking and dissection of the FCS itself.

For the "802.15.4 without FCS" link-layer type, don't fake an uncaptured
FCS by increasing the reported length, just use the tvbuff as is.

This means we handle 802.15.4 the same way we handle other link-layer
types where the FCS might, or might not, appear as part of the captured
data.

Change-Id: Ia91b7fb0aad495876be00bf813c6b6517e5e11d7
Reviewed-on: https://code.wireshark.org/review/26947
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-15 01:47:18 +00:00
Robert Sauter a67082d354 IEEE 802.15.4: fix decryption results based on uninitialized data
Refactor ieee802154_set_mac_key to return the number of keys set and
only try to decrypt with the alt_key if actually provided

Bug: 14522
Change-Id: I40802dff8c08f7f82b792fb16f5f91aa3b9e20cc
Reviewed-on: https://code.wireshark.org/review/26677
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-30 07:29:03 +00:00
Yasuyuki Tanaka 9be139cae0 ieee802154: support 6top protocol (6P) draft-10
- remove GEN field, that is obsoleted
- add SIGNAL command
- update return codes following the draft

Bug: 14542
Change-Id: I7eeb6f832d23688d5dc50f68224da9a7612429ff
Reviewed-on: https://code.wireshark.org/review/26553
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-03-22 06:17:09 +00:00
Robert Sauter cbe424b27d IEEE 802.15.4: show MIC and key number for decryption
- show the MIC of the received packet
- show only payload (without) MIC as data when decryption failed
- show key number (UAT row index) used for decryption
- small cleanups

Change-Id: I7815349e99b178c219a0e649d3d65f0b6eaa7201
Reviewed-on: https://code.wireshark.org/review/26362
Reviewed-by: Ed Beroset <beroset@ieee.org>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-11 07:34:31 +00:00