| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions | Variables
mcast_stream.h File Reference
`#include <epan/tap.h>`

Go to the source code of this file.

## Classes
struct | buffer
| Sliding window buffer tracking per-stream burst and bandwidth statistics. More...
struct | _mcast_stream_info
| Holds statistics and metadata for a single detected multicast stream. More...
struct | _mcaststream_tapinfo
| Aggregate tap structure holding information about all detected multicast streams. More...

## Macros
#define | MAX_SPEED 200000

## Typedefs
typedef struct buffer | t_buffer
| Sliding window buffer tracking per-stream burst and bandwidth statistics.
typedef struct _mcast_stream_info | mcast_stream_info_t
| Holds statistics and metadata for a single detected multicast stream.
typedef struct _mcaststream_tapinfo | mcaststream_tapinfo_t
| Forward declaration of the multicast stream tap info aggregate structure.
typedef void(* | mcaststream_tap_reset_cb) (mcaststream_tapinfo_t *tapinfo)
| Callback invoked to reset all multicast stream tap state.
typedef void(* | mcaststream_tap_draw_cb) (mcaststream_tapinfo_t *tapinfo)
| Callback invoked to redraw or refresh the multicast stream UI.

## Functions
GString * | register_tap_listener_mcast_stream (mcaststream_tapinfo_t *tapinfo)
| Registers the mcast_streams tap listener (if not already done).
void | remove_tap_listener_mcast_stream (mcaststream_tapinfo_t *tapinfo)
| Remove the mcast_streams tap listener.
void | mcaststream_reset (mcaststream_tapinfo_t *tapinfo)
| Free all accumulated mcast stream tap data.
tap_packet_status | mcaststream_packet (void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *data, tap_flags_t flags)
| Tap packet callback for the mcast_streams tap.

## Variables
int32_t | mcast_stream_trigger
| Packet rate threshold (packets/s) above which a burst alarm is triggered.
int32_t | mcast_stream_bufferalarm
| Buffer fill level threshold at which a buffer alarm is triggered.
uint16_t | mcast_stream_burstint
| Burst measurement interval in milliseconds for the sliding window.
int32_t | mcast_stream_emptyspeed
| Drain speed of the buffer during idle periods, in bits per second.
int32_t | mcast_stream_cumulemptyspeed
| Cumulative drain speed of the buffer over time, in bits per second.

## Detailed Description

Copyright 2006, Iskratel , Slovenia By Jakob Bratkovic j.bra.nosp@m.tkov.nosp@m.ic@is.nosp@m.krat.nosp@m.el.si and Miha Jemec m.jem.nosp@m.ec@i.nosp@m.skrat.nosp@m.el.s.nosp@m.i

based on rtp_stream.h Copyright 2003, Alcatel Business Systems By Lars Ruoff lars..nosp@m.ruof.nosp@m.f@gmx.nosp@m..net

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

## Typedef Documentation

## ◆ mcaststream_tap_draw_cb

typedef void(* mcaststream_tap_draw_cb) (mcaststream_tapinfo_t *tapinfo)

Callback invoked to redraw or refresh the multicast stream UI.

Parameters

  tapinfo | Pointer to the tap info structure containing current stream data.

## ◆ mcaststream_tap_reset_cb

typedef void(* mcaststream_tap_reset_cb) (mcaststream_tapinfo_t *tapinfo)

Callback invoked to reset all multicast stream tap state.

Parameters

  tapinfo | Pointer to the tap info structure to reset.

## Function Documentation

## ◆ mcaststream_packet()

tap_packet_status mcaststream_packet | ( | void * | tapdata,
|  | packet_info * | pinfo,
|  | epan_dissect_t * | edt,
|  | const void * | data,
|  | tap_flags_t | flags )

Tap packet callback for the mcast_streams tap.

Tap callback (tap_packet_cb) for Mcast stream tap updates. Useful if for some reason you can't register the default listener, but want to make use of the existing Mcast calculations.

Parameters

  tapdata | Pointer to the `mcaststream_tapinfo_t` to update; cast from void* inside the function.
  pinfo | Packet metadata for the current packet.
  edt | The epan dissect context for the current packet.
  data | Tap-specific data for the current packet.
  flags | Tap flags for the current packet.

Returns
  TAP_PACKET_REDRAW if the display should be refreshed after this packet, TAP_PACKET_DONT_REDRAW otherwise.

## ◆ mcaststream_reset()

void mcaststream_reset | ( | mcaststream_tapinfo_t * | tapinfo | ) |

Free all accumulated mcast stream tap data.

Parameters

  tapinfo | The mcast stream tap state structure to clear.

## ◆ register_tap_listener_mcast_stream()

GString * register_tap_listener_mcast_stream | ( | mcaststream_tapinfo_t * | tapinfo | ) |

Registers the mcast_streams tap listener (if not already done).

From that point on, the Mcast streams list will be updated with every redissection. This function is also the entry point for the initialization routine of the tap system. So whenever mcast_stream.c is added to the list of WIRESHARK_TAP_SRCs, the tap will be registered on startup. If not, it will be registered on demand by the mcast_streams and mcast_analysis functions that need it.

Parameters

  tapinfo | The mcast stream tap state structure to populate.

Returns
  NULL on success, or a GString describing the registration error (the caller must free it with g_string_free()).

## ◆ remove_tap_listener_mcast_stream()

void remove_tap_listener_mcast_stream | ( | mcaststream_tapinfo_t * | tapinfo | ) |

Remove the mcast_streams tap listener.

Parameters

  tapinfo | The mcast stream tap state structure whose listener should be removed.