mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-19 14:09:05 +03:00
This updates the initial work done for adding in cache support include/coap2/coap_cache.h: (new) include/coap2/coap_cache_internal.h: (new) src/coap_cache.c: (new) New files to support cache support. CMakeLists.txt: Makefile.amMakefile.am: Makefile.libcoap: configure.ac: examples/lwip/Makefile: include/coap2/coap.h.in: include/coap2/coap.h.windows: win32/libcoap.vcxproj: win32/libcoap.vcxproj.filters: Add in the new files. examples/client.c: Fix valgrind reported memory leak. examples/coap-server.c: Add in new example_data resource that uses the new caching logic. Update hnd_put() to use the new cache logic for BLOCK1 PUTs. include/coap2/coap_forward_decls.h: include/coap2/coap_internal.h: include/coap2/coap_session.h: include/coap2/net.h: Add in new cache support. libcoap-2.map: libcoap-2.sym: Include the new functions. man/Makefile.am: man/coap.txt.in: man/coap_cache.txt.in: (new) Update documentation. src/coap_io.c: Idle timeout cache entries. src/coap_session.c: Delete cache entry when session is deleted. src/net.c: Delete cache entries when context is freed off. src/coap_gnutls.c: src/coap_mbedtls.c: src/coap_notls.c: src/coap_openssl.c: src/coap_tinydtls.c: Add in SHA256 digest support.
57 lines
1.5 KiB
C
57 lines
1.5 KiB
C
/*
|
|
* coap_forward_decls.h -- Forward declarations of structures that are
|
|
* opaque to application programming that use libcoap.
|
|
*
|
|
* Copyright (C) 2019 Jon Shallow <supjps-libcoap@jpshallow.com>
|
|
*
|
|
* This file is part of the CoAP library libcoap. Please see README for terms
|
|
* of use.
|
|
*/
|
|
|
|
/**
|
|
* @file coap_forward_decls.h
|
|
* @brief COAP forward definitions
|
|
*/
|
|
|
|
#ifndef COAP_FORWARD_DECLS_H_
|
|
#define COAP_FORWARD_DECLS_H_
|
|
|
|
/*
|
|
* Define the forward declations for the structures (even non-opaque)
|
|
* so that applications (using coap.h) as well as libcoap builds
|
|
* can reference them (and makes .h file dependencies a lot simpler).
|
|
*/
|
|
struct coap_cache_entry_t;
|
|
struct coap_cache_key_t;
|
|
struct coap_context_t;
|
|
struct coap_dtls_pki_t;
|
|
struct coap_endpoint_t;
|
|
struct coap_queue_t;
|
|
struct coap_session_t;
|
|
struct coap_string_t;
|
|
struct coap_subscription_t;
|
|
|
|
/*
|
|
* typedef all the opaque structures that are defined in coap_*_internal.h
|
|
*/
|
|
|
|
/* ************* coap_cache_internal.h ***************** */
|
|
|
|
/** Cache Entry information */
|
|
typedef struct coap_cache_entry_t coap_cache_entry_t;
|
|
typedef struct coap_cache_key_t coap_cache_key_t;
|
|
|
|
/* ************* coap_session_internal.h ***************** */
|
|
|
|
/**
|
|
* Abstraction of virtual endpoint that can be attached to coap_context_t.
|
|
*/
|
|
typedef struct coap_endpoint_t coap_endpoint_t;
|
|
|
|
/* ************* coap_subscribe_internal.h ***************** */
|
|
|
|
/** Subscriber information */
|
|
typedef struct coap_subscription_t coap_subscription_t;
|
|
|
|
#endif /* COAP_FORWARD_DECLS_H_ */
|