]> The Tcpdump Group git mirrors - libpcap/commitdiff
Update a comment.
authorGuy Harris <[email protected]>
Sat, 6 Jun 2020 06:59:24 +0000 (23:59 -0700)
committerGuy Harris <[email protected]>
Sat, 6 Jun 2020 06:59:24 +0000 (23:59 -0700)
I backed pcap_handle() out; we'll provide it if there's a demand for it,
but I'm not sure how useful getting the HANDLE for an NPF device is
(what can you do with it?).

[skip ci]

pcap.c

diff --git a/pcap.c b/pcap.c
index 5fa0e87be97501de62ca3b73a87745c5056caa9d..0625e669c60653002c957ec9578a1fab00b99ed6 100644 (file)
--- a/pcap.c
+++ b/pcap.c
@@ -3474,8 +3474,11 @@ pcap_fileno(pcap_t *p)
                /*
                 * This is a bogus and now-deprecated API; we
                 * squelch the narrowing warning for the cast
-                * from HANDLE to DWORD - Windows programmers
-                * should use pcap_handle().
+                * from HANDLE to DWORD.  If Windows programmmers
+                * need to get at the HANDLE for a pcap_t, *if*
+                * there is one, they should request such a
+                * routine (and be prepared for it to return
+                * INVALID_HANDLE_VALUE).
                 */
 DIAG_OFF_NARROWING
                return ((int)(DWORD)p->handle);