18#if defined(HAVE_STRNLEN) && defined(__GNUC__) && !defined(_GNU_SOURCE)
27#ifdef HAVE_ARPA_INET_H
39# define fprintf(fd, ...) LWIP_PLATFORM_DIAG((__VA_ARGS__))
45# define DEBUG DEBUG_PRINT
47#include "net/ip/uip-debug.h"
59 return PACKAGE_STRING;
63#ifdef LIBCOAP_PACKAGE_BUILD
64 return LIBCOAP_PACKAGE_BUILD;
66 return PACKAGE_STRING;
87 "EMRG",
"ALRT",
"CRIT",
"ERR ",
"WARN",
"NOTE",
"INFO",
"DEBG",
"????",
"CIPH"
97 tmp = localtime(&now);
98 lensofar = strftime(s, len,
"%b %d %H:%M:%S", tmp);
99 if (len > lensofar + 4) {
100 lensofar += snprintf(&s[lensofar], len-lensofar,
".%03u",
111 return snprintf(s, len,
"%u.%03u",
134 while(*s++ &&
n < maxlen)
142 unsigned char *result,
size_t buflen,
int encode_always ) {
143 const uint8_t hex[] =
"0123456789ABCDEF";
145 assert(data || len == 0);
152 if (!encode_always && isprint(*data)) {
153 if (cnt+1 < buflen) {
160 if (cnt+4 < buflen) {
163 *result++ = hex[(*data & 0xf0) >> 4];
164 *result++ = hex[*data & 0x0f];
178#define min(a,b) ((a) < (b) ? (a) : (b))
187#if defined( HAVE_ARPA_INET_H ) || defined( HAVE_WS2TCPIP_H )
188 const void *addrptr = NULL;
190 unsigned char *p = buf;
197 switch (addr->
addr.
sa.sa_family) {
199 if (len < INET_ADDRSTRLEN + 1)
201 addrptr = &addr->
addr.
sin.sin_addr;
202 port = ntohs(addr->
addr.
sin.sin_port);
203 need_buf = INET_ADDRSTRLEN;
211 addrptr = &addr->
addr.
sin6.sin6_addr;
212 port = ntohs(addr->
addr.
sin6.sin6_port);
218 memcpy(buf,
"(unknown address type)",
min(22+1, len));
224 if (inet_ntop(addr->
addr.
sa.sa_family, addrptr, (
char *)p,
225 min(len, need_buf)) == 0) {
226 perror(
"coap_print_addr");
231 p += strlen((
char *)p);
233 if (addr->
addr.
sa.sa_family == AF_INET6) {
234 if (p + 1 < buf + len) {
241 snprintf((
char *)p, buf + len - p,
":%d", port);
243 return strlen((
char *)buf);
246 unsigned char *p = buf;
248# if NETSTACK_CONF_WITH_IPV6
249 const uint8_t hex[] =
"0123456789ABCDEF";
259 for (i=0; i < 16; i += 2) {
263 *p++ = hex[(addr->
addr.u8[i] & 0xf0) >> 4];
264 *p++ = hex[(addr->
addr.u8[i] & 0x0f)];
265 *p++ = hex[(addr->
addr.u8[i+1] & 0xf0) >> 4];
266 *p++ = hex[(addr->
addr.u8[i+1] & 0x0f)];
270# warning "IPv4 network addresses will not be included in debug output"
277 if (buf + len - p < 6) {
284 snprintf((
char *)p, buf + len - p,
":%d", uip_htons(addr->port));
290 return strlen((
char *)p);
293# warning "inet_ntop() not available, network addresses will not be included in debug output"
301# define fprintf(fd, ...) { (void)fd; PRINTF(__VA_ARGS__); }
305# define vfprintf(fd, ...) { (void)fd; vprintf(__VA_ARGS__); }
307# define vfprintf(fd, ...) { (void)fd; PRINTF(__VA_ARGS__); }
314 static const char *types[] = {
"CON",
"NON",
"ACK",
"RST",
"???" };
316 return types[
min(t,
sizeof(types)/
sizeof(
char *) - 1)];
322 static const char *methods[] = {
"0.00",
"GET",
"POST",
"PUT",
"DELETE",
323 "FETCH",
"PATCH",
"iPATCH" };
324 static const char *signals[] = {
"7.00",
"CSM",
"Ping",
"Pong",
"Release",
328 if (c <
sizeof(methods)/
sizeof(
const char *)) {
330 }
else if (c >= 224 && c - 224 < (
int)(
sizeof(signals)/
sizeof(
const char *))) {
331 return signals[c-224];
333 snprintf(buf,
sizeof(buf),
"%u.%02u", (c >> 5) & 0x7, c & 0x1f);
341 struct option_desc_t {
346 static struct option_desc_t options[] = {
372 static struct option_desc_t options_csm[] = {
377 static struct option_desc_t options_pingpong[] = {
381 static struct option_desc_t options_release[] = {
386 static struct option_desc_t options_abort[] = {
394 for (i = 0; i <
sizeof(options_csm)/
sizeof(
struct option_desc_t); i++) {
395 if (option_type == options_csm[i].type) {
396 return options_csm[i].name;
400 for (i = 0; i <
sizeof(options_pingpong)/
sizeof(
struct option_desc_t); i++) {
401 if (option_type == options_pingpong[i].type) {
402 return options_pingpong[i].name;
406 for (i = 0; i <
sizeof(options_release)/
sizeof(
struct option_desc_t); i++) {
407 if (option_type == options_release[i].type) {
408 return options_release[i].name;
412 for (i = 0; i <
sizeof(options_abort)/
sizeof(
struct option_desc_t); i++) {
413 if (option_type == options_abort[i].type) {
414 return options_abort[i].name;
419 for (i = 0; i <
sizeof(options)/
sizeof(
struct option_desc_t); i++) {
420 if (option_type == options[i].type) {
421 return options[i].name;
426 snprintf(buf,
sizeof(buf),
"%u", option_type);
432 unsigned char *result,
unsigned int buflen) {
438 static struct desc_t formats[] = {
466 { 75,
"application/dcaf+cbor" }
472 for (i = 0; i <
sizeof(formats)/
sizeof(
struct desc_t); i++) {
473 if (format_type == formats[i].type) {
474 return snprintf((
char *)result, buflen,
"%s", formats[i].name);
479 return snprintf((
char *)result, buflen,
"%d", format_type);
489 return !(content_format == -1 ||
496#define COAP_DO_SHOW_OUTPUT_LINE \
498 if (use_fprintf_for_show_pdu) { \
499 fprintf(COAP_DEBUG_FD, "%s", outbuf); \
502 coap_log(level, "%s", outbuf); \
518#if COAP_DEBUG_BUF_SIZE < 5
519#error "COAP_DEBUG_BUF_SIZE must be at least 5, should be >= 32 to be useful"
524#if COAP_CONSTRAINED_STACK
525 static coap_mutex_t static_show_pdu_mutex = COAP_MUTEX_INITIALIZER;
527 static unsigned char buf[
min(COAP_DEBUG_BUF_SIZE, 1035)];
528 static char outbuf[COAP_DEBUG_BUF_SIZE];
531 unsigned char buf[
min(COAP_DEBUG_BUF_SIZE, 1035)];
532 char outbuf[COAP_DEBUG_BUF_SIZE];
535 int encode = 0, have_options = 0, i;
538 int content_format = -1;
542 const uint8_t* opt_val;
543 size_t outbuflen = 0;
549#if COAP_CONSTRAINED_STACK
550 coap_mutex_lock(&static_show_pdu_mutex);
553 snprintf(outbuf,
sizeof(outbuf),
"v:%d t:%s c:%s i:%04x {",
558 outbuflen = strlen(outbuf);
559 snprintf(&outbuf[outbuflen],
sizeof(outbuf)-outbuflen,
560 "%02x", pdu->
token[i]);
562 outbuflen = strlen(outbuf);
563 snprintf(&outbuf[outbuflen],
sizeof(outbuf)-outbuflen,
"}");
568 outbuflen = strlen(outbuf);
569 snprintf(&outbuf[outbuflen],
sizeof(outbuf)-outbuflen,
" [");
575 outbuflen = strlen(outbuf);
576 snprintf(&outbuf[outbuflen],
sizeof(outbuf)-outbuflen,
",");
581 buf_len = snprintf((
char *)buf,
sizeof(buf),
"%u",
595 buf,
sizeof(buf), 0);
598 buf_len = snprintf((
char *)buf,
sizeof(buf),
"%u",
607 buf_len = snprintf((
char *)buf,
sizeof(buf),
"%u",
614 }
else switch (opt_iter.
number) {
629 buf_len = snprintf((
char *)buf,
sizeof(buf),
"%u/%c/BERT(%zu)",
634 buf_len = snprintf((
char *)buf,
sizeof(buf),
"%u/%c/BERT",
638 buf_len = snprintf((
char *)buf,
sizeof(buf),
"%u/%c/%u",
653 buf_len = snprintf((
char *)buf,
sizeof(buf),
"%u",
665 snprintf((
char *)buf,
sizeof(buf),
"0x");
666 for (i = 0; (uint32_t)i < opt_len; i++) {
667 buf_len = strlen((
char *)buf);
668 snprintf((
char *)&buf[buf_len],
sizeof(buf)-buf_len,
671 buf_len = strlen((
char *)buf);
689 buf,
sizeof(buf), encode);
692 outbuflen = strlen(outbuf);
693 snprintf(&outbuf[outbuflen],
sizeof(outbuf)-outbuflen,
698 outbuflen = strlen(outbuf);
699 snprintf(&outbuf[outbuflen],
sizeof(outbuf)-outbuflen,
" ]");
703 outbuflen = strlen(outbuf);
704 snprintf(&outbuf[outbuflen],
sizeof(outbuf)-outbuflen,
" :: ");
706 if (
is_binary(content_format) || !isprint(data[0])) {
707 size_t keep_data_len = data_len;
708 const uint8_t *keep_data = data;
710 outbuflen = strlen(outbuf);
711 snprintf(&outbuf[outbuflen],
sizeof(outbuf)-outbuflen,
712 "binary data length %zu\n", data_len);
718 snprintf(outbuf,
sizeof(outbuf),
"<<");
720 outbuflen = strlen(outbuf);
721 snprintf(&outbuf[outbuflen],
sizeof(outbuf)-outbuflen,
724 outbuflen = strlen(outbuf);
725 snprintf(&outbuf[outbuflen],
sizeof(outbuf)-outbuflen,
">>");
726 data_len = keep_data_len;
728 outbuflen = strlen(outbuf);
729 snprintf(&outbuf[outbuflen],
sizeof(outbuf)-outbuflen,
"\n");
736 snprintf(outbuf,
sizeof(outbuf),
"<<");
738 outbuflen = strlen(outbuf);
739 snprintf(&outbuf[outbuflen],
sizeof(outbuf)-outbuflen,
740 "%c ", isprint (*data) ? *data :
'.');
743 outbuflen = strlen(outbuf);
744 snprintf(&outbuf[outbuflen],
sizeof(outbuf)-outbuflen,
">>");
748 outbuflen = strlen(outbuf);
749 max_length =
sizeof(outbuf)-outbuflen;
750 if (max_length > 1) {
751 outbuf[outbuflen++] =
'\'';
752 outbuf[outbuflen] =
'\000';
755 if (max_length > 1) {
757 (
unsigned char*)&outbuf[outbuflen],
761 if (outbuflen <
sizeof(outbuf)-4-1) {
762 outbuf[outbuflen++] =
'\'';
763 outbuf[outbuflen] =
'\000';
768 outbuflen = strlen(outbuf);
769 if (outbuflen ==
sizeof(outbuf)-1) outbuflen--;
770 snprintf(&outbuf[outbuflen],
sizeof(outbuf)-outbuflen,
"\n");
773#if COAP_CONSTRAINED_STACK
774 coap_mutex_unlock(&static_show_pdu_mutex);
793 switch (tls_version->
type) {
795 snprintf(buffer, bufsize,
"TLS Library: None");
798 snprintf(buffer, bufsize,
"TLS Library: TinyDTLS - runtime %lu.%lu.%lu, "
799 "libcoap built for %lu.%lu.%lu",
800 (
unsigned long)(tls_version->
version >> 16),
801 (
unsigned long)((tls_version->
version >> 8) & 0xff),
802 (
unsigned long)(tls_version->
version & 0xff),
808 switch (tls_version->
version &0xf) {
810 strcpy(beta,
"-dev");
816 strcpy(beta,
"-beta");
817 beta[5] = (tls_version->
version &0xf) +
'0';
821 sub[0] = ((tls_version->
version >> 4) & 0xff) ?
822 ((tls_version->
version >> 4) & 0xff) +
'a' -1 :
'\000';
826 strcpy(b_beta,
"-dev");
832 strcpy(b_beta,
"-beta");
838 ((tls_version->
built_version >> 4) & 0xff) +
'a' -1 :
'\000';
840 snprintf(buffer, bufsize,
"TLS Library: OpenSSL - runtime "
841 "%lu.%lu.%lu%s%s, libcoap built for %lu.%lu.%lu%s%s",
842 (
unsigned long)(tls_version->
version >> 28),
843 (
unsigned long)((tls_version->
version >> 20) & 0xff),
844 (
unsigned long)((tls_version->
version >> 12) & 0xff), sub, beta,
851 snprintf(buffer, bufsize,
"TLS Library: GnuTLS - runtime %lu.%lu.%lu, "
852 "libcoap built for %lu.%lu.%lu",
853 (
unsigned long)(tls_version->
version >> 16),
854 (
unsigned long)((tls_version->
version >> 8) & 0xff),
855 (
unsigned long)(tls_version->
version & 0xff),
861 snprintf(buffer, bufsize,
"TLS Library: Mbed TLS - runtime %lu.%lu.%lu, "
862 "libcoap built for %lu.%lu.%lu",
863 (
unsigned long)(tls_version->
version >> 24),
864 (
unsigned long)((tls_version->
version >> 16) & 0xff),
865 (
unsigned long)((tls_version->
version >> 8) & 0xff),
871 snprintf(buffer, bufsize,
"Library type %d unknown", tls_version->
type);
883 if (have_dtls == 0 && have_tls == 0) {
884 snprintf(buffer, bufsize,
"(No DTLS or TLS support)");
887 switch (tls_version->
type) {
889 snprintf(buffer, bufsize,
"(No DTLS or TLS support)");
892 snprintf(buffer, bufsize,
893 "(%sDTLS and%s TLS support; PSK, no PKI, no PKCS11, and RPK support)",
894 have_dtls ?
"" :
" no",
895 have_tls ?
"" :
" no");
898 snprintf(buffer, bufsize,
899 "(%sDTLS and%s TLS support; PSK, PKI, PKCS11, and no RPK support)",
900 have_dtls ?
"" :
" no",
901 have_tls ?
"" :
" no");
904 if (tls_version->
version >= 0x030606)
905 snprintf(buffer, bufsize,
906 "(%sDTLS and%s TLS support; PSK, PKI, PKCS11, and RPK support)",
907 have_dtls ?
"" :
" no",
908 have_tls ?
"" :
" no");
910 snprintf(buffer, bufsize,
911 "(%sDTLS and%s TLS support; PSK, PKI, PKCS11, and no RPK support)",
912 have_dtls ?
"" :
" no",
913 have_tls ?
"" :
" no");
916 snprintf(buffer, bufsize,
917 "(%sDTLS and%s TLS support; PSK, PKI, no PKCS11, and no RPK support)",
918 have_dtls ?
"" :
" no",
919 have_tls ?
"" :
" no");
941#if COAP_CONSTRAINED_STACK
942 static coap_mutex_t static_log_mutex = COAP_MUTEX_INITIALIZER;
943 static char message[COAP_DEBUG_BUF_SIZE];
945 char message[COAP_DEBUG_BUF_SIZE];
948 va_start(ap, format);
949#if COAP_CONSTRAINED_STACK
950 coap_mutex_lock(&static_log_mutex);
953 vsnprintf( message,
sizeof(message), format, ap);
956#if COAP_CONSTRAINED_STACK
957 coap_mutex_unlock(&static_log_mutex);
971 fprintf(log_fd,
"%.*s ", (
int)len, timebuf);
974 fprintf(log_fd,
"%s ",
loglevels[level]);
976 va_start(ap, format);
977 vfprintf(log_fd, format, ap);
992 const char *p = loss_level;
994 int n = (int)strtol(p, &end, 10), i = 0;
995 if (end == p ||
n < 0)
1009 n = (int)strtol(p, &end, 10);
1010 if (end == p ||
n <= 0)
1019 n = (int)strtol(p, &end, 10);
1020 if (end == p ||
n <= 0)
static int packet_loss_level
static struct packet_num_interval packet_loss_intervals[10]
static int send_packet_count
int coap_debug_set_packet_loss(const char *loss_level)
Set the packet loss level for testing.
static coap_log_handler_t log_handler
COAP_STATIC_INLINE int is_binary(int content_format)
Returns 1 if the given content_format is either unknown or known to carry binary data.
static const char * msg_code_string(uint16_t c)
Returns a textual description of the method or response code.
#define COAP_DO_SHOW_OUTPUT_LINE
static size_t print_readable(const uint8_t *data, size_t len, unsigned char *result, size_t buflen, int encode_always)
static const char * msg_option_string(uint8_t code, uint16_t option_type)
Returns a textual description of the option name.
static size_t strnlen(const char *s, size_t maxlen)
A length-safe strlen() fake.
static const char * loglevels[]
COAP_STATIC_INLINE size_t print_timestamp(char *s, size_t len, coap_tick_t t)
static const char * msg_type_string(uint16_t t)
Returns a textual description of the message type t.
static int use_fprintf_for_show_pdu
static int num_packet_loss_intervals
int coap_debug_send_packet(void)
Check to see whether a packet should be sent or not.
static unsigned int print_content_format(unsigned int format_type, unsigned char *result, unsigned int buflen)
Pulls together all the internal only header files.
uint8_t coap_opt_t
Use byte-oriented access methods here because sliding a complex struct coap_opt_t over the data buffe...
#define COAP_OPT_BLOCK_SZX(opt)
Returns the value of the SZX-field of a Block option opt.
#define COAP_OPT_BLOCK_MORE(opt)
Returns the value of the More-bit of a Block option opt.
unsigned int coap_opt_block_num(const coap_opt_t *block_opt)
Returns the value of field num in the given block option block_opt.
void coap_ticks(coap_tick_t *t)
Sets t to the internal time with COAP_TICKS_PER_SECOND resolution.
uint64_t coap_tick_t
This data type represents internal timer ticks with COAP_TICKS_PER_SECOND resolution.
coap_time_t coap_ticks_to_rt(coap_tick_t t)
Helper function that converts coap ticks to wallclock time.
uint64_t coap_ticks_to_rt_us(coap_tick_t t)
Helper function that converts coap ticks to POSIX wallclock time in us.
int coap_prng(void *buf, size_t len)
Fills buf with len random bytes using the default pseudo random number generator.
coap_tls_version_t * coap_get_tls_library_version(void)
Determine the type and version of the underlying (D)TLS library.
int coap_tls_is_supported(void)
Check whether TLS is available.
int coap_dtls_is_supported(void)
Check whether DTLS is available.
@ COAP_TLS_LIBRARY_GNUTLS
Using GnuTLS library.
@ COAP_TLS_LIBRARY_TINYDTLS
Using TinyDTLS library.
@ COAP_TLS_LIBRARY_NOTLS
No DTLS library.
@ COAP_TLS_LIBRARY_OPENSSL
Using OpenSSL library.
@ COAP_TLS_LIBRARY_MBEDTLS
Using Mbed TLS library.
unsigned int coap_decode_var_bytes(const uint8_t *buf, size_t len)
Decodes multiple-length byte sequences.
void coap_set_log_handler(coap_log_handler_t handler)
Add a custom log callback handler.
coap_log_t coap_get_log_level(void)
Get the current logging level.
char * coap_string_tls_version(char *buffer, size_t bufsize)
Build a string containing the current (D)TLS library linked with and built for version.
int coap_log_t
Logging type.
void coap_show_pdu(coap_log_t level, const coap_pdu_t *pdu)
Display the contents of the specified pdu.
char * coap_string_tls_support(char *buffer, size_t bufsize)
Build a string containing the current (D)TLS library support.
#define COAP_ERR_FD
Used for output for LOG_CRIT to LOG_EMERG.
const char * coap_package_version(void)
Get the library package version.
void coap_set_log_level(coap_log_t level)
Sets the log level to the specified value.
void coap_log_impl(coap_log_t level, const char *format,...)
Writes the given text to COAP_ERR_FD (for level <= LOG_CRIT) or COAP_DEBUG_FD (for level >= LOG_ERR).
size_t coap_print_addr(const coap_address_t *addr, unsigned char *buf, size_t len)
Print the address into the defined buffer.
#define COAP_DEBUG_FD
Used for output for LOG_DEBUG to LOG_ERR.
const char * coap_package_build(void)
Get the library package build.
void coap_show_tls_version(coap_log_t level)
Display the current (D)TLS library linked with and built for version.
void coap_set_show_pdu_output(int use_fprintf)
Defines the output mode for the coap_show_pdu() function.
const char * coap_package_name(void)
Get the library package name.
void(* coap_log_handler_t)(coap_log_t level, const char *message)
Logging callback handler definition.
#define coap_log(level,...)
Logging function.
coap_opt_t * coap_option_next(coap_opt_iterator_t *oi)
Updates the iterator oi to point to the next option.
uint32_t coap_opt_length(const coap_opt_t *opt)
Returns the length of the given option.
coap_opt_iterator_t * coap_option_iterator_init(const coap_pdu_t *pdu, coap_opt_iterator_t *oi, const coap_opt_filter_t *filter)
Initializes the given option iterator oi to point to the beginning of the pdu's option list.
#define COAP_OPT_ALL
Pre-defined filter that includes all options.
const uint8_t * coap_opt_value(const coap_opt_t *opt)
Returns a pointer to the value of the given option.
#define COAP_DEFAULT_VERSION
#define COAP_OPTION_HOP_LIMIT
#define COAP_OPTION_NORESPONSE
#define COAP_OPTION_URI_HOST
#define COAP_OPTION_IF_MATCH
#define COAP_MEDIATYPE_APPLICATION_COSE_MAC
#define COAP_MEDIATYPE_APPLICATION_SENSML_EXI
#define COAP_MEDIATYPE_APPLICATION_CWT
#define COAP_OPTION_BLOCK2
#define COAP_MEDIATYPE_APPLICATION_COSE_ENCRYPT
#define COAP_MEDIATYPE_APPLICATION_RDF_XML
#define COAP_OPTION_CONTENT_FORMAT
#define COAP_SIGNALING_OPTION_ALTERNATIVE_ADDRESS
#define COAP_OPTION_SIZE2
#define COAP_MEDIATYPE_APPLICATION_SENSML_XML
#define COAP_MEDIATYPE_APPLICATION_COSE_SIGN
#define COAP_OPTION_BLOCK1
#define COAP_OPTION_PROXY_SCHEME
#define COAP_MEDIATYPE_APPLICATION_COSE_KEY_SET
#define COAP_MEDIATYPE_APPLICATION_SENML_CBOR
#define COAP_OPTION_URI_QUERY
#define COAP_MEDIATYPE_APPLICATION_COSE_KEY
#define COAP_MEDIATYPE_APPLICATION_COSE_SIGN1
#define COAP_OPTION_IF_NONE_MATCH
#define COAP_MEDIATYPE_APPLICATION_OCTET_STREAM
#define COAP_OPTION_LOCATION_PATH
#define COAP_OPTION_URI_PATH
#define COAP_MEDIATYPE_APPLICATION_SENML_EXI
#define COAP_MEDIATYPE_APPLICATION_CBOR
#define COAP_OPTION_SIZE1
#define COAP_MEDIATYPE_APPLICATION_COSE_ENCRYPT0
#define COAP_SIGNALING_OPTION_BLOCK_WISE_TRANSFER
#define COAP_MEDIATYPE_TEXT_PLAIN
#define COAP_MEDIATYPE_APPLICATION_JSON
#define COAP_OPTION_LOCATION_QUERY
#define COAP_MEDIATYPE_APPLICATION_COSE_MAC0
#define COAP_MEDIATYPE_APPLICATION_SENML_JSON
#define COAP_MEDIATYPE_APPLICATION_EXI
#define COAP_SIGNALING_OPTION_CUSTODY
int coap_get_data(const coap_pdu_t *pdu, size_t *len, const uint8_t **data)
Retrieves the length and data pointer of specified PDU.
#define COAP_MEDIATYPE_APPLICATION_COAP_GROUP_JSON
#define COAP_OPTION_URI_PORT
#define COAP_MEDIATYPE_APPLICATION_SENML_XML
#define COAP_OPTION_ACCEPT
#define COAP_MEDIATYPE_APPLICATION_DOTS_CBOR
#define COAP_OPTION_MAXAGE
#define COAP_MEDIATYPE_APPLICATION_SENSML_JSON
#define COAP_OPTION_PROXY_URI
#define COAP_OPTION_OBSERVE
#define COAP_SIGNALING_OPTION_HOLD_OFF
#define COAP_MEDIATYPE_APPLICATION_LINK_FORMAT
#define COAP_SIGNALING_OPTION_BAD_CSM_OPTION
#define COAP_SIGNALING_OPTION_MAX_MESSAGE_SIZE
#define COAP_MEDIATYPE_APPLICATION_XML
#define COAP_MEDIATYPE_APPLICATION_SENSML_CBOR
@ COAP_SIGNALING_CODE_ABORT
@ COAP_SIGNALING_CODE_CSM
@ COAP_SIGNALING_CODE_PING
@ COAP_SIGNALING_CODE_PONG
@ COAP_SIGNALING_CODE_RELEASE
#define COAP_STATIC_INLINE
multi-purpose address abstraction
union coap_address_t::@0 addr
Iterator to run through PDU options.
coap_option_num_t number
decoded option number
uint8_t * token
first byte of token, if any, or options
coap_pdu_code_t code
request method (value 1–31) or response code (value 64-255)
uint8_t token_length
length of Token
coap_mid_t mid
message id, if any, in regular host byte order
coap_pdu_type_t type
message type
The structure used for returning the underlying (D)TLS library information.
uint64_t built_version
(D)TLS Built against Library Version
coap_tls_library_t type
Library type.
uint64_t version
(D)TLS runtime Library Version