[riot-notifications] [RIOT-OS/RIOT] shell/ifconfig: Add L2-PDU info (#10923)

Marian Buschsieweke notifications at github.com
Fri Feb 1 17:09:55 CET 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 https://github.com/RIOT-OS/RIOT/pull/10918
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/10923

-- Commit Summary --

  * shell/ifconfig: Add L2-PDU info

-- File Changes --

    M sys/shell/commands/sc_gnrc_netif.c (5)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/10923.patch
https://github.com/RIOT-OS/RIOT/pull/10923.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/10923
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190201/dd890168/attachment.html>


More information about the notifications mailing list