Francisco Molina
c67a2086de
sys/net/application_layer/gcoap: use COAP_PORT
2022-04-14 09:24:35 +02:00
Benjamin Valentin
dbbb602522
net/coap: refactor nanocoap_request for zero-copy operation
...
This removes the need for a user provied work buffer from nanocoap.
Instead we let the user operate directly on network stack internal
memory and provide a callback mechanism to make sure the memory is
properly freed again.
2022-04-13 19:33:00 +02:00
Oleg Hahm
755ea30da7
Merge pull request #17871 from HendrikVE/pr/sock_dns_mock
...
sys/net/application_layer/sock_dns_mock: add module for mocking sock_dns
2022-04-08 14:20:17 +02:00
Francisco
c07a11c8cd
Merge pull request #17892 from kfessel/p-ztimer-conversions
...
sys: some simple xtimer->ztimer conversions
2022-04-04 09:17:46 +02:00
Hendrik van Essen
a9fb3388ca
sys/net/application_layer/sock_dns_mock: add module for mocking sock_dns
2022-04-03 17:29:10 +02:00
Karl Fessel
a42c39dbea
net/uhcp: convert to ztimer
2022-03-31 12:50:31 +02:00
Martine Lenders
00fdd8a146
nanocoap: introduce coap_opt_remove()
2022-03-31 09:47:57 +02:00
benpicco
6849e33854
Merge pull request #17736 from benpicco/dhcpv6-tweaks
...
sys/net/dhcpv6: miscellaneous tweaks
2022-03-29 13:52:41 +02:00
Benjamin Valentin
37a4fffb17
sys/net/dhcpv6: consider option 0 an end marker
...
The REPLY of a TP-Link router (WR400 v4.20) ends with a 0 option
that has a bogus length.
When subtracting the length from the remaining length, we get an
underflow (remaining `len` is 3, option len is 4).
To get a working DHCP response, consider 0 (Reserved) an end marker.
2022-03-28 14:53:00 +02:00
Benjamin Valentin
922a1d7c9a
sys/net/dhcpv6: make sanity check more lenient
...
If we did not enable downstream interfaces yet but have IA_PD enabled
or if we did not configure an interface for IA_NA but have the module
enabled, don't discard the DHCP reply.
If a server does not support an option it will respond with an error
code.
2022-03-28 14:52:59 +02:00
Benjamin Valentin
9cab45931a
nanocoap: replace sock_udp_str2ep() with sock_udp_name2ep()
2022-03-24 17:09:16 +01:00
Benjamin Valentin
a6a8356385
nanocoap: add nanocoap_get_blockwise_url_to_buf() function
...
This moves the internal convenience function suit_coap_get_blockwise_url_buf()
into nanocoap to make it globally available.
2022-03-22 10:36:50 +01:00
Cenk Gündoğan
9746c3a830
nanocoap: add COAP_IGNORE for when method parsing is not important
2022-03-11 14:53:17 +01:00
Cenk Gündoğan
fa19b62cdb
gcoap/forward_proxy: add submodule
2022-03-11 14:53:17 +01:00
benpicco
9896071bb9
Merge pull request #17493 from HendrikVE/pr/auto_init_sock_dns
...
sys/net/application_layer/sock_dns: add pseudomodule auto_init_sock_dns
2022-03-10 00:53:32 +01:00
Hendrik van Essen
0b0910f82a
sys/net/application_layer/sock_dns: add pseudomodule auto_init_sock_dns
2022-03-09 20:05:20 +01:00
benpicco
c411edef55
Merge pull request #16688 from miri64/gcoap/enh/multitransport
...
gcoap: multi-transport support
2022-03-03 12:15:48 +01:00
Benjamin Valentin
2034fa5101
sys/net/application_layer: add telnet server module
2022-03-01 23:07:22 +01:00
Martine Lenders
287bfdc10d
gcoap: multi-transport support for listeners
2022-03-01 19:33:15 +01:00
Martine Lenders
90eae8e0a4
gcoap: multi-transport support for clients
...
23a8659bdf
introduced DTLS support for
CoAP, but did not make it possible to select the transport on request.
Since switching between CoAP and CoAPS (CoAP-over-DTLS) as client is a
valid use case (one might want to e.g. talk to one server over CoAP and
to another over CoAPS), this change makes that possible.
2022-03-01 19:26:10 +01:00
Karl Fessel
35107ec4ba
sys/net: add missing includes
2022-02-28 14:53:07 +01:00
benpicco
67b98fd741
sys/net/nanocoap: introduce nanocoap_sock_*()
...
Co-authored-by: Jan Romann <jan.romann@uni-bremen.de>
2022-02-24 12:20:47 +01:00
Benjamin Valentin
0b768e5602
nanocoap: add nanocoap_request_simple()
2022-02-24 12:20:05 +01:00
Benjamin Valentin
7dc2f730d2
nanocoap: check if all critical options were handled
2022-02-24 12:20:05 +01:00
Benjamin Valentin
2682848a29
suit/transport/coap: move suit_coap_get_blockwise() to nanocoap
2022-01-27 14:42:49 +01:00
Benjamin Valentin
d680743fe9
net/coap: specify timeout in milliseconds
...
This allows for more flexibility when choosing timeouts.
2022-01-27 14:42:49 +01:00
Benjamin Valentin
3895fdc2c3
net/coap: move socket open/close out of nanocoap API
...
This allows to reuse a socket between requests and aligns the API
with the usage in SUIT.
2022-01-27 14:31:06 +01:00
Jan Romann
e29da26ea1
Merge pull request #17250 from JKRhb/dhcpv6-restart-fix
...
sys/net/dhcpv6: fix variable shadowing issue
2022-01-01 20:48:07 +01:00
Jan Romann
e185a2556d
sys/net/dhcpv6: fix variable shadowing issue
2022-01-01 18:43:13 +01:00
Karl Fessel
6347dcdffc
Merge pull request #17141 from kfessel/p-ztimer-gcoap
...
net/gcoap: port to ztimer
2021-12-09 15:22:10 +01:00
Benjamin Valentin
1db8ab4f72
sys/net/gcoap: add ; after DEBUG()
2021-12-08 20:41:21 +01:00
Karl Fessel
9195a4f02b
net/gcoap: most ZITMER_USEC to ZTIMER_MSEC
2021-12-06 13:31:18 +01:00
Karl Fessel
f56eb9bb83
net/gcoap: port to ztimer_usec
2021-12-06 13:31:18 +01:00
Karl Fessel
2dd0cec4e9
net/gcoap: clean xtimer include from header
2021-12-06 13:31:18 +01:00
Sören Tempel
dc1b6d0436
sock_dns: include string.h for strlen(3) function prototype
...
Needed by the following code in `dns.c`:
e8cbc6da85/sys/net/application_layer/sock_dns/dns.c (L39-L41)
The include was probably wrongfully removed by accident in
e8cbc6da85
(CC: @miri64 ).
2021-11-30 01:12:40 +01:00
dba51edc69
net/uhcp[cd]: use modules to select client/server code
2021-11-09 21:42:45 +01:00
Martine Lenders
4b2ca7a702
Merge pull request #16986 from benpicco/uhcp-debug
...
sys/net/uhcp: use LOG_DEBUG instead of LOG_INFO
2021-11-09 12:58:16 +01:00
chrysn
a92cdb535e
Merge pull request #16378 from chrysn-pull-requests/gcoap-handle-truncation
...
sys/net/gcoap: Use socket _buf API to recognize truncated requests
2021-10-27 08:55:52 +02:00
Martine Lenders
b1b0a9b4f5
dhcpv6_client: add comment on why the division is needed
2021-10-15 17:36:13 +02:00
Martine Lenders
d844de2263
dhcpv6_client: keep integers in retransmission calculations signed
2021-10-15 17:35:46 +02:00
Benjamin Valentin
35b727c7be
sys/net/uhcp: cleanup
2021-10-14 14:20:46 +02:00
Benjamin Valentin
f74c795033
sys/net/uhcp: use LOG_DEBUG instead of LOG_INFO
...
uhcp is pretty noisy compared to DHCPv6 as INFO log level is enabled
by default.
Tone it down to LOG_DEBUG to keep the output clean.
2021-10-14 14:09:17 +02:00
Martine Lenders
e74b54d3ae
gcoap_dtls: destroy session in _tl_send only on connection errors
2021-10-08 12:24:57 +02:00
Martine Lenders
96eb2c5050
Merge pull request #16731 from JKRhb/dhcp-stateless
...
sys/net/dhcpv6: Add stateless DHCPv6
2021-10-05 10:13:22 +02:00
Jan Romann
c62d6eb834
sys/net/dhcpv6: Implement stateless DHCPv6
2021-10-04 17:40:56 +02:00
Martine Lenders
e0ac9d3f45
dns_msg: Use correct byteorder for ID
2021-09-29 13:32:12 +02:00
chrysn
2e70f29d4f
sys/net/gcoap: Use socket _buf API to recognize truncated requests
...
Closes: https://github.com/RIOT-OS/RIOT/issues/14167
Co-authored-by: Marian Buschsieweke <maribu@users.noreply.github.com>
2021-09-02 16:49:46 +02:00
chrysn
0ff56f284d
sys/net/app/cord: Support the addition of extra registration arguments
2021-09-02 16:40:19 +02:00
Jan Romann
507d39c054
sys/net/dhcpv6: Reformat parsing of IA_NA
2021-09-01 01:24:56 +02:00
Jan Romann
18dd056f8a
sys/net/dhcpv6: Add missing IA_NA IS_USED check
2021-08-18 02:03:56 +02:00
Jan Romann
192e09b7bf
sys/net/dhcpv6: Refactor update of leases
2021-08-18 02:00:12 +02:00
Jan Romann
d0dd12cf25
sys/net/dhcpv6: Refactor parsing of IA_PD
2021-08-18 02:00:11 +02:00
Jan Romann
1daa4b6e30
sys/net/dhcpv6: Refactor message composition
2021-08-18 02:00:08 +02:00
Jan Romann
bbce04f854
sys/net/dhcpv6: Refactor mrd calculation
2021-08-18 02:00:08 +02:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines
2021-08-13 19:50:38 +02:00
Martine Lenders
febb07c64e
Merge pull request #16704 from fjmolinas/pr_block_finish_return_more
...
sys/net/nanocoap: block_finish returns if more are expected
2021-08-12 19:16:46 +02:00
Jan Romann
ad0096cde6
sys/net/dhcpv6: Refactor IA_NA implementation
2021-08-11 22:19:59 +02:00
Martine Lenders
f2f6700865
Merge pull request #16228 from JKRhb/dhcp-ia-na
...
sys/net/dhcpv6: Add IA_NA support to the DHCPv6 client
2021-08-11 20:50:01 +02:00
Jan Romann
234a71870a
sys/net/dhcpv6: Add IA_NA implementation
2021-08-11 19:15:35 +02:00
Martine Lenders
2d7c613948
tests/gnrc_dhcpv6_relay: initial import
2021-08-11 14:30:37 +02:00
Martine Lenders
4afc65688f
dhcpv6_relay: initial import of a lightweight DHCPv6 relay agent
2021-08-11 13:19:06 +02:00
Martine Lenders
6da2f0fab3
Merge pull request #16669 from miri64/sock_dns/enh/factor-out-msg-parsing
...
sock_dns: factor out message parsing and composition
2021-08-11 12:43:26 +02:00
Martine Lenders
7920ab2b95
dns_msg: make parsing input buffer const
2021-08-11 11:55:29 +02:00
Martine Lenders
e8cbc6da85
dns: move message parsing and composition to own module
2021-08-11 11:55:29 +02:00
Francisco Molina
9195f772ad
sys/net/nanocoap: block_finish returns if more are expected
2021-08-06 09:29:03 +02:00
Martine Lenders
5d59065b09
gcoap: provide buffer version of gcoap_req_init()
...
This simplifies the usage of `gcoap` with modules such as `uri_parser`
greatly.
2021-08-05 13:31:07 +02:00
Martine Lenders
4b7ef70e66
gcoap: fix socket type naming
...
The `coap_socket_t` and `coap_socket_type_t` types are used by gCoAP
only and the `coap_` prefix is usually used to namespace the `nanocoap`
module's API. This makes it confusing to locate the types in question.
Signed-off-by: Martine Lenders <m.lenders@fu-berlin.de>
2021-07-27 22:37:04 +02:00
Karl Fessel
238c759899
dhcpv6_client: mrd calculation fixed for renew and rebind
...
mrd calculation for dhcp-renew was wrong this fixes it
and the logic for dhcp rebind mrd handling
(try rebind if ther is mrd)
see issue #16677
2021-07-23 17:54:55 +02:00
Martine Lenders
6493241ed4
dhcpv6_client: add ztimer backend support
2021-07-21 16:28:39 +02:00
Martine Lenders
b5d9f78cbd
dhcpv6_client: port timeout mechanism to event_timeout
2021-07-21 16:28:39 +02:00
Martine Lenders
805952c5ce
dhcpv6_client: use event_timeout instead of xtimer
2021-07-21 16:28:37 +02:00
Martine Lenders
ed9a682e49
dhcpv6_client: set timer by unit rather than integer width
2021-07-21 16:27:54 +02:00
Martine Lenders
d1613da617
dhcpv6_client: use milliseconds rather than microseconds as base unit
2021-07-21 16:27:54 +02:00
Martine Lenders
eb577c933e
dhcpv6_client: move timer setting to their own functions
2021-07-21 16:27:53 +02:00
Martine Lenders
bf764fd700
sock_dns: move module to directory named like module
2021-07-21 14:58:04 +02:00
Martine Lenders
38d14b6335
dhcpv6_client: make IA_PD an optional module
...
Prefix delegation used to be the only supported feature of our DHCPv6
client, but by now it also supports MUD, DNS recursive name servers and
IA_NA is on the horizon. So it makes sense to make IA_PD an optional
module like all those other features are as well.
2021-07-21 11:37:29 +02:00
Martine Lenders
d9be29318d
gnrc_dhcpv6_client_mud_url: rename to dhcpv6_client_mud_url
...
There is no real reason for that pseudo-module to use the `gnrc_`
prefix. Neither does it need GNRC-components (except, but optionally, as
a network stack of course), nor is it implemented with in the GNRC
network stack.
2021-07-20 15:30:34 +02:00
János Brodbeck
23a8659bdf
net/gcoap: support DTLS
2021-07-07 14:45:30 +02:00
Vera Clemens
b0f4781e15
net/emcute: Allow RETAIN flag to be set on incoming PUBLISHs
2021-06-25 18:32:53 +02:00
Martine Lenders
4deb15cb6f
dhcpv6_client: add DNS recursive name server option handling
...
Signed-off-by: Martine Lenders <m.lenders@fu-berlin.de>
2021-06-24 16:01:59 +02:00
János Brodbeck
2e523bf101
net/gcoap: change return type from gcoap_req_send() to ssize_t
2021-06-04 17:15:04 +02:00
chrysn
049b5179a7
sys/net/app/cord and examples: Update references to -27
...
With all (the few necessary) changes done, this can claim -27
compatibility.
2021-03-01 11:59:57 +01:00
chrysn
6542f7008f
sys/net/app/cord: Use updated .well-known path from draft -26
2021-03-01 11:20:42 +01:00
benpicco
9fc60da4ca
Merge pull request #15830 from benpicco/net/nanocoap_add_uri
...
nanocoap: add coap_opt_put_uri_pathquery()
2021-02-24 12:09:08 +01:00
Benjamin Valentin
d4e5c25b70
nanocoap: add coap_opt_put_uri_pathquery()
2021-02-23 18:27:54 +01:00
Jan Romann
6a2aa7ad52
sys/net/dhcpv6: Fix MUD URL option
2021-02-09 19:47:47 +01:00
Benjamin Valentin
b24480538a
nanocoap: add coap_opt_put_string_with_len()
2021-01-21 15:17:28 +01:00
Jose Alamos
0bee606bd4
gcoap: remove gcoap_add_qstring
...
This feature was marked to be deprecated after the release 2020.10.
Therefore this commit removes that feature.
2021-01-14 16:03:00 +01:00
Hauke Petersen
ee01950ed7
net/asymcute: switch to sock_asnyc_event
2020-12-18 13:58:20 +01:00
Martine Lenders
b5a36e9af7
Merge pull request #15653 from haukepetersen/fix_asymcute_subflags
...
net/asymcute: fix handling of short and pre-defined topics
2020-12-18 13:52:52 +01:00
Hauke Petersen
1e7b95cd70
Merge pull request #15661 from haukepetersen/fix_emcute_msgidqos0
...
net/emcute: fix MsgId for PUBLISH with QOS0
2020-12-18 13:45:10 +01:00
Hauke Petersen
289688169e
net/asymcute: fix short and pre-defined topics
2020-12-18 12:27:46 +01:00
Hauke Petersen
d5aa6c1311
Merge pull request #15675 from haukepetersen/opt_asymcute_rmstaticcasts
...
net/asymcute: rm explicit casts where applicable
2020-12-18 12:12:05 +01:00
Hauke Petersen
610ae4925e
net/emcute: fix MsgId for PUBLISH with QOS0
2020-12-18 10:41:52 +01:00
Hauke Petersen
285681a4e0
net/asymcute: rm explicit casts where applicable
2020-12-18 10:36:55 +01:00
Hauke Petersen
5ff526f928
net/asymcute: fix msgId when publishing QOS0
2020-12-18 10:26:02 +01:00
Martine Lenders
b0b1c251c0
Merge pull request #15603 from miri64/uhcp/fix/prefix-len
...
uhcp: check maximum for prefix length
2020-12-15 13:06:08 +01:00
Martine Lenders
44a94dd91e
uhcp: check maximum for prefix length
2020-12-15 10:42:40 +01:00
Han Xinrong
44762971c2
sys/net/application_layer/cord: add error check to cord_ep_register()
2020-12-08 20:37:15 +08:00
Martine Lenders
c44d77e528
Merge pull request #15508 from namib-project/dhcp-mud-support
...
Add MUD URL option to DHCPv6 client
2020-12-01 10:33:51 +01:00