| Wireshark 4.7.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
void | srt_table_init (void)
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_t * | get_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_param_handler_cb | srt_table_get_param_handler_cb (register_srt_t *srt)
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)
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

typedef struct _srt_procedure_t srt_procedure_t

Procedure data

## ◆ srt_stat_table

typedef struct _srt_stat_table 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

  rst | the srt table
  proc_index | number of procedure
  req_time | the time of the corresponding request
  pinfo | current 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

  srt | Registered SRT
  srt_array | SRT table array

## ◆ free_srt_table_data()

WS_DLL_PUBLIC void free_srt_table_data | ( | srt_stat_table * | rst | ) |

Free the srt table data.

Parameters

  rst | the 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

  srt | Registered 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

  srt | Registered 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

  srt | Registered 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

  name | dissector 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

  srt | Registered 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

  srt | Registered 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

  name | the table name
  short_name | the name used in a tab display
  srt_array | the srt table array to add to
  num_procs | number of procedures
  proc_column_name | procedure column name (if different from "Procedure")
  filter_string | table filter string or NULL
  table_specific_data | Table 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

  rst | the srt table
  proc_index | number of procedure
  procedure | the 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_id | is the protocol with conversation
  tap_listener | string for register_tap_listener (NULL to just use protocol name)
  max_tables | maximum number of tables
  srt_packet_func | the tap processing function
  init_cb | initialize dissector SRT function
  param_cb | handles 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_array | SRT 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

  srt | Registered SRT
  data | Parameter 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

  srt | Registered SRT
  srt_array | SRT 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

  srt | Registered SRT
  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 parsed. Caller must free memory

## ◆ srt_table_get_param_handler_cb()

WS_DLL_PUBLIC srt_param_handler_cb srt_table_get_param_handler_cb | ( | register_srt_t * | srt | ) |

Helper function to get handler of parameter

Parameters

  srt | Registered SRT

Returns
  Parameter function handler for the table

## ◆ 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

  srt | Registered SRT

Returns
  SRT tap string

## ◆ srt_table_init()

void srt_table_init | ( | void |  | ) |
| extern

Initialize the service response time system.

## ◆ 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

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