38 #define COAP_SET_STR(st,l,v) { (st)->length = (l), (st)->s = (v); } 84 #define COAP_MAX_STR_CONST_FUNC 2 109 #define coap_string_equal(string1,string2) \ 110 ((string1)->length == (string2)->length && ((string1)->length == 0 || \ 111 memcmp((string1)->s, (string2)->s, (string1)->length) == 0)) size_t length
length of string
Coap string data definition.
Coap string data definition with const data.
coap_string_t * coap_new_string(size_t size)
Returns a new string object with at least size+1 bytes storage allocated.
struct coap_binary_t coap_binary_t
Coap binary data definition.
coap_str_const_t * coap_make_str_const(const char *string)
Take the specified string and create a coap_str_const_t *.
struct coap_str_const_t coap_str_const_t
Coap string data definition with const data.
Coap binary data definition.
void coap_delete_string(coap_string_t *string)
Deletes the given string and releases any memory allocated.
void coap_delete_str_const(coap_str_const_t *string)
Deletes the given const string and releases any memory allocated.
struct coap_string_t coap_string_t
Coap string data definition.
size_t length
length of string
const uint8_t * s
string data
coap_str_const_t * coap_new_str_const(const uint8_t *data, size_t size)
Returns a new const string object with at least size+1 bytes storage allocated, and the provided data...
size_t length
length of binary data