]> The Tcpdump Group git mirrors - libpcap/commit
Add pcap_handle(), and deprecate pcap_fileno(), on Windows.
authorGuy Harris <[email protected]>
Sun, 31 May 2020 03:08:14 +0000 (20:08 -0700)
committerGuy Harris <[email protected]>
Sun, 31 May 2020 03:08:14 +0000 (20:08 -0700)
commitc8645aa7f3d31863d51dad32ca5c8c63dddb9e5b
tree0b9f03325e91741debe9fde9ff1e76dfc8433f85
parent19e1676ca47ddb11385b771f477e181e3a442e3b
Add pcap_handle(), and deprecate pcap_fileno(), on Windows.

I don't know whether a Windows HANDLE can be expected to survive
conversion to an int - and there's no need for it to have to be
converted.  If a caller needs to do something with a HANDLE associated
with a pcap_t, it should call the new pcap_handle() routine and get a
HANDLE; code for UN*X that uses the result of pcap_fileno() is unlikely
to work on Windows anyway.

Squelch the "pointer truncation from 'HANDLE' to 'DWORD'" warning, as,
if that truncation causes an issue, callers should use pcap_handle(),
and if it *doesn't* cause an issue, it's, well, not an issue.
diag-control.h
pcap.c
pcap/pcap.h