summaryrefslogtreecommitdiff
path: root/fmtutils.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-01-08 20:40:50 -0800
committerGuy Harris <guy@alum.mit.edu>2019-01-08 20:40:50 -0800
commit0dd92d7d9944b158511e27795ff6952c17fd3497 (patch)
treed809d390da3c8b8f0f899027685004d8ba6d97ed /fmtutils.h
parent9a397d9b5fffc17aadab655d5e868094a015749f (diff)
downloadlibpcap-0dd92d7d9944b158511e27795ff6952c17fd3497.tar.gz
Put pcap_win32_err_to_str() into fmtutils.c, and use it for all Win32 errors.
We don't need N different places all doing their own calls to FormatMessage(); centralize it in pcap_win32_err_to_str(), now in fmtutils.c for use in rpcapd as well as libpcap. Merge in some fixes from the code in sock_fmterror().
Diffstat (limited to 'fmtutils.h')
-rw-r--r--fmtutils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fmtutils.h b/fmtutils.h
index 62c78fdb..d4a171d8 100644
--- a/fmtutils.h
+++ b/fmtutils.h
@@ -43,6 +43,10 @@ extern "C" {
void pcap_fmt_errmsg_for_errno(char *, size_t, int,
PCAP_FORMAT_STRING(const char *), ...) PCAP_PRINTFLIKE(4, 5);
+#ifdef _WIN32
+void pcap_win32_err_to_str(DWORD, char *);
+#endif
+
#ifdef __cplusplus
}
#endif