|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
#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.
Classes | |
| union | _stream_addr |
| Represents an IP address for a stream, supporting both IPv4 and IPv6. More... | |
| struct | follow_record_t |
| struct | _follow_info |
Macros | |
| #define | SUBSTREAM_UNUSED UINT64_C(0xFFFFFFFFFFFFFFFF) |
Typedefs | |
| typedef union _stream_addr | stream_addr |
| Represents an IP address for a stream, supporting both IPv4 and IPv6. | |
| 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) |
Enumerations | |
| enum | show_stream_t { FROM_CLIENT , FROM_SERVER , BOTH_HOSTS } |
| Indicates the direction of a network stream for display purposes. More... | |
Functions | |
| void | follow_init (void) |
| 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) |
| Register a new follow stream. | |
| WS_DLL_PUBLIC int | get_follow_proto_id (register_follow_t *follower) |
| Get protocol ID from registered follower. | |
| WS_DLL_PUBLIC const char * | get_follow_tap_string (register_follow_t *follower) |
| Get tap name string from registered follower (used for register_tap_listener) | |
| WS_DLL_PUBLIC register_follow_t * | get_follow_by_name (const char *proto_short_name) |
| Get a registered follower by protocol short name. | |
| WS_DLL_PUBLIC register_follow_t * | get_follow_by_proto_id (const int proto_id) |
| Get a registered follower by protocol id. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| WS_DLL_PUBLIC tap_packet_cb | get_follow_tap_handler (register_follow_t *follower) |
| Provide function that handles tap data (tap_packet_cb parameter of register_tap_listener) | |
| 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. | |
| WS_DLL_PUBLIC follow_sub_stream_id_func | get_follow_sub_stream_id_func (register_follow_t *follower) |
| Retrieve the next sub-stream ID for a given stream and stream ID. | |
| 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) |
| Tap listener for dissectors that export follow data via a tvb. | |
| WS_DLL_PUBLIC void | follow_iterate_followers (wmem_foreach_func func, void *user_data) |
| Iterator to walk all registered followers and execute func. | |
| WS_DLL_PUBLIC char * | follow_get_stat_tap_string (register_follow_t *follower) |
| Generate -z stat (tap) name for a follower Currently used only by TShark. | |
| WS_DLL_PUBLIC void | follow_reset_stream (follow_info_t *info) |
| Clear payload, fragments, counters, addresses, and ports of follow_info_t for retapping. | |
| WS_DLL_PUBLIC void | follow_info_free (follow_info_t *follow_info) |
| Free follow_info_t structure Free everything except the GUI element. | |
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
| typedef union _stream_addr stream_addr |
Represents an IP address for a stream, supporting both IPv4 and IPv6.
This union allows flexible storage of either an IPv4 or IPv6 address for stream identification or filtering.
| enum show_stream_t |
| WS_DLL_PUBLIC char * follow_get_stat_tap_string | ( | register_follow_t * | follower | ) |
Generate -z stat (tap) name for a follower Currently used only by TShark.
| follower | [in] Registered follower |
| WS_DLL_PUBLIC void follow_info_free | ( | follow_info_t * | follow_info | ) |
Free follow_info_t structure Free everything except the GUI element.
| follow_info | [in] follower info |
|
extern |
Initialize the follow conversation/stream system.
| WS_DLL_PUBLIC void follow_iterate_followers | ( | wmem_foreach_func | func, |
| void * | user_data | ||
| ) |
Iterator to walk all registered followers and execute func.
| func | action to be performed on all conversation tables |
| user_data | any data needed to help perform function |
| WS_DLL_PUBLIC void follow_reset_stream | ( | follow_info_t * | info | ) |
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
| info | [in] follower info |
| 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 | ||
| ) |
Tap listener for dissectors that export follow data via a tvb.
Tap function handler when dissector's tap provides follow data as a tvb. Used by TCP, UDP and HTTP followers
| tapdata | Opaque follow‑tap context (typically a follow_info struct). |
| pinfo | Packet metadata for the current frame. |
| edt | Dissection tree (unused). |
| data | Protocol‑specific follow data, expected to contain a tvb. |
| flags | Tap flags describing packet‑level conditions. |
| 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.
| follower | [in] Registered follower |
| WS_DLL_PUBLIC register_follow_t * get_follow_by_name | ( | const char * | proto_short_name | ) |
Get a registered follower by protocol short name.
| proto_short_name | Protocol short name |
| WS_DLL_PUBLIC register_follow_t * get_follow_by_proto_id | ( | const int | proto_id | ) |
Get a registered follower by protocol id.
| proto_id | Protocol Id |
| 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.
| follower | [in] Registered follower |
| 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.
| follower | [in] Registered follower |
| 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.
| follower | [in] Registered follower |
| WS_DLL_PUBLIC int get_follow_proto_id | ( | register_follow_t * | follower | ) |
Get protocol ID from registered follower.
| follower | Registered follower |
| 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.
| follower | [in] Registered follower |
| WS_DLL_PUBLIC follow_sub_stream_id_func get_follow_sub_stream_id_func | ( | register_follow_t * | follower | ) |
Retrieve the next sub-stream ID for a given stream and stream ID.
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.
| follower | [in] Registered follower |
| WS_DLL_PUBLIC tap_packet_cb get_follow_tap_handler | ( | register_follow_t * | follower | ) |
Provide function that handles tap data (tap_packet_cb parameter of register_tap_listener)
| follower | [in] Registered follower |
| WS_DLL_PUBLIC const char * get_follow_tap_string | ( | register_follow_t * | follower | ) |
Get tap name string from registered follower (used for register_tap_listener)
| follower | Registered follower |
| 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 | ||
| ) |
Register a new follow stream.
| proto_id | Protocol ID. |
| tap_listener | TAP listener name. |
| conv_filter | Conversation filter function. |
| index_filter | Index filter function. |
| address_filter | Address filter function. |
| port_to_display | Port to display function. |
| tap_handler | TAP handler function. |
| stream_count | Stream count function. |
| sub_stream_id | Sub-stream ID function. |