Option structures and base accessors. More...
Option structures and base accessors.
Definition in file base.h.
#include <stdint.h>#include <stdbool.h>#include <string.h>#include <assert.h>#include <errno.h>#include <sys/types.h>#include "byteorder.h"#include "net/unicoap/constants.h"#include "net/unicoap/util_macros.h"
Include dependency graph for base.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | unicoap_option_entry_t |
| Helper struct for options parser. More... | |
| struct | unicoap_options_t |
| CoAP options container. More... | |
| struct | unicoap_options_iterator_t |
| The iterator you use to retrieve option values in-order. More... | |
Allocating option buffers | |
| #define | UNICOAP_OPTIONS_ALLOC(name, capacity) |
| Allocates options with buffer capacity. | |
| #define | UNICOAP_OPTIONS_ALLOC_STATIC(name, capacity) |
| Statically allocates options with buffer capacity. | |
| #define | UNICOAP_OPTIONS_ALLOC_DEFAULT(name) |
| Allocates options with default capacity. | |
| #define | UNICOAP_OPTIONS_ALLOC_STATIC_DEFAULT(name) |
| Statically allocates options with default capacity. | |
Auxiliary constants | |
| #define | EBADOPT 151 |
| Bad option. | |
| #define | EPAYLD 152 |
| Cannot read option, encountered payload marker. | |
| #define | UNICOAP_UINT24_MAX (0xffffff) |
| Largest number representable with 24 bits (3 bytes) | |
| #define | UNICOAP_UINT24_SIZE (3) |
| Size in bytes of number representable with 24 bits (3 bytes) | |
| #define | UNICOAP_UINT_MAX (14 + 255 + 0xffff) |
| Unsigned integer large enough to accommodate the maximum integer representable by CoAP option delta fields and extended length fields. | |
Option characteristics | |
| static bool | unicoap_option_is_critical (unicoap_option_number_t option_number) |
| Determines whether the given option is considered critical. | |
| static bool | unicoap_option_is_safe_to_forward (unicoap_option_number_t option_number) |
| Determines whether the given option is safe to forward. | |
| static bool | unicoap_option_is_no_cache_key (unicoap_option_number_t option_number) |
| Determines whether the given option is not intended to be part of the cache key. | |
| static bool | unicoap_option_is_cache_key (unicoap_option_number_t option_number) |
| Determines whether the given option is intended to be part of the cache key. | |
Tools | |
| const char * | unicoap_string_from_option_number (unicoap_option_number_t number) |
| Returns label of option corresponding to the given number. | |
Enumerating options | |
| void | unicoap_options_print_uri_path (const unicoap_options_t *options) |
Iterates over all Uri-Path options and prints the resulting path using printf. | |