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

2076 Commits

Author SHA1 Message Date
Martine Lenders
8f5f4a370d gnrc_netapi: declare data for set function as const 2018-11-20 11:59:38 +01:00
Martine Lenders
633b876c92 gnrc_netapi: move author tag into file context
Otherwise, the authorship is associated with `GNRC_NETAPI_MSG_TYPE_RCV`
in the rendered doc.
2018-11-20 11:09:08 +01:00
Gaëtan Harter
c87fe94ec1
crypto/modes/ccm: update api to const input buffers
Input buffers are not modified, so can be declared const arguments.
2018-11-19 16:44:04 +01:00
Gaëtan Harter
9427371849
crypto/modes/ctr: update api to const input buffers
Input buffers are not modified, so can be declared const arguments.
This will allow using `const` inputs for `modes/ccm`.
2018-11-19 16:44:04 +01:00
Martine Lenders
0aa96a4579 gnrc_icmpv6_error: fix doc alignment 2018-11-17 15:45:25 +01:00
Martine Lenders
ef1132384a gnrc_icmpv6_error: check IPv6 header before starting to build
Check for:

 - if it exists (critical error condition -- non-IPv6 headers should
   not trigger these functions) => assert
 - if it has a multicast source (that shouldn't really happen but
   people might try weird stuff ;-)
 - if it has an unspecified source (can't determine receiver of error
   message => don't send it, don't build it)
2018-11-17 15:45:25 +01:00
Martine Lenders
04a2827089 gnrc_icmpv6_error: provide NOPs when compiled without module
This is aimed to make the usage code of this module more readable.
2018-11-16 17:39:16 +01:00
Martine Lenders
697ad17ed1 icmpv6_error: doc: provide better references to error codes 2018-11-16 17:39:16 +01:00
Martine Lenders
b99e9f4185 gnrc_icmpv6_error: append IPv6 and netif header before sending 2018-11-16 17:39:16 +01:00
Martine Lenders
0b4230e5f6 gnrc_icmpv6_error: fix and optimize pointer search in _param_prob_build 2018-11-16 17:39:16 +01:00
Martine Lenders
36617f3733 gnrc_icmpv6_error: make input pointers constant 2018-11-16 17:39:15 +01:00
Martine Lenders
3b56c78a3b gnrc_icmpv6_error: make build functions private 2018-11-16 17:22:20 +01:00
Martine Lenders
a30bdebc2c gnrc_icmpv6_error: remove static inline from functions 2018-11-16 17:22:20 +01:00
a79d03835a
Merge pull request #10417 from bergzand/pr/pkt/mark_const
gnrc/pkt: Add const keyword to length functions
2018-11-16 16:19:18 +01:00
21202e7e18
gnrc/pkt: Add const keyword to length functions 2018-11-16 15:06:39 +01:00
Juan Carrano
3393dafe82 sys/crypto: configure AES via pseudomodules.
USEMODULE += crypto_aes_precalculated enables the precalculated T tables (the old
code).
USEMODULE += crypto_aes_unroll causes loops to be unrolled.
2018-11-15 18:25:26 +01:00
Oleg Artamonov
05fe168a1e sys/crypto: optimize AES 2018-11-15 18:21:17 +01:00
Martine Lenders
f2760c033c gnrc_pktbuf: deprecate gnrc_pktbuf_duplicate_upto 2018-11-13 18:05:09 +01:00
Sebastian Meiling
1f7ec9b208
Merge pull request #10334 from maribu/saul_rssi
{drivers/saul,sys/phydat}: Added RSSI sensor and dBm unit
2018-11-12 21:01:24 +01:00
66e0d48037
Merge pull request #10159 from mtausig/crypto_documentation
crypto: fix several documentation issues
2018-11-08 12:13:59 +01:00
Mathias Tausig
4272ccf281 crypto: Fix whitespace errors 2018-11-08 11:25:50 +01:00
Mathias Tausig
41667cef66 crypto: Improve and fix comments
Update return values in documentation
Improve comments with separate @return statement for each rv
Remove incorrect return value for aes_init
Use @return instead of @returns
Fix comment lines over 80 chars
2018-11-08 11:25:50 +01:00
Mathias Tausig
3ddd17b267 crypto: Fix typos in comments 2018-11-08 11:25:14 +01:00
6c69e6f452
Merge pull request #10347 from mtausig/fixstyle
crypto: Fix code style
2018-11-08 10:58:50 +01:00
Mathias Tausig
068e263cba crypto: Fix code style 2018-11-08 10:31:42 +01:00
fa64817e61
crypto/helper: Add secure wipe function
Adds a cryptographically secure wipe function to wipe structs with
sensitive data. Works by first casting the pointer to a `volatile`
pointer to ensure that the compiler doesn't optimize the "memset" away.
2018-11-07 09:38:08 +01:00
152a9dc325
Merge pull request #10247 from miri64/ipv6_ext_rh/cleanup/central-types
ipv6_ext_rh: define type numbers at central place
2018-11-06 20:31:27 +01:00
Marian Buschsieweke
a04001d781
sys/phydat: Added unit decibel-milliwatts 2018-11-06 11:07:01 +01:00
Ken Bannister
bcd3e311a4
Merge pull request #10248 from llueder/coap/data_ptr
net/nanocoap: make data pointer c++ compliant
2018-11-05 10:10:45 +00:00
Lasse Lueder
885544b4b0 net/nanocoap: remove convenience ptr in coap_hdr_t
Empty array uint8_t data[] is not allowed in ISO-C++. Replacement: function coap_hdr_data_ptr, which handles
the pointer arithmetic to point where hdr.data pointed
2018-11-02 16:34:57 +01:00
Lasse Lueder
2ddd8ce1a9 net/nanocoap: define coap_data_ptr 2018-11-02 16:33:29 +01:00
Josarn
672368954e xtimer: timer & target overflow, hang resolved.
1. When the 32 bit target of the xtimer overflowed the timer was not placed in the right list.
2. When the hardware timer overflowed the comparison was wrong for setting next target.

3. Backoff condition
2018-11-01 16:48:20 +01:00
Lucas Jenß
6ed11de354
Merge pull request #10105 from x3ro/fix-shell-prompt-infinite-loop
Do not try to continue reading shell commands if input source is closed
2018-10-30 19:24:01 +01:00
Lucas Jenss
62cecc9496 Do not try to continue reading shell commands if input source is closed
In RIOT native, sending CTRL+D to a shell started using shell_run would resulted in and
endless prompt loop. I've been unable to trigger such a behaviour
on actual hardware using a UART connection, but calling `pm_off` seemed
like a better alternative than having an `#ifdef BOARD_NATIVE`.

Fixes #9946
2018-10-30 19:06:42 +01:00
Emmanuel Baccelli
365d82ed09
Merge pull request #9829 from OTAkeys/pr/uuid_string
uuid: add uuid_to_string() and uuid_from_string()
2018-10-30 14:30:47 +01:00
Martine Lenders
99e3d780ea gnrc_pktbuf: clarify doc of _start_write()
Resolves #10261
2018-10-28 17:28:24 +01:00
Martine Lenders
ac54a2d2b2 gnrc_pktbuf: add gnrc_pktbuf_reverse_snips() helper function
This allows for

a) testing the packet reversal properly in unittests
b) use it in other places than `gnrc_ipv6`'s receive function
2018-10-25 23:11:33 +02:00
Martine Lenders
521fa8d9cb gnrc_rpl_srh: remove type define
The only usage was removed in parent and we now have a centralized
definition of the routing header types.
2018-10-25 19:21:20 +02:00
Martine Lenders
3c4bd0ac57 ipv6_ext_rh: define RH type numbers at central place
This moves the type numbers for routing headers to a central place, as
we did it with other IANA-registered numbers.
2018-10-25 19:21:19 +02:00
Martine Lenders
959e4491fa
Merge pull request #9702 from maribu/phydat_fit
sys/phydat: New phydat_fit API
2018-10-25 19:16:54 +02:00
Martine Lenders
84a62da102 gnrc_ipv6_ext_rh: rename GNRC_IPV6_EXT_RH_OK for clarity 2018-10-25 11:11:50 +02:00
Martine Lenders
c54ba49e82 gnrc_ipv6_ext: move ipv6_ext_rh (partly) to GNRC 2018-10-25 11:10:25 +02:00
Marian Buschsieweke
fe46cae00d
sys/phydat: New phydat_fit API
The current phydat_fit implementation the following limitations:
- The API is way more complicated to use than needed
- It doesn't perform any rounding
- It uses `long` in a place where actual width (or better range) of the type
  is pretty important.

This commit addresses these limitations and uses lookup-tables to reduce the
number of divisions required.

Before this commit code using it looked like this:
``` C
long values[] = { 100000, 2000000, 30000000 };
phydat_t dat = { .scale = 42, .unit = UNIT_V };
phydat_fit(&dat, values[0], 0, phydat_fit(&dat, values[1], 1, phydat_fit(&dat, values[2], 2, 0)));
```

Now it can be used like this:
``` C
int32_t values[] = { 100000, 2000000, 30000000 };
phydat_t dat = { .unit = UNIT_V, .scale = 42 };
phydat_fit(&dat, values, 3);
```
2018-10-24 13:05:51 +02:00
Juan I Carrano
12729d62a5
Merge pull request #10053 from OTAkeys/feat/base64_const
sys/base64: api change (const + void*)
2018-10-23 17:53:58 +02:00
Juan I Carrano
8148790e92
Merge pull request #10218 from bergzand/pr/crypt/helper_equal_const
crypto/helper: Change equals arguments to const
2018-10-23 17:51:56 +02:00
ed23bdf25a
crypto/helper: Change equals arguments to const 2018-10-21 20:27:33 +02:00
aedc5260d8
Merge pull request #9848 from ZetaR60/RIOT_eepreg2
sys/eepreg: EEPROM registration support (version 2)
2018-10-21 11:20:53 +02:00
Matthew Blue
d5e9994d1d sys/eepreg: initial EEPROM registration support 2018-10-20 09:30:40 -04:00
f48deb48d4 net/nanocoap: rename variable name 'class'
'class' is keyword in c++ and leads to conflicts
2018-10-19 10:27:06 +02:00
José Alamos
372a729e21
Merge pull request #10070 from OTAkeys/pr/bump_littlefs_version
pkg/littlefs: bump version to v1.6.2
2018-10-18 14:35:55 +02:00
PeterKietzmann
d3e34b4334 sys/ecc: add repetition code 2018-10-18 13:37:21 +02:00
Martine Lenders
179f17ca42
Merge pull request #9989 from PeterKietzmann/pr_add_golay
sys/ecc: add golay(24,12) half rate code
2018-10-18 09:31:17 +02:00
PeterKietzmann
9768995a0b sys/ecc: add golay(24,12) ECC 2018-10-18 09:05:28 +02:00
Hauke Petersen
18cc7ee3ed net/rdcli: rename to cord_ep 2018-10-17 15:21:49 +02:00
Hauke Petersen
226b9fa383 net/rdcli_simple: rename to cord_epsim 2018-10-17 15:21:49 +02:00
Hauke Petersen
152623577e net/rdcli_config: rename to cord_config 2018-10-17 09:29:19 +02:00
Hauke Petersen
787524400c net/rdcli_common: rename to cord_common 2018-10-17 09:29:19 +02:00
Gunar Schorcht
7fde6fc258
Merge pull request #6712 from aabadie/driver_vcnl4010
drivers/vcnl4010: initial implementation
2018-10-15 16:12:45 +02:00
bb3e859680
Merge pull request #10036 from kb2ma/nanocoap/module-doc
net/nanocoap: add module documentation
2018-10-15 13:20:26 +02:00
d4bfb0f0a3 sys/phydat: add counts unit 2018-10-15 11:44:04 +02:00
8ee2bc5ffb coap: deprecate COAP_CT_ content type defines
COAP_CT_ style defines for the content types are deprecated in favour of
COAP_FORMAT_ style defines. COAP_FORMAT_ is expanded to include any
missing content type that was available with COAP_CT_.
2018-10-15 09:44:17 +02:00
Ken Bannister
14c9b3062b
Merge pull request #8932 from bergzand/pr/nanocoap/block2
nanocoap: add server-side block2 support
2018-10-14 13:03:08 +00:00
551b3513db nanocoap: Add server-side block2 support 2018-10-14 14:30:29 +02:00
Hauke Petersen
9acce40aad net: added full RD endpoint implementation 2018-10-12 14:41:40 +02:00
Hauke Petersen
314dfcb805 net/rdcli_common: added RES_LOC_LEN 2018-10-12 14:41:40 +02:00
Ken Bannister
2382855f38 net/nanocoap: add module documentation 2018-10-10 13:31:40 -04:00
Martine Lenders
f60f5f86bb
Merge pull request #10128 from gebart/pr/ubjson-include
sys/ubjson: Unconditionally include <sys/types.h>
2018-10-08 14:01:01 +02:00
Joakim Nohlgård
eb4de92c2f sys/ubjson: Unconditionally include <sys/types.h>
msp430_types.h is included implicitly if needed by sys/types.h
native also needs sys/types.h, no idea why it was excluded originally..
2018-10-08 10:42:01 +02:00
Jose Alamos
dac54db275 sys/ubjson: change ingroup directive 2018-10-05 15:34:49 +02:00
Jose Alamos
851150847c sys/base64: change ingroup directive 2018-10-05 15:34:49 +02:00
3c032e5688
gnrc_netif: add rawmode flag
Adds a gnrc_netif specific rawmode flag to indicate that the netdev
device is configured in raw mode. This flag is kept in sync with a
possible flag in the netdev device and should only be modified via the
setter call.
2018-10-03 20:59:03 +02:00
Vincent Dupont
7e47e36e55 pkg/littlefs: fix file buffer size 2018-10-03 11:54:17 +02:00
Vincent Dupont
73e971fc56 uuid: add uuid_from_string() 2018-10-03 10:44:14 +02:00
Vincent Dupont
695a94449a fmt: add scn_u32_hex() 2018-10-03 10:44:14 +02:00
Vincent Dupont
8c5ffa0a8d fmt: add fmt_char 2018-10-03 10:44:14 +02:00
Vincent Dupont
db4ce5eff2 uuid: add uuid_to_string() 2018-10-03 10:44:14 +02:00
Vincent Dupont
71455b692f fmt: add fmt_to_lower() 2018-10-03 10:44:14 +02:00
Vincent Dupont
a542e954cf fmt: add fmt_u16_hex() 2018-10-03 10:44:03 +02:00
chrysn
f07308b07d gnrc: Extend gnrc_ipv6_get_header checks, use in sock recv
gnrc_sock_recv used to duplicate functionality of gnrc_ipv6_get_header,
but additionally checked whether the IPv6 snip is large enough.

All checks are now included in gnrc_ipv6_get_header, but as most of them
stem from programming / user errors, they were moved into asserts; this
constitutes an API change.
2018-09-28 19:40:59 +02:00
ee11af6c26
Merge pull request #9926 from haukepetersen/add_coap_genericheader
net/nanocoap: factor out generic CoAP defines
2018-09-28 09:38:53 +02:00
Sebastian Meiling
22e03180fc
Merge pull request #9865 from jia200x/pr/doc_memory
doc: add `memory management` group
2018-09-27 15:45:39 +02:00
Jose Alamos
6089f4a10c doc/mem_management: add implementations and utils 2018-09-27 10:54:39 +02:00
Pieter Willemsen
394c3ecd6d base64: use void* to pass byte buffers 2018-09-26 18:24:21 +02:00
Pieter Willemsen
2cc1ac4fa8 base64: make input argument const 2018-09-26 17:51:08 +02:00
Hauke Petersen
f3f673eb45 net/nanocoap: factor out generic CoAP defines 2018-09-26 14:31:57 +02:00
Hauke Petersen
4a59113963 net/nanocoap: use correct type param for _bulid_hdr() 2018-09-26 13:00:39 +02:00
b518f3c73e
Merge pull request #9869 from bergzand/pr/tsrb/drop
tsrb: add drop function
2018-09-18 10:57:55 +02:00
50d6cfd22c
Merge pull request #9918 from kb2ma/gcoap/fix-resource-order-doc
net/gcoap: fix doc for order of server resources
2018-09-13 15:45:17 +02:00
Hauke Petersen
a027a1e608 sys/benchmark: incl irq.h and fixed output 2018-09-11 11:29:19 +02:00
Ken Bannister
949eb21116 net/gcoap: fix doc for order of server resources 2018-09-11 04:31:54 -04:00
cladmi
a052801c2f
sys/hashes/sha256: replace include by stddef.h
stddef.h is enough for size_t, unistd.h adds a lot of other declarations
2018-09-06 12:45:04 +02:00
1a3bb65e3c
sys/hashes/sha256: add missing unistd.h include
It needs `size_t` definition.
2018-09-06 11:13:12 +02:00
e8dfabd4c4
Merge pull request #8920 from haukepetersen/add_nanocaop_urilocationoption
net/nanocoap: add generic handling for string-based options
2018-08-31 12:04:32 +02:00
8d9cb25ed7
tsrb: add drop function
The get function does not support passing NULL as an input buffer. to be
able to drop bytes from the buffer, a dedicated drop function is
required
2018-08-31 10:35:02 +02:00
Hauke Petersen
b837e656f9 stdio/vfs: generalized VFS mapping for STDIO 2018-08-30 11:14:59 +02:00
Peter Kietzmann
5b87b1d621
Merge pull request #9858 from jia200x/pr/doc_hashes
doc: refactor `hashes` group
2018-08-30 10:36:47 +02:00
Hauke Petersen
4c08e77d00 net/nanocoap: improve option handling
- add generic string put and get functions
- add location path and location query options
- add dedicated functions for getting and setting
  URI query, URI path, location query, and location path
  options
2018-08-30 10:31:03 +02:00
Jose Alamos
060fb619e9 hashes: change ingroup directive 2018-08-29 15:57:24 +02:00
Jose Alamos
6b34f0b61c hashes: define Doxygen groups in non crypto hashes 2018-08-29 15:49:49 +02:00
Jose Alamos
4865731fdd hashes/sha3: add missing macro documentation 2018-08-28 19:28:40 +02:00
Jose Alamos
7e30e3256f hashes/sha256: add missing macro documentation 2018-08-28 19:28:33 +02:00
Jose Alamos
6458942716 hashes/sha3: change ingroup directive 2018-08-28 19:26:10 +02:00
Jose Alamos
ea7e5a3935 hashes/sha256: change ingroup directive 2018-08-28 19:26:01 +02:00
Jose Alamos
0a29095197 hashes/sha1: change ingroup directive 2018-08-28 19:25:49 +02:00
Jose Alamos
c4b8731633 hashes/md5: change ingroup directive 2018-08-28 19:25:32 +02:00
Jose Alamos
3ee3a020c3 hashes/cmac: change ingroup directive 2018-08-28 19:25:20 +02:00
Jose Alamos
5cf0b1ae62 hasehs/sha-3: add doxygen group for sha-3 2018-08-28 19:19:36 +02:00
Jose Alamos
7c59f02639 hasehs/sha256: add doxygen group for sha256 2018-08-28 19:14:51 +02:00
0cfdaab246
Merge pull request #9842 from jia200x/pr/doc_math
doc: add `math` group to Doxygen
2018-08-27 10:34:09 +02:00
Jose Alamos
70420197ed sys/seq: change ingroup directive 2018-08-24 18:14:03 +02:00
Jose Alamos
58295ab757 sys/matstat: change ingroup directive 2018-08-24 18:14:03 +02:00
Jose Alamos
d87199420c sys/div.h: change ingroup directive 2018-08-24 18:14:03 +02:00
Hauke Petersen
9bd2363643 sys/stdio: s/rtt_stdio/stdio_rtt/ 2018-08-22 10:54:25 +02:00
Hauke Petersen
d55616a7f5 sys/stdio: s/uart_stdio/stdio_uart/ 2018-08-22 10:54:25 +02:00
Hauke Petersen
717e84f7b2 sys/stdio: factor out STDIO abstraction 2018-08-22 10:54:25 +02:00
Toon Stegen
9f90f31291 sys/fmt: add function for converting hex byte 2018-08-20 16:19:30 +02:00
Joakim Nohlgård
29e4a1ba3c gnrc_netif: Introduce GNRC_NETIF_HDR_FLAGS_MORE_DATA 2018-08-13 09:25:32 +02:00
Ken Bannister
3f3df74bcd
Merge pull request #7237 from Ell-i/feature-gcoap-extra-indirection
net/gcoap: Make references to coap_resource_t all const in gcoap
2018-08-07 23:52:59 -04:00
Gaëtan Harter
a7241384be
Merge pull request #9719 from miri64/gnrc_ipv6_nib/enh/emit-conf
gnrc_ipv6_nib: make automatic NDP packet emission (NS/RS) configurable
2018-08-07 17:55:00 +02:00
smlng
fd718dfc74 gnrc_udp: assert ports not zero
UDP port 0 is reserved for system usage, e.g., to tell the OS to
    set a random source port. Hence, neither source nor destination
    port should be 0 when transmitting. This PR adds proper asserts.
2018-08-06 16:09:22 +02:00
Martine Lenders
bdb1e80e0a gnrc_ipv6_nib: make RS emission configurable 2018-08-06 14:51:18 +02:00
Pekka Nikander
8f10d65ad5 net/gcoap: Make references to coap_resource_t const in gcoap
A CoAP resource is a primary object between the application
    and CoAP library.  The Library needs the paths, methods,
    and handlers from it, so that it can call the right handler.
    However, it never needs to change any of them.

    The application also needs the resources.  The application
    may want to declare the resources as const, since it may
    want to store them in flash.
2018-07-30 09:00:21 +03:00
Cenk Gündoğan
f03e52d157
Merge pull request #9484 from miri64/gnrc_sixlowpan_iphc/enh/i8511-recv
gnrc_sixlowpan_iphc: refactor reception for #8511
2018-07-26 07:58:52 +02:00
Martine Lenders
69d9ecc0d9 gnrc_sixlowpan_iphc: refactor reception for #8511
This refactors reception/decoding part of `gnrc_sixlowpan_iphc` to the
more layered approach modeled in #8511. Since the reception part is
already complicated enough I decided to divide send and receive up into
separate changes.
2018-07-25 18:15:09 +02:00
Martine Lenders
9a88cc8004 gnrc_sixlowpan: remove assertion on multiple_by_size function
During the review of #9485 [we found out][1] that an assertion in this
function was invalid. However, the documentation on this assertion
wasn't removed on that. This fixes that.

[1] https://github.com/RIOT-OS/RIOT/pull/9485#issuecomment-407794280
2018-07-25 18:00:30 +02:00
Cenk Gündoğan
7fef5e030a
Merge pull request #9485 from miri64/gnrc_sixlowpan_iphc/enh/i8511-send
gnrc_sixlowpan_iphc: refactor sending for #8511
2018-07-25 17:57:59 +02:00
Martine Lenders
80322cbd7d gnrc_sixlowpan_iphc: refactor sending for #8511
This refactors sending/encoding part of `gnrc_sixlowpan_iphc` to the
more layered approach modeled in #8511. Since the reception part is
already was pretty complicated to refactor, I decided to divide send
and receive up into separate changes.
2018-07-25 17:35:59 +02:00
Martine Lenders
d6b2a9ed01
Merge pull request #9483 from miri64/gnrc_sixlowpan_frag/enh/finish-frag
gnrc_sixlowpan_frag: Expose functions to finish datagram
2018-07-25 11:53:14 +02:00
Martine Lenders
64fed621d2 gnrc_sixlowpan_frag: Expose functions to finish datagram
This will be used in the IPHC refactoring to control the reassembly
buffer as a context.

I also adapted the name of `gnrc_sixlowpan_frag_gc_rbuf()` to be in
line with the rest of the newer functions.
2018-07-25 11:26:02 +02:00
b0309145f0
sock_util: Limit URL scheme size 2018-07-19 22:07:17 +02:00
6a81a4d587
sock_util: add missing includes 2018-07-18 17:43:59 +02:00
Hauke Petersen
ad20c4f1cc net: add Asymcute (asynchronous MQTT-SN client) 2018-07-05 15:44:16 +02:00
Hauke Petersen
ed01bf0e1d net: add header with generic MQTT-SN defines 2018-07-05 15:13:02 +02:00
Hauke Petersen
bf8f8dfa67 net/sock_udp: add sock_udp_ep_equal() 2018-07-05 15:13:01 +02:00
Martine Lenders
6d1f012c9d gnrc_ipv6_nib: add support to handle RDNSSO 2018-07-05 11:09:34 +02:00
Martine Lenders
0ef62b9690 gnrc_ndp: add support for building RDNSS option 2018-07-05 11:01:22 +02:00
Martine Lenders
8eab80c3ec ndp: define RDNSS option 2018-07-05 11:01:22 +02:00
Cenk Gündoğan
835f8f0daa
Merge pull request #9290 from PeterKietzmann/pr_sram_puf
Add SRAM based PRNG seeder
2018-07-04 18:08:53 +02:00
PeterKietzmann
20397c5b15 cortexm_common: add SRAM based PRNG seeder 2018-07-04 17:55:16 +02:00
Cenk Gündoğan
16e1f972ab
Merge pull request #9424 from miri64/gnrc_sixlowpan_frag/enh/async-gc
gnrc_sixlowpan_frag: add asynchronous rbuf GC
2018-07-03 11:45:52 +02:00
Martine Lenders
254f16e81f gnrc_sixlowpan_frag: add asynchronous rbuf GC
While the current approach for garbage collection in the 6Lo reassembly
buffer is good for best-effort handling of
*fragmented* packets and nicely RAM saving, it has the problem that
incomplete, huge datagrams can basically DoS a node, if no further
fragmented datagram is received for a while (since the packet buffer is
full and GC is not triggered).

This change adds a asynchronous GC (utilizing the existing
functionality) to the reassembly buffer, so that even if there is no new
fragmented packet received, fragments older than `RBUF_TIMEOUT` will be
removed from the reassembly buffer, freeing up the otherwise wasted
packet buffer space.
2018-07-03 10:25:25 +02:00
Cenk Gündoğan
e5c6d0ebf1
Merge pull request #9240 from maxvankessel/pr/isrpipe
drivers/isrpipe: changed isrpipe_t content order
2018-07-02 22:28:41 +02:00
Cenk Gündoğan
32e823acb2
Merge pull request #9447 from miri64/gnrc_sixlowpan_frag/enh/add-cur-size
gnrc_sixlowpan_frag: add current_size to exposed struct
2018-07-02 14:05:40 +02:00
Francisco Acosta
23d176f46b
Merge pull request #8857 from ZetaR60/RIOT_atmega_time_dot_h
cpu/atmega_common: Use updated time.h
2018-06-28 22:29:20 +02:00
Martine Lenders
68fe6682ff gnrc_sixlowpan_frag: add current_size to exposed struct
Since IPHC also manipulates the total number of bytes of a received
datagram (by decompressing it), this also needs to be exposed. I guess
I was too focused on introducing a *generic* packet buffer for a future
virtual reassembly buffer (where it isn't needed, but so isn't `pkt` to
be honest), that I totally forgot about it in #9352.
2018-06-28 12:28:51 +02:00
Cenk Gündoğan
315c201747
Merge pull request #9372 from miri64/gnrc_sixlowpan_frag/enh/i8511
gnrc_sixlowpan_frag: adapt for #8511
2018-06-26 19:47:25 +02:00
Martine Lenders
a2eb3c7f15 gnrc_sixlowpan_frag: adapt for #8511
This refactors the `gnrc_sixlowpan_frag` module for the API proposed
in #8511.

The `ctx` for `gnrc_sixlowpan_frag_send()` is required to be a
`gnrc_sixlowpan_msg_frag_t` object, so IPHC can later on use it to
provide the *original* datagram size (otherwise, we would need to adapt
the API just for that, which seems to me as convoluted as this
proposal).

I also provide an expose function with a future possibility to provide
more than just one `gnrc_sixlowpan_msg_frag_t` object later on (plus
having cleaner module separation in general).
2018-06-26 19:38:33 +02:00
PeterKietzmann
ec5fb4fbda sys/random: fix distribution of random_uint32_range() 2018-06-26 14:08:43 +02:00
42c4460daf
Merge pull request #9325 from aabadie/pr/saul/tvoc_ppb
drivers/saul :sys/phydat: add definitions for TVOC sensor type and PPB unit
2018-06-25 12:20:11 +02:00
Martine Lenders
ffde933259
Merge pull request #9399 from miri64/sock_dns/doc/fix-spelling
sock_dns: fix typo in doc
2018-06-22 13:32:20 +02:00
Martine Lenders
a027684a1e sock_dns: fix typo in doc
`s/fuction/function/` ;-)
2018-06-22 13:23:26 +02:00
Martine Lenders
579d9d78d4
Merge pull request #8823 from miri64/gnrc_ipv6_nib/feat/slaac
gnrc_ipv6_nib: add full RFC4862 DAD support
2018-06-21 14:10:36 +02:00
Cenk Gündoğan
d140aa1c8e
Merge pull request #9382 from miri64/sock/enh/i9376
sock_udp: allow creation with ephemeral ports
2018-06-21 12:16:40 +02:00
ddfc5843bb
Merge pull request #9086 from bergzand/pr/nanocoap_sock/client_split
nanocoap_sock: split generic request function of from nanocoap_get
2018-06-20 23:31:05 +02:00
Martine Lenders
a20639074a sock_udp: define send error-state for full port pool 2018-06-20 14:51:17 +02:00
Martine Lenders
9e7cebae93 sock_udp: allow creation with ephemeral ports
This change allows the port for local endpoint to be zero 0. If this is
the case the `sock_udp_create()` function binds the object to an
ephemeral port.
2018-06-20 14:51:17 +02:00
741c8c0c68 sys/auto_init: improve documentation 2018-06-18 13:59:09 +02:00
Cenk Gündoğan
4219ec9265
Merge pull request #9345 from bergzand/pr/fmt/strnlen
fmt: Add fmt_strnlen function
2018-06-18 11:23:53 +02:00
Cenk Gündoğan
e08fd546cf
Merge pull request #9353 from miri64/gnrc_sixlowpan/opt/rm-pad
gnrc_sixlowpan: fix order of gnrc_sixlowpan_msg_frag_t
2018-06-18 10:59:27 +02:00
Cenk Gündoğan
acb9e4aed2
Merge pull request #9352 from miri64/gnrc_sixlowpan_frag/enh/expose-rbuf
gnrc_sixlowpan_frag: expose (parts of) reassembly buffer
2018-06-18 10:55:13 +02:00
Joakim Nohlgård
21bc3ca51f
Merge pull request #9360 from gebart/pr/embunit-const
embunit: Const test case names
2018-06-15 17:04:20 +02:00
Joakim Nohlgård
8514ff5f15 gnrc/pktbuf: Const correctness on gnrc_pktbuf_add 2018-06-15 00:44:23 +02:00
Joakim Nohlgård
fcae95ca96 embunit: Const test case names 2018-06-15 00:34:33 +02:00
Martine Lenders
2c9ee62eb0 gnrc_sixlowpan: fix order of gnrc_sixlowpan_msg_frag_t
While working on #9352 I noticed that the order of members in the
`gnrc_sixlowpan_msg_frag_t` struct costs us 4 bytes in RAM due to byte
alignment. This PR fixes the order of members, so they are the most
packed.
2018-06-14 17:35:29 +02:00
Martine Lenders
86cbde2db5 gnrc_sixlowpan_frag: expose (parts of) reassembly buffer
This exposes the parts of the reassembly buffer to be usable as context
as proposed in #8511.

I only exposed *parts of* for two reasons:

1. I don't need to expose further types (like `rbuf_int_t`), that are
   not of interest outside of fragmentation.
2. This allows for an easy future extension for the virtual reassembly
   buffer as proposed in [[1]].

This makes this change a little bit more involved, because instead of
just renaming the type, I also need to add the usage of the `super`
member, but I think in the end this little preparation work will be
beneficial in the future.

[1]: https://tools.ietf.org/html/draft-watteyne-6lo-minimal-fragment-01#section-3
2018-06-14 17:22:58 +02:00
1778dbde85
fmt: Add fmt_strnlen function 2018-06-14 11:57:11 +02:00
Martine Lenders
e91e0a7807
Merge pull request #9261 from kb2ma/gcoap/refine_re-register
net/gcoap: Refine Observe re-registration
2018-06-13 16:05:40 +02:00
47fc4b0749 sys/auto_init: fix doxygen grouping 2018-06-11 19:12:02 +02:00
7d013eb2b6 sys: fix doxygen grouping 2018-06-11 19:12:02 +02:00
25b90317f3 sys/phydat: add ppb unit support 2018-06-11 15:46:46 +02:00
Ken Bannister
43db2715cd net/nanocoap: create pkt-based request
Includes string and uint options.
2018-06-10 08:44:16 -04:00
Martine Lenders
6e31ce7c74 gnrc_netif: increase number of maximum IPv6 groups 2018-06-07 10:14:52 +02:00
Martine Lenders
fbe391723b gnrc_netreg: Further specify gnrc_netreg_register() precondition
While browsing through the rendered doc, I found the precondition of
`gnrc_netreg_register()` somewhat lacking. What is a "message queue"?
`gnrc_netreg_entry_t`s have types. Does this apply for all types?
This specifies the requirement more: The calling thread **only** needs
a message queue (also provides a link to `msg_init_queue()` now for
further information), if the provided `gnrc_netreg_entry_t` is of type
`GNRC_NETREG_TYPE_DEFAULT` (i.e. thread-wise IPC).
2018-06-06 22:19:53 +02:00
Ken Bannister
2c02ed2093 net/gcoap: refine observe re-registration
Fix re-register when using the same token.
Handle edge cases when change token for a resource.
Only set observer and resource on initial registration.
Discuss re-registration in documentation.
2018-06-05 09:23:16 -04:00
BytesGalore
0c034c9220 rpl: add DIS Solicited Information option 2018-06-04 18:10:22 +02:00
Martine Lenders
55adbee488 gnrc_ipv6_nib: add full RFC4862 DAD support
Parts of [RFC4862] were already implemented when NDP via the NIB was
first implemented. This change just includes the DAD portion of
[RFC4862]. This should be enough to make RIOT fully RFC4862 compliant.

[RFC4862]: https://tools.ietf.org/html/rfc4862
2018-05-31 17:11:25 +02:00
Unknown
11fff4e729 drivers/isrpipe: changed isrpipe_t content order 2018-05-30 10:18:16 +02:00
Sebastian Meiling
f017ee1a50
Merge pull request #5675 from basilfx/feature/prng_fortuna
sys: random: fortuna csprng
2018-05-30 09:07:18 +02:00
Martine Lenders
fce5c758f7
Merge pull request #8841 from miri64/netif/api/initial2
netif: Initial import of a common network interface API (second try)
2018-05-29 22:10:50 +02:00
Martine Lenders
2586b5c161
Merge pull request #9233 from brummer-simon/gnrc_tcp-handle_link_local_addr
gnrc_tcp: handle link local IPv6 addresses correctly
2018-05-29 21:50:00 +02:00
Simon Brummer
686aabaa0a gnrc_tcp: handle link local IPv6 addresses correctly 2018-05-29 21:28:32 +02:00
Martine Lenders
06947b78fc netif: Initial import of a common network interface API 2018-05-29 19:49:29 +02:00
Martine Lenders
1bc9a592c4 gnrc_netif: improve doc on GNRC_NETIF_IPV6_ADDRS_NUMOF 2018-05-29 19:30:30 +02:00
Martine Lenders
ea64d39e21 gnrc_netif: fail IPv6 address addition if no space for solicited nodes 2018-05-29 19:30:30 +02:00
Bas Stottelaar
99755eaa0c sys: random: add fortuna PRNG 2018-05-29 18:40:58 +02:00
Gaëtan Harter
f61dbb6bdb
sys/trickle: document time interval unit 'ms'
Unit is milliseconds as said here:

https://github.com/RIOT-OS/RIOT/pull/9145#discussion_r188861183
2018-05-29 11:59:12 +02:00
657bd25dbe
Merge pull request #8993 from ZetaR60/RIOT_cbmplex
sys/cb_mux: Callback multiplexer
2018-05-29 10:06:05 +02:00
Matthew Blue
02697fafb3 sys/cb_mux: initial support 2018-05-28 15:43:41 -04:00
Matthew Blue
dfa8fb919d sys/timex: fix incompatible atmega time.h 2018-05-28 13:04:55 -04:00
fce61f91f0
Merge pull request #9046 from bergzand/pr/uuid/initial
uuid: Initial import of RFC4122 UUID functions
2018-05-25 15:05:57 +02:00
Hauke Petersen
ce2adb31aa sys/uart_stdio: remove unused rx_cb from header 2018-05-25 11:29:16 +02:00
6bb8a5c145
nanocoap_sock: split request function from get
The nanocoap_get function is refactored to split of the request part
into a separate function for reuse by other modules. Support for
retransmissions when the received frame is malformed is dropped as it
was broken anyway.
2018-05-25 09:40:20 +02:00
Cenk Gündoğan
d005566042 gnrc: add nettype handling for NDN 2018-05-24 10:58:26 +02:00
Cenk Gündoğan
05d4c23c4a ethertype: use correct type for NDN and CCNx 2018-05-24 10:58:26 +02:00
fc03d6f694
uuid: Initial import of RFC4122 UUID functions
Provides functions for type 3, 4 and 5 UUID generations.

UUID type 1 is timestamp based and requires an accurate time source. For
this reason it is left out of this implementation. UUID type 2 is not
defined in RFC 4122 and thus also not included here
2018-05-23 16:31:01 +02:00
Sebastian Meiling
9d83b60f3b
Merge pull request #9083 from smlng/pr/gcoap/cleanup
gcoap: enhance gcoap_req_init
2018-05-23 10:40:54 +01:00
Cenk Gündoğan
441f11ea45 gnrc_rpl: shell: adapt to evtimer for RPL events 2018-05-23 09:42:12 +02:00
Cenk Gündoğan
b819ac8d35 gnrc_rpl: adapt to evtimer for RPL events 2018-05-23 09:42:12 +02:00
Cenk Gündoğan
4c9e947d43 gnrc_rpl: adjust author and copyright 2018-05-22 23:46:55 +02:00
smlng
b9ca8f466f gcoap: add asserts for path in gcoap_req_init 2018-05-22 21:28:58 +02:00
smlng
c9e9f72454 gcoap: use const path parameter 2018-05-22 21:28:58 +02:00
Bas Stottelaar
7781da7799 sys: netopt: add busy option 2018-05-21 16:37:38 +02:00
Bas Stottelaar
02395e593d sys: netopt: add checksum option 2018-05-21 16:37:38 +02:00
aa84c3e6b8
trickle: remove msg_time member from struct
The msg_time member is only locally used and set before read. It can
be removed as the state kept by the member is not used.
2018-05-17 10:40:12 +02:00
Marian Buschsieweke
4b8881abb4
gnrc/netif/hdr.h: Optimized structure layout
Reordered struct members to not waste memory due to padding.

Before:
``` C
typedef struct {
    uint8_t src_l2addr_len;
    uint8_t dst_l2addr_len;
    kernel_pid_t if_pid;    // <-- 16 bit, is aligned to 16 bit
    uint8_t flags;
    uint8_t __padding_byte; // <-- Inserted to fulfill padding requirements
    int16_t rssi;           // <-- 16 bit, is NOT aligned to 16 bit
    uint8_t lqi;
    uint8_t __padding_byte2;// <-- Inserted to fulfill padding requirements
} gnrc_netif_hdr_t;
```

Now:
``` C
typedef struct {
    uint8_t src_l2addr_len;
    uint8_t dst_l2addr_len;
    kernel_pid_t if_pid;    // <-- 16 bit, is aligned to 16 bit
    uint8_t flags;
    uint8_t lqi;
    int16_t rssi;           // <-- 16 bit, is aligned to 16 bit
} gnrc_netif_hdr_t;
```

When build for the `bluepill` board, the new layout reduces the size by 2 bytes.
2018-05-14 14:01:29 +02:00
Martine Lenders
8a46cf611e gcoap: make message queue size configurable 2018-05-06 16:41:43 +02:00
b81b12de4e
cbor: Move header to cbor subdirectory
Prevents conflicts when multiple modules/packages provide a `cbor.h`
header.
2018-05-01 11:12:39 +02:00
Joakim Nohlgård
9c85ce1916
Merge pull request #8733 from gebart/pr/matstat
matstat: Integer mathematical statistics library
2018-04-28 09:37:02 +02:00
Joakim Nohlgård
6927260973 sys/matstat: Integer mathematical statistics library 2018-04-28 08:03:35 +02:00
51f06d5127
nanocoap: Add request entity incomplete code 2018-04-26 10:50:08 +02:00
Martine Lenders
dc41f49229 cbor: add deprecation note 2018-04-25 16:46:17 +02:00
e1f6a5afd3 net/gcoap: increase stack size by sizeof(coap_pkt_t) 2018-04-22 23:15:16 +02:00
734944a56b
Merge pull request #8986 from haukepetersen/opt_event_allowmultipleposts
sys/event: allow calling event_post multiple times
2018-04-20 10:59:14 +02:00
Hauke Petersen
46888a1eaf sys/event: allow calling event_post multiple times 2018-04-19 16:41:13 +02:00
Hauke Petersen
cf7fb4b886 net/rdcli: fix doxygen groups for RD client code 2018-04-19 16:27:59 +02:00
Joakim Nohlgård
57f6081960 sys/analog_util: Refactor adc_map, fix compilation
Change the API to use int32_t instead of int, to allow for greater
flexibility on 8- and 16-bit platforms. Removed limitation on input
arguments that min < max. Times where it can be useful to have min > max
is when measuring a sensor where a higher measured voltage means a lower
physical value. For example a thermistor can be connected so that the
measured voltage goes down when the temperature goes up.
2018-04-16 13:53:49 +02:00
Joakim Nohlgård
11b668fd6d sys/analog_util: Add missing include stdint.h 2018-04-16 13:05:20 +02:00
635e72db23
Merge pull request #8788 from kaspar030/nanocoap_add_serverside_block1
nanocoap: add serverside block1 support
2018-04-16 12:49:06 +02:00
4897222e7e nanocoap: add server-side block1 support 2018-04-16 12:31:56 +02:00
6b01f4d388
Merge pull request #7263 from haukepetersen/opt_fmt_s16dfp_pos
sys/fmt: extended fmt_s16_dfp to handle scales
2018-04-13 09:54:08 +02:00
6ee4aceef1
Merge pull request #8936 from haukepetersen/opt_rdclisimple_addrconf
net/rdcli_simple: specify RD address as string
2018-04-12 15:33:33 +02:00
Martine Lenders
7974b12c11
Merge pull request #8797 from zhuoshuguo/gomach_add_dutycycle_display_command
gnrc_gomach: add duty-cycle display shell command.
2018-04-12 14:25:02 +02:00
Hauke Petersen
bd25cf5902 net/rdcli_simple: parse RD address from string
this makes the configuration of the RD server much simpler, as it
does not require the user to 'binary-code' the RD server's address
anymore.
2018-04-12 14:00:32 +02:00
Hauke Petersen
faab006631 net/rdcli_simple: improved doc and error handling 2018-04-12 13:48:09 +02:00
d64d38b391
Merge pull request #8909 from miri64/doc/enh/ipv6-rfc
doc: update IPv6 RFC references
2018-04-12 12:11:23 +02:00
shuguo
4e7ff0df28 gnrc_gomach: enabling duty-cycle printing 2018-04-12 11:46:40 +02:00
shuguo
ed4a80db00 gnrc_mac: add MAC duty-cycle record macro 2018-04-12 11:44:30 +02:00
d2db1ba2c3
Merge pull request #8568 from miri64/gnrc_ipv6_nib/fix/abro-ignore-only-on-6lr
gnrc_ipv6_nib: only discard RAs without ABROs on 6LR
2018-04-11 22:32:33 +02:00
Hauke Petersen
637fbff456 net/nanocoap: fix indention of doxy comments 2018-04-11 14:06:42 +02:00
012c016b74
Merge pull request #8772 from kaspar030/rework_nanocoap_option_handling
net/nanocoap: rework option handling
2018-04-10 21:11:18 +02:00
dee793d29f nanocoap: rework option handling 2018-04-10 20:58:06 +02:00
Martine Lenders
23bdc80e22 doc: update IPv6 RFC references
RFC 2460 was obsoleted by RFC 8200. This PR changes the references
around, so we don't reference an obsoleted RFC ;-).

Also I'm moving these references from the old-style HTML-like format
to the newer-style Markdown-like format.
2018-04-10 15:40:18 +02:00
Gaëtan Harter
747b11d90e
Merge pull request #7651 from tobhe/memarray
Generic memory block allocator
2018-04-10 15:22:40 +02:00
tobhe
509f40a81c memarray: add fixed-size memory block allocator 2018-04-10 14:37:29 +02:00
Hauke Petersen
adf807d79c net/rdcli_common: improve doc for SUFFIX_LEN option 2018-04-10 11:36:28 +02:00
Martine Lenders
3fea1eaa30
Merge pull request #8888 from miri64/doc/fix/sys_util
doc: remove sys_util references
2018-04-09 16:52:23 +02:00
fb2beb43c8
Merge pull request #8875 from Josar/pr/xtimer64
sys/include/xtimer: Added xtimer_set64()
2018-04-09 16:19:44 +02:00
b117638fd0
Merge pull request #8886 from gebart/pr/xtimer-shift-6
xtimer: Add XTIMER_SHIFT = 6 automatic option
2018-04-09 16:12:26 +02:00
Hauke Petersen
108284670c net: added RD client for simplified registration 2018-04-09 10:37:10 +02:00
Hauke Petersen
f12d85d032 net/rdcli: added common rdcli module 2018-04-09 10:37:10 +02:00
Hauke Petersen
78df885fc7 sys/fmt: use also positive scaling for s32_dfp 2018-04-06 11:58:43 +02:00
Martine Lenders
787fa37465 netopt: move NETOPT_BLE_CTX to new netopt doc style
Documentation of the option types was clarified in #8655. I only noticed
after merging #8884, that `NETOPT_BLE_CTX` was not documented using
that new style. So I deliver the change myself to make it quicker.
2018-04-06 11:32:41 +02:00
Hauke Petersen
49bd85d00a sys/net: added Skald
Skald is a very small and simple, TX-only BLE stack that supports
sending advertisements only. It is useful for building all kinds
of BLE beacons with very minimal memory footprints.
2018-04-06 11:18:53 +02:00
Hauke Petersen
77499905e4 sys/net: added generic Eddystone defines 2018-04-06 11:18:53 +02:00
Hauke Petersen
3b6c8f25de sys/net: added generic BLE defines 2018-04-06 11:18:53 +02:00
Hauke Petersen
4e715e8221 drivers/netdev: added BLE adaption for netdev 2018-04-06 11:18:53 +02:00
Martine Lenders
9efbfcd3ae doc: remove sys_util references
This removes all references of the `sys_util` documentation group which
does not exist. Due to it being referenced by some module
documentations there were some cases where the rendered doc was broken:

* `div` did not appear in the list of modules
* `iolist` appeared on top level of the module tree
2018-04-05 14:39:59 +02:00
Joakim Nohlgård
0befe39333 xtimer: Add XTIMER_SHIFT = 6 automatic option 2018-04-05 12:21:42 +02:00
Josarn
bb7acca31e sys/include/xtimer: Added xtimer_set64() 2018-04-04 16:58:59 +02:00
Ken Bannister
c23d85ab3a
Merge pull request #8854 from kb2ma/gcoap/internalize_gcoap_state
net/gcoap: Internalize definition of state struct
2018-03-31 12:15:00 +01:00