aboutsummaryrefslogtreecommitdiffstats
path: root/epan/follow.h
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-01-05 11:30:16 +0000
committerMichael Mann <mmann78@netscape.net>2016-01-07 01:09:35 +0000
commitf410121cf2a94ef06fa42863352a77ba42a5fdf7 (patch)
treed0c6acefca85ec9dbb758950cc6d48c79252970c /epan/follow.h
parent7888c43a5711710222343ee8fca8c5e500b5ed3a (diff)
Remove some unnecessary dependencies and cleanup some code
No need for the GTK dependency on dissectors/packet-ipv6.h. Add the stream_addr typedef in follow.h to make some code simpler. Change-Id: I1cf906f58734a90263141362f2da33a140f93533 Reviewed-on: https://code.wireshark.org/review/13063 Reviewed-by: João Valverde <j@v6e.pt> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/follow.h')
-rw-r--r--epan/follow.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/epan/follow.h b/epan/follow.h
index 06f0e135e9..e12be69253 100644
--- a/epan/follow.h
+++ b/epan/follow.h
@@ -30,22 +30,26 @@ extern "C" {
#endif /* __cplusplus */
#include <epan/packet.h>
+#include <epan/ipv6.h>
#include "ws_symbol_export.h"
-#define MAX_IPADDR_LEN 16
-
typedef enum {
TCP_STREAM = 0,
UDP_STREAM,
MAX_STREAM
} stream_type;
+typedef union _stream_addr {
+ guint32 ipv4;
+ struct e_in6_addr ipv6;
+} stream_addr;
+
/* With MSVC and a libwireshark.dll, we need a special declaration. */
WS_DLL_PUBLIC gboolean empty_tcp_stream;
WS_DLL_PUBLIC gboolean incomplete_tcp_stream;
typedef struct _tcp_stream_chunk {
- guint8 src_addr[MAX_IPADDR_LEN];
+ stream_addr src_addr;
guint16 src_port;
guint32 dlen;
guint32 packet_num;
@@ -94,10 +98,10 @@ WS_DLL_PUBLIC
void reset_stream_follow(stream_type stream);
typedef struct {
- guint8 ip_address[2][MAX_IPADDR_LEN];
- guint32 port[2];
- unsigned int bytes_written[2];
- gboolean is_ipv6;
+ stream_addr ip_address[2];
+ guint32 port[2];
+ guint bytes_written[2];
+ gboolean is_ipv6;
} follow_stats_t;
WS_DLL_PUBLIC