| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Typedefs | Enumerations | Functions
capture.h File Reference
`#include "ui/capture_opts.h"`
`#include "capture_info.h"`
`#include "cfile.h"`
`#include "capture/capture_session.h"`

Go to the source code of this file.

## Typedefs
typedef void(* | capture_callback_t) (int event, capture_session *cap_session, void *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, void *user_data)
void | capture_callback_remove (capture_callback_t func, void *user_data)
void | capture_input_init (capture_session *cap_session, capture_file *cf)
bool | capture_start (capture_options *capture_opts, GPtrArray *capture_comments, capture_session *cap_session, info_data_t *cap_data, void(*update_cb)(void))
void | capture_stop (capture_session *cap_session)
void | capture_kill_child (capture_session *cap_session)
WS_RETNONNULL if_stat_cache_t * | capture_stat_start (capture_options *capture_opts)
WS_RETNONNULL if_stat_cache_t * | capture_interface_stat_start (capture_options *capture_opts, GList **if_list)
bool | capture_stats (if_stat_cache_t *sc, char *ifname, struct pcap_stat *ps)
void | capture_stat_stop (if_stat_cache_t *sc)

## Detailed Description

Definitions for packet capture windows

Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs

SPDX-License-Identifier: GPL-2.0-or-later

Capture related things.

## Function Documentation

## ◆ capture_input_init()

void capture_input_init | ( | capture_session * | cap_session,
|  | capture_file * | cf
| ) |  |
| extern

Initialize a capture session.

Parameters

  cap_session | the handle for the capture session
  cf | the capture_file for the file

## ◆ capture_interface_stat_start()

WS_RETNONNULL if_stat_cache_t * capture_interface_stat_start | ( | capture_options * | capture_opts,
|  | GList ** | if_list
| ) |  |
| extern

Retrieve the list of interfaces and their capabilities, and start gathering capture statistics for the interfaces.

Parameters

  | capture_opts | A structure containing options for the capture.
  [out] | if_list | A pointer that will store a GList of if_info_t.

Returns
  A pointer to the statistics state data.

## ◆ capture_kill_child()

void capture_kill_child | ( | capture_session * | cap_session | ) |
| extern

Terminate the capture child cleanly when exiting.

## ◆ capture_start()

bool capture_start | ( | capture_options * | capture_opts,
|  | GPtrArray * | capture_comments,
|  | capture_session * | cap_session,
|  | info_data_t * | cap_data,
|  | void(*)(void) | update_cb
| ) |  |
| extern

Start a capture session.

Parameters

  capture_opts | the numerous capture options
  capture_comments | if not NULL, a GPtrArray * to a set of comments to put in the capture file's Section Header Block if it's a pcapng file
  cap_session | the handle for the capture session
  cap_data | a struct with capture info data
  update_cb | update screen

Returns
  true if the capture starts successfully, false otherwise.

## ◆ capture_stat_start()

WS_RETNONNULL if_stat_cache_t * capture_stat_start | ( | capture_options * | capture_opts | ) |
| extern

Start gathering capture statistics for the interfaces specified.

Parameters

  capture_opts | A structure containing options for the capture.

Returns
  A pointer to the statistics state data.

## ◆ capture_stat_stop()

void capture_stat_stop | ( | if_stat_cache_t * | sc | ) |

Stop gathering capture statistics.

## ◆ capture_stop()

void capture_stop | ( | capture_session * | cap_session | ) |
| extern

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