[Enhancement] Add Interpret field
Brief description
ERPS standard (probably some others) interpret lower layer's data.
For example, R-APS messages encode ERPS ring ID into MAC address:
The R-APS messages will use the MAC address range allocated within the ITU organizationally unique identifier (OUI) for [ITU-T G.8032] R-APS communication. The last octet of the MAC address is designated as ring ID (01-19-A7-00-00-[Ring ID]). The default ring ID is 01.
While this information resides in the lower layers, its interpretation logically belongs to the current layer. Some kind of Interpret field is needed to represent such data properly. It could inspect lower layers for information on dissection and patch data on build.
Scapy version
any
Python version
any
Operating system
any
Additional environment information
No response
How to reproduce
Actual result
No response
Expected result
No response
Related resources
No response
The currently expected way of doing this in Scapy is to create custom logic and use pkt.underlayer to access lower layers.
I fail to see what such a field should do :/
I fail to see what such a field should do :/
It would just display information in show functions and provide a convenient way of modifying underlayers.
Oh I see what you mean, like Wireshark [additional info] fields. We could probably find a better name than Interpret :stuck_out_tongue: This could have some use, alghouth I'm unsure about whether we should call it a field or not.