aboutsummaryrefslogtreecommitdiffstats
path: root/capture-wpcap.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2011-12-29 21:18:08 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2011-12-29 21:18:08 +0000
commitf509ba2d0cd413812331836a7fc8f93232467395 (patch)
tree2aeac99c1ae42048ef967cb09f91baa26e9d7875 /capture-wpcap.c
parente5db130bb24c999818cc163355ed1368ff17c32b (diff)
If pcap_open_live() or pcap_open() fails due to not having WinPcap,
supply an appropriate error string. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@40330 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'capture-wpcap.c')
-rw-r--r--capture-wpcap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/capture-wpcap.c b/capture-wpcap.c
index 5492f972ca..6fd252f987 100644
--- a/capture-wpcap.c
+++ b/capture-wpcap.c
@@ -324,6 +324,8 @@ pcap_t*
pcap_open_live(const char *a, int b, int c, int d, char *e)
{
if (!has_wpcap) {
+ g_snprintf(e, "unable to load WinPcap (wpcap.dll); can't open %s to capture",
+ a);
return NULL;
}
return p_pcap_open_live(a, b, c, d, e);
@@ -356,6 +358,8 @@ pcap_t*
pcap_open(const char *a, int b, int c, int d, struct pcap_rmtauth *e, char *f)
{
if (!has_wpcap) {
+ g_snprintf(f, "unable to load WinPcap (wpcap.dll); can't open %s to capture",
+ a);
return NULL;
}
return p_pcap_open(a, b, c, d, e, f);