| 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 <gerald@wireshark.org>
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
26 extern "C" {
27#endif /* __cplusplus */
28
29 struct _info_data;
30
31 typedef struct _capture_session capture_session;
32 typedef struct capture_options_tag capture_options;
33
51 extern bool
52 sync_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
63 extern void
64 sync_pipe_stop(capture_session *cap_session);
65
73 extern void
74 sync_pipe_kill(ws_process_id fork_child);
75
99 extern int
100 sync_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
124 extern int
125 sync_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
139 extern int
140 sync_interface_list_open(char **data, char **primary_msg,
141 char **secondary_msg, void (*update_cb)(void));
142
156 extern int
157 sync_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
171 extern int
172 sync_if_list_capabilities_open(GList *ifqueries,
173 char **data, char **primary_msg,
174 char **secondary_msg, void (*update_cb)(void));
175
187 extern int
188 sync_interface_stats_open(int *read_fd, ws_process_id *fork_child, char **data, char **msg, void (*update_cb)(void));
189
199 extern int
200 sync_interface_stats_close(int *read_fd, ws_process_id *fork_child, char **msg);
201
214 extern int
215 sync_pipe_gets_nonblock(int pipe_fd, char *bytes, int max);
216
222 extern 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__ */
capture_session
struct _capture_session capture_session
Opaque handle representing an active or pending capture session.
sync_if_bpf_filter_open
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.).
sync_pipe_kill
void sync_pipe_kill(ws_process_id fork_child)
Forcefully terminate the capture child process as quickly as possible.
sync_pipe_stop
void sync_pipe_stop(capture_session *cap_session)
Request that the capture child stop capturing and shut down cleanly.
sync_interface_set_80211_chan
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.
sync_if_capabilities_open
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.
sync_interface_list_open
int sync_interface_list_open(char **data, char **primary_msg, char **secondary_msg, void(*update_cb)(void))
Get an interface list using dumpcap.
sync_if_list_capabilities_open
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.
sync_pipe_start
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.
sync_pipe_gets_nonblock
int sync_pipe_gets_nonblock(int pipe_fd, char *bytes, int max)
Read a line from a pipe in non‑blocking mode.
capture_sync_set_fetch_dumpcap_pid_cb
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.
sync_interface_stats_open
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.
sync_interface_stats_close
int sync_interface_stats_close(int *read_fd, ws_process_id *fork_child, char **msg)
Close an interface statistics stream previously opened with dumpcap.
processes.h
_capture_session
Opaque handle representing an active or pending capture session.
Definition capture_session.h:156
_info_data
Aggregates packet count statistics and UI state for a live capture info display.
Definition capture_info.h:43
capture_options_tag
Definition capture_opts.h:245