| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
capture.h
Go to the documentation of this file.
1
11
12/* This file should only be included if libpcap is present */
13
14#ifndef __CAPTURE_H__
15#define __CAPTURE_H__
16
20
21#include "ui/capture_opts.h"
22#include "capture_info.h"
23#include <epan/cfile.h>
24#include "capture/capture_session.h"
25
26#ifdef __cplusplus
27 extern "C" {
28#endif /* __cplusplus */
29
33 typedef enum {
34 capture_cb_capture_prepared,
35 capture_cb_capture_update_started,
36 capture_cb_capture_update_continue,
37 capture_cb_capture_update_finished,
38 capture_cb_capture_fixed_started,
39 capture_cb_capture_fixed_continue,
40 capture_cb_capture_fixed_finished,
41 capture_cb_capture_stopping,
42 capture_cb_capture_failed,
43 capture_cb_capture_toolbar
44} capture_cbs;
45
46 typedef void (*capture_callback_t) (int event, capture_session *cap_session,
47 void *user_data);
48
54 extern void
55 capture_callback_add(capture_callback_t func, void *user_data);
56
62 extern void
63 capture_callback_remove(capture_callback_t func, void *user_data);
64
71 extern void
72 capture_input_init(capture_session *cap_session, capture_file *cf);
73
85 extern bool
86 capture_start(capture_options *capture_opts, GPtrArray *capture_comments,
87 capture_session *cap_session, info_data_t* cap_data,
88 void(*update_cb)(void));
89
94 extern void
95 capture_stop(capture_session *cap_session);
96
101 extern void
102 capture_kill_child(capture_session *cap_session);
103
104/*
105 * Interface statistics (dumpcap -S) are now collected off-thread by the Qt
106 * InterfaceStatsWorker, which talks to sync_interface_stats_open() directly.
107 * The former C if_stat_cache API lived here and is gone.
108 */
109
110#ifdef __cplusplus
111}
112#endif /* __cplusplus */
113
114#endif /* capture.h */
capture_start
bool capture_start(capture_options *capture_opts, GPtrArray *capture_comments, capture_session *cap_session, info_data_t *cap_data, void(*update_cb)(void))
capture_cbs
capture_cbs
Event identifiers for live capture lifecycle callbacks.
Definition capture.h:33
capture_cb_capture_update_started
@ capture_cb_capture_update_started
Definition capture.h:35
capture_cb_capture_fixed_finished
@ capture_cb_capture_fixed_finished
Definition capture.h:40
capture_cb_capture_fixed_continue
@ capture_cb_capture_fixed_continue
Definition capture.h:39
capture_cb_capture_fixed_started
@ capture_cb_capture_fixed_started
Definition capture.h:38
capture_cb_capture_toolbar
@ capture_cb_capture_toolbar
Definition capture.h:43
capture_cb_capture_update_finished
@ capture_cb_capture_update_finished
Definition capture.h:37
capture_cb_capture_prepared
@ capture_cb_capture_prepared
Definition capture.h:34
capture_cb_capture_update_continue
@ capture_cb_capture_update_continue
Definition capture.h:36
capture_cb_capture_stopping
@ capture_cb_capture_stopping
Definition capture.h:41
capture_cb_capture_failed
@ capture_cb_capture_failed
Definition capture.h:42
capture_input_init
void capture_input_init(capture_session *cap_session, capture_file *cf)
capture_callback_remove
void capture_callback_remove(capture_callback_t func, void *user_data)
Remove a capture callback.
capture_stop
void capture_stop(capture_session *cap_session)
Stop a capture session (usually from a menu item).
capture_kill_child
void capture_kill_child(capture_session *cap_session)
Terminate the capture child cleanly when exiting.
capture_callback_add
void capture_callback_add(capture_callback_t func, void *user_data)
Add a capture callback.
capture_info.h
info_data_t
struct _info_data info_data_t
Aggregates packet count statistics and UI state for a live capture info display.
capture_opts.h
capture_session.h
capture_session
struct _capture_session capture_session
Opaque handle representing an active or pending capture session.
cfile.h
capture_file
struct _capture_file capture_file
Represents a capture file and its associated metadata.