1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/shell
Erik Ekman aaa73b79ed sys/shell/gnrc_netif: List netifs in registration order
The netif list is used like a stack, so it needs to be
iterated in reverse to keep the registration order.

Time complexity in O(n^2), but the the list is normally very short
(1-2 items).

Before:
```
> ifconfig
Iface  10  HWaddr: 24:0A:C4:E6:0E:9C  Channel: 0  Link: down
[..]

Iface  7  HWaddr: 24:0A:C4:E6:0E:9F  Link: down
[..]
```

Now they are in the increasing order:
```
> ifconfig
Iface  7  HWaddr: 24:0A:C4:E6:0E:9F  Link: down
[..]

Iface  10  HWaddr: 24:0A:C4:E6:0E:9C  Channel: 0  Link: down
[..]
```

When lwIP is hacked to use the same shell command, it also
lists it interfaces in the expected order (was ET1,ET0 before):
```
> ifconfig
Iface  ET0  HWaddr: 24:0A:C4:E6:0E:9F  Link: down
[..]

Iface  ET1  HWaddr: 24:0A:C4:E6:0E:9C  Channel: 0  Link: down
[..]
```
2022-06-21 11:54:08 +02:00
..
commands sys/shell/gnrc_netif: List netifs in registration order 2022-06-21 11:54:08 +02:00
doc.txt sys/shell_commands: convert to SHELL_COMMAND() 2022-06-07 09:25:04 +02:00
Kconfig shell/Kconfig: make config options usable with dependency resolution 2021-02-19 13:22:47 +01:00
Kconfig.config shell/Kconfig: make config options usable with dependency resolution 2021-02-19 13:22:47 +01:00
Makefile make: detect their module name automatically 2014-06-17 15:49:32 +02:00
shell.c sys/shell: add pseudomodule shell_lock_auto_locking 2022-06-08 12:53:48 +02:00