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

101 Commits

Author SHA1 Message Date
Martine Lenders
cbbde07cc6
gcoap: add helper function to get request header from a request memo 2022-05-12 15:22:05 +02: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
Benjamin Valentin
7dc2f730d2 nanocoap: check if all critical options were handled 2022-02-24 12:20:05 +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
Karl Fessel
9195a4f02b net/gcoap: most ZITMER_USEC to ZTIMER_MSEC 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
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
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
János Brodbeck
23a8659bdf
net/gcoap: support DTLS 2021-07-07 14:45:30 +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
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
Cenk Gündoğan
d4370e690e
gcoap: add a handler for request matching 2020-10-28 15:40:35 +01:00
chrysn
c0bc0c41b1 net/goap: State and check that listeners are added individually
Add a an assertion on the added listener not having a trailing chain
instead of silently overwriting it, point out the precondition in the
documentation, and guide users who want to add more than one listener
towards a more efficient way.
2020-10-23 22:33:43 +02:00
chrysn
462f8861f4 gcoap: Suppress retransmissions when ACK was received
This introduces an additional state to the COAP_MEMO_* series to avoid
enlarging the memo struct needlessly. While they are documented
publicly, practically only the COAP_MEMO_TIMEOUT and COAP_MEMO_RESPONSE
are used in communication with the application, as a
gcoap_request_memo_t is only handed out in that state.
2020-10-22 19:08:39 +02:00
chrysn
07a5a79f40 net/gcoap: Fix reference to COAP_LINK_FLAGS in documentation 2020-10-02 19:11:07 +02:00
Leandro Lanzieri
3920dd8c20
net/gcoap: Remove gcoap_finish 2020-07-17 16:33:19 +02:00
Leandro Lanzieri
072a0d8563
net/coap: Move COAP_ACK_TIMEOUT to 'CONFIG' namespace
COAP_ACK_TIMEOUT is moved to the compile time configuration macro
namespace.
2020-04-24 10:06:40 +02:00
Ken Bannister
6eae4ded84 net/gcoap: create CoAP ping request 2020-04-17 08:15:20 -04:00
Ken Bannister
04d14ae104 net/gcoap: reference canonical function name to add Uri-Query option 2020-04-06 06:19:44 -04:00
Cenk Gündoğan
b1f728189c net/gcoap: add note on proxy operation 2020-03-28 14:50:51 +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
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
6ab7fab40a net/gcoap: deprecate gcoap_add_qstring()
Use Packet API function coap_opt_add_uquery() instead.
2020-01-30 05:41:39 -05:00
Cenk Gündoğan
2fcd9e0456
Merge pull request #13225 from leandrolanzieri/pr/net/gcoap/fix_ref_to_variance
gcoap: Remove reference to COAP_ACK_VARIANCE in docs
2020-01-28 21:28:32 +01:00
Leandro Lanzieri
8250f4d198 net/gcoap: Remove reference to COAP_ACK_VARIANCE in docs 2020-01-28 20:14:46 +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
Martine Lenders
5bb404a1c7
Merge pull request #12837 from kb2ma/gcoap/remove_gcoap_req_send2
net/gcoap: remove gcoap_req_send2()
2020-01-15 14:45:29 +01:00
Ken Bannister
57cd900970 net/gcoap: deprecate macros used only by gcoap_finish() 2020-01-13 10:14:02 -05:00
Ken Bannister
6c2495bedb net/gcoap: deprecate gcoap_finish() 2020-01-13 10:14:02 -05:00
Ken Bannister
a33c8b1130 net/gcoap: remove gcoap_req_send2() 2019-11-28 11:32:40 -05: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
Ken Bannister
e873e5814a net/gcoap: add macro to delay initialization of gcoap 2019-11-27 17:56:55 -05:00
Ken Bannister
b354b8bd1a net/gcoap: refine doc for 'obs' link attribute 2019-11-03 09:28:02 -05:00
Sebastian Meiling
ca696f827b
Merge pull request #12193 from leandrolanzieri/pr/gcoap/obs
gcoap: Add 'obs' attribute in example and extend documentation
2019-10-31 18:14:23 +01:00
Ken Bannister
fe8bb49e39
Merge pull request #12231 from kb2ma/coap/refine_api_purpose
net/nanocoap: rebalance application vs. option API doc
2019-10-15 18:25:50 -04:00
benpicco
e942f86837
Merge pull request #11056 from kb2ma/coap/pkt_api_block_write
net/gcoap: add/use Packet API Block implementation
2019-09-24 21:43:33 +02:00
Ken Bannister
68ccf4bdc5 net/gcoap: add module documentation for block use 2019-09-24 14:03:50 -04:00
Ken Bannister
414c68a654 net/gcoap: insert doc to add options in order 2019-09-15 05:38:32 -04:00
Ken Bannister
3497c67917 net/gcoap: refactor Options API doc 2019-09-14 10:56:38 -04:00
Leandro Lanzieri
a3e717e58d sys/net/gcoap: Add clarification on observing in doc 2019-09-10 16:33:12 +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
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
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
Ken Bannister
8aa5258ba7
Merge pull request #11445 from miri64/gcoap/fix/rm-deprecated
gcoap: remove deprecated function gcoap_req_send()
2019-05-03 13:44:02 -04:00