1d5010e126
nanocoap: make separate tree handling function
...
This refactors nanocoap to seperate out the resource tree parsing. It
allows for calling the tree handler with custom resource trees. The
advantage is that a resource with COAP_MATCH_SUBTREE can parse a new
separate resource tree.
2020-03-23 15:08:53 +01:00
Ken Bannister
ec2aff4546
Merge pull request #13240 from kb2ma/gcoap/deprecate_add_qstring
...
net/coap: deprecate gcoap_add_qstring() and update uses
2020-03-13 08:04:50 -04:00
Martine Lenders
20e30ec58b
Merge pull request #13622 from gschorcht/net/dhcpv6_fix_opt_len
...
sys/net/dhcpv6: fixes option length handling in client implementation
2020-03-12 18:56:43 +01:00
Gunar Schorcht
a25c61bc8b
sys/net/dhcpv6: fix client option length handling
2020-03-12 18:33:17 +01:00
benpicco
1212165222
Merge pull request #13584 from kb2ma/nanocoap/add_uquery_improvements
...
net/nanocoap: add uquery improvements
2020-03-12 15:18:07 +01:00
Ken Bannister
c55837d809
net/nanocoap: add query option directly
2020-03-12 08:44:26 -04:00
Martine S. Lenders
411e320b0c
sock_async_event: update for async callback argument support
2020-03-11 16:54:12 +01:00
Martine S. Lenders
6e6e435c65
sock_async: add optional callback argument
2020-03-11 16:54:11 +01:00
Aiman Ismail
64f9658472
nanocoap: add coap_opt_add_uquery2()
2020-03-05 19:06:14 +01:00
Martine Lenders
ec6c07d35d
Merge pull request #13424 from miri64/examples/enh/dhcpv6-br
...
examples/gnrc_border_router: add optional DHCPv6 support
2020-02-25 20:08:31 +01:00
benpicco
d044800300
Merge pull request #13450 from benpicco/dns-fixes
...
fix DNS resolution in ping6
2020-02-24 21:58:34 +01:00
Benjamin Valentin
1de14931b8
sock_dns: use the same buffer for request & reply
...
Saving RAM is more important than saving a few cycles
used by re-creating the request buffer in the error case.
Also reduce the size of the buffer to 128 bytes.
If we are just requesting the AAAA record it is unlikely
for the reply to take up the maximum size of 512 bytes.
We were already placing restrictions on the domain name length,
those are now actually a bit more relaxed (112 bytes instead of 64)
2020-02-24 14:29:17 +01:00
Benjamin Valentin
e9a40933f7
sock_dns: fix off-by-one error in _parse_dns_reply()
2020-02-24 14:19:50 +01:00
Ken Bannister
e98a6e5932
net/gcoap: update copyright date
2020-02-24 06:22:04 -05:00
Ken Bannister
c8cd3f0229
net/gcoap: fix vera++ code style warnings
2020-02-24 06:20:43 -05:00
Ken Bannister
9b63abb718
net/gcoap: cast required for pic32 platform
...
Fixes bug found during rework for sock_async implementation.
2020-02-22 05:46:07 -05:00
Ken Bannister
0dc1e4c4e7
net/gcoap: fix when no timeout event
...
Fixes bug found during rework for sock_async implementation.
2020-02-22 05:46:07 -05:00
Martine S. Lenders
b929d013d8
dhcpv6_client: re-send SOLICITs after failed ADVERTISE
2020-02-20 16:41:48 +01:00
Ken Bannister
d6fa3c7c2f
net/gcoap: add timeout event/handler for server response
2020-02-16 09:17:48 -05:00
Ken Bannister
ea62734baf
net/gcoap: add sock_async event handling
...
Rework from earlier custom event/msg handling.
2020-02-16 09:17:48 -05:00
Ken Bannister
7f3e953893
net/cord: update for deprecated gcoap function
2020-01-30 06:00:53 -05:00
Ken Bannister
0ed4fe2da6
net/coap: move/rename function to add query option
2020-01-29 09:23:47 -05:00
Cenk Gündoğan
c84d7d2623
Merge pull request #12887 from leandrolanzieri/pr/kconfig_migrate/gcoap
...
Kconfig: Expose Gcoap configurations
2020-01-28 18:58:29 +01:00
Leandro Lanzieri
926d32ff30
Kconfig: Expose Gcoap configurations
2020-01-28 11:59:52 +01:00
Leandro Lanzieri
bab6f4737c
net/gcoap: Move config macros to 'CONFIG_' namespace
...
Macros that changed:
GCOAP_MSG_QUEUE_SIZE -> CONFIG_GCOAP_MSG_QUEUE_SIZE
GCOAP_NO_AUTO_INIT -> CONFIG_GCOAP_NO_AUTO_INIT
GCOAP_NO_RETRANS_BACKOFF -> CONFIG_GCOAP_NO_RETRANS_BACKOFF
GCOAP_NON_TIMEOUT -> CONFIG_GCOAP_NON_TIMEOUT
GCOAP_OBS_CLIENTS_MAX -> CONFIG_GCOAP_OBS_CLIENTS_MAX
GCOAP_OBS_OPTIONS_BUF -> CONFIG_GCOAP_OBS_OPTIONS_BUF
GCOAP_OBS_REGISTRATIONS_MAX -> CONFIG_GCOAP_OBS_REGISTRATIONS_MAX
GCOAP_OBS_VALUE_WIDTH -> CONFIG_GCOAP_OBS_VALUE_WIDTH
GCOAP_PDU_BUF_SIZE -> CONFIG_GCOAP_PDU_BUF_SIZE
GCOAP_PORT -> CONFIG_GCOAP_PORT
GCOAP_RECV_TIMEOUT -> CONFIG_GCOAP_RECV_TIMEOUT
GCOAP_REQ_OPTIONS_BUF -> CONFIG_GCOAP_REQ_OPTIONS_BUF
GCOAP_REQ_WAITING_MAX -> CONFIG_GCOAP_REQ_WAITING_MAX
GCOAP_RESEND_BUFS_MAX -> CONFIG_GCOAP_RESEND_BUFS_MAX
GCOAP_RESP_OPTIONS_BUF -> CONFIG_GCOAP_RESP_OPTIONS_BUF
GCOAP_TOKENLEN -> CONFIG_GCOAP_TOKENLEN
2020-01-28 11:59:52 +01:00
Leandro Lanzieri
3f382dc323
net/gcoap: Use COAP_RANDOM_FACTOR_1000 to calculate timeout range
...
With this the range for the random timeout is calculated using
COAP_RANDOM_FACTOR_1000 (ACK_RANDOM_FACTOR in RFC 7252).
2020-01-27 19:47:20 +01:00
Martine Lenders
1048d67c76
dhcpv6: provide initial client implementation
...
This implements a client for DHCPv6 IA_PD (Identity Association for
Prefix Delegation). Goal was to have a IETF-compliant alternative to
UHCP. The implementation was based on RFC 8415.
2020-01-16 12:36:03 +01:00
Hauke Petersen
3a7b60e4d4
net/cord_epsim: adapt to gcoap API changes
2019-11-28 12:50:24 +01:00
Hauke Petersen
7b1217a529
net/cord_ep: adapt to gcoap API changes
2019-11-28 12:50:24 +01:00
Hauke Petersen
3fd8357071
net/gcoap: allow to pass user context to requests
2019-11-28 12:50:24 +01:00
Hauke Petersen
383f395af3
net/gcoap: pass memo to resp_handler directly
2019-11-28 12:48:37 +01:00
Hauke Petersen
17b1b19fda
net/gcoap: do not allocate RX buf on stack
2019-11-26 15:00:03 +01:00
d4f3747705
sys/net: fix typos
2019-11-23 22:39:38 +01:00
8b06560c02
sys/net/nanocoap: correctly initialize array
2019-10-30 17:03:06 +01:00
95da51bd7f
sys/net/nanocoap: fix potential use of uinitialized variable
2019-10-30 17:03:06 +01:00
5d1480a4b8
sys/net/nanocoap: fail when start data cannot be parsed
2019-10-30 17:03:06 +01:00
1aa1e2c8cc
sys/net/nanocoap: return ENOENT if parsing option failed
...
This fixes a potential use of uninitialized len in subsequent function calls.
This was reported by scan-build
2019-10-30 17:03:06 +01:00
a9399810d5
sys/net/uhcp: remove unused returned value in uhcp_client
2019-10-28 15:14:40 +01:00
aaadaccc3f
sys/net/nanocoap: fix dead assignment in nanocoap server
2019-10-27 10:49:41 +01:00
Martine Lenders
9d0faa9e5f
Merge pull request #11957 from miri64/emcute/fix/payload-copy-error
...
emcute: fix payload copy error for emcute_pub
2019-10-07 17:17:44 +02:00
Martine Lenders
999a7714b0
Merge pull request #12382 from nmeum/pr/asymcute_continue
...
emcute: never return from receive loop
2019-10-07 16:28:09 +02:00
Sören Tempel
74e19d451c
emcute: never return from receive loop
...
Without this change an attacker would be able to stop the emcute server
by sending a crafted packet triggering this branch. The solution is
using `continue` instead of `return`.
2019-10-07 15:12:20 +02:00
Francisco
7d7596ea6c
Merge pull request #11057 from kb2ma/coap/block_optimization
...
net/coap: Block optimizations
2019-10-04 09:41:05 +02:00
Ken Bannister
2dc4209c0e
net/nanocoap: optimize determination of exponent for block szx
2019-10-03 13:17:09 -04:00
Ken Bannister
e22d4729e1
net/nanocoap: initialize offset attribute
2019-10-02 05:51:59 -04:00
Ken Bannister
2abcbc0d20
net/coap: add generic get block function
2019-10-02 05:51:59 -04:00
Ken Bannister
5eaa51e426
net/nanocoap: remove unused function
2019-10-02 05:51:59 -04:00
Ken Bannister
efb75c5c4c
net/coap: improve slicer to block helper
2019-10-02 05:51:59 -04:00
Ken Bannister
dae9c4ab89
net/nanocoap: use coap_opt_add_uint() and remove unused
2019-10-02 05:51:59 -04:00
Ken Bannister
233dd31e17
net/nanocoap: add generic uint block option
2019-10-02 05:51:59 -04:00