Qt: Add copy from another profile in UAT dialogs
[metze/wireshark/wip.git] / epan / stream.h
index aeb18e4cc143dc831f5146c584aa40a23438009a..fd36b046eacd447823c3d02c43fcbeeb0d1168b9 100644 (file)
@@ -4,31 +4,19 @@
  * which are handled as streams, and don't have lengths
  * and IDs such as are required for reassemble.h
  *
- * $Id$
- *
  * Wireshark - Network traffic analyzer
  * By Gerald Combs <gerald@wireshark.org>
  * Copyright 1998 Gerald Combs
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ * SPDX-License-Identifier: GPL-2.0-or-later
  */
 
 #ifndef STREAM_H
 #define STREAM_H
 
 #include <epan/tvbuff.h>
+#include <epan/reassemble.h>
+#include "ws_symbol_export.h"
 
 struct _fragment_items;
 
@@ -67,25 +55,25 @@ struct conversation;
 
 /* initialise a new stream. Call this when you first identify a distinct
  * stream. The circit pointer is just used as a key to look up the stream. */
-extern stream_t *stream_new_circ ( const struct circuit *circuit, int p2p_dir );
+WS_DLL_PUBLIC stream_t *stream_new_circ ( const struct circuit *circuit, int p2p_dir );
 extern stream_t *stream_new_conv ( const struct conversation *conv, int p2p_dir );
 
 /* retrieve a previously-created stream.
  *
  * Returns null if no matching stream was found.
  */
-extern stream_t *find_stream_circ ( const struct circuit *circuit, int p2p_dir );
+WS_DLL_PUBLIC stream_t *find_stream_circ ( const struct circuit *circuit, int p2p_dir );
 extern stream_t *find_stream_conv ( const struct conversation *conv, int p2p_dir );
 
 
 
 /* see if we've seen this fragment before.
-   
+
    The framenum and offset are just hash keys, so can be any values unique
    to this frame, but the idea is that you use the number of the frame being
    disassembled, and the byte-offset within that frame.
 */
-extern stream_pdu_fragment_t *stream_find_frag( stream_t *stream, guint32 framenum, guint32 offset );
+WS_DLL_PUBLIC stream_pdu_fragment_t *stream_find_frag( stream_t *stream, guint32 framenum, guint32 offset );
 
 /* 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
@@ -100,7 +88,7 @@ extern stream_pdu_fragment_t *stream_find_frag( stream_t *stream, guint32 framen
  * This essentially means that you can only add fragments on the first pass
  * through the stream.
  */
-extern stream_pdu_fragment_t *stream_add_frag( stream_t *stream, guint32 framenum, guint32 offset,
+WS_DLL_PUBLIC stream_pdu_fragment_t *stream_add_frag( stream_t *stream, guint32 framenum, guint32 offset,
                                        tvbuff_t *tvb, packet_info *pinfo, gboolean more_frags );
 
 /* Get the length of a fragment previously found by stream_find_frag().
@@ -113,7 +101,7 @@ extern guint32 stream_get_frag_length( const stream_pdu_fragment_t *frag);
  *
  * Returns NULL until the last fragment is added.
  */
-extern struct _fragment_data *stream_get_frag_data( const stream_pdu_fragment_t *frag);
+extern fragment_head *stream_get_frag_data( const stream_pdu_fragment_t *frag);
 
 /*
  * Process reassembled data; if this is the last fragment, put the fragment
@@ -121,7 +109,7 @@ extern struct _fragment_data *stream_get_frag_data( const stream_pdu_fragment_t
  * reassembled data, otherwise just put a "reassembled in" item into the
  * protocol tree.
  */
-extern tvbuff_t *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,
@@ -134,5 +122,6 @@ extern guint32 stream_get_pdu_no( const stream_pdu_fragment_t *frag);
 
 /* initialise the stream routines */
 void stream_init( void );
+void stream_cleanup( void );
 
 #endif /* STREAM_H */