Persist: Support tracking observe information over server restarts

Add in optional callbacks for when dynamic resources are setup and deleted.

Add in optional callbacks for when observe subscriptions start and stop.

Add in optional callbacks for when the observe counter is updated (can be
ratelimited) for a resource as well as track when a resource is deleted.

Add is support for new functions

Main functions with libcoap tracking support are
 coap_persist_startup()
 coap_persist_stop()

coap-server has -t option to track observe information.

UDP sessions supported, as well as OSCORE over UDP.

Documentation updated

libcoap tracking support (as opposed to application tracking) is configurable.
This commit is contained in:
Jon Shallow authored and Jon Shallow committed 2023-04-22 11:07:21 +01:00
1 parent 203471118f
commit ca609d221c
24 files changed
+2034 -37

No files matched your search

+1
View File
@@ -69,6 +69,7 @@
#define CBOR_FALSE 20
#define CBOR_TRUE 21
#define CBOR_NULL 22
size_t oscore_cbor_put_nil(uint8_t **buffer, size_t *buf_size);
+3 -3
View File
@@ -240,9 +240,9 @@ void oscore_log_char_value(coap_log_t level, const char *name,
*
* return The OSCORE context and @p recipient_ctx updated, or NULL is error.
*/
oscore_ctx_t *oscore_find_context(coap_context_t *c_context,
coap_bin_const_t rcpkey_id,
coap_bin_const_t *ctxkey_id,
oscore_ctx_t *oscore_find_context(const coap_context_t *c_context,
const coap_bin_const_t rcpkey_id,
const coap_bin_const_t *ctxkey_id,
uint8_t *oscore_r2,
oscore_recipient_ctx_t **recipient_ctx);