gchar *dccp_name;
} serv_port_t;
+/*
+ * XXX Some of this is duplicated in addrinfo_list. We may want to replace the
+ * addr and name parts with a struct addrinfo or create our own addrinfo-like
+ * struct that simply points to the data below.
+ */
+typedef struct hashipv4 {
+ guint addr;
+ gboolean is_dummy_entry; /* name is IPv4 address in dot format */
+ gboolean resolve; /* already tried to resolve it */
+ gchar ip[16];
+ gchar name[MAXNAMELEN];
+} hashipv4_t;
+
/*
* Flag controlling what names to resolve.
*/
struct pref_module;
extern void addr_resolve_pref_init(struct pref_module *nameres);
-/* host_name_lookup_init fires up an ADNS socket if we're using ADNS */
-extern void host_name_lookup_init(void);
-
/** If we're using c-ares or ADNS, process outstanding host name lookups.
* This is called from a GLIB timeout in Wireshark and before processing
* each packet in TShark.
*/
WS_DLL_PUBLIC gboolean host_name_lookup_process(void);
-/* host_name_lookup_cleanup cleans up an ADNS socket if we're using ADNS */
-extern void host_name_lookup_cleanup(void);
-
/* get_hostname returns the host name or "%d.%d.%d.%d" if not found */
WS_DLL_PUBLIC const gchar *get_hostname(const guint addr);
GHashTable *get_serv_port_hashtable(void);
WS_DLL_PUBLIC
-void initialize_ethers(void);
+GHashTable *get_ipv4_hash_table(void);
-WS_DLL_PUBLIC
-void eth_name_lookup_cleanup(void);
+/*
+ * private functions (should only be called by epan directly)
+ */
+
+WS_DLL_LOCAL
+void name_resolver_init(void);
+
+/* (Re)Initialize hostname resolution subsystem */
+WS_DLL_LOCAL
+void host_name_lookup_init(void);
+
+/* Clean up only hostname resolutions (so they don't "leak" from one
+ * file to the next).
+ */
+WS_DLL_LOCAL
+void host_name_lookup_cleanup(void);
+
+WS_DLL_LOCAL
+void addr_resolv_init(void);
+
+WS_DLL_LOCAL
+void addr_resolv_cleanup(void);
#ifdef __cplusplus
}