use GLib's pointer to int conversion macros to prevent compiler warnings
[obnox/wireshark/wip.git] / capture_sync.h
1 /* capture_sync.h
2  * Synchronisation between Ethereal capture parent and child instances
3  *
4  * $Id$
5  *
6  * Ethereal - Network traffic analyzer
7  * By Gerald Combs <gerald@ethereal.com>
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23  */
24
25
26 /** @file
27  *  
28  *  Sync mode capture (internal interface).
29  *
30  *  Will start a new Ethereal instance which will do the actual capture work.
31  *  This is only used, if the "Update list of packets in real time" option is 
32  *  used.
33  */
34
35 #ifndef __CAPTURE_SYNC_H__
36 #define __CAPTURE_SYNC_H__
37
38 /** 
39  * Start a new synced capture session.
40  *  Create a capture child which is doing the real capture work.
41  *
42  *  Most of the parameters are passed through the global capture_opts.
43  *
44  *  @param is_tempfile  TRUE if the current cfile is a tempfile
45  *  @return             TRUE if a capture could be started, FALSE if not
46  */
47 extern gboolean 
48 sync_pipe_do_capture(gboolean is_tempfile);
49
50 /** User wants to stop capturing, gracefully close the capture child */
51 extern void
52 sync_pipe_stop(void);
53
54 /** We want to stop the program, just kill the child as soon as possible */
55 extern void
56 sync_pipe_kill(void);
57
58
59 /** the child will immediately start capturing, notify the parent */
60 extern void
61 sync_pipe_capstart_to_parent(void);
62
63 /** the child captured some new packets, notify the parent */
64 extern void
65 sync_pipe_packet_count_to_parent(int packet_count);
66
67 /** the child stopped capturing, notify the parent */
68 extern void
69 sync_pipe_drops_to_parent(int drops);
70
71 /** the child encountered an error, notify the parent */
72 extern void 
73 sync_pipe_errmsg_to_parent(const char *errmsg);
74
75
76 #endif /* capture_sync.h */