diff options
-rw-r--r-- | Makefile.common | 2 | ||||
-rw-r--r-- | capture-wpcap.c | 29 | ||||
-rw-r--r-- | capture-wpcap.h | 8 | ||||
-rw-r--r-- | capture_errs.c | 67 | ||||
-rw-r--r-- | capture_errs.h | 35 | ||||
-rw-r--r-- | gtk/capture_dlg.c | 1 | ||||
-rw-r--r-- | gtk/capture_if_dlg.c | 1 | ||||
-rw-r--r-- | rawshark.c | 1 | ||||
-rw-r--r-- | tshark.c | 1 |
9 files changed, 33 insertions, 112 deletions
diff --git a/Makefile.common b/Makefile.common index f04eaf4359..a62fc37d73 100644 --- a/Makefile.common +++ b/Makefile.common @@ -91,13 +91,11 @@ WIRESHARK_COMMON_INCLUDES = \ # sources common for wireshark and tshark, but not rawshark; # these are for programs that capture traffic by running dumpcap SHARK_COMMON_CAPTURE_SRC = \ - capture_errs.c \ capture_ifinfo.c \ capture_ui_utils.c # corresponding headers SHARK_COMMON_CAPTURE_INCLUDES = \ - capture_errs.h \ capture_ifinfo.h \ capture_ui_utils.h diff --git a/capture-wpcap.c b/capture-wpcap.c index f831f225f1..02622a3506 100644 --- a/capture-wpcap.c +++ b/capture-wpcap.c @@ -36,7 +36,6 @@ #include "capture-pcap-util.h" #include "capture-pcap-util-int.h" #include "capture-wpcap.h" -#include "capture_errs.h" #include <wsutil/file_util.h> @@ -232,6 +231,34 @@ load_wpcap(void) has_wpcap = TRUE; } +/* + * The official list of WinPcap mirrors is at + * http://www.winpcap.org/misc/mirrors.htm + */ +char * +cant_load_winpcap_err(const char *app_name) +{ + return g_strdup_printf( +"Unable to load WinPcap (wpcap.dll); %s will not be able to capture\n" +"packets.\n" +"\n" +"In order to capture packets, WinPcap must be installed; see\n" +"\n" +" http://www.winpcap.org/\n" +"\n" +"or the mirror at\n" +"\n" +" http://www.mirrors.wiretapped.net/security/packet-capture/winpcap/\n" +"\n" +"or the mirror at\n" +"\n" +" http://winpcap.cs.pu.edu.tw/\n" +"\n" +"for a downloadable version of WinPcap and for instructions on how to install\n" +"WinPcap.", + app_name); +} + char* pcap_lookupdev (char *a) { diff --git a/capture-wpcap.h b/capture-wpcap.h index cfe23828d7..3c8079599c 100644 --- a/capture-wpcap.h +++ b/capture-wpcap.h @@ -6,7 +6,6 @@ * By Gerald Combs <gerald@wireshark.org> * Copyright 2001 Gerald Combs * - * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 @@ -32,8 +31,11 @@ extern "C" { extern gboolean has_wpcap; -void -load_wpcap(void); +extern void load_wpcap(void); + +/* error message, if WinPcap couldn't be loaded */ +/* will use g_strdup, don't forget to g_free the returned string! */ +extern char *cant_load_winpcap_err(const char *app_name); #ifdef __cplusplus } diff --git a/capture_errs.c b/capture_errs.c deleted file mode 100644 index d79b6b86ed..0000000000 --- a/capture_errs.c +++ /dev/null @@ -1,67 +0,0 @@ -/* capture_errs.c - * Routines to return error and warning messages for packet capture - * - * $Id$ - * - * Wireshark - Network traffic analyzer - * By Gerald Combs <gerald@wireshark.org> - * Copyright 1998 Gerald Combs - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#ifdef HAVE_LIBPCAP - -#include <glib.h> - -#include "capture_errs.h" - -#ifdef _WIN32 - -/* - * The official list of WinPcap mirrors is at - * http://www.winpcap.org/misc/mirrors.htm - */ -char * -cant_load_winpcap_err(const char *app_name) -{ - return g_strdup_printf( -"Unable to load WinPcap (wpcap.dll); %s will not be able to capture\n" -"packets.\n" -"\n" -"In order to capture packets, WinPcap must be installed; see\n" -"\n" -" http://www.winpcap.org/\n" -"\n" -"or the mirror at\n" -"\n" -" http://www.mirrors.wiretapped.net/security/packet-capture/winpcap/\n" -"\n" -"or the mirror at\n" -"\n" -" http://winpcap.cs.pu.edu.tw/\n" -"\n" -"for a downloadable version of WinPcap and for instructions on how to install\n" -"WinPcap.", - app_name); -} - -#endif /* _WIN32 */ - -#endif /* HAVE_LIBPCAP */ diff --git a/capture_errs.h b/capture_errs.h deleted file mode 100644 index a9f2f51dde..0000000000 --- a/capture_errs.h +++ /dev/null @@ -1,35 +0,0 @@ -/* capture_errs.h - * Declarations of routines to return error and warning messages for - * packet capture - * - * $Id$ - * - * Wireshark - Network traffic analyzer - * By Gerald Combs <gerald@wireshark.org> - * Copyright 1998 Gerald Combs - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef __CAPTURE_ERRS_H__ -#define __CAPTURE_ERRS_H__ - -#ifdef _WIN32 -/* error message, if WinPcap couldn't be loaded */ -/* will use g_strdup, don't forget to g_free the returned string! */ -extern char *cant_load_winpcap_err(const char *app_name); -#endif /* _WIN32 */ - -#endif /* __CAPTURE_ERRS_H__ */ diff --git a/gtk/capture_dlg.c b/gtk/capture_dlg.c index 27b1db24e5..e750117ac9 100644 --- a/gtk/capture_dlg.c +++ b/gtk/capture_dlg.c @@ -44,7 +44,6 @@ #include <epan/filesystem.h> #include "../capture.h" -#include "../capture_errs.h" #include "../capture_ifinfo.h" #include "../simple_dialog.h" #include "../capture-pcap-util.h" diff --git a/gtk/capture_if_dlg.c b/gtk/capture_if_dlg.c index 48169ac5d8..8bac7e586a 100644 --- a/gtk/capture_if_dlg.c +++ b/gtk/capture_if_dlg.c @@ -39,7 +39,6 @@ #include <epan/prefs.h> -#include "../capture_errs.h" #include "../capture_ifinfo.h" #include "../simple_dialog.h" #include "../capture.h" diff --git a/rawshark.c b/rawshark.c index e900257d13..bb8069c761 100644 --- a/rawshark.c +++ b/rawshark.c @@ -106,7 +106,6 @@ #include "pcapio.h" #ifdef _WIN32 #include "capture-wpcap.h" -#include "capture_errs.h" #endif /* _WIN32 */ #endif /* HAVE_LIBPCAP */ #include "log.h" @@ -89,7 +89,6 @@ #include "capture-pcap-util.h" #ifdef _WIN32 #include "capture-wpcap.h" -#include "capture_errs.h" #include <wsutil/unicode-utils.h> #endif /* _WIN32 */ #include "capture_sync.h" |