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

71 Commits

Author SHA1 Message Date
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
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
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
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
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
bde253cca3
gcoap: use coap_method_flags_t 2019-09-09 09:40:14 +02:00
Benjamin Valentin
e8dc1119b8 sys: make use of ARRAY_SIZE macro 2019-08-06 19:43:54 +02:00
Ken Bannister
c8e87e7854
Merge pull request #11787 from miri64/gcoap/enh/backoff-config
gcoap: allow for retransmission backoff to be turned off
2019-08-02 06:40:07 -04:00
Ken Bannister
28317019fc
Merge pull request #11784 from miri64/gcoap/fix/ack-variance-0
gcoap: don't call random_uint32_range() when COAP_ACK_VARIANCE=0
2019-08-02 05:10:45 -04:00
Leandro Lanzieri
a9ab9d37e2
Merge pull request #11765 from kb2ma/coap/encode_resources
net/gcoap: add/publish link format attributes for a resource
2019-07-27 22:36:33 +02:00
Ken Bannister
d481ca9da7 net/gcoap: add selectable function to write a link 2019-07-27 07:09:40 -04:00
Martine S. Lenders
c31c9ed216 gcoap: allow for retransmission backoff to be turned off 2019-07-03 16:35:48 +02:00
Martine S. Lenders
1bde141697 gcoap: don't call random_uint32_range() when COAP_ACK_VARIANCE=0
`COAP_ACK_VARIANCE` is a configurable macro, so when it is 0, the
[precondition for `random_uint32_range()`][1] is not held.

[1]: https://doc.riot-os.org/group__sys__random.html#gab6ee09e1e56df3cc78acd1fbf97bfb24
2019-07-03 15:45:45 +02:00
Martine S. Lenders
c9179a26c8 gcoap: replace internal references to gcoap_req_send2()
`gcoap_req_send2()` is deprecated and was replaced with
`gcoap_req_send()`.
2019-07-03 15:00:06 +02:00
Martine Lenders
a11f817604 gcoap: rename gcoap_req_send2() to gcoap_req_send() 2019-04-25 13:40:32 +02:00
Martine Lenders
affd115405 gcoap: remove deprecated function gcoap_req_send() 2019-04-25 13:39:50 +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
Ken Bannister
3cdf43607c net/nanocoap: Return error from coap_opt_add_xxx() if no space 2019-03-19 05:30:04 -04: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
Ken Bannister
93da7372fd net/gcoap: use coap_opt_finish within gcoap 2019-01-27 08:56:26 -05:00
Ken Bannister
0e1c3ebe50 net/gcoap: make options buf macros configurable 2019-01-16 12:41:06 -05:00
Ken Bannister
bec94b0b7a net/gcoap: allow NULL path in gcoap_req_init() 2018-11-28 13:20:22 -05:00
Ken Bannister
424a01ddc1 net/gcoap: remove gcoap attributes from coap_pkt_t 2018-11-24 07:09:25 -05:00
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
Lasse Lueder
34a6e384c2 net/gcoap: use coap_data_ptr instead of hdr.data 2018-11-02 16:33:29 +01: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
05b6af466c sys: add missig <string.h> includes 2018-09-20 23:47:40 +02:00
Hauke Petersen
f2b1c5c87d net/gcoap: use sock_udp_ep_equal() 2018-09-07 12:03:19 +02:00
Hauke Petersen
a3b8c90485 net/gcoap: adjust to nanocoap changes 2018-08-30 10:31:03 +02:00
Pekka Nikander
8f10d65ad5 net/gcoap: Make references to coap_resource_t const in gcoap
A CoAP resource is a primary object between the application
    and CoAP library.  The Library needs the paths, methods,
    and handlers from it, so that it can call the right handler.
    However, it never needs to change any of them.

    The application also needs the resources.  The application
    may want to declare the resources as const, since it may
    want to store them in flash.
2018-07-30 09:00:21 +03: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
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
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
Ken Bannister
d7dde2dded net/gcoap: observer re-register with new token 2018-05-29 13:30:05 -04: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