Lines Matching refs:s

37 strnchr(unsigned char *s, size_t len, unsigned char c) {  in strnchr()  argument
38 while (len && *s++ != c) in strnchr()
41 return len ? s : NULL; in strnchr()
225 check_segment(const unsigned char *s, size_t length) { in check_segment() argument
230 if (*s == '%') { in check_segment()
231 if (length < 2 || !(isxdigit(s[1]) && isxdigit(s[2]))) in check_segment()
234 s += 2; in check_segment()
238 ++s; ++n; --length; in check_segment()
264 make_decoded_option(const unsigned char *s, size_t length, in make_decoded_option() argument
274 res = check_segment(s, length); in make_decoded_option()
294 decode_segment(s, length, buf); in make_decoded_option()
310 dots(unsigned char *s, size_t len) { in dots() argument
311 return *s == '.' && (len == 1 || (*(s+1) == '.' && len == 2)); in dots()
326 coap_split_path_impl(const unsigned char *s, size_t length, in coap_split_path_impl() argument
331 p = q = s; in coap_split_path_impl()
351 return q - s; in coap_split_path_impl()
360 write_option(unsigned char *s, size_t len, void *data) { in write_option() argument
365 res = make_decoded_option(s, len, state->buf.s, state->buf.length); in write_option()
367 state->buf.s += res; in write_option()
374 coap_split_path(const unsigned char *s, size_t length, in coap_split_path() argument
378 coap_split_path_impl(s, length, write_option, &tmp); in coap_split_path()
386 coap_split_query(const unsigned char *s, size_t length, in coap_split_query() argument
391 p = s; in coap_split_query()
392 while (length > 0 && *s != '#') { in coap_split_query()
393 if (*s == '&') { /* start new query element */ in coap_split_query()
394 write_option((unsigned char *)p, s - p, &tmp); in coap_split_query()
395 p = s + 1; in coap_split_query()
398 s++; in coap_split_query()
403 write_option((unsigned char *)p, s - p, &tmp); in coap_split_query()
448 result->host.s = URI_DATA(result); in coap_clone_uri()
451 memcpy(result->host.s, uri->host.s, uri->host.length); in coap_clone_uri()
455 result->path.s = URI_DATA(result) + uri->host.length; in coap_clone_uri()
458 memcpy(result->path.s, uri->path.s, uri->path.length); in coap_clone_uri()
462 result->query.s = URI_DATA(result) + uri->host.length + uri->path.length; in coap_clone_uri()
465 memcpy(result->query.s, uri->query.s, uri->query.length); in coap_clone_uri()
476 hash_segment(unsigned char *s, size_t len, void *data) { in hash_segment() argument
477 coap_hash(s, len, data); in hash_segment()