HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / capture_session.h
blob758e98eb98be776f343044ad15d8788a8198fdec
1 /* capture_session.h
2 * State of a capture session
4 * $Id$
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
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.
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.
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.
25 #ifndef __CAPTURE_SESSION_H__
26 #define __CAPTURE_SESSION_H__
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
32 #ifdef HAVE_LIBPCAP
33 /* Current state of capture engine. XXX - differentiate states */
34 typedef enum {
35 CAPTURE_STOPPED, /**< stopped */
36 CAPTURE_PREPARING, /**< preparing, but still no response from capture child */
37 CAPTURE_RUNNING /**< capture child signalled ok, capture is running now */
38 } capture_state;
41 * State of a capture session.
43 typedef struct {
44 int fork_child; /**< If not -1, in parent, process ID of child */
45 int fork_child_status; /**< Child exit status */
46 #ifdef _WIN32
47 int signal_pipe_write_fd; /**< the pipe to signal the child */
48 #endif
49 capture_state state; /**< current state of the capture engine */
50 #ifndef _WIN32
51 uid_t owner; /**< owner of the cfile */
52 gid_t group; /**< group of the cfile */
53 #endif
54 gboolean session_started;
55 capture_options *capture_opts; /**< options for this capture */
56 void *cf; /**< handle to cfile (note: untyped handle) */
57 } capture_session;
59 extern void
60 capture_session_init(capture_session *cap_session, void *cf);
61 #else
63 typedef struct {} capture_session;
65 #endif /* HAVE_LIBPCAP */
67 #ifdef __cplusplus
69 #endif /* __cplusplus */
71 #endif /* __CAPTURE_SESSION_H__ */