12#ifndef __WSUTIL_TO_STR_H__
13#define __WSUTIL_TO_STR_H__
36WS_DEPRECATED_X(
"Use uint8_to_hex instead")
37static inline
char *guint8_to_hex(
char *out, uint8_t val) {
return uint8_to_hex(out, val); }
48WS_DLL_PUBLIC
char *
word_to_hex(
char *out, uint16_t word);
82WS_DLL_PUBLIC
char *
dword_to_hex(
char *out, uint32_t dword);
105WS_DLL_PUBLIC
char *
qword_to_hex(
char *out, uint64_t qword);
128WS_DLL_PUBLIC
char *
bytes_to_hexstr(
char *out,
const uint8_t *ad,
size_t len);
153 const uint8_t *buf,
size_t buf_size,
154 char punct,
size_t max_bytes_len);
156#define bytes_to_str_punct(scope, buf, buf_size, punct) \
157 bytes_to_str_punct_maxlen(scope, buf, buf_size, punct, 24)
168 const uint8_t *buf,
size_t buf_size,
169 size_t max_bytes_len);
171#define bytes_to_str(scope, buf, buf_size) \
172 bytes_to_str_maxlen(scope, buf, buf_size, 36)
288WS_DLL_PUBLIC
void uint32_to_str_buf(uint32_t u,
char *buf,
size_t buf_len);
290WS_DEPRECATED_X(
"Use uint32_to_str_buf instead")
291static inline
void guint32_to_str_buf(uint32_t u,
char *buf,
size_t buf_len) { uint32_to_str_buf(u, buf, buf_len); }
293WS_DLL_PUBLIC
void uint64_to_str_buf(uint64_t u,
char *buf,
size_t buf_len);
295WS_DEPRECATED_X(
"Use uint64_to_str_buf instead")
296static inline
void guint64_to_str_buf(uint64_t u,
char *buf,
size_t buf_len) { uint64_to_str_buf(u, buf, buf_len); }
298WS_DEPRECATED_X(
"Use ip_num_to_str_buf() or ip_addr_to_str() instead")
299WS_DLL_PUBLIC
void ip_to_str_buf(const uint8_t *ad,
char *buf, const
int buf_len);
301WS_DEPRECATED_X("Use ip_num_to_str() or ip_addr_to_str() instead")
305WS_DLL_PUBLIC
void ip_num_to_str_buf(uint32_t ad,
char *buf, const
int buf_len);
310WS_DLL_PUBLIC
void ip_addr_to_str_buf(const ws_in4_addr *ad,
char *buf, const
int buf_len);
312WS_DLL_PUBLIC
char *ip_addr_to_str(
wmem_allocator_t *scope, const ws_in4_addr *ad);
314WS_DLL_PUBLIC
void ip6_to_str_buf(const
ws_in6_addr *ad,
char *buf,
size_t buf_size);
318WS_DLL_PUBLIC
char *ipxnet_to_str_punct(
wmem_allocator_t *scope, const uint32_t ad, const
char punct);
320WS_DLL_PUBLIC
char *eui64_to_str(
wmem_allocator_t *scope, const uint64_t ad);
322WS_DLL_PUBLIC
int format_fractional_part_nsecs(
char *,
size_t, uint32_t, const
char *,
int);
324WS_DLL_PUBLIC
void display_epoch_time(
char *,
size_t, const
nstime_t *,
int);
326WS_DLL_PUBLIC
void display_signed_time(
char *,
size_t, const
nstime_t *,
int);
328WS_DLL_PUBLIC
void format_nstime_as_iso8601(
char *,
size_t, const
nstime_t *,
char *,
bool,
int);
Definition wmem_allocator.h:27
Definition inet_addr.h:21
WS_DLL_PUBLIC char * word_to_hex_punct(char *out, uint16_t word, char punct)
Definition to_str.c:112
WS_DLL_PUBLIC char * bytes_to_str_maxlen(wmem_allocator_t *scope, const uint8_t *buf, size_t buf_size, size_t max_bytes_len)
Definition to_str.c:260
WS_DLL_PUBLIC char * bytes_to_hexstr(char *out, const uint8_t *ad, size_t len)
Definition to_str.c:176
WS_DLL_PUBLIC char * hex64_to_str_back_len(char *ptr, uint64_t value, int len)
Definition to_str.c:345
WS_DLL_PUBLIC char * hex_to_str_back_len(char *ptr, uint32_t value, int len)
Definition to_str.c:324
WS_DLL_PUBLIC char * word_to_hex_npad(char *out, uint16_t word)
Definition to_str.c:121
WS_DLL_PUBLIC char * bytes_to_str_punct_maxlen(wmem_allocator_t *scope, const uint8_t *buf, size_t buf_size, char punct, size_t max_bytes_len)
Definition to_str.c:218
WS_DLL_PUBLIC char * qword_to_hex_punct(char *out, uint64_t qword, char punct)
Definition to_str.c:159
WS_DLL_PUBLIC char * bytes_to_hexstr_punct(char *out, const uint8_t *ad, size_t len, char punct)
Definition to_str.c:196
WS_DLL_PUBLIC char * oct64_to_str_back(char *ptr, uint64_t value)
Definition to_str.c:312
WS_DLL_PUBLIC char * qword_to_hex(char *out, uint64_t qword)
Definition to_str.c:151
WS_DLL_PUBLIC char * uint64_to_str_back_len(char *ptr, uint64_t value, int len)
Definition to_str.c:435
WS_DLL_PUBLIC char * dword_to_hex_punct(char *out, uint32_t dword, char punct)
Definition to_str.c:142
WS_DLL_PUBLIC char * dword_to_hex(char *out, uint32_t dword)
Definition to_str.c:134
WS_DLL_PUBLIC char * uint64_to_str_back(char *ptr, uint64_t value)
Definition to_str.c:390
WS_DLL_PUBLIC char * int_to_str_back(char *ptr, int32_t value)
Definition to_str.c:455
WS_DLL_PUBLIC char * word_to_hex(char *out, uint16_t word)
Definition to_str.c:104
WS_DLL_PUBLIC char * uint_to_str_back_len(char *ptr, uint32_t value, int len)
Definition to_str.c:415
WS_DLL_PUBLIC char * oct_to_str_back(char *ptr, uint32_t value)
Definition to_str.c:300
WS_DLL_PUBLIC char * uint_to_str_back(char *ptr, uint32_t value)
Definition to_str.c:366
WS_DLL_PUBLIC char * uint8_to_hex(char *out, uint8_t val)
Definition to_str.c:98
WS_DLL_PUBLIC char * int64_to_str_back(char *ptr, int64_t value)
Definition to_str.c:467