Lines Matching refs:len
77 print_timestamp(char *s, size_t len, coap_tick_t t) { in print_timestamp() argument
81 return strftime(s, len, "%b %d %H:%M:%S", tmp); in print_timestamp()
87 print_timestamp(char *s, size_t len, coap_tick_t t) { in print_timestamp() argument
89 return snprintf(s, len, "%u.%03u", in print_timestamp()
121 print_readable( const unsigned char *data, unsigned int len, in print_readable() argument
125 assert(data || len == 0); in print_readable()
131 while (len) { in print_readable()
150 ++data; --len; in print_readable()
162 coap_print_addr(const struct coap_address_t *addr, unsigned char *buf, size_t len) { in coap_print_addr() argument
174 if (len < 7) /* do not proceed if buffer is even too short for [::]:0 */ in coap_print_addr()
184 memcpy(buf, "(unknown address type)", min(22, len)); in coap_print_addr()
185 return min(22, len); in coap_print_addr()
188 if (inet_ntop(addr->addr.sa.sa_family, addrptr, (char *)p, len) == 0) { in coap_print_addr()
193 p += strnlen((char *)p, 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()
212 if (len < 41) in coap_print_addr()
230 if (len < 21) 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()