Convert "macro checks" to use expert info in line with dissectors with comparable...
[metze/wireshark/wip.git] / extcap.h
1 /* extcap.h
2  * Definitions for extcap external capture
3  * Copyright 2013, Mike Ryan <mikeryan@lacklustre.net>
4  *
5  * Wireshark - Network traffic analyzer
6  * By Gerald Combs <gerald@wireshark.org>
7  * Copyright 1998 Gerald Combs
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version 2
12  * of the License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22  */
23
24 #ifndef __EXTCAP_H__
25 #define __EXTCAP_H__
26
27 #include <config.h>
28
29 #include <glib.h>
30
31 #ifdef _WIN32
32 #include <windows.h>
33 #include <wsutil/unicode-utils.h>
34 #endif
35
36 #include <ui/capture_ui_utils.h>
37
38 #ifdef HAVE_EXTCAP
39
40 /* Prefix for the pipe interfaces */
41 #define EXTCAP_PIPE_PREFIX "wireshark_extcap"
42
43 #define EXTCAP_ARGUMENT_CONFIG                  "--extcap-config"
44 #define EXTCAP_ARGUMENT_LIST_INTERFACES "--extcap-interfaces"
45 #define EXTCAP_ARGUMENT_INTERFACE               "--extcap-interface"
46 #define EXTCAP_ARGUMENT_LIST_DLTS               "--extcap-dlts"
47
48 #define EXTCAP_ARGUMENT_RUN_CAPTURE             "--capture"
49 #define EXTCAP_ARGUMENT_RUN_PIPE                "--fifo"
50
51 #ifdef __cplusplus
52 extern "C" {
53 #endif /* __cplusplus */
54
55 /* try to get if capabilities from extcap */
56 if_capabilities_t *
57 extcap_get_if_dlts(const gchar * ifname, char ** err_str);
58
59 /* get a list of all capture interfaces */
60 GList *
61 extcap_interface_list(char **err_str);
62
63 /* returns the configuration for the given interface name, or an
64  * empty list, if no configuration has been found */
65 GList *
66 extcap_get_if_configuration(const char * ifname);
67
68 gboolean
69 extcap_has_configuration(const char * ifname);
70
71 #ifdef WIN32
72 HANDLE
73 extcap_get_win32_handle();
74 #endif
75
76 gboolean
77 extcaps_init_initerfaces(capture_options * capture_opts);
78
79 gboolean
80 extcap_create_pipe(char ** fifo);
81
82 void
83 extcap_cleanup(capture_options * capture_opts _U_);
84
85 #ifdef __cplusplus
86 }
87 #endif /* __cplusplus */
88
89 #endif
90
91 #endif
92
93 /*
94  * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
95  *
96  * Local variables:
97  * c-basic-offset: 4
98  * tab-width: 8
99  * indent-tabs-mode: nil
100  * End:
101  *
102  * vi: set shiftwidth=4 tabstop=8 expandtab:
103  * :indentSize=4:tabSize=8:noTabs=true:
104  */