12 #ifndef __WSUTIL_TO_STR_H__
13 #define __WSUTIL_TO_STR_H__
15 #include <wireshark.h>
45 WS_DLL_PUBLIC
char *
word_to_hex(
char *out, uint16_t word);
79 WS_DLL_PUBLIC
char *
dword_to_hex(
char *out, uint32_t dword);
102 WS_DLL_PUBLIC
char *
qword_to_hex(
char *out, uint64_t qword);
125 WS_DLL_PUBLIC
char *
bytes_to_hexstr(
char *out,
const uint8_t *ad,
size_t len);
150 const uint8_t *buf,
size_t buf_size,
151 char punct,
size_t max_bytes_len);
153 #define bytes_to_str_punct(scope, buf, buf_size, punct) \
154 bytes_to_str_punct_maxlen(scope, buf, buf_size, punct, 24)
165 const uint8_t *buf,
size_t buf_size,
166 size_t max_bytes_len);
168 #define bytes_to_str(scope, buf, buf_size) \
169 bytes_to_str_maxlen(scope, buf, buf_size, 36)
285 WS_DLL_PUBLIC
void guint32_to_str_buf(uint32_t u,
char *buf,
size_t buf_len);
287 WS_DLL_PUBLIC
void guint64_to_str_buf(uint64_t u,
char *buf,
size_t buf_len);
289 WS_DEPRECATED_X(
"Use ip_num_to_str_buf() or ip_addr_to_str() instead")
290 WS_DLL_PUBLIC
void ip_to_str_buf(const uint8_t *ad,
char *buf, const
int buf_len);
292 WS_DEPRECATED_X("Use ip_num_to_str() or ip_addr_to_str() instead")
296 WS_DLL_PUBLIC
void ip_num_to_str_buf(uint32_t ad,
char *buf, const
int buf_len);
301 WS_DLL_PUBLIC
void ip_addr_to_str_buf(const ws_in4_addr *ad,
char *buf, const
int buf_len);
303 WS_DLL_PUBLIC
char *ip_addr_to_str(
wmem_allocator_t *scope, const ws_in4_addr *ad);
305 WS_DLL_PUBLIC
void ip6_to_str_buf(const
ws_in6_addr *ad,
char *buf,
size_t buf_size);
309 WS_DLL_PUBLIC
char *ipxnet_to_str_punct(
wmem_allocator_t *scope, const uint32_t ad, const
char punct);
311 WS_DLL_PUBLIC
char *eui64_to_str(
wmem_allocator_t *scope, const uint64_t ad);
313 WS_DLL_PUBLIC
int format_fractional_part_nsecs(
char *,
size_t, uint32_t, const
char *,
int);
315 WS_DLL_PUBLIC
void display_epoch_time(
char *,
size_t, const
nstime_t *,
int);
317 WS_DLL_PUBLIC
void display_signed_time(
char *,
size_t, const
nstime_t *,
int);
319 WS_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 * int64_to_str_back(char *ptr, int64_t value)
Definition: to_str.c:467
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 * uint64_to_str_back_len(char *ptr, uint64_t value, int len)
Definition: to_str.c:435
WS_DLL_PUBLIC char * qword_to_hex(char *out, uint64_t qword)
Definition: to_str.c:151
WS_DLL_PUBLIC char * oct_to_str_back(char *ptr, uint32_t value)
Definition: to_str.c:300
WS_DLL_PUBLIC char * word_to_hex_npad(char *out, uint16_t word)
Definition: to_str.c:121
WS_DLL_PUBLIC char * dword_to_hex(char *out, uint32_t dword)
Definition: to_str.c:134
WS_DLL_PUBLIC char * guint8_to_hex(char *out, uint8_t val)
Definition: to_str.c:98
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 * hex_to_str_back_len(char *ptr, uint32_t value, int len)
Definition: to_str.c:324
WS_DLL_PUBLIC char * int_to_str_back(char *ptr, int32_t value)
Definition: to_str.c:455
WS_DLL_PUBLIC char * dword_to_hex_punct(char *out, uint32_t dword, char punct)
Definition: to_str.c:142
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 * word_to_hex(char *out, uint16_t word)
Definition: to_str.c:104
WS_DLL_PUBLIC char * word_to_hex_punct(char *out, uint16_t word, char punct)
Definition: to_str.c:112
WS_DLL_PUBLIC char * uint_to_str_back(char *ptr, uint32_t value)
Definition: to_str.c:366
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 * 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 * uint64_to_str_back(char *ptr, uint64_t value)
Definition: to_str.c:390
WS_DLL_PUBLIC char * oct64_to_str_back(char *ptr, uint64_t value)
Definition: to_str.c:312
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 * qword_to_hex_punct(char *out, uint64_t qword, char punct)
Definition: to_str.c:159