btle-rf: Define previous RFU flags to create better Wireshark logs #3027
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These flags are used to provide more context for the current PDU.
Wireshark can use these to determine the direction of the PDU, the location in an advertising chain etc.
The additional context can be used by the Wireshark dissector to improve the expect info and provide easier-to-read logs.
Notes:
LEBitField
andLEBitEnumField
defined in the Ethercat layer. This PR has the same use case: There a multibit fields that range over byte boundaries. Those fields where not moved to the commonfields.py
as a result from a discussion in basic EtherCat layer #569. I'm fine with moving them tofields.py
as part of this PR.class BTLE_RF
asflags
is no longer available. This was necessary as some of the fields are multibit fields. I'm not too familiar with Scapy, so I was not able to find a way to preserve the API. Let me know if you have some suggestion on how to preserve it.Below is a code snippet creating a Bluetooth LE Wireshark log demonstrating how the logs become easier to read with the additional provided context:
Before:
After: