Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
rtd_table.h File Reference
#include "tap.h"
#include "timestats.h"
#include "value_string.h"
#include <epan/wmem_scopes.h>

Go to the source code of this file.

Classes

struct  _rtd_timestat
 
struct  _rtd_stat_table
 
struct  _rtd_data_t
 

Typedefs

typedef struct _rtd_timestat rtd_timestat
 
typedef struct _rtd_stat_table rtd_stat_table
 
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

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_stringget_rtd_value_string (register_rtd_t *rtd)
 
WS_DLL_PUBLIC register_rtd_tget_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

◆ rtd_stat_table

Statistics table

Function Documentation

◆ free_rtd_table()

WS_DLL_PUBLIC void free_rtd_table ( rtd_stat_table table)

Free the RTD table data.

Parameters
tableRTD 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
rtdRegistered 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
rtdRegistered 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
rtdRegistered 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
namedissector 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
rtdRegistered 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
rtdRegistered 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_idis the protocol with conversation
tap_listenerstring for register_tap_listener (NULL to just use protocol name)
num_tablesnumber of tables
num_timestatsnumber of timestamps in the table
vs_typevalue_string for the stat types
rtd_packet_functhe tap processing function
filter_check_cbcallback 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
tableRTD 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
rtdRegistered RTD
tableRTD table
gui_callbackoptional GUI callback function
callback_dataoptional 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
rtdRegistered RTD
opt_argpassed in opt_arg from GUI
filterreturned filter string to be used for registering tap
errreturned 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
rtdRegistered RTD
Returns
RTD tap string

◆ rtd_table_iterate_tables()

WS_DLL_PUBLIC void rtd_table_iterate_tables ( wmem_foreach_func  func,
void *  user_data 
)

Interator to walk RTD tables and execute func Used for initialization

Parameters
funcaction to be performed on all conversation tables
user_dataany data needed to help perform function