Lines Matching refs:len
75 print_timestamp(char *s, size_t len, time_t t) { in print_timestamp() argument
78 return strftime(s, len, "%b %d %H:%M:%S", tmp); in print_timestamp()
84 print_timestamp(char *s, size_t len, clock_time_t t) { in print_timestamp() argument
86 return snprintf(s, len, "%u.%03u", in print_timestamp()
118 dsrv_print_addr(const session_t *addr, char *buf, size_t len) { in dsrv_print_addr() argument
126 if (len < INET_ADDRSTRLEN) in dsrv_print_addr()
133 if (len < INET6_ADDRSTRLEN + 2) in dsrv_print_addr()
143 memcpy(buf, "(unknown address type)", min(22, len)); in dsrv_print_addr()
144 return min(22, len); in dsrv_print_addr()
147 if (inet_ntop(addr->addr.sa.sa_family, addrptr, p, len) == 0) { in dsrv_print_addr()
152 p += dtls_strnlen(p, len); in dsrv_print_addr()
155 if (p < buf + len) { in dsrv_print_addr()
161 p += snprintf(p, buf + len - p + 1, ":%d", port); in dsrv_print_addr()
171 if (len < 41) in dsrv_print_addr()
189 if (len < 21) in dsrv_print_addr()
192 if (buf + len - p < 6) in dsrv_print_addr()
272 void dump(unsigned char *buf, size_t len) { in dump() argument
273 while (len--) in dump()
280 int len; in dtls_dsrv_log_addr() local
282 len = dsrv_print_addr(addr, addrbuf, sizeof(addrbuf)); in dtls_dsrv_log_addr()
283 if (!len) in dtls_dsrv_log_addr()