diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-09-08 14:44:06 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-09-08 14:44:06 -0700 |
commit | 7318c9438ce3ac629b2da529d4153fc6aeeb17d4 (patch) | |
tree | 9ade503b16de99cc0f92f7049cbd22f7b38cc52a /pcap/pcap.h | |
parent | 7a681564ef70a06544b6337dc877265af7a43996 (diff) | |
download | libpcap-7318c9438ce3ac629b2da529d4153fc6aeeb17d4.tar.gz |
Add a PCAP_DEPRECATED attribute, and apply it to pcap_lookupdev().
It's not thread-safe, and it behaves weirdly on Windows.
Diffstat (limited to 'pcap/pcap.h')
-rw-r--r-- | pcap/pcap.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pcap/pcap.h b/pcap/pcap.h index 2a6e007d..fd2ed171 100644 --- a/pcap/pcap.h +++ b/pcap/pcap.h @@ -310,7 +310,14 @@ typedef void (*pcap_handler)(u_char *, const struct pcap_pkthdr *, */ #define PCAP_NETMASK_UNKNOWN 0xffffffff +/* + * We're deprecating pcap_lookupdev() for various reasons (not + * thread-safe, can behave weirdly with WinPcap). Callers + * should use pcap_findalldevs() and use the first device. + */ +PCAP_DEPRECATED("use 'pcap_findalldevs' and use the first device") PCAP_API char *pcap_lookupdev(char *); + PCAP_API int pcap_lookupnet(const char *, bpf_u_int32 *, bpf_u_int32 *, char *); PCAP_API pcap_t *pcap_create(const char *, char *); |