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

Go to the source code of this file.

Classes

struct  _srt_procedure_t
 
struct  _srt_stat_table
 
struct  _srt_data_t
 

Typedefs

typedef struct _srt_procedure_t srt_procedure_t
 
typedef struct _srt_stat_table srt_stat_table
 
typedef void(* srt_proc_table_cb) (srt_stat_table *rst, int indx, struct _srt_data_t *gui_data)
 
typedef void(* srt_init_cb) (struct register_srt *srt, GArray *srt_array)
 
typedef unsigned(* srt_param_handler_cb) (struct register_srt *srt, const char *opt_arg, char **err)
 
typedef struct _srt_data_t srt_data_t
 
typedef struct register_srt register_srt_t
 

Functions

WS_DLL_PUBLIC void register_srt_table (const int proto_id, const char *tap_listener, int max_tables, tap_packet_cb srt_packet_func, srt_init_cb init_cb, srt_param_handler_cb param_cb)
 
WS_DLL_PUBLIC int get_srt_proto_id (register_srt_t *srt)
 
WS_DLL_PUBLIC const char * get_srt_tap_listener_name (register_srt_t *srt)
 
WS_DLL_PUBLIC int get_srt_max_tables (register_srt_t *srt)
 
WS_DLL_PUBLIC tap_packet_cb get_srt_packet_func (register_srt_t *srt)
 
WS_DLL_PUBLIC void set_srt_table_param_data (register_srt_t *srt, void *data)
 
WS_DLL_PUBLIC void * get_srt_table_param_data (register_srt_t *srt)
 
WS_DLL_PUBLIC register_srt_tget_srt_table_by_name (const char *name)
 
WS_DLL_PUBLIC void free_srt_table_data (srt_stat_table *rst)
 
WS_DLL_PUBLIC void free_srt_table (register_srt_t *srt, GArray *srt_array)
 
WS_DLL_PUBLIC void reset_srt_table (GArray *srt_array)
 
WS_DLL_PUBLIC void srt_table_iterate_tables (wmem_foreach_func func, void *user_data)
 
WS_DLL_PUBLIC void srt_table_get_filter (register_srt_t *srt, const char *opt_arg, const char **filter, char **err)
 
WS_DLL_PUBLIC void srt_table_dissector_init (register_srt_t *srt, GArray *srt_array)
 
WS_DLL_PUBLIC char * srt_table_get_tap_string (register_srt_t *srt)
 
WS_DLL_PUBLIC srt_stat_tableinit_srt_table (const char *name, const char *short_name, GArray *srt_array, int num_procs, const char *proc_column_name, const char *filter_string, void *table_specific_data)
 
WS_DLL_PUBLIC void init_srt_table_row (srt_stat_table *rst, int proc_index, const char *procedure)
 
WS_DLL_PUBLIC void add_srt_table_data (srt_stat_table *rst, int proc_index, const nstime_t *req_time, packet_info *pinfo)
 

Detailed Description

GUI independent helper routines common to all service response time (SRT) taps.

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

◆ register_srt_t

typedef struct register_srt register_srt_t

Structure for information about a registered service response table

◆ srt_data_t

typedef struct _srt_data_t srt_data_t

tap data

◆ srt_procedure_t

Procedure data

◆ srt_stat_table

Statistics table

Function Documentation

◆ add_srt_table_data()

WS_DLL_PUBLIC void add_srt_table_data ( srt_stat_table rst,
int  proc_index,
const nstime_t req_time,
packet_info pinfo 
)

Add srt response to table row data.

Parameters
rstthe srt table
proc_indexnumber of procedure
req_timethe time of the corresponding request
pinfocurrent packet info

◆ free_srt_table()

WS_DLL_PUBLIC void free_srt_table ( register_srt_t srt,
GArray *  srt_array 
)

Free the srt table data.

Parameters
srtRegistered SRT
srt_arraySRT table array

◆ free_srt_table_data()

WS_DLL_PUBLIC void free_srt_table_data ( srt_stat_table rst)

Free the srt table data.

Parameters
rstthe srt table

◆ get_srt_max_tables()

WS_DLL_PUBLIC int get_srt_max_tables ( register_srt_t srt)

Get maximum number of tables from SRT

Parameters
srtRegistered SRT
Returns
maximum number of tables of SRT

◆ get_srt_packet_func()

WS_DLL_PUBLIC tap_packet_cb get_srt_packet_func ( register_srt_t srt)

Get tap function handler from SRT

Parameters
srtRegistered SRT
Returns
tap function handler of SRT

◆ get_srt_proto_id()

WS_DLL_PUBLIC int get_srt_proto_id ( register_srt_t srt)

Get protocol ID from SRT

Parameters
srtRegistered SRT
Returns
protocol id of SRT

◆ get_srt_table_by_name()

WS_DLL_PUBLIC register_srt_t * get_srt_table_by_name ( const char *  name)

Get SRT table by its dissector name

Parameters
namedissector name to fetch.
Returns
SRT table pointer or NULL.

◆ get_srt_table_param_data()

WS_DLL_PUBLIC void * get_srt_table_param_data ( register_srt_t srt)

Get parameter data from SRT

Parameters
srtRegistered SRT
Returns
Parameter data

◆ get_srt_tap_listener_name()

WS_DLL_PUBLIC const char * get_srt_tap_listener_name ( register_srt_t srt)

Get string for register_tap_listener call. Typically just dissector name

Parameters
srtRegistered SRT
Returns
string for register_tap_listener call

◆ init_srt_table()

WS_DLL_PUBLIC srt_stat_table * init_srt_table ( const char *  name,
const char *  short_name,
GArray *  srt_array,
int  num_procs,
const char *  proc_column_name,
const char *  filter_string,
void *  table_specific_data 
)

Init an srt table data structure.

Parameters
namethe table name
short_namethe name used in a tab display
srt_arraythe srt table array to add to
num_procsnumber of procedures
proc_column_nameprocedure column name (if different from "Procedure")
filter_stringtable filter string or NULL
table_specific_dataTable specific data
Returns
newly created srt_stat_table

◆ init_srt_table_row()

WS_DLL_PUBLIC void init_srt_table_row ( srt_stat_table rst,
int  proc_index,
const char *  procedure 
)

Init an srt table row data structure.

Parameters
rstthe srt table
proc_indexnumber of procedure
procedurethe procedures name

◆ register_srt_table()

WS_DLL_PUBLIC void register_srt_table ( const int  proto_id,
const char *  tap_listener,
int  max_tables,
tap_packet_cb  srt_packet_func,
srt_init_cb  init_cb,
srt_param_handler_cb  param_cb 
)

Register the service response time table for the srt windows.

Parameters
proto_idis the protocol with conversation
tap_listenerstring for register_tap_listener (NULL to just use protocol name)
max_tablesmaximum number of tables
srt_packet_functhe tap processing function
init_cbinitialize dissector SRT function
param_cbhandles dissection of parameters to optional arguments of tap string

◆ reset_srt_table()

WS_DLL_PUBLIC void reset_srt_table ( GArray *  srt_array)

Reset ALL tables in the srt.

Parameters
srt_arraySRT table array

◆ set_srt_table_param_data()

WS_DLL_PUBLIC void set_srt_table_param_data ( register_srt_t srt,
void *  data 
)

Set parameter data from SRT parsed from tap string. Data will be freed on tap reset

Parameters
srtRegistered SRT
dataParameter data

◆ srt_table_dissector_init()

WS_DLL_PUBLIC void srt_table_dissector_init ( register_srt_t srt,
GArray *  srt_array 
)

"Common" initialization function for all GUIs

Parameters
srtRegistered SRT
srt_arraySRT table array

◆ srt_table_get_filter()

WS_DLL_PUBLIC void srt_table_get_filter ( register_srt_t srt,
const char *  opt_arg,
const char **  filter,
char **  err 
)

Return filter used for register_tap_listener

Parameters
srtRegistered SRT
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 parsed. Caller must free memory

◆ srt_table_get_tap_string()

WS_DLL_PUBLIC char * srt_table_get_tap_string ( register_srt_t srt)

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

Parameters
srtRegistered SRT
Returns
SRT tap string

◆ srt_table_iterate_tables()

WS_DLL_PUBLIC void srt_table_iterate_tables ( wmem_foreach_func  func,
void *  user_data 
)

Iterator to walk srt tables and execute func Used for initialization

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