lsquic_util.h revision 10c492f0
1/* Copyright (c) 2017 - 2018 LiteSpeed Technologies Inc. See LICENSE. */ 2/* 3 * lsquic_util.h -- Utility functions 4 */ 5 6#ifndef LSQUIC_UTIL_H 7#define LSQUIC_UTIL_H 1 8 9#ifdef __cplusplus 10extern "C" { 11#endif 12 13lsquic_time_t 14lsquic_time_now (void); 15 16void 17lsquic_init_timers (void); 18 19/* Returns 1 if `buf' contains only zero bytes, 0 otherwise. 20 */ 21int 22lsquic_is_zero (const void *buf, size_t bufsz); 23 24 25 26char * get_bin_str(const void *s, size_t len, size_t max_display_len); 27 28 29/* `out_sz' is assumed to be at least 1. `out' is always NUL-terminated. */ 30size_t 31hexdump (const void *src, size_t src_sz, char *out, size_t out_sz); 32 33#ifdef __cplusplus 34} 35#endif 36 37 38#endif 39