#include <epan/tvbuff.h>
#include <epan/reassemble.h>
#include "ws_symbol_export.h"
Go to the source code of this file.
|
| WS_DLL_PUBLIC stream_t * | stream_new (const struct conversation *conv, int p2p_dir) |
| | Initialise a new stream. Call this when you first identify a distinct stream. The conversation pointer is just used as a key to look up the stream.
|
| WS_DLL_PUBLIC stream_t * | find_stream (const struct conversation *conv, int p2p_dir) |
| | Retrieve a previously-created stream.
|
| WS_DLL_PUBLIC stream_pdu_fragment_t * | stream_find_frag (stream_t *stream, uint32_t framenum, uint32_t offset) |
| | See if we've seen this fragment before.
|
| WS_DLL_PUBLIC stream_pdu_fragment_t * | stream_add_frag (stream_t *stream, uint32_t framenum, uint32_t offset, tvbuff_t *tvb, packet_info *pinfo, bool more_frags) |
| | Add a new fragment to the fragment tables for the stream.
|
| uint32_t | stream_get_frag_length (const stream_pdu_fragment_t *frag) |
| | Get the length of a fragment previously found by stream_find_frag().
|
| WS_DLL_PUBLIC fragment_head * | stream_get_frag_data (const stream_pdu_fragment_t *frag) |
| | Get a handle on the top of the chain of fragment_datas underlying this PDU.
|
| WS_DLL_PUBLIC tvbuff_t * | stream_process_reassembled (tvbuff_t *tvb, int offset, packet_info *pinfo, const char *name, const stream_pdu_fragment_t *frag, const struct _fragment_items *fit, bool *update_col_infop, proto_tree *tree) |
| | Process reassembled data; if this is the last fragment, put the fragment information into the protocol tree, and construct a tvbuff with the reassembled data, otherwise just put a "reassembled in" item into the protocol tree.
|
| uint32_t | stream_get_pdu_no (const stream_pdu_fragment_t *frag) |
| | Get the PDU number. PDUs are numbered from zero within a stream.
|
|
void | stream_init (void) |
| | Initializes stream-related data structures and reassembly tables.
|
|
void | stream_cleanup (void) |
| | Cleans up stream-related data structures and reassembly tables.
|
Definitions for handling circuit-switched protocols which are handled as streams, and don't have lengths and IDs such as are required for reassemble.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
◆ find_stream()
| WS_DLL_PUBLIC stream_t * find_stream |
( |
const struct conversation * | conv, |
|
|
int | p2p_dir ) |
Retrieve a previously-created stream.
- Parameters
-
| conv | Pointer to the conversation structure. |
| p2p_dir | The peer-to-peer direction. |
- Returns
- Pointer to the retrieved stream, or NULL if not found.
◆ stream_add_frag()
| WS_DLL_PUBLIC stream_pdu_fragment_t * stream_add_frag |
( |
stream_t * | stream, |
|
|
uint32_t | framenum, |
|
|
uint32_t | offset, |
|
|
tvbuff_t * | tvb, |
|
|
packet_info * | pinfo, |
|
|
bool | more_frags ) |
Add a new fragment to the fragment tables for the stream.
The framenum and offset are keys allowing future access with stream_find_frag(), tvb is the fragment to be added, and pinfo is the information for the frame containing this fragment. more_frags should be set if this is the final fragment in the PDU.
- the fragment must be later in the stream than any previous fragment (ie, framenum.offset must be greater than those passed on the previous call)
This essentially means that you can only add fragments on the first pass through the stream.
- Parameters
-
| stream | Pointer to the stream structure. |
| framenum | The frame number of the fragment. |
| offset | The byte offset within the frame. |
| tvb | The TVBuffer containing the fragment data. |
| pinfo | Pointer to the packet information structure for the frame containing this fragment. |
| more_frags | Set to true if this is the final fragment in the PDU, false otherwise. |
- Returns
- Pointer to the newly added fragment, or NULL on failure.
◆ stream_find_frag()
| WS_DLL_PUBLIC stream_pdu_fragment_t * stream_find_frag |
( |
stream_t * | stream, |
|
|
uint32_t | framenum, |
|
|
uint32_t | offset ) |
See if we've seen this fragment before.
- Parameters
-
| stream | Pointer to the stream structure. |
| framenum | The frame number. |
| offset | The byte offset within the frame. |
- Returns
- Pointer to the found fragment, or NULL if not found.
◆ stream_get_frag_data()
| WS_DLL_PUBLIC fragment_head * stream_get_frag_data |
( |
const stream_pdu_fragment_t * | frag | ) |
|
Get a handle on the top of the chain of fragment_datas underlying this PDU.
frag can be any fragment within a PDU, and it will always return the head of the chain
Returns NULL until the last fragment is added.
- Parameters
-
| frag | A fragment within the PDU. |
- Returns
- A pointer to the fragment list for the PDU, or NULL if not complete
◆ stream_get_frag_length()
| uint32_t stream_get_frag_length |
( |
const stream_pdu_fragment_t * | frag | ) |
|
|
extern |
Get the length of a fragment previously found by stream_find_frag().
- Parameters
-
| frag | A fragment within the PDU. |
- Returns
- The length of the fragment.
◆ stream_get_pdu_no()
| uint32_t stream_get_pdu_no |
( |
const stream_pdu_fragment_t * | frag | ) |
|
|
extern |
Get the PDU number. PDUs are numbered from zero within a stream.
- Parameters
-
| frag | A fragment within the PDU. |
- Returns
- The PDU number.
◆ stream_new()
| WS_DLL_PUBLIC stream_t * stream_new |
( |
const struct conversation * | conv, |
|
|
int | p2p_dir ) |
Initialise a new stream. Call this when you first identify a distinct stream. The conversation pointer is just used as a key to look up the stream.
- Parameters
-
| conv | Pointer to the conversation structure. |
| p2p_dir | The peer-to-peer direction. |
- Returns
- Pointer to the newly created stream, or NULL on failure.
◆ stream_process_reassembled()
| WS_DLL_PUBLIC tvbuff_t * stream_process_reassembled |
( |
tvbuff_t * | tvb, |
|
|
int | offset, |
|
|
packet_info * | pinfo, |
|
|
const char * | name, |
|
|
const stream_pdu_fragment_t * | frag, |
|
|
const struct _fragment_items * | fit, |
|
|
bool * | update_col_infop, |
|
|
proto_tree * | tree ) |
Process reassembled data; if this is the last fragment, put the fragment information into the protocol tree, and construct a tvbuff with the reassembled data, otherwise just put a "reassembled in" item into the protocol tree.
- Parameters
-
| tvb | The original TVBuffer containing the fragment data. |
| offset | The offset within the TVBuffer where the fragment starts. |
| pinfo | Packet information structure. |
| name | Name of the reassembled data source. |
| frag | A fragment within the PDU. |
| fit | Pointer to the fragment items structure. |
| update_col_infop | Pointer to a boolean indicating whether to update column info. |
| tree | Protocol tree for displaying fragment information. |
- Returns
- A new TVBuffer containing the reassembled data, or NULL if not applicable.