Lines Matching defs:buf
283 unsigned char *buf = _buf;
340 coap_encode_var_safe(buf, 4,
342 buf));
349 res = coap_split_path(uri->path.s, uri->path.length, buf, &buflen);
356 coap_opt_length(buf),
357 coap_opt_value(buf)));
359 buf += coap_opt_size(buf);
365 buf = _buf;
369 res = coap_split_query(uri->query.s, uri->query.length, buf, &buflen);
376 coap_opt_length(buf),
377 coap_opt_value(buf)));
379 buf += coap_opt_size(buf);
408 * of size @p length to @p buf. The caller of this function must
410 * '%' is always followed by two hex digits. and that @p buf provides
416 * @param buf The result buffer.
419 decode_segment(const uint8_t *seg, size_t length, unsigned char *buf) {
424 *buf = (hexchar_to_dec(seg[1]) << 4) + hexchar_to_dec(seg[2]);
429 *buf = *seg;
432 ++buf;
466 * Writes a coap option from given string @p s to @p buf. @p s should
476 * @param buf The buffer to store the new coap option.
477 * @param buflen The maximum size of @p buf.
487 unsigned char *buf, size_t buflen, size_t *optionsize) {
502 written = coap_opt_setheader(buf, buflen, 0, segmentlen);
509 buf += written; /* advance past option type/length */
517 decode_segment(s, length, buf);
580 coap_string_t buf;
591 res = make_decoded_option(s, len, state->buf.s, state->buf.length, &optionsize);
593 state->buf.s += optionsize;
594 state->buf.length -= optionsize;
601 unsigned char *buf, size_t *buflen) {
602 struct cnt_str tmp = { { *buflen, buf }, 0 };
606 *buflen = *buflen - tmp.buf.length;
613 unsigned char *buf, size_t *buflen) {
614 struct cnt_str tmp = { { *buflen, buf }, 0 };
631 *buflen = *buflen - tmp.buf.length;