Wireshark  4.3.0
The Wireshark network protocol analyzer
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 #ifdef __cplusplus
24 extern "C" {
25 #endif /* __cplusplus */
26 
27 struct _info_data;
28 
45 extern bool
46 sync_pipe_start(capture_options *capture_opts, GPtrArray *capture_comments,
47  capture_session *cap_session, struct _info_data* cap_data,
48  void(*update_cb)(void));
49 
51 extern void
53 
55 extern void
56 sync_pipe_kill(ws_process_id fork_child);
57 
80 extern int
81 sync_interface_set_80211_chan(const char *iface, const char *freq, const char *type,
82  const char *center_freq1, const char *center_freq2,
83  char **data, char **primary_msg,
84  char **secondary_msg, void (*update_cb)(void));
85 
87 extern int
88 sync_interface_list_open(char **data, char **primary_msg,
89  char **secondary_msg, void (*update_cb)(void));
90 
92 extern int
93 sync_if_capabilities_open(const char *ifname, bool monitor_mode, const char* auth,
94  char **data, char **primary_msg,
95  char **secondary_msg, void (*update_cb)(void));
96 
97 extern int
98 sync_if_list_capabilities_open(GList *ifqueries,
99  char **data, char **primary_msg,
100  char **secondary_msg, void (*update_cb)(void));
101 
103 extern int
104 sync_interface_stats_open(int *read_fd, ws_process_id *fork_child, char **data, char **msg, void (*update_cb)(void));
105 
107 extern int
108 sync_interface_stats_close(int *read_fd, ws_process_id *fork_child, char **msg);
109 
111 extern int
112 sync_pipe_gets_nonblock(int pipe_fd, char *bytes, int max);
113 
114 /* set a callback to be called after fork with the pid of the forked child */
115 extern void capture_sync_set_fetch_dumpcap_pid_cb(void(*cb)(ws_process_id pid));
116 
117 #ifdef __cplusplus
118 }
119 #endif /* __cplusplus */
120 
121 #endif /* __CAPTURE_SYNC_H__ */
void sync_pipe_kill(ws_process_id fork_child)
void sync_pipe_stop(capture_session *cap_session)
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))
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))
int sync_interface_list_open(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_pipe_gets_nonblock(int pipe_fd, char *bytes, int max)
int sync_interface_stats_open(int *read_fd, ws_process_id *fork_child, char **data, char **msg, void(*update_cb)(void))
int sync_interface_stats_close(int *read_fd, ws_process_id *fork_child, char **msg)
Definition: capture_session.h:137
Definition: capture_info.h:40
Definition: capture_opts.h:248