Wireshark 4.7.3
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
19
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
32typedef struct capture_options_tag capture_options;
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
99extern int
100sync_interface_set_80211_chan(const char *iface, const char *freq, const char *type,
101 const char *center_freq1, const char *center_freq2,
102 char **data, char **primary_msg,
103 char **secondary_msg, void (*update_cb)(void));
104
124extern int
125sync_if_bpf_filter_open(const char *ifname, const char* filter, int linktype,
126 bool optimize, char **data, char **primary_msg,
127 char **secondary_msg, void (*update_cb)(void));
128
139extern int
140sync_interface_list_open(char **data, char **primary_msg,
141 char **secondary_msg, void (*update_cb)(void));
142
156extern int
157sync_if_capabilities_open(const char *ifname, bool monitor_mode, const char* auth,
158 char **data, char **primary_msg,
159 char **secondary_msg, void (*update_cb)(void));
160
171extern int
173 char **data, char **primary_msg,
174 char **secondary_msg, void (*update_cb)(void));
175
187extern int
188sync_interface_stats_open(int *read_fd, ws_process_id *fork_child, char **data, char **msg, void (*update_cb)(void));
189
199extern int
200sync_interface_stats_close(int *read_fd, ws_process_id *fork_child, char **msg);
201
214extern int
215sync_pipe_gets_nonblock(int pipe_fd, char *bytes, int max);
216
222extern void capture_sync_set_fetch_dumpcap_pid_cb(void(*cb)(ws_process_id pid));
223
224#ifdef __cplusplus
225}
226#endif /* __cplusplus */
227
228#endif /* __CAPTURE_SYNC_H__ */
struct _capture_session capture_session
Opaque handle representing an active or pending capture session.
int sync_if_bpf_filter_open(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.).
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_set_80211_chan(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_if_capabilities_open(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_interface_list_open(char **data, char **primary_msg, char **secondary_msg, void(*update_cb)(void))
Get an interface list using dumpcap.
int sync_if_list_capabilities_open(GList *ifqueries, char **data, char **primary_msg, char **secondary_msg, void(*update_cb)(void))
Start getting interface statistics 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_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(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_interface_stats_close(int *read_fd, ws_process_id *fork_child, char **msg)
Close an interface statistics stream previously opened with dumpcap.
Opaque handle representing an active or pending capture session.
Definition capture_session.h:156
Aggregates packet count statistics and UI state for a live capture info display.
Definition capture_info.h:43
Definition capture_opts.h:243