aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-11-03 14:12:14 -0800
committerGuy Harris <guy@alum.mit.edu>2015-11-04 00:56:44 +0000
commit58431e2f6a939022261e1f54a9bf3e4fa39958ca (patch)
tree9818f807d7ae2d689442a1fdba3223c043e97a41 /wiretap
parent40b45dfb6e8117af0180d9b4137d60e799f08c20 (diff)
Don't include libwireshark headers from libwiretap.
Move the definitions of hashipv4_t and hashipv6_t to wiretap/wtap.h, as that's the main place they're used. Change them a bit not to depend on other stuff from libwireshark, and change the code as required by those changes. This should fix the Solaris build; apparently, the Sun^WOracle compiler is generating code for static inline functions even if they're never called, so that libwiretap ends up including code that calls tvbuff and wmem functions. There's probably further cleanup that could be done here, but this should at least fix the build, as well as getting rid of a dependency between two libraries that are at least somewhat independent (libwiretap should *not* depend on libwireshark, as some programs use libwiretap but not libwireshark, and, ultimately, we probably want it to be possible to use libwireshark without libwiretap but that'd be more work). Change-Id: I91c745282f17d7c8bff7809aa277eab2b3cf47c1 Reviewed-on: https://code.wireshark.org/review/11537 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/pcapng.c1
-rw-r--r--wiretap/wtap.h17
2 files changed, 17 insertions, 1 deletions
diff --git a/wiretap/pcapng.c b/wiretap/pcapng.c
index ddb4526167..3e6739c59c 100644
--- a/wiretap/pcapng.c
+++ b/wiretap/pcapng.c
@@ -35,7 +35,6 @@
#include "wtap-int.h"
-#include <epan/addr_resolv.h>
#include "file_wrappers.h"
#include "pcap-common.h"
#include "pcap-encap.h"
diff --git a/wiretap/wtap.h b/wiretap/wtap.h
index dad8105cc1..253f3c9a7f 100644
--- a/wiretap/wtap.h
+++ b/wiretap/wtap.h
@@ -1433,6 +1433,23 @@ typedef struct wtapng_name_res_s {
/* XXX */
} wtapng_name_res_t;
+#ifndef MAXNAMELEN
+#define MAXNAMELEN 64 /* max name length (hostname and port name) */
+#endif
+
+typedef struct hashipv4 {
+ guint addr;
+ guint8 flags; /* B0 dummy_entry, B1 resolve, B2 If the address is used in the trace */
+ gchar ip[16];
+ gchar name[MAXNAMELEN];
+} hashipv4_t;
+
+typedef struct hashipv6 {
+ guint8 addr[16];
+ guint8 flags; /* B0 dummy_entry, B1 resolve, B2 If the address is used in the trace */
+ gchar ip6[40];
+ gchar name[MAXNAMELEN];
+} hashipv6_t;
/** A struct with lists of resolved addresses.
* Used when writing name resoultion blocks (NRB)