| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
capture.h
Go to the documentation of this file.
1
12/* This file should only be included if libpcap is present */
13
14#ifndef __CAPTURE_H__
15#define __CAPTURE_H__
16
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
30 typedef enum {
31 capture_cb_capture_prepared,
32 capture_cb_capture_update_started,
33 capture_cb_capture_update_continue,
34 capture_cb_capture_update_finished,
35 capture_cb_capture_fixed_started,
36 capture_cb_capture_fixed_continue,
37 capture_cb_capture_fixed_finished,
38 capture_cb_capture_stopping,
39 capture_cb_capture_failed
40} capture_cbs;
41
42 typedef void (*capture_callback_t) (int event, capture_session *cap_session,
43 void *user_data);
44
45 extern void
46capture_callback_add(capture_callback_t func, void *user_data);
47
48 extern void
49capture_callback_remove(capture_callback_t func, void *user_data);
50
57 extern void
58 capture_input_init(capture_session *cap_session, capture_file *cf);
59
71 extern bool
72 capture_start(capture_options *capture_opts, GPtrArray *capture_comments,
73 capture_session *cap_session, info_data_t* cap_data,
74 void(*update_cb)(void));
75
77 extern void
78 capture_stop(capture_session *cap_session);
79
81 extern void
82 capture_kill_child(capture_session *cap_session);
83
84 struct if_stat_cache_s;
85 typedef struct if_stat_cache_s if_stat_cache_t;
86
92 extern WS_RETNONNULL if_stat_cache_t * capture_stat_start(capture_options *capture_opts);
93
101 extern WS_RETNONNULL if_stat_cache_t * capture_interface_stat_start(capture_options *capture_opts, GList **if_list);
102
106 struct pcap_stat; /* Stub in case we don't or haven't yet included pcap.h */
107 extern bool capture_stats(if_stat_cache_t *sc, char *ifname, struct pcap_stat *ps);
108
112 void capture_stat_stop(if_stat_cache_t *sc);
113
114#ifdef __cplusplus
115}
116#endif /* __cplusplus */
117
118#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_stat_start
WS_RETNONNULL if_stat_cache_t * capture_stat_start(capture_options *capture_opts)
capture_input_init
void capture_input_init(capture_session *cap_session, capture_file *cf)
capture_stat_stop
void capture_stat_stop(if_stat_cache_t *sc)
capture_stop
void capture_stop(capture_session *cap_session)
capture_kill_child
void capture_kill_child(capture_session *cap_session)
capture_interface_stat_start
WS_RETNONNULL if_stat_cache_t * capture_interface_stat_start(capture_options *capture_opts, GList **if_list)
capture_info.h
capture_opts.h
capture_session.h
cfile.h
_capture_file
Definition cfile.h:71
_capture_session
Definition capture_session.h:136
_info_data
Definition capture_info.h:40
capture_options_tag
Definition capture_opts.h:236