diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-11-03 14:12:14 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-11-04 00:56:44 +0000 |
commit | 58431e2f6a939022261e1f54a9bf3e4fa39958ca (patch) | |
tree | 9818f807d7ae2d689442a1fdba3223c043e97a41 /epan | |
parent | 40b45dfb6e8117af0180d9b4137d60e799f08c20 (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 'epan')
-rw-r--r-- | epan/addr_resolv.c | 2 | ||||
-rw-r--r-- | epan/addr_resolv.h | 15 | ||||
-rw-r--r-- | epan/wslua/wslua_capture_info.c | 2 |
3 files changed, 3 insertions, 16 deletions
diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c index 2fcf3a08e6..51077984ec 100644 --- a/epan/addr_resolv.c +++ b/epan/addr_resolv.c @@ -896,7 +896,7 @@ static hashipv6_t * new_ipv6(const struct e_in6_addr *addr) { hashipv6_t *tp = g_new(hashipv6_t,1); - tp->addr = *addr; + memcpy(tp->addr, addr->bytes, sizeof tp->addr); tp->flags = 0; tp->name[0] = '\0'; ip6_to_str_buf(addr, tp->ip6); diff --git a/epan/addr_resolv.h b/epan/addr_resolv.h index 9645fe0c47..1f60cabff5 100644 --- a/epan/addr_resolv.h +++ b/epan/addr_resolv.h @@ -89,20 +89,7 @@ typedef struct serv_port { #define DUMMY_AND_RESOLVE_FLGS (DUMMY_ADDRESS_ENTRY | TRIED_RESOLVE_ADDRESS) #define USED_AND_RESOLVED_MASK (DUMMY_ADDRESS_ENTRY | RESOLVED_ADDRESS_USED) -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 { - struct e_in6_addr addr; - guint8 flags; /* B0 dummy_entry, B1 resolve, B2 If the address is used in the trace */ - gchar ip6[MAX_IP6_STR_LEN]; /* XX */ - gchar name[MAXNAMELEN]; -} hashipv6_t; + /* * Flag controlling what names to resolve. */ diff --git a/epan/wslua/wslua_capture_info.c b/epan/wslua/wslua_capture_info.c index eb83a94089..7a4ca96341 100644 --- a/epan/wslua/wslua_capture_info.c +++ b/epan/wslua/wslua_capture_info.c @@ -424,7 +424,7 @@ static int CaptureInfoConst_get_hosts(lua_State* L) { /* create the entry table */ lua_newtable(L); /* addr is in network order already */ - lua_pushlstring(L, (char*)(&ipv6_hash_list_entry->addr.bytes[0]), 16); + lua_pushlstring(L, (char*)(&ipv6_hash_list_entry->addr[0]), 16); lua_setfield(L, -2, "addr"); lua_pushstring(L, ipv6_hash_list_entry->name); lua_setfield(L, -2, "name"); |