101 unsigned char separator,
102 unsigned char *delim,
size_t dlen,
151 unsigned char *buf,
size_t *buflen);
169 unsigned char *buf,
size_t *buflen);
Representation of parsed URI.
int coap_split_uri(unsigned char *str_var, size_t len, coap_uri_t *uri)
Parses a given string into URI components.
str query
The query part if present.
unsigned char coap_key_t[4]
coap_uri_t * coap_clone_uri(const coap_uri_t *uri)
Clones the specified coap_uri_t object.
str host
host part of the URI
coap_uri_t * coap_new_uri(const unsigned char *uri, unsigned int length)
Creates a new coap_uri_t object from the specified URI.
size_t segment_length
length of current segment
size_t dlen
length of separator
str path
Beginning of the first path segment.
unsigned short port
The port in host byte order.
Iterator to for tokenizing a URI path or query.
unsigned char * coap_parse_next(coap_parse_iterator_t *pi)
Updates the iterator pi to point to the next token.
size_t n
number of remaining characters in buffer
unsigned char separator
segment separators
int coap_split_path(const unsigned char *s, size_t length, unsigned char *buf, size_t *buflen)
Splits the given URI path into segments.
coap_parse_iterator_t * coap_parse_iterator_init(unsigned char *s, size_t n, unsigned char separator, unsigned char *delim, size_t dlen, coap_parse_iterator_t *pi)
Initializes the given iterator pi.
int coap_hash_path(const unsigned char *path, size_t len, coap_key_t key)
Calculates a hash over the given path and stores the result in key.
unsigned char * delim
delimiters where to split the string
int coap_split_query(const unsigned char *s, size_t length, unsigned char *buf, size_t *buflen)
Splits the given URI query into segments.
definition of hash key type and helper functions
unsigned char * pos
current position in buffer