110#define UNICOAP_MESSAGING_FLAGS_DEFAULT (0)
int unicoap_server_send_response_body(unicoap_packet_t *packet, const unicoap_resource_t *resource)
Sends entire response body, may be split into parts and then sent.
int unicoap_messaging_send(unicoap_packet_t *packet, unicoap_messaging_flags_t flags)
Forwards packet to messaging layer and the corresponding driver for further message processing,...
int unicoap_exchange_release_endpoint_state(const unicoap_endpoint_t *endpoint)
Releases all buffers and state allocated in connection with the given endpoint.
static unicoap_messaging_flags_t _messaging_flags_resource(unicoap_resource_flags_t resource_flags)
Retrieves the part of a resource flags bitfield relevant for the messaging driver.
int unicoap_messaging_send_rfc7252(unicoap_packet_t *packet, unicoap_messaging_flags_t flags)
Sends CoAP over UDP or DTLS packet, see unicoap_messaging_send.
unicoap_messaging_flags_t
Messaging layer result after initial treatment of an inbound message.
int unicoap_exchange_process(unicoap_packet_t *packet, unicoap_exchange_arg_t arg)
Processes message.
int unicoap_server_process_request(unicoap_packet_t *packet, const unicoap_resource_t *resource)
Informs the unicoap server a new packet has been preprocessed and can be handled.
unicoap_preprocessing_result_t unicoap_exchange_preprocess(unicoap_packet_t *packet, unicoap_messaging_flags_t *flags, unicoap_exchange_arg_t *arg, bool truncated)
Performs initial processing of a CoAP packet after it has been parsed.
int unicoap_messaging_process_rfc7252(const uint8_t *pdu, size_t size, bool truncated, unicoap_packet_t *packet)
Internal RFC 7252 messaging inbound processor.
void unicoap_generate_token(uint8_t *token)
Generates new token.
unicoap_preprocessing_result_t
Result of unicoap_exchange_preprocess.
@ UNICOAP_MESSAGING_FLAG_RELIABLE
Messaging flag indicating the stack wants this message to be transmitted reliably.
@ UNICOAP_PREPROCESSING_SUCCESS_RESPONSE
The given message can be processed.
@ UNICOAP_PREPROCESSING_ERROR_NOTIFICATION_UNEXPECTED
Unexpected notification, no known client exchange (observation)
@ UNICOAP_PREPROCESSING_ERROR_UNSUPPORTED
The given message cannot be processed due to being unsupported.
@ UNICOAP_PREPROCESSING_ERROR_REQUEST
The given message cannot be handled, disregarded.
@ UNICOAP_PREPROCESSING_ERROR_TRUNCATED
The given message is truncated and can thus not be handled.
@ UNICOAP_PREPROCESSING_SUCCESS_REQUEST
The given message can be processed.
@ UNICOAP_PREPROCESSING_ERROR_INVALID_CODE_CLASS
The given message's code class is not valid.
@ UNICOAP_PREPROCESSING_ERROR_RESPONSE_UNEXPECTED
The given message is unexpected and cannot be processed.
unicoap_resource_flags_t
Flags for enabling advanced features in server exchanges.
struct unicoap_resource unicoap_resource_t
CoAP resource.
A type acting as an envelope for a message and data connected, like endpoints.
Argument passed to exchange-layer processing function.
const unicoap_resource_t * resource
Resource.