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>
25
26#ifdef __cplusplus
27extern "C" {
28#endif /* __cplusplus */
29
44
45typedef void (*capture_callback_t) (int event, capture_session *cap_session,
46 void *user_data);
47
53extern void
54capture_callback_add(capture_callback_t func, void *user_data);
55
61extern void
62capture_callback_remove(capture_callback_t func, void *user_data);
63
70extern void
72
84extern bool
85capture_start(capture_options *capture_opts, GPtrArray *capture_comments,
86 capture_session *cap_session, info_data_t* cap_data,
87 void(*update_cb)(void));
88
93extern void
95
100extern void
102
103struct if_stat_cache_s;
104typedef struct if_stat_cache_s if_stat_cache_t;
105
112extern WS_RETNONNULL if_stat_cache_t * capture_stat_start(capture_options *capture_opts);
113
122extern WS_RETNONNULL if_stat_cache_t * capture_interface_stat_start(capture_options *capture_opts, GList **if_list);
123
127struct pcap_stat; /* Stub in case we don't or haven't yet included pcap.h */
128
136extern bool capture_stats(if_stat_cache_t *sc, char *ifname, struct pcap_stat *ps);
137
142void capture_stat_stop(if_stat_cache_t *sc);
143
144#ifdef __cplusplus
145}
146#endif /* __cplusplus */
147
148#endif /* capture.h */
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
Event identifiers for live capture lifecycle callbacks.
Definition capture.h:33
@ capture_cb_capture_update_started
Definition capture.h:35
@ capture_cb_capture_fixed_finished
Definition capture.h:40
@ capture_cb_capture_fixed_continue
Definition capture.h:39
@ capture_cb_capture_fixed_started
Definition capture.h:38
@ capture_cb_capture_update_finished
Definition capture.h:37
@ capture_cb_capture_prepared
Definition capture.h:34
@ capture_cb_capture_update_continue
Definition capture.h:36
@ capture_cb_capture_stopping
Definition capture.h:41
@ capture_cb_capture_failed
Definition capture.h:42
WS_RETNONNULL if_stat_cache_t * capture_stat_start(capture_options *capture_opts)
Start gathering capture statistics for the interfaces specified.
void capture_input_init(capture_session *cap_session, capture_file *cf)
void capture_stat_stop(if_stat_cache_t *sc)
Stop gathering capture statistics.
void capture_callback_remove(capture_callback_t func, void *user_data)
Remove a capture callback.
bool capture_stats(if_stat_cache_t *sc, char *ifname, struct pcap_stat *ps)
Fetch capture statistics for the interfaces specified.
void capture_stop(capture_session *cap_session)
Stop a capture session (usually from a menu item).
void capture_kill_child(capture_session *cap_session)
Terminate the capture child cleanly when exiting.
void capture_callback_add(capture_callback_t func, void *user_data)
Add a capture callback.
WS_RETNONNULL if_stat_cache_t * capture_interface_stat_start(capture_options *capture_opts, GList **if_list)
Retrieve the list of interfaces and their capabilities, and start gathering capture statistics for th...
Represents a capture file and its associated metadata.
Definition cfile.h:84
Opaque handle representing an active or pending capture session.
Definition capture_session.h:142
Definition capture_info.h:40
Definition capture_opts.h:236