diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-12-29 21:18:08 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-12-29 21:18:08 +0000 |
commit | 757de7e1cf107472f387833c595b51378a878600 (patch) | |
tree | 2aeac99c1ae42048ef967cb09f91baa26e9d7875 /capture-wpcap.c | |
parent | dddb66178b6a320a338eb9db7b555e816e93bbbf (diff) |
If pcap_open_live() or pcap_open() fails due to not having WinPcap,
supply an appropriate error string.
svn path=/trunk/; revision=40330
Diffstat (limited to 'capture-wpcap.c')
-rw-r--r-- | capture-wpcap.c | 4 |
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); |