diff options
author | Guy Harris <guy@alum.mit.edu> | 2019-01-08 20:40:50 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-01-08 20:40:50 -0800 |
commit | 0dd92d7d9944b158511e27795ff6952c17fd3497 (patch) | |
tree | d809d390da3c8b8f0f899027685004d8ba6d97ed /fmtutils.h | |
parent | 9a397d9b5fffc17aadab655d5e868094a015749f (diff) | |
download | libpcap-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.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 |