CoAP options container.
This structure provides a view into a storage buffer containing RFC7252-encoded options.
- See also
- Options
Definition at line 100 of file options.h.
|
Options that can occur more than once in a CoAP message
|
int | unicoap_options_add (unicoap_options_t *options, unicoap_option_number_t number, const uint8_t *value, size_t value_size) |
| Adds a repeatable option with the given value. More...
|
|
int | unicoap_options_add_values_joined (unicoap_options_t *options, unicoap_option_number_t number, const uint8_t *buffer, size_t size, uint8_t separator) |
| Splits the given value into separate values and adds them as option values. More...
|
|
ssize_t | unicoap_options_copy_values_joined (const unicoap_options_t *options, unicoap_option_number_t number, uint8_t *buffer, size_t capacity, uint8_t separator) |
| Copies the values of all options with the given number joined by the given separator. More...
|
|
int | unicoap_options_remove_all (unicoap_options_t *options, unicoap_option_number_t number) |
| Removes all options with the given number, if any. More...
|
|
|
Options that occur only once
|
ssize_t | unicoap_options_get (const unicoap_options_t *options, unicoap_option_number_t number, const uint8_t **value) |
| Retrieves the value of the option with given value, if present. More...
|
|
ssize_t | unicoap_options_copy_value (const unicoap_options_t *options, unicoap_option_number_t number, uint8_t *dest, size_t capacity) |
| Copies the value of the option with given value, if present, into a buffer. More...
|
|
int | unicoap_options_set (unicoap_options_t *options, unicoap_option_number_t number, const uint8_t *value, size_t value_size) |
| Sets the option with the given number. More...
|
|
static int | unicoap_options_remove (unicoap_options_t *options, unicoap_option_number_t number) |
| Removes option with the given number, if present. More...
|
|
|
static ssize_t | unicoap_options_get_uint32 (const unicoap_options_t *options, unicoap_option_number_t number, uint32_t *uint) |
| Retrieves an unsigned option value that takes up at most 4 bytes. More...
|
|
static ssize_t | unicoap_options_get_uint24 (const unicoap_options_t *options, unicoap_option_number_t number, uint32_t *uint) |
| Retrieves an unsigned option value that takes up at most 3 bytes. More...
|
|
static ssize_t | unicoap_options_get_uint16 (const unicoap_options_t *options, unicoap_option_number_t number, uint16_t *uint) |
| Retrieves an unsigned option value that takes up at most 2 bytes. More...
|
|
static ssize_t | unicoap_options_get_uint8 (const unicoap_options_t *options, unicoap_option_number_t number, uint8_t *uint) |
| Retrieves an unsigned option value that takes up at most one bytes. More...
|
|
int | unicoap_options_set_uint (unicoap_options_t *options, unicoap_option_number_t number, uint32_t value) |
| Sets the option with the given number to the unsigned integer value passed. More...
|
|
int | unicoap_options_add_uint (unicoap_options_t *options, unicoap_option_number_t number, uint32_t value) |
| Adds a repeatable option with the given unsigned integer value. More...
|
|
|
static ssize_t | unicoap_options_get_first_location_path_component (const unicoap_options_t *options, const char **component) |
| Retrieves the first Location-Path option, if present. More...
|
|
static ssize_t | unicoap_options_get_next_location_path_component (unicoap_options_iterator_t *iterator, const char **component) |
| Gets the next Location-Path option provided by the specified iterator. More...
|
|
static ssize_t | unicoap_options_copy_location_path (const unicoap_options_t *options, char *path, size_t capacity) |
| Copies absolute location path into the given buffer. More...
|
|
static ssize_t | unicoap_options_add_location_path_component (unicoap_options_t *options, char *component, size_t length) |
| Adds Location-Path option. More...
|
|
static ssize_t | unicoap_options_add_location_path_component_string (unicoap_options_t *options, char *component) |
| Adds Location-Path option from null-terminated string. More...
|
|
static ssize_t | unicoap_options_add_location_path (unicoap_options_t *options, char *path, size_t length) |
| Adds multiple Location-Path options from string. More...
|
|
static ssize_t | unicoap_options_add_location_path_string (unicoap_options_t *options, char *path) |
| Adds multiple Location-Path options from null-terminated string. More...
|
|
static int | unicoap_options_remove_location_path (unicoap_options_t *options) |
| Removes all Location-Path options, if any. More...
|
|
|
static ssize_t | unicoap_options_get_first_uri_path_component (const unicoap_options_t *options, const char **component) |
| Retrieves the first Uri-Path option, if present. More...
|
|
static ssize_t | unicoap_options_get_next_uri_path_component (unicoap_options_iterator_t *iterator, const char **component) |
| Gets the next Uri-Path option provided by the specified iterator. More...
|
|
static ssize_t | unicoap_options_copy_uri_path (const unicoap_options_t *options, char *path, size_t capacity) |
| Copies absolute URI path into the given buffer. More...
|
|
static ssize_t | unicoap_options_add_uri_path_component (unicoap_options_t *options, char *component, size_t length) |
| Adds Uri-Path option. More...
|
|
static ssize_t | unicoap_options_add_uri_path_component_string (unicoap_options_t *options, char *component) |
| Adds Uri-Path option from null-terminated string. More...
|
|
static ssize_t | unicoap_options_add_uri_path (unicoap_options_t *options, char *path, size_t length) |
| Adds multiple Uri-Path options from string. More...
|
|
static ssize_t | unicoap_options_add_uri_path_string (unicoap_options_t *options, char *path) |
| Adds multiple Uri-Path options from null-terminated string. More...
|
|
static int | unicoap_options_remove_uri_path (unicoap_options_t *options) |
| Removes all Uri-Path options, if any. More...
|
|
|
static ssize_t | unicoap_options_get_first_uri_query (const unicoap_options_t *options, const char **query) |
| Retrieves the first Uri-Query option, if present. More...
|
|
static ssize_t | unicoap_options_get_next_uri_query (unicoap_options_iterator_t *iterator, const char **query) |
| Gets the next Uri-Query option provided by the specified iterator. More...
|
|
static ssize_t | unicoap_options_get_next_uri_query_by_name (unicoap_options_iterator_t *iterator, const char *name, const char **value) |
| Gets the next Uri-Query option matching the given name, potentially skipping any options in between. More...
|
|
static ssize_t | unicoap_options_get_first_uri_query_by_name (unicoap_options_t *options, const char *name, const char **value) |
| Retrieves the first Uri-Query option matching the given name, if present. More...
|
|
static ssize_t | unicoap_options_copy_uri_queries (const unicoap_options_t *options, char *queries, size_t capacity) |
| Copies URI query string into the given buffer. More...
|
|
static ssize_t | unicoap_options_add_uri_query (unicoap_options_t *options, char *query, size_t length) |
| Adds Uri-Query option. More...
|
|
static ssize_t | unicoap_options_add_uri_query_string (unicoap_options_t *options, char *query) |
| Adds Uri-Query option from null-terminated string. More...
|
|
static ssize_t | unicoap_options_add_uri_queries (unicoap_options_t *options, char *queries, size_t length) |
| Adds multiple Uri-Query options from string. More...
|
|
static ssize_t | unicoap_options_add_uri_queries_string (unicoap_options_t *options, char *queries) |
| Adds multiple Uri-Query options from null-terminated string. More...
|
|
static int | unicoap_options_remove_uri_queries (unicoap_options_t *options) |
| Removes all Uri-Query options, if any. More...
|
|
|
static ssize_t | unicoap_options_get_first_location_query (const unicoap_options_t *options, const char **query) |
| Retrieves the first Location-Query option, if present. More...
|
|
static ssize_t | unicoap_options_get_next_location_query (unicoap_options_iterator_t *iterator, const char **query) |
| Gets the next Location-Query option provided by the specified iterator. More...
|
|
static ssize_t | unicoap_options_get_next_location_query_by_name (unicoap_options_iterator_t *iterator, const char *name, const char **value) |
| Gets the next Location-Query option matching the given name, potentially skipping any options in between. More...
|
|
static ssize_t | unicoap_options_get_first_location_query_by_name (unicoap_options_t *options, const char *name, const char **value) |
| Retrieves the first Location-Query option matching the given name, if present. More...
|
|
static ssize_t | unicoap_options_copy_location_queries (const unicoap_options_t *options, char *queries, size_t capacity) |
| Copies location query string into the given buffer. More...
|
|
static ssize_t | unicoap_options_add_location_query (unicoap_options_t *options, char *query, size_t length) |
| Adds Location-Query option. More...
|
|
static ssize_t | unicoap_options_add_location_query_string (unicoap_options_t *options, char *query) |
| Adds Location-Query option from null-terminated string. More...
|
|
static ssize_t | unicoap_options_add_location_queries (unicoap_options_t *options, char *queries, size_t length) |
| Adds multiple Location-Query options from string. More...
|
|
static ssize_t | unicoap_options_add_location_queries_string (unicoap_options_t *options, char *queries) |
| Adds multiple Location-Query options from null-terminated string. More...
|
|
static int | unicoap_options_remove_location_queries (unicoap_options_t *options) |
| Removes all Location-Query options, if any. More...
|
|
|
static ssize_t | unicoap_options_get_block (const unicoap_options_t *options, unicoap_option_number_t number, unicoap_block_option_t *block) |
| Retrieves a Block1 or Block2 option. More...
|
|
static int | unicoap_options_set_block (unicoap_options_t *options, unicoap_option_number_t number, unicoap_block_option_t block) |
| Sets the Block1 or Block2 option. More...
|
|
static ssize_t | unicoap_options_get_block1 (const unicoap_options_t *options, unicoap_block_option_t *block) |
| Retrieves the Block1 option, if present. More...
|
|
static ssize_t | unicoap_options_set_block1 (unicoap_options_t *options, unicoap_block_option_t block) |
| Sets the Block1 option. More...
|
|
static int | unicoap_options_remove_block1 (unicoap_options_t *options) |
| Removes the Block1 option, if present. More...
|
|
static ssize_t | unicoap_options_get_block2 (const unicoap_options_t *options, unicoap_block_option_t *block) |
| Retrieves the Block2 option, if present. More...
|
|
static ssize_t | unicoap_options_set_block2 (unicoap_options_t *options, unicoap_block_option_t block) |
| Sets the Block2 option. More...
|
|
static int | unicoap_options_remove_block2 (unicoap_options_t *options) |
| Removes the Block2 option, if present. More...
|
|
static ssize_t | unicoap_options_get_size1 (const unicoap_options_t *options, uint32_t *size) |
| Retrieves the Size1 option, if present. More...
|
|
static ssize_t | unicoap_options_set_size1 (unicoap_options_t *options, uint32_t size) |
| Sets the Size1 option. More...
|
|
static int | unicoap_options_remove_size1 (unicoap_options_t *options) |
| Removes the Size1 option, if present. More...
|
|
static ssize_t | unicoap_options_get_size2 (const unicoap_options_t *options, uint32_t *size) |
| Retrieves the Size2 option, if present. More...
|
|
static ssize_t | unicoap_options_set_size2 (unicoap_options_t *options, uint32_t size) |
| Sets the Size2 option. More...
|
|
static int | unicoap_options_remove_size2 (unicoap_options_t *options) |
| Removes the Size2 option, if present. More...
|
|