1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

7587 Commits

Author SHA1 Message Date
Juergen Fitschen
b098108c99 ztimer_xtimer_compat: move PSEUDOMODULES definition to Makefile.include 2020-05-23 16:50:24 +02:00
Juergen Fitschen
5a54c29f09 xtimer_on_ztimer: move PSEUDOMODULES definition to pseudomodules.inc.mk 2020-05-23 16:37:45 +02:00
Martine Lenders
e011e3ed38
Merge pull request #14043 from pokgak/pr/sock_dtls/send_api_change
sock_dtls: add timeout to sock_dtls_send and add sock_dtls_session_init
2020-05-22 14:33:54 +02:00
Aiman Ismail
3ad2724f44 sock_dtls: fix vera++ warnings on line length 2020-05-22 14:06:38 +02:00
Aiman Ismail
b5b7955743 sock_dtls: add sock_dtls_session_init()
deprecates sock_dtls_session_create()
2020-05-22 14:06:12 +02:00
Hauke Petersen
9ad65786dd sys/phydat: added phydat_to_json converter 2020-05-20 15:29:24 +02:00
Hauke Petersen
3e4229cd31 phydat: add verbose unit_to_str function 2020-05-20 15:29:24 +02:00
Hauke Petersen
7764754686 phydat: fixes to phydat_str.c
- add some missing unit strings to phydat_unit_to_str
- fixed doxygen group and file description
2020-05-20 15:23:21 +02:00
benpicco
70543bba1d
Merge pull request #13275 from miri64/gnrc_ipv6_ext_opt/feat/initial
gnrc_ipv6_ext_opt: initial import
2020-05-20 14:35:58 +02:00
Martine S. Lenders
d04621fc43
gnrc_ipv6_ext_opt: initial import
This provides header parsing for IPv6 hop-by-hop and destination
options according to [RFC 8200].

[RFC 8200]: https://tools.ietf.org/html/rfc8200#section-4.2
2020-05-20 12:34:04 +02:00
Martine S. Lenders
166315dcc2
ipv6_ext_opt: initial import of IPv6 options extension headers 2020-05-20 12:34:04 +02:00
Benjamin Valentin
3974a04623 gnrc/nib: add NIB event bus
Add a message bus where threads can listen for nib events.

Currently only the GNRC_IPV6_NIB_EVENT_ADDR_VALID event is
implemented which informs subscribers that an address got
valid.
2020-05-20 10:44:11 +02:00
Benjamin Valentin
85100ad61a gnrc_netif: add message bus to interface
Allow threads to listen for events on an interface.
2020-05-20 10:44:11 +02:00
benpicco
f3dddd6127
Merge pull request #14068 from miri64/sock_util/enh/netif-str2ep
sock_util: add interface descriptor parsing to str2ep
2020-05-19 23:59:32 +02:00
Leandro Lanzieri
7032984a81
Merge pull request #14101 from benpicco/ieee802154-oqpsk_high_rate
net/netopt: clarify documentation of NETOPT_OQPSK_RATE
2020-05-19 16:46:22 +02:00
Benjamin Valentin
d8efcca81e net/netopt: clarify documentation of NETOPT_OQPSK_RATE
802.15.4 only specifies one rate of 250 kbit/s for O-QPSK.
Everything else is a proprietary extension.
2020-05-19 16:39:15 +02:00
Leandro Lanzieri
16113afb1e
Merge pull request #14026 from miri64/gnrc_netif/fix/deps
gnrc_netif: use gnrc_netif-submodules to pull in upper-layer struct members
2020-05-19 16:36:18 +02:00
Martine S. Lenders
5e8f8ddc4a
gnrc_netif: introduce gnrc_netif_mac pseudo-module for gnrc_mac members
This aims to reduce circular dependencies in GNRC.
2020-05-19 16:10:59 +02:00
Martine S. Lenders
a48629b395
gnrc_netif: introduce gnrc_netif_ipv6 pseudo-module for IPv6 members
This aims to reduce circular dependencies in GNRC.
2020-05-19 16:10:59 +02:00
Martine S. Lenders
9801a439fc
gnrc_netif: introduce gnrc_netif_6lo pseudo-module for 6LoWPAN members
This aims to reduce circular dependencies in GNRC.
2020-05-19 16:10:59 +02:00
Martine S. Lenders
0d2f0a5ba4
gnrc_netif: fix gnrc_netif_lorawan dependencies 2020-05-19 16:10:58 +02:00
Martine S. Lenders
a603504a6e
sock_util: add interface descriptor parsing to str2ep 2020-05-19 14:57:41 +02:00
bf35edf3c6
Merge pull request #14036 from jue89/fix/xtimer_on_ztimer
ztimer: pull in xtimer_on_ztimer only if ztimer_periph_timer is used
2020-05-19 12:26:12 +02:00
Hendrik van Essen
86f60357cf sys/shell: refactor tokenizer code
The tokenizer (the code that breaks up the line given to the shell into
strings to create argv) was quite a messy piece of code. This commit
refactors it into a more traditional state-machine based parser.

This fixes the issues with quote handling exposed by the recently
introduced test.

Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
2020-05-18 14:31:46 +02:00
Aiman Ismail
7f883f4098 sock_dtls: add timeout to sock_dtls_send() 2020-05-18 09:45:14 +02:00
Michel Rottleuthner
740bb4e32e sys/net/gnrc/sock: release pktsnip when message queue is full 2020-05-15 18:24:42 +02:00
Ken Bannister
f81dda2174
Merge pull request #14059 from miri64/gnrc_sock/fix/re-recv-signal
gnrc_sock: re-issue MSG_RECV event if there are still received messages after `*_recv()` was called.
2020-05-15 11:38:32 -04:00
608207c4fa
Merge pull request #13859 from disconnect3d/patch-1
shell_commands/rtc: Fix off by one when checking for clearalarm command
2020-05-14 21:20:06 +02:00
Marian Buschsieweke
74ada3e0d8
sys/ztimer: Fixed typo in doc 2020-05-14 20:28:18 +02:00
Leandro Lanzieri
4b3bfd3c83
gnrc/rpl: Expose configurations to Kconfig 2020-05-14 15:57:02 +02:00
Leandro Lanzieri
8ce77f2045
gnrc/rpl: Move GNRC_RPL_MSG_QUEUE_SIZE to 'CONFIG_' namespace 2020-05-14 15:57:02 +02:00
Leandro Lanzieri
2c04f54d28
gnrc/rpl: Move GNRC_RPL_DEFAULT_NETIF to 'CONFIG_' namespace 2020-05-14 15:57:01 +02:00
Leandro Lanzieri
d075b4dfe9
gnrc/rpl: Move GNRC_RPL_PARENT_TIMEOUT_DIS_RETRIES to 'CONFIG_' 2020-05-14 15:57:01 +02:00
Leandro Lanzieri
e547061d19
gnrc/rpl: Move GNRC_RPL_DEFAULT_INSTANCE to 'CONFIG_' namespace 2020-05-14 15:57:01 +02:00
Leandro Lanzieri
5a28e7cad4
gnrc/rpl: Move GNRC_RPL_DEFAULT_MAX_RANK_INCREASE to 'CONFIG_' 2020-05-14 15:57:00 +02:00
Leandro Lanzieri
1b6f915e0c
gnrc/rpl: Move GNRC_RPL_DEFAULT_MIN_HOP_RANK_INCREASE to 'CONFIG_' 2020-05-14 15:57:00 +02:00
Leandro Lanzieri
cd50686eb6
gnrc/rpl: Move GNRC_RPL_WITHOUT_VALIDATION to 'CONFIG_' namespace
Also check its value using IS_ACTIVE when possible.
2020-05-14 15:57:00 +02:00
Leandro Lanzieri
02b10105c1
gnrc/rpl: Move GNRC_RPL_DODAG_CONF_OPTIONAL_ON_JOIN to 'CONFIG_' 2020-05-14 15:56:59 +02:00
Leandro Lanzieri
dfa722c519
gnrc/rpl: Move GNRC_RPL_WITHOUT_PIO to 'CONFIG_' namespace
Also evaluate its value using IS_ACTIVE when possible.
2020-05-14 15:56:59 +02:00
Leandro Lanzieri
88edfbad2c
gnrc/rpl: Add independent flags to set mode of operation 2020-05-14 15:56:58 +02:00
Leandro Lanzieri
908309f714
gnrc/rpl: Move GNRC_RPL_CLEANUP_TIME to 'CONFIG_' namespace 2020-05-14 15:56:58 +02:00
Leandro Lanzieri
33189b869e
gnrc/rpl: Move GNRC_RPL_DAO_DELAY_JITTER to 'CONFIG_' namespace 2020-05-14 15:56:58 +02:00
Leandro Lanzieri
3deab70a4c
gnrc/rpl: Move GNRC_RPL_DAO_DELAY_DEFAULT to 'CONFIG_' namespace 2020-05-14 15:56:57 +02:00
Leandro Lanzieri
c8fb88d2f0
gnrc/rpl: Move GNRC_RPL_DAO_DELAY_LONG to 'CONFIG_' namespace 2020-05-14 15:56:57 +02:00
Leandro Lanzieri
c162631aa3
gnrc/rpl: Move GNRC_RPL_DAO_ACK_DELAY to 'CONFIG_' 2020-05-14 15:56:57 +02:00
Leandro Lanzieri
df29a769ba
gnrc/rpl: Move GNRC_RPL_DAO_SEND_RETRIES to 'CONFIG_' namespace 2020-05-14 15:56:56 +02:00
Leandro Lanzieri
51939c3608
gnrc/rpl: Move GNRC_RPL_LIFETIME_UNIT to 'CONFIG_' namespace 2020-05-14 15:56:56 +02:00
Leandro Lanzieri
3b06b41fa9
gnrc/rpl: Move GNRC_RPL_DEFAULT_LIFETIME to 'CONFIG_' namespace 2020-05-14 15:56:56 +02:00
Leandro Lanzieri
c61b6bca38
gnrc/rpl: Move GNRC_RPL_DEFAULT_DIO_REDUNDANCY_CONSTANT to 'CONFIG_' 2020-05-14 15:56:55 +02:00
Leandro Lanzieri
f353ca8225
gnrc/rpl: Move GNRC_RPL_DEFAULT_DIO_INTERVAL_MIN to 'CONFIG_' namespace 2020-05-14 15:56:55 +02:00
Leandro Lanzieri
7216c21dbc
gnrc/rpl: Move GNRC_RPL_DEFAULT_DIO_INTERVAL_DOUBLINGS to 'CONFIG_' 2020-05-14 15:56:52 +02:00
Francisco
1f9d299492
Merge pull request #13196 from HendrikVE/shell-readline-refactor
sys/shell: refactor readline function
2020-05-14 15:32:45 +02:00
c1049bbd7a
Merge pull request #14072 from Meumeu/fix_ztimer_cpp
sys/ztimer: fix extern "C" guard
2020-05-13 22:20:06 +02:00
Guillaume Meunier
4967b141fa sys/ztimer: fix extern "C" guard at the end of ztimer.h and ztimer/config.h 2020-05-13 21:31:17 +02:00
benpicco
88e4c0ffef
Merge pull request #14016 from benpicco/luid_get_be
sys/luid: provide luid_get_lb(), fix documentation
2020-05-13 21:14:31 +02:00
Benjamin Valentin
e195e0269c sys/luid: provide luid_get_lb(), fix documentation
This does two things:

The documentation of `luid_get()` is wrong, or at least confusing.

It talks about

> an 8-bit incrementing counter value into the most significant byte

while the implementation does

    ((uint8_t *)buf)[0] ^= lastused++;	// 0 is LSB!

Now it could be argued that the intention was that the ID is supposed
to be used in Big Endian contexts and that was an omission, however
to keep everyone's sanity, let's keep it simple and just state that this
actually changes the LSB.

Also add a `luid_get_lb()` function that does the same, but modifies the
most significant byte - or the last byte if looking at the index.

This can then be used directly by e.g. #13743
2020-05-13 20:47:53 +02:00
Martine Lenders
b031337e29
Merge pull request #14066 from jue89/fix/fmt_hex_bytes_null
sys/fmt: add fmt_hex_bytes size probing
2020-05-12 18:29:52 +02:00
Juergen Fitschen
aeb1230266 sys/fmt: add fmt_hex_bytes size probing 2020-05-12 17:39:25 +02:00
Martine Lenders
a6fe69b0e8
Merge pull request #13740 from miri64/gnrc_ipv6_nib/fix/abr-add-pio-iface
gnrc_ipv6_nib: only add prefix of same interface to ABR
2020-05-12 15:43:45 +02:00
Martine S. Lenders
d66583b542
gnrc_sock: re-issue MSG_RECV event if there are still received messages
... after `*_recv()` was called.

This prevents a client from needing to call `*_recv()` in a loop.
2020-05-12 14:01:56 +02:00
Martine Lenders
fcd36f7b77
Merge pull request #13975 from kaspar030/uncrustify_ztimer
sys/ztimer: uncrustify
2020-05-12 13:14:05 +02:00
Martine Lenders
4e6df34576
gnrc_ipv6_nib: only add prefix of same interface to ABR
It doesn't make sense for an Authoritative Border Router to manage a
prefix that does not belong to the border router's downstream
interface.
2020-05-12 13:06:20 +02:00
Disconnect3d
d91c19b727 shell/commands: fixed off by one when checking for clearalarm command 2020-05-12 12:39:25 +02:00
6ac3e12661
Merge pull request #14053 from PeterKietzmann/pr_random_sha1prng_optimize
sys/random: optimize sha1prng
2020-05-12 12:02:54 +02:00
ba9afe98c3 sys/ztimer: uncrustify 2020-05-11 16:43:50 +02:00
José Alamos
089e0a2b44
Merge pull request #14048 from jue89/fix/gnrc_lorawan_abp
net/gnrc/netif/lorawan: fix ABP device activation
2020-05-11 11:34:59 +02:00
PeterKietzmann
eb62ac6ff1 sys/random/sha1prng: make random_init use init_by_array 2020-05-11 10:38:44 +02:00
PeterKietzmann
54d6b0d096 sys/random/sha1prng: remove redundant sha1 update in state transistion 2020-05-11 10:37:24 +02:00
PeterKietzmann
3f626e39ab sys/random/sha1prng: rename seed size to state size 2020-05-11 10:35:58 +02:00
Juergen Fitschen
1eb3b596c4 net/gnrc/netif/lorawan: fixed ABP device activation 2020-05-09 20:16:29 +02:00
Juergen Fitschen
255c76ff35 net/gnrc/netif/lorawan: fixed deprecated NETOPT_LINK_CONNECTED 2020-05-09 20:11:16 +02:00
Leandro Lanzieri
2d1d13d452
Merge pull request #14028 from miri64/gnrc_pktdump/fix/opt-deps
gnrc_pktdump: fix dependencies
2020-05-08 08:53:31 +02:00
398959ccaf
Merge pull request #13990 from fjmolinas/pr_ztimer_base
sys/ztimer: expose ZTIMER_MSEC/USEC_BASE
2020-05-07 13:35:39 +02:00
Ken Bannister
10a479c1c5
Merge pull request #13935 from cgundogan/pr/nanocoap/proxy_uri_parsing
nanocoap: add coap_get_proxy_uri()
2020-05-07 06:14:19 -04:00
Juergen Fitschen
bb0f7e5014 ztimer: pull in xtimer_on_ztimer only if ztimer_usec is used 2020-05-06 20:18:13 +02:00
Martine Lenders
18bd56d2d9
Merge pull request #13979 from benpicco/net/gnrc/netif/6lo-frag_size
gnrc/netif: 6lo: use 16 bit for max_frag_size
2020-05-06 12:43:02 +02:00
Francisco Molina
95e2221003
sys/ztimer/auto_init: use default configuration header 2020-05-06 11:27:10 +02:00
Francisco Molina
bc16809d9c
sys/include/ztimer: add configuration header 2020-05-06 11:27:10 +02:00
Francisco Molina
a1f3a8d668
sys/ztimer: expose ZTIMER_MSEC/USEC_BASE
ztimer_clock are meant to be chained. At the end of the chaine
there is always a timer device object (periph_rtt/rtc/timer).

Since ZTIMER_MSEC and ZTIMER_USEC can be the scaled/shifted with
respect to the base periph_rtt/rtc/timer it makes sense to chain
other ZTIMER_XXX on top of the base rtc/timer/rtt in order to avoid
chained convertions.
2020-05-06 11:22:40 +02:00
8ffd34ddd0
Merge pull request #12776 from maribu/test_event_wait_timeout
tests/event_wait_timeout: Fix for 8bit platforms
2020-05-05 21:33:06 +02:00
Martine S. Lenders
a349748354
gnrc_pktdump: reorder switch-cases in accordance with enum order 2020-05-05 21:05:00 +02:00
Martine S. Lenders
d43384d238
gnrc_pktdump: remove some duplicate calls to od_hex_dump()
`od_hex_dump()` is called if `hdr_len < pkt->size` to print the rest
after `hdr_len` of `pkt`. So if we just leave `hdr_len = 0` instead of
calling `od_hex_dump()` for every other NETTYPE, we achieve the same
effect.

As it is more effective (and already done in some cases) to re-set
`hdr_len` when the header was printed, we initialize `hdr_len` first
with 0 now.
2020-05-05 21:05:00 +02:00
Martine S. Lenders
5414164119
gnrc_pktdump: use gnrc_nettype_% module where appropriate 2020-05-05 21:05:00 +02:00
Leandro Lanzieri
34689a290c
Merge pull request #13994 from miri64/gnrc_nettype/enh/use-pseudomodules
gnrc_nettype: indirect NETTYPE definition via pseudo-modules
2020-05-05 20:59:44 +02:00
Martine S. Lenders
ae05e84a9b
gnrc_nettype: fix line-length for all to be <100 2020-05-05 19:16:06 +02:00
Martine S. Lenders
1c251beb03
gnrc_nettype: indirect NETTYPE definition via pseudo-modules
Instead of making a NETTYPE definition dependent on an implementation
module, this change makes it dependent on a pseudo-module for each
specific NETTYPE and makes the respective implementation modules
dependent on it.

This has two advantages:

- one does not need include the whole implementation module to
  subscribe to a NETTYPE for testing or to provide an alternative
  implementation
- A lot of circular dependencies related to GNRC could be untangled.
  E.g. the only reason `gnrc_icmpv6` needs the `gnrc_ipv6` is because it
  uses `GNRC_NETTYPE_IPV6` to search for the IPv6 header in an ICMPv6
  when demultiplexing an ICMPv6 header.

This change does not resolve these dependencies or include usages where
needed. The only dependency change is the addition of the
pseudo-modules to the implementation modules.
2020-05-05 19:16:06 +02:00
benpicco
775b43fbd4
Merge pull request #13967 from fjmolinas/pr_ztimer_rtt_auto_init
sys/ztimer/auto_init: fix rtt auto_init
2020-05-05 14:34:48 +02:00
benpicco
96eadc00ad
Merge pull request #13987 from fjmolinas/pr_ztimer_xtimer_include_board.h
sys/include/xtimer.h: include board.h with ztimer
2020-05-05 14:21:43 +02:00
Leandro Lanzieri
8c88e4710a
Merge pull request #14020 from miri64/gnrc_netif/fix/doc-define
gnrc_netif: doxygen does not process IS_ACTIVE()
2020-05-05 13:38:31 +02:00
Francisco Molina
98a4e1bcf2
sys/include/xtimer.h: fix endif 2020-05-05 12:16:22 +02:00
MichelRottleuthner
50c7b1be8b
Merge pull request #11977 from JulianHolzwarth/pr/xtimer_rmutex_lock_timeout
xtimer/xtimer.c: xtimer_rmutex_lock_timeout
2020-05-05 11:54:03 +02:00
Martine S. Lenders
d141d0b13d
gnrc_netif: doxygen does not process IS_ACTIVE() 2020-05-05 10:17:30 +02:00
JulianHolzwarth
6c8b1f10b5 sys/include/c11_atomics_compat.hpp: fix for esp32
Fixes a problem with redefining ATOMIC_VAR_INIT for esp32
2020-05-04 17:56:09 +02:00
JulianHolzwarth
8ef9f0fc6e sys/include/vfs.h: use c11_atomics_compat.hpp header wrapper
to solve a problem with c and c++ atomic
2020-05-04 17:56:09 +02:00
JulianHolzwarth
67e83c1e3e sys/include/xtimer.h: new function xtimer_rmutex_lock_timeout() 2020-05-04 17:46:31 +02:00
JulianHolzwarth
6d6b93afdc sys/xtimer/xtimer.c: new function xtimer_rmutex_lock_timeout()
function tries to acquire a mutex within a timeout
2020-05-04 17:46:31 +02:00
fc68d9c3a3 sys/ztimer: properly initialize intermediate extension callback 2020-05-04 17:25:27 +02:00
Ken Bannister
595e8c631f
Merge pull request #13726 from benpicco/nanocoap-payload_helper
nanocoap: add payload helper functions
2020-05-03 08:56:30 -04:00
benpicco
261ff8acb5
Merge pull request #14005 from francois-berder/fix-pm-args
sys/shell: commands: Check argc in _pm_handler
2020-05-03 14:10:26 +02:00
079df5a79b
Merge pull request #13992 from PeterKietzmann/pr_fix_minstd_sign
sys/random/minstd: fix signedness
2020-05-02 22:34:08 +02:00
Francois Berder
31cdcdd0a4 sys/shell: commands: Check argc in _pm_handler
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2020-05-02 20:55:28 +01:00
PeterKietzmann
9c5759112e sys/random/minstd: remove vague description 2020-05-01 17:30:36 +02:00
PeterKietzmann
090efc10de sys/random/minstd: fix signedness 2020-05-01 17:30:36 +02:00
benpicco
f42b4b4d2f
Merge pull request #13722 from jue89/feature/ztimer_pm-layered
sys/ztimer: add power management for ztimer clocks
2020-05-01 14:12:45 +02:00
benpicco
ee7ec7e3ac
Merge pull request #13978 from maribu/fix_pm_off
sys/pm: Fix behavior of fallback pm_off() implementation
2020-05-01 14:09:48 +02:00
Benjamin Valentin
e5c20b143d nanocoap: add coap_payload_put_char() 2020-05-01 13:58:22 +02:00
Benjamin Valentin
2751708341 nanocoap: add payload helper functions
This adds two functions `coap_payload_add()` and `coap_payload_advance()`.

 - `coap_payload_add()` will add n bytes to the payload buffer and advance
    payload pointer accordingly.

    const char hello[] = "Hello CoAP!";
    coap_payload_add(pkt, hello, sizeof(hello));

 - `coap_payload_advance()` will advance the payload buffer after data
    has been added to it.

    int len = snprintf(pkt->payload, pkt->payload_len, "%s %s!", "Hello", "CoAP");
    coap_payload_advance(pkt, len);

I considered adding an additional parameter to keep track of the total request size
(returned size from coap_opt_finish() incremented by each added payload fragment),
but decided against it to keep consistency with the existing API.
2020-05-01 13:58:22 +02:00
Francisco Molina
46a2d9b9ab
sys/include/xtimer.h: include board.h with ztimer 2020-04-30 11:46:11 +02:00
Benjamin Valentin
18651eb399 gnrc_netif: Use full L2-PDU as IPv6 MTU
If the L2-PDU is greater than IPV6_MIN_MTU, use that as the MTU instead.
2020-04-29 12:49:36 +02:00
Benjamin Valentin
4065da8838 gnrc/netif: 6lo: use 16 bit for max_frag_size
Using 8 bit for `max_frag_size` limits that value to 255.
802.15.4g specifies a PDU of 2047 bytes which exceeds that limit.

Using a 16 bit value here allows to use the full L2 PDU.

Before:

    12:02:16,300 # ping6 fe80::2068:3123:59f5:d238%8 -s 400
    12:02:16,302 # sending 244 bytes
    12:02:16,387 # sending 218 bytes
    12:02:16,624 # 408 bytes from fe80::2068:3123:59f5:d238%8: icmp_seq=0 ttl=64 rssi=-49 dBm time=316.307 ms
    12:02:17,302 # sending 244 bytes
    12:02:17,387 # sending 218 bytes
    12:02:17,624 # 408 bytes from fe80::2068:3123:59f5:d238%8: icmp_seq=1 ttl=64 rssi=-49 dBm time=316.307 ms
    12:02:18,302 # sending 244 bytes
    12:02:18,387 # sending 218 bytes
    12:02:18,624 # 408 bytes from fe80::2068:3123:59f5:d238%8: icmp_seq=2 ttl=64 rssi=-50 dBm time=316.306 ms
    12:02:18,625 #
    12:02:18,629 # --- fe80::2068:3123:59f5:d238 PING statistics ---

With this patch:

    12:09:44,276 #  ping6 fe80::2068:3123:59f5:d238%8 -s 400
    12:09:44,278 # sending 432 bytes
    12:09:44,574 # 408 bytes from fe80::2068:3123:59f5:d238%8: icmp_seq=0 ttl=64 rssi=-52 dBm time=289.888 ms
    12:09:45,279 # sending 432 bytes
    12:09:45,574 # 408 bytes from fe80::2068:3123:59f5:d238%8: icmp_seq=1 ttl=64 rssi=-52 dBm time=289.885 ms
    12:09:46,069 # sending 43 bytes
    12:09:46,279 # sending 432 bytes
    12:09:46,499 # sending 43 bytes
    12:09:46,574 # 408 bytes from fe80::2068:3123:59f5:d238%8: icmp_seq=2 ttl=64 rssi=-47 dBm time=289.886 ms
    12:09:46,574 #
    12:09:46,578 # --- fe80::2068:3123:59f5:d238 PING statistics ---
2020-04-29 12:49:36 +02:00
Francisco
80b300289d
Merge pull request #13912 from benpicco/at86rf215-mr-qpsk
drivers/at86rf215: implement MR-O-QPSK
2020-04-29 12:44:00 +02:00
Marian Buschsieweke
a3e7abc2e2
sys/pm: Fix behavior of fallback pm_off() implementation
- pm_off() should prevent other threads from getting executed after it is
  called, as it should turn off the MCU completely according to its doc
    - Previously, the fallback implementation would still allow other threads
      to continue working
    - Simply disabling IRQs and never enabling them again should make sure
      the MCU behaves like it would be completely off
- pm_off() should reduce the power consumption as much as possible
    - Previously, when IRQs came after the call to pm_set_lowest() in the
      fallback implementation of pm_off(), `while(1) {}` got executed at full
      power consumption
    - Just calling `pm_set(0);` in a loop while make sure that lowest power mode
      is restored if the MCU wakes up again.
    - The check if the lowest power mode is available is skipped, as no code
      gets executed afterwards anyway
2020-04-29 12:08:12 +02:00
Marian Buschsieweke
f6873dbac3
sys/pm: Add pm_get_blocker()
Provide access to pm_blocker via a well-defined API rather than hacks.
2020-04-29 11:21:03 +02:00
Juergen Fitschen
73e22612e2 sys/ztimer: add power management for ztimer clocks 2020-04-29 10:55:10 +02:00
Benjamin Valentin
6ce0092982 shell/sc_gnrc_netif: fix vera++ errors 2020-04-29 10:41:37 +02:00
Benjamin Valentin
504d02038d gnrc_netif: update PDU after changing PHY mode 2020-04-29 10:41:37 +02:00
Benjamin Valentin
c77119957f shell/sc_gnrc_netif: fix space after NID
All option have a space behind them. This fixes the formatting of the
NID parameter if there are options after it.
2020-04-29 10:41:37 +02:00
Benjamin Valentin
fac35644d0 ieee802154: add definitions & config options for MR-O-QPSK
Define options for IEEE 802.15.4g MR-O-QPSK as well as shell commands
to set them via ifconfig.
2020-04-29 10:41:37 +02:00
Thomas Stilwell
325ab426d4
sys/shell/commands: pm: add set mode block mode unblock mode 2020-04-28 16:56:34 +02:00
Thomas Stilwell
7c82ac6838
sys/shell/commands: add pm show command to view current blockers 2020-04-28 16:51:23 +02:00
Martine Lenders
633d0f486d
Merge pull request #13669 from bergzand/pr/netif/async_events
gnrc_netif: Add support for internal event loop
2020-04-28 13:03:39 +02:00
943450a567
Merge pull request #13959 from leandrolanzieri/pr/nanocoap/kconfig/add_type
nanocoap/kconfig: Explicitly define type of MODULE_NANOCOAP
2020-04-28 12:48:47 +02:00
Francisco Molina
da7e14dc66
sys/ztimer/auto_init: fix rtt auto_init 2020-04-28 09:11:44 +02:00
Leandro Lanzieri
b91c8502dc
net/nanocoap/kconfig: Explicitly define type of MODULE_NANOCOAP 2020-04-27 10:06:01 +02:00
Martine S. Lenders
cb8a6c36b0
gnrc_ipv6_nib: 6ln: use interface-specific DR for address registration
With multiple 6LoWPAN interfaces the router for the given interface
—the one the triggering RA came over—should be used to register the
address with.

Co-Authored-By: Benjamin Valentin <benpicco@googlemail.com>
2020-04-25 01:20:55 +02:00
Martine S. Lenders
245c04f368
gnrc_ipv6_nib: internal: add capability to search DR by interface
Co-Authored-By: Benjamin Valentin <benpicco@googlemail.com>
2020-04-24 17:57:09 +02:00
Leandro Lanzieri
eeea9b7dae
net/coap: Expose configurations to Kconfig 2020-04-24 10:06:45 +02:00
Leandro Lanzieri
9e427e1584
net/coap: Move COAP_MAX_RETRANSMIT to 'CONFIG' namespace
COAP_MAX_RETRANSMIT is moved to the compile time configuration macro
namespace.
2020-04-24 10:06:43 +02:00
Leandro Lanzieri
afe4244ac9
net/coap: Move COAP_RANDOM_FACTOR_1000 to 'CONFIG' namespace
COAP_RANDOM_FACTOR_1000 is moved to the compile time configuration macro
namespace.
2020-04-24 10:06:43 +02:00
Leandro Lanzieri
072a0d8563
net/coap: Move COAP_ACK_TIMEOUT to 'CONFIG' namespace
COAP_ACK_TIMEOUT is moved to the compile time configuration macro
namespace.
2020-04-24 10:06:40 +02:00
Cenk Gündoğan
4e05a66ca2 nanocoap: add proxy_uri parsing 2020-04-23 22:41:12 +02:00
Marian Buschsieweke
7b67e74bed
sys/net/gnrc: Use %lu to print times 2020-04-23 21:16:57 +02:00
Marian Buschsieweke
654b558343
sys/timex: Fix integer width issue
The macros US_PER_MS and friends are assumed to be 32 bit unsigned integers
by users. However, e.g. on AVR a `1000U` is only 16 bit long. Thus, e.g.
`xtimer_usleep(100 * US_PER_MS)` will wrap around and only sleep for ~34ms.

This commit declares them as unsigned long, which is on all currently supported
platforms 32 bit wide.
2020-04-23 21:16:04 +02:00
5e5ed8233d
Merge pull request #13922 from kaspar030/ztimer_rtt_maxval_fix
ztimer: periph_rtt: ensure RTT_MAX_VALUE is honored
2020-04-23 18:42:00 +02:00
d8c129fc47 ztimer: periph_rtt: ensure RTT_MAX_VALUE is honored
Previously, ztimer would happily set an absolute RTT alarm value that exceeds
RTT's maximum value (though not a longer interval), as the `val` was
simply added to `rtt_get_counter()`.
This commit ensures that the target value wraps around RTT_MAX_VALUE.

Fixes #13920.
2020-04-23 16:19:25 +02:00
Cenk Gündoğan
ea616abfda nanocoap: allow coap_opt_add_string() for zero-terminated strings 2020-04-22 12:28:48 +02:00
Leandro Lanzieri
46507ff247
Merge pull request #13894 from kb2ma/gcoap/ping
net/gcoap: add CoAP ping request
2020-04-21 12:23:54 +02:00
5293e5400c
Merge pull request #13210 from kaspar030/add_xtimer_left
sys/xtimer: remove uses of xtimer internal struct members
2020-04-21 12:15:41 +02:00
0228553384 sys/shell: rpl: make use of xtimer_left_usec() 2020-04-21 11:26:56 +02:00
df520a70a7 sys/evtimer: make use of xtimer_left_usec() 2020-04-21 11:26:56 +02:00
c9c8c98a4b sys/xtimer: introduce xtimer_left_usec() 2020-04-21 11:26:56 +02:00
40cb065a45
Merge pull request #13839 from leandrolanzieri/pr/kconfig_migrate/sys/usbus_ecm
usbus/cdc/ecm: Expose configurations to Kconfig
2020-04-21 10:12:30 +02:00
Ken Bannister
cac350901f
Merge pull request #13893 from cgundogan/pr/nanocoap-get-opt-uint
nanocoap: export coap_opt_get_uint()
2020-04-18 10:00:27 -04:00
Martine Lenders
55a7010a0a
Merge pull request #13157 from nmeum/pr/fuzzing_tcp_only
Add AFL-based fuzzing setup for network modules
2020-04-18 10:54:14 +02:00
Cenk Gündoğan
6859de7855 nanocoap: export coap_opt_get_uint() 2020-04-17 22:39:44 +02:00
Sören Tempel
ac9c1f4a69 gnrc_tcp: disable checksum checks during fuzzing 2020-04-17 17:11:15 +02:00
Martine Lenders
652276f00f
gnrc_netif: provide PID-based version for netif ID 2020-04-17 16:59:21 +02:00
Martine S. Lenders
b8294f1ba0
netif: add functions to get and get by identifier 2020-04-17 16:59:21 +02:00
Ken Bannister
6eae4ded84 net/gcoap: create CoAP ping request 2020-04-17 08:15:20 -04:00
Ken Bannister
f5a85e2aff net/gcoap: handle CoAP ping request 2020-04-17 08:15:20 -04:00
Ken Bannister
2d3eb1a343 net/nanocoap: validate empty message length 2020-04-17 08:15:20 -04:00
Joakim Nohlgård
2013ac75f5
gnrc_netif: Add support for internal event loop
Enabled by the gnrc_netif_events pseudo module. Using an internal event
loop within the gnrc_netif thread eliminates the risk of lost interrupts
and lets ISR events always be handled before any send/receive requests
from other threads are processed.
The events in the event loop is also a potential hook for MAC layers and
other link layer modules which may need to inject and process events
before any external IPC messages are handled.

Co-Authored-By: Koen Zandberg <koen@bergzand.net>
2020-04-17 12:02:39 +02:00
Benjamin Valentin
795cd165fd ieee802154: add definitions for 802.15.4 PHY modes
This adds PHY modes for IEEE 802.15.4-2003 and IEEE 802.15.4g-2012.
2020-04-15 21:41:19 +02:00
Francisco Molina
2331448644
Makefile: remove usage of SUBMODULES_NOFORCE
With #10970 only existing *.c files will be added to SRC when using
the SUBMODULES mechanism, so SUBMODULES_NOFORCE (used to filter out
non existing source files) is now redundant so remove the usage.
2020-04-15 12:11:44 +02:00
benpicco
e499290f19
Merge pull request #13863 from yogo1212/rtc_iff
tm.h: fix typo
2020-04-14 23:02:25 +02:00
Hendrik van Essen
a0a3e6c3a1 sys/shell: refactor readline function
This makes the code of `readline()` clearer and shorter. It also fixes a
minor artifact of the long line handling.

Previously it was not possible to recover from a long line. That is, if too
many characters were sent, the line would be invalidated and pressing backspace
would not fix it- the only option was to discard the line. It is now possible
to bring the line back to size. Note that visual effects when deleting characters
will still depend on the host's terminal.

The new code is written in a way that all writes to memory are guarded by
bounds check, so an assertion was removed.

Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
2020-04-14 15:38:56 +02:00
Hendrik van Essen
45f898563a sys/shell: remove ifdefs in the middle of code
ifdefs in the middle of code reduce the readability
and debugability and should be avoided.

Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
2020-04-14 15:38:54 +02:00
Hendrik van Essen
268d1b2305 sys/shell: remove useless "inline prevention"
There was some code added to "prevent putchar from being inlined", which
supposedly enlarged the code size.

Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
2020-04-14 14:34:58 +02:00
Leandro Lanzieri
b4655f6c91
Merge pull request #13848 from fjmolinas/pr_ccm_no_plaintext
sys/crypto/modes/ccm: handle input_len = 0
2020-04-14 10:49:54 +02:00
Martine S. Lenders
085c62ecdc
xtimer_core: piggy-back style fixes 2020-04-10 12:42:32 +02:00
Francisco Molina
8372286591
sys/crypto/modes/ccm: accept input_len=0
CCM may be used on messages with no plaintext data.
2020-04-10 10:41:01 +02:00
Martine S. Lenders
212fe15786
xtimer: set now pointer correctly in _update_short_timers() loop
This fixes `xtimer` to use `xtimer_now64()` instead of `xtimer_now()`
for updating the `*now` variable during the iteration in
`_update_short_timers()` function. The same function is used to
initialize `*now` in `_timer_callback()` below.

While using `xtimer_now()` in this iteration step does not hinder the
proper execution of all timers in the short term timers (for those the
`xtimer` module only looks at the `start_time` member, not the
`long_start_time` member) at least for the current long term time window
(I did not test higher cases), it sets the `long_start_time` member to 0
for all timers following in the list of timers after this iteration
step. However, external modules that rely on this to be correct,
e.g. evtimer [1], fail their calculations when trying to compare to
the current value to `xtimer_now64()`.

[1] https://github.com/RIOT-OS/RIOT/blob/11f3d68/sys/evtimer/evtimer.c#L118-L121

Co-Authored-By: Cenk Gündoğan <mail+dev@gundogan.net>
2020-04-10 00:02:33 +02:00
Leandro Lanzieri
a06d9bbb66
Merge pull request #13315 from jia200x/pr/kconfig/ieee802154
ieee802154: Expose configurations to Kconfig
2020-04-08 19:34:55 +02:00
Jose Alamos
77325b4cde ieee802154: add CONFIG_ prefix to config macros 2020-04-08 19:08:25 +02:00
Jose Alamos
d33e44a85c ieee802154: Expose configurations to Kconfig 2020-04-08 18:28:23 +02:00
Leandro Lanzieri
dddeb54e7d
usbus/cdc/ecm: Expose configurations to Kconfig 2020-04-08 16:31:46 +02:00
Leandro Lanzieri
8b857844fc
usbus/cdc/ecm: Move USBUS_CDC_ECM_CONFIG_SPEED to 'CONFIG_' 2020-04-08 16:30:58 +02:00
Leandro Lanzieri
335b0ceb50
usbus/cdc/ecm: Move USBUS_CDC_ECM_CONFIG_SPEED_UPSTREAM to 'CONFIG_' 2020-04-08 16:27:04 +02:00
Leandro Lanzieri
88e50658f3
usbus/cdc/ecm: Move USBUS_CDC_ECM_CONFIG_SPEED_DOWNSTREAM to 'CONFIG_' 2020-04-08 16:24:59 +02:00
14706d7423
Merge pull request #13243 from leandrolanzieri/pr/kconfig_migrate/net/nanocoap
net/nanocoap: Expose configurations to Kconfig
2020-04-08 10:51:54 +02:00
Martine Lenders
475048ab2f
Merge pull request #13833 from benpicco/dist/tools/sliptty-fix
gnrc_dhcpv6_client: fix for SLIP link-layer
2020-04-08 10:05:02 +02:00
Benjamin Valentin
f198d689be gnrc_dhcpv6_client: fix for SLIP link-layer
In a point-to-point serial connection, we don't have L2 addresses.
Set the link type & packet length accordingly and we will get a
prefix from KEA.
2020-04-07 22:08:57 +02:00
Ken Bannister
1ff78879ff net/nanocoap: remove obsolete functions to add Uri-Query option 2020-04-07 12:17:41 -04:00
Sören Tempel
65c7bbf76d gnrc_sock: Implement termination condition for fuzzing
The termination condition implemented in gnrc_pktbuf_malloc does not
work when using the sock interface as sock copies packet data to a local
buffer and frees the packet afterwards. As such, the fuzzing application
would exit before performing any input processing.

For this reason, the termination condition in gnrc_pktbuf_malloc is
disabled when using sock. Instead, the application terminates if
gnrc_sock_recv previously returned the fuzzing packet. The underlying
assumption of this implementation is that gnrc_sock_recv is called in a
loop.
2020-04-07 17:48:39 +02:00
Sören Tempel
e0570181e4 gnrc_pktbuf_malloc: Terminate when fuzzing packet is freed
Since RIOT is an operating system the native binary will never terminate
[0]. The termination condition for fuzzing GNRC is that the packet was
handled by the network stack and therefore freed. If it is never freed
we will deadlock meaning a memory leak was found, afl should be able to
detect this through timeouts.

This is currently only supported for gnrc_pktbuf_malloc since this is
the pktbuf implementation I used for fuzzing. Implementing this in
pktbuf.h is not possible.

[0]: Except NATIVE_AUTO_EXIT is defined, however, even with that define
set RIOT will only terminate when all threads terminated. Unfortunately,
gnrc_udp and other network threads will never terminate.
2020-04-07 17:48:39 +02:00
Sören Tempel
9e72f717e0 sys/fuzzing: Initialize
This adds a utility module which is used to write applications for
fuzzing RIOT network modules. The module provides a dummy network
interface which is configured with a static IPv6 addresses for modules
which perform operations on the underlying network interface. Besides,
it contains a utility function for transforming data received on
standard input into a `gnrc_pktsnip_t`.
2020-04-07 17:48:39 +02:00
Leandro Lanzieri
0137a06896
net/nanocoap: Expose configurations to Kconfig 2020-04-07 17:00:55 +02:00
Leandro Lanzieri
e80dcf2d8b
net/application_layer: Add Kconfig file and CoAP menu 2020-04-07 17:00:54 +02:00
Leandro Lanzieri
b6be8af81c
net/nanocoap: Move NANOCOAP_QS_MAX to 'CONFIG_' namespace 2020-04-07 17:00:53 +02:00
Leandro Lanzieri
2f72189aa2
net/nanocoap: Move NANOCOAP_BLOCK_SIZE_EXP_MAX to 'CONFIG_' namespace 2020-04-07 17:00:53 +02:00
Leandro Lanzieri
4052c01e85
net/nanocoap: Move NANOCOAP_URI_MAX to 'CONFIG_' namespace 2020-04-07 17:00:53 +02:00
Leandro Lanzieri
c84576ef6e
net/nanocoap: Move NANOCOAP_NOPTS_MAX to 'CONFIG_' namespace 2020-04-07 17:00:52 +02:00
c81c8ed104
Merge pull request #13375 from leandrolanzieri/pr/kconfig_migrate/sys/usbus_cdc
usbus/cdc/acm: Expose configurations to Kconfig
2020-04-07 15:00:36 +02:00
Leandro Lanzieri
934bede70e
usbus/cdc/acm: Expose configurations to Kconfig 2020-04-07 14:34:57 +02:00
Leandro Lanzieri
51c4f119a5
usbus/cdc/acm: Move USBUS_CDC_ACM_BULK_EP_SIZE to 'CONFIG_' namespace 2020-04-07 14:34:56 +02:00
Leandro Lanzieri
cd3ac726d9
usbus/cdc/acm: Move USBUS_CDC_ACM_STDIO_BUF_SIZE to 'CONFIG_' namespace 2020-04-07 14:34:52 +02:00
Ken Bannister
b32fcd28d1
Merge pull request #13815 from kb2ma/nanocoap/add_canonical_uri_query
net/gcoap: add canonical uri query function names
2020-04-07 06:32:13 -04:00
Ken Bannister
5d95436334 net/cord: use canonical function name to add Uri-Query option 2020-04-06 06:19:44 -04:00
Ken Bannister
04d14ae104 net/gcoap: reference canonical function name to add Uri-Query option 2020-04-06 06:19:44 -04:00
Ken Bannister
d57340c964 net/nanocoap: use new Uri-Query functions as primary implementation 2020-04-06 06:19:44 -04:00
Cenk Gündoğan
abd399b934
Merge pull request #13804 from chrysn-pull-requests/uri-test-isabsolute
uri_parser: Fix and test non-relative recognition
2020-04-05 13:42:11 +02:00
Martine Lenders
5c95df3151
Merge pull request #13806 from benpicco/sys/net/dhcpv6-multiple_prefixes
sys/net/dhcpv6: fix requesting multiple prefixes
2020-04-05 01:14:27 +02:00
Ken Bannister
127f8ca407
Merge pull request #13805 from benpicco/nanocoap_path
nanocoap: add convenience function for adding path elements
2020-04-04 12:50:16 -04:00
Benjamin Valentin
c8b2483de5 net/gcoap: make use of coap_opt_add_path() 2020-04-04 17:06:04 +02:00
Benjamin Valentin
1a4a5d4a9e nanocoap: add convenience function for adding path elements
Add a convenience function to make adding additional sub-path
options easier.
2020-04-04 17:06:04 +02:00
Ken Bannister
c463c45939 net/nanocoap: add canonical function names to add Uri-Query option 2020-04-04 07:56:58 -04:00
Benjamin Valentin
0e5595cffd sys/net/dhcpv6: fix requesting multiple prefixes
There were two subtle bugs that prevented the DHCPv6 client to request
multiple prefixes for different interfaces.

 - `dhcpv6_client_req_ia_pd()` would fill up *all* leases with the same interface
 - `_parse_reply()` would return after parsing the first answer

With this patch, `gnrc_border_router` gets a prefix on both interfaces of the at86rf215.
2020-04-03 17:02:57 +02:00
chrysn
050af95666 uri_parser: Fix relative recognition
Relative refernces with colons in their names can not be told by their
first character alone.
2020-04-03 15:22:13 +02:00
Cenk Gündoğan
f1bf9693a6
Merge pull request #13803 from chrysn-pull-requests/uri-terminology-strictness
uri_parser: terminology strictness
2020-04-03 15:21:42 +02:00
Cenk Gündoğan
fca7548762
Merge pull request #13374 from leandrolanzieri/pr/kconfig_migrate/sys/usbus
sys/usbus: Expose configurations to Kconfig
2020-04-03 15:19:22 +02:00
Leandro Lanzieri
06920a1f7a
sys/usbus: Expose configurations to Kconfig 2020-04-03 14:45:27 +02:00
Leandro Lanzieri
4d47921947
sys/usbus: Move USBUS_EP0_SIZE to 'CONFIG_' namespace 2020-04-03 14:45:26 +02:00
Leandro Lanzieri
7bd5f86bdd
sys/usbus: Move USBUS_AUTO_ATTACH to 'CONFIG_' namespace
In code now 'IS_ACTIVE' is used to check for this configuration.
2020-04-03 14:45:25 +02:00
chrysn
7f67077338 uri_parser: Document that fragment identifiers are not handled 2020-04-03 14:32:55 +02:00
chrysn
6991f62338 uri_parser: Differentiate between URI and URI reference in documentation 2020-04-03 14:30:38 +02:00
Cenk Gündoğan
e3d9097974 sys/uri_parser: check for uri_end instead of 0 2020-04-02 10:04:12 +02:00
Martine Lenders
76acde0984
Merge pull request #13779 from miri64/sock/enh/sock_buf_recv-iterate-chunks
sock: amend API to iterate over stack-internal buffer chunks
2020-04-01 16:59:03 +02:00
Martine S. Lenders
d934579817
gnrc_sock: adapt for *_recv_buf() API change 2020-04-01 15:50:51 +02:00
Martine S. Lenders
58685af8a6
sock: sock_*_recv_buf: mark as experimental 2020-04-01 15:50:51 +02:00
Martine S. Lenders
f9e17ac025
sock: amend API to iterate over stack-internal chunks
With lwIP we have a chunked UDP payload, so just providing the
stack-internal buffer is not possible. To be able to iterate over such
a chunked payload, this change allows the `sock_*_recv_buf()` functions
to use the internal buffer context as an iteration state.

As the internal buffer space can be released when the function would
return 0, `sock_recv_buf_free()` becomes unnecessary.
2020-04-01 15:50:46 +02:00
Leandro Lanzieri
461f40949d
gnrc/ipv6: Group IPv6 related Kconfig files 2020-04-01 14:34:13 +02:00
Cenk Gündoğan
abc1cb17ca sys/uri_parser: initialize has_authority in _consume_scheme() 2020-04-01 12:32:40 +02:00
Martine Lenders
d9b9426a86
Merge pull request #13758 from cgundogan/uri_parser
sys/uri_parser: minimal and non-destructive URI parsing
2020-04-01 00:40:27 +02:00
Cenk Gündoğan
b9012fb5d9 uri_parser: add minimal and non-destructive URI parser 2020-03-31 23:54:40 +02:00
Peter Kietzmann
767cfc21a9
Merge pull request #13341 from Einhornhool/cryptoauth-shellhandler
sys/shell: add shell handler for CryptoAuth devices
2020-03-31 22:19:21 +02:00
Lena Boeckmann
5bc0b15114 sys/shell: add cryptoauthlib shell handler 2020-03-31 21:31:24 +02:00
Martine Lenders
32d4b7eea5
Merge pull request #13755 from benpicco/base64-urlsafe
sys/base64: Implement Base 64 Encoding with URL and Filename Safe Alphabet
2020-03-31 20:15:23 +02:00
Leandro Lanzieri
aa2ec68c9c
gnrc/nib/conf.h: Align configuration values 2020-03-31 19:02:55 +02:00
Leandro Lanzieri
4476e06814
gnrc/uhcpc: Fix lines lengths 2020-03-31 19:02:55 +02:00
Leandro Lanzieri
184bbd32e5
gnrc/netif: Fix lines lengths 2020-03-31 19:02:54 +02:00
Leandro Lanzieri
87ac1a652d
gnrc/nib: Expose configurations to Kconfig 2020-03-31 19:02:51 +02:00
Benjamin Valentin
fc89531c61 sys/base64: Implement Base 64 Encoding with URL Safe Alphabet
RFC4648 specifies an alternate alphabet for base64 encoding / decoding
where '+' and '/' are exchanged for '-' and '-' to make the resulting
string safe to use in filenames and URLs.

This adds a base64url_encode() function that uses the alternate alphabet.

The base64_decode() function is extended to accept both alphabets.
2020-03-31 19:01:05 +02:00
Leandro Lanzieri
64dde8f317
gnrc/nib: Move GNRC_IPV6_NIB_ABR_NUMOF to 'CONFIG_' namespace 2020-03-31 18:07:13 +02:00
Leandro Lanzieri
a77d0dd9c5
gnrc/nib: Move GNRC_IPV6_NIB_OFFL_NUMOF to 'CONFIG_' namespace 2020-03-31 18:07:13 +02:00
Leandro Lanzieri
f6ee712e98
gnrc/nib: Move GNRC_IPV6_NIB_DEFAULT_ROUTER_NUMOF to 'CONFIG_' namespace 2020-03-31 18:07:12 +02:00
Leandro Lanzieri
f2ed8b06c0
gnrc/nib: Move GNRC_IPV6_NIB_L2ADDR_MAX_LEN to 'CONFIG_' namespace 2020-03-31 18:07:12 +02:00
Leandro Lanzieri
acd789bd87
gnrc/nib: Move GNRC_IPV6_NIB_CONF_REACH_TIME_RESET to 'CONFIG_' 2020-03-31 18:07:11 +02:00
Leandro Lanzieri
07771de08f
gnrc/nib: Move GNRC_IPV6_NIB_NUMOF to 'CONFIG_' namespace 2020-03-31 18:07:11 +02:00
Leandro Lanzieri
1f20ffc150
gnrc/nib: Move GNRC_IPV6_NIB_CONF_NO_RTR_SOL to 'CONFIG_' namespace
Also evaluate using IS_ACTIVE macro.
2020-03-31 18:07:10 +02:00
Leandro Lanzieri
53a522d642
gnrc/nib: Move GNRC_IPV6_NIB_CONF_MULTIHOP_P6C to 'CONFIG_' namespace
Also evaluate using IS_ACTIVE macro.
2020-03-31 18:07:10 +02:00
Leandro Lanzieri
22b4df9537
gnrc/nib: Move GNRC_IPV6_NIB_CONF_MULTIHOP_DAD to 'CONFIG_' namespace
Also evaluate using IS_ACTIVE macro.
2020-03-31 18:07:09 +02:00
Leandro Lanzieri
3ec296400d
gnrc/nib: Move GNRC_IPV6_NIB_CONF_DC to 'CONFIG_' namespace
Also evaluate using IS_ACTIVE macro.
2020-03-31 18:07:09 +02:00
Leandro Lanzieri
219d5a1de2
gnrc/nib: Move GNRC_IPV6_NIB_CONF_REDIRECT to 'CONFIG_' namspace
Also evaluate using IS_ACTIVE macro.
2020-03-31 18:07:08 +02:00
Leandro Lanzieri
42fb2fe09f
gnrc/nib: Move GNRC_IPV6_NIB_CONF_ADV_ROUTER to 'CONFIG_' namespace 2020-03-31 18:07:08 +02:00
Leandro Lanzieri
bad9abd349
gnrc/nib: Move GNRC_IPV6_NIB_CONF_DNS to 'CONFIG_' namespace
Also evaluate using IS_ACTIVE macro.
2020-03-31 18:07:07 +02:00
Leandro Lanzieri
e52b93cef0
gnrc/nib: Move GNRC_IPV6_NIB_CONF_ARSM to 'CONFIG_' namespace
Also evaluate it using IS_ACTIVE macro.
2020-03-31 18:07:07 +02:00
Leandro Lanzieri
f23267b67b
gnrc/nib: Move GNRC_IPV6_NIB_CONF_QUEUE_PKT to 'CONFIG_' namespace
Also evaluate it using IS_ACTIVE macro.
2020-03-31 18:07:06 +02:00
Leandro Lanzieri
ce931f179c
gnrc/nib: Move GNRC_IPV6_NIB_CONF_SLAAC to 'CONFIG_' namespace
Also evaluate it using IS_ACTIVE macro.
2020-03-31 18:07:05 +02:00
Leandro Lanzieri
49ec28867c
gnrc/nib: Move GNRC_IPV6_NIB_CONF_ROUTER to 'CONFIG_' namespace
Also evaluate it using IS_ACTIVE macro.
2020-03-31 18:07:05 +02:00
Leandro Lanzieri
1acfe7ae19
gnrc/nib: Move GNRC_IPV6_NIB_CONF_6LN to 'CONFIG_' namespace
Also evaluate it using IS_ACTIVE macro.
2020-03-31 18:07:04 +02:00
Leandro Lanzieri
398bb6d025
gnrc/nib: Move GNRC_IPV6_NIB_CONF_6LR to 'CONFIG_' namespace
Also evaluate it using IS_ACTIVE
2020-03-31 18:07:03 +02:00
Leandro Lanzieri
40c78f1c75
gnrc/nib: Move GNRC_IPV6_NIB_CONF_6LBR to 'CONFIG_' namespace
Also evaluate it using IS_ACTIVE macro.
2020-03-31 18:07:03 +02:00
Benjamin Valentin
2867ab8b9b sys/riotboot: add a warning about the size of riotboot_flashwrite_t
On e.g. samd5x FLASHPAGE_SIZE is 8k (4k on kinetis, stm32w, nrf52)
so placing this struct on the stack will almost always cause a stack
overflow.
2020-03-31 13:27:05 +02:00
Hendrik van Essen
3860355380
sys/shell: rephrase/reformat some comments 2020-03-30 12:26:20 +02:00
Juan Carrano
2810637306
sys/shell: correctly detect and handle long lines
The numeric value for EOF is -1. This caused the shell to return
the same code when EOF was encountered and when the line lenght was
exceeded. Additionally, if the line length is exceeded, the correct
behaviour is to consume the remaining characters until the end of
the line, to prevent the following line from containing (potentially
dangerous) garbage.

Co-authored-by: Hendrik van Essen <hendrik.ve@fu-berlin.de>
2020-03-30 12:26:20 +02:00
Martine Lenders
889e8b7cf8
Merge pull request #13752 from gschorcht/sys/shell/fix_gnrc_netif
sys/shell: fix ifconfig command for NETOPT_LINK
2020-03-30 09:44:13 +02:00
Gunar Schorcht
8a1cfd99da sys/shell: fix ifconfig command for NETOPT_LINK 2020-03-30 09:01:21 +02:00
Ken Bannister
7d624def4e
Merge pull request #13637 from cgundogan/coap_proxy
gcoap: allow proxied client requests
2020-03-28 10:30:27 -04:00
Cenk Gündoğan
b1f728189c net/gcoap: add note on proxy operation 2020-03-28 14:50:51 +01:00
Cenk Gündoğan
50900a1fbe nanocoap: add convenience function for PROXY_URI 2020-03-28 14:50:51 +01:00