This introduces an additional state to the COAP_MEMO_* series to avoid
enlarging the memo struct needlessly. While they are documented
publicly, practically only the COAP_MEMO_TIMEOUT and COAP_MEMO_RESPONSE
are used in communication with the application, as a
gcoap_request_memo_t is only handed out in that state.
This generalizes the existing code for answering CoAP pings into general
message-layer responses. Such responses are now also sent as a reaction
to CON responses, which can otherwise follow the same code path as
existing other responses.
As a side effect, issues that would crop up when responding to odd empty
requests that have token length set are resolved.
Contributes-To: https://github.com/RIOT-OS/RIOT/issues/14169
A function to calculate the greatest common divisor is generally useful.
In turn declare the internal `frac_long_divide()` as `static`, it's
not used anywhere outside this module and has no public header.
Ctrl-D was not caught in a special case so it was interpreted as
a standard character. Handle it now the same way like EOF and
terminate the shell instance.
When gnrc_rpl_init was called from a thread with higher priority than
the RPL thread, the initializer's call to gnrc_netreg_register would be
executed before the event loop even had a chance to set up its message
queue.
The added short-lived lock makes it work from threads of any priority.
This adds optional usage of periph_flashpage_raw for the
riotboot/flashwrite module. This removes the need to buffer a full
flashpage page, instead it must buffer two times the
FLASHPAGE_RAW_BLOCKSIZE. One is used to buffer the current write block,
the other buffers the first chunk (offset zero, page zero). This first
chunk is written when finalizing the flash operation.
Care must be taken that, when using the skiplength, the number of bytes
skipped is always a multiple of the FLASHPAGE_RAW_BLOCKSIZE.
CPU IDs may contain very little entropy. Often only a single byte
may change between two CPUs.
To mitigate this use a somewhat 'proper' hash algorithm (I chose DJB2
hash simply because it's small) and 'extend' it to the required output
size.
For 50 STM32 CPU IDs from the grenoble site, this produces a much more
random LUID output.