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.
Contribution description
When IPv6 is enabled, the MTU is given. So users(*) sending IPv6 packets can easily figure out what the supported maximum protocol unit is.
However, when IPv6 is disabled and a user wants to send layer 2 frames directly, no information about the maximum PDU is available using the shell.
When 6LoWPAN is used, a user may be interested in the layer 2 PDU as well in order to avoid layer 2 fragmentation.
This PR adds the L2-PDU info to the output of the ifconfig shell command, which is printed regardless of the use of IPv6.
(*): Here "users" refers to human beings interacting with the shell. Applications can get the maximum PDU of each layer more easily using
gnrc_netapi_get()
withNETOPT_MAX_PACKET_SIZE
instead of using a shell command.Testing procedure
Flash
examples/gnrc_networking
and start shall commandifconfig
without any parameter. The layer 2 PDU should be printed asL2-PDU:<value>
.Issues/PRs references
This allows testing of #10918