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_DLL_PUBLIC
void ip_to_str_buf(
const uint8_t *ad,
char *buf,
const int buf_len);
294 WS_DLL_PUBLIC
void ip6_to_str_buf(
const ws_in6_addr *ad,
char *buf,
size_t buf_size);
298 WS_DLL_PUBLIC
char *ipxnet_to_str_punct(
wmem_allocator_t *scope,
const uint32_t ad,
const char punct);
300 WS_DLL_PUBLIC
char *eui64_to_str(
wmem_allocator_t *scope,
const uint64_t ad);
302 WS_DLL_PUBLIC
int format_fractional_part_nsecs(
char *,
size_t, uint32_t,
const char *,
int);
304 WS_DLL_PUBLIC
void display_epoch_time(
char *,
size_t,
const nstime_t *,
int);
306 WS_DLL_PUBLIC
void display_signed_time(
char *,
size_t,
const nstime_t *,
int);
308 WS_DLL_PUBLIC
void format_nstime_as_iso8601(
char *,
size_t,
const nstime_t *,
char *,
bool,
int);
Definition: wmem_allocator.h:27
Definition: inet_ipv6.h:21
WS_DLL_PUBLIC char * int64_to_str_back(char *ptr, int64_t value)
Definition: to_str.c:461
WS_DLL_PUBLIC char * uint_to_str_back_len(char *ptr, uint32_t value, int len)
Definition: to_str.c:409
WS_DLL_PUBLIC char * uint64_to_str_back_len(char *ptr, uint64_t value, int len)
Definition: to_str.c:429
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:294
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:318
WS_DLL_PUBLIC char * int_to_str_back(char *ptr, int32_t value)
Definition: to_str.c:449
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:360
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:257
WS_DLL_PUBLIC char * uint64_to_str_back(char *ptr, uint64_t value)
Definition: to_str.c:384
WS_DLL_PUBLIC char * oct64_to_str_back(char *ptr, uint64_t value)
Definition: to_str.c:306
WS_DLL_PUBLIC char * hex64_to_str_back_len(char *ptr, uint64_t value, int len)
Definition: to_str.c:339
WS_DLL_PUBLIC char * qword_to_hex_punct(char *out, uint64_t qword, char punct)
Definition: to_str.c:159