Lines Matching refs:buf
162 coap_print_addr(const struct coap_address_t *addr, unsigned char *buf, size_t len) { in coap_print_addr() argument
166 unsigned char *p = buf; in coap_print_addr()
184 memcpy(buf, "(unknown address type)", min(22, len)); in coap_print_addr()
196 if (p < buf + len) { in coap_print_addr()
202 p += snprintf((char *)p, buf + len - p + 1, ":%d", port); in coap_print_addr()
204 return buf + len - p; in coap_print_addr()
207 unsigned char *p = buf; in coap_print_addr()
233 if (buf + len - p < 6) in coap_print_addr()
237 p += snprintf((char *)p, buf + len - p + 1, ":%d", uip_htons(addr->port)); in coap_print_addr()
242 return p - buf; in coap_print_addr()
274 static char buf[5]; in msg_code_string() local
279 snprintf(buf, sizeof(buf), "%u.%02u", c >> 5, c & 0x1f); in msg_code_string()
280 return buf; in msg_code_string()
314 static char buf[6]; in msg_option_string() local
325 snprintf(buf, sizeof(buf), "%u", option_type); in msg_option_string()
326 return buf; in msg_option_string()
376 unsigned char buf[COAP_MAX_PDU_SIZE]; /* need some space for output creation */ in coap_show_pdu() local
410 buf_len = print_content_format(content_format, buf, sizeof(buf)); in coap_show_pdu()
417 buf_len = snprintf((char *)buf, sizeof(buf), "%u/%c/%u", in coap_show_pdu()
429 buf_len = snprintf((char *)buf, sizeof(buf), "%u", in coap_show_pdu()
449 buf, sizeof(buf), encode); in coap_show_pdu()
453 (int)buf_len, buf); in coap_show_pdu()
469 if (print_readable(data, data_len, buf, sizeof(buf), 0)) { in coap_show_pdu()
470 fprintf(COAP_DEBUG_FD, "'%s'", buf); in coap_show_pdu()