Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mesh-forwarder] add logs for forwarded MeshHeader messages (#2783)
This commit adds a new method `MeshForwarder::LogMeshMessage()` to log info about messages with `MeshHeader` (messages that are forwarded by device). The new logs indicate when a message is received/sent or possibly dropped. The immediate source and destination for the received or sent frame is logged. The new logs include info from `MeshHeader` such as mesh source, mesh destination, number of hops left. If the message is fragmented, info from fragment header such as datagram tag and offset is included in the logs. For a non-fragmented or a first fragment, `LogMeshMessage()` will also decompress the IPv6 and transport (UDP/TCP) headers and provide info from them such as IPv6 source/destination addresses, UDP/TCP checksum, source/destination port numbers. In addition to the new logs, this commit add the following changes: - Adds `\t` to log lines which are grouped (make it easier to read). - Adds `const` qualifiers to some methods in `Lowpan::MeshHeader`. - Adds new method in `FragmentHeader` to init it from a `Message`. - Refactors/updates some methods in `Lowpan` class (e.g., adding new public method to decompress LOWPAN_NHC UDP header).
- Loading branch information
Showing
5 changed files
with
449 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.