Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shell/ifconfig: Add L2-PDU info #10923

Merged
merged 1 commit into from Feb 4, 2019
Merged

Conversation

maribu
Copy link
Member

@maribu maribu commented Feb 1, 2019

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() with NETOPT_MAX_PACKET_SIZE instead of using a shell command.

Testing procedure

Flash examples/gnrc_networking and start shall command ifconfig without any parameter. The layer 2 PDU should be printed as L2-PDU:<value>.

Issues/PRs references

This allows testing of #10918

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() with NETOPT_MAX_PACKET_SIZE instead of using a shell command.
@maribu maribu added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: network Area: Networking labels Feb 1, 2019
Copy link
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, makes sense.

@maribu maribu added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Feb 1, 2019
@PeterKietzmann PeterKietzmann added the Reviewed: 3-testing The PR was tested according to the maintainer guidelines label Feb 4, 2019
@PeterKietzmann
Copy link
Member

ifconfig with examples/default and examples/gnrc_networking on a samr21-xpro showed expected output.

@PeterKietzmann PeterKietzmann merged commit b927c6f into RIOT-OS:master Feb 4, 2019
@maribu maribu deleted the ifconfig_l2pdu branch March 8, 2019 16:40
@danpetry danpetry added this to the Release 2019.04 milestone Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Reviewed: 3-testing The PR was tested according to the maintainer guidelines Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants