Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
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 <[email protected]>
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#include <wsutil/processes.h>
24
25#ifdef __cplusplus
26extern "C" {
27#endif /* __cplusplus */
28
29struct _info_data;
30
33
50extern bool
51sync_pipe_start(capture_options *capture_opts, GPtrArray *capture_comments,
52 capture_session *cap_session, struct _info_data* cap_data,
53 void(*update_cb)(void));
54
56extern void
58
60extern void
61sync_pipe_kill(ws_process_id fork_child);
62
86extern int
87sync_interface_set_80211_chan(const char* app_name, const char *iface, const char *freq, const char *type,
88 const char *center_freq1, const char *center_freq2,
89 char **data, char **primary_msg,
90 char **secondary_msg, void (*update_cb)(void));
91
110extern int
111sync_if_bpf_filter_open(const char* app_name, const char *ifname, const char* filter, int linktype,
112 bool optimize, char **data, char **primary_msg,
113 char **secondary_msg, void (*update_cb)(void));
114
116extern int
117sync_interface_list_open(const char* app_name, char **data, char **primary_msg,
118 char **secondary_msg, void (*update_cb)(void));
119
121extern int
122sync_if_capabilities_open(const char* app_name, const char *ifname, bool monitor_mode, const char* auth,
123 char **data, char **primary_msg,
124 char **secondary_msg, void (*update_cb)(void));
125
126extern int
127sync_if_list_capabilities_open(const char* app_name, GList *ifqueries,
128 char **data, char **primary_msg,
129 char **secondary_msg, void (*update_cb)(void));
130
132extern int
133sync_interface_stats_open(const char* app_name, int *read_fd, ws_process_id *fork_child, char **data, char **msg, void (*update_cb)(void));
134
136extern int
137sync_interface_stats_close(int *read_fd, ws_process_id *fork_child, char **msg);
138
140extern int
141sync_pipe_gets_nonblock(int pipe_fd, char *bytes, int max);
142
143/* set a callback to be called after fork with the pid of the forked child */
144extern void capture_sync_set_fetch_dumpcap_pid_cb(void(*cb)(ws_process_id pid));
145
146#ifdef __cplusplus
147}
148#endif /* __cplusplus */
149
150#endif /* __CAPTURE_SYNC_H__ */
void sync_pipe_kill(ws_process_id fork_child)
void sync_pipe_stop(capture_session *cap_session)
int sync_interface_list_open(const char *app_name, char **data, char **primary_msg, char **secondary_msg, void(*update_cb)(void))
bool sync_pipe_start(capture_options *capture_opts, GPtrArray *capture_comments, capture_session *cap_session, struct _info_data *cap_data, void(*update_cb)(void))
int sync_interface_set_80211_chan(const char *app_name, const char *iface, const char *freq, const char *type, const char *center_freq1, const char *center_freq2, char **data, char **primary_msg, char **secondary_msg, void(*update_cb)(void))
int sync_pipe_gets_nonblock(int pipe_fd, char *bytes, int max)
int sync_interface_stats_open(const char *app_name, int *read_fd, ws_process_id *fork_child, char **data, char **msg, void(*update_cb)(void))
int sync_if_capabilities_open(const char *app_name, const char *ifname, bool monitor_mode, const char *auth, char **data, char **primary_msg, char **secondary_msg, void(*update_cb)(void))
int sync_if_bpf_filter_open(const char *app_name, const char *ifname, const char *filter, int linktype, bool optimize, char **data, char **primary_msg, char **secondary_msg, void(*update_cb)(void))
int sync_interface_stats_close(int *read_fd, ws_process_id *fork_child, char **msg)
Definition capture_session.h:136
Definition capture_info.h:40
Definition capture_opts.h:236
const char * app_name
Definition capture_opts.h:249