Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

capture_sync.h
Go to the documentation of this file.
1 /* capture_sync.h
2 * Synchronisation between Wireshark capture parent and child instances
3 *
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11
20 #ifndef __CAPTURE_SYNC_H__
21 #define __CAPTURE_SYNC_H__
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif /* __cplusplus */
26
27 struct _info_data;
28
43 extern gboolean
44 sync_pipe_start(capture_options *capture_opts, capture_session *cap_session, struct _info_data* cap_data, void(*update_cb)(void));
45
47 extern void
48 sync_pipe_stop(capture_session *cap_session);
49
51 extern void
52 sync_pipe_kill(ws_process_id fork_child);
53
72 extern int
73 sync_interface_set_80211_chan(const gchar *iface, const char *freq, const gchar *type,
74 const gchar *center_freq1, const gchar *center_freq2,
75 gchar **data, gchar **primary_msg,
76 gchar **secondary_msg, void (*update_cb)(void));
77
79 extern int
80 sync_interface_list_open(gchar **data, gchar **primary_msg,
81 gchar **secondary_msg, void (*update_cb)(void));
82
84 extern int
85 sync_if_capabilities_open(const gchar *ifname, gboolean monitor_mode, const gchar* auth,
86 gchar **data, gchar **primary_msg,
87 gchar **secondary_msg, void (*update_cb)(void));
88
90 extern int
91 sync_interface_stats_open(int *read_fd, ws_process_id *fork_child, gchar **msg, void (*update_cb)(void));
92
94 extern int
95 sync_interface_stats_close(int *read_fd, ws_process_id *fork_child, gchar **msg);
96
98 extern int
99 sync_pipe_gets_nonblock(int pipe_fd, char *bytes, int max);
100
101 /*
102 * Routines supplied by our caller; we call them back to notify them
103 * of various events.
104 *
105 * XXX - this is *really* ugly. We should do this better.
106 */
107
111 extern gboolean
112 capture_input_new_file(capture_session *cap_session, gchar *new_file);
113
117 extern void
118 capture_input_new_packets(capture_session *cap_session, int to_read);
119
123 extern void
124 capture_input_drops(capture_session *cap_session, guint32 dropped);
125
129 extern void
130 capture_input_error_message(capture_session *cap_session, char *error_message,
131 char *secondary_error_msg);
132
137 extern void
138 capture_input_cfilter_error_message(capture_session *cap_session, guint i,
139 char *error_message);
140
145 extern void
146 capture_input_closed(capture_session *cap_session, gchar *msg);
147
148 /* set a callback to be called after fork with the pid of the forked child */
149 extern void capture_sync_set_fetch_dumpcap_pid_cb(void(*cb)(ws_process_id pid));
150
151 #ifdef __cplusplus
152 }
153 #endif /* __cplusplus */
154
155 #endif /* __CAPTURE_SYNC_H__ */
sync_pipe_gets_nonblock
int sync_pipe_gets_nonblock(int pipe_fd, char *bytes, int max)
capture_input_new_file
gboolean capture_input_new_file(capture_session *cap_session, gchar *new_file)
capture_input_new_packets
void capture_input_new_packets(capture_session *cap_session, int to_read)
sync_pipe_start
gboolean sync_pipe_start(capture_options *capture_opts, capture_session *cap_session, struct _info_data *cap_data, void(*update_cb)(void))
capture_input_drops
void capture_input_drops(capture_session *cap_session, guint32 dropped)
sync_interface_set_80211_chan
int sync_interface_set_80211_chan(const gchar *iface, const char *freq, const gchar *type, const gchar *center_freq1, const gchar *center_freq2, gchar **data, gchar **primary_msg, gchar **secondary_msg, void(*update_cb)(void))
_info_data
Definition: capture_info.h:46
sync_pipe_kill
void sync_pipe_kill(ws_process_id fork_child)
capture_input_closed
void capture_input_closed(capture_session *cap_session, gchar *msg)
sync_interface_stats_close
int sync_interface_stats_close(int *read_fd, ws_process_id *fork_child, gchar **msg)
capture_input_error_message
void capture_input_error_message(capture_session *cap_session, char *error_message, char *secondary_error_msg)
sync_pipe_stop
void sync_pipe_stop(capture_session *cap_session)
sync_interface_list_open
int sync_interface_list_open(gchar **data, gchar **primary_msg, gchar **secondary_msg, void(*update_cb)(void))
capture_input_cfilter_error_message
void capture_input_cfilter_error_message(capture_session *cap_session, guint i, char *error_message)
sync_if_capabilities_open
int sync_if_capabilities_open(const gchar *ifname, gboolean monitor_mode, const gchar *auth, gchar **data, gchar **primary_msg, gchar **secondary_msg, void(*update_cb)(void))
sync_interface_stats_open
int sync_interface_stats_open(int *read_fd, ws_process_id *fork_child, gchar **msg, void(*update_cb)(void))
capture_options_tag
Definition: capture_opts.h:249
_capture_session
Definition: capture_session.h:63