diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-06-12 07:47:14 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-06-12 07:47:14 +0000 |
commit | f9be24cd13351b0b848f51e6ebce85d9ce458644 (patch) | |
tree | 2e08e40da242a4924c4e61c97ec55b29047bd171 /capture-wpcap.c | |
parent | f8a82d28825cbe7415b2a4e96e484bc83d28de94 (diff) |
On Windows, if "get_interface_list()" returns CANT_GET_INTERFACE_LIST
and the error message includes "Not enough storage is available
to process this command" or "The operation completed successfully",
suggest that the user install a WinPcap version later than 3.0 - this is
definitely a Frequently Asked Question on the Ethereal list.
svn path=/trunk/; revision=11143
Diffstat (limited to 'capture-wpcap.c')
-rw-r--r-- | capture-wpcap.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/capture-wpcap.c b/capture-wpcap.c index 53225ae889..50e86fb92f 100644 --- a/capture-wpcap.c +++ b/capture-wpcap.c @@ -3,7 +3,7 @@ * time, so that we only need one Ethereal binary and one Tethereal binary * for Windows, regardless of whether WinPcap is installed or not. * - * $Id: capture-wpcap.c,v 1.9 2004/03/13 22:49:29 ulfl Exp $ + * $Id: capture-wpcap.c,v 1.10 2004/06/12 07:47:12 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -412,6 +412,28 @@ get_interface_list(int *err, char *err_str) } /* + * Get an error message string for a CANT_GET_INTERFACE_LIST error from + * "get_interface_list()". + */ +gchar * +cant_get_if_list_error_message(const char *err_str) +{ + /* + * If the error message includes "Not enough storage is available + * to process this command" or "The operation completed successfully", + * suggest that they install a WinPcap version later than 3.0. + */ + if (strstr(err_str, "Not enough storage is available to process this command") != NULL || + strstr(err_str, "The operation completed successfully") != NULL) { + return g_strdup_printf("Can't get list of interfaces: %s\n" +"This might be a problem with WinPcap 3.0; you should try updating to\n" +"a later version of WinPcap - see the WinPcap site at winpcap.polito.it", + err_str); + } + return g_strdup_printf("Can't get list of interfaces: %s", err_str); +} + +/* * Append the version of WinPcap with which we were compiled to a GString. */ void |