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

5323 Commits

Author SHA1 Message Date
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
bf33941819
Merge pull request #9434 from miri64/gnrc_pktbuf_static/fix/alignment-race
gnrc_pktbuf_static: fix alignment issue / leaks
2018-07-02 16:32:13 +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
Joakim Nohlgård
bbf4f1e453 gnrc_netif: Enable RX and TX complete events after netdev init 2018-06-29 21:53:23 +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
cb74063573 gnrc_sock_udp: use sock's local end-point for listening
Without this fix the listener doesn't actually listen on the
(potentially) ephemeral port introduced in #9382, but on port 0 which is
wrong.
2018-06-28 17:25:26 +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
Joakim Nohlgård
904c583038
Merge pull request #8697 from aabadie/pr/drivers/params/lis3dh
drivers/lis3dh: apply unified driver params scheme + cleanup
2018-06-28 10:52:48 +02:00
Martine Lenders
acfe57a52b gnrc_pktbuf_static: reduce checks to be in line with new alignment 2018-06-27 17:19:34 +02:00
Martine Lenders
8a75d8d189 gnrc_pktbuf_static: fix alignment issue / leaks
This fixes an alignment issue I encountered in the static version of
the packet buffer.

The bug is caused by a race-condition where a certain order of
operations leads to a chunk being released according to the
byte-alignment of the platform, but overlapping potential space for
a future `_unused_t` struct e.g. (x mark allocated regions):

                    Future leak of size sizeof(_unused_t)       Time
                    v                                            |
    +------------+-----+--------------------+                    |
    |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|                    +
    +------------+-----+--------------------+                    |
                                                                 |
    +------------+--+--+--------------------+                    |
    |               |xxxxxxxxxxxxxxxxxxxxxxx|                    +
    +------------+--+--+--------------------+                    |
                                                                 |
    +-----+------+--+--+--------------------+                    |
    |xxxxx|         |xxxxxxxxxxxxxxxxxxxxxxx|                    +
    +-----+------+--+--+--------------------+                    |
                                                                 |
    +-----+------+-----+---------+----------+                    |
    |xxxxx|                      |xxxxxxxxxx|                    +
    +-----+------+-----+---------+----------+                    |
                                                                 |
    +-----+------+-----+--------------------+                    |
    |xxxxx|      |xxxxxxxxxxxxxxxxxxxxxxxxxx|                    +
    +-----+------+-----+--------------------+                    |
                                                                 |
    +------------+-----+--------------------+                    |
    |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|                    +
    +------------+-----+--------------------+                    |
                                                                 |
    +------------+-----+--------------------+                    |
    |xxxxxxxxxxxxxxxxxx|                    |                    +
    +------------+-----+--------------------+                    |
                                                                 |
    +------------+-----+--------------------+                    |
    |            |xxxxx|                    |                    +
    +------------+-----+--------------------+                    |
                                                                 v

Sadly, I wasn't able to create a reproducable unittest that show-cases
this corner-case, since I don't understand the order of operations that
cause this one 100%, but the bug is reproducable (but also not
reliably) by sending large (i.e. fragmented) packets to a 6Lo-enabled
host from more than 1 host simultaneously (use `gnrc_pktbuf_cmd` to
check).

By making the size of `_unused_t` the only condition for alignment,
this bug is fixed.
2018-06-27 17:18:24 +02:00
6e6716a1a6
Merge pull request #9317 from maribu/sht1x
drivers/sht11: Major refactoring
2018-06-27 10:10:39 +02:00
Marian Buschsieweke
b91359b05b
drivers/sht1x: Added SAUL integration 2018-06-27 08:58:05 +02:00
Marian Buschsieweke
de9b67bdc2
drivers/sht1x: Major refactoring
- Use RIOT's GPIO interface to access the sensor to increase portability
- Changed API to allow more than one sensor per board
- Added `sht1x_params.h` that specifies how the sensors is connected - each
  board can overwrite default settings by #defining SHT1X_PARAM_CLK and
  SHT1X_PARAM_DATA
- Changed arithmetic to use integer calculations only instead of floating point
  arithmetic
- Added support for checking the CRC sum
- Allow optional skipping of the CRC check to speed up measuring
- Added support for advanced features like reducing the resolution and skipping
  calibration to speed up measuring
- Allow specifying the supply voltage of sensor which heavily influences the
  temperature result (and use that information to calculate the correct
  temperature)
- Reset sensor on initialization to bring it in a well known state
- Support for the obscure heater feature. (Can be useful to check the
  temperature sensor?)
- Updated old SHT11 shell commands to the new driver interface, thus allowing
  more than one SHT10/11/15 sensor to be used
- Added new shell command to allow full configuration of all attached SHT1x
  sensors
- Removed old command for setting the SHT11 temperature offset, as this feature
  is implemented in the new configuration command
2018-06-27 08:58:00 +02:00
Marian Buschsieweke
d208c224b0
drivers: Renamed module sht11 to sht1x
The sensor family SHT10, SHT11 and SHT15 only differ in their accuracy (as in
calibration, not as in resolution). Thus, the same driver can be used for all.
The new driver name better reflects this fact.
2018-06-27 08:57:58 +02:00
Hyungsin
0c5c3d9b77 driver/pir: add pir-based occupancy sensing 2018-06-26 13:46:37 -07: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
Cenk Gündoğan
bc57e901a8
Merge pull request #9374 from PeterKietzmann/pr_sys_sha1prng
sys/random: add SHA1PRNG
2018-06-22 16:22:09 +02:00
PeterKietzmann
3c4360eddb sys/random: add SHA1PRNG 2018-06-22 16:11:53 +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
Cenk Gündoğan
3712cdffc2
Merge pull request #9391 from miri64/shell/feat/pktbuf-cmd
shell_commands: add command for packet buffer stats
2018-06-22 10:04:37 +02:00
Martine Lenders
a6a7357077 shell_commands: add command for packet buffer stats
I'm using something like this command for a while now for debugging
GNRC. Usually, I just patch it into the application I'm using it with,
but I think there is a benefit to also provide it to RIOT upstream
properly.
2018-06-22 09:51:17 +02:00
Martine Lenders
0c9d7aeedc gnrc_rpl: exit early if netif_hdr is NULL in send function
Without this fix RPL might crash when the packet buffer is full.
2018-06-21 14:51:47 +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
danpetry
ce37449dd5
Merge pull request #9090 from jcarrano/newlib-missing-functions
sys/newlib: Bugfix, add missing syscalls (only stubs)
2018-06-21 13:55:38 +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
Cenk Gündoğan
0c428ecb2e gnrc_rpl: remove events from the queue before memset() 2018-06-21 10:41:13 +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
a33399edf7 gnrc_sock_udp: provide fix for error state for full port pool 2018-06-20 14:51:18 +02:00
Martine Lenders
f8524cb4c0 gnrc_sock_udp: provide port for #9376 API fix 2018-06-20 14:51:17 +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
Gaëtan Harter
acef97aa15
Merge pull request #9243 from cladmi/pr/warning/missing_include_dirs
makefiles/cflags.inc.mk: add -Wmissing-include-dirs flag
2018-06-18 13:13:54 +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
Ken Bannister
4f8c3b7d18
Merge pull request #9310 from miri64/gcoap/enh/clients-without-response-handlers
gcoap: don't allocate memo for clients without response handlers
2018-06-15 10:28:30 -04:00
Martine Lenders
b03aa528e8 gcoap: don't allocate memo for clients without response handlers 2018-06-15 09:46:50 +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
Gaëtan Harter
726581fc2e
sys/Makefile.include: remove non existing include directory
The include/crypto path should include 'sys' to be vavil

But all source files are already using '#include "crypto/HEADER.h"' so it does
not need fixing.
2018-06-12 14:08:29 +02:00
Martine Lenders
91c65e40f8
Merge pull request #9327 from cgundogan/pr/tlsf_total_sizes
tlsf: add custom walker to get total free / used sizes
2018-06-12 10:07:07 +02:00
Cenk Gündoğan
0009213072 tlsf: add custom walker to get total free / used sizes 2018-06-12 09:43:48 +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
Juan Carrano
cce83b4443 sys/newlib: Add missing syscalls (stubs).
Add small stubs for _times_r and _link_r so that code using times()
or link() can still compile. The functions are marked as not implemented
and return invalid codes.
2018-06-11 14:54:47 +02:00
Martine Lenders
ec5ca98b4d
Merge pull request #9320 from brummer-simon/gnrc_tcp-set_ip_src_addr_directly
gnrc_tcp: Set src addr in outgoing packets by tcp layer.
2018-06-11 14:20:21 +02:00
1c46829a78
Merge pull request #9085 from kb2ma/nanocoap/build_request_pkt
net/nanocoap: Build message with coap_pkt_t
2018-06-11 10:00:38 +02:00
Ken Bannister
43db2715cd net/nanocoap: create pkt-based request
Includes string and uint options.
2018-06-10 08:44:16 -04:00
Cenk Gündoğan
5ca031d4fa
Merge pull request #9179 from PeterKietzmann/pr_ccnl_shell_cs
shell/ccnl: use new CS add method
2018-06-10 13:35:50 +02:00
Simon Brummer
370fe1e475 gnrc_tcp: Set src addr in outgoing packets by tcp layer. 2018-06-10 13:26:23 +02:00
PeterKietzmann
d3d012c077 shell/ccnl: use new CS add method 2018-06-10 12:11:44 +02:00
Cenk Gündoğan
c135f2639e
Merge pull request #9300 from miri64/gnrc_ipv6_nib/fix/rtr-timeout-wrong-ctx
gnrc_ipv6_nib: use router instead of netif for router timeout context
2018-06-07 13:40:48 +02:00
Hauke Petersen
36ecaa6e4b net/emcute: use global byteorder functions 2018-06-07 12:10:58 +02: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
Martine Lenders
b6ab9eb343 gnrc_ipv6_nib: use router instead of netif for router timeout context
`GNRC_IPV6_NIB_RTR_TIMEOUT` [expects a default router entry][doc] as
context, so using the `netif` here is clearly wrong. This causes the
hardfault described in #9297.

[doc]: http://doc.riot-os.org/group__net__gnrc__ipv6__nib.html#ga1c7e892ef6533f699c4e64737c2847c2
2018-06-06 11:37:51 +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
22ad3aa12e gnrc_ndp: only send RAs when VALID address is found
Otherwise, it may happen that `::` or a global address is chosen by
the IPv6 header fill function. Both types of addresses are
[not valid for RAs](https://tools.ietf.org/html/rfc4861#section-4.2)
2018-05-31 17:11:26 +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
Martine Lenders
478287701c
Merge pull request #9242 from jcarrano/fix-embunit-invalid-cast
sys/embunit: Fix incompatible declaration in outputter.
2018-05-31 10:04:04 +02:00
Martine Lenders
57d3c4698c gcoap: don't drop observer on re-register
With #9209 gCoAP got the ability to re-register and OBSERVE with a new
token, sadly the `observer` variable wasn't set in that fix, so a
re-registration actually led to the deletion of the observer (because it
is still `NULL` when the old registration is overwritten in l. 317)
2018-05-30 23:05:25 +02:00
Juan Carrano
841c7195ba sys/ps: Use correct define for TLSF information.
The macro MODULE_TLSF_MALLOC indicates if tlsf is being used as the system-wide
allocator. MODULE_TLSF only incates if TLSF is present.
PS should check for MODULE_TLSF_MALLOC to decide if heap information should be
displayed.
2018-05-30 14:13:25 +02:00
Juan Carrano
40e58a1afc sys/embunit: Fix incompatible declaration in outputter.
OutputterPrintHeaderFunction is declared as a function of 1 parameter
but CompilerOutputter_printHeader was defined as taking 2.

It is a mystery why this code compiled before.
2018-05-30 12:01:45 +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
5be4b7f5c8
Merge pull request #9226 from miri64/gnrc_netif/enh/error-on-multicast-space
gnrc_netif: fail IPv6 address addition if no space for solicited nodes
2018-05-29 20:30:26 +02:00
Ken Bannister
341debd5e0
Merge pull request #9209 from kb2ma/gcoap/observe_change_token
net/gcoap: Observer re-register with new token
2018-05-29 18:06:07 +00:00
Martine Lenders
a082e10157 gnrc_netif: add GNRC specific implementation of netif.h 2018-05-29 19:49:29 +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
Ken Bannister
d7dde2dded net/gcoap: observer re-register with new token 2018-05-29 13:30:05 -04:00
Martine Lenders
d3d7a49d7a gnrc_netreg: make message queue requirement more visible 2018-05-29 19:21:48 +02:00
Bas Stottelaar
99755eaa0c sys: random: add fortuna PRNG 2018-05-29 18:40:58 +02:00
Martine Lenders
ced615a7ae
Merge pull request #9224 from maribu/ping6
shell_commands/ping6: Fixed bug in calculation of average round trip time
2018-05-29 14:27:49 +02:00
Cenk Gündoğan
5230e7732c
Merge pull request #9188 from miri64/gnrc_pktdump/enh/print-rest
gnrc_pktdump: print rest of snip as hex if available
2018-05-29 13:32:39 +02:00
Marian Buschsieweke
b4b088be9e
shell_commands/ping6: Fixed bug in calculation of average round trip time
The average rout trip time has been to low in case packets were lost, as lost
packets were treated as if that had an RTT of 0.
2018-05-29 12:36:05 +02:00
Martine Lenders
8c77cbb903 gnrc_pktdump: print rest of snip as hex if available
Currently, `gnrc_pktdump` only prints the header part of a snip.
However, if the snip wasn't parsed yet by the corresponding GNRC
module (or the module doesn't exist because the node is e.g. just a
forwarder), additional data might not be printed.

This makes it hard to analyze the data properly (sometimes you not only
want to know where the IPv6 packet is supposed to go, you also want to
know what's in it). So this just prints the rest of the snip as a hex
dump.
2018-05-29 12:33:06 +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
Hauke Petersen
7f2fb5e0a3 net/emcute: use correct number of retries
syncsend() is used also for the initial packet, so resending
while (retries <= EMCUTE_N_RETRY) is the correct behavior.
2018-05-28 11:41:20 +02: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
Loïc Dauphin
260bc37958
Merge pull request #5914 from cgundogan/pr/ndn-riot_as_a_pkg
pkg: ndn-riot: initial import of ndn-riot as a package
2018-05-24 18:29:22 +02:00
smlng
1011803867 net/gnrc/rpl: fix doxygen grouping 2018-05-24 14:38:27 +02:00
Cenk Gündoğan
f64265de57 gnrc_pktdump: add hex dump for NDN 2018-05-24 10:58:26 +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
Cenk Gündoğan
1fb4789e1b auto_init: add ndn-riot 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
smlng
e97882dc56 evtimer: use conversion macro US_PER_MS 2018-05-23 15:13:31 +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
Juan Carrano
cf686bde2d pkg/tlsf: Refactor the TLSF package and bring back original TLSF api.
- Cleanup package makefile.
- Download directly from git.
- Remove giant patch.
- Implement malloc function as a contrib package.
- Update ccn example.
- Update ps command.
2018-05-18 15:41:07 +02:00
Cenk Gündoğan
94541e1802
Merge pull request #9145 from bergzand/pr/trickle/ms_us_swap
trickle: remove msg_time member from struct
2018-05-18 15:00:52 +02:00
Cenk Gündoğan
ab0071622b
Merge pull request #9121 from kaspar030/uart_stdio_workaround
sys/uart_stdio: compile with -Wno-cast-function-type
2018-05-17 17:13:30 +02:00
1c03b67cab sys/uart_stdio: compile with -Wno-cast-function-type 2018-05-17 17:03:27 +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
d6f9be77b5
Merge pull request #9123 from maribu/pack_structs
gnrc/netif/hdr.h: Optimized structure layout
2018-05-14 14:29:09 +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
372aadd626
Merge pull request #8978 from Hyungsin/forupstream_fxos8700
drivers: add driver for FXOS8700 3-axis accelerometer/magnetometer
2018-05-14 08:45:58 +02:00
Hyungsin
beaf08bcb2 drivers: add driver for FXOS8700 3-axis accelerometer/magnetometer 2018-05-12 17:51:58 -07:00
Gaëtan Harter
60d09e6b21
sys/icmpv6_hdr_print: replace PRIu8 by PRIu16
PRIu8 is not supported on samr21-xpro:

    type:   hu  code:   hu

After fix

    type: 133  code:   0

Found by running 'tests/gnrc_netif'
2018-05-11 17:41:25 +02:00
Gaëtan Harter
d0f22b787c
Merge pull request #8112 from cladmi/pr/crypto/input_len
crypto/ccm: fix input_len checking with length_encoding
2018-05-09 18:56:34 +02:00
Gaëtan Harter
fa33eacd1f
crypto/ccm: fix _fits_in_nbytes function
Function is broken with num_bytes >= 4.

Could happen when storing input_len with len_encoding >= 4.
It can take values from 2 to 8, so make it work for cases it would overflow.
2018-05-07 15:08:00 +02:00
Gaëtan Harter
ee311a331b
crypto/ccm: refactor input_len check in a function
Refactorg checking that length can be stored in a number of bytes to a
subfunction.
2018-05-07 15:08:00 +02:00
Wentao Shang
89023b3499
crypto/ccm: fix input_len check
Maximum input_len depends only on length_encoding and not auth_data_len.
The current length_max value was also wrong.

RFC3610 page 2

   3. The message m, consisting of a string of l(m) octets where 0 <=
      l(m) < 2^(8L).  The length restriction ensures that l(m) can be
      encoded in a field of L octets.
2018-05-07 15:08:00 +02:00
Martine Lenders
8a46cf611e gcoap: make message queue size configurable 2018-05-06 16:41:43 +02:00
9020767c2d
Merge pull request #9071 from cladmi/pr/make/riottools/arduino
sys/arduino: use RIOTTOOLS variable
2018-05-04 23:10:07 +02:00
Martine Lenders
3d821ee195 gnrc_rpl: remove route before updating it
The "new" forwarding table does not update an old route but just adds
another as long as it is not *exactly* the same. However, the RPL
adaptation missed to remove the old route so RPL got easily confused
about where it actually needed to send packets.
2018-05-04 17:46:02 +02:00
Gaëtan Harter
14ac80e15a
sys/arduino: use RIOTTOOLS variable
Follow up to #9067 and part of #8821
2018-05-04 11:16:48 +02:00
f9c75d0df7
Merge pull request #8915 from ZetaR60/RIOT_ads101x
drivers/ads101x: support for ADCs
2018-05-03 08:31:03 +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
0a18bc9e97
Merge pull request #9027 from bergzand/pr/nanocoap/req_ent_incomp
nanocoap: add request entity incomplete response code
2018-04-26 11:05:29 +02:00
51f06d5127
nanocoap: Add request entity incomplete code 2018-04-26 10:50:08 +02:00
4def1fa5fd
Merge pull request #8992 from Josar/evtimer_3
evtimer: optimized adding
2018-04-26 10:00:35 +02:00
Josarn
111f021eb3 evtimer: optimized adding 2018-04-25 17:58:54 +02:00
Martine Lenders
dc41f49229 cbor: add deprecation note 2018-04-25 16:46:17 +02:00
5251e140e6
Merge pull request #8991 from Hyungsin/forupstream_pulse_counter_fix
sys/auto_init: fix syntax error on auto_init_pulse_counter.c
2018-04-23 15:52:12 +02:00
Sebastian Meiling
4f97fc76fd
Merge pull request #8894 from beduino-project/fix-gnrc_ipv6_blacklist-build
gnrc: fix build of gnrc_ipv6_blacklist when ENABLE_DEBUG is disabled
2018-04-23 14:26:53 +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