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
51extern bool
52sync_pipe_start(capture_options *capture_opts, GPtrArray *capture_comments,
53 capture_session *cap_session, struct _info_data* cap_data,
54 void(*update_cb)(void));
55
63extern void
65
73extern void
74sync_pipe_kill(ws_process_id fork_child);
75
100extern int
101sync_interface_set_80211_chan(const char* app_name, const char *iface, const char *freq, const char *type,
102 const char *center_freq1, const char *center_freq2,
103 char **data, char **primary_msg,
104 char **secondary_msg, void (*update_cb)(void));
105
126extern int
127sync_if_bpf_filter_open(const char* app_name, const char *ifname, const char* filter, int linktype,
128 bool optimize, char **data, char **primary_msg,
129 char **secondary_msg, void (*update_cb)(void));
130
142extern int
143sync_interface_list_open(const char* app_name, char **data, char **primary_msg,
144 char **secondary_msg, void (*update_cb)(void));
145
160extern int
161sync_if_capabilities_open(const char* app_name, const char *ifname, bool monitor_mode, const char* auth,
162 char **data, char **primary_msg,
163 char **secondary_msg, void (*update_cb)(void));
164
176extern int
177sync_if_list_capabilities_open(const char* app_name, GList *ifqueries,
178 char **data, char **primary_msg,
179 char **secondary_msg, void (*update_cb)(void));
180
193extern int
194sync_interface_stats_open(const char* app_name, int *read_fd, ws_process_id *fork_child, char **data, char **msg, void (*update_cb)(void));
195
205extern int
206sync_interface_stats_close(int *read_fd, ws_process_id *fork_child, char **msg);
207
220extern int
221sync_pipe_gets_nonblock(int pipe_fd, char *bytes, int max);
222
228extern void capture_sync_set_fetch_dumpcap_pid_cb(void(*cb)(ws_process_id pid));
229
230#ifdef __cplusplus
231}
232#endif /* __cplusplus */
233
234#endif /* __CAPTURE_SYNC_H__ */
void sync_pipe_kill(ws_process_id fork_child)
Forcefully terminate the capture child process as quickly as possible.
void sync_pipe_stop(capture_session *cap_session)
Request that the capture child stop capturing and shut down cleanly.
int sync_interface_list_open(const char *app_name, char **data, char **primary_msg, char **secondary_msg, void(*update_cb)(void))
Get an interface list using dumpcap.
bool sync_pipe_start(capture_options *capture_opts, GPtrArray *capture_comments, capture_session *cap_session, struct _info_data *cap_data, void(*update_cb)(void))
Start a new capture session.
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))
Set wireless channel using dumpcap.
int sync_pipe_gets_nonblock(int pipe_fd, char *bytes, int max)
Read a line from a pipe in non‑blocking mode.
void capture_sync_set_fetch_dumpcap_pid_cb(void(*cb)(ws_process_id pid))
Set a callback function to to be called with the PID of the forked child.
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))
Open an interface statistics stream using dumpcap.
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))
Get interface capabilities using dumpcap.
int sync_if_list_capabilities_open(const char *app_name, GList *ifqueries, char **data, char **primary_msg, char **secondary_msg, void(*update_cb)(void))
Start getting interface statistics using dumpcap.
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))
Compile a capture filter and get its BPF bytecode (in human-readable form.)
int sync_interface_stats_close(int *read_fd, ws_process_id *fork_child, char **msg)
Close an interface statistics stream previously opened with dumpcap.
Definition capture_session.h:136
Definition capture_info.h:40
Definition capture_opts.h:236
const char * app_name
Definition capture_opts.h:249