Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
Typedefs | Enumerations | Functions
capture.h File Reference
#include "capture_opts.h"
#include "capture_info.h"
#include "capchild/capture_session.h"

Go to the source code of this file.

Typedefs

typedef void(* capture_callback_t) (gint event, capture_session *cap_session, gpointer user_data)
 
typedef struct if_stat_cache_s if_stat_cache_t
 

Enumerations

enum  capture_cbs {
  capture_cb_capture_prepared, capture_cb_capture_update_started, capture_cb_capture_update_continue, capture_cb_capture_update_finished,
  capture_cb_capture_fixed_started, capture_cb_capture_fixed_continue, capture_cb_capture_fixed_finished, capture_cb_capture_stopping,
  capture_cb_capture_failed
}
 

Functions

void capture_callback_add (capture_callback_t func, gpointer user_data)
 
void capture_callback_remove (capture_callback_t func, gpointer user_data)
 
gboolean capture_start (capture_options *capture_opts, capture_session *cap_session, info_data_t *cap_data, void(*update_cb)(void))
 
void capture_stop (capture_session *cap_session)
 
void capture_restart (capture_session *cap_session)
 
void capture_kill_child (capture_session *cap_session)
 
if_stat_cache_t * capture_stat_start (capture_options *capture_opts)
 
gboolean capture_stats (if_stat_cache_t *sc, char *ifname, struct pcap_stat *ps)
 
void capture_stat_stop (if_stat_cache_t *sc)
 

Detailed Description

Capture related things.

Function Documentation

void capture_kill_child ( capture_session cap_session)

Terminate the capture child cleanly when exiting.

void capture_restart ( capture_session cap_session)

Restart the current captured packets and start again.

gboolean capture_start ( capture_options capture_opts,
capture_session cap_session,
info_data_t cap_data,
void(*)(void)  update_cb 
)

Start a capture session.

Parameters
capture_optsthe numerous capture options
cap_sessiona handle for the capture session
cap_dataa struct with capture info data
update_cbupdate screen
Returns
TRUE if the capture starts successfully, FALSE otherwise.
if_stat_cache_t* capture_stat_start ( capture_options capture_opts)

Start gathering capture statistics for the interfaces specified.

Parameters
capture_optsA structure containing options for the capture.
Returns
A pointer to the statistics state data.
void capture_stat_stop ( if_stat_cache_t *  sc)

Stop gathering capture statistics.

void capture_stop ( capture_session cap_session)

Stop a capture session (usually from a menu item).