| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Classes | Typedefs | Functions
rtd_table.h File Reference
`#include "tap.h"`
`#include "timestats.h"`
`#include <wsutil/value_string.h>`
`#include <epan/wmem_scopes.h>`

Go to the source code of this file.

## Classes
struct | _rtd_timestat
| Holds response time delay (RTD) statistics for a single request/response category. More...
struct | _rtd_stat_table
| Aggregates RTD statistics across all tracked request/response categories for a single protocol tap. More...
struct | _rtd_data_t

## Typedefs
typedef struct _rtd_timestat | rtd_timestat
| Holds response time delay (RTD) statistics for a single request/response category.
typedef struct _rtd_stat_table | rtd_stat_table
| Aggregates RTD statistics across all tracked request/response categories for a single protocol tap.
typedef struct _rtd_data_t | rtd_data_t
typedef struct register_rtd | register_rtd_t
typedef void(* | rtd_gui_init_cb) (rtd_stat_table *rtd, void *gui_data)
typedef void(* | rtd_filter_check_cb) (const char *opt_arg, const char **filter, char **err)

## Functions
void | rtd_table_init (void)
WS_DLL_PUBLIC void | register_rtd_table (const int proto_id, const char *tap_listener, unsigned num_tables, unsigned num_timestats, const value_string *vs_type, tap_packet_cb rtd_packet_func, rtd_filter_check_cb filter_check_cb)
WS_DLL_PUBLIC int | get_rtd_proto_id (register_rtd_t *rtd)
WS_DLL_PUBLIC const char * | get_rtd_tap_listener_name (register_rtd_t *rtd)
WS_DLL_PUBLIC tap_packet_cb | get_rtd_packet_func (register_rtd_t *rtd)
WS_DLL_PUBLIC unsigned | get_rtd_num_tables (register_rtd_t *rtd)
WS_DLL_PUBLIC const value_string * | get_rtd_value_string (register_rtd_t *rtd)
WS_DLL_PUBLIC register_rtd_t * | get_rtd_table_by_name (const char *name)
WS_DLL_PUBLIC void | free_rtd_table (rtd_stat_table *table)
WS_DLL_PUBLIC void | reset_rtd_table (rtd_stat_table *table)
WS_DLL_PUBLIC void | rtd_table_iterate_tables (wmem_foreach_func func, void *user_data)
WS_DLL_PUBLIC void | rtd_table_get_filter (register_rtd_t *rtd, const char *opt_arg, const char **filter, char **err)
WS_DLL_PUBLIC void | rtd_table_dissector_init (register_rtd_t *rtd, rtd_stat_table *table, rtd_gui_init_cb gui_callback, void *callback_data)
WS_DLL_PUBLIC char * | rtd_table_get_tap_string (register_rtd_t *rtd)

## Detailed Description

GUI independent helper routines common to all Response Time Delay (RTD) taps. Based on srt_table.h

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

## ◆ rtd_data_t

typedef struct _rtd_data_t rtd_data_t

tap data

## Function Documentation

## ◆ free_rtd_table()

WS_DLL_PUBLIC void free_rtd_table | ( | rtd_stat_table * | table | ) |

Free the RTD table data.

Parameters

  table | RTD stat table array

## ◆ get_rtd_num_tables()

WS_DLL_PUBLIC unsigned get_rtd_num_tables | ( | register_rtd_t * | rtd | ) |

Get the number of RTD tables

Parameters

  rtd | Registered RTD

Returns
  The number of registered tables.

## ◆ get_rtd_packet_func()

WS_DLL_PUBLIC tap_packet_cb get_rtd_packet_func | ( | register_rtd_t * | rtd | ) |

Get tap function handler from RTD

Parameters

  rtd | Registered RTD

Returns
  tap function handler of RTD

## ◆ get_rtd_proto_id()

WS_DLL_PUBLIC int get_rtd_proto_id | ( | register_rtd_t * | rtd | ) |

Get protocol ID from RTD

Parameters

  rtd | Registered RTD

Returns
  protocol id of RTD

## ◆ get_rtd_table_by_name()

WS_DLL_PUBLIC register_rtd_t * get_rtd_table_by_name | ( | const char * | name | ) |

Get RTD table by its dissector name

Parameters

  name | dissector name to fetch.

Returns
  RTD table pointer or NULL.

## ◆ get_rtd_tap_listener_name()

WS_DLL_PUBLIC const char * get_rtd_tap_listener_name | ( | register_rtd_t * | rtd | ) |

Get string for register_tap_listener call. Typically just dissector name

Parameters

  rtd | Registered RTD

Returns
  string for register_tap_listener call

## ◆ get_rtd_value_string()

WS_DLL_PUBLIC const value_string * get_rtd_value_string | ( | register_rtd_t * | rtd | ) |

Get value_string used for RTD

Parameters

  rtd | Registered RTD

Returns
  value_string of RTD

## ◆ register_rtd_table()

WS_DLL_PUBLIC void register_rtd_table | ( | const int | proto_id,
|  | const char * | tap_listener,
|  | unsigned | num_tables,
|  | unsigned | num_timestats,
|  | const value_string * | vs_type,
|  | tap_packet_cb | rtd_packet_func,
|  | rtd_filter_check_cb | filter_check_cb )

Register the response time delay table.

Parameters

  proto_id | is the protocol with conversation
  tap_listener | string for register_tap_listener (NULL to just use protocol name)
  num_tables | number of tables
  num_timestats | number of timestamps in the table
  vs_type | value_string for the stat types
  rtd_packet_func | the tap processing function
  filter_check_cb | callback for verification of filter or other dissector checks

## ◆ reset_rtd_table()

WS_DLL_PUBLIC void reset_rtd_table | ( | rtd_stat_table * | table | ) |

Reset table data in the RTD.

Parameters

  table | RTD table

## ◆ rtd_table_dissector_init()

WS_DLL_PUBLIC void rtd_table_dissector_init | ( | register_rtd_t * | rtd,
|  | rtd_stat_table * | table,
|  | rtd_gui_init_cb | gui_callback,
|  | void * | callback_data )

"Common" initialization function for all GUIs

Parameters

  rtd | Registered RTD
  table | RTD table
  gui_callback | optional GUI callback function
  callback_data | optional GUI callback data

## ◆ rtd_table_get_filter()

WS_DLL_PUBLIC void rtd_table_get_filter | ( | register_rtd_t * | rtd,
|  | const char * | opt_arg,
|  | const char ** | filter,
|  | char ** | err )

Return filter used for register_tap_listener

Parameters

  rtd | Registered RTD
  opt_arg | passed in opt_arg from GUI
  filter | returned filter string to be used for registering tap
  err | returned error if opt_arg string can't be successfully handled. Caller must free memory

## ◆ rtd_table_get_tap_string()

WS_DLL_PUBLIC char * rtd_table_get_tap_string | ( | register_rtd_t * | rtd | ) |

Helper function to get tap string name Caller is responsible for freeing returned string

Parameters

  rtd | Registered RTD

Returns
  RTD tap string

## ◆ rtd_table_init()

void rtd_table_init | ( | void |  | ) |
| extern

Initialize the response time delay system.

## ◆ rtd_table_iterate_tables()

WS_DLL_PUBLIC void rtd_table_iterate_tables | ( | wmem_foreach_func | func,
|  | void * | user_data )

Iterator to walk RTD tables and execute func Used for initialization

Parameters

  func | action to be performed on all conversation tables
  user_data | any data needed to help perform function