Disable GTK+ by default.
[metze/wireshark/wip.git] / extcap_spawn.h
1 /* extcap_spawn.h
2  * Helper routines for executing extcap utilities
3  *
4  * Copyright 2016, Roland Knall <rknall@gmail.com>
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
8  * Copyright 1998 Gerald Combs
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  */
24
25 #ifndef __EXTCAP_SPAWN_H__
26 #define __EXTCAP_SPAWN_H__
27
28 #include <config.h>
29
30 #include <glib.h>
31
32 #include <extcap.h>
33
34 typedef struct _extcap_userdata {
35     GPid pid;
36     gchar * extcap_stderr;
37     gint exitcode;
38     gint extcap_stderr_rd;
39     gint extcap_stdout_rd;
40 #ifdef _WIN32
41     HANDLE threadId;
42 #endif
43 } extcap_userdata;
44
45 gboolean extcap_spawn_sync ( gchar * dirname, gchar * command, gint argc, gchar ** argv, gchar ** command_output );
46
47 GPid extcap_spawn_async ( extcap_userdata * userdata, GPtrArray * args );
48
49 #ifdef _WIN32
50 gboolean extcap_wait_for_pipe(HANDLE pipe_h, HANDLE pid);
51 void win32_readfrompipe(HANDLE read_pipe, gint32 max_buffer, gchar * buffer);
52 #endif
53
54 #endif
55
56 /*
57  * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
58  *
59  * Local variables:
60  * c-basic-offset: 4
61  * tab-width: 8
62  * indent-tabs-mode: nil
63  * End:
64  *
65  * vi: set shiftwidth=4 tabstop=8 expandtab:
66  * :indentSize=4:tabSize=8:noTabs=true:
67  */