diff options
author | Guy Harris <gharris@sonic.net> | 2020-05-31 03:13:40 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2020-05-31 03:13:40 -0700 |
commit | f87b39e9b6fed60e28c7df050a5dfeb2f6f22abb (patch) | |
tree | 0e0372dcc451cc5a17d0f1e42ce524db871a3c49 | |
parent | 35bfb718dc84ff9beac6bb3e0c9c817a12dee3f8 (diff) |
Don't introduce pcap_handle() unless a need for it is demonstrated.
-rw-r--r-- | pcap.c | 6 | ||||
-rw-r--r-- | pcap/pcap.h | 10 |
2 files changed, 5 insertions, 11 deletions
@@ -3467,12 +3467,6 @@ pcap_file(pcap_t *p) } #ifdef _WIN32 -HANDLE -pcap_handle(pcap_t *p) -{ - return (p->handle); -} - int pcap_fileno(pcap_t *p) { diff --git a/pcap/pcap.h b/pcap/pcap.h index 9385e4e9..7649eab9 100644 --- a/pcap/pcap.h +++ b/pcap/pcap.h @@ -550,12 +550,12 @@ PCAP_API int pcap_bufsize(pcap_t *); PCAP_API FILE *pcap_file(pcap_t *); #ifdef _WIN32 /* - * This returns a HANDLE, cast to an int; UN*X code that uses the - * result of pcap_fileno() will probably not work on Windows. - * We keep it around for backwards compatibility, but also provide - * pcap_handle(), which returns a HANDLE. + * This probably shouldn't have been kept in WinPcap; most if not all + * UN*X code that used it won't work on Windows. We deprecate it; if + * anybody really needs access to whatever HANDLE may be associated + * with a pcap_t (there's no guarantee that there is one), we can add + * a Windows-only pcap_handle() API that returns the HANDLE. */ -PCAP_API HANDLE pcap_handle(pcap_t *); PCAP_API int pcap_fileno(pcap_t *) PCAP_DEPRECATED(pcap_fileno, "use 'pcap_handle'"); #else /* _WIN32 */ |