libcoap  4.3.0
coap_cache.h File Reference

Provides a simple cache request storage for CoAP requests. More...

+ Include dependency graph for coap_cache.h:
+ This graph shows which files directly or indirectly include this file:

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. More...
 
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_tcoap_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. More...
 
coap_cache_key_tcoap_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. More...
 
void coap_delete_cache_key (coap_cache_key_t *cache_key)
 Delete the cache-key. More...
 
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. More...
 
coap_cache_entry_tcoap_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. More...
 
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. More...
 
coap_cache_entry_tcoap_cache_get_by_key (coap_context_t *context, const coap_cache_key_t *cache_key)
 Searches for a cache-entry identified by cache_key. More...
 
coap_cache_entry_tcoap_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. More...
 
const coap_pdu_tcoap_cache_get_pdu (const coap_cache_entry_t *cache_entry)
 Returns the PDU information stored in the coap_cache entry. More...
 
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. More...
 
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(). More...
 

Detailed Description

Provides a simple cache request storage for CoAP requests.

Definition in file coap_cache.h.