To support lwIP better (dont require gnrc_ipv6)
Also don't require IPv6 for printing link type
With this sc_gnrc_netif can compile and work when using lwIP
(with l2util module added):
```
> ifconfig
Iface ET1 HWaddr: 24:0A:C4:E6:0E:9C Channel: 6 Link: up
L2-PDU:1500 Source address length: 6
Link type: wireless
inet6 addr: fe80::260a:c4ff:fee6:e9c scope: link
inet6 addr: 2001:db8::260a:c4ff:fee6:e9c scope: global
Iface ET0 HWaddr: 24:0A:C4:E6:0E:9F Link: up
L2-PDU:1500 Source address length: 6
Link type: wired
inet6 addr: fe80::260a:c4ff:fee6:e9f scope: link
inet6 addr: 2001:db8::260a:c4ff:fee6:e9f scope: global
>
```
Still works in gnrc_networking example:
```
> ifconfig
Iface 8 HWaddr: 24:0A:C4:E6:0E:9F Link: up
L2-PDU:1500 MTU:1500 HL:64 RTR
RTR_ADV
Source address length: 6
Link type: wired
inet6 addr: fe80::260a:c4ff:fee6:e9f scope: link VAL
inet6 group: ff02::2
inet6 group: ff02::1
inet6 group: ff02::1:ffe6:e9f
inet6 group: ff02::1a
```
19212: shell/rtc: use rtc_tm_normalize() to sanitize input r=benpicco a=benpicco
19360: gcoap: make use coap_build_reply() in gcoap_resp_init() r=benpicco a=benpicco
19401: shell/cmds: add genfile command r=benpicco a=benpicco
19645: sys/isrpipe: Replace xtimer with ztimer_usec r=benpicco a=MrKevinWeiss
### Contribution description
Getting ready for the xtimer dep.
### Testing procedure
Green murdock, there is no explicit test for isrpipe but since it runs xtimer compat it should operate the same.
### Issues/PRs references
19720: tests: remove unnecessary use of floating point r=benpicco a=benpicco
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: MrKevinWeiss <weiss.kevin604@gmail.com>
Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
The coreclk shell command now prints the CPU frequency in Hz, which
can be useful for boards with RC generated CPU frequency (e.g.
RP2040, FE310, or MPS430Fx1xx MCUs allow this) which may quite a bit
off the target frequency.
The shell_cmds module depends on the shell module. This was correctly
added to KConfig, but the Makefile dependencies missed this one. This
commit adds the missing dep.
19055: shell/gnrc_icmpv6_echo: acquire ZTIMER_USEC clock for time measurement r=benpicco a=jue89
19188: cpu/gd32v: add periph_adc support r=benpicco a=gschorcht
### Contribution description
This PR provides the `periph_adc` support and is one of a bunch of follow up PRs that complete the peripheral drivers for GD32VF103.
This PR depends on PR #19170 and includes this PR to be compilable since includes the ADC configuration also for Sipeed Longan Nano board.
### Testing procedure
`tests/periph_adc` should work on any GD32VF103 board.
### Issues/PRs references
Depends on PR #19170
19225: sys/net/dhcpv6: include IA Prefix Option in SOLICIT r=benpicco a=benpicco
Co-authored-by: Jue <me@jue.yt>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
The `gnrc_udp` shell command uses the function `netutils_get_ipv6()` but
does not include the corresponding module `netutils`. The only reason
most applications that use `shell_cmd_gnrc_udp` link is because they
also include the `shell_cmd_gnrc_icmpv6_echo` module (e.g. implicit via
`gnrc_ipcmpv6_echo`), which includes this dependency.
Model the LoRaWAN integration to GNRC's netif command (ifconfig) as
submodule of it, namely `shell_cmd_gnrc_netif_lorawan`.
This should fix a regression introduced by
https://github.com/RIOT-OS/RIOT/pull/18355
The change in 399e25cc was did not have the intended effect: As the
local crates still all defined 0.7 as the riot-wrappers version, that
dependency was actually down- rather than upgraded, and thus did not
effect the stabilizations.
My spell checker says "receival" should be "reception". Also, the
terms allow list and deny list are preferred over whitelist and
blacklist. But since scripts may depend on the shell command name,
only the help description is changed, not the cmd names.
Previously `shell_commands` was a "catch-all" module that included
shell commands for each and every used module that has a shell
companion. Instead, the new `shell_cmds` module is now used to provide
shell commands as individually selectable submodules, e.g.
`cmd_gnrc_icmpv6_echo` now provides the ICMPv6 echo command (a.k.a.
ping).
To still have a "catch all" module to pull in shell commands of modules
already used, `shell_cmds_default` was introduced. `shell_commands`
depends now on `shell_cmds_default` for backward compatibility, but
has been deprecated. New apps should use `shell_cmds_default`
instead.
For a handful of shell commands individual selection was already
possible. Those modules now depend on the corresponding `cmd_%` module
and they have been deprecated.
This fixed compilation, as the use of the interal `_xtimer_now()`
function is not compatible with `ztimer_xtimer_compat`. However, this
bug never triggered due to a bug in the build system preventing the
compilation of the shell command. We are about to fix this, so let's
fix the source first.
Synchronize the RPL thread updating the RPL netstats with the RPL
shell command reading it by disabling IRQs. This will prevent printing
corrupted data on non-32bit platforms as well as printing inconsistent
data (e.g. TX count of old state in conjunction with TX bytes of new
state) for all platforms.
Co-authored-by: Martine Lenders <mail@martine-lenders.eu>
There is a repeating pattern in the struct that is split out into a
subtype in this commit. This makes handling the data easier, as now
done in the print routine.
Instead of retrieving a pointer with NETOPT_STATS, retrieve the current
data. This avoids data corruptions when reading from one thread (e.g.
the thread running the shell (ifconfig command)) while another thread
is updating it (e.g. the netif thread).
The issue affects all boards, as users typically expect the count of
TX packets and the number of TX bytes to refer to the same state. For
16 bit and 8 bit platforms even a single netstat entry can read back
corrupted.
This fixes the issue by just copying the whole netstat_t struct over
without requiring explicit locking on the user side. A multi-threaded
network stack still needs to synchronize the thread responding to
netopt_get with the thread writing to the netstat_t structure, but that
is an implementation detail no relevant to the user of the API.
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
[..]
```
Module to lock the shell after a given timeout of time x. When the
shell did not receive any input within time x, then the shell is
locked automatically.
Module to lock the running shell with a password. Shell is proceeded only
when the valid password was entered by the user. After 3 failed attempts,
the input is blocked for a few seconds to slow down brute force attacks.
Does not make use of any cryptographic features yet.