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

6127 Commits

Author SHA1 Message Date
Jose Alamos
31ed92e171 sys/doc: add net_lorawan group 2019-04-12 15:51:15 +02:00
Jose Alamos
7d7cf6ef7f lorawan: add helpers for parsing LoRaWAN headers 2019-04-12 15:51:15 +02:00
Jose Alamos
fa8bbff6d1 net/loramac.h: add join header members size 2019-04-12 15:40:27 +02:00
chrysn
09dc930d3a nanocoap: add some const qualifiers 2019-04-12 11:04:47 +02:00
chrysn
a51460984b nanocoap: Add coap_opt_add_opaque
This option complements the existing coap_opt_add_{uint,string} and even
more special-purpose functions; its implementation is trivial given the
existing static _add_opt_pkt function.

The method is useful when working with ETags (ETag, If-Match options).
2019-04-12 11:04:47 +02:00
002057f918 sys: make uart_stdio RX optional 2019-04-11 14:26:45 +02:00
Olaf Bergmann
83e2932eb6 posix_sockets.c: fix send()/write() for connected UDP sockets
Calling send() or write() on a connected UDP socket raises a
kernel panic in posix_sockets.c, line 215, because _sockaddr_to_ep()
is called from socket_sendto() with address set to NULL.

This change modifies socket_sendto() to

* Check if the UDP socket is connected when the address argument
  is NULL.
* If connected, use the stored remote endpoint for sock_udp_send().
2019-04-10 11:19:13 +02:00
Sebastian Meiling
4dd09eaa06
Merge pull request #6178 from OTAkeys/pr/can_stm32
can stm32: add a driver for STM32 bxCAN peripheral
2019-04-08 08:50:08 +02:00
88171698e0
Merge pull request #10931 from kb2ma/nanocoap/pktapi_opt_enospc
net/nanocoap: Packet API return error if buffer full
2019-04-03 14:49:44 +02:00
Vincent Dupont
74ddf56171 tests/conn_can: build stm32 CAN drivers
Build can_stm32 module on boards which have a stm32 CAN controller.
2019-04-03 11:12:46 +02:00
637bbdd985 sys/random: add missing includes 2019-04-01 17:05:44 +02:00
Martine Lenders
d06c3fdcbb netopt: specify drop of device driver support for IPV6_IID
This is not used anymore within the RIOT code-base so it is time to plan
the removal of the driver support. The deprecation was already put up
for the 2019.01 release, so I think removing it for the 2019.07 release
seems reasonable.
2019-03-29 12:45:30 +01:00
Vincent Dupont
ae95137f95 can stm32: add a driver for STM32 bxCAN peripheral
This driver is compliant with the candev interface. It has been tested
with STM32F0 and STM32F2 and STM32F413 ONLY at this time but should be
compliant with other STM32Fx devices
2019-03-29 12:03:43 +01:00
14f47bf220
Merge pull request #10695 from aabadie/pr/drivers/lpsxxx
drivers/lpsxxx: refactor lps331ap and add support for lps25hb + lps22hb
2019-03-29 10:54:08 +01:00
Cenk Gündoğan
99fe24fcfd
Merge pull request #11298 from miri64/gnrc_netif/fix/falls-through-comment
gnrc_netif: fix fall-through comment
2019-03-28 08:10:37 +01:00
Peter Kietzmann
e9293d9192
Merge pull request #11257 from brummer-simon/gnrc_tcp-fix_packet_flood
gnrc_tcp: Fix packet-flood while probing
2019-03-28 00:37:33 +01:00
Martine Lenders
768a117ade gnrc_netif: fix fall-through comment
gcc 8.2.1 has problems with the comment being within the `#ifdef`
2019-03-27 19:45:40 +01:00
Cenk Gündoğan
44e4973cab
Merge pull request #11166 from miri64/gnrc_ipv6/fix/send-empty-payload
gnrc_ipv6: allow sending empty IPv6 packets
2019-03-27 19:17:01 +01:00
Martine Lenders
78247d9e35
Merge pull request #10464 from haukepetersen/opt_cordepsim_addrhandling
examples/cord_epsim: change default RD server addr handling
2019-03-27 18:57:54 +01:00
Martine Lenders
7931d66f79
Merge pull request #10895 from miri64/gnrc_rpl/enh/do-not-assert-netif
gnrc_rpl: do not assert netif on auto-init
2019-03-27 18:50:52 +01:00
Martine Lenders
c3efb91181 gnrc_ipv6: allow sending empty IPv6 packets 2019-03-27 18:45:04 +01:00
Martine Lenders
aa8e760e46
Merge pull request #11182 from miri64/gnrc_ipv6_nib/fix/pkt-null-on-error
gnrc_ipv6_nib: check if pkt is NULL on error
2019-03-27 18:38:32 +01:00
Hauke Petersen
840c8aeba2 cord/epsim: remove standalone submodule 2019-03-27 18:26:37 +01:00
Hauke Petersen
f8df35dcb3 cord/config: remove addr and port defaults 2019-03-27 18:26:37 +01:00
Hauke Petersen
3b842ba16a shell/cord_ep: used COAP_PORT as default port 2019-03-27 18:26:37 +01:00
Hauke Petersen
ec461661d8 net/cord_epsim: pass RD endpoint on runtime 2019-03-27 18:26:37 +01:00
Hauke Petersen
f2df22ed99
Merge pull request #10589 from miri64/l2util/feat/initial
l2util: initial import of a general IPv6 over X helper module
2019-03-27 11:46:12 +01:00
Martine Lenders
e9cd9584a4
Merge pull request #11288 from haukepetersen/opt_skald_movetoblefolder
ble/skald: move to sys/net/ble and fix doxygen groups
2019-03-26 23:56:28 +01:00
Martine Lenders
db8954fe60
Merge pull request #11267 from cladmi/pr/isrpipe/separate_read_timeout
isrpipe: split isrpipe_read_timeout to isolate xtimer dependency
2019-03-26 22:27:15 +01:00
Hauke Petersen
aad15751ad ble/skald: adapt doxygen groups 2019-03-26 21:56:05 +01:00
Martine Lenders
2e0203eb3e
Merge pull request #11271 from haukepetersen/add_bluetil_addr
ble/bluetil: add generic address to string module
2019-03-26 21:47:47 +01:00
Hauke Petersen
0c5929c185 ble/skald: move module to sys/net/ble 2019-03-26 21:37:35 +01:00
Martine Lenders
39fe2a30e4 gnrc_netif: use l2util for some functions
The following functions can now be wrapped around the more generalized
approach:

- gnrc_netif_ipv6_iid_from_addr()
- gnrc_netif_ipv6_iid_to_addr()
- gnrc_netif_ndp_addr_len_from_l2ao()
- gnrc_netif_eui64_from_addr()
2019-03-26 21:37:20 +01:00
Martine Lenders
573549c41f l2util: initial import
This module provide stack independently (just dependent on netdev's
network device types) several helper functions to get IPv6 over X
specific values.
2019-03-26 21:37:20 +01:00
Gaëtan Harter
b07eecd619
isrpipe: split isrpipe_read_timeout to isolate xtimer dependency
This defines a new 'isrpipe_read_timeout' module that should be used when using
the timeout based function of isrpipe.

This fix the implicit dependency to 'xtimer' that is only needed for the
'_timeout' functions.

It prevents 'stdio_uart' that uses 'isrpipe' to need to depend on xtimer.
This was silently solved at link time for most platforms but not for the
'esp32' for example.

'drivers/at' needed to be updated at the same time to follow the api change.
2019-03-26 21:36:24 +01:00
Peter Kietzmann
f6efecc3f0
Merge pull request #11063 from miri64/gnrc_sixlowpan_frag/enh/msg-send-to-6lo
gnrc_sixlowpan_frag: encapsulate msg_send_to_self()
2019-03-26 21:26:04 +01:00
Martine Lenders
add337cff9
Merge pull request #10769 from miri64/gnrc_ipv6/enh/ipv6-sending-debug
gnrc_ipv6: add sending DEBUG output
2019-03-26 21:17:16 +01:00
Simon Brummer
5d1ab9b34c gnrc_tcp: Fix packet-flood while probing 2019-03-26 21:05:53 +01:00
Hauke Petersen
81ff7ff65a ble/bluetil: add ble address helper submodule 2019-03-26 21:05:11 +01:00
Martine Lenders
3f2e0e70cb gnrc_ipv6: add sending DEBUG output 2019-03-26 20:19:35 +01:00
Martine Lenders
83b9f72f83
Merge pull request #11011 from miri64/ndp/enh/add-hop-limit-define
ndp: provide define for common hop-limit
2019-03-26 20:18:07 +01:00
Martine Lenders
1d2ccb243e
Merge pull request #11233 from haukepetersen/opt_bluetilad_find_and_cmp
net/bluetil/ad: add bluetil_ad_find_and_cmp()
2019-03-26 19:34:46 +01:00
Martine Lenders
05bca5b2cf gnrc_netif: fix DEBUG output on error
`res` is an integer that is always negative in the given case, so using
`%u` here might be a little bit confusing.
2019-03-26 18:23:56 +01:00
Martine Lenders
116642f1de
Merge pull request #11164 from miri64/gnrc_sixlowpan_iphc/fix/check-NULL-ptr-for-compressible
gnrc_sixlowpan_iphc: check ptr != NULL in compressible check
2019-03-26 17:49:10 +01:00
Martine Lenders
06e244c963 ndp: provide define for common hop-limit 2019-03-26 12:00:52 +01:00
Martine Lenders
9319c320d8
Merge pull request #11268 from haukepetersen/opt_ble_doxygen
net/ble: cleanup doxygen grouping
2019-03-26 10:02:40 +01:00
Hauke Petersen
f5467ef9f1 net/ble: cleanup doxygen grouping 2019-03-25 19:04:05 +01:00
Kevin "Bear Puncher" Weiss
096e4a2354
Merge pull request #11240 from maribu/i2c_scan
shell: Add command i2c_scan
2019-03-25 15:25:17 +01:00
Marian Buschsieweke
6b0082bb3f
shell: Add command i2c_scan
Add a trivial shell program that scans for all slaves on an I2C bus by iterating
all of the possible 127 I2C addresses and checking for the ACK of the device.
2019-03-25 14:10:04 +01:00
Martine Lenders
bcb6b921d3
Merge pull request #11255 from aabadie/pr/gnrc_netif_nrfmin_fix
net/gnrc_netif/nrfmin: put NETOPT_PROTO assert at the right place
2019-03-24 15:01:50 +01:00
5fa2528185
net/gnrc_netif/nrfmin: put NETOPT assert at the right place
NETOPT depends on GNRC_SIXLOWPAN and should be moved inside the corresponding preprocessor conditional code
2019-03-24 14:34:12 +01:00
Jose Alamos
83ba971412
gnrc_netif: add NETDEV_TYPE_LORA to L2ADDR check 2019-03-24 11:10:41 +01:00
Gunar Schorcht
85319e23d5 sys/riotboot: doxygen fix in slot.h 2019-03-23 11:27:30 +01:00
Hauke Petersen
d293d3ece0 net/bluetil/ad: add bluetil_ad_find_and_cmp() 2019-03-21 21:50:34 +01:00
5338d0403f
sys/auto_init: rename lps331ap to lpsxxx unified version 2019-03-20 14:43:36 +01:00
Martine Lenders
4ee4625f39
Merge pull request #10357 from jcarrano/posix_headers-module
sys/posix: make posix module provide only headers.
2019-03-20 14:07:12 +01:00
Juan Carrano
6b766c3cd3 sys/posix: make posix module provide only headers.
The build system contains several instances of
 INCLUDES += -I$(RIOTBASE)/sys/posix/include

This is bypassing the module management system, by directly accesing
headers without depending on a module. The module is the posix module.

That line is also added when one of the posix_* modules is requested.

According to the docs, the posix module provides headers only, but in
reality there is also inet.c.

This patch:

- Moves `inet.c` into `posix_inet`, leaving `posix` as a headers-only
  module.
- Rename `posix` as `posix_headers` to make it clear the module only
  includes headers.
- Makes `posix_*` modules depend on `posix_headers`, thus removing the
  explicit `INCLUDES+=...` in `sys/Makefile.include`.
- Ocurrences of `INCLUDES+=...` are replaced by an explicit dependency
  on `posix_headers`.
2019-03-20 12:57:13 +01:00
Gaëtan Harter
31c21e4165
Merge pull request #11165 from kaspar030/fix_xtimer_lock_timeout
sys/xtimer: make xtimer_mutex_lock_timeout() actually use us arg
2019-03-20 12:29:41 +01:00
Martine Lenders
fb5a298c1f
Merge pull request #11193 from haukepetersen/rm_pkbuf_getiovec
net/gnrc_pktbuf: rm deprecated _pktbuf_get_iovec()
2019-03-19 11:52:14 +01:00
Ken Bannister
23e11f8a7d net/nanocoap: clarify API buffer space doc 2019-03-19 05:30:04 -04:00
Ken Bannister
5bf2fc6227 net/nanocoap: return error from coap_opt_finish if no space 2019-03-19 05:30:04 -04:00
Ken Bannister
3cdf43607c net/nanocoap: Return error from coap_opt_add_xxx() if no space 2019-03-19 05:30:04 -04:00
fb2c7eaec4
Merge pull request #11181 from kaspar030/add_riotboot_flashwrite
riotboot: add riotboot_flashwrite module
2019-03-18 11:15:25 +01:00
Leandro Lanzieri
6bb4158c31 sys/net/application_layer/nanocoap: Add path prefix opt
This adds a prefix option for the methods field of a coap resource and
modifies the way the path is matched on a request to accept prefix
matching.
2019-03-17 14:26:11 +01:00
Semjon Kerner
db589365f0
Merge pull request #11161 from miri64/gnrc_pktbuf/fix/start-write-size-0
gnrc_pktbuf: allow write-protect of size 0 snips
2019-03-15 15:10:59 +01:00
Marian Buschsieweke
50e939e808
Merge pull request #11092 from benpicco/rssi_ping
shell_commands: include RSSI in ping output
2019-03-15 13:51:22 +01:00
ccc09d9ed4
Merge pull request #11023 from miri64/gnrc_netif_ieee802154/enh/propagate-pend-frames
gnrc_netif_ieee802154: propagate pend. frame flag to stack
2019-03-15 12:51:50 +01:00
a15f07b04b riotboot: move slot variables to sys/riotboot/Makefile.include 2019-03-15 12:32:50 +01:00
d75c1fd76c sys/riotboot: introduce riotboot_slot_other() 2019-03-15 12:32:50 +01:00
ae35860510 sys/riotboot: add flashwrite submodule 2019-03-15 12:32:50 +01:00
Martine Lenders
946b06e4f0 gnrc_netif: increase message queue size
Since the netif threads are in general a more heavy lifters than the
rest of the GNRC there queue size should be increased.
2019-03-15 12:08:43 +01:00
Hauke Petersen
9fb2f541ba net/gnrc_pktbuf: rm deprecated _pktbuf_get_iovec() 2019-03-15 10:21:22 +01:00
71204d1d70
Merge pull request #9830 from bergzand/pr/usb/usbdev
usbdev: Introducing a generic USB device driver API
2019-03-14 22:48:47 +01:00
30c8d97092
usbopt: Add usb control operation enum
Add usbopt, a number of defines to control USB peripheral device
settings. Options are split into settings for USB devices and USB
endpoints.
2019-03-14 21:40:05 +01:00
f52d0c7c53
usb: Add defines for USB peripheral devices 2019-03-14 21:39:57 +01:00
Martine Lenders
b970d00064 gnrc_ipv6_nib: check if pkt is NULL on error
According to the documentation of `gnrc_ipv6_nib_get_next_hop_l2addr()`
`pkt` may be `NULL`. However, whenever that function sends an error
message (the methods for that require `orig_pkt` not to be NULL) `pkt`
is not checked, which may lead to failed assertions.
2019-03-14 14:29:13 +01:00
Ken Bannister
34e880499e examples/cord_ep: use coap_opt_finish() 2019-03-13 00:24:29 -04:00
Ken Bannister
682c1e9a7d examples/cord_epsim: use coap_opt_finish() 2019-03-13 00:24:29 -04:00
297efdd5b2
Merge pull request #10892 from kb2ma/gcoap/use_opt_finish
net/gcoap: Replace use of gcoap_finish() with coap_opt_finish()
2019-03-12 22:16:32 +01:00
Martine Lenders
3582dedd4e gnrc_sixlowpan_iphc: check ptr != NULL in compressible check
Not only does this leave open a risk to crash the node for the check
in `_compressible()` but also is the `tmp` check below getting confused
when `ptr` is `NULL`, since `gnrc_pktbuf_start_write()` returns `NULL`
in that case.
2019-03-12 16:48:33 +01:00
069a1f6e8b sys/xtimer: make xtimer_mutex_lock_timeout() actually use us arg 2019-03-12 16:09:04 +01:00
Martine Lenders
4f733840c6 gnrc_pktbuf_malloc: allow write-protect of size 0 snips
Size 0 snips are legal packet snips (empty payload e.g.) so it doesn't
make sense to issue an error in the write-protection in that case.

API documentation doesn't mention it either and the tests still pass
with the check removed.
2019-03-12 14:35:58 +01:00
Martine Lenders
efb658a67c gnrc_pktbuf_static: allow write-protect of size 0 snips
Size 0 snips are legal packet snips (empty payload e.g.) so it doesn't
make sense to issue an error in the write-protection in that case.

API documentation doesn't mention it either and the tests still pass
with the check removed.
2019-03-12 14:34:49 +01:00
891580aba7
sys/auto_init: add support for periph_temperature 2019-03-08 21:14:22 +01:00
Martine Lenders
931b179d14 gnrc_sixlowpan_frag: encapsulate msg_send_to_self()
This makes it easier to access this functionality for test cases e.g.
from the `main` thread.
2019-03-08 19:32:46 +01:00
Marian Buschsieweke
8dbd3b24d1
Merge pull request #11124 from miri64/gnrc_sixlowpan/fix/debug-pri
gnrc_sixlowpan: don't use PRIx8
2019-03-08 10:25:27 +01:00
Martine Lenders
449d4559a7 gnrc_sixlowpan_frag: replace printf with DEBUG 2019-03-07 18:17:07 +01:00
Martine Lenders
f6d3290507 gnrc_sixlowpan: don't use PRIx8
With newlib nano-specs the debug output without this change will be

    6lo: dispatch 0hx ... is not supported

With this PR this will provide a correct output, e.g.

    6lo: dispatch 0x3f ... is not supported
2019-03-07 12:45:27 +01:00
Hauke Petersen
368ab65d8a sys/random: cleanup includes 2019-03-07 10:22:10 +01:00
MrKevinWeiss
c36cf5743f tests/shell: Add app_metadata to shell tests
Adds app_metadata to the shell test
This both serves as a simple test to see if the module is available
and doesn't crash as well as an example
2019-03-06 13:07:57 +01:00
Benjamin Valentin
d89dd0d9e9 shell_commands: include RSSI in ping output
I was looking for a quick way to gauge the link quality between two nodes,
so I added the rssi to the output of the ping6 command.

Maybe this is generally useful to have.
2019-03-06 10:58:09 +01:00
MrKevinWeiss
7a220d16a8 sys/shell: Add shell command for app_metadata
This make an easily accessable shell command to print app_metadata
2019-03-05 16:10:06 +01:00
MrKevinWeiss
fc80ae7724 sys/app_metadata: Add app_metadata module
This allows a access to application metadata such as BOARD, CPU, etc.
It prints the contents to the stdio in a standard json form
2019-03-05 16:10:06 +01:00
Semjon Kerner
20728c2528 sys/auto_init: add auto_init for nrf52 ieee802.15.4 driver 2019-03-04 13:21:47 +01:00
Semjon Kerner
c2a40be458 drivers/netdev_ieee802154: add mac header filter 2019-03-04 13:21:43 +01:00
Martine Lenders
dd1bad25df
Merge pull request #11071 from kb2ma/nanocoap/fix_server_abort
net/nanocoap: don't abort server on recv error
2019-02-26 21:35:05 +01:00
Martine Lenders
bef475e450 gnrc_rpl_auto_init: add workaround comments 2019-02-26 20:33:07 +01:00
Ken Bannister
05195ec4a1 net/nanocoap: don't abort server on recv error 2019-02-26 12:35:49 -05:00
Martine Lenders
7d8f6abd45 gnrc_netif: check all required options on initialization
With `DEVELHELP` activated all required options required by GNRC are
now checked at interface initialization, so that developers of new
link-layer protocols or device drivers notice as soon as possible that
something is missing.
2019-02-26 16:45:21 +01:00
Martine Lenders
0f1bfad15b gnrc_netif: provide addr_len_from_l2ao for nordic_softdevice_ble 2019-02-26 15:43:39 +01:00
Martine Lenders
13030d5a35 gnrc_netif: expose message queue size configurable 2019-02-26 13:26:20 +01:00
Juan I Carrano
7e0891ebe5
Merge pull request #10989 from maribu/thread_stats
core: Use enum for thread states
2019-02-22 17:17:19 +01:00
Martine Lenders
727a843ce4
Merge pull request #10905 from maribu/packet_size_l2_pdu
net: NETOPT_MAX_{PACKET_SIZE -> PDU_SIZE}
2019-02-22 15:23:00 +01:00
Martine Lenders
998b9ed0d4 gnrc_netif_hdr: make in parameters const 2019-02-21 12:43:08 +01:00
Hauke Petersen
64489e8b44 sys/random: add hwrng as seed source (if available) 2019-02-19 18:09:40 +01:00
Hauke Petersen
8a135d3a43 sys/random: add guard for periph/cpuid include 2019-02-19 18:09:40 +01:00
Hauke Petersen
e070d5a694 sys/random: fix indention in doxygen header 2019-02-19 18:09:40 +01:00
Marian Buschsieweke
aaacd16248
sys/shell: NETOPT_MAX_{PACKET_SIZE -> PDU_SIZE}
Updated the ifconfig shell command to use NETOPT_MAX_PDU_SIZE instead of the
deprecated NETOPT_MAX_PACKET_SIZE
2019-02-18 20:18:48 +01:00
Marian Buschsieweke
4672368d5a
sys/net: NETOPT_MAX_{PACKET_SIZE -> PDU_SIZE}
Updated code to use NETOPT_MAX_PDU_SIZE instead of deprecated
NETOPT_MAX_PACKET_SIZE.
2019-02-18 20:15:08 +01:00
Marian Buschsieweke
5ba72df5aa
net: NETOPT_MAX_{PACKET_SIZE -> PDU_SIZE}
Renamed NETOPT_MAX_PACKET_SIZE into NETOPT_MAX_PDU_SIZE and updated the
 documentation. NETOPT_MAX_PACKET_SIZE is introduced as preprocessor alias
 for NETOPT_MAX_PDU_SIZE to remain backward compatible and is marked as
 deprecated.
2019-02-18 20:15:05 +01:00
ac775b8ae5
Merge pull request #9181 from haukepetersen/opt_event_independencefromthread
sys/event: make event queue independent from thread
2019-02-16 13:50:14 +01:00
Peter Kietzmann
902a6d619a
Merge pull request #10919 from leandrolanzieri/drivers/ad7746
drivers: Add AD7746 capacitance sensor driver
2019-02-15 16:23:25 +01:00
Martine Lenders
eac066a1e5 gnrc_netif_ieee802154: propagate pend. frame flag to stack
This way we can re-use the flag e.g. for forwarding
2019-02-15 14:46:43 +01:00
Leandro Lanzieri
a13ab5ee08 drivers/ad7746: Add SAUL integration 2019-02-15 13:37:45 +01:00
Leandro Lanzieri
afeb5c1e04 sys/phydat: Add capacitance unit (F) 2019-02-15 13:37:45 +01:00
Martine Lenders
8da4957cdd
Merge pull request #11015 from miri64/gnrc_sixlowpan_frag/enh/rm-pid
gnrc_sixlowpan_frag: remove redundant PID member
2019-02-15 12:48:27 +01:00
Martine Lenders
0954fabdc7 gnrc_sixlowpan_frag: make datagram size uint16_t for send
It can't get bigger, so it doesn't make sense to waste another 2 byte
on it.
2019-02-15 11:23:46 +01:00
Martine Lenders
b27f12bc1f gnrc_sixlowpan_frag: remove redundant PID member
The interface ID is actually also provided in `pkt` so providing it in
the `gnrc_sixlowpan_msg_frag_t` struct is redundant.
2019-02-15 11:23:18 +01:00
José Alamos
d5b39319f6
Merge pull request #11014 from jia200x/pr/pktbuf_mark_doc
net/gnrc/pktbuf.h: add note in gnrc_pktbuf_mark
2019-02-14 17:14:55 +01:00
Jose Alamos
f7ac0c57e9 net/gnrc/pktbuf.h: add note in gnrc_pktbuf_mark 2019-02-14 15:09:03 +01:00
Marian Buschsieweke
4c3e92f183
core: Made thread state an enum
- Introduced enum type `thread_state_t` to replace preprocessor macros
- Moved thread states to `sched.h` for two reasons:
  a) Because of the interdependencies of `sched.h` and `thread.h` keeping it in
     `thread.h` would result in ugly code.
  b) Theses thread states are defined from the schedulers point of view, so it
     actually makes senses to have it defined there
2019-02-13 13:31:52 +01:00
Cenk Gündoğan
3fd13b9a85
Merge pull request #10985 from miri64/gnrc_ipv6_nib/fix/delayed-na
gnrc_ipv6_nib: fix preparation of delayed NA
2019-02-12 20:47:42 +01:00
Gaëtan Harter
8e4b11cdd0
Merge pull request #10369 from miri64/gnrc_ipv6_nib/fix/arsm-16-bit
gnrc_ipv6_nib/arsm: ensure proper int width in backoff calculation
2019-02-12 17:54:52 +01:00
Martine Lenders
82001cfd79 gnrc_ipv6_nib: expose non-randomized part of NS-backoff calculation
This was primarily done so the backoff can be tested
2019-02-12 17:01:14 +01:00
Martine Lenders
1f4d57d608 gnrc_ipv6_nib/arsm: ensure proper int width in backoff calculation
Otherwise, the result might flow over on 8/16-bit platforms
2019-02-12 17:01:14 +01:00
Juan I Carrano
f344bb20c5
Merge pull request #10630 from jcarrano/shell-flush-echo
sys/shell: ensure character is flushed when echoing.
2019-02-12 15:19:17 +01:00
Martine Lenders
aa953a40ea gnrc_ipv6_nib: fix preparation of delayed NA
Currently the constructed NA for a delayed NA case is neither used nor
released nor does it get an IPv6 header to be used properly. This fixes
that case.
2019-02-12 14:12:59 +01:00
Cenk Gündoğan
fa48e662a7
Merge pull request #10998 from miri64/gnrc_ipv6_nib/fix/cache-out-loop-iteration
gnrc_ipv6_nib: fix iteration conditions for cache-out
2019-02-12 14:10:15 +01:00
Peter Kietzmann
892a37351a
Merge pull request #10946 from brummer-simon/gnrc_tcp-fix_syn_rcvd_packetloss_deadlock
gnrc_tcp: syn_rcvd pkt loss fix
2019-02-12 13:51:51 +01:00
Martine Lenders
877217663e gnrc_ipv6_nib: add clarification to comment in cache-out
When working on the previous commit I was unsure if a
garbage-collectible entry should remain in the list, so I added this
comment so I don't have to wonder about this in the future ;-).
2019-02-12 12:06:45 +01:00
Martine Lenders
7fcc2ab5d6 gnrc_ipv6_nib: fix iteration conditions for cache-out 2019-02-12 12:06:04 +01:00
Cenk Gündoğan
ea7f7c2340
Merge pull request #10978 from miri64/gnrc_ipv6_nib/fix/release-when-full
gnrc_ipv6_nib: release packet when NC entry can't be added
2019-02-12 10:43:32 +01:00
Marian Buschsieweke
194d340a64
net/sixlowpan: Fixed calculation of fragment size
Fragment size calculation previously failed for devices that are able to
transmit bigger layer 2 PDUs that 802.15.4 devices. This commit fixes the issue.
2019-02-12 09:45:31 +01:00
8eb02b6cd1
Merge pull request #10975 from miri64/gnrc_ipv6_nib/fix/rm-nib-clean
gnrc_ipv6_nib/nc: remove from _next_removable on remove
2019-02-11 17:39:29 +01:00
Peter Kietzmann
63fd8bc89b
Merge pull request #7577 from miri64/gnrc_netif2/feat/ieee802154-dup-bcast
gnrc_netif_ieee802154: drop duplicate broadcast packets (optionally)
2019-02-11 09:42:06 +01:00
Martine Lenders
fd3f806e32 gnrc_ipv6_nib: release packet when NC entry can't be added
When the neighbor cache is full, the packet trying to resolve a
neighbor is not released.

This change fixes that.
2019-02-08 21:53:46 +01:00
Martine Lenders
660440c1c2 gnrc_ipv6_nib/nc: remove from _next_removable on remove
The `_next_removable` list manages the cache-out of the neighbor cache.
However, when a neighbor cache entry is removed, it is not removed
from that list, which may lead to a segmentation fault when that list is
accessed, since the whole entry (including its list pointer) is zeroed
after removal.

With this change the entry is removed from that list accordingly before
the zeroing happens.
2019-02-08 16:45:47 +01:00
Marian Buschsieweke
c700d0439e
sys/ps: Fixed stringification
Added missing string for STATUS_COND_BLOCKED, so that the shell command "ps"
no longer crashes when a thread has this state.
2019-02-07 21:35:48 +01:00
Peter Kietzmann
56bf778156
Merge pull request #10750 from keestux/add-driver-sht2x
drivers: add support for SHT2x (I2C temp and humidity sensor)
2019-02-06 17:25:50 +01:00
cb457941db gnrc: nib: fix DOXYGE -> DOXYGEN 2019-02-06 13:01:40 +01:00
Kees Bakker
50ec5130d6 drivers: add support for SHT2x (I2C temp and humidity sensor)
Several parts were inspired by a driver written by:
  George Psimenos (gp7g14@soton.ac.uk)
  Steffen Robertz (steffen.robertz@rwth-aachen.de)
2019-02-05 22:17:30 +01:00
Peter Kietzmann
c04adf6b1c
Merge pull request #10950 from miri64/gnrc_sixlowpan_iphc/fix/compressible
gnrc_sixlowpan_iphc: fix _compressible()
2019-02-05 17:38:03 +01:00
Cenk Gündoğan
e8f89b9d3f
Merge pull request #9523 from miri64/gnrc_icmpv6_echo/enh/new-shell-cmd
shell_commands: adapt ping6 to original-ping-like implementation
2019-02-05 16:42:44 +01:00
Martine Lenders
43c2c728c9 gnrc_sixlowpan_iphc: fix _compressible()
When either `gnrc_sixlowpan_iphc_nhc` or `gnrc_udp` is not compiled
in `_compressible()` never returns `true`. This causes the
`dispatch` snip in `gnrc_sixlowpan_iphc_send()` to be of length 0,
meaning `dispatch->data` is `NULL`, causing possible crashes when
trying to send IPv6 packets over 6LoWPAN without NHC or UDP.
2019-02-05 15:22:41 +01:00
Simon Brummer
5dc3f8dc3d gnrc_tcp: syn_rcvd pkt loss fix 2019-02-04 20:57:30 +01:00
Martine Lenders
985d98073f gnrc_netif_ieee802154: drop duplicate broadcast packets (optionally) 2019-02-04 16:19:48 +01:00
Kevin "Bear Puncher" Weiss
7dc243e3cc
Merge pull request #10220 from bergzand/pr/crypto/chacha20poly1305
chacha20poly1305: Initial implementation of AEAD cipher.
2019-02-04 12:52:24 +01:00
Martine Lenders
45ec766871 shell_commands: adapt ping6 to original-ping-like implementation
Loosely based on [the original ping] and [netutil]'s ping

New features (compared to old RIOT version):
 - non-positional parameters
 - Better duplicate detection (addresses #9387)
 - Better asynchronous behavior
 - Potential for future move to `sock_ip`
 - (Optional) DNS-support
 - Multithreading-safe (in case shell-command handler gets called
   from multiple threads)

[the original ping]: http://ftp.arl.army.mil/~mike/ping.html
[netutil]: https://www.gnu.org/software/inetutils/
2019-02-04 12:42:49 +01:00
Peter Kietzmann
2c5d1b013e
Merge pull request #10918 from maribu/cc110x_mtu
drivers/cc110x: Fixed MTU calculation
2019-02-04 09:44:10 +01:00
1990e1629a
crypto: Add chacha20poly1305 AEAD algorithm 2019-02-04 09:29:26 +01:00
Marian Buschsieweke
dae680dcb2
sys/net: Added NETDEV_TYPE_CC110X to MTU init 2019-02-04 09:16:29 +01:00
Peter Kietzmann
b927c6ffa6
Merge pull request #10923 from maribu/ifconfig_l2pdu
shell/ifconfig: Add L2-PDU info
2019-02-04 08:55:32 +01:00
Martine Lenders
ff0e487510
Merge pull request #10922 from maribu/ifconfig
shell/ifconfig: Fixed stringification
2019-02-01 17:01:50 +01:00
Marian Buschsieweke
996a837fff
shell/ifconfig: Add L2-PDU info
When IPv6 is enabled, the MTU is given. So users(*) sending IPv6 packets can
easily figure out what the supported maximum protocol unit is.

However, when IPv6 is disabled and a user wants to send layer 2 frames directly,
no information about the maximum PDU is available using the shell.

When 6LoWPAN is used, a user may be interested in the layer 2 PDU as well in
order to avoid layer 2 fragmentation.

This PR adds the L2-PDU info to the output of the ifconfig shell command, which
is printed regardless of the use of IPv6.

(*): Here "users" refers to human beings interacting with the shell.
Applications can get the maximum PDU of each layer more easily using
gnrc_netapi_get() with NETOPT_MAX_PACKET_SIZE instead of using a shell command.
2019-02-01 16:55:16 +01:00
Marian Buschsieweke
0351577e18
shell/ifconfig: Fixed stringification 2019-02-01 16:22:37 +01:00
Sebastian Meiling
734524aead gomach: fix reassign before usage error 2019-02-01 11:25:27 +02:00
smlng
6d0384f068 netstats: collect layer 2 netstats in gnrc_netif
This the first step in moving the collection of layer 2 netstats from
the low level driver to a central location, ie. gnrc_netif, to avoid
code duplication.
2019-02-01 10:35:03 +02:00
Sebastian Meiling
805efb69c5
Merge pull request #10458 from MichelRottleuthner/pr_driver_sds011
add driver for SDS011 active laser dust sensor
2019-01-31 15:54:09 +02:00
Michel Rottleuthner
bba4d5b39b drivers/sds011: add saul integration 2019-01-30 13:15:17 +01:00
Michel Rottleuthner
61dc1920d3 sys/phydat: add unit for mass concentration (g/m^3) 2019-01-30 13:15:17 +01:00
Martine Lenders
1481239bdf
Merge pull request #10896 from miri64/sock_dns/fix/too-small-msg-error
sock_dns: correctly report too short messages
2019-01-29 23:43:53 +01:00
Cenk Gündoğan
b3843daeb8
Merge pull request #10817 from miri64/gnrc_netif/enh/i10723
gnrc_ipv6_nib: use generated EUI-64 for ARO build and check
2019-01-29 22:49:41 +01:00
Martine Lenders
b30cdb51a5 sock_dns: correctly report too short messages 2019-01-29 22:32:50 +01:00
Martine Lenders
d680aeae07 gnrc_ipv6_nib: use gnrc_netif_get_eui64() for ARO build and check 2019-01-29 21:52:53 +01:00
Martine Lenders
0fa8419c4a gnrc_netif: wrap _ipv6_iid_from_addr() around _eui64_from_addr() 2019-01-29 21:52:53 +01:00
Martine Lenders
16e7fc8336 gnrc_netif: introduce L2 address to EUI-64 conversion 2019-01-29 21:52:53 +01:00
Martine Lenders
a2b2f96fe3 gnrc_netif: rename _create_iid_from_short() to emphesize EUI-64 2019-01-29 21:52:53 +01:00
Martine Lenders
9468342e44 eui48: wrap eui48_to_ipv6_iid() around eui48_to_eui64() 2019-01-29 21:52:53 +01:00
Martine Lenders
963b405312 eui48: introduce eui48_to_eui64() function 2019-01-29 21:52:53 +01:00
Martine Lenders
983b60dbd4 gnrc_rpl: do not assert netif on auto-init
`gnrc_networking` is unusable when compiled for boards that do not have
any network devices on-board due to an assertion in RPL's auto-init. I
think this is pretty harsh. A friendly info message is enough, as it
might not even be an error. Also, if one expects RPL to work without
network interfaces they are a fool ;-).
2019-01-29 17:56:58 +01:00
Ken Bannister
f4a4f24197 net/gcoap: update module doc for coap_opt_finish 2019-01-28 13:05:50 -05:00
Marian Buschsieweke
c434c5cd3a
drivers/saul: Integrated ltc4150 2019-01-28 13:44:45 +01:00
Marian Buschsieweke
cc0e6dc779
sys/phydat: Added unit Coulomb 2019-01-28 13:33:16 +01:00
Marian Buschsieweke
d180339e5a
sys/shell: Removed fragments of old driver
The shell handlers of the old, depreciated and removed LTC4150 driver are still
in place. This commit removes them
2019-01-28 13:33:14 +01:00
Martine Lenders
28204e0a4f sc_gnrc_ipv6_nib: check interface existence
Currently an interface's existence is not checked when it is supplied
by the user with the `nib` command. This can lead to assertion errors
as soon as the generated entry tries to resolve an address or route
generated with that command and the network interface not being found.
2019-01-28 09:16:51 +01:00
Ken Bannister
93da7372fd net/gcoap: use coap_opt_finish within gcoap 2019-01-27 08:56:26 -05:00
Ken Bannister
a6b49a178d net/nanocoap: add inline function for Content-Format 2019-01-27 08:56:26 -05:00
Martine Lenders
bdd2d52fd5
Merge pull request #10797 from kaspar030/add_unaligned
sys: add unaligned.h (header for alignment safe value-from-pointer functions)
2019-01-26 13:09:20 +01:00
344af9c479 sys/checksum/fletcher32: make use of unaligned.h 2019-01-25 22:22:45 +01:00
c85d33f305 sys/include/unaligned: initial commit 2019-01-25 22:22:45 +01:00
Martine Lenders
2d54069f59
Merge pull request #10869 from gschorcht/gnrc_icmpv6_echo_fix
gnrc_icmpv6_echo: avoid crashing when pktbuf full
2019-01-25 18:33:07 +01:00
b8565e492d
Merge pull request #10851 from miri64/tests/feat/gnrc_sixlowpan_frag-tests
tests: provide unittests for gnrc_sixlowpan_frag/rbuf
2019-01-25 17:55:28 +01:00
Gunar Schorcht
c88838f391 gnrc_icmpv6_echo: avoid crashing when pktbuf full
Once the packet buffer is full on heavy network load, gnrc_netif_hdr_build may return NULL. In that case, the following unchecked access to hdr->data leads to a crash.
2019-01-25 17:10:57 +01:00
Martine Lenders
7d9ef9f78c gnrc_sixlowpan_frag/rbuf: add offset assertion to rbuf_add()
`gnrc_sixlowpan_frag` internally derives the offset value directly
from the fragment header, so for normal usage within GNRC this
assertion is redundant, but to make the tests of `rbuf_add` 100%
water-tide I added it.
2019-01-25 16:57:09 +01:00
cee830bd97
Merge pull request #10868 from jia200x/pr/pkg_loramac_calibration
pkg/semtech-loramac: add timer calibration
2019-01-25 15:55:03 +01:00
Martine Lenders
892c7a5430
Merge pull request #10866 from miri64/gnrc_sixlowpan/fix/type-finding-loop
gnrc_sixlowpan: stop type-finding loop when type is found
2019-01-25 14:38:34 +01:00
Jose Alamos
6c1c420164 loramac: add macros for default timer calibration values 2019-01-25 14:18:06 +01:00
Martine Lenders
879321d68a gnrc_sixlowpan: stop type-finding loop when type is found
Currently the loop just continues to run after a viable type is found.
In #10851 this lead to a crash of the tests, when the dependency of
`gnrc_sixlowpan` to `gnrc_ipv6` was removed.
2019-01-25 12:04:30 +01:00
Martine Lenders
b0beba3c1c gnrc_ipv6_nib: release when not queuable on AR
When a new queue entry is tried to be allocated for a neighbor who's
address is currently tried to be resolved there was no error case
before. The packet that was tried to be put in the queue was thus not
released and stayed in the packet buffer for ever.
2019-01-25 00:13:21 +01:00
Martine Lenders
8c1cf53d28 gnrc_icmpv6: release when received packet too short 2019-01-24 15:50:18 +01:00
Martine Lenders
bbde73eb81 gnrc_icmpv6: release on wrong checksum 2019-01-24 14:57:36 +01:00
Sebastian Meiling
a65fede8c4
Merge pull request #10855 from kb2ma/nanocoap/simple_reply_safety
net/nanocoap: verify simple reply buffer
2019-01-24 12:08:31 +01:00
Sebastian Meiling
43d772ce63
Merge pull request #10847 from jia200x/pr/fix_netreg_macros
net/netreg: fix static netreg init macros
2019-01-24 12:05:30 +01:00
Jose Alamos
65e985d649 net/netreg: fix static netreg init macros 2019-01-24 11:44:17 +01:00
danpetry
6e21c92418
Merge pull request #10796 from leandrolanzieri/pr/sys/base64_size_macros
sys/base64: Add size estimation functions
2019-01-24 11:43:13 +01:00
Gunar Schorcht
d90d546053
Merge pull request #10824 from miri64/gnrc_ipv6_nib/fix/br-slaac
gnrc_ipv6_nib: activate SLAAC on border router
2019-01-24 11:20:36 +01:00
Ken Bannister
3343ed3674 net/nanocoap: verify reply length before write 2019-01-24 05:18:12 -05:00
Sebastian Meiling
44234783da
Merge pull request #10823 from kb2ma/nanocoap/verify_before_write_option
net/nanocoap: validate option length
2019-01-24 09:23:26 +01:00
Leandro Lanzieri
c5cd71fb72 sys/base64: Add size estimation macros 2019-01-24 08:35:22 +01:00
Ken Bannister
e35bcb6853 net/nanocoap: fix remaining space calculation
The space calculation must use the same length as the eventual
return value.
2019-01-23 16:36:20 -05:00