|
| 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
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.