#include <epan/epan.h>
#include <epan/packet.h>
#include <wsutil/inet_cidr.h>
#include <epan/tap.h>
#include <epan/wmem_scopes.h>
#include "ws_symbol_export.h"
Go to the source code of this file.
|
#define | SUBSTREAM_UNUSED UINT64_C(0xFFFFFFFFFFFFFFFF) |
|
|
typedef union _stream_addr | stream_addr |
|
typedef struct _follow_info | follow_info_t |
|
typedef struct register_follow | register_follow_t |
|
typedef char *(* | follow_conv_filter_func) (epan_dissect_t *edt, packet_info *pinfo, unsigned *stream, unsigned *sub_stream) |
|
typedef char *(* | follow_index_filter_func) (unsigned stream, unsigned sub_stream) |
|
typedef char *(* | follow_address_filter_func) (address *src_addr, address *dst_addr, int src_port, int dst_port) |
|
typedef char *(* | follow_port_to_display_func) (wmem_allocator_t *allocator, unsigned port) |
|
typedef uint32_t(* | follow_stream_count_func) (void) |
|
typedef bool(* | follow_sub_stream_id_func) (unsigned stream, unsigned sub_stream, bool le, unsigned *sub_stream_out) |
|
|
enum | show_stream_t { FROM_CLIENT
, FROM_SERVER
, BOTH_HOSTS
} |
|
|
WS_DLL_PUBLIC void | register_follow_stream (const int proto_id, const char *tap_listener, follow_conv_filter_func conv_filter, follow_index_filter_func index_filter, follow_address_filter_func address_filter, follow_port_to_display_func port_to_display, tap_packet_cb tap_handler, follow_stream_count_func stream_count, follow_sub_stream_id_func sub_stream_id) |
|
WS_DLL_PUBLIC int | get_follow_proto_id (register_follow_t *follower) |
|
WS_DLL_PUBLIC const char * | get_follow_tap_string (register_follow_t *follower) |
|
WS_DLL_PUBLIC register_follow_t * | get_follow_by_name (const char *proto_short_name) |
|
WS_DLL_PUBLIC register_follow_t * | get_follow_by_proto_id (const int proto_id) |
|
WS_DLL_PUBLIC follow_conv_filter_func | get_follow_conv_func (register_follow_t *follower) |
|
WS_DLL_PUBLIC follow_index_filter_func | get_follow_index_func (register_follow_t *follower) |
|
WS_DLL_PUBLIC follow_address_filter_func | get_follow_address_func (register_follow_t *follower) |
|
WS_DLL_PUBLIC follow_port_to_display_func | get_follow_port_to_display (register_follow_t *follower) |
|
WS_DLL_PUBLIC tap_packet_cb | get_follow_tap_handler (register_follow_t *follower) |
|
WS_DLL_PUBLIC follow_stream_count_func | get_follow_stream_count_func (register_follow_t *follower) |
|
WS_DLL_PUBLIC follow_sub_stream_id_func | get_follow_sub_stream_id_func (register_follow_t *follower) |
|
WS_DLL_PUBLIC tap_packet_status | follow_tvb_tap_listener (void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const void *data, tap_flags_t flags) |
|
WS_DLL_PUBLIC void | follow_iterate_followers (wmem_foreach_func func, void *user_data) |
|
WS_DLL_PUBLIC char * | follow_get_stat_tap_string (register_follow_t *follower) |
|
WS_DLL_PUBLIC void | follow_reset_stream (follow_info_t *info) |
|
WS_DLL_PUBLIC void | follow_info_free (follow_info_t *follow_info) |
|
Copyright 1998 Mike Hall mlh@i.nosp@m.o.co.nosp@m.m
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
◆ follow_get_stat_tap_string()
Generate -z stat (tap) name for a follower Currently used only by TShark
- Parameters
-
follower | [in] Registered follower |
- Returns
- A tap data handler
◆ follow_info_free()
WS_DLL_PUBLIC void follow_info_free |
( |
follow_info_t * |
follow_info | ) |
|
Free follow_info_t structure Free everything except the GUI element
- Parameters
-
follow_info | [in] follower info |
◆ follow_iterate_followers()
WS_DLL_PUBLIC void follow_iterate_followers |
( |
wmem_foreach_func |
func, |
|
|
void * |
user_data |
|
) |
| |
Interator to walk all registered followers and execute func
- Parameters
-
func | action to be performed on all conversation tables |
user_data | any data needed to help perform function |
◆ follow_reset_stream()
Clear payload, fragments, counters, addresses, and ports of follow_info_t for retapping. (Does not clear substream_id, which is used for selecting which tvbs are tapped.) Free everything except the GUI element and the follow_info_t structure itself
- Parameters
-
◆ follow_tvb_tap_listener()
Tap function handler when dissector's tap provides follow data as a tvb. Used by TCP, UDP and HTTP followers
◆ get_follow_address_func()
WS_DLL_PUBLIC follow_address_filter_func get_follow_address_func |
( |
register_follow_t * |
follower | ) |
|
Provide function that builds a follow filter based on address/port pairs.
- Parameters
-
follower | [in] Registered follower |
- Returns
- A filter function handler
◆ get_follow_by_name()
WS_DLL_PUBLIC register_follow_t * get_follow_by_name |
( |
const char * |
proto_short_name | ) |
|
Get a registered follower by protocol short name
- Parameters
-
proto_short_name | Protocol short name |
- Returns
- tap registered follower if match, otherwise NULL
◆ get_follow_by_proto_id()
Get a registered follower by protocol id
- Parameters
-
- Returns
- tap registered follower if match, otherwise NULL
◆ get_follow_conv_func()
WS_DLL_PUBLIC follow_conv_filter_func get_follow_conv_func |
( |
register_follow_t * |
follower | ) |
|
Provide function that builds a follow filter based on the current packet's conversation.
- Parameters
-
follower | [in] Registered follower |
- Returns
- A filter function handler
◆ get_follow_index_func()
WS_DLL_PUBLIC follow_index_filter_func get_follow_index_func |
( |
register_follow_t * |
follower | ) |
|
Provide function that builds a follow filter based on stream.
- Parameters
-
follower | [in] Registered follower |
- Returns
- A filter function handler
◆ get_follow_port_to_display()
WS_DLL_PUBLIC follow_port_to_display_func get_follow_port_to_display |
( |
register_follow_t * |
follower | ) |
|
Provide function that resolves port number to name based on follower.
- Parameters
-
follower | [in] Registered follower |
- Returns
- A port resolver function handler
◆ get_follow_proto_id()
Get protocol ID from registered follower
- Parameters
-
follower | Registered follower |
- Returns
- protocol id of follower
◆ get_follow_stream_count_func()
WS_DLL_PUBLIC follow_stream_count_func get_follow_stream_count_func |
( |
register_follow_t * |
follower | ) |
|
Provide function that gets the total number of streams for a registered follower The function can be NULL if the follower does not count the number of streams
- Parameters
-
follower | [in] Registered follower |
- Returns
- A stream count handler
◆ get_follow_sub_stream_id_func()
WS_DLL_PUBLIC follow_sub_stream_id_func get_follow_sub_stream_id_func |
( |
register_follow_t * |
follower | ) |
|
Provide function that, for given stream and sub stream ids, searches for the first sub stream id less than or equal (or greater than or equal) the given sub stream id present on the given stream id. Returns true and the sub stream id found, or false. This is used by the GUI to select valid sub stream numbers, e.g. when incrementing or decrementing the sub stream ID widget. This function should be NULL if the follower does not have sub streams.
- Parameters
-
follower | [in] Registered follower |
- Returns
- A sub stream id function handler
◆ get_follow_tap_handler()
Provide function that handles tap data (tap_packet_cb parameter of register_tap_listener)
- Parameters
-
follower | [in] Registered follower |
- Returns
- A tap packet handler
◆ get_follow_tap_string()
Get tap name string from registered follower (used for register_tap_listener)
- Parameters
-
follower | Registered follower |
- Returns
- tap name string of follower