aboutsummaryrefslogtreecommitdiffstats
path: root/caputils/capture-pcap-util-int.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-06-09 23:39:12 -0700
committerAnders Broman <a.broman58@gmail.com>2018-06-10 14:26:37 +0000
commit5ecbcaf483a552a8b78d525b9f32c5cfa575d59c (patch)
tree18d7afa2184d7c2954685d6743e8119676f890f3 /caputils/capture-pcap-util-int.h
parente0b8837d9a62c7fd5964a7f35ee0dee01002e0ee (diff)
Improve the secondary error messages for pcap errors.
On Windows, if WinPcap isn't installed, warn about that for errors other than failed attempts to start capturing. On HP-UX, if we appear to have an old version of libpcap, warn about that for errors other than failed attempts to start capturing. If we know the error is a permissions problem, don't make suggestions appropriate to other problems. If we know the error is *not* a permissions problem, don't make suggestions appropriate to permissions problems. For permissions problems, or possible permissions problems, on Linux, suggest doing dpkg-reconfigure wireshark-common if you've installed from a package on Debian or a Debian derivative such as Ubuntu. Change-Id: If4aac0343095ac0b984eebc21853920c3b6d3c63 Ping-Bug: 14847 Reviewed-on: https://code.wireshark.org/review/28189 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'caputils/capture-pcap-util-int.h')
-rw-r--r--caputils/capture-pcap-util-int.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/caputils/capture-pcap-util-int.h b/caputils/capture-pcap-util-int.h
index 29105ea4c5..1ed8a7ffa5 100644
--- a/caputils/capture-pcap-util-int.h
+++ b/caputils/capture-pcap-util-int.h
@@ -34,21 +34,22 @@ extern void request_high_resolution_timestamp(pcap_t *pcap_h);
#endif
extern if_capabilities_t *get_if_capabilities_local(interface_options *interface_opts,
- char **err_str);
+ cap_device_open_err *err, char **err_str);
extern pcap_t *open_capture_device_local(capture_options *capture_opts,
- interface_options *interface_opts, int timeout,
+ interface_options *interface_opts, int timeout, cap_device_open_err *err,
char (*open_err_str)[PCAP_ERRBUF_SIZE]);
#ifdef HAVE_PCAP_CREATE
extern if_capabilities_t *get_if_capabilities_pcap_create(interface_options *interface_opts,
- char **err_str);
+ cap_device_open_err *err, char **err_str);
extern pcap_t *open_capture_device_pcap_create(capture_options *capture_opts,
- interface_options *interface_opts, int timeout,
+ interface_options *interface_opts, int timeout, cap_device_open_err *err,
char (*open_err_str)[PCAP_ERRBUF_SIZE]);
#endif /* HAVE_PCAP_CREATE */
extern if_capabilities_t *get_if_capabilities_pcap_open_live(interface_options *interface_opts,
- char **err_str);
+ cap_device_open_err *err, char **err_str);
extern pcap_t *open_capture_device_pcap_open_live(interface_options *interface_opts,
- int timeout, char (*open_err_str)[PCAP_ERRBUF_SIZE]);
+ int timeout, cap_device_open_err *err,
+ char (*open_err_str)[PCAP_ERRBUF_SIZE]);
/*
* Get an error message string for a CANT_GET_INTERFACE_LIST error from