diff options
author | Roland Knall <roland.knall@br-automation.com> | 2014-02-25 14:05:11 +0100 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-08-21 03:34:02 +0000 |
commit | bed29af46db06f4bce00d8a4dab26317d4563dd3 (patch) | |
tree | 3502e7ee703097a9c7c3e067ac9e6c7b5ad9ed8a /extcap.h | |
parent | 401469880b8b98a4d42011bdf9af7fbb67c6f057 (diff) |
Extcap Capture Interface
Extcap is a plugin interface, which allows for the usage
of external capture interfaces via pipes using a predefined
configuration language which results in a graphical gui.
This implementation seeks for a generic implementation,
which results in a seamless integration with the current
system, and does add all external interfaces as simple
interfaces.
Windows Note: Due to limitations with GTK and Windows,
a gspawn-winXX-helper.exe, respective gspawn-winXX-helper-console.exe
is needed, which is part of any GTK windows installation.
The default installation directory from the build is an extcap
subdirectory underneath the run directory. The folder used by
extcap may be viewed in the folders tab of the about dialog.
The default installation directory for extcap plugins with
a pre-build or installer version of wireshark is the extcap
subdirectory underneath the main wireshark directory.
For more information see:
http://youtu.be/Nn84T506SwU
bug #9009
Also take a look in doc/extcap_example.py for a Python-example
and in extcap.pod for the arguments grammer.
Todo:
- Integrate with Qt - currently no GUI is generated, but
the interfaces are still usable
Change-Id: I4f1239b2f1ebd8b2969f73af137915f5be1ce50f
Signed-off-by: Mike Ryan <mikeryan+wireshark@lacklustre.net>
Signed-off-by: Mike Kershaw <dragorn@kismetwireless.net>
Signed-off-by: Roland Knall <rknall@gmail.com>
Reviewed-on: https://code.wireshark.org/review/359
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'extcap.h')
-rw-r--r-- | extcap.h | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/extcap.h b/extcap.h new file mode 100644 index 0000000000..64ea855045 --- /dev/null +++ b/extcap.h @@ -0,0 +1,90 @@ +/* extcap.h + * Definitions for extcap external capture + * Copyright 2013, Mike Ryan <mikeryan@lacklustre.net> + * + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef __EXTCAP_H__ +#define __EXTCAP_H__ + +#include "config.h" + +#include <glib.h> + +#ifdef _WIN32 +#include <windows.h> +#include <wsutil/unicode-utils.h> +#endif + +#include <ui/capture_ui_utils.h> + +#ifdef HAVE_EXTCAP + +#define EXTCAP_ARGUMENT_CONFIG "--extcap-config" +#define EXTCAP_ARGUMENT_LIST_INTERFACES "--extcap-interfaces" +#define EXTCAP_ARGUMENT_INTERFACE "--extcap-interface" +#define EXTCAP_ARGUMENT_LIST_DLTS "--extcap-dlts" + +#define EXTCAP_ARGUMENT_RUN_CAPTURE "--capture" +#define EXTCAP_ARGUMENT_RUN_PIPE "--fifo" + +/* try to get if capabilities from extcap */ +if_capabilities_t * +extcap_get_if_dlts(const gchar * ifname, char ** err_str); + +/* get a list of all capture interfaces */ +GList * +extcap_interface_list(char **err_str); + +/* returns the configuration for the given interface name, or an + * empty list, if no configuration has been found */ +GList * +extcap_get_if_configuration(const char * ifname); + +#ifdef WIN32 +HANDLE +extcap_get_win32_handle(); +#endif + +gboolean +extcaps_init_initerfaces(capture_options * capture_opts); + +gboolean +extcap_create_pipe(char ** fifo); + +void +extcap_cleanup(capture_options * capture_opts _U_); + +#endif + +#endif + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 4 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=4 tabstop=4 noexpandtab: + * :indentSize=4:tabSize=4:noTabs=false: + */ |