emem -> wmem
[metze/wireshark/wip.git] / epan / follow.h
1 /* follow.h
2  *
3  * $Id$
4  *
5  * Copyright 1998 Mike Hall <mlh@io.com>
6  *
7  * Wireshark - Network traffic analyzer
8  * By Gerald Combs <gerald@wireshark.org>
9  * Copyright 1998 Gerald Combs
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  *
25  */
26
27 #ifndef __FOLLOW_H__
28 #define __FOLLOW_H__
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif /* __cplusplus */
33
34 #include <epan/packet.h>
35 #include "ws_symbol_export.h"
36
37 #define MAX_IPADDR_LEN  16
38
39 /* With MSVC and a libwireshark.dll, we need a special declaration. */
40 WS_DLL_PUBLIC gboolean empty_tcp_stream;
41 WS_DLL_PUBLIC gboolean incomplete_tcp_stream;
42
43 typedef struct _tcp_stream_chunk {
44   guint8      src_addr[MAX_IPADDR_LEN];
45   guint16     src_port;
46   guint32     dlen;
47 } tcp_stream_chunk;
48
49 WS_DLL_PUBLIC
50 char* build_follow_filter( packet_info * );
51 WS_DLL_PUBLIC
52 gboolean follow_tcp_addr( const address *, guint, const address *, guint );
53 WS_DLL_PUBLIC
54 gboolean follow_tcp_index( guint32 );
55 void reassemble_tcp( guint32, guint32, guint32, guint32, const char*, guint32,
56                      int, address *, address *, guint, guint );
57 WS_DLL_PUBLIC
58 void  reset_tcp_reassembly( void );
59
60 typedef struct {
61         guint8          ip_address[2][MAX_IPADDR_LEN];
62         guint32         port[2];
63         unsigned int    bytes_written[2];
64         gboolean        is_ipv6;
65 } follow_stats_t;
66
67 WS_DLL_PUBLIC
68 void follow_stats(follow_stats_t* stats);
69
70 #ifdef __cplusplus
71 }
72 #endif /* __cplusplus */
73
74 #endif