Private API. More...
Private API.
Definition in file private.h.
#include <stdint.h>#include "mutex.h"#include "bitfield.h"#include "architecture.h"#include "random.h"#include "net/unicoap.h"#include "private/state.h"#include "private/packet.h"#include "private/messaging.h"
Include dependency graph for private.h:Go to the source code of this file.
Data Structures | |
| struct | unicoap_state_t |
| Container the unicoap stacks keeps state in. More... | |
Debugging | |
| #define | UNICOAP_DEBUG_PREFIX "coap" |
| Debug log prefix. | |
| #define | DEBUG_ENDPOINT(endpoint) |
| Debug print endpoint. | |
| #define | DEBUG_FLAGS(flags, role) |
| Debug print flags. | |
| void | unicoap_assist_emit_diagnostic_missing_driver (unicoap_proto_t proto) |
| Emit a diagnostic stating that a driver is missing. | |
Thread | |
| #define | UNICOAP_THREAD_IDENTIFIER "unicoap" |
| Name of background thread spawned upon calls to unicoap_init. | |
| void | unicoap_state_lock (void) |
| Locks internal state lock. | |
| void | unicoap_state_unlock (void) |
| Unlocks internal state lock. | |
Other Utils | |
| #define | UNICOAP_DECL_RECEIVER_STORAGE uint8_t unicoap_receiver_buffer[CONFIG_UNICOAP_PDU_SIZE_MAX] |
| Declares internal receiver storage buffer. | |
| #define | UNICOAP_DECL_RECEIVER_STORAGE_EXTERN extern UNICOAP_DECL_RECEIVER_STORAGE |
extern declaration of UNICOAP_DECL_RECEIVER_STORAGE | |
| static bool | unicoap_transport_truncate_received (size_t *chunk_size, size_t received) |
| Determines whether the chunk of the given size must be truncated to fit into a buffer of size CONFIG_UNICOAP_PDU_SIZE_MAX. | |
State and initialization | |
| static void | unicoap_set_listeners (unicoap_state_t *state, unicoap_listener_t *listeners) |
Sets listener array on state object to listeners. | |
| static unicoap_listener_t * | unicoap_get_listeners (unicoap_state_t *state) |
Gets listener array from state object. | |
| int | unicoap_init_udp (event_queue_t *queue) |
Initializes the CoAP over UDP driver on the given queue. | |
| int | unicoap_deinit_udp (event_queue_t *queue) |
Deinitializes the CoAP over UDP driver on the given queue. | |
| int | unicoap_init_dtls (event_queue_t *queue) |
Initializes the CoAP over DTLS over UDP driver on the given queue. | |
| int | unicoap_deinit_dtls (event_queue_t *queue) |
Deinitializes the CoAP over DTLS over UDP driver on the given queue. | |
| int | unicoap_init_rfc7252_common (event_queue_t *queue) |
Initializes the common RFC 7252 driver on the given queue. | |
| int | unicoap_deinit_rfc7252_common (event_queue_t *queue) |
DeiInitializes the common RFC 7252 driver on the given queue. | |
Resource-request matching | |
| int | unicoap_resource_find (const unicoap_packet_t *packet, const unicoap_resource_t **resource_ptr, const unicoap_listener_t **listener_ptr) |
| Tries to find a resource for the given packet. | |
| int | unicoap_resource_match_request_default (const unicoap_listener_t *listener, const unicoap_resource_t **resource_ptr, const unicoap_message_t *request, const unicoap_endpoint_t *endpoint) |
| Default request-resource matcher for listeners. | |
| int | unicoap_resource_handle_well_known_core (unicoap_message_t *message, const unicoap_aux_t *aux, unicoap_request_context_t *ctx, void *arg) |
Default resource handler for /.well-known/core | |