libcoap 4.3.5-develop-72190a8
|
Provides a simple cache request storage for CoAP requests. More...
#include "coap_forward_decls.h"
Go to the source code of this file.
Typedefs | |
typedef void(* | coap_cache_app_data_free_callback_t) (void *data) |
Callback to free off the app data when the cache-entry is being deleted / freed off. | |
typedef enum coap_cache_session_based_t | coap_cache_session_based_t |
typedef enum coap_cache_record_pdu_t | coap_cache_record_pdu_t |
Enumerations | |
enum | coap_cache_session_based_t { COAP_CACHE_NOT_SESSION_BASED , COAP_CACHE_IS_SESSION_BASED } |
enum | coap_cache_record_pdu_t { COAP_CACHE_NOT_RECORD_PDU , COAP_CACHE_RECORD_PDU } |
Functions | |
coap_cache_key_t * | coap_cache_derive_key (const coap_session_t *session, const coap_pdu_t *pdu, coap_cache_session_based_t session_based) |
Calculates a cache-key for the given CoAP PDU. | |
coap_cache_key_t * | coap_cache_derive_key_w_ignore (const coap_session_t *session, const coap_pdu_t *pdu, coap_cache_session_based_t session_based, const uint16_t *ignore_options, size_t ignore_count) |
Calculates a cache-key for the given CoAP PDU. | |
void | coap_delete_cache_key (coap_cache_key_t *cache_key) |
Delete the cache-key. | |
COAP_API int | coap_cache_ignore_options (coap_context_t *context, const uint16_t *options, size_t count) |
Define the CoAP options that are not to be included when calculating the cache-key. | |
COAP_API coap_cache_entry_t * | coap_new_cache_entry (coap_session_t *session, const coap_pdu_t *pdu, coap_cache_record_pdu_t record_pdu, coap_cache_session_based_t session_based, unsigned int idle_time) |
Create a new cache-entry hash keyed by cache-key derived from the PDU. | |
void | coap_delete_cache_entry (coap_context_t *context, coap_cache_entry_t *cache_entry) |
Remove a cache-entry from the hash list and free off all the appropriate contents apart from app_data. | |
COAP_API coap_cache_entry_t * | coap_cache_get_by_key (coap_context_t *context, const coap_cache_key_t *cache_key) |
Searches for a cache-entry identified by cache_key . | |
COAP_API coap_cache_entry_t * | coap_cache_get_by_pdu (coap_session_t *session, const coap_pdu_t *pdu, coap_cache_session_based_t session_based) |
Searches for a cache-entry corresponding to pdu . | |
const coap_pdu_t * | coap_cache_get_pdu (const coap_cache_entry_t *cache_entry) |
Returns the PDU information stored in the coap_cache entry. | |
void | coap_cache_set_app_data (coap_cache_entry_t *cache_entry, void *data, coap_cache_app_data_free_callback_t callback) |
Stores data with the given cache entry. | |
void * | coap_cache_get_app_data (const coap_cache_entry_t *cache_entry) |
Returns any application-specific data that has been stored with cache_entry using the function coap_cache_set_app_data(). | |
Provides a simple cache request storage for CoAP requests.
Definition in file coap_cache.h.