Ken Bannister
034c78d51c
net/gcoap: move macros to implementation file
2018-11-24 07:09:25 -05:00
Ken Bannister
f0b966d65d
net/gcoap: Use nanocoap options API
...
Observe still uses coap_pkt_t attribute.
2018-11-24 07:09:25 -05:00
Ken Bannister
fa5ab4eeb6
net/gcoap: Add format option to nanocoap
2018-11-24 07:09:25 -05:00
Martine Lenders
d8317580df
gnrc_rpl_srh: uncrustify code
2018-11-23 13:56:55 +01:00
Martine Lenders
0982ab4bd6
gnrc_rpl_srh: give variables more speaking names
2018-11-23 13:56:55 +01:00
Martine Lenders
eaacda0970
gnrc_rpl_srh: move address check to own function
2018-11-23 13:56:55 +01:00
Martine Lenders
c3b0e54d82
gnrc_rpl_srh: change routing header at latest possible point
2018-11-23 13:56:55 +01:00
Martine Lenders
29ed9a0937
gnrc_rpl_srh: use memcpy() instead for address assignment
2018-11-23 13:56:54 +01:00
Martine Lenders
caeebd2787
gnrc_rpl_srh: make seg_left > 0 a precondition
...
The generic routing header handler is already checking this case, so
don't redo the check again.
2018-11-23 13:56:54 +01:00
Martine Lenders
61b829b656
gnrc_rpl_srh: reorder variables for better memory usage
2018-11-23 13:56:54 +01:00
Martine Lenders
78164977d8
Merge pull request #10223 from kb2ma/nanocoap/string_opt_first_char
...
net/nanocoap: fix string option separator write handling
2018-11-22 16:43:45 +01:00
Hauke Petersen
ace5db70e8
net/gnrc_netif: opt of _ipv6_get_iid()
2018-11-22 15:30:11 +01:00
Ken Bannister
fa77929cc7
net/nanocoap: fix string option separator handling
...
Assumed initial character was a separator when writing the option,
and skipped over it.
2018-11-22 09:25:05 -05:00
Tobias Heider
f03247e752
gnrc_pktbuf: add gnrc_pktbuf_merge()
...
Co-Authored-By: Martine Lenders <m.lenders@fu-berlin.de>
2018-11-22 11:13:33 +01:00
Martine Lenders
8f5f4a370d
gnrc_netapi: declare data
for set function as const
2018-11-20 11:59:38 +01:00
Martine Lenders
0bdbb68959
gnrc_ipv6: drop packets with unspecified destination
...
It just doesn't makes sense to handle them any further
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
d4f425bb00
gnrc_ipv6: allow for empty IPv6 header
2018-11-17 14:49:12 +01:00
Martine Lenders
3ec37acbd1
gnrc_ipv6: fix _fill_ipv6_hdr() for pure IPv6 packets
...
If a packet only contains IPv6 and IPv6 extension header snips (e.g. if
the IPv6 packet has no payload or if an extension header was not
pre-parsed)
2018-11-17 14:48:49 +01:00
Martine Lenders
e801829c7a
gnrc_udp: send ICMPv6 error messages where appropriate
2018-11-16 17:39:16 +01:00
Martine Lenders
db2da19ea4
gnrc_ipv6: send IPv6 error messages where appropriate
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
d161379e47
gnrc_icmpv6_error: re-order header inclusions
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
335342a466
gnrc_icmpv6_error: fix build function for send and recv order
2018-11-16 17:39:16 +01:00
Martine Lenders
f0da2a0cd7
gnrc_icmpv6_error: don't include netif header into fit
2018-11-16 17:39:16 +01:00
Martine Lenders
c4175a5e52
gnrc_icmpv6_error: adapt _fit() to get MTU from netif
2018-11-16 17:39:16 +01:00
Martine Lenders
c8c8564d51
gnrc_icmpv6_error: use netapi_dispatch_send instead of netapi_send
2018-11-16 17:39:16 +01:00
Martine Lenders
ba13d8f5bf
gnrc_icmpv6_error: introduce debug messages
2018-11-16 17:39:15 +01:00
Martine Lenders
a7a8227e36
gnrc_icmpv6_error: centralize send function
2018-11-16 17:39:15 +01:00
Martine Lenders
36617f3733
gnrc_icmpv6_error: make input pointers constant
2018-11-16 17:39:15 +01:00
Martine Lenders
6ec456b0fc
gnrc_icmpv6_error: don't release orig_pkt on error
...
The stack might still wants to do something with the packet after
copying it to the error message.
2018-11-16 17:22:20 +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
Robin
e9047063ca
gnrc_sock_[udp|ip]: store return value before release
...
sock_[udp|ip]_recv returns `pkt->size` after pkt was released via `gnrc_pktbuf_release(pkt)`.
This can result in wrong values returned by this functions and thus is not according to its sepecification.
Storing this values before releasing pkt returning the stored values should fix this.
2018-11-12 14:58:26 +01:00
Martine Lenders
98f42eeea8
Merge pull request #10356 from miri64/gnrc_ipv6_nib/fix/netif_queued
...
gnrc_ipv6_nib: provide interface on packet queueing
2018-11-09 17:47:12 +01:00
Martine Lenders
94549d136b
gnrc_ipv6_nib_pl: return early if PL entry wasn't allocated
2018-11-09 15:40:46 +01:00
Martine Lenders
6d1a3caa26
gnrc_ipv6_nib: fix NULL pointer dereference
2018-11-09 15:39:41 +01:00
Martine Lenders
ce0c46836c
gnrc_ipv6_nib: provide interface on packet queueing
...
Without this the first packet to a new link-local address will not be
delivered in non-6Lo environments, since the interface is not provided.
With this change, if an internet was provided to the address resolver it
will be stored within an allocated `gnrc_netif_hdr_t`.
At this point [IPv6 already striped](netif strip) the packet of its
netif header, so there is no risk that there will be to, in case it was
provided and the `netif` came from its existence.
2018-11-09 12:56:20 +01:00
60a6e66f77
Merge pull request #10246 from miri64/gnrc_ipv6/fix/encaps-ipv6-recursion
...
gnrc_ipv6: don't recurse into receive for encapsulated IPv6
2018-11-08 12:34:40 +01:00
Martine Lenders
d54ac38f84
gnrc_ipv6: don't dispatch encapsulated IPv6 headers in central function
...
Otherwise, an encapsulated IPv6 packet is handled twice. Once in the
central function, once in the specialized decapsulation.
2018-11-08 11:54:05 +01:00
Martine Lenders
160ccbcf7e
gnrc_ipv6: don't recurse into receive for encapsulated IPv6
...
`_decapsulate()` is called by callees of `_receive()` so the call to
the latter function within the first creates a recursion we don't want.
Using `gnrc_netapi` instead removes that and provides the added benefit
that other subscribers to IPv6 are also informed.
2018-11-08 11:54:05 +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
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
34a6e384c2
net/gcoap: use coap_data_ptr instead of hdr.data
2018-11-02 16:33:29 +01:00
Lasse Lueder
18ae8ef90d
net/nanocoap: use coap_data_ptr instead of hdr.data
2018-11-02 16:33:29 +01:00
Joakim Nohlgård
52ac53b4d9
gnrc_netif_ieee802154: Provide LQI, RSSI in raw mode via netif_hdr
...
Useful in sniffer situations to see the signal strength of a received
packet. Also avoids the crash described in
https://github.com/RIOT-OS/applications/pull/54
2018-10-27 00:22:51 +02:00
Martine Lenders
a5c9f959b5
gnrc_ipv6: use gnrc_pktbuf_reverse_snips()
2018-10-25 23:11:33 +02: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
274371c174
ipv6_ext_rh: switch over to generic RH type define
2018-10-25 19:21:20 +02:00
Martine Lenders
466bc341a6
Merge pull request #10231 from miri64/gnrc_ipv6_ext/enh/move-rh-to-gnrc
...
gnrc_ipv6_ext: move ipv6_ext_rh (partly) to GNRC
2018-10-25 19:15:22 +02:00
Gaëtan Harter
c5deac4865
Merge pull request #10023 from miri64/gnrc_netif/fix/no-addr-but-addr-len
...
gnrc_netif: Fix l2addr_len > 0, but no l2addr edge-case
2018-10-25 14:31:32 +02:00
Martine Lenders
ad183dbf7e
ipv6_ext: remove empty, unused module
2018-10-25 11:12:14 +02:00
Martine Lenders
6a9adf2b59
gnrc_ipv6_ext: remove unnecessary return-value indirection
...
Those return values are internal anyway, and they have the same intent
as the one provided by `gnrc_ipv6_ext_rh`.
2018-10-25 11:12:14 +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
afb7d6e1fc
cord/epsim: enable THREAD_CREATE_STACKTEST for thread
2018-10-18 14:17:07 +02:00
be1dc15655
cord/ep: enable THREAD_CREATE_STACKTEST for thread
2018-10-18 14:09:32 +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
Hauke Petersen
f0b0e25254
net/rdcli: new module structure and high-level doc
2018-10-17 09:29:19 +02:00
Kevin "Bear Puncher" Weiss
7187bbf8cf
Merge pull request #9426 from gschorcht/esp32
...
ESP32 port
2018-10-16 15:24:25 +02:00
Ken Bannister
ad38dd9a6f
net/nanocoap: fix non-confirmable response type
2018-10-15 06:42:37 -04:00
726ebf3dad
coap: use COAP_FORMAT style content-format defines
...
Replaces all occurences of COAP_CT_.* with COAP_FORMAT_.*
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
6ba1991a8e
net/rdcli_simple: do not send CF opt in POST msg
2018-10-10 11:07:17 +02:00
Schorcht
3ac99877ac
cpu: add esp32
2018-10-08 12:20:49 +02:00
Peter Kietzmann
ed24d3622a
Merge pull request #9621 from bergzand/pr/netif/use_fmt
...
gnrc_netif: Use fmt for bytes to hex string
2018-10-04 14:34:37 +02:00
0d71c1ccf7
gnrc_netif: Use fmt for bytes to hex string
2018-10-04 13:34:18 +02:00
90ad1a0782
gnrc_netif_ieee802154: remove state access in recv
...
This replaces the netif->state accesses in netif::recv with a netdev call
and the new netif RAWMODE flag
2018-10-03 21:00:35 +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
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
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
Martine Lenders
05aa8ab66b
gnrc_netif: assert that l2addr_len is 0 without address
...
If the device provides an address length, but no address it is
obviously faulty.
2018-09-25 18:45:32 +02:00
smlng
59e299635b
cppcheck: add/correct reason for cppcheck-suppress
...
Adding and correcting description/rational on why certain cppcheck
warnings or errors are intentionally suppressed.
2018-09-25 12:03:58 +02:00
05b6af466c
sys: add missig <string.h> includes
2018-09-20 23:47:40 +02:00
Hauke Petersen
becfce247d
net/nanocoap: allow empty uri/location path option
...
For CoAP, there is actually a difference between
`/some/path` and `/some/path/`. This needs to be reflected
when parsing the URI and location path options from a given
string.
2018-09-11 10:06:57 +02:00
Martine Lenders
235661668d
gnrc_ipv6_nib: always configure 802.15.4 long address
...
Our `gnrc_minimal` example configures the link-local address from the
IEEE 802.15.4 short address since it does not include 6Lo-ND.
This causes the application to be incompatible with our other GNRC
application that do include 6Lo-ND, since it [assumes][1] the link-local
address to be based on the EUI-64 for address resolution.
This enforces long addresses (aka EUI-64) for all IEEE 802.15.4 devices
when IPv6 is compiled in so `gnrc_minimal` is compatible again to the
rest.
Fixes #9910
[1]: https://tools.ietf.org/html/rfc6775#section-5.2
2018-09-10 17:08:04 +02:00
Hauke Petersen
f2b1c5c87d
net/gcoap: use sock_udp_ep_equal()
2018-09-07 12:03:19 +02:00
Martine Lenders
3d9aad2027
Merge pull request #9854 from bergzand/pr/rpl/pass_opt_len
...
gnrc_rpl: Pass options length to msg validator
2018-09-03 14:20:12 +02:00
Martine Lenders
e54428ce1e
Merge pull request #9853 from bergzand/pr/rpl/fix_dis_reserved_fields
...
gnrc_rpl: fix zeroing of RPL DIS fields
2018-09-03 14:19:59 +02:00
Hauke Petersen
a3b8c90485
net/gcoap: adjust to nanocoap changes
2018-08-30 10:31:03 +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
af3232fb34
gnrc_rpl: Pass options length to msg validator
...
Currently the length of the full ICMPv6 packet is passed to the
validator function causing validation failures on valid packets. This
fixes that by passing the length of remaining RPL options of the packet.
2018-08-29 00:47:20 +02:00
0c790c6638
gnrc_rpl: fix zeroing of RPL DIS fields
...
The code originally assumed that the location of DIS struct is directly
after the ICMPv6 struct. This is not necessarily true when both structs
are individually allocated by pktbuf. This commit fixes this issue by
directly accessing the location of the DIS struct.
2018-08-29 00:33:27 +02:00
Joakim Nohlgård
6d6a6efac7
gnrc_netif: Check return value of netdev init during thread start
2018-08-24 12:11:12 +02:00
Martine Lenders
a9d0f20c7e
Merge pull request #8626 from miri64/gnrc_sixlowpan_iphc/enh/clean-up-nhc
...
gnrc_sixlowpan_iphc: cleanup NHC encoding
2018-08-17 10:13:34 +02:00
Martine Lenders
0a9793c49b
gnrc_sixlowpan_iphc: cleanup NHC encoding
2018-08-16 16:55:28 +02:00
Joakim Nohlgård
3cc088689e
6lo: Speling correction in comment
2018-08-14 10:08:52 +02:00
Joakim Nohlgård
58281e9135
6lo: Set more data flag on all but last frag
2018-08-14 10:08:17 +02:00
Joakim Nohlgård
a247d8bfa5
gnrc_netif_ieee802154: set Frame Pending bit sometimes
...
Set frame pending bit in IEEE 802.15.4 FCF when
GNRC_NETIF_HDR_FLAGS_MORE_DATA is set on the netif header on outbound
frames.
2018-08-13 09:27:18 +02:00
Sebastian Meiling
513e3eca2f
Merge pull request #9522 from miri64/gnrc_ipv6_nib/enh/slaac-fallback
...
gnrc_ipv6_nib: fallback to SLAAC if ARO is ignored by upstream
2018-08-10 08:21:31 +02:00
Martine Lenders
4f87883ab8
gnrc_ipv6_nib: fallback to SLAAC if ARO is ignored by upstream
...
Linux doesn't have ARO support at the moment so this is a workaround to
try to speak 6Lo-ND while still being able to do DAD with a border
router that doesn't.
2018-08-09 10:56:36 +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