diff options
author | João Valverde <j@v6e.pt> | 2021-12-27 13:28:29 +0000 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-12-27 19:02:50 +0000 |
commit | 14a1dfbe108399cc7c06c242d90ddc7665f5880e (patch) | |
tree | 7bbfdc858ce3c4096033d01665e5f7cf99b35de5 /wsutil/str_util.h | |
parent | 6343967eefc3f5b721f1f15e4b86ba3e170a0d74 (diff) |
wsutil/inet_addr: Refactor to use C99/POSIX types
Rewrite ws_inet_pton{4,6} and ws_inet_ntop{4,6} without
GLib types.
Check for strerrorname_np() and use that is available,
to simplify error handling.
Add some minimal tests.
Diffstat (limited to 'wsutil/str_util.h')
-rw-r--r-- | wsutil/str_util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/wsutil/str_util.h b/wsutil/str_util.h index 110e413977..3029753c26 100644 --- a/wsutil/str_util.h +++ b/wsutil/str_util.h @@ -195,6 +195,9 @@ char *format_size_wmem(wmem_allocator_t *allocator, int64_t size, WS_DLL_PUBLIC gchar printable_char_or_period(gchar c); +WS_DLL_PUBLIC WS_RETNONNULL +const char *ws_strerrorname_r(int errnum, char *buf, size_t buf_size); + /* To pass one of two strings, singular or plural */ #define plurality(d,s,p) ((d) == 1 ? (s) : (p)) |