aboutsummaryrefslogtreecommitdiffstats
path: root/epan/addr_resolv.h
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2013-09-22 19:40:02 +0000
committerAnders Broman <anders.broman@ericsson.com>2013-09-22 19:40:02 +0000
commit20108d7950b18454feff829de5f7f9c6fcaefd26 (patch)
tree582620b3b75522faaa467f62f62ebd3b9fae79de /epan/addr_resolv.h
parent9175c79ac1dbde4692b0992f36eb0b3f7cf2f227 (diff)
Get rid of struct addrinfo, use the hastables for name resolution instead.
svn path=/trunk/; revision=52176
Diffstat (limited to 'epan/addr_resolv.h')
-rw-r--r--epan/addr_resolv.h30
1 files changed, 6 insertions, 24 deletions
diff --git a/epan/addr_resolv.h b/epan/addr_resolv.h
index c6743a3a2f..d6e2f6e506 100644
--- a/epan/addr_resolv.h
+++ b/epan/addr_resolv.h
@@ -37,6 +37,7 @@
#include <epan/address.h>
#include <epan/tvbuff.h>
#include <epan/to_str.h>
+#include <wiretap/wtap.h>
#include "ws_symbol_export.h"
#ifdef __cplusplus
@@ -261,33 +262,14 @@ WS_DLL_PUBLIC gboolean add_hosts_file (const char *hosts_file);
/* adds a hostname in the hash table */
WS_DLL_PUBLIC gboolean add_ip_name_from_string (const char *addr, const char *name);
-/** Get a list of host name to address mappings we know about.
- *
- * Each list element is an addrinfo struct with the following fields defined:
- * - ai_family: 0, AF_INET or AF_INET6
- * - ai_addrlen: Length of ai_addr
- * - ai_canonname: Host name or NULL
- * - ai_addr: Pointer to a struct sockaddr or NULL (see below)
- * - ai_next: Next element or NULL
- * All other fields are zero-filled.
- *
- * If ai_family is 0, this is a dummy entry which should only appear at the beginning of the list.
- *
- * If ai_family is AF_INET, ai_addr points to a struct sockaddr_in with the following fields defined:
- * - sin_family: AF_INET
- * - sin_addr: Host IPv4 address
- * All other fields are zero-filled.
- *
- * If ai_family is AF_INET6, ai_addr points to a struct sockaddr_in6 with the following fields defined:
- * - sin6_family: AF_INET6
- * - sin6_addr: Host IPv6 address
- * All other fields are zero-filled.
+
+/** Get lists of host name to address mappings we know about.
*
- * The list and its elements MUST NOT be modified or freed.
+ * The struct contains two g_lists one with hashipv4_t entries and one with hashipv6_t entries.
*
- * @return The first element in our list of known addresses. May be NULL.
+ * @return a struct with lists of known addresses(IPv4 and IPv6). May be NULL.
*/
-WS_DLL_PUBLIC struct addrinfo *get_addrinfo_list(void);
+WS_DLL_PUBLIC addrinfo_lists_t *get_addrinfo_list(void);
/* add ethernet address / name corresponding to IP address */
extern void add_ether_byip(const guint ip, const guint8 *eth);