1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-31 17:31:18 +01:00
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
..
2022-03-11 09:24:12 +01:00
2022-01-10 12:21:40 +01:00
2022-01-13 17:50:59 +01:00
2021-08-13 19:50:38 +02:00
2022-06-10 11:02:40 +02:00
2021-12-07 13:00:58 +01:00
2021-12-10 18:54:29 +01:00
2022-06-16 18:54:16 +02:00
2022-03-11 09:20:24 +01:00
2021-12-07 16:31:15 +01:00
2022-02-11 12:38:21 +01:00
2021-11-24 17:54:44 +01:00
2021-10-01 11:26:15 +02:00
2022-06-08 12:53:48 +02:00